mt-ck-wms-ui/dist/static/js/chunk-b04bb9b0.4056340c.js
2022-06-21 14:03:26 +08:00

1 line
16 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b04bb9b0"],{"09f4":function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var r=a("2b0b"),o=a.n(r);Math.easeInOutQuad=function(e,t,a,r){return e/=r/2,e<1?a/2*e*e+t:(e--,-a/2*(e*(e-2)-1)+t)};var n=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){o()(e,1e3/60)}}();function i(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function l(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function s(e,t,a){var r=l(),o=e-r,s=20,c=0;t="undefined"===typeof t?500:t;var d=function e(){c+=s;var l=Math.easeInOutQuad(c,r,o,t);i(l),c<t?n(e):a&&"function"===typeof a&&a()};d()}},"1bc2":function(e,t,a){},6468:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("el-form",{attrs:{model:e.formData,inline:!0,size:"medium"}},[a("el-form-item",{attrs:{label:e.$t("module.basicData.ScrapInfo.PlateId"),prop:"substrateId"}},[a("el-input",{staticStyle:{width:"200px"},attrs:{placeholder:e.$i18nForm(["placeholder.input",e.$t("module.basicData.ScrapInfo.PlateId")]),clearable:""},model:{value:e.formData.substrateId,callback:function(t){e.$set(e.formData,"substrateId",t)},expression:"formData.substrateId"}})],1),e._v(" "),a("el-form-item",{attrs:{label:e.$t("module.basicData.ScrapInfo.TimePeriod"),prop:"time"}},[a("el-date-picker",{attrs:{type:"daterange",format:"yyyy-MM-dd","start-placeholder":e.$t("module.basicData.ScrapInfo.StartTime"),"end-placeholder":e.$t("module.basicData.ScrapInfo.EndTime"),"range-separator":e.$t("module.basicData.ScrapInfo.To"),clearable:""},model:{value:e.formData.timeSlot,callback:function(t){e.$set(e.formData,"timeSlot",t)},expression:"formData.timeSlot"}})],1),e._v(" "),a("el-form-item",{attrs:{label:e.$t("module.basicData.ScrapInfo.name"),prop:"equipmentId"}},[a("el-select",{style:{width:"100%"},attrs:{placeholder:e.$i18nForm(["placeholder.input",e.$t("module.basicData.ScrapInfo.name")]),clearable:"",filterable:""},model:{value:e.formData.equipmentId,callback:function(t){e.$set(e.formData,"equipmentId",t)},expression:"formData.equipmentId"}},e._l(e.device,(function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{label:e.$t("module.basicData.ScrapInfo.workOrderName"),prop:"workOrderId"}},[a("el-select",{style:{width:"100%"},attrs:{placeholder:e.$i18nForm(["placeholder.input",e.$t("module.basicData.ScrapInfo.workOrderName")]),clearable:"",filterable:""},model:{value:e.formData.workOrderId,callback:function(t){e.$set(e.formData,"workOrderId",t)},expression:"formData.workOrderId"}},e._l(e.orderList,(function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.getList()}}},[e._v(" "+e._s(e._f("i18nFilter")("btn.search"))+" ")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.addNew()}}},[e._v(" "+e._s(e._f("i18nFilter")("btn.add"))+" ")])],1)],1),e._v(" "),a("base-table",{attrs:{page:e.listQuery.current,limit:e.listQuery.size,"table-config":e.tableProps,"table-data":e.list,"is-loading":e.listLoading}},[a("method-btn",{attrs:{slot:"handleBtn",width:e.trueWidth,"method-list":e.tableBtn},on:{clickBtn:e.handleClick},slot:"handleBtn"})],1),e._v(" "),a("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{total:e.total,page:e.formData.current,limit:e.formData.size},on:{"update:page":function(t){return e.$set(e.formData,"current",t)},"update:limit":function(t){return e.$set(e.formData,"size",t)},pagination:function(t){return e.getList()}}}),e._v(" "),e.addOrUpdateVisible?a("ScrapInfo-add",{ref:"addOrUpdate",on:{refreshDataList:e.getList}}):e._e()],1)},o=[],n=(a("96cf"),a("1da1")),i=a("6b47"),l=a.n(i),s=a("3393"),c=a.n(s),d=a("b775");function u(e){return Object(d["a"])({url:"/api/wms/scrap/page",method:"post",data:e})}function m(e){return Object(d["a"])({url:"/api/wms/scrap/delete",method:"post",data:e})}function p(e){return Object(d["a"])({url:"/api/wms/scrap/update",method:"post",data:e})}function f(e){return Object(d["a"])({url:"/api/wms/scrap/create",method:"post",data:e})}function b(e){return Object(d["a"])({url:"/api/wms/scrap/findById",method:"post",data:e})}a("5530"),a("7f7f");var h=a("14b1"),v=a.n(h);function g(){return Object(d["b"])({url:"/api/wms/worker/page",method:"post",data:{current:1,size:999}}).then((function(e){var t;return 0===e.code?v()(t=e.data.records).call(t,(function(e){return{id:e.id,name:e.name,telephone:e.telephone?e.telephone:""}})):[]}))}function I(e){return Object(d["b"])({url:"/api/wms/scrap-information/page",method:"post",data:{current:1,size:999}}).then((function(e){var t;return 0===e.code?v()(t=e.data.records).call(t,(function(e){return{id:e.id,name:e.scrap}})):[]}))}var $=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{title:e._f("i18nFilter")(e.dataForm.id?"btn.edit":"btn.add"),"close-on-click-modal":!1,visible:e.visible},on:{"update:visible":function(t){e.visible=t},close:e.onClose}},[a("el-row",{staticStyle:{padding:"0 20px"},attrs:{gutter:15}},[a("el-form",{ref:"dataForm",attrs:{model:e.dataForm,rules:e.rules,size:"medium","label-width":"150px","label-position":"right"}},[a("el-form-item",{attrs:{label:e.$t("module.basicData.ScrapInfo.updateTime"),prop:"registerTime"}},[a("el-date-picker",{style:{width:"100%"},attrs:{format:"yyyy-MM-dd",placeholder:e.$i18nForm(["placeholder.input",e.$t("module.basicData.ScrapInfo.updateTime")]),clearable:""},model:{value:e.dataForm.registerTime,callback:function(t){e.$set(e.dataForm,"registerTime",t)},expression:"dataForm.registerTime"}})],1),e._v(" "),a("el-form-item",{attrs:{label:e.$t("module.basicData.ScrapInfo.RegisterPerson"),prop:"registerPerson"}},[a("el-select",{style:{width:"100%"},attrs:{placeholder:e.$i18nForm(["placeholder.input",e.$t("module.basicData.ScrapInfo.RegisterPerson")]),clearable:""},model:{value:e.dataForm.registerPerson,callback:function(t){e.$set(e.dataForm,"registerPerson",t)},expression:"dataForm.registerPerson"}},e._l(e.dict.worker,(function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{label:e.$t("module.basicData.ScrapInfo.entryType"),prop:"entryType"}},[a("el-select",{style:{width:"100%"},attrs:{placeholder:e.$i18nForm(["placeholder.input",e.$t("module.basicData.ScrapInfo.entryType")]),clearable:""},model:{value:e.dataForm.entryType,callback:function(t){e.$set(e.dataForm,"entryType",t)},expression:"dataForm.entryType"}},e._l(e.entryType,(function(e,t){return a("el-option",{key:t,attrs:{label:e.label,value:e.value}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{label:e.$t("module.basicData.ScrapInfo.workOrderName"),prop:"workOrderId"}},[a("el-select",{style:{width:"100%"},attrs:{placeholder:e.$i18nForm(["placeholder.input",e.$t("module.basicData.ScrapInfo.workOrderName")]),clearable:""},model:{value:e.dataForm.workOrderId,callback:function(t){e.$set(e.dataForm,"workOrderId",t)},expression:"dataForm.workOrderId"}},e._l(e.dict.orderList,(function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{label:e.$t("module.basicData.ScrapInfo.source"),prop:"source"}},[a("el-input",{style:{width:"100%"},attrs:{placeholder:e.$i18nForm(["placeholder.input",e.$t("module.basicData.ScrapInfo.source")]),clearable:""},model:{value:e.dataForm.source,callback:function(t){e.$set(e.dataForm,"source",t)},expression:"dataForm.source"}})],1),e._v(" "),a("el-form-item",{attrs:{label:e.$t("module.basicData.ScrapInfo.PlateId"),prop:"substrateId"}},[a("el-input",{style:{width:"100%"},attrs:{placeholder:e.$i18nForm(["placeholder.input",e.$t("module.basicData.ScrapInfo.PlateId")]),clearable:""},model:{value:e.dataForm.substrateId,callback:function(t){e.$set(e.dataForm,"substrateId",t)},expression:"dataForm.substrateId"}})],1),e._v(" "),a("el-form-item",{attrs:{label:e.$t("module.basicData.ScrapInfo.name"),prop:"equipmentId"}},[a("el-select",{style:{width:"100%"},attrs:{filterable:"",placeholder:e.$i18nForm(["placeholder.input",e.$t("module.basicData.ScrapInfo.name")]),clearable:""},model:{value:e.dataForm.equipmentId,callback:function(t){e.$set(e.dataForm,"equipmentId",t)},expression:"dataForm.equipmentId"}},e._l(e.device,(function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{label:e.$t("module.basicData.ScrapInfo.cause"),prop:"scrapReasonId"}},[a("el-select",{style:{width:"100%"},attrs:{placeholder:e.$i18nForm(["placeholder.input",e.$t("module.basicData.ScrapInfo.cause")]),clearable:""},model:{value:e.dataForm.scrapReasonId,callback:function(t){e.$set(e.dataForm,"scrapReasonId",t)},expression:"dataForm.scrapReasonId"}},e._l(e.dict.scrapReason,(function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{label:e.$t("module.basicData.ScrapInfo.registrationPlace"),prop:"placeOfRegis"}},[a("el-input",{style:{width:"100%"},attrs:{placeholder:e.$i18nForm(["placeholder.input",e.$t("module.basicData.ScrapInfo.registrationPlace")]),clearable:""},model:{value:e.dataForm.placeOfRegis,callback:function(t){e.$set(e.dataForm,"placeOfRegis",t)},expression:"dataForm.placeOfRegis"}})],1),e._v(" "),a("el-form-item",{attrs:{label:e.$t("module.basicData.ScrapInfo.remark"),prop:"remark"}},[a("el-input",{style:{width:"100%"},attrs:{placeholder:e.$i18nForm(["placeholder.input",e.$t("module.basicData.ScrapInfo.remark")]),clearable:""},model:{value:e.dataForm.remark,callback:function(t){e.$set(e.dataForm,"remark",t)},expression:"dataForm.remark"}})],1)],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.visible=!1}}},[e._v(e._s(e._f("i18nFilter")("btn.cancel")))]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.dataFormSubmit()}}},[e._v(e._s(e._f("i18nFilter")("btn.confirm")))])],1)],1)},w=[],D=a("c1df"),F=a.n(D),k=a("9923");function y(e){return Object(d["a"])({url:"/api/wms/equipment/page",method:"post",data:e})}function S(e){return Object(d["a"])({url:"/api/wms/work/order/page",method:"post",data:e})}var O=[{value:"加工可用",label:k["a"].t("module.basicData.ScrapInfo.completeWaste")},{value:"完全废品",label:k["a"].t("module.basicData.ScrapInfo.CanBeUsedAfterProcessing")}],_=[{value:"2",label:k["a"].t("module.basicData.ScrapInfo.manual")},{value:"1",label:k["a"].t("module.basicData.ScrapInfo.automatic")}],x={data:function(){return{visible:!1,moment:F.a,dataForm:{id:0,source:void 0,registerTime:void 0,registerPerson:void 0,scrapGrade:void 0,description:void 0,substrateId:void 0,placeOfRegis:"00A",remark:void 0},wasteGradeArr:O,entryType:_,rules:{equipmentId:[{required:!0,message:this.$i18nForm(["placeholder.input",this.$t("module.basicData.ScrapInfo.name")]),trigger:"change"}],substrateId:[{required:!0,message:this.$i18nForm(["placeholder.input",this.$t("module.basicData.ScrapInfo.PlateId")]),trigger:"blur"}],registerPerson:[{required:!0,message:this.$i18nForm(["placeholder.input",this.$t("module.basicData.ScrapInfo.registerPerson")]),trigger:"change"}],scrapReasonId:[{required:!0,message:this.$i18nForm(["placeholder.input",this.$t("module.basicData.ScrapInfo.cause")]),trigger:"change"}]},dict:{worker:[],scrapReason:[],orderList:[]},device:[],tag:!1}},mounted:function(){this.getDict()},methods:{onClose:function(){this.$refs["dataForm"].resetFields()},init:function(e){var t=this;this.dataForm.id=e||"",this.visible=!0,this.$nextTick((function(){t.dataForm.id?b({id:t.dataForm.id}).then((function(e){t.dataForm=e.data})):t.dataForm.registerTime=t.moment()}))},dataFormSubmit:function(){var e=this;this.$refs["dataForm"].validate((function(t){t&&(e.dataForm.id?(console.log(e.device),p(e.dataForm).then((function(t){e.$message({message:e.$t("module.basicData.visual.success"),type:"success",duration:1500,onClose:function(){e.visible=!1,e.$emit("refreshDataList")}})}))):f(e.dataForm).then((function(t){e.$message({message:e.$t("module.basicData.visual.success"),type:"success",duration:1500,onClose:function(){e.visible=!1,e.$emit("refreshDataList")}})})))}))},getDict:function(){var e=Object(n["a"])(l.a.mark((function e(){var t,a,r,o;return l.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,S({current:1,size:999});case 2:return t=e.sent,console.log(t),this.dict.orderList=t.data.records,e.next=7,y({current:1,size:999});case 7:return a=e.sent,0===a.code&&(this.device=a.data.records),e.next=11,g();case 11:return r=e.sent,this.dict.worker=r,e.next=15,I();case 15:o=e.sent,this.dict.scrapReason=o;case 17:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()}},T=x,P=a("2877"),R=Object(P["a"])(T,$,w,!1,null,null,null),j=R.exports,q=a("c0ee"),L=a("333d"),N=a("ebe9"),z=a("8975"),B=a("de20"),C=[{type:"edit",btnName:"btn.edit"},{type:"delete",btnName:"btn.delete"}],M=[{prop:"substrateId",label:k["a"].t("module.basicData.ScrapInfo.PlateId"),align:"center"},{prop:"workOrderName",label:k["a"].t("module.basicData.ScrapInfo.workOrderName"),align:"center"},{prop:"equipmentName",label:k["a"].t("module.basicData.ScrapInfo.name"),align:"center"},{prop:"registerPersonName",label:k["a"].t("module.basicData.ScrapInfo.RegisterPerson"),align:"center"},{prop:"updateTime",label:k["a"].t("module.basicData.ScrapInfo.updateTime"),filter:z["timeFormatter"],align:"center"},{prop:"placeOfRegis",label:k["a"].t("module.basicData.ScrapInfo.registrationPlace"),align:"center"},{prop:"scrapReason",label:k["a"].t("module.basicData.ScrapInfo.cause"),align:"center"}],A={name:"ScrapInfo",components:{Pagination:L["a"],BaseTable:q["a"],MethodBtn:N["a"],ScrapInfoAdd:j},data:function(){return{addOrUpdateVisible:!1,tableBtn:C,trueWidth:200,tableProps:M,list:[],total:0,listLoading:!0,formData:{timeSlot:null,substrateId:"",workOrderId:"",equipmentId:"",current:1,size:10,id:""},listQuery:{current:1,size:10},dict:{scrap:[]},orderList:[],device:[]}},created:function(){this.getDict(),this.getList()},methods:{handleClick:function(e){var t=this;"delete"===e.type?this.$confirm(k["a"].t("deleteMsgBox.content"),k["a"].t("deleteMsgBox.hint"),{confirmButtonText:k["a"].t("btn.confirm"),cancelButtonText:k["a"].t("btn.cancel"),type:"warning"}).then((function(){m({id:e.data.id}).then((function(e){t.$message({message:t.$t("module.basicData.visual.success"),type:"success",duration:1500,onClose:function(){t.getList()}})}))}))["catch"]((function(){})):this.addNew(e.data.id)},getList:function(){var e=this;this.listLoading=!0,this.formData.timeSlot?(this.formData.startTime=this.formData.timeSlot[0],this.formData.endTime=this.formData.timeSlot[1]):(this.formData.startTime="",this.formData.endTime=""),u(this.formData).then((function(t){var a;t.data.records?(e.list=t.data.records,console.log(e.list)):c()(a=e.list).call(a,0,e.list.length);e.total=t.data.total,e.listLoading=!1}))},getDict:function(){var e=Object(n["a"])(l.a.mark((function e(){var t,a,r;return l.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,y({current:1,size:999});case 2:return t=e.sent,0===t.code&&(this.device=t.data.records),e.next=6,Object(B["d"])({current:1,size:999});case 6:return a=e.sent,0===a.code&&(this.orderList=a.data.records),e.next=10,I();case 10:r=e.sent,this.dict.scrap=r;case 12:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),addNew:function(e){var t=this;this.addOrUpdateVisible=!0,this.$nextTick((function(){t.$refs.addOrUpdate.init(e)}))}}},U=A,E=(a("fd8c"),Object(P["a"])(U,r,o,!1,null,"5a807358",null));t["default"]=E.exports},de20:function(e,t,a){"use strict";a.d(t,"d",(function(){return o})),a.d(t,"e",(function(){return n})),a.d(t,"c",(function(){return i})),a.d(t,"b",(function(){return l})),a.d(t,"a",(function(){return s}));var r=a("b775");function o(e){return Object(r["a"])({url:"/api/wms/work/order/page",method:"post",data:e})}function n(e){return Object(r["a"])({url:"/api/wms/work/order/update",method:"post",data:e})}function i(e){var t={id:e};return Object(r["a"])({url:"/api/wms/work/order/get",method:"post",data:t})}function l(e){return Object(r["a"])({url:"/api/wms/work/order/execute/page",method:"post",data:e})}function s(e){var t={id:e};return Object(r["a"])({url:"/api/wms/work/order/execute/get",method:"post",data:t})}},fd8c:function(e,t,a){"use strict";a("1bc2")}}]);