去掉商品参数的一些信息

master
pikachu 2021-05-20 08:29:32 +08:00
parent 8971996731
commit 697e4820a4
1 changed files with 4 additions and 18 deletions

View File

@ -592,25 +592,15 @@
:key="index" :key="index"
:label="`${goodsParamsList.paramName}`" :label="`${goodsParamsList.paramName}`"
> >
<Input
v-if="goodsParamsList.paramType === 1"
type="text"
v-model="goodsParamsList.paramValue"
placeholder="长度为最多50个字符"
maxlength="50"
clearable
style="width: 260px"
/>
<Select <Select
v-model="goodsParamsList.paramValue" v-model="goodsParamsList.paramValue"
v-if="goodsParamsList.paramType === 2"
placeholder="请选择" placeholder="请选择"
style="width: 200px" style="width: 200px"
clearable clearable
> >
<Option <Option
v-for="option in goodsParamsList.optionList" v-for="option in goodsParamsList.optionList"
:key="option" :key="option.paramValue"
:label="option" :label="option"
:value="option" :value="option"
></Option> ></Option>
@ -1370,18 +1360,14 @@ export default {
(ij) => ij.paramName === elem.paramName (ij) => ij.paramName === elem.paramName
) )
) { ) {
if (elem.paramType === 2) { elem.optionList = elem.options.split(",");
elem.optionList = elem.options.split(",");
}
this.baseInfoForm.goodsParamsList.push(elem); this.baseInfoForm.goodsParamsList.push(elem);
} }
if (this.$route.query.id || this.draftId) { if (this.$route.query.id || this.draftId) {
this.baseInfoForm.goodsParamsList = this.baseInfoForm.goodsParamsList.map( this.baseInfoForm.goodsParamsList = this.baseInfoForm.goodsParamsList.map(
(i) => { (i) => {
if (i.paramId === elem.id || i.id === elem.id) { if (i.paramId === elem.id || i.id === elem.id) {
if (elem.paramType === 2) { elem.optionList = elem.options.split(",");
elem.optionList = elem.options.split(",");
}
i = { i = {
...i, ...i,
...elem, ...elem,
@ -1851,7 +1837,7 @@ export default {
if (this.baseInfoForm.freightPayer !== "BUYER") { if (this.baseInfoForm.freightPayer !== "BUYER") {
this.baseInfoForm.templateId = 0; this.baseInfoForm.templateId = 0;
} }
this.baseInfoForm.skuList = this.skuTableData.map((sku) => { this.baseInfoForm.skuList = this.skuTableData.map((sku) => {
delete sku._index; delete sku._index;
delete sku._rowKey; delete sku._rowKey;