|
@@ -140,7 +140,7 @@
|
|
|
<!-- 参数配置 -->
|
|
|
<a-row style="width:83%;margin:0 auto 24px;" v-if="form.contentType =='LINK'&&form.linkType!='2'">
|
|
|
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
|
|
- <a-checkbox @change="onChangeParams" :disabled="isDisabled" v-model="isShowParams">参数配置</a-checkbox>
|
|
|
+ <a-checkbox :disabled="true" v-model="isShowParams">参数配置</a-checkbox>
|
|
|
</a-col>
|
|
|
<a-col
|
|
|
:xs="24"
|
|
@@ -150,11 +150,17 @@
|
|
|
:xl="24"
|
|
|
v-show="isShowParams">
|
|
|
<!-- 参数配置内容 -->
|
|
|
- <setPromotion ref="setContent" style="margin-top:20px;" :disabledVal="isDisabled" @addProduct="insterProduct"></setPromotion>
|
|
|
+ <setPromotion ref="setContent" style="margin-top:20px;" :pageType="pageType" :disabledVal="isDisabled" @addProduct="insterProduct"></setPromotion>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
<a-row>
|
|
|
- <a-col :xs="24" :sm="24" :md="24" :lg="16" :xl="16">
|
|
|
+ <a-col
|
|
|
+ :xs="24"
|
|
|
+ :sm="24"
|
|
|
+ :md="24"
|
|
|
+ :lg="16"
|
|
|
+ :xl="16"
|
|
|
+ v-if="form.contentType =='LINK'&&form.linkType==='1'">
|
|
|
<a-form-model-item label="加盟商编辑" prop="dealerEditFlag" :label-col="{span:3}" :wrapper-col="{span:18}">
|
|
|
<a-radio-group button-style="solid" :disabled="(form.contentType !='LINK'||!isShowParams||isDisabled)" v-model="form.dealerEditFlag">
|
|
|
<a-radio-button value="1">
|
|
@@ -207,6 +213,7 @@
|
|
|
ref="chooseProduct"
|
|
|
:chooseType="chooseTypeList"
|
|
|
:chooseData="chooseDataList"
|
|
|
+ :chooseProduct="chooseProductList"
|
|
|
:openModal="showProModal"
|
|
|
v-if="pageType!='see'"
|
|
|
@ok="addProductSuccess"
|
|
@@ -263,11 +270,12 @@ export default {
|
|
|
},
|
|
|
pageType: undefined, // 页面类型
|
|
|
showProModal: false,
|
|
|
- isShowParams: false, // 是否显示参数配置内容
|
|
|
+ isShowParams: true, // 是否显示参数配置内容
|
|
|
openShowModal: false,
|
|
|
isDisabled: false, // 控制是否能编辑
|
|
|
chooseTypeList: [],
|
|
|
chooseDataList: [],
|
|
|
+ chooseProductList: [],
|
|
|
imageSet: [], // 回显显示图片数据
|
|
|
rules: {
|
|
|
title: [
|
|
@@ -298,40 +306,12 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- // 设置参数
|
|
|
- onChangeParams (e) {
|
|
|
- const _this = this
|
|
|
- _this.isShowParams = e.target.checked
|
|
|
- _this.form.ruleEnableFlag = e.target.checked ? '1' : '0'
|
|
|
- if (_this.pageType === 'add') {
|
|
|
- _this.$nextTick(() => {
|
|
|
- _this.$refs.setContent.addCouponCon()
|
|
|
- })
|
|
|
- } else {
|
|
|
- if (!e.target.checked) {
|
|
|
- _this.$refs.setContent.clearContent()
|
|
|
- _this.$nextTick(() => {
|
|
|
- _this.$refs.setContent.addCouponCon()
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- // _this.$confirm({
|
|
|
- // title: '提示',
|
|
|
- // content: '改变参数配置,参数配置内容将清空,确认改变吗?',
|
|
|
- // centered: true,
|
|
|
- // onOk () {
|
|
|
- // },
|
|
|
- // onCancel () {
|
|
|
- // _this.isShowParams = !e.target.checked
|
|
|
- // _this.form.ruleEnableFlag = e.target.checked ? '1' : '0'
|
|
|
- // }
|
|
|
- // })
|
|
|
- },
|
|
|
// 打开产品弹窗
|
|
|
insterProduct (obj) {
|
|
|
if (obj && Object.keys(obj).length > 0) {
|
|
|
this.chooseTypeList = obj.typeArr
|
|
|
this.chooseDataList = obj.productArr
|
|
|
+ this.chooseProductList = obj.chooseProductArr
|
|
|
}
|
|
|
this.showProModal = true
|
|
|
},
|
|
@@ -424,6 +404,8 @@ export default {
|
|
|
_this.saveInfo()
|
|
|
}
|
|
|
})
|
|
|
+ } else {
|
|
|
+ _this.saveInfo()
|
|
|
}
|
|
|
},
|
|
|
saveInfo () {
|
|
@@ -470,8 +452,12 @@ export default {
|
|
|
// 重置
|
|
|
resetSearchForm () {
|
|
|
if (this.pageType == 'add' || (this.pageType == 'edit' && !this.isDisabled)) {
|
|
|
- this.$refs.imageSet.setFileList('')
|
|
|
- this.$refs.videoSet.setFileList('')
|
|
|
+ if (this.$refs.imageSet) {
|
|
|
+ this.$refs.imageSet.setFileList('')
|
|
|
+ }
|
|
|
+ if (this.$refs.videoSet) {
|
|
|
+ this.$refs.videoSet.setFileList('')
|
|
|
+ }
|
|
|
}
|
|
|
if (this.$refs.editor) {
|
|
|
this.$refs.editor.setHtml('')
|
|
@@ -484,7 +470,7 @@ export default {
|
|
|
content: '', // 内容
|
|
|
contentLink: '', // 链接内容
|
|
|
sort: undefined, // 排序
|
|
|
- ruleEnableFlag: '0', // 参数配置 1勾选配置 0不能配置
|
|
|
+ ruleEnableFlag: '1', // 参数配置 1勾选配置 0不能配置
|
|
|
publishState: 'UNPUBLISH', // 是否发布
|
|
|
dealerEditFlag: '0', // 加盟商编辑 1是 0否
|
|
|
// 参数配置数据
|
|
@@ -504,8 +490,12 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
this.isDisabled = false
|
|
|
- this.$refs.setContent.clearContent()
|
|
|
- this.$refs.ruleForm.resetFields()
|
|
|
+ if (this.$refs.setContent) {
|
|
|
+ this.$refs.setContent.clearContent()
|
|
|
+ }
|
|
|
+ if (this.$refs.ruleForm) {
|
|
|
+ this.$refs.ruleForm.resetFields()
|
|
|
+ }
|
|
|
},
|
|
|
// 选择内容类型
|
|
|
changeContentType (e) {
|