From c00e29c645898a9291ca4ab214e5b50baab7bedd Mon Sep 17 00:00:00 2001 From: zzyuan <781948537@qq.com> Date: Wed, 9 Jul 2025 09:48:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=BA=E5=85=A5=E5=BA=93=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stockManage/warehouseIn/detail.vue | 5 + .../stockManage/warehouseIn/edit.vue | 5 +- .../stockManage/warehouseOut/detail.vue | 44 ++++--- .../stockManage/warehouseOut/edit.vue | 119 ++++++++---------- .../stockManage/warehouseOut/index.vue | 38 +++--- 5 files changed, 109 insertions(+), 102 deletions(-) diff --git a/src/views/foodManage/stockManage/warehouseIn/detail.vue b/src/views/foodManage/stockManage/warehouseIn/detail.vue index 4c0f54db..18023dc4 100644 --- a/src/views/foodManage/stockManage/warehouseIn/detail.vue +++ b/src/views/foodManage/stockManage/warehouseIn/detail.vue @@ -6,6 +6,11 @@ {{baseInfo.intoCode}} + + + 待入库 + 已入库 + {{ baseInfo.areaName }} diff --git a/src/views/foodManage/stockManage/warehouseIn/edit.vue b/src/views/foodManage/stockManage/warehouseIn/edit.vue index 8b78ed3e..7d0adb4d 100644 --- a/src/views/foodManage/stockManage/warehouseIn/edit.vue +++ b/src/views/foodManage/stockManage/warehouseIn/edit.vue @@ -384,7 +384,7 @@ export default { let param = { "pageSize": this.queryParams.pageSize, "pageNum": this.queryParams.pageNum, - "areaId": this.queryParams.areaId, + "areaId": this.baseInfo.areaId, "materialName": this.queryParams.materialName, "materialCode": this.queryParams.materialCode, "materialTypeIds": this.queryParams.materialTypeIds, @@ -407,6 +407,9 @@ export default { if(this.batchChosenMaterial.length>0){ this.loading = true this.materialList = this.batchChosenMaterial; + this.materialList.forEach(item=>{ + this.$set(item,"unitPrice",item.unitPrice/100) + }) setTimeout(()=>{ this.loading = false this.openDialog=false diff --git a/src/views/foodManage/stockManage/warehouseOut/detail.vue b/src/views/foodManage/stockManage/warehouseOut/detail.vue index 7f2e57db..900dd130 100644 --- a/src/views/foodManage/stockManage/warehouseOut/detail.vue +++ b/src/views/foodManage/stockManage/warehouseOut/detail.vue @@ -4,17 +4,14 @@ - {{baseInfo.outWareHouseCode}} + {{baseInfo.outCode}} - - {{ baseInfo.areaName }} + + 待出库 + 已出库 - - - {{ baseInfo.warehouseName }} - - + 领取出库 报损出库 @@ -26,12 +23,23 @@ - {{ baseInfo.outWareHouseTime }} + {{ baseInfo.outDate }} - {{ baseInfo.pickingMan }} + {{ baseInfo.fetchUserId }} + + + {{ baseInfo.areaName }} + + + + {{ baseInfo.warehouseName }} + + + + {{ baseInfo.remark }} @@ -60,18 +68,20 @@ 称重 --> - - --> - - - + + import { imgUpLoadTwo } from '@/api/system/upload' import { systemAreaTreeApi } from "@/api/base/stall"; -import { systemMaterialTreeApi,getMaterialListApi,drpWareHousePageApi } from "@/api/foodManage/stockManage"; +import { systemMaterialTreeApi,getStockMaterialListApi,drpWareHousePageApi } from "@/api/foodManage/stockManage"; import { getWarehouseOutInfoApi,addWarehouseOutApi,editWarehouseOutApi } from "@/api/foodManage/stockManage"; //warehouseOutPageApi getWarehouseOutInfoApi addWarehouseOutApi editWarehouseOutApi delWarehouseOutApi export default { @@ -195,14 +181,14 @@ export default { supplierId: [ { required: true, message: "供应商不能为空", trigger: "change" } ], - outWareHouseTime: [ + outDate: [ { required: true, message: "出库时间不能为空", trigger: "change" } ], warehouseId: [ { required: true, message: "货品仓库不能为空", trigger: "change" } ], - supplyAddress: [ - { required: true, message: "详细地址不能为空", trigger: "change" } + outType: [ + { required: true, message: "出库类型不能为空", trigger: "change" } ] }, treeAreaOptions:[], @@ -253,10 +239,10 @@ export default { //查询查询食堂下拉结构 getWarehouseOutInfoApi(param).then((response) => { this.baseInfo = response.data; - this.materialList = this.baseInfo.orderGoodsDetailList; - this.materialList.forEach(item=>{ - this.$set(item,"singlePrice",Number(item.singlePrice)/100) - }) + this.materialList = this.baseInfo.imsOutInventoryDetailAddList; + // this.materialList.forEach(item=>{ + // this.$set(item,"unitPrice",Number(item.unitPrice)/100) + // }) drpWareHousePageApi({ areaId:this.baseInfo.areaId }).then((response) => { this.wareHouseOptions = response.rows||[]; this.$set(this.baseInfo,'warehouseId',this.baseInfo.warehouseId) @@ -315,14 +301,14 @@ export default { }, //添加货品 addMaterial(){ - if(this.baseInfo.areaId!=undefined){ - this.openDialog=true + if(this.baseInfo.areaId!=undefined||this.baseInfo.warehouseId!=undefined){ + this.openDialog=true this.resetQuery() setTimeout(()=>{ this.$refs.multipleTable1.clearSelection() },300) }else{ - this.$modal.msgError("请先选择区域"); + this.$modal.msgError("请先选择区域,仓库"); } }, @@ -342,12 +328,13 @@ export default { let param = { "pageSize": this.queryParams.pageSize, "pageNum": this.queryParams.pageNum, - "areaId": this.queryParams.areaId, + "areaId": this.baseInfo.areaId, + "warehouseId": this.baseInfo.warehouseId, "materialName": this.queryParams.materialName, "materialCode": this.queryParams.materialCode, "materialTypeIds": this.queryParams.materialTypeIds, } - getMaterialListApi(param).then(response => { + getStockMaterialListApi(param).then(response => { this.tableListData = response.rows; this.total = Number(response.total); this.loading = false; @@ -356,8 +343,8 @@ export default { handleSelectionChange2(selection) { this.batchChosenMaterial = selection; this.batchChosenMaterial.forEach(item=>{ - this.$set(item,"orderNum",0) - this.$set(item,"singlePrice",item.unitPrice/100) + this.$set(item,"fetchNum",0) + // this.$set(item,"unitPrice",item.unitPrice/100) }) }, confirmChosen(){ @@ -375,23 +362,23 @@ export default { this.$refs["baseInfo"].validate(valid => { if (valid) { let param = Object.assign({},this.baseInfo); - param.outWareHouseTime = this.formatDateTime(this.baseInfo.outWareHouseTime) - param.orderAmount=0 + param.outDate = this.formatDateTime(this.baseInfo.outDate) + param.totalAmount=0 param.totalNum=0 param.status=1 - param.orderGoodsDetailList = [] + param.imsOutInventoryDetailAddList = [] this.noMaterial = false; if(this.materialList.length>0){ this.materialList.forEach(item=>{ - if(item.singlePrice==0 || item.orderNum==0){ + if(item.fetchNum==0){ this.noMaterial = true }else{ let obj = Object.assign({}, item) - obj.singlePrice = Number(obj.singlePrice)*100 - obj.totalPrice = (Number(obj.singlePrice)*Number(obj.orderNum)) - param.orderAmount = param.orderAmount+obj.totalPrice; - param.totalNum = param.totalNum+Number(obj.orderNum) - param.orderGoodsDetailList.push(obj) + // obj.unitPrice = Number(obj.unitPrice)*100 + // obj.totalPrice = (Number(obj.unitPrice)*Number(obj.fetchNum)) + // param.totalAmount = param.totalAmount+obj.totalPrice; + // param.totalNum = param.totalNum+Number(obj.fetchNum) + param.imsOutInventoryDetailAddList.push(obj) } }) } @@ -435,28 +422,28 @@ export default { this.$refs["baseInfo"].validate(valid => { if (valid) { let param = Object.assign({},this.baseInfo); - param.outWareHouseTime = this.formatDateTime(this.baseInfo.outWareHouseTime) - param.orderAmount=0 + param.outDate = this.formatDateTime(this.baseInfo.outDate) + param.totalAmount=0 param.totalNum=0 param.status=2 - param.orderGoodsDetailList = [] + param.imsOutInventoryDetailAddList = [] this.noMaterial = false; if(this.materialList.length>0){ this.materialList.forEach(item=>{ - if(item.singlePrice==0 || item.orderNum==0){ + if(item.fetchNum==0){ this.noMaterial = true }else{ let obj = Object.assign({}, item) - obj.singlePrice = Number(obj.singlePrice)*100 - obj.totalPrice = (Number(obj.singlePrice)*Number(obj.orderNum)) - param.orderAmount = param.orderAmount+obj.totalPrice; - param.totalNum = param.totalNum+Number(obj.orderNum) - param.orderGoodsDetailList.push(obj) + // obj.unitPrice = Number(obj.unitPrice)*100 + // obj.totalPrice = (Number(obj.unitPrice)*Number(obj.fetchNum)) + // param.totalAmount = param.totalAmount+obj.totalPrice; + // param.totalNum = param.totalNum+Number(obj.fetchNum) + param.imsOutInventoryDetailAddList.push(obj) } }) } if(this.noMaterial){ - this.$modal.msgError("请输入单价和数量!"); + this.$modal.msgError("请输入数量!"); }else{ this.noMaterial = true; if(this.materialList.length>0){ diff --git a/src/views/foodManage/stockManage/warehouseOut/index.vue b/src/views/foodManage/stockManage/warehouseOut/index.vue index efb7f014..ed2384cb 100644 --- a/src/views/foodManage/stockManage/warehouseOut/index.vue +++ b/src/views/foodManage/stockManage/warehouseOut/index.vue @@ -15,8 +15,8 @@ :picker-options="pickerOptions" > - - + + @@ -79,29 +79,33 @@ {{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}} - + - + - + - + @@ -285,13 +289,11 @@ export default { let param = { "pageNum": this.queryParams.pageNum, "pageSize": this.queryParams.pageSize, - "outWareHouseCode": this.queryParams.outWareHouseCode, + "outCode": this.queryParams.outCode, "areaId": this.queryParams.areaId, - "canteenId": this.queryParams.canteenId, - "stallId": this.queryParams.stallId, - "status": this.queryParams.status, - "supplierConfirmStatus": this.queryParams.supplierConfirmStatus, - // "outType": this.queryParams.outType + "warehouseId": this.queryParams.warehouseId, + "status": this.queryParams.status, + "outType": this.queryParams.outType } if(this.dateRange&&this.dateRange.length>0){ param.startDateTime=this.formatDateTime(this.dateRange[0])