1 line
6.5 KiB
JavaScript
1 line
6.5 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4eb0b0b6","chunk-31c1800a"],{"3d7b":function(t,e,a){"use strict";a("99af"),a("4160"),a("159b");e["a"]={data:function(){return{urlOptions:{submitURL:"",infoURL:"",getOption:!1,optionArrUrl:[],optionArr:{}},visible:!1,setData:!1,isGetCode:!1}},created:function(){},activated:function(){},methods:{init:function(t){var e=this;this.dataForm.id=t||"",this.visible=!0,this.urlOptions.getOption&&this.getArr(),this.$nextTick((function(){e.$refs["dataForm"].resetFields(),e.dataForm.id?e.$http.get("".concat(e.urlOptions.infoURL,"/").concat(e.dataForm.id)).then((function(t){var a=t.data;if(0!==a.code)return e.$message.error(a.msg);e.dataForm=a.data,e.setData&&e.setDataForm()})).catch((function(){})):e.isGetCode&&e.getCode()}))},getArr:function(){var t=this;this.urlOptions.optionArrUrl.forEach((function(e,a){t.$http.get(e,{params:{page:1,limit:500}}).then((function(e){var r=e.data;if(0!==r.code)return t.$message.error(r.msg);t.$set(t.urlOptions.optionArr,"arr".concat(a),r.data.list)})).catch((function(){}))}))},dataFormSubmit:function(){var t=this;this.$refs["dataForm"].validate((function(e){if(!e)return!1;t.$http[t.dataForm.id?"put":"post"](t.urlOptions.submitURL,t.dataForm).then((function(e){var a=e.data;if(0!==a.code)return t.$message.error(a.msg);t.$message({message:t.$t("prompt.success"),type:"success",duration:500,onClose:function(){t.visible=!1,t.$emit("successSubmit")}})})).catch((function(){}))}))},formClear:function(){this.$refs.dataForm.resetFields()}}}},"4b71":function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-card",{staticClass:"aui-card--fill",attrs:{shadow:"never"}},[a("div",{staticClass:"mod-sys__user"},[a("search-bar",{ref:"searchBarForm",attrs:{formConfigs:t.formConfig},on:{headBtnClick:t.buttonClick}}),a("base-table",{attrs:{"table-props":t.tableProps,page:t.listQuery.page,limit:t.listQuery.limit,"table-data":t.tableData}},[t.tableBtn.length?a("method-btn",{attrs:{slot:"handleBtn",width:80,label:"操作","method-list":t.tableBtn},on:{clickBtn:t.handleClick},slot:"handleBtn"}):t._e()],1),a("pagination",{attrs:{limit:t.listQuery.limit,page:t.listQuery.page,total:t.listQuery.total},on:{"update:limit":function(e){return t.$set(t.listQuery,"limit",e)},"update:page":function(e){return t.$set(t.listQuery,"page",e)},pagination:t.getDataList}}),a("base-dialog",{attrs:{dialogTitle:t.addOrEditTitle,dialogVisible:t.addOrUpdateVisible,"before-close":t.handleCancel},on:{cancel:t.handleCancel,confirm:t.handleConfirm}},[a("add-or-update",{ref:"addOrUpdate",on:{successSubmit:t.successSubmit}})],1)],1)])},o=[],i=a("ede0"),s=a("ed26"),n=(a("f44d"),[{prop:"createTime",label:"添加时间"},{prop:"whName",label:"仓库名称"},{prop:"whCode",label:"仓库编码"},{prop:"address",label:"地址"},{prop:"remark",label:"备注"}]),l=[{type:"edit",btnName:"编辑"},{type:"delete",btnName:"删除"}],d={mixins:[s["a"]],data:function(){return{urlOptions:{getDataListURL:"/code/mtWarehouse/page",deleteURL:"/code/mtWarehouse",statusUrl:"/code/mtWarehouse/status",exportUrl:"/code/mtWarehouse/export"},tableProps:n,tableBtn:l,tableData:[],formConfig:[{type:"input",label:"名称",placeholder:"请输入名称",param:"whName"},{type:"button",btnName:"查询",name:"search",color:"primary"},{type:"button",btnName:"新增",name:"add",color:"primary",plain:!0},{type:"button",btnName:"导出",name:"export",color:"primary",plain:!0}]}},components:{AddOrUpdate:i["default"]},methods:{buttonClick:function(t){switch(t.btnName){case"search":this.listQuery.whName=t.whName,this.listQuery.page=1,this.getDataList();break;case"add":this.addOrEditTitle="新增",this.addOrUpdateVisible=!0,this.addOrUpdateHandle();break;case"export":this.exportHandle("仓库管理");break;default:console.log(t)}}}},c=d,u=a("2877"),m=Object(u["a"])(c,r,o,!1,null,null,null);e["default"]=m.exports},ede0:function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-form",{ref:"dataForm",attrs:{model:t.dataForm,rules:t.dataRule,"label-width":"100px"},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:"仓库名称",prop:"whName"}},[a("el-input",{attrs:{clearable:"",placeholder:"仓库名称"},model:{value:t.dataForm.whName,callback:function(e){t.$set(t.dataForm,"whName",e)},expression:"dataForm.whName"}})],1),a("el-form-item",{attrs:{label:"仓库编码",prop:"whCode"}},[a("el-input",{attrs:{clearable:"",placeholder:"仓库编码"},model:{value:t.dataForm.whCode,callback:function(e){t.$set(t.dataForm,"whCode",e)},expression:"dataForm.whCode"}})],1),a("el-form-item",{attrs:{label:"地址",prop:"address"}},[a("el-input",{attrs:{clearable:"",placeholder:"地址"},model:{value:t.dataForm.address,callback:function(e){t.$set(t.dataForm,"address",e)},expression:"dataForm.address"}})],1),a("el-form-item",{attrs:{label:"备注",prop:"remark"}},[a("el-input",{attrs:{clearable:"",placeholder:"备注"},model:{value:t.dataForm.remark,callback:function(e){t.$set(t.dataForm,"remark",e)},expression:"dataForm.remark"}})],1)],1)},o=[],i=a("3d7b"),s={mixins:[i["a"]],data:function(){return{urlOptions:{submitURL:"/code/mtWarehouse/",infoURL:"/code/mtWarehouse"},isGetCode:!0,dataForm:{id:"",whName:"",address:"",whCode:"",remark:""},dataRule:{whName:[{required:!0,message:"仓库名称不能为空",trigger:"blur"}]}}},methods:{getCode:function(){var t=this;this.$http.get("/code/mtWarehouse/getCode").then((function(e){var a=e.data;t.dataForm.whCode=a})).catch((function(){}))}}},n=s,l=a("2877"),d=Object(l["a"])(n,r,o,!1,null,null,null);e["default"]=d.exports},f44d:function(t,e,a){"use strict";a("12cb");var r={sex:{0:"男",1:"女"},logStatus:{0:"写入设备",1:"接受设备信息"},logType:{0:"wcs-to-wms",1:"wms-to-wcs"},isEmpty:{0:"空",1:"有货"},positionStatus:{"-1":"不可用",0:"空库位",1:"空货架",2:"货物正常",3:"货物预入库",4:"货物预出库"},isHeight:{0:"不超高",1:"超高"},isWeight:{0:"不超重",1:"超重"},detStatus:{0:"接收数据",1:"数据接收中",2:"数据接收完成",4:"等待接收数据"},taskType:{0:"出库",1:"入库",2:"移库"},productType:{1:"成品",2:"半成品",3:"原材料"},eStatus:{0:"初始化",1:"损坏",2:"工作中"},regionType:{0:"普通库位",1:"高库位",2:"扩展库位"},direction:{L:"左",R:"右"},isOccupy:{0:"可用",1:"被占用"}};e["a"]=function(t){return function(e){var a;return null===r||void 0===r||null===(a=r[t])||void 0===a?void 0:a[e]}}}}]); |