8
0
tft-fe/dist/js/6931.0e0398b5.js

1 zeile
18 KiB
JavaScript

"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[6931],{6931:function(e,t,r){r.r(t),r.d(t,{default:function(){return L}});var a=function(){var e=this,t=e._self._c;return t("div",{staticClass:"page-box"},[t("search-bar",{ref:"searchBarForm",staticClass:"searchStyle",attrs:{formConfigs:e.formConfig,isFold:!0},on:{headBtnClick:e.buttonClick}},[t("div",{staticStyle:{display:"inline-block"}},[t("el-upload",{staticStyle:{display:"inline-block"},attrs:{data:e.dataObj,name:"excel","on-success":e.importFile,"on-error":e.importFileError,action:e.uploadApi,"show-file-list":!1,headers:{token:e.token}}},[t("el-button",{attrs:{type:"primary",size:"small",plain:""}},[e._v("导入")])],1)],1)]),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:165,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,"before-close":e.handleCancel},on:{cancel:e.handleCancel,confirm:e.handleConfirm}},[t("work-order-add",{ref:"workOrderAdd",on:{successSubmit:e.successSubmit}})],1)],1)},o=[],l=r(475),i=function(){var e=this,t=e._self._c;return t("el-form",{ref:"form",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:"productionLineId"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"产线"},model:{value:e.form.productionLineId,callback:function(t){e.$set(e.form,"productionLineId",t)},expression:"form.productionLineId"}},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:"code"}},[t("el-input",{attrs:{placeholder:"工单编号"},model:{value:e.form.code,callback:function(t){e.$set(e.form,"code",t)},expression:"form.code"}})],1)],1)],1),t("el-row",{attrs:{gutter:20}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"工单类型",prop:"type"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"工单类型"},on:{change:e.selectType},model:{value:e.form.type,callback:function(t){e.$set(e.form,"type",t)},expression:"form.type"}},e._l(e.orderTypeList,(function(e){return t("el-option",{key:e.id,attrs:{label:e.dataName,value:e.dataCode}})})),1)],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"复磨面",prop:"regrind"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"复磨面",disabled:e.isDisabled},model:{value:e.form.regrind,callback:function(t){e.$set(e.form,"regrind",t)},expression:"form.regrind"}},e._l(e.regrindList,(function(e){return t("el-option",{key:e.dataName,attrs:{label:e.dataName,value:e.dataName}})})),1)],1)],1)],1),t("el-row",{attrs:{gutter:20}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"计划类型",prop:"planType"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"计划类型"},model:{value:e.form.planType,callback:function(t){e.$set(e.form,"planType",t)},expression:"form.planType"}},e._l(e.planTypeList,(function(e){return t("el-option",{key:e.id,attrs:{label:e.dataName,value:e.dataCode}})})),1)],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"计划数量",prop:"planNum"}},[t("el-input-number",{staticStyle:{width:"100%"},attrs:{placeholder:"计划数量",min:1,max:999999999999,precision:0},model:{value:e.form.planNum,callback:function(t){e.$set(e.form,"planNum",t)},expression:"form.planNum"}})],1)],1)],1),t("el-row",{attrs:{gutter:20}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"产品型号",prop:"productSpec"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"产品型号"},model:{value:e.form.productSpec,callback:function(t){e.$set(e.form,"productSpec",t)},expression:"form.productSpec"}},e._l(e.productionSpecList,(function(e){return t("el-option",{key:e.dataName,attrs:{label:e.dataName,value:e.dataName}})})),1)],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"预交货期",prop:"planDeliveryTime"}},[t("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"datetime",format:"yyyy-MM-dd HH:mm:ss","value-format":"yyyy-MM-ddTHH:mm:ss",placeholder:"预交货期"},model:{value:e.form.planDeliveryTime,callback:function(t){e.$set(e.form,"planDeliveryTime",t)},expression:"form.planDeliveryTime"}})],1)],1)],1),t("el-row",{attrs:{gutter:20}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"计划开始时间",prop:"planStartTime"}},[t("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"datetime",format:"yyyy-MM-dd HH:mm:ss","value-format":"yyyy-MM-ddTHH:mm:ss",placeholder:"计划开始时间"},model:{value:e.form.planStartTime,callback:function(t){e.$set(e.form,"planStartTime",t)},expression:"form.planStartTime"}})],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"计划结束时间",prop:"planEndTime"}},[t("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"datetime",format:"yyyy-MM-dd HH:mm:ss","value-format":"yyyy-MM-ddTHH:mm:ss",placeholder:"计划结束时间"},model:{value:e.form.planEndTime,callback:function(t){e.$set(e.form,"planEndTime",t)},expression:"form.planEndTime"}})],1)],1)],1),t("el-row",{attrs:{gutter:20}},[t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"备注",prop:"remark"}},[t("el-input",{attrs:{placeholder:"备注"},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1)],1)],1)],1)},n=[],s=r(5093),d=r(381),u=r.n(d),p={name:"WorkOrderAdd",data(){return{form:{id:"",productionLineId:"",code:"",type:"",regrind:"无",planType:"",planNum:"",productSpec:"",planDeliveryTime:"",planStartTime:"",planEndTime:"",remark:""},rules:{productionLineId:[{required:!0,message:"请选择产线",trigger:"change"}],code:[{required:!0,message:"请输入工单编号",trigger:"blur"}],type:[{required:!0,message:"请选择工单类型",trigger:"change"}],regrind:[{required:!0,message:"请选择复磨面",trigger:"change"}],planType:[{required:!0,message:"请选择计划类型",trigger:"change"}],planNum:[{required:!0,message:"请输入计划数量",trigger:"blur"}],productSpec:[{required:!0,message:"请选择产品型号",trigger:"change"}],planDeliveryTime:[{required:!0,message:"请选择预交货期",trigger:"change"}],planStartTime:[{required:!0,message:"请选择计划开始时间",trigger:"change"}],planEndTime:[{required:!0,message:"请选择计划结束时间",trigger:"change"}]},productionLineList:JSON.parse(localStorage.getItem("publicList")).proLineVoList,orderTypeList:JSON.parse(localStorage.getItem("publicList")).orderTypeVoList,regrindList:JSON.parse(localStorage.getItem("publicList")).regrindVoList,planTypeList:JSON.parse(localStorage.getItem("publicList")).planTypeVoList,productionSpecList:JSON.parse(localStorage.getItem("publicList")).productModelVoList,isDisabled:!0}},methods:{init(e){e?(this.form.id=e,(0,s.w3)({id:e}).then((e=>{0===e.code&&(this.form.productionLineId=e.data.productionLineId,this.form.code=e.data.code,this.form.type=e.data.type,0!==this.form.type?this.isDisabled=!1:this.isDisabled=!0,this.form.regrind=e.data.regrind,this.form.planType=e.data.planType,this.form.planNum=e.data.planNum,this.form.productSpec=e.data.productSpec,this.form.planDeliveryTime=e.data.planDeliveryTime,this.form.planStartTime=e.data.planStartTime,this.form.planEndTime=e.data.planEndTime,this.form.remark=e.data.remark)}))):(this.form.planStartTime=u()().format("yyyy-MM-DDTHH:mm:ss"),this.form.id="",this.isDisabled=!0,this.form.regrind="无")},selectType(e){0!==e?this.isDisabled=!1:(this.isDisabled=!0,this.form.regrind="无")},submitForm(){this.$refs["form"].validate((e=>{if(!e)return!1;this.form.id?(0,s.lb)({...this.form}).then((e=>{0===e.code&&(this.$message({message:"操作成功",type:"success"}),this.$emit("successSubmit"))})):(0,s.To)({...this.form}).then((e=>{0===e.code&&(this.$message({message:"操作成功",type:"success"}),this.$emit("successSubmit"))}))}))},formClear(){this.$refs.form.resetFields()}}},c=p,m=r(1001),h=(0,m.Z)(c,i,n,!1,null,null,null),f=h.exports,y=r(5591),g=r(1836);const b=[{prop:"proLineName",label:"产线名称",width:100},{prop:"planType",label:"计划类型",filter:(0,l.fW)("planTypeVoList"),width:100},{prop:"status",label:"工单状态",filter:(0,l.fW)("orderStatusVoList"),width:100},{prop:"code",label:"工单编号",width:150},{prop:"type",label:"工单类型",filter:(0,l.fW)("orderTypeVoList"),width:100},{prop:"productSpec",label:"产品型号",width:120},{prop:"regrind",label:"复磨面",width:100},{prop:"planStartTime",label:"计划开始时间",filter:l.g6,width:160},{prop:"planEndTime",label:"计划结束时间",filter:l.g6,width:160},{prop:"planNum",label:"计划数量",width:100},{prop:"planDeliveryTime",label:"交货期",filter:l.g6,width:160},{prop:"releaseTime",label:"下发时间",filter:l.g6,width:160},{prop:"startTime",label:"实际开始时间",filter:l.g6,width:160},{prop:"endTime",label:"实际结束时间",filter:l.g6,width:160},{prop:"finishNum",label:"完成数量",width:100},{prop:"okNum",label:"成品数量",width:100},{prop:"wasteNum",label:"废品数量",width:100},{prop:"reprocessNum",label:"待再加工数量",width:150},{prop:"creatorName",label:"创建人",width:100},{prop:"createTime",label:"创建时间",filter:l.g6,width:160},{prop:"remark",label:"备注",width:150,showOverflowtooltip:!0}],T=[{type:"start",btnName:"下发",showParam:{type:"&",data:[{type:"equal",name:"status",value:0}]}},{type:"end",btnName:"结束",showParam:{type:"&",data:[{type:"equal",name:"status",value:1}]}},{type:"edit",btnName:"编辑",showParam:{type:"&",data:[{type:"equal",name:"status",value:0}]}},{type:"delete",btnName:"删除",showParam:{type:"&",data:[{type:"equal",name:"status",value:0}]}}];var w={name:"WorkOrderManagement",components:{WorkOrderAdd:f},data(){return{formConfig:[{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:"select",label:"工单类型",selectOptions:JSON.parse(localStorage.getItem("publicList")).orderTypeVoList,labelField:"dataName",valueField:"dataCode",param:"type",defaultSelect:"",width:100},{type:"select",label:"工单状态",selectOptions:JSON.parse(localStorage.getItem("publicList")).orderStatusVoList,labelField:"dataName",valueField:"dataCode",param:"status",defaultSelect:"",width:100},{type:"select",label:"计划类型",selectOptions:JSON.parse(localStorage.getItem("publicList")).planTypeVoList,labelField:"dataName",valueField:"dataCode",param:"planType",defaultSelect:"",width:100},{type:"select",label:"产线",selectOptions:JSON.parse(localStorage.getItem("publicList")).proLineVoList,param:"proLineId",defaultSelect:"",width:120},{type:"input",label:"工单编号",placeholder:"工单编号",param:"code"},{type:"button",btnName:"查询",name:"search",color:"primary"},{type:"button",btnName:"重置",name:"reset"},{type:"separate"},{type:"button",btnName:"新增",name:"add",color:"success",plain:!0},{type:"button",btnName:"模板下载",name:"export",color:"primary",plain:!0}],tableProps:b,tableData:[],tableBtn:T,tableH:(0,l.NC)(315),total:0,listQuery:{current:1,size:20},uploadApi:s.Tp,centervisible:!1,addOrEditTitle:"",token:(0,g.LP)(),dataObj:{typeCode:"importWorkCode"}}},mounted(){window.addEventListener("resize",(()=>{this.tableH=(0,l.NC)(315)})),this.getList()},methods:{getList(){(0,s.W9)({...this.listQuery}).then((e=>{console.log(e),0===e.code&&(this.total=e.data.total,this.tableData=e.data.records)}))},buttonClick(e){switch(e.btnName){case"search":this.listQuery.startTime=e.timeVal?e.timeVal[0]:"",this.listQuery.endTime=e.timeVal?e.timeVal[1]:"",this.listQuery.type=e.type,this.listQuery.status=e.status,this.listQuery.planType=e.planType,this.listQuery.proLineId=e.proLineId,this.listQuery.code=e.code,this.listQuery.current=1,this.getList();break;case"reset":this.$refs.searchBarForm.resetForm(),this.listQuery.startTime="",this.listQuery.endTime="",this.listQuery.type=null,this.listQuery.status=null,this.listQuery.planType=null,this.listQuery.proLineId=null,this.listQuery.code="",this.listQuery.current=1,this.getList();break;case"add":this.addOrEditTitle="新增",this.$nextTick((()=>{this.$refs.workOrderAdd.init()})),this.centervisible=!0;break;default:console.log("模板下载"),(0,s.zz)().then((e=>{(0,y.FH)({attachmentId:e.data.id,type:1}).then((e=>{let t="";const r=e.headers["content-disposition"];r&&(t=decodeURIComponent(r.slice(r.indexOf("filename=")+9)));const a=new Blob([e.data]),o=new FileReader;o.readAsDataURL(a),o.onload=e=>{const r=document.createElement("a");r.download=t,r.href=e.target.result,document.body.appendChild(r),r.click(),document.body.removeChild(r)}}))}))}},handleClick(e){"edit"===e.type?(this.addOrEditTitle="编辑",this.$nextTick((()=>{this.$refs.workOrderAdd.init(e.data.id)})),this.centervisible=!0):"start"===e.type?this.$confirm('确认下发工单"'+e.data.code+'"吗?',{type:"warning"}).then((()=>{(0,s.EM)({id:e.data.id}).then((()=>{this.$message({message:"工单下发成功",type:"success"}),this.getList()}))})).catch((()=>{})):"end"===e.type?this.$confirm('确认结束工单"'+e.data.code+'"吗?',{type:"warning"}).then((()=>{(0,s.EO)({id:e.data.id}).then((()=>{this.$message({message:"工单结束成功",type:"success"}),this.getList()}))})).catch((()=>{})):"delete"===e.type&&this.$confirm('确认删除工单"'+e.data.code+'"吗?',{type:"warning"}).then((()=>{(0,s.Xe)({id:e.data.id}).then((()=>{this.$message({message:"工单删除成功",type:"success"}),this.listQuery.current=1,this.getList()}))})).catch((()=>{}))},handleCancel(){this.$refs.workOrderAdd.formClear(),this.centervisible=!1,this.addOrEditTitle=""},handleConfirm(){this.$refs.workOrderAdd.submitForm()},successSubmit(){this.handleCancel(),this.getList()},importFile(e){0===e.code&&(this.$message({message:"工单导入成功",type:"success"}),this.listQuery.current=1,this.getList())},importFileError(e){e&&this.$message({message:"工单导入失败,请检查格式是否正确",type:"error"})}}},k=w,S=(0,m.Z)(k,a,o,!1,null,null,null),L=S.exports},5591:function(e,t,r){r.d(t,{FH:function(){return n},Hp:function(){return d},JQ:function(){return i},SI:function(){return l},Vx:function(){return u},WQ:function(){return m},b6:function(){return p},iv:function(){return o},jL:function(){return s},m:function(){return c}});var a=r(8859);function o(){return(0,a.Z)({url:"/common/getList",method:"post"})}function l(){return(0,a.Z)({url:"/common/getTreeData",method:"post"})}function i(e){return(0,a.Z)({url:"/common/updateEqSeq",method:"post",data:e})}function n(e){return(0,a.Z)({url:"/common/attachment/downloadFile",method:"get",responseType:"blob",params:e,timeout:6e4})}function s(e){return(0,a.Z)({url:"/common/getFpyData",method:"post",data:e})}function d(e){return(0,a.Z)({url:"/common/getAlarmData",method:"post",data:e})}function u(e){return(0,a.Z)({url:"/common/getCapacityData",method:"post",data:e})}function p(e){return(0,a.Z)({url:"/common/getProductData",method:"post",data:e})}function c(e){return(0,a.Z)({url:"/common/getMaterialData",method:"post",data:e})}const m="/api/common/attachment/uploadFileFormData"},5093:function(e,t,r){r.d(t,{B7:function(){return w},EM:function(){return u},EO:function(){return p},F7:function(){return g},Hq:function(){return Z},Mk:function(){return o},Nm:function(){return v},Ol:function(){return h},SN:function(){return S},TQ:function(){return f},To:function(){return i},Tp:function(){return m},W9:function(){return l},Xe:function(){return n},a1:function(){return y},ag:function(){return T},dg:function(){return L},j4:function(){return k},lb:function(){return s},n8:function(){return N},w3:function(){return d},wM:function(){return O},xz:function(){return b},zz:function(){return c}});var a=r(8859);function o(e){return(0,a.Z)({url:"/order/workOrderProcess/getProcessInfo",method:"post",data:e})}function l(e){return(0,a.Z)({url:"/order/workOrder/page",method:"post",data:e})}function i(e){return(0,a.Z)({url:"/order/workOrder/add",method:"post",data:e})}function n(e){return(0,a.Z)({url:"/order/workOrder/delete",method:"post",data:e})}function s(e){return(0,a.Z)({url:"/order/workOrder/update",method:"post",data:e})}function d(e){return(0,a.Z)({url:"/order/workOrder/get",method:"post",data:e})}function u(e){return(0,a.Z)({url:"/order/workOrder/release",method:"post",data:e})}function p(e){return(0,a.Z)({url:"/order/workOrder/finish",method:"post",data:e})}function c(e){return(0,a.Z)({url:"/order/workOrder/importTemplate",method:"post",data:e})}const m="/api/order/workOrder/import";function h(e){return(0,a.Z)({url:"/order/ProData/page",method:"post",data:e})}function f(e){return(0,a.Z)({url:"/order/ProData/export",method:"post",responseType:"blob",data:e,timeout:6e4})}function y(e){return(0,a.Z)({url:"/order/unloadPallet/page",method:"post",data:e})}function g(e){return(0,a.Z)({url:"/order/unloadPallet/add",method:"post",data:e})}function b(e){return(0,a.Z)({url:"/order/unloadPallet/get",method:"post",data:e})}function T(e){return(0,a.Z)({url:"/order/unloadPallet/update",method:"post",data:e})}function w(e){return(0,a.Z)({url:"/order/unloadPallet/delete",method:"post",data:e})}function k(e){return(0,a.Z)({url:"/order/unloadPallet/verify",method:"post",formState:!0,data:e})}function S(e){return(0,a.Z)({url:"/order/unloadPallet/finish",method:"post",data:e})}function L(e){return(0,a.Z)({url:"/order/unloadPallet/continuePack",method:"post",data:e})}function v(e){return(0,a.Z)({url:"/order/unloadPallet/getDetail",method:"post",data:e})}function N(e){return(0,a.Z)({url:"/order/unloadPallet/glassIdTrace",method:"post",formState:!0,data:e})}function O(e){return(0,a.Z)({url:"/order/reloadRack/reload",method:"post",data:e})}function Z(e){return(0,a.Z)({url:"/order/reloadRack/end",method:"post",data:e})}}}]);