(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[11],{4357:function(t,e,a){},6998: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 common-form"},[a("div",{staticClass:"mg-t-15"},[a("optics-title-crad",{attrs:{showCardForm:"",cardForm:t.cardForm}})],1),a("div",{staticClass:"mg-t-15"},[1===t.status?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",{attrs:{placeholder:"请输入",filled:"",type:"number",disable:t.disable,rules:[function(t){return t&&""!==t}],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,disable:t.disable,filled:"",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:"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)],2):t._e(),2===t.status?a("optics-title-crad",{attrs:{title:"数据录入"}},[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:"name",attrs:{dense:"",filled:"",width:"150px",props:e}},[t._v("\n "+t._s(e.row.stickNo)+"\n ")]),a("q-td",{key:"afterCutLength",attrs:{width:"300px",props:e}},[a("q-input",{attrs:{filled:"",type:"number",disable:t.disable,rules:[function(t){return t&&""!==t}]},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:"beforeCutLength",attrs:{width:"300px",props:e}},[a("q-input",{attrs:{filled:"",type:"number",disable:t.disable,rules:[function(t){return t&&""!==t}]},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:"",disable:t.disable},model:{value:e.row.remarks,callback:function(a){t.$set(e.row,"remarks",a)},expression:"props.row.remarks"}})],1)],1)}}],null,!1,3646930467)})],1)],1)],2):t._e()],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.check}})],1):t._e()]],2)],1)],1)])},r=[],i=a("30d4"),o=a("2a19"),l=a("0418"),n=a("2691"),c={name:"qutouwei",components:{OpticsTitleCrad:i["default"],Header:l["a"],opticsTitle:n["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"}],status:1,form:{data:{numberCuts:"",deviceId:"",remarks:""}},tableForm:{tableData:[],columns:[{name:"stickNo",label:"晶棒编号",align:"left"},{name:"afterCutLength",label:"截后长度",align:"left"},{name:"beforeCutLength",label:"截后重量",align:"left"},{name:"remarks",label:"备注",align:"left"}],list:{numberCuts:"",deviceId:"",remarks:""},pagination:{page:1,rowsPerPage:1e3}},processId:6,stepId:6,stickId:null,prodId:0,batchNumList:[],currentBatchNum:null,disable:!0,DeviceIdList:[]}},watch:{status:{handler(t){1===t?(this.cardForm=this.$options.data().cardForm,this.getBaseData()):2==t&&(this.cardForm.splice(2),this.cardForm[1].bColor="#55C169")}},currentBatchNum:{handler(t){let{form:e,cardForm:a,disable:s}=this.$options.data();this.form=e,this.disable=s,this.cardForm=a,this.$nextTick((()=>{this.$refs.form.resetValidation()})),t&&(this.getBaseData(),this.disable=!1)},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}))},getBaseData(){this.currentBatchNum&&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.stickNo;break;case"截前长度":e.value=t.result.beforeCutLength;break;case"截后长度":e.value=t.result.afterCutLength;break}})),t.result.jrInfoIngotList?(this.status=2,this.tableForm.tableData=t.result.jrInfoIngotList.map((t=>({stickId:t.stickId,stickNo:t.stickNo,afterCutLength:t.afterCutLength||"",beforeCutLength:t.beforeCutLength||"",remarks:t.remarks})))):this.status=1,this.prodId=t.result.prodId,this.stickId=t.result.stickId}))},cancel(){let{cardForm:t,form:e,tableForm:a,currentBatchNum:s,disable:r}=this.$options.data();this.form=e,this.cardForm=t,this.disable=r,this.tableForm=a,this.currentBatchNum=s},checkFirst(){this.currentBatchNum?this.$refs.form.validate().then((t=>{t?this.$confirm({title:"提示",message:"是否截断?",btn:{okText:"确定",cancelText:"取消"}}).then((()=>{this.nextStep()})).catch((()=>{})):o["a"].create({type:"negative",position:"top",message:"请将数据填写完整"})})):o["a"].create({type:"negative",position:"top",message:"请选择编号"})},getInfo(){this.$http({url:"/pad/truncation/getTruncationSticks",method:"get",params:{stickId:this.stickId}}).then((t=>{this.tableForm.tableData=t.result.map((t=>({stickId:t.stickId,stickNo:t.stickNo,afterCutLength:t.afterCutLength||"",beforeCutLength:t.beforeCutLength||"",remarks:t.remarks})))}))},nextStep(){this.$http({url:"/pad/truncation/truncation",method:"post",data:{...this.form.data,prodId:this.prodId,stepId:this.stepId,stickId:this.stickId}}).then((t=>{this.status=2,this.getInfo()}))},check(){this.currentBatchNum?this.$refs.sedForm.validate().then((t=>{t?this.$confirm({title:"提示",message:"是否过站?",btn:{okText:"确定",cancelText:"取消"}}).then((()=>{this.submit()})).catch((()=>{})):o["a"].create({type:"negative",position:"top",message:"请将数据填写完整"})})):o["a"].create({type:"negative",position:"top",message:"请选择编号"})},submit(){this.$http({url:"/pad/truncation/passStation",method:"post",data:{truncationStickInfoDTOList:this.tableForm.tableData,stepId:this.stepId,prodId:this.prodId}}).then((t=>{o["a"].create({type:"positive",position:"top",message:"操作成功"}),this.getList(),this.currentBatchNum="",this.cancel()}))}},created(){this.getList(),this.focusDeviceId()}},d=c,u=(a("f231"),a("2877")),m=a("0378"),h=a("27f9"),p=a("ddd8"),b=a("eaac"),f=a("bd08"),g=a("db86"),k=a("9c40"),v=a("eebe"),C=a.n(v),I=Object(u["a"])(d,s,r,!1,null,"323e37fb",null);e["default"]=I.exports;C()(I,"components",{QForm:m["a"],QInput:h["a"],QSelect:p["a"],QTable:b["a"],QTr:f["a"],QTd:g["a"],QBtn:k["a"]})},f231:function(t,e,a){"use strict";a("4357")}}]);