fix: 挂账管理更新,耗材盘点更新,代客下单更新

This commit is contained in:
2025-03-11 16:13:22 +08:00
parent 0fa409ecc5
commit 14af62538f
17 changed files with 164 additions and 95 deletions

View File

@@ -31,7 +31,8 @@ export function returnCoupCanUse(goodsArr = [], coup, selCoupArr = []) {
return false;
}
const findGoodsTotalNumber = findGoods.reduce((prve, cur) => {
return prve + cur.num * 1;
const num = cur.num - cur.refundNum;
return prve + (num <= 0 ? 0 : num);
}, 0);
const selCoupNumber = selCoupArr
.filter((v) => v.proId == coup.proId)
@@ -126,7 +127,8 @@ export function returnGoodsPayPriceMap(goodsArr) {
if (!prve.hasOwnProperty(cur.productId)) {
prve[cur.productId] = [];
}
const arr = new Array(cur.num).fill(cur).map((v) => {
const n = cur.num - cur.returnNum;
const arr = new Array(n <= 0 ? 0 : n).fill(cur).map((v) => {
return {
memberPrice: v.memberPrice ? v.memberPrice : v.price,
price: v.price,