1 line
10 KiB
JavaScript
1 line
10 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-36801624"],{"04ff":function(t,e,a){var n=a("437b"),i=a("1519"),o=Array.prototype;t.exports=function(t){var e=t.find;return t===o||n(o,t)&&e===o.find?i:e}},"09f4":function(t,e,a){"use strict";a.d(e,"a",(function(){return c}));var n=a("2b0b"),i=a.n(n);Math.easeInOutQuad=function(t,e,a,n){return t/=n/2,t<1?a/2*t*t+e:(t--,-a/2*(t*(t-2)-1)+e)};var o=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){i()(t,1e3/60)}}();function r(t){document.documentElement.scrollTop=t,document.body.parentNode.scrollTop=t,document.body.scrollTop=t}function l(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function c(t,e,a){var n=l(),i=t-n,c=20,s=0;e="undefined"===typeof e?500:e;var u=function t(){s+=c;var l=Math.easeInOutQuad(s,n,i,e);r(l),s<e?o(t):a&&"function"===typeof a&&a()};u()}},1:function(t,e){},1519:function(t,e,a){a("bdf4");var n=a("a169");t.exports=n("Array").find},2:function(t,e){},"2a13":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-container"},[a("head-form",{attrs:{"placeholder-name":t.placeholderName,"key-name":t.keyName},on:{getDataList:t.getList,add:t.addNew}}),t._v(" "),a("base-table",{attrs:{page:t.listQuery.current,limit:t.listQuery.size,"table-config":t.tableProps,"table-data":t.list,"is-loading":t.listLoading}},[a("method-btn",{attrs:{slot:"handleBtn",width:t.trueWidth,"method-list":t.tableBtn},on:{clickBtn:t.handleClick},slot:"handleBtn"})],1),t._v(" "),a("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(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()}}}),t._v(" "),t.addOrUpdateVisible?a("shelfAttr-add",{ref:"addOrUpdate",attrs:{"cache-id":t.listQuery.cacheId},on:{refreshDataList:t.getList}}):t._e()],1)},i=[],o=(a("7f7f"),a("a3e3")),r=a.n(o),l=a("4573"),c=a.n(l),s=a("fc56"),u=a.n(s),d=a("3393"),m=a.n(d),f=a("9923"),h=a("bb1e"),p=a("c0ee"),b=a("333d"),v=a("ebe9"),g=a("322f"),$=a("b7d9"),F=a("6b45"),N=[{type:"edit",btnName:"btn.edit"},{type:"delete",btnName:"btn.delete"}],y=[{prop:"shelfName",label:f["a"].t("module.basicData.cache.AreaName"),align:"center"},{prop:"code",label:f["a"].t("module.basicData.cache.AreaCode"),align:"center"},{prop:"total",label:f["a"].t("module.basicData.cache.StorageQuantity"),align:"center"},{prop:"rowNum",label:f["a"].t("module.basicData.cache.rowNum"),align:"center"},{prop:"columnNum",label:f["a"].t("module.basicData.cache.columnNum"),align:"center"},{prop:"shelf",label:f["a"].t("module.basicData.visual.location"),subcomponent:F["a"],align:"center"}],D={name:"Area",components:{Pagination:b["a"],BaseTable:p["a"],MethodBtn:v["a"],HeadForm:h["a"],shelfAttrAdd:$["a"]},filters:{statusFilter:function(t){var e={published:"success",draft:"info",deleted:"danger"};return e[t]}},data:function(){return{addOrUpdateVisible:!1,keyName:this.$t("module.basicData.cache.ShelfName"),placeholderName:this.$t("module.basicData.cache.ShelfName"),tableBtn:N,trueWidth:200,tableProps:y,list:[],areaList:[],total:0,listLoading:!0,listQuery:{current:1,size:10}}},created:function(){this.getList()},methods:{handleClick:function(t){var e,a=this;"delete"===t.type?this.$confirm(r()(e="".concat(this.$t("module.basicData.visual.TipsBefore"),"[")).call(e,t.data.shelfName,"]?"),this.$t("module.basicData.visual.Tips"),{confirmButtonText:this.$t("module.basicData.visual.confirmButtonText"),cancelButtonText:this.$t("module.basicData.visual.cancelButtonText"),type:"warning"}).then((function(){Object(g["c"])(t.data.id).then((function(t){a.$message({message:a.$t("module.basicData.visual.success"),type:"success",duration:1500,onClose:function(){a.getList()}})}))}))["catch"]((function(){})):"edit"===t.type?this.addNew(t.data.id):this.addNew(t.data.id,!0)},getList:function(t){var e=this;this.listLoading=!0,this.listQuery.shelfName=t,Object(g["e"])(this.listQuery).then((function(t){var a,n;(console.log(t),t.data.records)?(e.list=t.data.records,c()(a=e.list).call(a,(function(t){var a,n=u()(a=e.areaList).call(a,(function(e){if(e.id===t.areaId)return e}));n&&(t.areaName=n.name)}))):m()(n=e.list).call(n,0,e.list.length);e.total=t.data.total,e.listLoading=!1}))},addNew:function(t){var e=this;this.addOrUpdateVisible=!0,this.$nextTick((function(){e.$refs.addOrUpdate.init(t,!0)}))}}},w=D,k=(a("4dfd"),a("2877")),_=Object(k["a"])(w,n,i,!1,null,"534c0526",null);e["default"]=_.exports},"2b1b":function(t,e,a){var n=a("04ff");t.exports=n},"322f":function(t,e,a){"use strict";a.d(e,"e",(function(){return i})),a.d(e,"d",(function(){return o})),a.d(e,"f",(function(){return r})),a.d(e,"a",(function(){return l})),a.d(e,"b",(function(){return c})),a.d(e,"c",(function(){return s}));var n=a("b775");function i(t){return Object(n["a"])({url:"/api/wms/area/shelf",method:"post",data:t})}function o(t){return Object(n["a"])({url:"/api/wms/area/shelfById",method:"post",data:{id:t}})}function r(t){return Object(n["a"])({url:"/api/wms/area/updateshelf",method:"post",data:t})}function l(t){return Object(n["a"])({url:"/api/wms/area/addshelf",method:"post",data:t})}function c(){return Object(n["a"])({url:"/api/wms/area/getCode",method:"post"})}function s(t){return Object(n["a"])({url:"/api/wms/area/deleteshelf",method:"post",data:{id:t}})}},"4d28":function(t,e,a){},"4dfd":function(t,e,a){"use strict";a("4d28")},"6b45":function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("span",[a("el-button",{attrs:{type:"text",size:"small"},on:{click:t.emitClick}},[t._v(t._s(t.$t("module.basicData.cache.addLocation")))])],1)},i=[],o={props:{injectData:{type:Object,default:function(){return{}}}},methods:{emitClick:function(){this.$router.push({name:"locationAdd",query:{id:this.injectData.id,code:this.injectData.code,total:this.injectData.total,shelfName:this.injectData.shelfName}})}}},r=o,l=a("2877"),c=Object(l["a"])(r,n,i,!1,null,null,null);e["a"]=c.exports},b7d9:function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-dialog",{attrs:{title:t._f("i18nFilter")(t.dataForm.id?"btn.edit":"btn.add"),visible:t.visible},on:{"update:visible":function(e){t.visible=e}}},[a("el-form",{ref:"dataForm",attrs:{model:t.dataForm,rules:t.dataRule,"label-width":"130px"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.dataFormSubmit()}}},[a("el-form-item",{attrs:{label:t.$t("module.basicData.cache.ShelfName"),prop:"name"}},[a("el-input",{attrs:{placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.cache.ShelfName")]),clearable:""},model:{value:t.dataForm.shelfName,callback:function(e){t.$set(t.dataForm,"shelfName",e)},expression:"dataForm.shelfName"}})],1),t._v(" "),a("el-form-item",{attrs:{label:t.$t("module.basicData.cache.ShelfCode"),prop:"code"}},[a("el-input",{attrs:{placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.cache.ShelfCode")]),clearable:""},model:{value:t.dataForm.code,callback:function(e){t.$set(t.dataForm,"code",e)},expression:"dataForm.code"}})],1),t._v(" "),a("el-form-item",{attrs:{label:t.$t("module.basicData.cache.StorageQuantity"),prop:"total"}},[a("el-input-number",{attrs:{step:1,placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.cache.StorageQuantity")]),clearable:""},model:{value:t.dataForm.total,callback:function(e){t.$set(t.dataForm,"total",e)},expression:"dataForm.total"}})],1),t._v(" "),a("el-form-item",{attrs:{label:t.$t("module.basicData.cache.rowNum"),prop:"rowNum"}},[a("el-input-number",{attrs:{step:1,placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.cache.rowNum")]),clearable:""},model:{value:t.dataForm.rowNum,callback:function(e){t.$set(t.dataForm,"rowNum",e)},expression:"dataForm.rowNum"}})],1),t._v(" "),a("el-form-item",{attrs:{label:t.$t("module.basicData.cache.columnNum"),prop:"columnNum"}},[a("el-input-number",{attrs:{step:1,placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.cache.columnNum")]),clearable:""},model:{value:t.dataForm.columnNum,callback:function(e){t.$set(t.dataForm,"columnNum",e)},expression:"dataForm.columnNum"}})],1)],1),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.visible=!1}}},[t._v(t._s(t._f("i18nFilter")("btn.cancel")))]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.dataFormSubmit()}}},[t._v(t._s(t._f("i18nFilter")("btn.confirm")))])],1)],1)},i=[],o=a("322f"),r={props:{areaId:{type:String,default:function(){return""}}},data:function(){return{visible:!1,isPage:!1,dataForm:{abbr:"n",id:0,areaId:"",shelfName:"",code:"",shelfNumber:"",total:""},areaArr:[],dataRule:{shelfName:[{required:!0,message:this.$i18nForm(["placeholder.input",this.$t("module.basicData.cache.ShelfName")]),trigger:"blur"}],code:[{required:!0,message:this.$i18nForm(["placeholder.input",this.$t("module.basicData.cache.ShelfCode")]),trigger:"blur"}],areaId:[{required:!0,message:this.$i18nForm(["placeholder.input",this.$t("module.basicData.cache.AreaName")]),trigger:"change"}]}}},methods:{init:function(t){var e=this;this.dataForm.id=t||"",this.visible=!0,this.$nextTick((function(){e.$refs["dataForm"].resetFields(),e.dataForm.id?Object(o["d"])(e.dataForm.id).then((function(t){e.dataForm=t.data})):(e.dataForm.shelfName="",Object(o["b"])().then((function(t){e.dataForm.code=t.data})))}))},dataFormSubmit:function(){var t=this;this.$refs["dataForm"].validate((function(e){if(e){var a=t.dataForm;t.dataForm.id?Object(o["f"])(a).then((function(e){t.$message({message:t.$t("module.basicData.visual.success"),type:"success",duration:1500,onClose:function(){t.visible=!1,t.$emit("refreshDataList")}})})):Object(o["a"])(a).then((function(e){t.$message({message:t.$t("module.basicData.visual.success"),type:"success",duration:1500,onClose:function(){t.visible=!1,t.$emit("refreshDataList")}})}))}}))}}},l=r,c=a("2877"),s=Object(c["a"])(l,n,i,!1,null,null,null);e["a"]=s.exports},bdf4:function(t,e,a){"use strict";var n=a("a5eb"),i=a("dee0").find,o=a("c44e"),r="find",l=!0;r in[]&&Array(1)[r]((function(){l=!1})),n({target:"Array",proto:!0,forced:l},{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o(r)},fc56:function(t,e,a){t.exports=a("2b1b")}}]); |