cordova-11/www/js/10.js
2022-05-25 07:48:07 +08:00

1 line
9.6 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[10],{"4a89":function(t,e,a){},"75f9":function(t,e,a){"use strict";a("4a89")},beee:function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"content optics_style"},[a("div",{staticClass:"header"},[a("Header",{attrs:{options:t.batchNumList,model:t.currentBatchNum},on:{"update:model":function(e){t.currentBatchNum=e}}})],1),a("div",{staticClass:"content"},[a("optics-title",{attrs:{title:"数据明细"}}),a("div",{staticClass:"body_style"},[a("div",{staticClass:"mg-t-15"},[a("optics-title-crad",{attrs:{showCardForm:"",cardForm:t.cardForm}})],1),a("div",{staticClass:"mg-t-15"},[a("div",{staticClass:"body_style common-form"},[a("optics-title-crad",{attrs:{title:"数据录入"}},[1===t.status?a("template",{slot:"body"},[a("q-form",{ref:"form",staticClass:"q-gutter-md mg-t-20 minHeight"},[a("div",{staticClass:"row"},[a("div",{staticClass:"col mg-r-20"},[a("div",{staticClass:"label radio",class:{disable:t.disable}},[t._v("有效段数")]),a("q-input",{attrs:{placeholder:"请输入",filled:"",type:"number",rules:[function(t){return t&&""!==t&&t>1&&t<10&&-1===t.toString().indexOf(".")}],disable:t.disable,dense:""},model:{value:t.form.data.numberCuts,callback:function(e){t.$set(t.form.data,"numberCuts",t._n(e))},expression:"form.data.numberCuts"}})],1),a("div",{staticClass:"col mg-r-20"},[a("div",{staticClass:"label radio",class:{disable:t.disable}},[t._v("设备编号")]),a("q-select",{attrs:{placeholder:"请输入","emit-value":"","map-options":"","option-label":function(t){return t.deviceNo},"option-value":function(t){return t.id},options:t.DeviceIdList,filled:"",rules:[function(t){return t&&""!==t}],disable:t.disable,dense:""},model:{value:t.form.data.deviceId,callback:function(e){t.$set(t.form.data,"deviceId",e)},expression:"form.data.deviceId"}})],1),a("div",{staticClass:"col mg-r-20"},[a("div",{staticClass:"label",class:{disable:t.disable}},[t._v("备注")]),a("q-input",{attrs:{placeholder:"请输入",disable:t.disable,dense:""},model:{value:t.form.data.remarks,callback:function(e){t.$set(t.form.data,"remarks",e)},expression:"form.data.remarks"}})],1)])])],1):t._e(),2==t.status?a("template",{slot:"body"},[a("q-form",{ref:"sedForm"},[a("q-table",{staticStyle:{"min-height":"calc( 100vh - 470px )"},attrs:{data:t.tableForm.tableData,columns:t.tableForm.columns,"table-header-style":{backgroundColor:"#F8FBFF"},"hide-bottom":"",flat:"",pagination:t.tableForm.pagination,"row-key":"name"},scopedSlots:t._u([{key:"body",fn:function(e){return a("q-tr",{attrs:{props:e}},[a("q-td",{key:"stickNo",attrs:{dense:"",filled:"",width:"150px",props:e}},[t._v("\n "+t._s(e.row.stickNo)+"\n ")]),a("q-td",{key:"stickNumber",attrs:{width:"300px",props:e}},[a("q-input",{attrs:{filled:"",rules:[function(t){return t&&""!==t}],dense:""},model:{value:e.row.stickNumber,callback:function(a){t.$set(e.row,"stickNumber",a)},expression:"props.row.stickNumber"}})],1),a("q-td",{key:"afterCutLength",attrs:{width:"300px",props:e}},[a("q-input",{ref:"input1"+e.row.stickNo,attrs:{filled:"",type:"number",rules:[function(e){return e&&""!==e&&e>0&&e<=t.cardForm[2].value&&t.totalLengthNum<=t.cardForm[2].value}],dense:""},on:{input:t.totalLength},model:{value:e.row.afterCutLength,callback:function(a){t.$set(e.row,"afterCutLength",t._n(a))},expression:"props.row.afterCutLength"}})],1),a("q-td",{key:"afterCutWeight",attrs:{width:"300px",props:e}},[a("q-input",{ref:"input2"+e.row.stickNo,attrs:{filled:"",type:"number",rules:[function(e){return e&&""!==e&&e>0&&e<t.cardForm[3].value&&t.totalWeightNum<=t.cardForm[3].value}],dense:""},on:{input:t.totalWeight},model:{value:e.row.afterCutWeight,callback:function(a){t.$set(e.row,"afterCutWeight",t._n(a))},expression:"props.row.afterCutWeight"}})],1),a("q-td",{key:"remarks",attrs:{width:"300px",props:e}},[a("q-input",{attrs:{filled:"",dense:""},model:{value:e.row.remarks,callback:function(a){t.$set(e.row,"remarks",a)},expression:"props.row.remarks"}})],1)],1)}}],null,!1,3855020059)})],1)],1):t._e()],2)],1),a("div",{staticClass:"btn"},[a("common-btngroup",[[1===t.status?a("div",{staticClass:"form_bottom_group"},[a("q-btn",{attrs:{label:"取 消",type:"reset",rounded:"",color:"white","text-color":"black"},on:{click:t.cancel}}),a("q-btn",{attrs:{label:"截断",type:"submit",rounded:"",color:"primary"},on:{click:t.checkFirst}})],1):t._e(),2===t.status?a("div",{staticClass:"form_bottom_group"},[a("q-btn",{attrs:{label:"取消",type:"reset",rounded:"",color:"white","text-color":"black"},on:{click:t.cancel}}),a("q-btn",{attrs:{label:"确定",type:"submit",rounded:"",color:"primary"},on:{click:t.submit}})],1):t._e()]],2)],1)])])],1)])},i=[],r=a("0418"),o=a("30d4"),l=a("2691"),n=a("2a19"),c=a("dd67"),d={name:"guochangjieduan",components:{Header:r["a"],OpticsTitleCrad:o["default"],opticsTitle:l["default"],CommonBtngroup:c["default"]},data(){return{cardForm:[{name:"app:icon-chanpinbianma",title:"晶棒编号",value:"",bColor:"#1890FF"},{name:"app:icon-ziduanbianhao",title:"晶棒序列号",value:"",bColor:"#FA8C16"},{name:"app:icon-a-jieduan111",title:"截前长度",value:"",bColor:"#55C169"},{name:"app:icon-a-jieduan11",title:"截前重量",value:"",bColor:"#55C169"}],form:{data:{numberCuts:"",deviceId:"",remarks:""}},processId:16,stepId:16,prodId:0,stickId:0,status:1,tableForm:{tableData:[],columns:[{name:"stickNo",label:"晶棒编号",align:"left"},{name:"stickNumber",label:"晶棒序列号",align:"left"},{name:"afterCutLength",label:"截后长度",align:"left"},{name:"afterCutWeight",label:"截后重量",align:"left"},{name:"remarks",label:"备注",align:"left"}],pagination:{page:1,rowsPerPage:1e3}},code:[],totalWeightNum:0,totalLengthNum:0,DeviceIdList:[],batchNumList:[],currentBatchNum:null,disable:!0}},watch:{currentBatchNum:{handler(t){if(this.$nextTick((()=>{1===this.status?this.$refs.form.resetValidation():this.$refs.sedForm.resetValidation()})),t)this.getBaseData(),this.disable=!1;else{let{form:t,cardForm:e,status:a}=this.$options.data();this.form=t,this.status=a,this.cardForm=e,this.disable=!0}},immediate:!0,deep:!0}},methods:{getList(){this.$http({url:`/pad/common/queryNos?stepId=${this.stepId}`,method:"get"}).then((t=>{this.batchNumList=t.result}))},totalWeight(){this.totalWeightNum=0,this.tableForm.tableData.forEach((t=>{this.totalWeightNum+=Number(t.afterCutWeight)})),this.totalWeightNum<=this.cardForm[3].value&&this.tableForm.tableData.forEach((t=>{this.$refs[`input2${t.stickNo}`].resetValidation()}))},totalLength(){this.totalLengthNum=0,this.tableForm.tableData.forEach((t=>{this.totalLengthNum+=Number(t.afterCutLength)})),this.totalLengthNum<=this.cardForm[2].value&&this.tableForm.tableData.forEach((t=>{this.$refs[`input1${t.stickNo}`].resetValidation()}))},focusDeviceId(){this.$http({url:"/device/queryDropBox",method:"get",params:{stepId:this.stepId}}).then((t=>{this.DeviceIdList=t.result}))},getBaseData(){this.$http({url:"/pad/common/getStationInfo",method:"get",params:{no:this.currentBatchNum,processId:this.processId,stepId:this.stepId}}).then((t=>{this.cardForm.forEach((e=>{switch(e.title){case"晶棒序列号":e.value=t.result.stickNumber||"";break;case"晶棒编号":e.value=t.result.stickNo||"";break;case"截前长度":e.value=t.result.length||"";break;case"截前重量":e.value=t.result.stickWeight||"";break}})),t.result.outStickInfoDTOList?(this.status=2,this.tableForm.tableData=t.result.outStickInfoDTOList.map((t=>({stickId:t.stickId,stickNo:t.stickNo,afterCutLength:t.afterCutLength||"",afterCutWeight:t.afterCutWeight||"",stickNumber:t.stickNumber||"",remarks:t.remarks||""})))):this.status=1,this.prodId=t.result.prodId,this.stickId=t.result.stickId}))},checkFirst(){this.currentBatchNum?this.$refs.form.validate().then((t=>{t?this.$confirm({title:"提示",message:"是否过站?",btn:{okText:"确定",cancelText:"取消"}}).then((()=>{this.nextStep()})).catch((()=>{})):n["a"].create({type:"negative",position:"top",message:"请将数据填写完整"})})):n["a"].create({type:"negative",position:"top",message:"请选择编号"})},nextStep(){this.$http({url:"/pad/tooLongTruncation/truncation",method:"post",data:{...this.form.data,stepId:this.stepId,stickId:this.stickId,prodId:this.prodId}}).then((t=>{this.status=2,this.getInfo()}))},getInfo(){this.$http({url:"/pad/tooLongTruncation/getTruncationSticks",method:"get",params:{stickId:this.stickId}}).then((t=>{this.tableForm.tableData=t.result.map((t=>({stickId:t.id,stickNo:t.stickNo,afterCutLength:t.afterCutLength||"",afterCutWeight:t.afterCutWeight||"",stickNumber:t.stickNumber||"",remarks:t.remarks})))}))},cancel(){let{form:t,tableForm:e,cardForm:a,currentBatchNum:s,disable:i}=this.$options.data();this.form=t,this.tableForm=e,this.cardForm=a,this.currentBatchNum=s,this.disable=i},check(){this.currentBatchNum?this.$refs.sedForm.validate().then((t=>{t?this.submit():n["a"].create({type:"negative",position:"top",message:"请将数据填写完整"})})):n["a"].create({type:"negative",position:"top",message:"请选择编号"})},submit(){this.$http({url:"/pad/tooLongTruncation/passStation",method:"post",data:{truncationStickInfoDTOList:this.tableForm.tableData,stepId:this.stepId,prodId:this.prodId}}).then((t=>{n["a"].create({type:"positive",position:"top",message:"操作成功"}),this.getList(),this.currentBatchNum=null,this.cancel()}))}},created(){this.getList(),this.focusDeviceId()}},u=d,m=(a("75f9"),a("2877")),h=a("0378"),p=a("27f9"),b=a("ddd8"),f=a("eaac"),g=a("bd08"),k=a("db86"),v=a("9c40"),C=a("eebe"),N=a.n(C),I=Object(m["a"])(u,s,i,!1,null,"07890282",null);e["default"]=I.exports;N()(I,"components",{QForm:h["a"],QInput:p["a"],QSelect:b["a"],QTable:f["a"],QTr:g["a"],QTd:k["a"],QBtn:v["a"]})}}]);