1 line
20 KiB
JavaScript
1 line
20 KiB
JavaScript
(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[1456],{1456:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return T}});var a=function(){var t=this,e=t._self._c;return e("div",{staticClass:"self-maintenance"},[e("search-bar",{ref:"searchBarForm",attrs:{formConfigs:t.formConfig},on:{headBtnClick:t.buttonClick}}),e("base-table",{attrs:{page:t.listQuery.current,limit:t.listQuery.size,"table-props":t.tableProps,"table-data":t.tableData,"max-height":t.tableH}},[t.tableBtn.length?e("method-btn",{attrs:{slot:"handleBtn",width:80,label:"操作",fixed:"right","method-list":t.tableBtn},on:{clickBtn:t.handleClick},slot:"handleBtn"}):t._e()],1),e("pagination",{attrs:{page:t.listQuery.current,limit:t.listQuery.size,total:t.total},on:{"update:page":function(e){return t.$set(t.listQuery,"current",e)},"update:limit":function(e){return t.$set(t.listQuery,"size",e)},pagination:function(e){return t.getList()}}}),e("base-dialog",{attrs:{dialogTitle:t.addAndEdit,dialogVisible:t.centervisible,"before-close":t.handleCancel},on:{cancel:t.handleCancel,confirm:t.handleConfirm}},[e("self-maintenance-add",{ref:"selfMaintenanceAdd",on:{successSubmit:t.successSubmit}})],1)],1)},r=[],i=n(475),o=function(){var t=this,e=t._self._c;return e("el-form",{ref:"form",attrs:{rules:t.rules,"label-width":"110px",model:t.form}},[e("el-row",{attrs:{gutter:20}},[e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"维护工单号",prop:"code"}},[e("el-input",{attrs:{placeholder:"维护工单号",disabled:t.isEdit},model:{value:t.form.code,callback:function(e){t.$set(t.form,"code",e)},expression:"form.code"}})],1)],1),e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"设备名称",prop:"equipmentId"}},[e("el-cascader",{staticStyle:{width:"100%"},attrs:{options:t.cascaderOptions,props:{value:"id",label:"name"}},on:{change:t.selectEq},model:{value:t.form.equipmentId,callback:function(e){t.$set(t.form,"equipmentId",e)},expression:"form.equipmentId"}})],1)],1)],1),e("el-row",{attrs:{gutter:20}},[e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"备件名称",prop:"sparePartName"}},[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"备件名称"},on:{change:t.selectModel},model:{value:t.form.sparePartName,callback:function(e){t.$set(t.form,"sparePartName",e)},expression:"form.sparePartName"}},t._l(t.sparePartsList,(function(t,n){return e("el-option",{key:n,attrs:{label:t.name,value:t.name}})})),1)],1)],1),e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"备件型号",prop:"sparePartModel"}},[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"备件型号"},model:{value:t.form.sparePartModel,callback:function(e){t.$set(t.form,"sparePartModel",e)},expression:"form.sparePartModel"}},t._l(t.sparePartsSpecList,(function(t,n){return e("el-option",{key:n,attrs:{label:t.model,value:t.model}})})),1)],1)],1)],1),e("el-row",{attrs:{gutter:20}},[e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"更换数量",prop:"replaceNum"}},[e("el-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:10,label:"更换数量"},model:{value:t.form.replaceNum,callback:function(e){t.$set(t.form,"replaceNum",e)},expression:"form.replaceNum"}})],1)],1),e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"维护人员",prop:"maintainStaff"}},[e("el-input",{attrs:{placeholder:"维护人员"},model:{value:t.form.maintainStaff,callback:function(e){t.$set(t.form,"maintainStaff",e)},expression:"form.maintainStaff"}})],1)],1)],1),e("el-row",{attrs:{gutter:20}},[e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"实际开始时间",prop:"startTime"}},[e("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:t.form.startTime,callback:function(e){t.$set(t.form,"startTime",e)},expression:"form.startTime"}})],1)],1),e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"实际结束时间",prop:"endTime"}},[e("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:t.form.endTime,callback:function(e){t.$set(t.form,"endTime",e)},expression:"form.endTime"}})],1)],1)],1),e("el-row",{attrs:{gutter:20}},[e("el-col",{attrs:{span:24}},[e("el-form-item",{attrs:{label:"完成情况",prop:"complete"}},[e("el-input",{attrs:{placeholder:"完成情况"},model:{value:t.form.complete,callback:function(e){t.$set(t.form,"complete",e)},expression:"form.complete"}})],1)],1)],1)],1)},s=[],u=n(3126),d=n.n(u),m=n(5591),l=n(910),c=n(381),p=n.n(c),f=n(147),h={name:"SelfMaintenanceAdd",data(){return{form:{id:"",code:"",equipmentId:"",sparePartName:"",sparePartModel:"",replaceNum:null,maintainStaff:"",startTime:"",endTime:"",complete:""},cascaderOptions:[],rules:{code:[{required:!0,message:"请输入维护工单号",trigger:"blur"}],equipmentId:[{required:!0,message:"请选择设备名称",trigger:"change"}],sparePartName:[{required:!0,message:"请选择备件名称",trigger:"change"}],sparePartModel:[{required:!0,message:"请选择备件型号",trigger:"change"}],replaceNum:[{required:!0,message:"请输入更换数量",trigger:"blur"}],maintainStaff:[{required:!0,message:"请输入执行人员",trigger:"blur"}],startTime:[{required:!0,message:"请选择实际开始时间",trigger:"change"}],endTime:[{required:!0,message:"请选择实际结束时间",trigger:"change"}]},productionLineList:d().productionLineList,sparePartsTypeList:d().sparePartsTypeList,sparePartsList:[],sparePartsSpecList:[],isEdit:!1}},methods:{init(t){this.getTree(),this.getNameList(),t?(this.form.id=t,this.isEdit=!0,(0,f.yx)({id:t}).then((t=>{this.form.code=t.data.code,this.form.equipmentId=t.data.equipmentId,this.form.proLineId=t.data.proLineId,this.form.sparePartName=t.data.sparePartName,this.form.sparePartModel=t.data.model,this.form.replaceNum=t.data.replaceNum,this.form.maintainStaff=t.data.maintainStaff,this.form.startTime=t.data.startTime,this.form.endTime=t.data.endTime,this.form.complete=t.data.complete}))):(this.form.startTime=p()().format("yyyy-MM-DDTHH:mm:ss"),this.form.endTime=p()().format("yyyy-MM-DDTHH:mm:ss"),this.isEdit=!1,this.form.id="")},getTree(){(0,m.SI)().then((t=>{this.cascaderOptions=t.data}))},selectEq(t){this.form.equipmentId=t[2],this.form.proLineId=t[0]},getNameList(){(0,l.dN)().then((t=>{this.sparePartsList=t.data}))},selectModel(t){(0,l.fZ)({name:t}).then((t=>{this.sparePartsSpecList=t.data,this.form.sparePartModel=""}))},submitForm(){this.$refs["form"].validate((t=>{if(!t)return!1;this.isEdit?(0,f.KK)({...this.form}).then((()=>{this.$message({message:"操作成功",type:"success",duration:1500}),this.$emit("successSubmit")})):(0,f.h)({...this.form}).then((()=>{this.$message({message:"操作成功",type:"success",duration:1500}),this.$emit("successSubmit")}))}))},formClear(){this.$refs.form.resetFields(),this.sparePartsList=[],this.sparePartsSpecList=[],this.form.proLineId="",this.form.id=""}}},b=h,g=n(1001),y=(0,g.Z)(b,o,s,!1,null,null,null),M=y.exports;const Z=[{prop:"code",label:"维护工单号",minWidth:150},{prop:"proLineName",label:"产线",minWidth:120},{prop:"unitName",label:"单元",minWidth:150},{prop:"equName",label:"设备名称",minWidth:150},{prop:"maintainStaff",label:"维护人员",minWidth:140},{prop:"sparePartName",label:"备件名称",minWidth:150},{prop:"model",label:"备件型号",minWidth:150},{prop:"replaceNum",label:"更换数量",minWidth:140},{prop:"complete",label:"完成情况",minWidth:140},{prop:"startTime",label:"开始时间",filter:i.g6,minWidth:160},{prop:"endTime",label:"结束时间",filter:i.g6,minWidth:160},{prop:"creatorName",label:"登记人",minWidth:140},{prop:"createTime",label:"登记时间",filter:i.g6,minWidth:160}],P=[{type:"edit",btnName:"编辑"},{type:"delete",btnName:"删除"}];var q={name:"selfMaintenance",components:{SelfMaintenanceAdd:M},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:"cascader",label:"产线/单元/设备",selectOptions:[],param:"keyword",cascaderProps:{checkStrictly:!0,value:"name",label:"name"},width:250},{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:"primary",plain:!0},{type:"button",btnName:"导出",name:"export",color:"primary",plain:!0}],tableProps:Z,tableData:[],tableBtn:P,tableH:(0,i.NC)(320),total:0,listQuery:{current:1,size:20},addAndEdit:"",centervisible:!1}},mounted(){window.addEventListener("resize",(()=>{this.tableH=(0,i.NC)(320)})),this.getTree(),this.getList()},methods:{getTree(){(0,m.SI)().then((t=>{this.formConfig[1].selectOptions=t.data}))},getList(){(0,f.$N)({...this.listQuery}).then((t=>{0===t.code&&(this.total=t.data.total,this.tableData=t.data.records)}))},handleClick(t){"edit"===t.type?(this.addAndEdit="编辑",this.centervisible=!0,this.$nextTick((()=>{this.$refs.selfMaintenanceAdd.init(t.data.id)}))):this.$confirm('确认删除工单号"'+t.data.code+'"吗?',{type:"warning"}).then((()=>{(0,f.jL)({id:t.data.id}).then((t=>{console.log(t),this.$message({message:"工单删除成功",type:"success",duration:1500,onClose:()=>{}}),this.listQuery.current=1,this.getList()}))})).catch((()=>{}))},buttonClick(t){switch(t.btnName){case"search":this.listQuery.startTime=t.timeVal?t.timeVal[0]:"",this.listQuery.endTime=t.timeVal?t.timeVal[1]:"",this.listQuery.proLineName=t.keyword[0],this.listQuery.unitName=t.keyword[1],this.listQuery.equName=t.keyword[2],this.listQuery.code=t.code,this.getList();break;case"reset":this.$refs.searchBarForm.resetForm(),this.listQuery.startTime="",this.listQuery.endTime="",this.listQuery.proLineName="",this.listQuery.unitName="",this.listQuery.equName="",this.listQuery.code="",this.getList();break;case"add":this.addAndEdit="新增",this.centervisible=!0,this.$nextTick((()=>{this.$refs.selfMaintenanceAdd.init()}));break;default:(0,f.$7)({...this.listQuery}).then((t=>{let e="";const n=t.headers["content-disposition"];n&&(e=decodeURIComponent(n.slice(n.indexOf("filename=")+9)));const a=new Blob([t.data]),r=new FileReader;r.readAsDataURL(a),r.onload=t=>{const n=document.createElement("a");n.download=e,n.href=t.target.result,document.body.appendChild(n),n.click(),document.body.removeChild(n)}}))}},handleCancel(){this.$refs.selfMaintenanceAdd.formClear(),this.addAndEdit="",this.centervisible=!1},handleConfirm(){this.$refs.selfMaintenanceAdd.submitForm()},successSubmit(){this.handleCancel(),this.getList()}}},S=q,L=(0,g.Z)(S,a,r,!1,null,"7f3d9a89",null),T=L.exports},5591:function(t,e,n){"use strict";n.d(e,{FH:function(){return s},Hp:function(){return u},JQ:function(){return o},SI:function(){return i},WQ:function(){return l},b6:function(){return d},iv:function(){return r},m:function(){return m}});var a=n(8859);function r(){return(0,a.Z)({url:"/common/getList",method:"post"})}function i(){return(0,a.Z)({url:"/common/getTreeData",method:"post"})}function o(t){return(0,a.Z)({url:"/common/updateEqSeq",method:"post",data:t})}function s(t){return(0,a.Z)({url:"/common/attachment/downloadFile",method:"get",responseType:"blob",params:t,timeout:6e4})}function u(t){return(0,a.Z)({url:"/common/getAlarmData",method:"post",data:t})}function d(t){return(0,a.Z)({url:"/common/getProductData",method:"post",data:t})}function m(t){return(0,a.Z)({url:"/common/getMaterialData",method:"post",data:t})}const l="/api/common/attachment/uploadFileFormData"},910:function(t,e,n){"use strict";n.d(e,{$0:function(){return T},A0:function(){return L},D0:function(){return o},ER:function(){return A},Kl:function(){return S},ME:function(){return m},Or:function(){return g},P4:function(){return d},Py:function(){return l},Qj:function(){return P},Sc:function(){return h},WZ:function(){return f},Wj:function(){return u},Zs:function(){return r},_:function(){return v},_1:function(){return y},ag:function(){return C},b8:function(){return b},dN:function(){return c},fZ:function(){return p},gz:function(){return M},jF:function(){return i},oW:function(){return N},qT:function(){return Z},sU:function(){return s},tb:function(){return q},xf:function(){return k}});var a=n(8859);function r(t){return(0,a.Z)({url:"/basic/account/page",method:"post",data:t})}function i(t){return(0,a.Z)({url:"/basic/account/add",method:"post",data:t})}function o(t){return(0,a.Z)({url:"/basic/account/get",method:"post",data:t})}function s(t){return(0,a.Z)({url:"/basic/account/update",method:"post",data:t})}function u(t){return(0,a.Z)({url:"/basic/sparePartsConfiguration/page",method:"post",data:t})}function d(t){return(0,a.Z)({url:"/basic/sparePartsConfiguration/add",method:"post",data:t})}function m(t){return(0,a.Z)({url:"/basic/sparePartsConfiguration/get",method:"post",data:t})}function l(t){return(0,a.Z)({url:"/basic/sparePartsConfiguration/update",method:"post",data:t})}function c(t){return(0,a.Z)({url:"/basic/sparePartsConfiguration/getNameList",method:"post",data:t})}function p(t){return(0,a.Z)({url:"/basic/sparePartsConfiguration/getModelList",method:"post",data:t})}function f(t){return(0,a.Z)({url:"/basic/consumableConfiguration/page",method:"post",data:t})}function h(t){return(0,a.Z)({url:"/basic/consumableConfiguration/add",method:"post",data:t})}function b(t){return(0,a.Z)({url:"/basic/consumableConfiguration/get",method:"post",data:t})}function g(t){return(0,a.Z)({url:"/basic/consumableConfiguration/update",method:"post",data:t})}function y(t){return(0,a.Z)({url:"/basic/consumableConfiguration/materialAndUnit",method:"post",data:t})}function M(t){return(0,a.Z)({url:"/basic/consumableConfiguration/specList",method:"post",data:t})}function Z(t){return(0,a.Z)({url:"/basic/sideLibraryConfiguration/page",method:"post",data:t})}function P(t){return(0,a.Z)({url:"/basic/sideLibraryConfiguration/add",method:"post",data:t})}function q(t){return(0,a.Z)({url:"/basic/sideLibraryConfiguration/get",method:"post",data:t})}function S(t){return(0,a.Z)({url:"/basic/sideLibraryConfiguration/update",method:"post",data:t})}function L(t){return(0,a.Z)({url:"/basic/sideLibraryConfiguration/list",method:"post",data:t})}function T(t){return(0,a.Z)({url:"/basic/equipmentConfiguration/page",method:"post",data:t})}function C(t){return(0,a.Z)({url:"/basic/equipmentConfiguration/add",method:"post",data:t})}function k(t){return(0,a.Z)({url:"/basic/equipmentConfiguration/get",method:"post",data:t})}function N(t){return(0,a.Z)({url:"/basic/equipmentConfiguration/update",method:"post",data:t})}function v(t){return(0,a.Z)({url:"/basic/equipmentConfiguration/getUnitList",method:"post",formState:!0,data:t})}function A(t){return(0,a.Z)({url:"/basic/equipmentConfiguration/getEqCode",method:"post",data:t})}},147:function(t,e,n){"use strict";n.d(e,{$7:function(){return w},$F:function(){return b},$N:function(){return N},$d:function(){return c},A5:function(){return S},Ah:function(){return o},Dr:function(){return f},HJ:function(){return d},Im:function(){return P},KK:function(){return A},KQ:function(){return T},Ko:function(){return x},Ku:function(){return h},OP:function(){return u},OT:function(){return g},UP:function(){return M},Uw:function(){return Q},YG:function(){return k},bO:function(){return l},co:function(){return y},fK:function(){return q},h:function(){return v},jL:function(){return $},lJ:function(){return p},lZ:function(){return s},pl:function(){return C},rd:function(){return m},uN:function(){return i},yx:function(){return Z},zG:function(){return L},zh:function(){return r}});var a=n(8859);function r(t){return(0,a.Z)({url:"/equipment/PerformanceAnalysis/get",method:"post",data:t})}function i(t){return(0,a.Z)({url:"/equipment/PerformanceAnalysis/getPlan",method:"post",data:t})}function o(t){return(0,a.Z)({url:"/equipment/PerformanceAnalysis/updatePlan",method:"post",data:t})}function s(t){return(0,a.Z)({url:"/equipment/PalletIndicatorAnalysis/page",method:"post",data:t})}function u(t){return(0,a.Z)({url:"/equipment/PalletIndicatorAnalysis/getType",method:"post",data:t})}function d(t){return(0,a.Z)({url:"/equipment/SparePartStock/page",method:"post",data:t})}function m(t){return(0,a.Z)({url:"/equipment/SparePartStock/inStock",method:"post",data:t})}function l(t){return(0,a.Z)({url:"/equipment/SparePartStock/get",method:"post",data:t})}function c(t){return(0,a.Z)({url:"/equipment/SparePartStock/update",method:"post",data:t})}function p(t){return(0,a.Z)({url:"/equipment/SparePartStock/outStock",method:"post",data:t})}function f(t){return(0,a.Z)({url:"/equipment/SparePartStock/stockDetail",method:"post",data:t})}function h(t){return(0,a.Z)({url:"/equipment/SparePartStock/getBatchList",method:"post",data:t})}function b(t){return(0,a.Z)({url:"/equipment/SparePartStock/export",method:"post",responseType:"blob",data:t,timeout:6e4})}function g(t){return(0,a.Z)({url:"/equipment/SparePartStock/PageHis",method:"post",data:t})}function y(t){return(0,a.Z)({url:"/equipment/SparePartStock/exportHis",method:"post",responseType:"blob",data:t,timeout:6e4})}function M(t){return(0,a.Z)({url:"/equipment/MaintainManage/pageSelect",method:"post",data:t})}function Z(t){return(0,a.Z)({url:"/equipment/MaintainManage/unDistributeGet",method:"post",data:t})}function P(t){return(0,a.Z)({url:"/equipment/MaintainManage/create",method:"post",data:t})}function q(t){return(0,a.Z)({url:"/equipment/MaintainManage/unDistribute",method:"post",data:t})}function S(t){return(0,a.Z)({url:"/equipment/MaintainManage/completedDistribute",method:"post",data:t})}function L(t){return(0,a.Z)({url:"/equipment/MaintainManage/dispatch",method:"post",data:t})}function T(t){return(0,a.Z)({url:"/equipment/MaintainManage/confirm",method:"post",data:t})}function C(t){return(0,a.Z)({url:"/equipment/MaintainManage/PlainMaintainDelete",method:"post",data:t})}function k(t){return(0,a.Z)({url:"/equipment/MaintainManage/PlanMaintainExport",method:"post",responseType:"blob",data:t,timeout:6e4})}function N(t){return(0,a.Z)({url:"/equipment/MaintainManage/AutoMaintainPageSelect",method:"post",data:t})}function v(t){return(0,a.Z)({url:"/equipment/MaintainManage/AutoMaintainAdd",method:"post",data:t})}function A(t){return(0,a.Z)({url:"/equipment/MaintainManage/AutoMaintainModify",method:"post",data:t})}function $(t){return(0,a.Z)({url:"/equipment/MaintainManage/AUtoMaintainDelete",method:"post",data:t})}function w(t){return(0,a.Z)({url:"/equipment/MaintainManage/AutoMaintainExport",method:"post",responseType:"blob",data:t,timeout:6e4})}function x(t){return(0,a.Z)({url:"/equipment/AlarmMessage/nowAlertSelect",method:"post",data:t})}function Q(t){return(0,a.Z)({url:"/equipment/AlarmMessage/historyAlertSelect",method:"post",data:t})}},3126:function(t){t.exports={roleList:[{id:"1",name:"加工人员"},{id:"2",name:"质检人员"}],productionLineList:[{id:"1",name:"产线1"},{id:"2",name:"产线2"}],sparePartsTypeList:[{id:"1",name:"边磨备品备件"},{id:"2",name:"清洗机备品备件"},{id:"3",name:"前清洗备品备件"},{id:"4",name:"后清洗备品备件"},{id:"5",name:"面磨区备品备件"},{id:"6",name:"终检区备品备件"},{id:"7",name:"动力区备品备件"},{id:"8",name:"辅材备品备件"}],statusList:[{id:"1",name:"正常"},{id:"2",name:"禁用"}],unitModuleList:[{id:"1",name:"精切磨边"},{id:"2",name:"磨边后清洗"},{id:"3",name:"边检"},{id:"4",name:"面研磨"},{id:"5",name:"面研磨辅助设备"},{id:"6",name:"面研磨后清洗"},{id:"7",name:"终检"},{id:"8",name:"内包区"},{id:"9",name:"外包区"}],testItemList:[{id:"1",name:"研磨幅"},{id:"2",name:"外观尺寸"},{id:"3",name:"角尺寸"},{id:"4",name:"直线性"},{id:"5",name:"翘曲"},{id:"6",name:"成品厚度"},{id:"7",name:"应力"},{id:"8",name:"条纹/磨痕度数"}],orderTypeList:[{id:"1",name:"全部"},{id:"2",name:"正常"},{id:"3",name:"待再加工"}],orderStatusList:[{id:"1",name:"全部"},{id:"2",name:"已下发"},{id:"3",name:"未下发"},{id:"4",name:"已结束"}],planTypeList:[{id:"1",name:"全部"},{id:"2",name:"年计划"},{id:"3",name:"月计划"},{id:"4",name:"日计划"}],regrindList:[{id:"1",name:"无"},{id:"2",name:"锡面"},{id:"3",name:"空气面"}],productionSpecList:[{id:"1",name:"G8.5"},{id:"2",name:"G8.6"}]}}}]); |