mt-ck-wms-ui/dist/static/js/chunk-523689e4.f77166cc.js
2022-06-21 14:03:26 +08:00

1 line
9.6 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-523689e4"],{1:function(a,t){},2:function(a,t){},"3c30":function(a,t,e){},"6ce1":function(a,t,e){"use strict";e("3c30")},d34c:function(a,t,e){"use strict";e.r(t);var o=function(){var a=this,t=a.$createElement,e=a._self._c||t;return e("div",{staticClass:"app-container"},[e("head-form",{attrs:{"placeholder-name":a.placeholderName,"key-name":a.keyNameAdd},on:{getDataList:a.getList,add:a.addNew}}),a._v(" "),e("div",{staticStyle:{}},[a._v(a._s(a.sheCode)+":"+a._s(a.shCode)+" "+a._s(a.sheName)+""+a._s(a.shName)+" "+a._s(a.locaNum)+""+a._s(a.num)+"\n "),e("el-button",{attrs:{type:"success"},on:{click:function(t){return a.goback()}}},[a._v(a._s(a._f("i18nFilter")("btn.back")))])],1),a._v(" "),e("base-table",{attrs:{page:a.listQuery.current,limit:a.listQuery.size,"table-config":a.tableProps,"table-data":a.list,"is-loading":a.listLoading}},[e("method-btn",{attrs:{slot:"handleBtn",width:a.trueWidth,"method-list":a.tableBtn},on:{clickBtn:a.handleClick},slot:"handleBtn"})],1),a._v(" "),a.addOrUpdateVisible?e("locationAttr-add",{ref:"addOrUpdate",attrs:{"shelf-id":a.listQuery.shelfId},on:{refreshDataList:a.getList}}):a._e()],1)},i=[],l=(e("7f7f"),e("a3e3")),s=e.n(l),n=e("3393"),r=e.n(n),c=e("9923"),d=e("bb1e"),u=e("b775");function m(a){return Object(u["a"])({url:"/api/wms/area/locationByShelf",method:"post",data:a})}function h(a){return Object(u["a"])({url:"/api/wms/area/locationById",method:"post",data:{id:a}})}function b(a){return Object(u["a"])({url:"/api/wms/area/updatelocation",method:"post",data:a})}function p(a){return Object(u["a"])({url:"/api/wms/area/addlocation",method:"post",data:a})}function f(){return Object(u["a"])({url:"/api/wms/area/getCode",method:"post"})}function N(a){return Object(u["a"])({url:"/api/wms/area/deletelocation",method:"post",data:{id:a}})}var $=function(){var a=this,t=a.$createElement,e=a._self._c||t;return e("el-dialog",{attrs:{title:a._f("i18nFilter")(a.dataForm.id?"btn.edit":"btn.add"),visible:a.visible},on:{"update:visible":function(t){a.visible=t}}},[e("el-form",{ref:"dataForm",attrs:{model:a.dataForm,rules:a.dataRule,"label-width":"130px"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&a._k(t.keyCode,"enter",13,t.key,"Enter")?null:a.dataFormSubmit()}}},[e("el-form-item",{attrs:{label:a.$t("module.basicData.cache.LocationName"),prop:"locationName"}},[e("el-input",{attrs:{placeholder:a.$i18nForm(["placeholder.input",a.$t("module.basicData.cache.LocationName")]),clearable:""},model:{value:a.dataForm.locationName,callback:function(t){a.$set(a.dataForm,"locationName",t)},expression:"dataForm.locationName"}})],1),a._v(" "),e("el-form-item",{attrs:{label:a.$t("module.basicData.cache.LocationCode"),prop:"code"}},[e("el-input",{attrs:{placeholder:a.$i18nForm(["placeholder.input",a.$t("module.basicData.cache.LocationCode")]),clearable:""},model:{value:a.dataForm.code,callback:function(t){a.$set(a.dataForm,"code",t)},expression:"dataForm.code"}})],1),a._v(" "),e("el-form-item",{attrs:{label:a.$t("module.basicData.cache.anotherName"),prop:"locationNameAlias"}},[e("el-input",{attrs:{placeholder:a.$i18nForm(["placeholder.input",a.$t("module.basicData.cache.anotherName")]),clearable:""},model:{value:a.dataForm.locationNameAlias,callback:function(t){a.$set(a.dataForm,"locationNameAlias",t)},expression:"dataForm.locationNameAlias"}})],1),a._v(" "),e("el-form-item",{attrs:{label:a.$t("module.basicData.cache.rowMark"),prop:"layers"}},[e("el-input-number",{attrs:{step:1,placeholder:a.$i18nForm(["placeholder.input",a.$t("module.basicData.cache.rowMark")]),clearable:""},model:{value:a.dataForm.layers,callback:function(t){a.$set(a.dataForm,"layers",t)},expression:"dataForm.layers"}})],1),a._v(" "),e("el-form-item",{attrs:{label:a.$t("module.basicData.cache.columnMark"),prop:"columns"}},[e("el-input-number",{attrs:{step:1,placeholder:a.$i18nForm(["placeholder.input",a.$t("module.basicData.cache.columnMark")]),clearable:""},model:{value:a.dataForm.columns,callback:function(t){a.$set(a.dataForm,"columns",t)},expression:"dataForm.columns"}})],1),a._v(" "),e("el-form-item",{attrs:{label:a.$t("module.basicData.cache.locationNumber"),prop:"locationNumber"}},[e("el-input",{attrs:{step:1,placeholder:a.$i18nForm(["placeholder.input",a.$t("module.basicData.cache.locationNumber")]),clearable:""},model:{value:a.dataForm.locationNumber,callback:function(t){a.$set(a.dataForm,"locationNumber",t)},expression:"dataForm.locationNumber"}})],1)],1),a._v(" "),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(t){a.visible=!1}}},[a._v(a._s(a._f("i18nFilter")("btn.cancel")))]),a._v(" "),e("el-button",{attrs:{type:"primary"},on:{click:function(t){return a.dataFormSubmit()}}},[a._v(a._s(a._f("i18nFilter")("btn.confirm")))])],1)],1)},g=[],F={props:{shelfId:{type:String,default:function(){return""}}},data:function(){return{visible:!1,dataForm:{id:0,locationName:"",code:"",locationNameAlias:"",rowNum:"",status:null,locationType:"",locationNumber:0},options:[{value:1,label:"Working Port"},{value:2,label:"Buffer Port"},{value:3,label:"Exception Port"}],dataRule:{name:[{required:!0,message:this.$i18nForm(["placeholder.input",this.$t("module.basicData.cache.LocationName")]),trigger:"blur"}],code:[{required:!0,message:this.$i18nForm(["placeholder.input",this.$t("module.basicData.cache.LocationCode")]),trigger:"blur"}],layers:[{required:!0,pattern:/^[1-9]\d*$/,message:this.$t("module.basicData.cache.warning"),trigger:"blur"}],columns:[{required:!0,pattern:/^[1-9]\d*$/,message:this.$t("module.basicData.cache.warning"),trigger:"blur"}],locationNumber:[{required:!0,message:this.$i18nForm(["placeholder.input",this.$t("module.basicData.cache.locationNumber")]),trigger:"blur"}]}}},methods:{init:function(a){var t=this;this.dataForm.id=a||"",this.visible=!0,this.$nextTick((function(){t.$refs["dataForm"].resetFields(),t.dataForm.id?h(t.dataForm.id).then((function(a){t.dataForm=a.data})):f().then((function(a){t.dataForm.code=a.data}))}))},dataFormSubmit:function(){var a=this;this.$refs["dataForm"].validate((function(t){if(t){var e={locationName:a.dataForm.locationName,code:a.dataForm.code,locationNameAlias:a.dataForm.locationNameAlias,columns:a.dataForm.columns,layers:a.dataForm.layers,shelfId:a.shelfId,id:a.dataForm.id,status:a.dataForm.status,locationType:a.dataForm.locationType,locationNumber:a.dataForm.locationNumber};a.dataForm.id?b(e).then((function(t){a.$message({message:a.$t("module.basicData.visual.success"),type:"success",duration:1500,onClose:function(){a.visible=!1,a.$emit("refreshDataList")}})})):p(e).then((function(t){console.log(e),console.log(t),a.$message({message:a.$t("module.basicData.visual.success"),type:"success",duration:1500,onClose:function(){a.visible=!1,a.$emit("refreshDataList")}})}))}}))}}},v=F,y=e("2877"),D=Object(y["a"])(v,$,g,!1,null,null,null),k=D.exports,_=e("c0ee"),w=e("ebe9"),L=[{type:"edit",btnName:"btn.edit"},{type:"delete",btnName:"btn.delete"}],C=[{prop:"locationName",label:c["a"].t("module.basicData.cache.LocationName"),align:"center"},{prop:"code",label:c["a"].t("module.basicData.cache.LocationCode"),align:"center"},{prop:"locationNameAlias",label:c["a"].t("module.basicData.cache.anotherName"),align:"center"},{prop:"layers",label:c["a"].t("module.basicData.cache.rowMark"),align:"center"},{prop:"columns",label:c["a"].t("module.basicData.cache.columnMark"),align:"center"},{prop:"statusName",label:c["a"].t("module.basicData.cache.status"),align:"center"},{prop:"locationNumber",label:c["a"].t("module.basicData.cache.locationNumber"),align:"center"}],x={name:"Location",components:{BaseTable:_["a"],MethodBtn:w["a"],locationAttrAdd:k,HeadForm:d["a"]},filters:{statusFilter:function(a){var t={published:"success",draft:"info",deleted:"danger"};return t[a]}},data:function(){return{shCode:"",shName:"",num:0,addOrUpdateVisible:!1,keyNameAdd:c["a"].t("module.basicData.visual.keyword"),placeholderName:this.$t("module.basicData.cache.LocationName"),tableBtn:L,trueWidth:200,tableProps:C,list:[{statusName:""}],listLoading:!0,listQuery:{name:"",current:1,size:20},sheCode:this.$t("module.basicData.cache.sheCode"),sheName:this.$t("module.basicData.cache.sheName"),locaNum:this.$t("module.basicData.cache.locaNum")}},created:function(){this.listQuery.shelfId=this.$route.query.id,this.shCode=this.$route.query.code,this.shName=this.$route.query.shelfName,this.num=this.$route.query.total,this.getList()},methods:{handleClick:function(a){var t,e=this;"delete"===a.type?(console.log(a.data),this.$confirm(s()(t="".concat(this.$t("module.basicData.visual.TipsBefore"),"[")).call(t,a.data.locationName,"]?"),this.$t("module.basicData.visual.Tips"),{confirmButtonText:this.$t("module.basicData.visual.confirmButtonText"),cancelButtonText:this.$t("module.basicData.visual.cancelButtonText"),type:"warning"}).then((function(){N(a.data.id).then((function(a){e.$message({message:e.$t("module.basicData.visual.success"),type:"success",duration:1500,onClose:function(){e.getList()}})}))}))["catch"]((function(){}))):this.addNew(a.data.id)},getList:function(a){var t=this;this.listLoading=!0,this.listQuery.name=a,console.log(this.listQuery),this.listQuery.id=this.listQuery.shelfId,m(this.listQuery).then((function(a){if(a.data.records){t.list=a.data.records,console.log(t.list);for(var e=0;e<t.list.length;e++)1===t.list[e].status?t.list[e].statusName="Working Port":2===t.list[e].status?t.list[e].statusName="Buffer Port":3===t.list[e].status&&(t.list[e].statusName="Exception Port")}else{var o;r()(o=t.list).call(o,0,t.list.length)}t.listLoading=!1}))},addNew:function(a){var t=this;this.addOrUpdateVisible=!0,this.$nextTick((function(){t.$refs.addOrUpdate.init(a)}))},goback:function(){this.$router.go(-1)}}},B=x,O=(e("6ce1"),Object(y["a"])(B,o,i,!1,null,"c1465320",null));t["default"]=O.exports}}]);