From 5d0aaf05ae0d5f069a7df998beab2bc63b8e9f7f Mon Sep 17 00:00:00 2001
From: zzyuan <781948537@qq.com>
Date: Fri, 11 Jul 2025 11:19:58 +0800
Subject: [PATCH] =?UTF-8?q?=E9=80=80=E8=B4=A7=E5=8D=95=E6=96=B0=E5=A2=9E?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/foodManage/returnManage.js | 16 +++++
.../returnManage/materialReturn/edit.vue | 66 +++++++++++--------
.../stockManage/warehouseIn/edit.vue | 2 +-
3 files changed, 55 insertions(+), 29 deletions(-)
diff --git a/src/api/foodManage/returnManage.js b/src/api/foodManage/returnManage.js
index 991346fb..d69edf7c 100644
--- a/src/api/foodManage/returnManage.js
+++ b/src/api/foodManage/returnManage.js
@@ -34,6 +34,22 @@ export function getStockMaterialListApi(data) {
pageSize:data.pageSize
}
})
+}
+
+// 货品批次详情-入库批次列表
+export function getMaterialInStockBatchApi(data) {
+ return request({
+ url: '/smart-canteen/ims/into-inventory/warehouse/materials',
+ method: 'post',
+ headers: {
+ //"merchant-id":"378915229716713472",
+ },
+ data: data,
+ params:{
+ pageNum:data.pageNum,
+ pageSize:data.pageSize
+ }
+ })
}
//查询供应商列表 isPaging 0不分页 2分页
diff --git a/src/views/foodManage/returnManage/materialReturn/edit.vue b/src/views/foodManage/returnManage/materialReturn/edit.vue
index 295c75f1..04578f3d 100644
--- a/src/views/foodManage/returnManage/materialReturn/edit.vue
+++ b/src/views/foodManage/returnManage/materialReturn/edit.vue
@@ -71,14 +71,13 @@
称重
-->
-
-
-
+
+
-
+
- {{ (scope.row.totalPrice/100).toFixed(2) }}
+ {{ scope.row.refundNum*scope.row.unitPrice }}
@@ -126,7 +125,7 @@
重置
-
+
@@ -137,10 +136,16 @@
-
-
-
-
+
+
+
+
+ {{ (scope.row.unitPrice/100).toFixed(2) }}
+
+
+
+
+
import { imgUpLoadTwo } from '@/api/system/upload'
import { systemAreaTreeApi } from "@/api/base/stall";
-import { systemMaterialTreeApi,getStockMaterialListApi,supplierPageApi,drpWareHousePageApi } from "@/api/foodManage/returnManage";
+import { systemMaterialTreeApi,getMaterialInStockBatchApi,supplierPageApi,drpWareHousePageApi } from "@/api/foodManage/returnManage";
import { getReturnMaterialInfoApi,addReturnMaterialApi,editReturnMaterialApi } from "@/api/foodManage/returnManage";
export default {
@@ -265,9 +270,9 @@ export default {
getReturnMaterialInfoApi(param).then((response) => {
this.baseInfo = this.returnRowData;
this.materialList = response.rows;
- // this.materialList.forEach(item=>{
- // this.$set(item,"singlePrice",Number(item.singlePrice)/100)
- // })
+ this.materialList.forEach(item=>{
+ this.$set(item,"unitPrice",Number(item.unitPrice)/100)
+ })
supplierPageApi({ isPaging:1,areaIdList:[this.baseInfo.areaId] }).then((response) => {
this.supplierOptions = response.rows||[];
this.$set(this.baseInfo,'supplierId',this.baseInfo.supplierId)
@@ -338,14 +343,14 @@ export default {
},
//添加货品
addMaterial(){
- if(this.baseInfo.areaId!=undefined||this.baseInfo.refundWarehouseId!=undefined){
+ if(this.baseInfo.areaId!=undefined||this.baseInfo.refundWarehouseId!=undefined||this.baseInfo.supplierId!=undefined){
this.openDialog=true
this.resetQuery()
setTimeout(()=>{
this.$refs.multipleTable1.clearSelection()
},300)
}else{
- this.$modal.msgError("请先选择区域,仓库");
+ this.$modal.msgError("请先选择区域,供应商,仓库");
}
},
/** 搜索按钮操作 */
@@ -363,14 +368,14 @@ export default {
this.loading = true;
let param = {
"pageSize": this.queryParams.pageSize,
- "pageNum": this.queryParams.pageNum,
- "areaId": this.baseInfo.areaId,
+ "pageNum": this.queryParams.pageNum,
"warehouseId": this.baseInfo.refundWarehouseId,
+ "supplierId": this.baseInfo.supplierId,
"materialName": this.queryParams.materialName,
"materialCode": this.queryParams.materialCode,
"materialTypeIds": this.queryParams.materialTypeIds,
}
- getStockMaterialListApi(param).then(response => {
+ getMaterialInStockBatchApi(param).then(response => {
this.tableListData = response.rows;
this.total = Number(response.total);
this.loading = false;
@@ -380,13 +385,18 @@ export default {
this.batchChosenMaterial = selection;
this.batchChosenMaterial.forEach(item=>{
this.$set(item,"refundNum",0)
- // this.$set(item,"singlePrice",item.unitPrice/100)
+ this.$set(item,"unitPrice",item.unitPrice)
})
},
confirmChosen(){
if(this.batchChosenMaterial.length>0){
- this.loading = true
- this.materialList = this.batchChosenMaterial;
+ this.loading = true
+ this.materialList = []
+ this.batchChosenMaterial.forEach(item=>{
+ let obj = Object.assign({}, item)
+ obj.unitPrice = item.unitPrice/100;
+ this.materialList.push(obj)
+ })
setTimeout(()=>{
this.loading = false
this.openDialog=false
@@ -409,9 +419,9 @@ export default {
this.noMaterial = true
}else{
let obj = Object.assign({}, item)
- // obj.singlePrice = Number(obj.singlePrice)*100
- // obj.totalPrice = (Number(obj.singlePrice)*Number(obj.refundNum))
- // param.refundTotalAmount = param.refundTotalAmount+obj.totalPrice;
+ obj.unitPrice = Number(obj.unitPrice)*100
+ obj.totalPrice = (Number(obj.unitPrice)*Number(obj.refundNum))
+ param.refundTotalAmount = param.refundTotalAmount+obj.totalPrice;
param.refundTotalNum = param.refundTotalNum+Number(obj.refundNum)
param.detailList.push(obj)
}
@@ -458,9 +468,9 @@ export default {
this.noMaterial = true
}else{
let obj = Object.assign({}, item)
- // obj.singlePrice = Number(obj.singlePrice)*100
- // obj.totalPrice = (Number(obj.singlePrice)*Number(obj.refundNum))
- // param.refundTotalAmount = param.refundTotalAmount+obj.totalPrice;
+ obj.unitPrice = Number(obj.unitPrice)*100
+ obj.totalPrice = (Number(obj.unitPrice)*Number(obj.refundNum))
+ param.refundTotalAmount = param.refundTotalAmount+obj.totalPrice;
param.refundTotalNum = param.refundTotalNum+Number(obj.refundNum)
param.detailList.push(obj)
}
diff --git a/src/views/foodManage/stockManage/warehouseIn/edit.vue b/src/views/foodManage/stockManage/warehouseIn/edit.vue
index f046a26f..64b67f0c 100644
--- a/src/views/foodManage/stockManage/warehouseIn/edit.vue
+++ b/src/views/foodManage/stockManage/warehouseIn/edit.vue
@@ -295,7 +295,7 @@ export default {
//查询查询食堂下拉结构
getWarehouseInInfoApi(param).then((response) => {
this.baseInfo = response.data;
- this.materialList = this.baseInfo.imsIntoInventoryDetailVOList;
+ this.materialList = this.baseInfo.imsIntoInventoryDetailVOList;
// this.$set(this.baseInfo,'areaId',Number(response.data.areaId))
this.materialList.forEach(item=>{
this.$set(item,"unitPrice",Number(item.unitPrice)/100)