修改商品绑定耗材提交的id字段
This commit is contained in:
@@ -414,7 +414,7 @@
|
|||||||
<el-table-column label="单位" prop="conUnit" />
|
<el-table-column label="单位" prop="conUnit" />
|
||||||
<el-table-column label="库存数量" prop="stockNumber">
|
<el-table-column label="库存数量" prop="stockNumber">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
{{ (scope.row.stockNumber - scope.row.stockConsume).toFixed(2) }}
|
{{ scope.row.balance}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
@@ -626,7 +626,7 @@ export default {
|
|||||||
initTableSelected() {
|
initTableSelected() {
|
||||||
for (let i in haocaiSelectedMap) {
|
for (let i in haocaiSelectedMap) {
|
||||||
const index = this.tableDatainformation.data.findIndex(
|
const index = this.tableDatainformation.data.findIndex(
|
||||||
(v) => v.id == i
|
(v) => v.consId == i
|
||||||
);
|
);
|
||||||
if (index != -1 && haocaiSelectedMap[i]) {
|
if (index != -1 && haocaiSelectedMap[i]) {
|
||||||
//删除缓存里的id
|
//删除缓存里的id
|
||||||
@@ -658,10 +658,11 @@ export default {
|
|||||||
let index = -1;
|
let index = -1;
|
||||||
for (let key in haocaiSelectedMap) {
|
for (let key in haocaiSelectedMap) {
|
||||||
const item = haocaiSelectedMap[key];
|
const item = haocaiSelectedMap[key];
|
||||||
|
console.log(item)
|
||||||
index++;
|
index++;
|
||||||
this.$set(ele.haocais, index, {
|
this.$set(ele.haocais, index, {
|
||||||
consInfoId: item.id,
|
consInfoId: item.consId,
|
||||||
conInfoId: item.id,
|
conInfoId: item.consId,
|
||||||
conName: item.conName,
|
conName: item.conName,
|
||||||
skuId: ele.skuId,
|
skuId: ele.skuId,
|
||||||
shopId: ele.shopId,
|
shopId: ele.shopId,
|
||||||
@@ -685,14 +686,14 @@ export default {
|
|||||||
console.log(arr);
|
console.log(arr);
|
||||||
for (let item of this.tableDatainformation.data) {
|
for (let item of this.tableDatainformation.data) {
|
||||||
//判断缓存队列是否有这个id
|
//判断缓存队列是否有这个id
|
||||||
const hasCacheIncludes = haocaiSelectedMap.hasOwnProperty(item.id);
|
const hasCacheIncludes = haocaiSelectedMap.hasOwnProperty(item.consId);
|
||||||
//判断当前选中队列里是否有这个id
|
//判断当前选中队列里是否有这个id
|
||||||
const hasSelectedIncludes = arr.find((v) => v.id == item.id);
|
const hasSelectedIncludes = arr.find((v) => v.consId == item.consId);
|
||||||
if (hasSelectedIncludes) {
|
if (hasSelectedIncludes) {
|
||||||
haocaiSelectedMap[item.id] = hasSelectedIncludes;
|
haocaiSelectedMap[item.consId] = hasSelectedIncludes;
|
||||||
}
|
}
|
||||||
if (hasCacheIncludes && !hasSelectedIncludes) {
|
if (hasCacheIncludes && !hasSelectedIncludes) {
|
||||||
delete haocaiSelectedMap[item.id];
|
delete haocaiSelectedMap[item.consId];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(haocaiSelectedMap);
|
console.log(haocaiSelectedMap);
|
||||||
@@ -906,7 +907,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 耗材信息的信息
|
// 耗材信息的信息
|
||||||
tableDatainformationtable(item) {
|
tableDatainformationtable(item) {
|
||||||
haocaiSelectedMap[item.id] = item;
|
haocaiSelectedMap[item.consId] = item;
|
||||||
this.haocaiConfirm();
|
this.haocaiConfirm();
|
||||||
return;
|
return;
|
||||||
this.commodityArr.forEach((ele) => {
|
this.commodityArr.forEach((ele) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user