|
@@ -50,9 +50,9 @@ |
|
@@ -50,9 +50,9 @@ |
50
|
<CheckboxSize :sort-id="this.product.smallSortId" :select-sizes="table.defaultSelectedSizes" @on-change="selectSize"></CheckboxSize>
|
50
|
<CheckboxSize :sort-id="this.product.smallSortId" :select-sizes="table.defaultSelectedSizes" @on-change="selectSize"></CheckboxSize>
|
51
|
</Form-item>
|
51
|
</Form-item>
|
52
|
<Form-item>
|
52
|
<Form-item>
|
53
|
- <TableGood ref="tableGood" v-model="table.data"
|
53
|
+ <TableGoodSize ref="tableGood" v-model="table.data"
|
54
|
@on-upload="uploadGoodSzieSuccess"
|
54
|
@on-upload="uploadGoodSzieSuccess"
|
55
|
- @on-factory-name="onChangeFactoryCode"></TableGood>
|
55
|
+ @on-factory-name="onChangeFactoryCode"></TableGoodSize>
|
56
|
</Form-item>
|
56
|
</Form-item>
|
57
|
<div class="create-item-title">商品价格</div>
|
57
|
<div class="create-item-title">商品价格</div>
|
58
|
<Form-item label="吊牌价">
|
58
|
<Form-item label="吊牌价">
|
|
@@ -69,27 +69,34 @@ |
|
@@ -69,27 +69,34 @@ |
69
|
<div class="create-item-title">商品颜色主图
|
69
|
<div class="create-item-title">商品颜色主图
|
70
|
<span class="create-group-sub-title">(商品正面图默认为用户选择商品颜色和展示使用。用户从不同频道查看商品,优先展示频道封面图)</span>
|
70
|
<span class="create-group-sub-title">(商品正面图默认为用户选择商品颜色和展示使用。用户从不同频道查看商品,优先展示频道封面图)</span>
|
71
|
</div>
|
71
|
</div>
|
72
|
- <GoodImage v-model="product.goods"></GoodImage>
|
72
|
+ <ImageGoodsMain v-model="product.goods"></ImageGoodsMain>
|
73
|
<div class="create-item-title">商品描述(详情页内容)</div>
|
73
|
<div class="create-item-title">商品描述(详情页内容)</div>
|
74
|
<editor :content="product.productIntro"
|
74
|
<editor :content="product.productIntro"
|
75
|
@change="updateProductDesc"></editor>
|
75
|
@change="updateProductDesc"></editor>
|
76
|
<div class="create-item-title">商品属性</div>
|
76
|
<div class="create-item-title">商品属性</div>
|
77
|
- <Form-item :label="attr.attributeName"
|
|
|
78
|
- v-for="attr in render.productStandardRelationStr"
|
77
|
+ <template v-for="(attrs, index) in [render.productStandardRelationStr, render.attributeProValuesOne, render.attributeProValuesTwo]">
|
|
|
78
|
+ <Form-item :label="attr.attributeName"
|
|
|
79
|
+ v-for="attr in attrs"
|
79
|
:key="attr">
|
80
|
:key="attr">
|
80
|
- <MuliSelect v-model="attr.model" :attr="attr"></MuliSelect>
|
|
|
81
|
- </Form-item>
|
|
|
82
|
- <Form-item :label="attr.attributeName"
|
|
|
83
|
- v-for="attr in render.attributeProValuesOne"
|
|
|
84
|
- :key="attr">
|
|
|
85
|
- <MuliSelect v-model="attr.model" :attr="attr"></MuliSelect>
|
|
|
86
|
- </Form-item>
|
|
|
87
|
- <Form-item :label="attr.attributeName" v-for="attr in render.attributeProValuesTwo" :key="attr">
|
|
|
88
|
- <MuliSelect v-model="attr.model" :attr="attr"></MuliSelect>
|
|
|
89
|
- </Form-item>
|
81
|
+ <template v-if="attr.inputType === 'select'">
|
|
|
82
|
+ <Select v-model="attr.model[0]"
|
|
|
83
|
+ :placeholder="'请选择' + attr.attributeName">
|
|
|
84
|
+ <Option v-for="name in attr.idNameList" :value="name.id" :key="name">{{name.text}}</Option>
|
|
|
85
|
+ </Select>
|
|
|
86
|
+ </template>
|
|
|
87
|
+
|
|
|
88
|
+ <template v-else>
|
|
|
89
|
+ <Checkbox-group v-model="attr.model">
|
|
|
90
|
+ <Checkbox v-for="name in attr.idNameList" :label="name.id" :key="name">
|
|
|
91
|
+ <span>{{name.text}}</span>
|
|
|
92
|
+ </Checkbox>
|
|
|
93
|
+ </Checkbox-group>
|
|
|
94
|
+ </template>
|
|
|
95
|
+ </Form-item>
|
|
|
96
|
+ </template>
|
90
|
<Form-item v-if="render.productMaterial" :label="render.productMaterial.attributeName">
|
97
|
<Form-item v-if="render.productMaterial" :label="render.productMaterial.attributeName">
|
91
|
- <Material v-model="product.materialList" :idNameList="render.productMaterial.idNameList">
|
|
|
92
|
- </Material>
|
98
|
+ <CheckboxMaterial v-model="product.materialList" :idNameList="render.productMaterial.idNameList">
|
|
|
99
|
+ </CheckboxMaterial>
|
93
|
</Form-item>
|
100
|
</Form-item>
|
94
|
<Form-item>
|
101
|
<Form-item>
|
95
|
<Button type="primary" @click="submit" size="large">保存</Button>
|
102
|
<Button type="primary" @click="submit" size="large">保存</Button>
|
|
@@ -99,10 +106,11 @@ |
|
@@ -99,10 +106,11 @@ |
99
|
</template>
|
106
|
</template>
|
100
|
<script>
|
107
|
<script>
|
101
|
import _ from 'lodash';
|
108
|
import _ from 'lodash';
|
102
|
-import {Material, MuliSelect, TableGood, GoodImage} from './components';
|
|
|
103
|
-import { CheckboxAge, CheckboxColor, CheckboxSize } from 'components/checkbox';
|
109
|
+import { CheckboxAge, CheckboxColor, CheckboxSize, CheckboxMaterial } from 'components/checkbox';
|
104
|
import { SelectSeason } from 'components/select';
|
110
|
import { SelectSeason } from 'components/select';
|
105
|
import { RadioSeason, RadioGender } from 'components/radio';
|
111
|
import { RadioSeason, RadioGender } from 'components/radio';
|
|
|
112
|
+import { TableGoodSize } from 'components/table';
|
|
|
113
|
+import { ImageGoodsMain } from 'components/image';
|
106
|
|
114
|
|
107
|
import service from 'product-create/service';
|
115
|
import service from 'product-create/service';
|
108
|
import api from 'product-create/api';
|
116
|
import api from 'product-create/api';
|
|
@@ -448,7 +456,6 @@ export default { |
|
@@ -448,7 +456,6 @@ export default { |
448
|
JSON.stringify(serial.handleOne(this.product.productSkn, this.render.attributeProValuesOne));
|
456
|
JSON.stringify(serial.handleOne(this.product.productSkn, this.render.attributeProValuesOne));
|
449
|
newProduct.attributeProValuesTwo =
|
457
|
newProduct.attributeProValuesTwo =
|
450
|
JSON.stringify(serial.handleTwo(this.product.productSkn, this.render.attributeProValuesTwo));
|
458
|
JSON.stringify(serial.handleTwo(this.product.productSkn, this.render.attributeProValuesTwo));
|
451
|
-
|
|
|
452
|
newProduct.productMaterial = this.product.materialList.map(s => s.id).join(',');
|
459
|
newProduct.productMaterial = this.product.materialList.map(s => s.id).join(',');
|
453
|
newProduct.productIntro = this.product.productIntro;
|
460
|
newProduct.productIntro = this.product.productIntro;
|
454
|
|
461
|
|
|
@@ -520,16 +527,15 @@ export default { |
|
@@ -520,16 +527,15 @@ export default { |
520
|
}
|
527
|
}
|
521
|
},
|
528
|
},
|
522
|
components: {
|
529
|
components: {
|
523
|
- Material,
|
|
|
524
|
- MuliSelect,
|
|
|
525
|
- TableGood,
|
530
|
+ CheckboxMaterial,
|
|
|
531
|
+ TableGoodSize,
|
526
|
CheckboxAge,
|
532
|
CheckboxAge,
|
527
|
RadioSeason,
|
533
|
RadioSeason,
|
528
|
RadioGender,
|
534
|
RadioGender,
|
529
|
SelectSeason,
|
535
|
SelectSeason,
|
530
|
CheckboxColor,
|
536
|
CheckboxColor,
|
531
|
CheckboxSize,
|
537
|
CheckboxSize,
|
532
|
- GoodImage
|
538
|
+ ImageGoodsMain
|
533
|
}
|
539
|
}
|
534
|
};
|
540
|
};
|
535
|
</script>
|
541
|
</script>
|