|
@@ -88,12 +88,16 @@
|
|
|
<elxUpload
|
|
<elxUpload
|
|
|
:limit="4"
|
|
:limit="4"
|
|
|
:fileList.sync="fileList_show"
|
|
:fileList.sync="fileList_show"
|
|
|
|
|
+ :disabled="ruleForm.categoryIdList.length == 0"
|
|
|
@success="fromToData"
|
|
@success="fromToData"
|
|
|
@handleRemove="fromToData"
|
|
@handleRemove="fromToData"
|
|
|
></elxUpload>
|
|
></elxUpload>
|
|
|
|
|
+ <p style="color: red" v-show="ruleForm.categoryIdList.length == 0">
|
|
|
|
|
+ 请先选择分类
|
|
|
|
|
+ </p>
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
- <el-button type="primary" size="small" @click="imgStoreModal = true"
|
|
|
|
|
|
|
+ <el-button type="primary" size="small" @click="openStore"
|
|
|
>从图库选择</el-button
|
|
>从图库选择</el-button
|
|
|
>
|
|
>
|
|
|
</div>
|
|
</div>
|
|
@@ -435,10 +439,18 @@ export default {
|
|
|
},
|
|
},
|
|
|
checkImage() {
|
|
checkImage() {
|
|
|
this.imgStoreModal = false;
|
|
this.imgStoreModal = false;
|
|
|
|
|
+
|
|
|
|
|
+ this.fileList_show = this.fileList_show.concat(
|
|
|
|
|
+ this.imgStoreArr.map(e => {
|
|
|
|
|
+ return {
|
|
|
|
|
+ url: e,
|
|
|
|
|
+ status: 'success'
|
|
|
|
|
+ };
|
|
|
|
|
+ })
|
|
|
|
|
+ );
|
|
|
},
|
|
},
|
|
|
setCheckImg(val) {
|
|
setCheckImg(val) {
|
|
|
this.$set(this.ruleForm, 'shopImg', this.ruleForm.shopImg.concat(val));
|
|
this.$set(this.ruleForm, 'shopImg', this.ruleForm.shopImg.concat(val));
|
|
|
- console.log(this.ruleForm.shopImg, val);
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
// 编辑器
|
|
// 编辑器
|
|
@@ -466,13 +478,13 @@ export default {
|
|
|
},
|
|
},
|
|
|
// 款式选择弹窗
|
|
// 款式选择弹窗
|
|
|
styleDelFn(index) {
|
|
styleDelFn(index) {
|
|
|
- this.actionOption = false;
|
|
|
|
|
let num = this.getStyleNum();
|
|
let num = this.getStyleNum();
|
|
|
console.log('num', num);
|
|
console.log('num', num);
|
|
|
if (num == 1) {
|
|
if (num == 1) {
|
|
|
this.$message.error('最少保留一个款式!');
|
|
this.$message.error('最少保留一个款式!');
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
+ this.actionOption = false;
|
|
|
if (this.styleStoreData[index].action == 'update') {
|
|
if (this.styleStoreData[index].action == 'update') {
|
|
|
// this.styleStoreData[index].action = 'delete';
|
|
// this.styleStoreData[index].action = 'delete';
|
|
|
this.$set(this.styleStoreData[index], 'action', 'delete');
|
|
this.$set(this.styleStoreData[index], 'action', 'delete');
|
|
@@ -490,6 +502,12 @@ export default {
|
|
|
}
|
|
}
|
|
|
let form = JSON.parse(JSON.stringify(this.styleForm));
|
|
let form = JSON.parse(JSON.stringify(this.styleForm));
|
|
|
this.styleStoreData.push(form);
|
|
this.styleStoreData.push(form);
|
|
|
|
|
+ },
|
|
|
|
|
+ openStore() {
|
|
|
|
|
+ if (this.ruleForm.categoryIdList.length == 0) {
|
|
|
|
|
+ return this.$message.error('请先选择分类');
|
|
|
|
|
+ }
|
|
|
|
|
+ this.imgStoreModal = true;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|