mt-ck-wms-ui/dist/static/js/chunk-5190b266.0ca14141.js
2022-06-21 14:03:26 +08:00

1 line
15 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5190b266"],{"09f4":function(t,a,e){"use strict";e.d(a,"a",(function(){return n}));var s=e("2b0b"),i=e.n(s);Math.easeInOutQuad=function(t,a,e,s){return t/=s/2,t<1?e/2*t*t+a:(t--,-e/2*(t*(t-2)-1)+a)};var l=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){i()(t,1e3/60)}}();function o(t){document.documentElement.scrollTop=t,document.body.parentNode.scrollTop=t,document.body.scrollTop=t}function r(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function n(t,a,e){var s=r(),i=t-s,n=20,c=0;a="undefined"===typeof a?500:a;var u=function t(){c+=n;var r=Math.easeInOutQuad(c,s,i,a);o(r),c<a?l(t):e&&"function"===typeof e&&e()};u()}},1:function(t,a){},2:function(t,a){},"546f":function(t,a,e){"use strict";var s=e("9923"),i={sex:{0:s["a"].t("basicDataFilter.sex.woman"),1:s["a"].t("basicDataFilter.sex.man")},onDuty:{0:s["a"].t("basicDataFilter.onDuty.no"),1:s["a"].t("basicDataFilter.onDuty.yes")},orderStatus:{1:s["a"].t("basicDataFilter.orderStatus.add"),2:s["a"].t("basicDataFilter.orderStatus.start"),3:s["a"].t("basicDataFilter.orderStatus.stop"),4:s["a"].t("basicDataFilter.orderStatus.issued"),9:s["a"].t("basicDataFilter.orderStatus.complete")},workOrderStatus:{1:s["a"].t("basicDataFilter.workOrderStatus.notactive"),2:s["a"].t("basicDataFilter.workOrderStatus.waiting"),3:s["a"].t("basicDataFilter.workOrderStatus.active"),4:s["a"].t("basicDataFilter.workOrderStatus.stop"),9:s["a"].t("basicDataFilter.workOrderStatus.complete")},source:{1:"MES",2:"ERP",3:"PID1",4:"00A",5:"00C"},priority:{1:s["a"].t("basicDataFilter.priority.low"),2:s["a"].t("basicDataFilter.priority.normal"),3:s["a"].t("basicDataFilter.priority.high")},workStatus:{0:s["a"].t("basicDataFilter.workStatus.fail"),1:s["a"].t("basicDataFilter.workStatus.success")},roleType:{1:"pc",2:"app",3:"wechat",4:"miniapp",5:"pda"},menuType:{0:s["a"].t("basicDataFilter.menuType.catalogue"),1:s["a"].t("basicDataFilter.menuType.menu"),2:s["a"].t("basicDataFilter.menuType.button")},enableState:{0:s["a"].t("basicDataFilter.enableState.disable"),1:s["a"].t("basicDataFilter.enableState.enable")},storage:{0:s["a"].t("basicDataFilter.storage.normal"),1:s["a"].t("basicDataFilter.storage.repairing"),2:s["a"].t("basicDataFilter.storage.scrap")}};a["a"]=function(t){return function(a){var e;return null===i||void 0===i||null===(e=i[t])||void 0===e?void 0:e[a]}}},"975a":function(t,a,e){},9884:function(t,a,e){"use strict";e.r(a);var s=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"app-container"},[e("head-form",{attrs:{"placeholder-name":t.placeholderName,"key-name":t.keyName},on:{getDataList:t.getList,add:t.addNew}}),t._v(" "),e("base-table",{attrs:{page:t.listQuery.current,limit:t.listQuery.size,"table-config":t.tableProps,"table-data":t.list,"is-loading":t.listLoading}},[e("method-btn",{attrs:{slot:"handleBtn",width:t.trueWidth,"method-list":t.tableBtn},on:{clickBtn:t.handleClick},slot:"handleBtn"})],1),t._v(" "),e("pagination",{directives:[{name:"show",rawName:"v-show",value:t.total>0,expression:"total > 0"}],attrs:{total:t.total,page:t.listQuery.current,limit:t.listQuery.size},on:{"update:page":function(a){return t.$set(t.listQuery,"current",a)},"update:limit":function(a){return t.$set(t.listQuery,"size",a)},pagination:function(a){return t.getList()}}}),t._v(" "),t.addOrUpdateVisible?e("staff-add",{ref:"addOrUpdate",attrs:{"role-list":t.roleList},on:{refreshDataList:t.getList}}):t._e()],1)},i=[],l=(e("96cf"),e("1da1")),o=(e("6b54"),e("7f7f"),e("6b47")),r=e.n(o),n=(e("06db"),e("87b3"),e("a3e3")),c=e.n(n),u=e("4573"),d=e.n(u),f=e("3393"),m=e.n(f),p=e("9923"),b=e("b775");function D(t){return Object(b["a"])({url:"/api/wms/worker/page",method:"post",data:t})}function h(t){return Object(b["a"])({url:"/api/wms/worker/get",method:"post",data:{id:t}})}function v(t){return Object(b["a"])({url:"/api/wms/worker/update",method:"post",data:t})}function y(t){return Object(b["a"])({url:"/api/wms/worker/add",method:"post",data:t})}function w(){return Object(b["a"])({url:"/api/wms/worker/get-code",method:"post"})}function $(t){return Object(b["a"])({url:"/api/wms/worker/delete",method:"post",data:{id:t}})}function g(){return Object(b["a"])({url:"/api/wms/platform-dict/selectPlatformDictDataListByPage",method:"post",data:{dictTypeId:"1383318968677273601",current:1,size:999}})}var k=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("el-dialog",{attrs:{title:t._f("i18nFilter")(t.staffData.id?"btn.edit":"btn.add"),visible:t.visible},on:{"update:visible":function(a){t.visible=a}}},[e("el-row",{attrs:{gutter:15}},[e("el-form",{ref:"staffForm",attrs:{model:t.staffData,rules:t.rules,size:"medium","label-width":"110px"}},[e("el-col",{attrs:{span:10}},[e("el-row",[e("el-col",{attrs:{span:20}},[e("el-form-item",{attrs:{label:t.$t("module.basicData.staff.Name"),prop:"name"}},[e("el-input",{style:{width:"100%"},attrs:{placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.staff.Name")]),clearable:""},model:{value:t.staffData.name,callback:function(a){t.$set(t.staffData,"name",a)},expression:"staffData.name"}})],1)],1),t._v(" "),e("el-col",{attrs:{span:20}},[e("el-form-item",{attrs:{label:t.$t("module.basicData.staff.role"),prop:"roleId"}},[e("el-select",{model:{value:t.staffData.roleId,callback:function(a){t.$set(t.staffData,"roleId",a)},expression:"staffData.roleId"}},t._l(t.roleList,(function(t){return e("el-option",{key:t.id,attrs:{value:t.id,label:t.dataName}})})),1)],1)],1),t._v(" "),e("el-col",{attrs:{span:20}},[e("el-form-item",{attrs:{label:t.$t("module.basicData.staff.Gender"),prop:"sex"}},[e("el-select",{style:{width:"100%"},attrs:{placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.staff.Gender")]),clearable:""},model:{value:t.staffData.sex,callback:function(a){t.$set(t.staffData,"sex",a)},expression:"staffData.sex"}},t._l(t.sexOptions,(function(t,a){return e("el-option",{key:a,attrs:{label:t.label,value:t.value,disabled:t.disabled}})})),1)],1)],1),t._v(" "),e("el-col",{attrs:{span:20}},[e("el-form-item",{attrs:{label:t.$t("module.basicData.staff.Telephone"),prop:"telephone"}},[e("el-input",{style:{width:"100%"},attrs:{placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.staff.Telephone")]),clearable:"","prefix-icon":"el-icon-phone"},model:{value:t.staffData.telephone,callback:function(a){t.$set(t.staffData,"telephone",a)},expression:"staffData.telephone"}})],1)],1),t._v(" "),e("el-col",{attrs:{span:20}},[e("el-form-item",{attrs:{label:t.$t("module.basicData.staff.Email"),prop:"email"}},[e("el-input",{style:{width:"100%"},attrs:{placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.staff.Email")]),clearable:""},model:{value:t.staffData.email,callback:function(a){t.$set(t.staffData,"email",a)},expression:"staffData.email"}})],1)],1),t._v(" "),e("el-col",{attrs:{span:20}},[e("el-form-item",{attrs:{label:t.$t("module.basicData.visual.Remarks"),prop:"description"}},[e("el-input",{style:{width:"100%"},attrs:{placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.visual.Remarks")]),clearable:""},model:{value:t.staffData.description,callback:function(a){t.$set(t.staffData,"description",a)},expression:"staffData.description"}})],1)],1)],1)],1),t._v(" "),e("el-col",{attrs:{span:10}},[e("el-row",[e("el-col",{attrs:{span:20}},[e("el-form-item",{attrs:{label:t.$t("module.basicData.staff.EmployeeID"),prop:"code"}},[e("el-input",{style:{width:"100%"},attrs:{placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.staff.EmployeeID")]),clearable:""},model:{value:t.staffData.code,callback:function(a){t.$set(t.staffData,"code",a)},expression:"staffData.code"}})],1)],1),t._v(" "),e("el-col",{attrs:{span:20}},[e("el-form-item",{attrs:{label:t.$t("module.basicData.staff.Wechat"),prop:"wechatCode"}},[e("el-input",{style:{width:"100%"},attrs:{placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.staff.Wechat")]),clearable:""},model:{value:t.staffData.wechatCode,callback:function(a){t.$set(t.staffData,"wechatCode",a)},expression:"staffData.wechatCode"}})],1)],1),t._v(" "),e("el-col",{attrs:{span:20}},[e("el-form-item",{attrs:{label:t.$t("module.basicData.staff.EntryTime"),prop:"entryTime"}},[e("el-date-picker",{style:{width:"100%"},attrs:{placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.staff.EntryTime")]),clearable:""},model:{value:t.staffData.entryTime,callback:function(a){t.$set(t.staffData,"entryTime",a)},expression:"staffData.entryTime"}})],1)],1),t._v(" "),e("el-col",{attrs:{span:20}},[e("el-form-item",{attrs:{label:t.$t("module.basicData.staff.Workshop"),prop:"workshop"}},[e("el-input",{style:{width:"100%"},attrs:{placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.staff.Workshop")]),clearable:""},model:{value:t.staffData.workshop,callback:function(a){t.$set(t.staffData,"workshop",a)},expression:"staffData.workshop"}})],1)],1),t._v(" "),e("el-col",{attrs:{span:20}},[e("el-form-item",{attrs:{label:t.$t("module.basicData.staff.onDuty"),prop:"onDuty"}},[e("el-radio-group",{attrs:{size:"medium"},model:{value:t.staffData.onDuty,callback:function(a){t.$set(t.staffData,"onDuty",a)},expression:"staffData.onDuty"}},t._l(t.onDutyOptions,(function(a,s){return e("el-radio",{key:s,attrs:{label:a.value,disabled:a.disabled}},[t._v(t._s(a.label))])})),1)],1)],1)],1)],1)],1)],1),t._v(" "),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(a){t.visible=!1}}},[t._v(t._s(t._f("i18nFilter")("btn.cancel")))]),t._v(" "),e("el-button",{attrs:{type:"primary",size:"medium"},on:{click:function(a){return t.staffDataSubmit()}}},[t._v(" "+t._s(t._f("i18nFilter")("btn.save"))+" ")])],1)],1)},F=[],x={props:{roleList:{type:Array,default:function(){return[]}}},data:function(){return{visible:!1,staffData:{name:void 0,sex:"",telephone:"",email:"",majorId:[],description:void 0,code:void 0,wechatCode:void 0,entryTime:null,workshop:void 0,onDuty:1,roleId:null},rules:{name:[{required:!0,message:this.$i18nForm(["placeholder.input",this.$t("module.basicData.staff.Name")]),trigger:"blur"}],telephone:[{pattern:/(^1\d{10}$)|(^[0-9]\d{7}$)/,message:this.$t("module.basicData.staff.Telephone")+this.$t("module.basicData.customer.format"),trigger:"blur"}],email:[{pattern:/^\w+@[a-z0-9]+\.[a-z]{2,4}$/,message:this.$t("module.basicData.staff.Email")+this.$t("module.basicData.customer.format"),trigger:"blur"}],description:[],code:[{required:!0,message:this.$i18nForm(["placeholder.input",this.$t("module.basicData.staff.EmployeeID")]),trigger:"blur"}]},sexOptions:[{label:this.$t("module.basicData.cache.man"),value:1},{label:this.$t("module.basicData.cache.woman"),value:0}],onDutyOptions:[{label:this.$t("module.basicData.visual.Yes"),value:1},{label:this.$t("module.basicData.visual.No"),value:0}]}},methods:{init:function(t){var a=this;w().then((function(t){a.staffData.code=t.data})),this.staffData.id=t||"",this.visible=!0,this.$nextTick((function(){a.$refs["staffForm"].resetFields(),a.staffData.id&&h(a.staffData.id).then((function(t){a.staffData=t.data}))}))},staffDataSubmit:function(){var t=this;this.$refs["staffForm"].validate((function(a){if(a){var e={name:t.staffData.name,sex:t.staffData.sex,telephone:t.staffData.telephone,description:t.staffData.description,code:t.staffData.code,email:t.staffData.email,entryTime:t.staffData.entryTime,majorId:t.staffData.majorId,onDuty:t.staffData.onDuty,wechatCode:t.staffData.wechatCode,workshop:t.staffData.workshop,roleId:t.staffData.roleId,id:t.staffData.id};t.staffData.id?v(e).then((function(a){t.$message({message:t.$t("module.basicData.visual.success"),type:"success",duration:1500,onClose:function(){t.visible=!1,t.$emit("refreshDataList")}})})):y(e).then((function(a){t.$message({message:t.$t("module.basicData.visual.success"),type:"success",duration:1500,onClose:function(){t.visible=!1,t.$emit("refreshDataList")}})}))}}))}}},T=x,_=e("2877"),O=Object(_["a"])(T,k,F,!1,null,null,null),S=O.exports,L=e("bb1e"),N=e("c0ee"),j=e("333d"),I=e("ebe9"),E=e("546f"),C=e("8975"),B=[{type:"edit",btnName:"btn.edit"},{type:"delete",btnName:"btn.delete"}],z=[{prop:"createTime",label:p["a"].t("module.basicData.factory.createTime"),filter:C["timeFormatter"],align:"center"},{prop:"name",label:p["a"].t("module.basicData.staff.Name"),align:"center"},{prop:"code",label:p["a"].t("module.basicData.staff.EmployeeID"),align:"center"},{prop:"roleName",label:p["a"].t("module.basicData.staff.role"),align:"center"},{prop:"sex",label:p["a"].t("module.basicData.staff.Gender"),filter:Object(E["a"])("sex"),align:"center"},{prop:"entryTime",label:p["a"].t("module.basicData.staff.EntryTime"),filter:C["timeFormatter"],align:"center"},{prop:"telephone",label:p["a"].t("module.basicData.staff.Telephone"),align:"center"},{prop:"email",label:p["a"].t("module.basicData.staff.Email"),align:"center"},{prop:"wechatCode",label:p["a"].t("module.basicData.staff.Wechat"),align:"center"},{prop:"workshop",label:p["a"].t("module.basicData.staff.Workshop"),align:"center"},{prop:"onDuty",label:p["a"].t("module.basicData.staff.onDuty"),filter:Object(E["a"])("onDuty"),align:"center"},{prop:"description",label:p["a"].t("module.basicData.visual.Remarks"),align:"center"}],Q={name:"Staff",components:{Pagination:j["a"],BaseTable:N["a"],MethodBtn:I["a"],HeadForm:L["a"],staffAdd:S},filters:{statusFilter:function(t){var a={published:"success",draft:"info",deleted:"danger"};return a[t]}},data:function(){return{keyName:p["a"].t("module.basicData.visual.keyword"),placeholderName:this.$t("module.basicData.staff.Name"),addOrUpdateVisible:!1,tableBtn:B,trueWidth:200,tableProps:z,list:[],total:0,listLoading:!0,roleList:[],listQuery:{current:1,size:10}}},created:function(){this.getRole()},methods:{handleClick:function(t){var a,e=this;(console.log(t),"delete"===t.type)?this.$confirm(c()(a="".concat(this.$t("module.basicData.visual.TipsBefore"),"[")).call(a,t.data.name,"]?"),this.$t("module.basicData.visual.Tips"),{confirmButtonText:this.$t("module.basicData.visual.confirmButtonText"),cancelButtonText:this.$t("module.basicData.visual.cancelButtonText"),type:"warning"}).then((function(){$(t.data.id).then((function(t){e.$message({message:e.$t("module.basicData.visual.success"),type:"success",duration:1500,onClose:function(){e.getList()}})}))}))["catch"]((function(){})):this.addNew(t.data.id)},getList:function(t){var a=this;this.listLoading=!0,this.listQuery.key=t,D(this.listQuery).then((function(t){var e,s;t.data.records?(a.list=t.data.records,d()(e=a.list).call(e,(function(t){t.major&&(t.majorArr=t.major.toString())}))):m()(s=a.list).call(s,0,a.list.length);a.total=t.data.total,a.listLoading=!1}))},getRole:function(){var t=Object(l["a"])(r.a.mark((function t(){var a;return r.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,g();case 2:a=t.sent,this.roleList=a.data.records,this.getList();case 5:case"end":return t.stop()}}),t,this)})));function a(){return t.apply(this,arguments)}return a}(),addNew:function(t){var a=this;this.addOrUpdateVisible=!0,this.$nextTick((function(){a.$refs.addOrUpdate.init(t)}))}}},R=Q,W=(e("be9e"),Object(_["a"])(R,s,i,!1,null,"8314039c",null));a["default"]=W.exports},be9e:function(t,a,e){"use strict";e("975a")}}]);