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

1 line
7.0 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[18],{"9c7ca":function(t,e,a){},d458:function(t,e,a){"use strict";a("9c7ca")},ecc1:function(t,e,a){"use strict";a.r(e);var i=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 common-form"},[a("div",{staticClass:"mg-t-15"},[a("optics-title-crad",{attrs:{showCardForm:"",cardForm:t.cardForm}})],1),a("div",{staticClass:"mg-t-15"},[a("optics-title-crad",{attrs:{title:"数据录入"}},[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",{ref:"inputBeforeCutWeight",attrs:{placeholder:"请输入",filled:"",disable:t.disable,type:"number",rules:[function(e){return e&&""!==e&&t.currentStatus}],dense:""},model:{value:t.form.data.beforeCutWeight,callback:function(e){t.$set(t.form.data,"beforeCutWeight",t._n(e))},expression:"form.data.beforeCutWeight"}})],1),a("div",{staticClass:"col mg-r-20"},[a("div",{staticClass:"label radio ",class:{disable:t.disable}},[t._v("截后重量")]),a("q-input",{ref:"inputAfterCutWeight",attrs:{placeholder:"请输入",filled:"",disable:t.disable,type:"number",rules:[function(e){return e&&""!==e&&t.currentStatus}],dense:""},model:{value:t.form.data.afterCutWeight,callback:function(e){t.$set(t.form.data,"afterCutWeight",t._n(e))},expression:"form.data.afterCutWeight"}})],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:"",disable:t.disable,rules:[function(t){return t&&""!==t}],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:"row"},[a("div",{staticClass:"col-md-4 pd-r-20"},[a("div",{staticClass:"label radio ",class:{disable:t.disable}},[t._v("班次")]),a("q-select",{attrs:{options:t.shift,"emit-value":"","map-options":"",filled:"",disable:t.disable,dense:"",rules:[function(t){return t&&""!==t}]},model:{value:t.form.data.shift,callback:function(e){t.$set(t.form.data,"shift",e)},expression:"form.data.shift"}})],1),a("div",{staticClass:"col-md-4 pd-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)],2)],1)]),a("div",{staticClass:"btn"},[a("common-btngroup",{on:{submit:t.check,cancel:t.cancel}})],1)],1)])},s=[],r=a("dd67"),o=a("30d4"),d=a("0418"),l=a("2691"),c=a("2a19"),n={name:"qutouwei",components:{CommonBtngroup:r["default"],OpticsTitleCrad:o["default"],Header:d["a"],opticsTitle:l["default"]},data(){return{cardForm:[{name:"app:icon-ziduanbianhao",title:"晶棒编号",value:"",bColor:"#1890FF"},{name:"app:icon-chanpinbianma",title:"晶棒序列号",value:"",bColor:"#FA8C16"},{name:"app:icon-a-jieduan111",title:"截前长度",value:"",bColor:"#55C169"},{name:"app:icon-a-jieduan11",title:"截后长度",value:"",bColor:"#55C169"}],form:{data:{beforeCutWeight:"",afterCutWeight:"",deviceId:"",shift:"",remarks:""}},processId:5,stepId:5,prodId:0,stickNo:0,batchNumList:[],currentBatchNum:null,disable:!0,shift:[{label:"白班",value:1},{label:"夜班",value:2}],time:"",currentStatus:!0,DeviceIdList:[]}},methods:{getWeightAndDeviceId(){this.$http({url:"/pad/removeHeadAndTail/getTruncationInfo",method:"get",params:{stickNo:this.stickNo}}).then((t=>{let{afterCutWeight:e,beforeCutWeight:a,deviceId:i}=t.result;this.form.data.afterCutWeight=e,this.form.data.beforeCutWeight=a,this.form.data.deviceId=i}))},getTime(){this.time=(new Date).getHours(),this.time>8||this.time<20?this.form.data.shift=1:this.form.data.shift=0},getList(){this.$http({url:`/pad/common/queryNos?stepId=${this.stepId}`,method:"get"}).then((t=>{this.batchNumList=t.result}))},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.beforeCutLength||"";break;case"截后长度":e.value=t.result.afterCutLength||"";break}})),this.stickNo=t.result.stickNo,this.prodId=t.result.prodId,this.getTime(),this.getWeightAndDeviceId()}))},cancel(){let{form:t,disable:e,cardForm:a,currentBatchNum:i}=this.$options.data();this.form=t,this.cardForm=a,this.currentBatchNum=i,this.disable=e},check(){this.currentBatchNum?this.$refs.form.validate().then((t=>{t?this.$confirm({title:"提示",message:"是否过站?",btn:{okText:"确定",cancelText:"取消"}}).then((()=>{this.submit()})).catch((()=>{})):c["a"].create({type:"negative",position:"top",message:"请将数据填写完整"})})):c["a"].create({type:"negative",position:"top",message:"请选择编号"})},submit(){this.$http({url:"/pad/removeHeadAndTail/passStation",method:"post",data:{...this.form.data,stepId:this.stepId,prodId:this.prodId}}).then((t=>{c["a"].create({type:"positive",position:"top",message:"操作成功"}),this.getList(),this.currentBatchNum="",this.cancel()}))}},created(){this.getList(),this.focusDeviceId()},watch:{currentBatchNum:{handler(t){let{form:e,cardForm:a,disable:i}=this.$options.data();this.form=e,this.disable=i,this.$nextTick((()=>{this.$refs.form.resetValidation()})),t?(this.getBaseData(),this.disable=!1):(this.cardForm=a,this.disable=!0)},immediate:!0,deep:!0},"form.data.afterCutWeight":{handler(){this.form.data.beforeCutWeight>this.form.data.afterCutWeight?(this.$nextTick((()=>{this.$refs.inputAfterCutWeight.resetValidation(),this.$refs.inputBeforeCutWeight.resetValidation()})),this.currentStatus=!0):this.currentStatus=!1},immediate:!0,deep:!0},"form.data.beforeCutWeight":{handler(){this.form.data.beforeCutWeight>this.form.data.afterCutWeight?(this.$nextTick((()=>{this.$refs.inputAfterCutWeight.resetValidation(),this.$refs.inputBeforeCutWeight.resetValidation()})),this.currentStatus=!0):this.currentStatus=!1},immediate:!0,deep:!0}}},u=n,h=(a("d458"),a("2877")),m=a("0378"),f=a("27f9"),p=a("ddd8"),b=a("eebe"),v=a.n(b),g=Object(h["a"])(u,i,s,!1,null,"8a9783a8",null);e["default"]=g.exports;v()(g,"components",{QForm:m["a"],QInput:f["a"],QSelect:p["a"]})}}]);