tft-fe/dist/js/6833.635c9e95.js

1 line
7.8 KiB
JavaScript

"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[6833],{6833:function(e,t,a){a.r(t),a.d(t,{default:function(){return L}});var i=function(){var e=this,t=e._self._c;return t("div",{staticClass:"page-box"},[t("search-bar",{ref:"searchBarForm",attrs:{formConfigs:e.formConfig},on:{headBtnClick:e.buttonClick}}),t("base-table",{attrs:{page:e.listQuery.current,limit:e.listQuery.size,"table-props":e.tableProps,"table-data":e.tableData,"max-height":e.tableH}},[e.tableBtn.length?t("method-btn",{attrs:{slot:"handleBtn",width:260,label:"操作",fixed:"right","method-list":e.tableBtn},on:{clickBtn:e.handleClick},slot:"handleBtn"}):e._e()],1),t("pagination",{attrs:{page:e.listQuery.current,limit:e.listQuery.size,total:e.total},on:{"update:page":function(t){return e.$set(e.listQuery,"current",t)},"update:limit":function(t){return e.$set(e.listQuery,"size",t)},pagination:function(t){return e.getList()}}}),t("base-dialog",{attrs:{dialogTitle:e.addOrEditTitle,dialogVisible:e.centervisible,"close-on-click-modal":!1,"before-close":e.handleCancel},on:{cancel:e.handleCancel,confirm:e.handleConfirm}},[t("off-shelf-packaging-add",{ref:"offShelfPackagingAdd",on:{successSubmit:e.successSubmit}})],1),e.detailVisible?t("off-shelf-packaging-detail",{ref:"packagingDetail"}):e._e(),t("base-dialog",{attrs:{dialogTitle:"请选择上架的玻璃架工位",dialogVisible:e.centervisible2,"close-on-click-modal":!1,"before-close":e.handleCancel2},on:{cancel:e.handleCancel2,confirm:e.handleConfirm2}},[t("off-shelf-packaging-continue",{ref:"offShelfPackagingContinue",on:{successSubmit2:e.successSubmit2}})],1)],1)},s=[],l=a(475),n=a(2713),r=a(465),o=function(){var e=this,t=e._self._c;return t("el-form",{ref:"formContinue",attrs:{rules:e.rules,"label-width":"110px",model:e.form}},[t("el-row",{attrs:{gutter:20}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"产线",prop:"proLineId"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"产线"},model:{value:e.form.proLineId,callback:function(t){e.$set(e.form,"proLineId",t)},expression:"form.proLineId"}},e._l(e.productionLineList,(function(e){return t("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"玻璃架工位",prop:"glassRackStation"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"玻璃架工位"},model:{value:e.form.glassRackStation,callback:function(t){e.$set(e.form,"glassRackStation",t)},expression:"form.glassRackStation"}},e._l(e.locationList,(function(e){return t("el-option",{key:e.dataCode,attrs:{label:e.dataName,value:e.dataName}})})),1)],1)],1)],1)],1)},c=[],d=a(5093),m={name:"OffShelfPackagingContinue",data(){return{form:{id:"",proLineId:"",glassRackStation:""},rules:{proLineId:[{required:!0,message:"请选择产线",trigger:"change"}],glassRackStation:[{required:!0,message:"玻璃架工位",trigger:"change"}]},locationList:JSON.parse(localStorage.getItem("publicList")).glassRackStationVoList,productionLineList:JSON.parse(localStorage.getItem("publicList")).proLineVoList}},methods:{init(e){this.form.id=e},submitForm(){this.$refs["formContinue"].validate((e=>{if(!e)return!1;(0,d.dg)({...this.form}).then((e=>{0===e.code&&(this.$message({message:"操作成功",type:"success"}),this.$emit("successSubmit2"))}))}))},formClear(){this.$refs.formContinue.resetFields()}}},h=m,u=a(1001),f=(0,u.Z)(h,o,c,!1,null,null,null),p=f.exports;const g=[{prop:"proLineName",label:"产线",minWidth:100},{prop:"glassRackStation",label:"玻璃架工位",minWidth:100},{prop:"glassRackId",label:"玻璃架ID",minWidth:100},{prop:"proSpec",label:"产品型号",minWidth:100},{prop:"grind",label:"研磨面",minWidth:150},{prop:"loadTime",label:"上架时间",filter:l.g6,minWidth:160},{prop:"unloadTime",label:"下架时间",filter:l.g6,minWidth:160},{prop:"num",label:"当前数量",minWidth:100},{prop:"status",label:"状态",filter:(0,l.oJ)("packageState"),minWidth:100},{prop:"remark",label:"备注",minWidth:150}],b=[{type:"end",btnName:"结束包装",showParam:{type:"&",data:[{type:"equal",name:"status",value:0}]}},{type:"continue",btnName:"继续包装",showParam:{type:"&",data:[{type:"equal",name:"status",value:2},{type:"unequal",name:"num",value:0}]}},{type:"detail",btnName:"详情"},{type:"edit",btnName:"编辑",showParam:{type:"&",data:[{type:"equal",name:"status",value:2}]}},{type:"clean",btnName:"清空",showParam:{type:"&",data:[{type:"equal",name:"status",value:2},{type:"unequal",name:"num",value:0}]}}];var k={name:"offShelfPackaging",components:{OffShelfPackagingAdd:n.Z,OffShelfPackagingDetail:r.Z,OffShelfPackagingContinue:p},data(){return{formConfig:[{type:"select",label:"产线",selectOptions:JSON.parse(localStorage.getItem("publicList")).proLineVoList,param:"proLineId",width:120},{type:"select",label:"玻璃架工位",selectOptions:JSON.parse(localStorage.getItem("publicList")).glassRackStationVoList,labelField:"dataName",valueField:"dataName",param:"glassRackStation",width:100},{type:"input",label:"玻璃架ID",placeholder:"玻璃架ID",param:"glassRackId"},{type:"datePicker",label:"上架时间",dateType:"datetimerange",format:"yyyy-MM-dd HH:mm:ss",valueFormat:"yyyy-MM-ddTHH:mm:ss",rangeSeparator:"-",startPlaceholder:"开始时间",endPlaceholder:"结束时间",param:"timeVal",width:350},{type:"button",btnName:"查询",name:"search",color:"primary"},{type:"button",btnName:"重置",name:"reset"},{type:"separate"},{type:"button",btnName:"新增",name:"add",color:"success",plain:!0}],tableProps:g,tableData:[],tableBtn:b,tableH:(0,l.NC)(265),total:0,listQuery:{current:1,size:20,proLineId:"",glassRackStation:"",glassRackId:"",startTime:"",endTime:""},centervisible:!1,addOrEditTitle:"",detailVisible:!1,centervisible2:!1}},mounted(){window.addEventListener("resize",(()=>{this.tableH=(0,l.NC)(265)})),this.getList()},methods:{getList(){(0,d.a1)({...this.listQuery}).then((e=>{0===e.code&&(this.tableData=e.data.records,this.total=e.data.total)}))},buttonClick(e){switch(console.log(e.proLineId),e.btnName){case"search":this.listQuery.startTime=e.timeVal?e.timeVal[0]:"",this.listQuery.endTime=e.timeVal?e.timeVal[1]:"",this.listQuery.proLineId=e.proLineId,this.listQuery.glassRackStation=e.glassRackStation,this.listQuery.glassRackId=e.glassRackId,this.listQuery.current=1,this.getList();break;case"reset":this.$refs.searchBarForm.resetForm(),this.listQuery.startTime="",this.listQuery.endTime="",this.listQuery.proLineId="",this.listQuery.glassRackStation="",this.listQuery.glassRackId="",this.listQuery.current=1,this.getList();break;default:this.addOrEditTitle="新增",this.$nextTick((()=>{this.$refs.offShelfPackagingAdd.init()})),this.centervisible=!0;break}},handleClick(e){switch(console.log(e),e.type){case"edit":this.centervisible=!0,this.addOrEditTitle="编辑",this.$nextTick((()=>{this.$refs.offShelfPackagingAdd.init(e.data.id)}));break;case"end":this.$confirm('确认结束包装玻璃架ID" '+e.data.glassRackId+' "吗?',{type:"warning"}).then((()=>{(0,d.SN)({id:e.data.id}).then((()=>{this.$message({message:"结束包装成功",type:"success"}),this.getList()}))})).catch((()=>{}));break;case"continue":this.centervisible2=!0,this.$nextTick((()=>{this.$refs.offShelfPackagingContinue.init(e.data.id)}));break;case"detail":this.detailVisible=!0,this.$nextTick((()=>{this.$refs.packagingDetail.init(e.data.id)}));break;default:(0,d.B7)({id:e.data.id}).then((()=>{this.$message({message:"操作成功",type:"success"}),this.getList()}))}},handleCancel(){this.$refs.offShelfPackagingAdd.formClear(),this.centervisible=!1,this.addOrEditTitle=""},handleConfirm(){this.$refs.offShelfPackagingAdd.submitForm()},successSubmit(){this.handleCancel(),this.getList()},handleCancel2(){this.$refs.offShelfPackagingContinue.formClear(),this.centervisible2=!1},handleConfirm2(){this.$refs.offShelfPackagingContinue.submitForm()},successSubmit2(){this.handleCancel2(),this.getList()}}},y=k,S=(0,u.Z)(y,i,s,!1,null,null,null),L=S.exports}}]);