修改商品绑定耗材提交的id字段

This commit is contained in:
YeMingfei666 2024-08-27 11:10:51 +08:00
parent 483ff5d234
commit f66d4655d1
1 changed files with 10 additions and 9 deletions

View File

@ -414,7 +414,7 @@
<el-table-column label="单位" prop="conUnit" />
<el-table-column label="库存数量" prop="stockNumber">
<template v-slot="scope">
{{ (scope.row.stockNumber - scope.row.stockConsume).toFixed(2) }}
{{ scope.row.balance}}
</template>
</el-table-column>
@ -626,7 +626,7 @@ export default {
initTableSelected() {
for (let i in haocaiSelectedMap) {
const index = this.tableDatainformation.data.findIndex(
(v) => v.id == i
(v) => v.consId == i
);
if (index != -1 && haocaiSelectedMap[i]) {
//id
@ -658,10 +658,11 @@ export default {
let index = -1;
for (let key in haocaiSelectedMap) {
const item = haocaiSelectedMap[key];
console.log(item)
index++;
this.$set(ele.haocais, index, {
consInfoId: item.id,
conInfoId: item.id,
consInfoId: item.consId,
conInfoId: item.consId,
conName: item.conName,
skuId: ele.skuId,
shopId: ele.shopId,
@ -685,14 +686,14 @@ export default {
console.log(arr);
for (let item of this.tableDatainformation.data) {
//id
const hasCacheIncludes = haocaiSelectedMap.hasOwnProperty(item.id);
const hasCacheIncludes = haocaiSelectedMap.hasOwnProperty(item.consId);
//id
const hasSelectedIncludes = arr.find((v) => v.id == item.id);
const hasSelectedIncludes = arr.find((v) => v.consId == item.consId);
if (hasSelectedIncludes) {
haocaiSelectedMap[item.id] = hasSelectedIncludes;
haocaiSelectedMap[item.consId] = hasSelectedIncludes;
}
if (hasCacheIncludes && !hasSelectedIncludes) {
delete haocaiSelectedMap[item.id];
delete haocaiSelectedMap[item.consId];
}
}
console.log(haocaiSelectedMap);
@ -906,7 +907,7 @@ export default {
},
//
tableDatainformationtable(item) {
haocaiSelectedMap[item.id] = item;
haocaiSelectedMap[item.consId] = item;
this.haocaiConfirm();
return;
this.commodityArr.forEach((ele) => {