1 line
8.5 KiB
JavaScript
1 line
8.5 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-58cd45f6"],{"0bdc":function(t,e,a){"use strict";a("be98")},"11b7":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-container"},[a("div",{staticStyle:{margin:"10px 50px"}},[a("el-button",{attrs:{type:"success"},on:{click:function(e){return t.goback()}}},[t._v(t._s(t._f("i18nFilter")("btn.back")))]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.addNew()}}},[t._v(t._s(t._f("i18nFilter")("btn.add")))])],1),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(" "),t.addOrUpdateVisible?a("shelfAttr-add",{ref:"addOrUpdate",on:{refreshDataList:t.getList}}):t._e()],1)},n=[],r=(a("7f7f"),a("a3e3")),o=a.n(r),l=a("3393"),s=a.n(l),c=a("9923"),d=a("322f"),u=a("b7d9"),m=a("6b45"),f=a("c0ee"),b=a("ebe9"),h=a("8975"),p=[{type:"edit",btnName:"btn.edit"},{type:"delete",btnName:"btn.delete"}],v=[{prop:"createTime",label:c["a"].t("module.basicData.factory.createTime"),filter:h["timeFormatter"],align:"center"},{prop:"code",label:c["a"].t("module.basicData.cache.ShelfCode"),align:"center"},{prop:"shelfName",label:c["a"].t("module.basicData.cache.ShelfName"),align:"center"},{prop:"shelfNumber",label:c["a"].t("module.basicData.cache.StorageQuantity"),align:"center"},{prop:"location",label:c["a"].t("module.basicData.cache.Location"),subcomponent:m["a"],align:"center"}],$={name:"Shelf",components:{BaseTable:f["a"],MethodBtn:b["a"],shelfAttrAdd:u["a"]},filters:{statusFilter:function(t){var e={published:"success",draft:"info",deleted:"danger"};return e[t]}},data:function(){return{addOrUpdateVisible:!1,tableBtn:p,trueWidth:200,tableProps:v,list:[],listLoading:!0,listQuery:{current:1,size:990,areaId:""}}},created:function(){this.listQuery.areaId=this.$route.query.id,this.getList()},methods:{handleClick:function(t){var e,a=this;"delete"===t.type?this.$confirm(o()(e="".concat(this.$t("module.basicData.visual.TipsBefore"),"[")).call(e,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(){Object(d["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(){})):this.addNew(t.data.id)},getList:function(t){var e=this;this.listLoading=!0,this.listQuery.name=t,Object(d["e"])(this.listQuery).then((function(t){var a;t.data.records?e.list=t.data.records:s()(a=e.list).call(a,0,e.list.length);e.listLoading=!1}))},addNew:function(t){var e=this;this.addOrUpdateVisible=!0,this.$nextTick((function(){e.$refs.addOrUpdate.init(t,!0)}))},goback:function(){this.$router.go(-1)}}},F=$,g=(a("0bdc"),a("2877")),y=Object(g["a"])(F,i,n,!1,null,"a1be8dee",null);e["default"]=y.exports},"322f":function(t,e,a){"use strict";a.d(e,"e",(function(){return n})),a.d(e,"d",(function(){return r})),a.d(e,"f",(function(){return o})),a.d(e,"a",(function(){return l})),a.d(e,"b",(function(){return s})),a.d(e,"c",(function(){return c}));var i=a("b775");function n(t){return Object(i["a"])({url:"/api/wms/area/shelf",method:"post",data:t})}function r(t){return Object(i["a"])({url:"/api/wms/area/shelfById",method:"post",data:{id:t}})}function o(t){return Object(i["a"])({url:"/api/wms/area/updateshelf",method:"post",data:t})}function l(t){return Object(i["a"])({url:"/api/wms/area/addshelf",method:"post",data:t})}function s(){return Object(i["a"])({url:"/api/wms/area/getCode",method:"post"})}function c(t){return Object(i["a"])({url:"/api/wms/area/deleteshelf",method:"post",data:{id:t}})}},"6b45":function(t,e,a){"use strict";var i=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)},n=[],r={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}})}}},o=r,l=a("2877"),s=Object(l["a"])(o,i,n,!1,null,null,null);e["a"]=s.exports},b7d9:function(t,e,a){"use strict";var i=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)},n=[],r=a("322f"),o={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(r["d"])(e.dataForm.id).then((function(t){e.dataForm=t.data})):(e.dataForm.shelfName="",Object(r["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(r["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(r["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=o,s=a("2877"),c=Object(s["a"])(l,i,n,!1,null,null,null);e["a"]=c.exports},be98:function(t,e,a){}}]); |