(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[19],{1127:function(t,e,i){},2829:function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"optics_style"},[i("div",{staticClass:"header"},[i("Header",{attrs:{options:t.batchNumList,model:t.currentBatchNum},on:{"update:model":function(e){t.currentBatchNum=e}}})],1),i("div",{staticClass:"content"},[i("optics-title",{attrs:{title:"数据明细"}}),i("div",{staticClass:"body_style common-form"},[i("div",{staticClass:"mg-t-15"},[i("optics-title-crad",{attrs:{showCardForm:"",cardForm:t.cardForm}})],1),i("div",{staticClass:"mg-t-15"},[i("optics-title-crad",{attrs:{title:"数据录入"}},[i("template",{slot:"body"},[i("q-form",{ref:"form",attrs:{"no-reset-focus":""}},[i("q-table",{staticStyle:{"min-height":"calc( 100vh - 470px )"},attrs:{data:t.tableForm.tableData,columns:t.tableForm.columns,"table-header-style":{backgroundColor:"#F8FBFF"},"hide-bottom":"",pagination:t.tableForm.pagination,"row-key":"name",flat:!0},scopedSlots:t._u([{key:"body",fn:function(e){return i("q-tr",{attrs:{props:e}},[i("q-td",{key:"stickNo",attrs:{dense:"",filled:"",width:"150px",props:e}},[t._v("\n "+t._s(e.row.stickNo)+"\n ")]),i("q-td",{key:"deviceId",attrs:{width:"300px",props:e}},[i("q-select",{ref:"select1"+e.row.stickNo,attrs:{placeholder:"请选择","emit-value":"","map-options":"","option-label":function(t){return t.deviceName},"option-value":function(t){return t.id},options:t.DeviceIdList,filled:"",rules:[function(t){return t&&""!==t}],disable:t.disable||e.row.finishFlag,dense:""},on:{"popup-hide":function(i){return t.changeFocusfixtureId(e.row)}},model:{value:e.row.deviceId,callback:function(i){t.$set(e.row,"deviceId",i)},expression:"props.row.deviceId"}})],1),i("q-td",{key:"fixtureId",attrs:{width:"300px",props:e}},[i("q-select",{ref:"select2"+e.row.stickNo,attrs:{placeholder:"请选择","emit-value":"","map-options":"","option-label":function(t){return t.fixtureNo},"option-value":function(t){return t.id},options:t.fixtureIdList,filled:"",rules:[function(t){return t&&""!==t}],disable:t.disable||e.row.finishFlag||""===e.row.deviceId,dense:""},on:{focus:function(i){return t.focusfixtureId(e.row.deviceId)}},model:{value:e.row.fixtureId,callback:function(i){t.$set(e.row,"fixtureId",i)},expression:"props.row.fixtureId"}})],1),i("q-td",{key:"remarks",attrs:{width:"300px",props:e}},[i("q-input",{attrs:{filled:"",disable:t.disable||e.row.finishFlag,dense:""},model:{value:e.row.remarks,callback:function(i){t.$set(e.row,"remarks",i)},expression:"props.row.remarks"}})],1),i("q-td",[i("q-btn",{staticClass:"mg-r-10",attrs:{label:"保存",size:"sm",color:"primary",disable:t.disable||e.row.finishFlag},on:{click:function(i){return t.save(e.row)}}}),i("q-btn",{attrs:{label:"复制",size:"sm",color:"primary",disable:t.disable||e.row.finishFlag||0==e.rowIndex},on:{click:function(i){return t.copy(e)}}})],1)],1)}}])})],1)],1)],2)],1)]),i("div",{staticClass:"btn"},[i("common-btngroup",[[i("q-btn",{attrs:{label:"取消",type:"reset",rounded:"",color:"white","text-color":"black"},on:{click:t.cancel}}),i("q-btn",{attrs:{label:"确定",type:"submit",rounded:"",color:"primary"},on:{click:t.check}})]],2)],1)],1)])},a=[],r=i("dd67"),o=i("30d4"),d=i("0418"),l=i("2691"),c=i("2a19"),n={name:"taobang",components:{CommonBtngroup:r["default"],OpticsTitleCrad:o["default"],Header:d["a"],opticsTitle:l["default"]},data(){return{cardForm:[{name:"app:icon-chanpinbianma",title:"晶锭编码",value:"",bColor:"#1890FF"},{name:"app:icon-yongtu",title:"晶锭用途(寸/砖)",value:"",bColor:"#55C169"},{name:"app:icon-zhongliang",title:"晶锭重量",value:"",bColor:"#FA8C16"}],tableForm:{tableData:[],columns:[{name:"stickNo",label:"晶棒编号",align:"left"},{name:"deviceId",label:"设备编号",align:"left"},{name:"fixtureId",label:"掏棒刀",align:"left"},{name:"remarks",label:"备注",align:"left"},{label:"操作",align:"left"}],pagination:{page:1,rowsPerPage:1e3}},saveFixtureIdList:[],batchNumList:[],DeviceIdList:[],fixtureIdList:[],processId:2,stepId:2,prodId:0,disable:!0,currentBatchNum:""}},watch:{currentBatchNum:{handler(t){let{cardForm:e,tableForm:i,disable:s}=this.$options.data();this.tableForm=i,this.disable=s,this.$nextTick((()=>{this.$refs.form.resetValidation()})),t?(this.getBaseData(),this.disable=!1):(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}))},focusDeviceId(){this.$http({url:"/device/queryDropBox",method:"get",params:{stepId:this.stepId}}).then((t=>{this.DeviceIdList=t.result}))},changeFocusfixtureId(t){this.$http({url:"/fixture/queryDropBox",method:"get",params:{deviceId:t.deviceId,fixtureType:1}}).then((e=>{this.fixtureIdList=e.result,this.$set(t,"fixtureId",this.fixtureIdList[0].id)}))},focusfixtureId(t){this.$http({url:"/fixture/queryDropBox",method:"get",params:{deviceId:t,fixtureType:1}}).then((t=>{this.fixtureIdList=t.result}))},firstFocusfixtureId(){this.$http({url:"/fixture/queryDropBox",method:"get",params:{fixtureType:1}}).then((t=>{this.fixtureIdList=t.result,this.saveFixtureIdList=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.ingotNo||"";break;case"晶锭用途(寸/砖)":e.value=t.result.size+"寸"||!1;break;case"晶锭重量":e.value=t.result.ingotWeight||"";break}})),this.tableForm.tableData=[],t.result.outStickInfoDTOList.forEach((t=>{this.tableForm.tableData.push({stickId:t.stickId,stickNo:t.stickNo,fixtureId:t.fixtureId||"",deviceId:t.deviceId||"",remarks:t.remarks||"",finishFlag:t.finishFlag})})),this.prodId=t.result.prodId}))},save(t){this.$refs[`select1${t.stickNo}`].validate()&&this.$refs[`select2${t.stickNo}`].validate()?this.$http({url:"/pad/takeOutStick/save",method:"post",data:{...t,prodId:this.prodId,stepId:this.stepId}}).then((e=>{c["a"].create({type:"positive",position:"top",message:"操作成功"}),this.$set(t,"finishFlag",!0)})):c["a"].create({type:"negative",position:"top",message:`请将${t.stickNo}数据填写完整`})},copy(t){this.fixtureIdList=this.saveFixtureIdList,this.$nextTick((()=>{let{deviceId:e,fixtureId:i}=this.tableForm.tableData[t.rowIndex-1];this.tableForm.tableData[t.rowIndex].deviceId=e,this.tableForm.tableData[t.rowIndex].fixtureId=i}))},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/takeOutStick/passStation",method:"post",data:{passStickInfoDTOList:this.tableForm.tableData,prodId:this.prodId,stepId:this.stepId}}).then((t=>{c["a"].create({type:"positive",position:"top",message:"操作成功"}),this.getList(),this.currentBatchNum="",this.cancel()}))},cancel(){let{cardForm:t,tableForm:e,disable:i,currentBatchNum:s}=this.$options.data();this.tableForm=e,this.currentBatchNum=s,this.disable=i,this.cardForm=t}},created(){this.getList(),this.focusDeviceId(),this.firstFocusfixtureId()}},u=n,p=(i("fb08"),i("2877")),h=i("0378"),m=i("eaac"),f=i("bd08"),b=i("db86"),I=i("ddd8"),v=i("27f9"),g=i("9c40"),x=i("eebe"),k=i.n(x),F=Object(p["a"])(u,s,a,!1,null,"500b4ffa",null);e["default"]=F.exports;k()(F,"components",{QForm:h["a"],QTable:m["a"],QTr:f["a"],QTd:b["a"],QSelect:I["a"],QInput:v["a"],QBtn:g["a"]})},fb08:function(t,e,i){"use strict";i("1127")}}]);