fix: 修复新增首个规格项的规格值时。规格列表显示错乱问题
parent
eb9c999a16
commit
17a4131bf1
|
@ -5,7 +5,7 @@
|
||||||
<Card class="mb_10" v-if="(afterSale.serviceStatus == 'PASS' &&
|
<Card class="mb_10" v-if="(afterSale.serviceStatus == 'PASS' &&
|
||||||
afterSale.serviceType != 'RETURN_MONEY') || (afterSale.afterSaleAllowOperationVO && afterSale.afterSaleAllowOperationVO.cancel)">
|
afterSale.serviceType != 'RETURN_MONEY') || (afterSale.afterSaleAllowOperationVO && afterSale.afterSaleAllowOperationVO.cancel)">
|
||||||
<Button type="success" @click="openModal" v-if="afterSale.serviceStatus == 'PASS' &&
|
<Button type="success" @click="openModal" v-if="afterSale.serviceStatus == 'PASS' &&
|
||||||
afterSale.serviceType != 'RETURN_MONEY'" size="small">提交物流</Button>
|
afterSale.serviceType != 'RETURN_MONEY'" size="small">提交物流</Button>
|
||||||
<Button type="error" @click="cancel(afterSale.sn)" v-if="afterSale.afterSaleAllowOperationVO && afterSale.afterSaleAllowOperationVO.cancel" size="small">取消售后</Button>
|
<Button type="error" @click="cancel(afterSale.sn)" v-if="afterSale.afterSaleAllowOperationVO && afterSale.afterSaleAllowOperationVO.cancel" size="small">取消售后</Button>
|
||||||
</Card>
|
</Card>
|
||||||
<div class="order-card">
|
<div class="order-card">
|
||||||
|
|
|
@ -1473,18 +1473,35 @@ export default {
|
||||||
filterSkuInfo.forEach((skuInfo) => {
|
filterSkuInfo.forEach((skuInfo) => {
|
||||||
totalLength *= skuInfo.spec_values.length;
|
totalLength *= skuInfo.spec_values.length;
|
||||||
});
|
});
|
||||||
for (let i = 0; i < totalLength; i++) {
|
if ($index === 0) {
|
||||||
let find = cloneObj(this.skuTableData[index - 1]);
|
index = 1;
|
||||||
find[item.name] = "";
|
for (let i = 0; i < totalLength; i++) {
|
||||||
find.id = "";
|
let find = cloneObj(this.skuTableData[index - 1]);
|
||||||
find.price && (find.price = "");
|
find[item.name] = "";
|
||||||
find.sn && (find.sn = "");
|
find.id = "";
|
||||||
find.cost && (find.cost = "");
|
find.price && (find.price = "");
|
||||||
find.quantity && (find.quantity = "");
|
find.sn && (find.sn = "");
|
||||||
find.weight && (find.weight = "");
|
find.cost && (find.cost = "");
|
||||||
|
find.quantity && (find.quantity = "");
|
||||||
|
find.weight && (find.weight = "");
|
||||||
|
|
||||||
this.skuTableData.splice(index, 0, find);
|
this.skuTableData.splice(this.skuTableData.length, 0, find);
|
||||||
index += beforeLength + 1;
|
index ++;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (let i = 0; i < totalLength; i++) {
|
||||||
|
let find = cloneObj(this.skuTableData[index - 1]);
|
||||||
|
find[item.name] = "";
|
||||||
|
find.id = "";
|
||||||
|
find.price && (find.price = "");
|
||||||
|
find.sn && (find.sn = "");
|
||||||
|
find.cost && (find.cost = "");
|
||||||
|
find.quantity && (find.quantity = "");
|
||||||
|
find.weight && (find.weight = "");
|
||||||
|
|
||||||
|
this.skuTableData.splice(index, 0, find);
|
||||||
|
index += $index === 0 ? beforeLength : beforeLength + 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.baseInfoForm.regeneratorSkuFlag = true;
|
this.baseInfoForm.regeneratorSkuFlag = true;
|
||||||
|
|
Loading…
Reference in New Issue