(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[16],{"7bc9":function(t,e,s){"use strict";s("ce2c")},c7cd:function(t,e,s){"use strict";s.r(e);var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"optics_style"},[s("div",{staticClass:"header"},[s("Header",{attrs:{options:t.batchNumList,model:t.currentBatchNum},on:{"update:model":function(e){t.currentBatchNum=e}}})],1),s("div",{staticClass:"content"},[s("optics-title",{attrs:{title:"数据明细"}}),s("div",{staticClass:"body_style common-form"},[s("div",{staticClass:"mg-t-15"},[s("optics-title-crad",{attrs:{showCardForm:"",cardForm:t.cardForm}})],1),s("div",{staticClass:"mg-t-15"},[s("optics-title-crad",{attrs:{title:"数据录入"}},[s("template",{slot:"body"},[s("q-form",{ref:"form",staticClass:"q-gutter-md mg-t-20 minHeight"},[s("div",{staticClass:"row"},[s("div",{staticClass:"col mg-r-20"},[s("div",{staticClass:"label radio",class:{disable:t.disable}},[t._v("设备编号")]),s("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),s("div",{staticClass:"col-md-4 pd-r-20"},[s("div",{staticClass:"label radio ",class:{disable:t.disable}},[t._v("班次")]),s("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),s("div",{staticClass:"col mg-r-20"},[s("div",{staticClass:"label radio",class:{disable:t.disable}},[t._v("检测结果")]),s("q-select",{attrs:{placeholder:"请选择",options:t.checkList,"emit-value":"","map-options":"",filled:"",rules:[function(t){return t&&t.length>0}],disable:t.disable,dense:""},model:{value:t.form.data.checkResult,callback:function(e){t.$set(t.form.data,"checkResult",e)},expression:"form.data.checkResult"}})],1)]),s("div",{staticClass:"row"},[s("div",{staticClass:"col-md-4 pd-r-20"},[s("div",{staticClass:"label",class:{disable:t.disable}},[t._v("备注")]),s("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)]),s("div",{staticClass:"btn"},[s("common-btngroup",{on:{submit:t.check,cancel:t.cancel}})],1)],1)])},i=[],c=s("dd67"),o=s("30d4"),l=s("2a19"),d=s("0418"),r=s("2691"),n={name:"moduanmian",components:{CommonBtngroup:c["default"],OpticsTitleCrad:o["default"],Header:d["a"],opticsTitle:r["default"]},data(){return{cardForm:[{name:"app:icon-chanpinbianma",title:"晶棒编号",value:"",bColor:"#1890FF"},{name:"app:icon-ziduanbianhao",title:"晶棒序列号",value:"",bColor:"#FA8C16"},{name:"app:icon-changdu",title:"长度",value:"",bColor:"#55C169"}],form:{data:{deviceId:"",shift:"",checkResult:"",remarks:""}},checkList:[{label:"OK",value:"OK"},{label:"NG",value:"NG"}],processId:8,stepId:8,prodId:0,batchNumList:[],currentBatchNum:null,DeviceIdList:[],shift:[{label:"白班",value:1},{label:"夜班",value:2}],time:"",disable:!0}},methods:{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.length||"";break}})),this.getTime(),this.form.data.checkResult="OK",this.prodId=t.result.prodId}))},cancel(){let{form:t,disable:e,cardForm:s,currentBatchNum:a}=this.$options.data();this.form=t,this.cardForm=s,this.currentBatchNum=a,this.disable=e},check(){this.currentBatchNum?this.$refs.form.validate().then((t=>{t?this.$confirm({title:"提示",message:"是否过站?",btn:{okText:"确定",cancelText:"取消"}}).then((()=>{this.submit()})).catch((()=>{})):l["a"].create({type:"negative",position:"top",message:"请将数据填写完整"})})):l["a"].create({type:"negative",position:"top",message:"请选择编号"})},submit(){this.$http({url:"/pad/grindingEndFace/passStation",method:"post",data:{...this.form.data,stepId:this.stepId,prodId:this.prodId}}).then((t=>{l["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:s,disable:a}=this.$options.data();this.form=e,this.disable=a,this.$nextTick((()=>{this.$refs.form.resetValidation()})),t?(this.getBaseData(),this.disable=!1):(this.cardForm=s,this.disable=!0)},immediate:!0,deep:!0}}},m=n,h=(s("7bc9"),s("2877")),u=s("0378"),p=s("ddd8"),f=s("27f9"),b=s("eebe"),v=s.n(b),g=Object(h["a"])(m,a,i,!1,null,"b8c796c8",null);e["default"]=g.exports;v()(g,"components",{QForm:u["a"],QSelect:p["a"],QInput:f["a"]})},ce2c:function(t,e,s){}}]);