2 lines
20 KiB
JavaScript
2 lines
20 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-798d8472"],{"3c46":function(t,e,a){"use strict";a("c360")},"85a3":function(t,e,a){"use strict";a.d(e,"c",(function(){return r})),a.d(e,"f",(function(){return s})),a.d(e,"a",(function(){return l}));var o=a("b775");function r(t){return new Promise((e,a)=>{Object(o["a"])({url:"/assetInventory/queryAssetInventory",method:"get",params:t}).then(t=>{const a=t.data;e(a)}).catch(t=>{a(t)})})}function s(t){return new Promise((e,a)=>{Object(o["a"])({url:"/shopHouse.queryShopHouse",method:"get",params:t}).then(t=>{const a=t.data;e(a)}).catch(t=>{a(t)})})}function l(t){return new Promise((e,a)=>{Object(o["a"])({url:"/assetInventory/deleteAssetInventory",method:"post",data:t}).then(t=>{const a=t.data;e(a)}).catch(t=>{a(t)})})}},"90a0":function(t,e,a){"use strict";var o=function(){var t=this,e=t._self._c;return e("el-dialog",{attrs:{title:"请确认您的操作!",visible:t.dialogVisible,width:"30%","before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisible=e}}},[e("div",{attrs:{align:"center"}},[e("p",[t._v("确定删除资产盘点")])]),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:t.closeDeleteAssetInventoryModel}},[t._v("点错了")]),e("el-button",{attrs:{type:"primary"},on:{click:t.deleteAssetInventory}},[t._v("确认删除")])],1)])},r=[],s=a("85a3"),l=a("7323"),n={name:"DeleteAssetInventory",data(){return{dialogVisible:!1,deleteAssetInventoryInfo:{}}},methods:{open(t){this.deleteAssetInventoryInfo=t,this.dialogVisible=!0},handleClose(t){this.dialogVisible=!1},closeDeleteAssetInventoryModel(){this.dialogVisible=!1},async deleteAssetInventory(){this.deleteAssetInventoryInfo.shopId=Object(l["f"])();try{const t=await Object(s["a"])(this.deleteAssetInventoryInfo);0===t.code?(this.$emit("refresh"),this.$message.success("删除成功"),this.dialogVisible=!1):this.$message.error(t.msg)}catch(t){console.error("请求失败处理",t),this.$message.error("删除失败")}}}},i=n,c=a("2877"),d=Object(c["a"])(i,o,r,!1,null,null,null);e["a"]=d.exports},a309:function(t,e,a){"use strict";a.r(e);var o=function(){var t=this,e=t._self._c;return e("div",[e("el-card",{staticClass:"ibox"},[e("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[e("div",[t._v(t._s(t.$t("allocationOrder.queryCondition")))]),e("div",{staticClass:"ibox-tools",staticStyle:{top:"10px"}})]),e("div",{},[e("el-form",{staticClass:"flex justify-start",attrs:{inline:!0,model:t.allocationOrderManageInfo.conditions}},[e("el-form-item",[e("el-form-item",[e("el-input",{attrs:{placeholder:t.$t("allocationOrder.inputOrderId"),clearable:""},model:{value:t.allocationOrderManageInfo.conditions.orderId,callback:function(e){t.$set(t.allocationOrderManageInfo.conditions,"orderId",e)},expression:"allocationOrderManageInfo.conditions.orderId"}})],1)],1),e("el-form-item",[e("el-form-item",[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("allocationOrder.selectSrcWarehouse"),clearable:""},model:{value:t.allocationOrderManageInfo.conditions.srcShId,callback:function(e){t.$set(t.allocationOrderManageInfo.conditions,"srcShId",e)},expression:"allocationOrderManageInfo.conditions.srcShId"}},t._l(t.allocationOrderManageInfo.shopHouses,(function(t,a){return e("el-option",{key:a,attrs:{label:t.shName,value:t.shId}})})),1)],1)],1),e("el-form-item",[e("el-form-item",[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("allocationOrder.selectTargetWarehouse"),clearable:""},model:{value:t.allocationOrderManageInfo.conditions.targetShId,callback:function(e){t.$set(t.allocationOrderManageInfo.conditions,"targetShId",e)},expression:"allocationOrderManageInfo.conditions.targetShId"}},t._l(t.allocationOrderManageInfo.shopHouses,(function(t,a){return e("el-option",{key:a,attrs:{label:t.shName,value:t.shId}})})),1)],1)],1),e("el-form-item",[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("allocationOrder.selectStatus"),clearable:""},model:{value:t.allocationOrderManageInfo.conditions.state,callback:function(e){t.$set(t.allocationOrderManageInfo.conditions,"state",e)},expression:"allocationOrderManageInfo.conditions.state"}},t._l(t.allocationOrderManageInfo.states,(function(t){return e("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),e("el-form-item",[e("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t._queryAssetInventoryMethod()}}},[e("i",{staticClass:"el-icon-search"}),t._v(" "+t._s(t.$t("common.query"))+" ")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t._resetAssetInventoryMethod()}}},[e("i",{staticClass:"el-icon-refresh"}),t._v(" "+t._s(t.$t("common.reset"))+" ")])],1)],1)],1)]),e("el-card",{staticClass:"margin-top-sm"},[e("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[e("div",[t._v(t._s(t.$t("allocationOrder.assetAllocation")))]),e("div",{staticClass:"ibox-tools",staticStyle:{top:"10px"}},[e("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t._openAddAssetInventoryModal()}}},[e("i",{staticClass:"el-icon-plus"}),t._v(" "+t._s(t.$t("allocationOrder.allocation"))+" ")])],1)]),e("div",{},[e("el-table",{staticStyle:{width:"100%"},attrs:{data:t.allocationOrderManageInfo.allocationOrders,border:""}},[e("el-table-column",{attrs:{prop:"orderId",label:t.$t("allocationOrder.orderId"),align:"center"}}),e("el-table-column",{attrs:{prop:"prodName",label:t.$t("allocationOrder.productName"),align:"center"}}),e("el-table-column",{attrs:{prop:"specName",label:t.$t("allocationOrder.specName"),align:"center"}}),e("el-table-column",{attrs:{prop:"shopName",label:t.$t("allocationOrder.srcShop"),align:"center"}}),e("el-table-column",{attrs:{prop:"srcShName",label:t.$t("allocationOrder.srcWarehouse"),align:"center"}}),e("el-table-column",{attrs:{prop:"targetShopName",label:t.$t("allocationOrder.targetShop"),align:"center"}}),e("el-table-column",{attrs:{prop:"targetShName",label:t.$t("allocationOrder.targetWarehouse"),align:"center"}}),e("el-table-column",{attrs:{prop:"productCount",label:t.$t("allocationOrder.productCount"),align:"center"}}),e("el-table-column",{attrs:{prop:"staffName",label:t.$t("allocationOrder.allocationPerson"),align:"center"}}),e("el-table-column",{attrs:{prop:"stateName",label:t.$t("allocationOrder.status"),align:"center"}}),e("el-table-column",{attrs:{prop:"createTime",label:t.$t("allocationOrder.allocationTime"),align:"center"}}),e("el-table-column",{attrs:{label:t.$t("common.operation"),align:"center",width:"200"},scopedSlots:t._u([{key:"default",fn:function(a){return["1001"===a.row.state?e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t._openInStockAssetInventoryModel(a.row)}}},[t._v(" "+t._s(t.$t("allocationOrder.audit"))+" ")]):t._e(),"1001"===a.row.state?e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t._openEditAssetInventoryModel(a.row)}}},[t._v(" "+t._s(t.$t("common.edit"))+" ")]):t._e(),"1001"===a.row.state?e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t._openDeleteAssetInventoryModel(a.row)}}},[t._v(" "+t._s(t.$t("common.delete"))+" ")]):t._e(),"2002"===a.row.state?e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t._doAllocationOrderInModel(a.row)}}},[t._v(" "+t._s(t.$t("allocationOrder.inStock"))+" ")]):t._e()]}}])})],1),e("el-pagination",{attrs:{"current-page":t.allocationOrderManageInfo.conditions.page,"page-sizes":[10,20,30,50],"page-size":t.allocationOrderManageInfo.conditions.row,layout:"total, sizes, prev, pager, next, jumper",total:t.allocationOrderManageInfo.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)]),e("delete-asset-inventory",{ref:"deleteAssetInventory"}),e("allocation-order-edit",{ref:"allocationOrderEdit"}),e("delete-allocation-order",{ref:"deleteAllocationOrder"}),e("allocation-order-audit",{ref:"allocationOrderAudit",attrs:{"call-back-listener":"allocationOrderManage","call-back-function":"notifyAuditInfo"}})],1)},r=[],s=a("7323"),l=a("ff63"),n=a("90a0"),i=function(){var t=this,e=t._self._c;return e("el-dialog",{attrs:{title:t.$t("allocationOrder.editAllocation"),visible:t.dialogVisible,width:"50%","before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisible=e}}},[e("el-form",{ref:"form",attrs:{model:t.formData,"label-width":"120px"}},[e("el-form-item",{attrs:{label:t.$t("allocationOrder.orderId")}},[e("el-input",{attrs:{disabled:""},model:{value:t.formData.orderId,callback:function(e){t.$set(t.formData,"orderId",e)},expression:"formData.orderId"}})],1),e("el-form-item",{attrs:{label:t.$t("allocationOrder.productName")}},[e("el-input",{attrs:{disabled:""},model:{value:t.formData.prodName,callback:function(e){t.$set(t.formData,"prodName",e)},expression:"formData.prodName"}})],1),e("el-form-item",{attrs:{label:t.$t("allocationOrder.specName")}},[e("el-input",{attrs:{disabled:""},model:{value:t.formData.specName,callback:function(e){t.$set(t.formData,"specName",e)},expression:"formData.specName"}})],1),e("el-form-item",{attrs:{label:t.$t("allocationOrder.srcShop")}},[e("el-input",{attrs:{disabled:""},model:{value:t.formData.shopName,callback:function(e){t.$set(t.formData,"shopName",e)},expression:"formData.shopName"}})],1),e("el-form-item",{attrs:{label:t.$t("allocationOrder.srcWarehouse")}},[e("el-input",{attrs:{disabled:""},model:{value:t.formData.srcShName,callback:function(e){t.$set(t.formData,"srcShName",e)},expression:"formData.srcShName"}})],1),e("el-form-item",{attrs:{label:t.$t("allocationOrder.targetWarehouse"),prop:"targetShId",required:""}},[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("allocationOrder.selectTargetWarehouse")},model:{value:t.formData.targetShId,callback:function(e){t.$set(t.formData,"targetShId",e)},expression:"formData.targetShId"}},t._l(t.shopHouses,(function(t,a){return e("el-option",{key:a,attrs:{label:t.shName,value:t.shId}})})),1)],1),e("el-form-item",{attrs:{label:t.$t("allocationOrder.productCount"),prop:"productCount",required:""}},[e("el-input",{attrs:{type:"number"},model:{value:t.formData.productCount,callback:function(e){t.$set(t.formData,"productCount",t._n(e))},expression:"formData.productCount"}})],1),e("el-form-item",{attrs:{label:t.$t("allocationOrder.status")}},[e("el-input",{attrs:{disabled:""},model:{value:t.formData.stateName,callback:function(e){t.$set(t.formData,"stateName",e)},expression:"formData.stateName"}})],1)],1),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:t.close}},[t._v(t._s(t.$t("common.cancel")))]),e("el-button",{attrs:{type:"primary"},on:{click:t.submit}},[t._v(t._s(t.$t("common.save")))])],1)],1)},c=[],d={name:"AllocationOrderEdit",data(){return{dialogVisible:!1,formData:{productId:"",specId:"",prodName:"",specName:"",shopName:"",srcShName:"",targetShopName:"",targetShName:"",productCount:"",shId:"",orderId:"",srcShId:"",targetShId:"",staffName:"",state:"",stateName:"",shopId:""},shopHouses:[]}},methods:{open(t){this.resetForm(),this.formData={...t},this.dialogVisible=!0,this.getShopHouses(t.srcShId)},close(){this.dialogVisible=!1},handleClose(t){t()},resetForm(){this.formData={productId:"",specId:"",prodName:"",specName:"",shopName:"",srcShName:"",targetShopName:"",targetShName:"",productCount:"",shId:"",orderId:"",srcShId:"",targetShId:"",staffName:"",state:"",stateName:"",shopId:""}},async getShopHouses(t){try{const e=await Object(l["e"])({shopId:this.formData.shopId,shId:t,flag:"1",page:1,row:50});this.shopHouses=e.data}catch(e){console.error("获取仓库失败:",e)}},validateForm(){return this.formData.targetShId?!(!this.formData.productCount||this.formData.productCount<=0)||(this.$message.error(this.$t("allocationOrder.productCountRequired")),!1):(this.$message.error(this.$t("allocationOrder.selectTargetWarehouseRequired")),!1)},async submit(){if(this.validateForm())try{await Object(l["g"])(this.formData),this.$emit("listAssetInventory"),this.$message.success(this.$t("common.updateSuccess")),this.close()}catch(t){console.error("更新失败:",t),this.$message.error(t.message)}}}},u=d,m=a("2877"),h=Object(m["a"])(u,i,c,!1,null,null,null),f=h.exports,p=function(){var t=this,e=t._self._c;return e("el-dialog",{attrs:{title:t.$t("common.confirm"),visible:t.dialogVisible,width:"30%","before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisible=e}}},[e("div",{attrs:{align:"center"}},[e("p",[t._v(t._s(t.$t("deleteAllocationOrder.confirmDelete")))])]),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:t.close}},[t._v(t._s(t.$t("common.cancel")))]),e("el-button",{attrs:{type:"primary"},on:{click:t.confirmDelete}},[t._v(t._s(t.$t("common.confirm")))])],1)])},g=[],I={name:"DeleteAllocationOrder",data(){return{dialogVisible:!1,deleteInfo:{}}},methods:{open(t){this.deleteInfo=t,this.dialogVisible=!0},close(){this.dialogVisible=!1},handleClose(t){t()},async confirmDelete(){this.deleteInfo.shopId=Object(s["f"])();try{await Object(l["b"])(this.deleteInfo),this.$emit("listAssetInventory"),this.$message.success(this.$t("common.submitSuccess")),this.close()}catch(t){console.error("删除失败:",t),this.$message.error(t.message)}}}},b=I,O=Object(m["a"])(b,p,g,!1,null,null,null),v=O.exports,y=function(){var t=this,e=t._self._c;return e("el-dialog",{attrs:{title:t.$t("allocationOrder.auditInfo"),visible:t.dialogVisible,width:"50%","before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisible=e}}},[e("el-form",{ref:"form",attrs:{model:t.formData,"label-width":"120px"}},[e("el-form-item",{attrs:{label:t.$t("allocationOrder.auditStatus"),prop:"state",required:""}},[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("allocationOrder.selectAuditStatus")},on:{change:t.handleStatusChange},model:{value:t.formData.state,callback:function(e){t.$set(t.formData,"state",e)},expression:"formData.state"}},[e("el-option",{attrs:{label:t.$t("allocationOrder.agree"),value:"2002"}}),e("el-option",{attrs:{label:t.$t("allocationOrder.reject"),value:"3003"}})],1)],1),e("el-form-item",{attrs:{label:t.$t("allocationOrder.reason"),prop:"remark",required:""}},[e("el-input",{attrs:{type:"textarea",rows:3,placeholder:t.$t("allocationOrder.inputReason")},model:{value:t.formData.remark,callback:function(e){t.$set(t.formData,"remark",e)},expression:"formData.remark"}})],1)],1),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:t.close}},[t._v(t._s(t.$t("common.cancel")))]),e("el-button",{attrs:{type:"primary"},on:{click:t.submit}},[t._v(t._s(t.$t("common.submit")))])],1)],1)},$=[],_={name:"AllocationOrderAudit",props:{callBackListener:{type:String,default:""},callBackFunction:{type:String,default:""}},data(){return{dialogVisible:!1,formData:{state:"",remark:""}}},methods:{open(){this.resetForm(),this.dialogVisible=!0},close(){this.dialogVisible=!1},handleClose(t){t()},resetForm(){this.formData={state:"",remark:""}},handleStatusChange(t){this.formData.remark="2002"===t?this.$t("allocationOrder.agree"):""},validateForm(){return this.formData.state?this.formData.remark?!(this.formData.remark.length>200)||(this.$message.error(this.$t("allocationOrder.reasonMaxLength")),!1):(this.$message.error(this.$t("allocationOrder.inputReasonRequired")),!1):(this.$message.error(this.$t("allocationOrder.selectAuditStatusRequired")),!1)},submit(){this.validateForm()&&(this.callBackListener&&this.callBackFunction&&this.$emit(this.callBackListener,this.callBackFunction,this.formData),this.close())}}},S=_,A=Object(m["a"])(S,y,$,!1,null,null,null),D=A.exports,N={name:"AllocationOrderManage",components:{DeleteAssetInventory:n["a"],AllocationOrderEdit:f,DeleteAllocationOrder:v,AllocationOrderAudit:D},data(){return{allocationOrderManageInfo:{allocationOrders:[],shopHouses:[],total:0,records:1,moreCondition:!1,aiId:"",curOrder:{},states:[],conditions:{shId:"",orderId:"",srcShId:"",targetShId:"",staffName:"",state:"",shopId:"",page:1,row:10}}}},created(){this._initMethod()},methods:{_initMethod(){this._listShopHouses(),this._listAssetInventorys(1,10),this.getDictData()},async getDictData(){try{const{data:t}=await Object(s["e"])("allocation_order","state");this.allocationOrderManageInfo.states=t}catch(t){console.error("获取字典数据失败:",t)}},handleSizeChange(t){this.allocationOrderManageInfo.conditions.row=t,this._listAssetInventorys(this.allocationOrderManageInfo.conditions.page,t)},handleCurrentChange(t){this._listAssetInventorys(t,this.allocationOrderManageInfo.conditions.row)},async _listAssetInventorys(t,e){this.allocationOrderManageInfo.conditions.page=t,this.allocationOrderManageInfo.conditions.row=e,this.allocationOrderManageInfo.conditions.shopId=Object(s["f"])();try{const t=await Object(l["d"])(this.allocationOrderManageInfo.conditions);this.allocationOrderManageInfo.total=t.total,this.allocationOrderManageInfo.records=t.records,this.allocationOrderManageInfo.allocationOrders=t.data}catch(a){console.error("请求失败:",a)}},_openAddAssetInventoryModal(){this.$router.push("/pages/goods/allocationOrderIn")},_openEditAssetInventoryModel(t){this.$refs.allocationOrderEdit.open(t)},_doAllocationOrderInModel(t){this.$router.push({path:"/pages/goods/doAllocationOrderIn",query:{orderId:t.orderId,staffName:t.staffName,stateName:t.stateName,createTime:t.createTime,stateRemark:t.stateRemark,shopName:t.shopName,srcShName:t.srcShName,targetShopName:t.targetShopName,targetShName:t.targetShName,shopId:t.shopId,specId:t.specId,productId:t.productId,productCount:t.productCount,state:t.state,targetShId:t.targetShId,prodName:t.prodName,srcShId:t.srcShId,targetShopId:t.targetShopId,staffId:t.staffId}})},_openInStockAssetInventoryModel(t){this.allocationOrderManageInfo.curOrder=t,this.$refs.allocationOrderAudit.open()},_openDeleteAssetInventoryModel(t){this.$refs.deleteAllocationOrder.open(t)},_queryAssetInventoryMethod(){this._listAssetInventorys(1,this.allocationOrderManageInfo.conditions.row)},_resetAssetInventoryMethod(){this.allocationOrderManageInfo.conditions={shId:"",orderId:"",srcShId:"",targetShId:"",staffName:"",state:"",shopId:"",page:1,row:10},this._listAssetInventorys(1,10)},_moreCondition(){this.allocationOrderManageInfo.moreCondition=!this.allocationOrderManageInfo.moreCondition},async _listShopHouses(){try{const t=await Object(l["c"])({page:1,row:100,shopId:Object(s["f"])()});this.allocationOrderManageInfo.shopHouses=t.data}catch(t){console.error("请求失败:",t)}},async _auditAllocationOrderState(t){const e=this.allocationOrderManageInfo.curOrder;e.state=t.state,e.stateRemark=t.remark,e.flag="1";try{await Object(l["a"])(e),this.$message.success(this.$t("allocationOrder.auditSuccess")),this._listAssetInventorys(1,this.allocationOrderManageInfo.conditions.row)}catch(a){console.error("请求失败:",a),this.$message.error(a.message)}}}},k=N,M=(a("3c46"),Object(m["a"])(k,o,r,!1,null,"0219580d",null));e["default"]=M.exports},c360:function(t,e,a){},ff63:function(t,e,a){"use strict";a.d(e,"d",(function(){return s})),a.d(e,"c",(function(){return l})),a.d(e,"g",(function(){return n})),a.d(e,"b",(function(){return i})),a.d(e,"a",(function(){return c})),a.d(e,"e",(function(){return d}));var o=a("b775"),r=a("7323");function s(t){return new Promise((e,a)=>{t.shopId=Object(r["f"])(),Object(o["a"])({url:"/allocationOrder/queryAllocationOrder",method:"get",params:t}).then(t=>{const a=t.data;e(a)}).catch(t=>{a(t)})})}function l(t){return new Promise((e,a)=>{t.shopId=Object(r["f"])(),Object(o["a"])({url:"/shopHouse.queryShopHouse",method:"get",params:t}).then(t=>{const a=t.data;e(a)}).catch(t=>{a(t)})})}function n(t){return new Promise((e,a)=>{t.shopId=Object(r["f"])(),Object(o["a"])({url:"/allocationOrder/updateAllocationOrder",method:"post",data:t}).then(t=>{const a=t.data;e(a)}).catch(t=>{a(t)})})}function i(t){return new Promise((e,a)=>{t.shopId=Object(r["f"])(),Object(o["a"])({url:"/allocationOrder/deleteAllocationOrder",method:"post",data:t}).then(t=>{const a=t.data;e(a)}).catch(t=>{a(t)})})}function c(t){return new Promise((e,a)=>{t.shopId=Object(r["f"])(),Object(o["a"])({url:"/allocationOrder/auditAllocationOrder",method:"post",data:t}).then(t=>{const a=t.data;e(a)}).catch(t=>{a(t)})})}function d(t){return new Promise((e,a)=>{t.shopId=Object(r["f"])(),Object(o["a"])({url:"/shopHouse.queryShopHouse",method:"get",params:t}).then(t=>{const a=t.data;e(a)}).catch(t=>{a(t)})})}}}]);
|
|
//# sourceMappingURL=chunk-798d8472.ef8dc354.js.map
|