|
@@ -16,17 +16,30 @@
|
|
ref="saleStatus"
|
|
ref="saleStatus"
|
|
id="promotion-saleStatus"
|
|
id="promotion-saleStatus"
|
|
code="PROMO_CONTENT_TYPE"
|
|
code="PROMO_CONTENT_TYPE"
|
|
|
|
+ :disabled="disabledVal"
|
|
allowClear></v-select>
|
|
allowClear></v-select>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
<a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
<a-form-model-item label="券名称" prop="title" :label-col="{span:4}" :wrapper-col="{span:18}">
|
|
<a-form-model-item label="券名称" prop="title" :label-col="{span:4}" :wrapper-col="{span:18}">
|
|
- <a-input id="setPromotion-title" :maxLength="20" v-model.trim="sellForm.title" placeholder="请输入券名称(最多20个字符)" allowClear />
|
|
|
|
|
|
+ <a-input
|
|
|
|
+ :disabled="disabledVal"
|
|
|
|
+ id="setPromotion-title"
|
|
|
|
+ :maxLength="20"
|
|
|
|
+ v-model.trim="sellForm.title"
|
|
|
|
+ placeholder="请输入券名称(最多20个字符)"
|
|
|
|
+ allowClear />
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
<a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
<a-form-model-item label="券副标题" :label-col="{span:2}" :wrapper-col="{span:18}">
|
|
<a-form-model-item label="券副标题" :label-col="{span:2}" :wrapper-col="{span:18}">
|
|
- <a-input id="setPromotion-title" :maxLength="20" v-model.trim="sellForm.title" placeholder="请输入券副标题(最多20个字符)" allowClear />
|
|
|
|
|
|
+ <a-input
|
|
|
|
+ :disabled="disabledVal"
|
|
|
|
+ id="setPromotion-title"
|
|
|
|
+ :maxLength="20"
|
|
|
|
+ v-model.trim="sellForm.title"
|
|
|
|
+ placeholder="请输入券副标题(最多20个字符)"
|
|
|
|
+ allowClear />
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
|
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
|
@@ -37,6 +50,7 @@
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
:tree-data="treeData"
|
|
:tree-data="treeData"
|
|
tree-checkable
|
|
tree-checkable
|
|
|
|
+ :disabled="disabledVal"
|
|
:show-checked-strategy="SHOW_ALL"
|
|
:show-checked-strategy="SHOW_ALL"
|
|
:getPopupContainer="triggerNode => triggerNode.parentNode"
|
|
:getPopupContainer="triggerNode => triggerNode.parentNode"
|
|
placeholder="请选择产品范围" />
|
|
placeholder="请选择产品范围" />
|
|
@@ -46,7 +60,7 @@
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
|
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
|
<a-form-model-item label="生成方式" prop="contentType">
|
|
<a-form-model-item label="生成方式" prop="contentType">
|
|
- <a-radio-group v-model="sellForm.value" @change="onChangeType">
|
|
|
|
|
|
+ <a-radio-group v-model="sellForm.value" @change="onChangeType" :disabled="disabledVal">
|
|
<a-radio :value="1">
|
|
<a-radio :value="1">
|
|
按订单生成券
|
|
按订单生成券
|
|
</a-radio>
|
|
</a-radio>
|
|
@@ -71,10 +85,11 @@
|
|
:step="1"
|
|
:step="1"
|
|
:max="99999999"
|
|
:max="99999999"
|
|
:precision="0"
|
|
:precision="0"
|
|
|
|
+ :disabled="disabledVal"
|
|
size="small"/>
|
|
size="small"/>
|
|
<a-select
|
|
<a-select
|
|
default-value="GE"
|
|
default-value="GE"
|
|
- :disabled="i!=0"
|
|
|
|
|
|
+ :disabled="disabledVal"
|
|
v-model="couponForm.regularUnit"
|
|
v-model="couponForm.regularUnit"
|
|
style="width: 60px;"
|
|
style="width: 60px;"
|
|
size="small"
|
|
size="small"
|
|
@@ -88,6 +103,7 @@
|
|
</a-select>
|
|
</a-select>
|
|
活动产品,送<a-input-number
|
|
活动产品,送<a-input-number
|
|
v-model="couponForm.promotionValue"
|
|
v-model="couponForm.promotionValue"
|
|
|
|
+ :disabled="disabledVal"
|
|
style="margin:0 5px;"
|
|
style="margin:0 5px;"
|
|
:min="0"
|
|
:min="0"
|
|
:step="1"
|
|
:step="1"
|
|
@@ -96,12 +112,12 @@
|
|
size="small"/> 元
|
|
size="small"/> 元
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
<a-form-model-item label="活动产品" prop="region">
|
|
<a-form-model-item label="活动产品" prop="region">
|
|
- <a-button type="primary" @click="handleAddProduct" size="small">添加产品</a-button>
|
|
|
|
|
|
+ <a-button type="primary" @click="handleAddProduct" :disabled="disabledVal" size="small">添加产品</a-button>
|
|
<div class="productCon">
|
|
<div class="productCon">
|
|
- <a-tag closable @close="delBuyerName(con)">
|
|
|
|
|
|
+ <a-tag closable @close="delBuyerName(con)" :disabled="disabledVal">
|
|
产品编码
|
|
产品编码
|
|
</a-tag>
|
|
</a-tag>
|
|
- <a-tag closable @close="delBuyerName(con)">
|
|
|
|
|
|
+ <a-tag closable @close="delBuyerName(con)" :disabled="disabledVal">
|
|
产品编码
|
|
产品编码
|
|
</a-tag>
|
|
</a-tag>
|
|
</div>
|
|
</div>
|
|
@@ -113,8 +129,8 @@
|
|
</div>
|
|
</div>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="2" :sm="24">
|
|
<a-col :md="2" :sm="24">
|
|
- <a-button type="link" class="button-info">+新增</a-button>
|
|
|
|
- <a-button type="link">删除</a-button>
|
|
|
|
|
|
+ <a-button type="link" class="button-info" :disabled="disabledVal">+新增</a-button>
|
|
|
|
+ <a-button type="link" :disabled="disabledVal">删除</a-button>
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
<a-row v-show="sellForm.value===2" v-for="item in couponList" :key="item.id">
|
|
<a-row v-show="sellForm.value===2" v-for="item in couponList" :key="item.id">
|
|
@@ -129,13 +145,14 @@
|
|
:step="1"
|
|
:step="1"
|
|
:max="99999999"
|
|
:max="99999999"
|
|
:precision="0"
|
|
:precision="0"
|
|
|
|
+ :disabled="disabledVal"
|
|
size="small"/>
|
|
size="small"/>
|
|
<a-select
|
|
<a-select
|
|
default-value="GE"
|
|
default-value="GE"
|
|
- :disabled="i!=0"
|
|
|
|
v-model="couponForm.regularUnit"
|
|
v-model="couponForm.regularUnit"
|
|
style="width: 60px;"
|
|
style="width: 60px;"
|
|
size="small"
|
|
size="small"
|
|
|
|
+ :disabled="disabledVal"
|
|
@change="handleChangeUnit">
|
|
@change="handleChangeUnit">
|
|
<a-select-option value="GE">
|
|
<a-select-option value="GE">
|
|
个
|
|
个
|
|
@@ -151,15 +168,16 @@
|
|
:step="1"
|
|
:step="1"
|
|
:precision="2"
|
|
:precision="2"
|
|
:max="99999999"
|
|
:max="99999999"
|
|
|
|
+ :disabled="disabledVal"
|
|
size="small"/> 元
|
|
size="small"/> 元
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
<a-form-model-item label="活动产品" prop="region">
|
|
<a-form-model-item label="活动产品" prop="region">
|
|
- <a-button type="primary" @click="handleAddProduct" size="small">添加产品</a-button>
|
|
|
|
|
|
+ <a-button type="primary" :disabled="disabledVal" @click="handleAddProduct" size="small">添加产品</a-button>
|
|
<div class="productCon">
|
|
<div class="productCon">
|
|
- <a-tag closable @close="delBuyerName(con)">
|
|
|
|
|
|
+ <a-tag closable @close="delBuyerName(con)" :disabled="disabledVal">
|
|
产品编码
|
|
产品编码
|
|
</a-tag>
|
|
</a-tag>
|
|
- <a-tag closable @close="delBuyerName(con)">
|
|
|
|
|
|
+ <a-tag closable @close="delBuyerName(con)" :disabled="disabledVal">
|
|
产品编码
|
|
产品编码
|
|
</a-tag>
|
|
</a-tag>
|
|
</div>
|
|
</div>
|
|
@@ -168,14 +186,20 @@
|
|
全部产品
|
|
全部产品
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
<a-form-model-item label="使用说明" prop="desc">
|
|
<a-form-model-item label="使用说明" prop="desc">
|
|
- <a-input v-model="couponForm.desc" style="width:80%;" type="textarea" placeholder="请输入使用说明" :maxLength="200" />
|
|
|
|
|
|
+ <a-input
|
|
|
|
+ v-model="couponForm.desc"
|
|
|
|
+ :disabled="disabledVal"
|
|
|
|
+ style="width:80%;"
|
|
|
|
+ type="textarea"
|
|
|
|
+ placeholder="请输入使用说明"
|
|
|
|
+ :maxLength="200" />
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-form-model>
|
|
</a-form-model>
|
|
</div>
|
|
</div>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="2" :sm="24">
|
|
<a-col :md="2" :sm="24">
|
|
- <a-button type="link" v-if="i===0" class="button-info" @click="addCouponCon">+新增</a-button>
|
|
|
|
- <a-button type="link" v-else @click="delCouponCon(item.id)">删除</a-button>
|
|
|
|
|
|
+ <a-button type="link" v-if="i===0" class="button-info" @click="addCouponCon" :disabled="disabledVal">+新增</a-button>
|
|
|
|
+ <a-button type="link" v-else @click="delCouponCon(item.id)" :disabled="disabledVal">删除</a-button>
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
</div>
|
|
</div>
|
|
@@ -189,12 +213,12 @@
|
|
:xl="24"
|
|
:xl="24"
|
|
v-show="sellForm.value===1">
|
|
v-show="sellForm.value===1">
|
|
<a-form-model-item label="使用说明">
|
|
<a-form-model-item label="使用说明">
|
|
- <a-input v-model="sellForm.desc" type="textarea" placeholder="请输入使用说明" :maxLength="200" />
|
|
|
|
|
|
+ <a-input v-model="sellForm.desc" type="textarea" placeholder="请输入使用说明" :disabled="disabledVal" :maxLength="200" />
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :xs="24" :sm="24" :md="12" :lg="24" :xl="24">
|
|
<a-col :xs="24" :sm="24" :md="12" :lg="24" :xl="24">
|
|
<a-form-model-item label="券有效期">
|
|
<a-form-model-item label="券有效期">
|
|
- <a-radio-group v-model="sellForm.termVal">
|
|
|
|
|
|
+ <a-radio-group v-model="sellForm.termVal" :disabled="disabledVal">
|
|
<a-radio :style="radioStyle" :value="1">
|
|
<a-radio :style="radioStyle" :value="1">
|
|
<span>固定日期</span>
|
|
<span>固定日期</span>
|
|
<a-range-picker
|
|
<a-range-picker
|
|
@@ -202,6 +226,7 @@
|
|
v-model="sellForm.time"
|
|
v-model="sellForm.time"
|
|
:format="dateFormat"
|
|
:format="dateFormat"
|
|
@change="dateChange"
|
|
@change="dateChange"
|
|
|
|
+ :disabled="disabledVal"
|
|
:placeholder="['开始时间', '结束时间']" />
|
|
:placeholder="['开始时间', '结束时间']" />
|
|
<!-- :disabled-date="disabledDate" -->
|
|
<!-- :disabled-date="disabledDate" -->
|
|
</a-radio>
|
|
</a-radio>
|
|
@@ -211,6 +236,7 @@
|
|
v-model="sellForm.regularValue"
|
|
v-model="sellForm.regularValue"
|
|
:step="1"
|
|
:step="1"
|
|
:max="99999999"
|
|
:max="99999999"
|
|
|
|
+ :disabled="disabledVal"
|
|
:precision="0"/>天
|
|
:precision="0"/>天
|
|
</a-radio>
|
|
</a-radio>
|
|
</a-radio-group>
|
|
</a-radio-group>
|
|
@@ -218,7 +244,7 @@
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :xs="24" :sm="24" :md="12" :lg="24" :xl="24">
|
|
<a-col :xs="24" :sm="24" :md="12" :lg="24" :xl="24">
|
|
<a-form-model-item label="加盟商编辑" prop="enabledFlag">
|
|
<a-form-model-item label="加盟商编辑" prop="enabledFlag">
|
|
- <a-radio-group button-style="solid" v-model="sellForm.enabledFlag">
|
|
|
|
|
|
+ <a-radio-group button-style="solid" :disabled="disabledVal" v-model="sellForm.enabledFlag">
|
|
<a-radio-button value="1">
|
|
<a-radio-button value="1">
|
|
是
|
|
是
|
|
</a-radio-button>
|
|
</a-radio-button>
|
|
@@ -242,6 +268,12 @@ export default {
|
|
name: 'PromotionAddModal',
|
|
name: 'PromotionAddModal',
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
components: { VSelect },
|
|
components: { VSelect },
|
|
|
|
+ props: {
|
|
|
|
+ disabledVal: {
|
|
|
|
+ type: Boolean,
|
|
|
|
+ default: false
|
|
|
|
+ }
|
|
|
|
+ },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
spinning: false,
|
|
spinning: false,
|
|
@@ -315,7 +347,6 @@ export default {
|
|
handleChangeUnit () {},
|
|
handleChangeUnit () {},
|
|
// 添加产品
|
|
// 添加产品
|
|
handleAddProduct () {
|
|
handleAddProduct () {
|
|
- console.log('111111111111111111:')
|
|
|
|
this.$emit('addProduct', true)
|
|
this.$emit('addProduct', true)
|
|
},
|
|
},
|
|
// 生成方式 change
|
|
// 生成方式 change
|