1 line
12 KiB
JavaScript
1 line
12 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-25362e2c","chunk-dd3803bc"],{"2ab6":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("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:"productName"}},[a("el-input",{attrs:{clearable:"",placeholder:"产品名称"},model:{value:t.dataForm.productName,callback:function(e){t.$set(t.dataForm,"productName",e)},expression:"dataForm.productName"}})],1),a("el-form-item",{attrs:{label:"批次号",prop:"dateNum"}},[a("el-input",{attrs:{clearable:"",placeholder:"批次号"},model:{value:t.dataForm.dateNum,callback:function(e){t.$set(t.dataForm,"dateNum",e)},expression:"dataForm.dateNum"}})],1),a("el-form-item",{attrs:{label:"货物数量",prop:"quantity"}},[a("el-input",{attrs:{clearable:"",placeholder:"货物数量"},model:{value:t.dataForm.quantity,callback:function(e){t.$set(t.dataForm,"quantity",e)},expression:"dataForm.quantity"}})],1),a("el-form-item",{attrs:{label:"是否为空",prop:"isEmpty"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择是否为空"},model:{value:t.dataForm.isEmpty,callback:function(e){t.$set(t.dataForm,"isEmpty",e)},expression:"dataForm.isEmpty"}},t._l(t.options,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),a("el-form-item",{attrs:{label:"库位状态",prop:"status"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择库位状态"},model:{value:t.dataForm.status,callback:function(e){t.$set(t.dataForm,"status",e)},expression:"dataForm.status"}},t._l(t.options1,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),a("el-form-item",{attrs:{label:"详细规格",prop:"specModel"}},[a("el-input",{attrs:{clearable:"",placeholder:"详细规格"},model:{value:t.dataForm.specModel,callback:function(e){t.$set(t.dataForm,"specModel",e)},expression:"dataForm.specModel"}})],1),a("el-form-item",{attrs:{label:"库位名称",prop:"warehousePositionName"}},[a("el-input",{attrs:{clearable:"",placeholder:"库位名称"},model:{value:t.dataForm.warehousePositionName,callback:function(e){t.$set(t.dataForm,"warehousePositionName",e)},expression:"dataForm.warehousePositionName"}})],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=[],r=a("3d7b"),s={mixins:[r["a"]],data:function(){return{urlOptions:{submitURL:"/code/mtWarehousePositionRelat/",infoURL:"/code/mtWarehousePositionRelat"},isGetCode:!0,dataForm:{id:"",productName:"",quantity:"",dateNum:"",specModel:"",isEmpty:"",status:"",warehousePositionName:"",remark:""},options:[{value:0,label:"空"},{value:1,label:"有货"}],options1:[{value:-1,label:"不可用"},{value:0,label:"空库位"},{value:1,label:"空货架"},{value:2,label:"货物正常"},{value:3,label:"货物预入库"},{value:4,label:"货物预出库"}],dataRule:{productName:[{required:!0,message:"产品名称不能为空",trigger:"blur"}]}}},methods:{getCode:function(){var t=this;this.$http.get("/code/mtWarehousePositionRelat/getCode").then((function(e){var a=e.data;t.dataForm.whCode=a})).catch((function(){}))}}},l=s,n=a("2877"),d=Object(n["a"])(l,i,o,!1,null,null,null);e["default"]=d.exports},"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 i=e.data;if(0!==i.code)return t.$message.error(i.msg);t.$set(t.urlOptions.optionArr,"arr".concat(a),i.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()}}}},a357: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("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=[],r=a("2ab6"),s=a("ed26"),l=a("f44d"),n=[{prop:"createTime",label:"添加时间"},{prop:"dateNum",label:"批次号"},{prop:"isEmpty",label:"是否为空",filter:Object(l["a"])("isEmpty")},{prop:"productName",label:"产品名称"},{prop:"productCode",label:"产品编码"},{prop:"quantity",label:"货物数量"},{prop:"specModel",label:"详细规格"},{prop:"warehousePositionName",label:"库位名称"},{prop:"status",label:"库位状态",filter:Object(l["a"])("positionStatus")},{prop:"remark",label:"描述"}],d=[{type:"edit",btnName:"编辑"},{type:"delete",btnName:"删除"}],u={mixins:[s["a"]],data:function(){return{urlOptions:{getDataListURL:"/code/mtWarehousePositionRelat/page",deleteURL:"/code/mtWarehousePositionRelat",statusUrl:"/code/mtWarehousePositionRelat/status",exportUrl:"/code/mtWarehousePositionRelat/export"},tableProps:n,tableBtn:d,tableData:[],formConfig:[{type:"input",label:"产品名称",placeholder:"请输入产品名称",param:"productName"},{type:"input",label:"产品编码",placeholder:"请输入产品编码",param:"productCode"},{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:r["default"]},methods:{buttonClick:function(t){switch(t.btnName){case"search":this.listQuery.productName=t.productName,this.listQuery.productCode=t.productCode,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=u,p=a("2877"),m=Object(p["a"])(c,i,o,!1,null,null,null);e["default"]=m.exports},ed26:function(t,e,a){"use strict";a("d3b7"),a("3ca3"),a("ddb0"),a("2b3d");e["a"]={data:function(){return{urlOptions:{getDataListURL:"",deleteURL:"",statusUrl:"",exportUrl:""},addOrEditTitle:"",tableData:[],listQuery:{limit:10,page:1,total:1},addDeleteURL:!1,dataListLoading:!1,addOrUpdateVisible:!1}},created:function(){},activated:function(){this.getDataList()},methods:{getDataList:function(){var t=this;this.dataListLoading=!0,this.$http.get(this.urlOptions.getDataListURL,{params:this.listQuery}).then((function(e){var a=e.data;if(t.dataListLoading=!1,0!==a.code)return t.tableData=[],t.listQuery.total=0,t.$message.error(a.msg);t.tableData=a.data.list,t.listQuery.total=a.data.total})).catch((function(){t.dataListLoading=!1}))},sizeChangeHandle:function(t){this.listQuery.limit=t,this.listQuery.page=1,this.getDataList()},currentChangeHandle:function(t){this.listQuery.page=t,this.getDataList()},addOrUpdateHandle:function(t){var e=this;this.addOrUpdateVisible=!0,this.$nextTick((function(){e.$refs.addOrUpdate.init(t)}))},cancel:function(t){this.$refs["popover-"+t].showPopper=!1},changeStatus:function(t){var e=this;this.$http.post(this.urlOptions.statusUrl,{id:t}).then((function(a){var i=a.data;if(0!==i.code)return e.$message.error(i.msg);e.$refs["popover-"+t].showPopper=!1,e.$message({message:e.$t("prompt.success"),type:"success",duration:500,onClose:function(){e.getDataList()}})})).catch((function(){}))},handleClick:function(t){var e=this;"edit"===t.type?(this.addOrUpdateVisible=!0,this.addOrEditTitle="编辑",this.$nextTick((function(){e.$refs.addOrUpdate.init(t.data.id)}))):"delete"===t.type?this.deleteHandle(t.data.id,t.data._pageIndex):this.btnFun(t)},deleteHandle:function(t,e){var a=this;this.$confirm("确定对[序号=".concat(e,"]进行删除操作?"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){a.$http.delete(a.urlOptions.deleteURL+(a.addDeleteURL?"/"+t:""),{data:[t]}).then((function(t){var e=t.data;e&&0===e.code?a.$message({message:"操作成功",type:"success",duration:1500,onClose:function(){a.getDataList()}}):a.$message.error(e.msg)}))})).catch((function(){}))},buttonClick:function(t){switch(t.btnName){case"search":this.listQuery.xm1=t.xm1,this.listQuery.xm2=t.xm2,this.listQuery.page=1,this.getDataList();break;case"add":this.addOrEditTitle="新增",this.addOrUpdateVisible=!0,this.addOrUpdateHandle();break;default:console.log(t)}},handleCancel:function(){this.$refs.addOrUpdate.formClear(),this.addOrUpdateVisible=!1,this.addOrEditTitle=""},handleConfirm:function(){this.$refs.addOrUpdate.dataFormSubmit()},successSubmit:function(){this.handleCancel(),this.getDataList()},exportHandle:function(t){this.$http.get(this.urlOptions.exportUrl,{responseType:"blob"}).then((function(e){var a=e.data,i=new Date,o=i.getFullYear(),r=i.getMonth()+1,s=i.getDate();r>=1&&r<=9&&(r="0"+r),s>=0&&s<=9&&(s="0"+s);var l=o+"-"+r+"-"+s,n=new Blob([a]),d=document.createElement("a"),u=window.URL.createObjectURL(n);d.href=u,d.download="".concat(t+l,".xls"),document.body.appendChild(d),d.click(),document.body.removeChild(d),window.URL.revokeObjectURL(u)})).catch((function(){}))}}}},f44d:function(t,e,a){"use strict";a("12cb");var i={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===i||void 0===i||null===(a=i[t])||void 0===a?void 0:a[e]}}}}]); |