(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0ebaadc4"],{"03ef":function(t,e,a){},3105:function(t,e,a){"use strict";a("03ef")},"322f":function(t,e,a){"use strict";a.d(e,"e",(function(){return i})),a.d(e,"d",(function(){return r})),a.d(e,"f",(function(){return o})),a.d(e,"a",(function(){return s})),a.d(e,"b",(function(){return n})),a.d(e,"c",(function(){return c}));var l=a("b775");function i(t){return Object(l["a"])({url:"/api/wms/area/shelf",method:"post",data:t})}function r(t){return Object(l["a"])({url:"/api/wms/area/shelfById",method:"post",data:{id:t}})}function o(t){return Object(l["a"])({url:"/api/wms/area/updateshelf",method:"post",data:t})}function s(t){return Object(l["a"])({url:"/api/wms/area/addshelf",method:"post",data:t})}function n(){return Object(l["a"])({url:"/api/wms/area/getCode",method:"post"})}function c(t){return Object(l["a"])({url:"/api/wms/area/deleteshelf",method:"post",data:{id:t}})}},"6b45":function(t,e,a){"use strict";var l=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=[],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,s=a("2877"),n=Object(s["a"])(o,l,i,!1,null,null,null);e["a"]=n.exports},"93eb":function(t,e,a){"use strict";a.d(e,"e",(function(){return i})),a.d(e,"d",(function(){return r})),a.d(e,"f",(function(){return o})),a.d(e,"a",(function(){return s})),a.d(e,"b",(function(){return n})),a.d(e,"c",(function(){return c}));var l=a("b775");function i(t){return Object(l["a"])({url:"/api/wms/area/page",method:"post",data:t})}function r(t){return Object(l["a"])({url:"/api/wms/area/getById",method:"post",data:{id:t}})}function o(t){return Object(l["a"])({url:"/api/wms/area/update",method:"post",data:t})}function s(t){return Object(l["a"])({url:"/api/wms/area/add",method:"post",data:t})}function n(){return Object(l["a"])({url:"/api/wms/area/getCode",method:"post"})}function c(t){return Object(l["a"])({url:"/api/wms/area/delete",method:"post",data:{id:t}})}},b7d9:function(t,e,a){"use strict";var l=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=[],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")}})}))}}))}}},s=o,n=a("2877"),c=Object(n["a"])(s,l,i,!1,null,null,null);e["a"]=c.exports},f6cf:function(t,e,a){"use strict";a.r(e);var l=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticStyle:{margin:"20px"}},[a("el-row",{attrs:{gutter:15}},[a("el-form",{ref:"dataForm",attrs:{model:t.dataForm,rules:t.rules,size:"medium","label-width":"140px"}},[a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:t.$t("module.basicData.cache.CacheName"),prop:"tareaName"}},[a("el-input",{style:{width:"100%"},attrs:{disabled:t.isdetail,placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.cache.CacheName")]),clearable:""},model:{value:t.dataForm.tareaName,callback:function(e){t.$set(t.dataForm,"tareaName",e)},expression:"dataForm.tareaName"}})],1)],1),t._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:t.$t("module.basicData.cache.CacheCode"),prop:"code"}},[a("el-input",{style:{width:"100%"},attrs:{disabled:t.isdetail,label:t.$t("module.basicData.cache.CacheCode"),clearable:""},model:{value:t.dataForm.code,callback:function(e){t.$set(t.dataForm,"code",e)},expression:"dataForm.code"}})],1)],1),t._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:t.$t("module.basicData.visual.EnglishName"),prop:"enName"}},[a("el-input",{style:{width:"100%"},attrs:{disabled:t.isdetail,placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.visual.EnglishName")]),clearable:""},model:{value:t.dataForm.enName,callback:function(e){t.$set(t.dataForm,"enName",e)},expression:"dataForm.enName"}})],1)],1),t._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:t.$t("module.basicData.visual.Abbreviation"),prop:"abbr"}},[a("el-input",{style:{width:"100%"},attrs:{disabled:t.isdetail,placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.visual.Abbreviation")]),clearable:""},model:{value:t.dataForm.abbr,callback:function(e){t.$set(t.dataForm,"abbr",e)},expression:"dataForm.abbr"}})],1)],1),t._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:t.$t("module.basicData.visual.Specs"),prop:"spec"}},[a("el-input",{style:{width:"100%"},attrs:{disabled:t.isdetail,placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.visual.Specs")]),clearable:""},model:{value:t.dataForm.spec,callback:function(e){t.$set(t.dataForm,"spec",e)},expression:"dataForm.spec"}})],1)],1),t._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:t.$t("module.basicData.visual.CurrentState"),prop:"status"}},[a("el-select",{style:{width:"100%"},attrs:{disabled:t.isdetail,placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.visual.CurrentState")]),clearable:""},model:{value:t.dataForm.status,callback:function(e){t.$set(t.dataForm,"status",e)},expression:"dataForm.status"}},t._l(t.currentStatusOptions,(function(t,e){return a("el-option",{key:e,attrs:{label:t.label,value:t.value,disabled:t.disabled}})})),1)],1)],1),t._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:t.$t("module.basicData.cache.StockNumber"),prop:"locationNum"}},[a("el-input-number",{attrs:{disabled:t.isdetail,placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.cache.StockNumber")]),step:1},model:{value:t.dataForm.locationNum,callback:function(e){t.$set(t.dataForm,"locationNum",e)},expression:"dataForm.locationNum"}})],1)],1),t._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:t.$t("module.basicData.cache.AreaNumber"),prop:"shelfNum"}},[a("el-input-number",{attrs:{disabled:t.isdetail,placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.cache.AreaNumber")]),step:1},model:{value:t.dataForm.shelfNum,callback:function(e){t.$set(t.dataForm,"shelfNum",e)},expression:"dataForm.shelfNum"}})],1)],1),t._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:t.$t("module.basicData.visual.Remarks"),prop:"note"}},[a("el-input",{style:{width:"100%"},attrs:{disabled:t.isdetail,placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.visual.Remarks")]),clearable:""},model:{value:t.dataForm.note,callback:function(e){t.$set(t.dataForm,"note",e)},expression:"dataForm.note"}})],1)],1)],1)],1),t._v(" "),a("div",{staticStyle:{margin:"20px"}},[a("el-button",{attrs:{type:"success"},on:{click:function(e){return t.goback()}}},[t._v(t._s(t._f("i18nFilter")("btn.back")))]),t._v(" "),t.isdetail?t._e():a("span",[a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.dataFormSubmit()}}},[t._v(t._s(t._f("i18nFilter")("btn.save")))]),t._v(" "),t.listQuery.id?a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.addNew()}}},[t._v(t._s(t.$t("module.basicData.cache.addCacheArea")))]):t._e()],1)],1),t._v(" "),a("div",{staticStyle:{height:"380px",overflow:"auto"}},[a("base-table",{attrs:{page:t.listQuery.current,limit:t.listQuery.size,"table-config":t.tableProps,"table-data":t.list}},[t.isdetail?t._e():a("method-btn",{attrs:{slot:"handleBtn","method-list":t.tableBtn},on:{clickBtn:t.handleClick},slot:"handleBtn"})],1)],1),t._v(" "),t.addOrUpdateVisible?a("shelfAttr-add",{ref:"addOrUpdate",attrs:{"cache-id":t.listQuery.id},on:{refreshDataList:t.getList}}):t._e()],1)},i=[],r=(a("7f7f"),a("3393")),o=a.n(r),s=a("a3e3"),n=a.n(s),c=a("9923"),d=a("93eb"),u=a("322f"),m=a("c0ee"),b=a("ebe9"),p=a("b7d9"),h=a("6b45"),f=[{type:"edit",btnName:"btn.edit"},{type:"delete",btnName:"btn.delete"}],F=[{prop:"shelfName",label:c["a"].t("module.basicData.cache.AreaName"),align:"center"},{prop:"code",label:c["a"].t("module.basicData.cache.AreaCode"),align:"center"},{prop:"total",label:c["a"].t("module.basicData.cache.StorageQuantity"),align:"center"},{prop:"rowNum",label:c["a"].t("module.basicData.cache.rowNum"),align:"center"},{prop:"columnNum",label:c["a"].t("module.basicData.cache.columnNum"),align:"center"},{prop:"shelf",label:c["a"].t("module.basicData.cache.Location"),subcomponent:h["a"],align:"center"}],v={components:{BaseTable:m["a"],MethodBtn:b["a"],shelfAttrAdd:p["a"]},data:function(){return{addOrUpdateVisible:!1,tableBtn:f,trueWidth:200,tableProps:F,list:[],dataForm:{tareaName:"",code:"",enName:"",abbr:"",spec:"",status:"",locationNum:"",shelfNum:"",note:""},listQuery:{current:1,size:990,id:""},rules:{tareaName:[{required:!0,message:this.$i18nForm(["placeholder.input",this.$t("module.basicData.cache.CacheName")]),trigger:"blur"}],code:[{required:!0,message:this.$i18nForm(["placeholder.input",this.$t("module.basicData.cache.CacheCode")]),trigger:"blur"}]},currentStatusOptions:[{label:"正常",value:0},{label:"暂停",value:1},{label:"维修",value:2}],id:"",isdetail:!1}},created:function(){this.id=this.$route.query.id,this.init()},methods:{init:function(){var t,e=this;this.isdetail=!1,this.isdetail=Boolean(this.$route.query.isdetail),this.listQuery.id="",o()(t=this.list).call(t,0,this.list.length),this.$nextTick((function(){e.$refs["dataForm"].resetFields(),e.id?(Object(d["d"])(e.id).then((function(t){e.dataForm=t.data})),e.listQuery.id=e.id,console.log(e.listQuery.id),Object(u["e"])(e.listQuery).then((function(t){var a;(console.log(t),t.data.records)?e.list=t.data.records:o()(a=e.list).call(a,0,e.list.length)}))):Object(d["b"])().then((function(t){e.dataForm.code=t.data}))}))},getList:function(){var t=this;Object(u["e"])(this.listQuery).then((function(e){e.data.records&&(t.list=e.data.records)}))},handleClick:function(t){var e,a=this;"delete"===t.type?this.$confirm(n()(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(u["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)},dataFormSubmit:function(){var t=this;this.$refs["dataForm"].validate((function(e){if(e){var a={abbr:t.dataForm.abbr,code:t.dataForm.code,status:t.dataForm.status,enName:t.dataForm.enName,tareaName:t.dataForm.tareaName,note:t.dataForm.note,spec:t.dataForm.spec,locationNum:t.dataForm.locationNum,shelfNum:t.dataForm.shelfNum,id:t.id};t.id?Object(d["f"])(a).then((function(e){t.$message({message:t.$t("module.basicData.visual.success"),type:"success",duration:1500})})):Object(d["a"])(a).then((function(e){t.$message({message:t.$t("module.basicData.visual.success"),type:"success",duration:1500}),t.listQuery.id=e.data.id}))}}))},addNew:function(t){var e=this;this.addOrUpdateVisible=!0,this.$nextTick((function(){e.$refs.addOrUpdate.init(t)}))},goback:function(){this.$router.go(-1)}}},$=v,N=(a("3105"),a("2877")),g=Object(N["a"])($,l,i,!1,null,"66806479",null);e["default"]=g.exports}}]);