Commit 6f9d6ca8 authored by your yuchenglong's avatar your yuchenglong

update:解决商品列表回显问题

parent 7548991f
...@@ -131,7 +131,11 @@ ...@@ -131,7 +131,11 @@
剩余库存:<span>{{ inventoryRest }}</span> 剩余库存:<span>{{ inventoryRest }}</span>
</div> </div>
<br /> <br />
<el-form-item label="商家" prop="business1" :rules="[{ required: true, message: '请选择商家' }]"> <el-form-item
label="商家"
prop="business1"
:rules="[{ required: true, message: '请选择商家' }]"
>
<el-select v-model="commodityForm.business1" placeholder="请选择"> <el-select v-model="commodityForm.business1" placeholder="请选择">
<el-option <el-option
v-for="item in businessOpt" v-for="item in businessOpt"
...@@ -390,6 +394,19 @@ export default { ...@@ -390,6 +394,19 @@ export default {
type: "success", type: "success",
}); });
this.pindanGoodsMet(); this.pindanGoodsMet();
setTimeout(() => {
for (var i in this.comTableData) {
if (this.comTableData[i].goods_sku_id == goodsSkuID) {
this.comTableData.splice(i, 1);
}
}
for (var j in this.comLibTableData) {
if (this.comLibTableData[j].goods_sku_id == goodsSkuID) {
this.comTableData.push(this.comLibTableData[j]);
}
}
},500);
this.addCommodityPopup = false; this.addCommodityPopup = false;
} else { } else {
ElMessage.error(res.reason); ElMessage.error(res.reason);
...@@ -436,7 +453,6 @@ export default { ...@@ -436,7 +453,6 @@ export default {
message: "添加商品成功", message: "添加商品成功",
type: "success", type: "success",
}); });
// [res.result.goods_info, ...this.multipleSelection];
this.comTableData.push(res.result.goods_info); this.comTableData.push(res.result.goods_info);
this.addCommodityPopup = false; this.addCommodityPopup = false;
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment