1 line
8.0 KiB
JavaScript
1 line
8.0 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[21],{1773:function(t,e,s){"use strict";s("3799")},"1d3c":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"},[s("div",{staticClass:"mg-t-15"},[s("optics-title-crad",{attrs:{showCardForm:"",cardForm:t.cardForm}})],1),s("div",{staticClass:"mg-t-15"},[s("div",{staticClass:"body_style common-form"},[s("optics-title-crad",{attrs:{title:"数据录入"}},[1==t.status?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.deviceName},"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),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.shift,"emit-value":"","map-options":"",filled:"",disable:t.disable,rules:[function(t){return t&&""!==t}],dense:""},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-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):t._e(),2==t.status?s("template",{slot:"body"},[s("q-form",{ref:"sedForm"},[s("q-table",{staticStyle:{"min-height":"calc( 100vh - 470px )"},attrs:{data:t.tableForm.tableData,flat:!0,columns:t.tableForm.columns,"table-header-style":{backgroundColor:"#F8FBFF"},"hide-bottom":"",pagination:t.tableForm.pagination,"row-key":"name"},scopedSlots:t._u([{key:"body",fn:function(e){return s("q-tr",{attrs:{props:e}},[s("q-td",{key:"ingotNo",attrs:{dense:"",filled:"",width:"400px",props:e}},[t._v("\n "+t._s(e.row.ingotNo)+"\n ")]),s("q-td",{key:"weight",attrs:{width:"400px",props:e}},[s("q-input",{attrs:{filled:"",dense:"",type:"number",rules:[function(t){return t&&""!==t}]},model:{value:e.row.weight,callback:function(s){t.$set(e.row,"weight",t._n(s))},expression:"props.row.weight"}})],1)],1)}}],null,!1,3054537973)})],1)],1):t._e()],2)],1),s("div",{staticClass:"btn"},[s("common-btngroup",[[1===t.status?s("div",{staticClass:"form_bottom_group"},[s("q-btn",{attrs:{label:"取 消",type:"reset",rounded:"",color:"white","text-color":"black"},on:{click:t.cancel}}),s("q-btn",{attrs:{label:"截断",type:"submit",rounded:"",color:"primary"},on:{click:t.checkFirst}})],1):t._e(),2===t.status?s("div",{staticClass:"form_bottom_group"},[s("q-btn",{attrs:{label:"取消",type:"reset",rounded:"",color:"white","text-color":"black"},on:{click:t.cancel}}),s("q-btn",{attrs:{label:"确定",type:"submit",rounded:"",color:"primary"},on:{click:t.check}})],1):t._e()]],2)],1)])])],1)])},i=[],o=s("dd67"),r=s("30d4"),l=s("0418"),n=s("2691"),d=s("2a19"),c={name:"xianqie",components:{CommonBtngroup:o["default"],OpticsTitleCrad:r["default"],Header:l["a"],opticsTitle:n["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"}],form:{data:{deviceId:"",shift:"",remarks:""}},shift:[{label:"白班",value:1},{label:"夜班",value:2}],batchNumList:[],DeviceIdList:[],currentBatchNum:null,processId:14,stepId:14,prodId:0,disable:!0,status:1,ingotId:0,numberCuts:0,tableForm:{tableData:[],columns:[{name:"ingotNo",label:"晶锭编号",align:"left"},{name:"weight",label:"晶锭重量",align:"left"}],pagination:{page:1,rowsPerPage:1e3}},time:""}},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}))},checkFirst(){this.currentBatchNum?this.$refs.form.validate().then((t=>{t?this.$confirm({title:"提示",message:"是否截断?",btn:{okText:"确定",cancelText:"取消"}}).then((()=>{this.nextStep()})).catch((()=>{})):d["a"].create({type:"negative",position:"top",message:"请将数据填写完整"})})):d["a"].create({type:"negative",position:"top",message:"请选择编号"})},nextStep(){this.$http({url:"/pad/lineCut/truncation",method:"post",data:{ingotId:this.ingotId,numberCuts:this.numberCuts,prodId:this.prodId,stepId:this.stepId,...this.form.data}}).then((t=>{this.status=2,this.getInfo()}))},getInfo(){this.$http({url:"/pad/lineCut/getIngotInfo",method:"get",params:{ingotId:this.ingotId}}).then((t=>{this.tableForm.tableData=t.result.map((t=>({ingotId:t.id,ingotNo:t.ingotNo,weight:""})))}))},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.getTime(),this.numberCuts=t.result.numberCuts,this.prodId=t.result.prodId,this.ingotId=t.result.ingotId,t.result.jrInfoIngotList?(this.status=2,this.tableForm.tableData=t.result.jrInfoIngotList.map((t=>({ingotId:t.id,ingotNo:t.ingotNo,weight:""})))):this.status=1}))},cancel(){let{form:t,tableForm:e,currentBatchNum:s,cardForm:a,status:i,disable:o}=this.$options.data();this.form=t,this.status=i,this.cardForm=a,this.currentBatchNum=s,this.tableForm=e,this.disable=o},check(){this.currentBatchNum?this.$refs.sedForm.validate().then((t=>{t?this.$confirm({title:"提示",message:"是否过站?",btn:{okText:"确定",cancelText:"取消"}}).then((()=>{this.submit()})).catch((()=>{})):d["a"].create({type:"negative",position:"top",message:"请将数据填写完整"})})):d["a"].create({type:"negative",position:"top",message:"请选择编号"})},submit(){this.tableForm.tableData.length?(this.tableForm.tableData.forEach((t=>{t.weight=Number(t.weight)})),this.$http({url:"/pad/lineCut/passStation",method:"post",data:{ingotWeightList:this.tableForm.tableData,stepId:this.stepId,prodId:this.prodId}}).then((t=>{d["a"].create({type:"positive",position:"top",message:"操作成功"}),this.getList(),this.currentBatchNum="",this.cancel()}))):d["a"].create({type:"negative",position:"top",message:"无数据提交"})}},created(){this.getList(),this.focusDeviceId()},watch:{currentBatchNum:{handler(t){let{form:e,tableForm:s,cardForm:a,status:i,disable:o}=this.$options.data();this.form=e,this.status=i,this.disable=o,this.tableForm=s,this.$nextTick((()=>{1===this.status?this.$refs.form.resetValidation():this.$refs.sedForm.resetValidation()})),t?(this.getBaseData(),this.disable=!1):this.cardForm=a},immediate:!0,deep:!0}}},m=c,h=(s("1773"),s("2877")),u=s("0378"),p=s("ddd8"),b=s("27f9"),g=s("eaac"),f=s("bd08"),v=s("db86"),I=s("9c40"),C=s("eebe"),F=s.n(C),k=Object(h["a"])(m,a,i,!1,null,"17ef5499",null);e["default"]=k.exports;F()(k,"components",{QForm:u["a"],QSelect:p["a"],QInput:b["a"],QTable:g["a"],QTr:f["a"],QTd:v["a"],QBtn:I["a"]})},3799:function(t,e,s){}}]); |