修改商品绑定耗材提交的id字段
This commit is contained in:
parent
483ff5d234
commit
f66d4655d1
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue