Commit f2a1f2af by cwq0219

Merge branch 'v1.0.1' of http://192.168.3.233:8090/saas/scrm-micro-marketing into v1.0.1

2 parents 22757de9 9ff13cc9
...@@ -7,17 +7,24 @@ ...@@ -7,17 +7,24 @@
<div class="card_one"> <div class="card_one">
<div> <div>
<span class="cname">{{ editForm.couponName }}</span> <span class="cname">{{ editForm.couponName }}</span>
<span class="ctype"><span class="ctypeName">代金券</span></span> <span class="ctype">
<span class="ctypeName">代金券</span>
</span>
</div> </div>
<div class="ctime"> <div class="ctime">
<span class="ctime_name">有效期:</span> <span class="ctime_name">有效期:</span>
<span class="ctime_content" v-if="editForm.effectiveType == 3">无限制</span> <span class="ctime_content" v-if="editForm.effectiveType == 3">无限制</span>
<span class="ctime_content" v-if="editForm.effectiveType == 1">{{ editForm.effectiveDays }}天</span> <span
class="ctime_content"
v-if="editForm.effectiveType == 1"
>{{ editForm.effectiveDays }}天</span>
<span class="ctime_content" v-if="editForm.effectiveType == 2">{{ couponTime }}</span> <span class="ctime_content" v-if="editForm.effectiveType == 2">{{ couponTime }}</span>
</div> </div>
<div class="ctime"> <div class="ctime">
<span class="ctime_name">使用限制:</span> <span class="ctime_name">使用限制:</span>
<span class="ctime_content">{{ editForm.useBarriers == 1 ? '无限制' : '满' + editForm.full + '可用' }}</span> <span
class="ctime_content"
>{{ editForm.useBarriers == 1 ? '无限制' : '满' + editForm.full + '可用' }}</span>
</div> </div>
</div> </div>
<div class="card_two"> <div class="card_two">
...@@ -26,7 +33,17 @@ ...@@ -26,7 +33,17 @@
</div> </div>
</div> </div>
<p class="edit-title">{{ title }}代金券</p> <p class="edit-title">{{ title }}代金券</p>
<glsx-combi-form class="edit-form-container" style="min-height: 570px;" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"> <glsx-combi-form
class="edit-form-container"
style="min-height: 570px;"
ref="editFormRef"
:isEdit="true"
:isBlock="true"
:formRef="editChildRef"
:formObj="editForm"
:formData="editFormData"
:formRules="editRule"
>
<template slot="useChannelHtml"> <template slot="useChannelHtml">
<el-radio v-model="editForm.useChannel" label="1" :disabled="apear != 'couponAdd'">线上商品</el-radio> <el-radio v-model="editForm.useChannel" label="1" :disabled="apear != 'couponAdd'">线上商品</el-radio>
<el-radio v-model="editForm.useChannel" label="2" :disabled="apear != 'couponAdd'">到店核销</el-radio> <el-radio v-model="editForm.useChannel" label="2" :disabled="apear != 'couponAdd'">到店核销</el-radio>
...@@ -34,34 +51,68 @@ ...@@ -34,34 +51,68 @@
<template slot="effectiveHtml"> <template slot="effectiveHtml">
<el-radio v-model="editForm.effectiveType" label="3" :disabled="apear != 'couponAdd'">无有效期</el-radio> <el-radio v-model="editForm.effectiveType" label="3" :disabled="apear != 'couponAdd'">无有效期</el-radio>
<br /> <br />
<el-form-item prop="effectiveTime" ref="effectiveTime" style="margin-top: 12px;display: block;"> <el-form-item
prop="effectiveTime"
ref="effectiveTime"
style="margin-top: 12px;display: block;"
>
<el-radio v-model="editForm.effectiveType" label="2" :disabled="apear != 'couponAdd'"> <el-radio v-model="editForm.effectiveType" label="2" :disabled="apear != 'couponAdd'">
<el-date-picker v-model="editForm.effectiveTime" type="daterange" style="width:295px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" :picker-options="pickerOption" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker> <el-date-picker
v-model="editForm.effectiveTime"
type="daterange"
style="width:295px"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOption"
:disabled="editForm.effectiveType != 2 || apear != 'couponAdd'"
clearable
></el-date-picker>
</el-radio> </el-radio>
</el-form-item> </el-form-item>
<el-form-item prop="effectiveDays" ref="effectiveDays"> <el-form-item prop="effectiveDays" ref="effectiveDays">
<el-radio v-model="editForm.effectiveType" label="1" :disabled="apear != 'couponAdd'"> <el-radio v-model="editForm.effectiveType" label="1" :disabled="apear != 'couponAdd'">
领取后 领取后
<el-input v-model="editForm.effectiveDays" style="width:100px;margin-left:5px;margin-right:5px" :disabled="apear != 'couponAdd' || editForm.effectiveType != 1" /> <el-input
天内有效 v-model="editForm.effectiveDays"
style="width:100px;margin-left:5px;margin-right:5px"
:disabled="apear != 'couponAdd' || editForm.effectiveType != 1"
/>天内有效
</el-radio> </el-radio>
</el-form-item> </el-form-item>
</template> </template>
<template slot="useBarriersHtml"> <template slot="useBarriersHtml">
<el-radio v-model="editForm.useBarriers" label="1" :disabled="apear != 'couponAdd'">无限制</el-radio> <el-radio v-model="editForm.useBarriers" label="1" :disabled="apear != 'couponAdd'">无限制</el-radio>
<el-form-item prop="full" ref="full"> <el-form-item prop="full" ref="full">
<el-radio v-model="editForm.useBarriers" label="2" :disabled="apear != 'couponAdd' || editForm.useChannel == 2"> <el-radio
v-model="editForm.useBarriers"
label="2"
:disabled="apear != 'couponAdd' || editForm.useChannel == 2"
>
订单满 订单满
<el-input v-model="editForm.full" placeholder="输入金额(元)" style="width: 110px;margin-left:5px;margin-right:5px" :disabled="apear != 'couponAdd' || editForm.useBarriers != 2" /> <el-input
元可用 v-model="editForm.full"
placeholder="输入金额(元)"
style="width: 110px;margin-left:5px;margin-right:5px"
:disabled="apear != 'couponAdd' || editForm.useBarriers != 2"
/>元可用
</el-radio> </el-radio>
</el-form-item> </el-form-item>
</template> </template>
<template slot="denominationHtml"> <template slot="denominationHtml">
<el-input v-model="editForm.denomination" style="width: 150px" :disabled="apear != 'couponAdd'" @blur.native.capture="editForm.useChannel == 1 && denominationBlur($event)"> <el-input
v-model="editForm.denomination"
style="width: 150px"
:disabled="apear != 'couponAdd'"
@blur.native.capture="editForm.useChannel == 1 && denominationBlur($event)"
>
<span slot="append">元</span> <span slot="append">元</span>
</el-input> </el-input>
<span style="color:red;margin-left:15px" v-if="priceFlag">{{ selectedAllProList.length ? '存在零售价低于代金券的商品' : '系统暂无已创建的商品,请先创建好商品后再配置代金券' }}</span> <span
style="color:red;margin-left:15px"
v-if="priceFlag && editForm.useChannel == 1"
>{{ selectedAllProList.length ? '存在零售价低于代金券的商品' : '系统暂无已创建的商品,请先创建好商品后再配置代金券' }}</span>
</template> </template>
<!-- 只有使用途径为线上商品时才有效,到店核销时屏蔽 --> <!-- 只有使用途径为线上商品时才有效,到店核销时屏蔽 -->
<template slot="goodsHtml"> <template slot="goodsHtml">
...@@ -74,7 +125,13 @@ ...@@ -74,7 +125,13 @@
<!-- 新增时并且为指定商品时显示,编辑或者查看时也显示 --> <!-- 新增时并且为指定商品时显示,编辑或者查看时也显示 -->
<div slot="proTable" class="select-pro"> <div slot="proTable" class="select-pro">
<!-- <div style="height:70px" v-if="editForm.goodsRefList.length"></div> --> <!-- <div style="height:70px" v-if="editForm.goodsRefList.length"></div> -->
<GLTable v-show="editForm.goodsRefList.length" :hasPage="false" :tableParams="tableParams" :tableData="editForm.goodsRefList" style="padding-left:10px;margin-right:340px;max-height:350px;overflow:auto;"> <GLTable
v-show="editForm.goodsRefList.length"
:hasPage="false"
:tableParams="tableParams"
:tableData="editForm.goodsRefList"
style="padding-left:10px;margin-right:340px;max-height:350px;overflow:auto;"
>
<template slot="goodsImage" slot-scope="scope"> <template slot="goodsImage" slot-scope="scope">
<img class="img-60" :src="scope.scope.goodsImage" /> <img class="img-60" :src="scope.scope.goodsImage" />
</template> </template>
...@@ -84,7 +141,14 @@ ...@@ -84,7 +141,14 @@
</GLTable> </GLTable>
</div> </div>
<template slot="useDescriptionHtml"> <template slot="useDescriptionHtml">
<el-input type="textarea" v-model="editForm.useDescription" style="width: 320px" :autosize="{ minRows: 2, maxRows: 4 }" maxlength="200" :disabled="apear == 'couponSee'" /> <el-input
type="textarea"
v-model="editForm.useDescription"
style="width: 320px"
:autosize="{ minRows: 2, maxRows: 4 }"
maxlength="200"
:disabled="apear == 'couponSee'"
/>
</template> </template>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
...@@ -93,7 +157,14 @@ ...@@ -93,7 +157,14 @@
<el-button v-if="apear != 'couponSee'" @click="handleCancel">取消</el-button> <el-button v-if="apear != 'couponSee'" @click="handleCancel">取消</el-button>
<el-button v-if="apear == 'couponSee'" @click="handleCancel">返回</el-button> <el-button v-if="apear == 'couponSee'" @click="handleCancel">返回</el-button>
</div> </div>
<select-muti-pro-forcoupon-dialog v-if="isMutiSelectVisible" :isMutiSelectVisible="isMutiSelectVisible" :searchForm="searchProForm" :selectedProList="selectedProList" @handleMutiSelectConfirm="handleMutiSelectConfirm" @handleMutiSelectClose="handleMutiSelectClose"></select-muti-pro-forcoupon-dialog> <select-muti-pro-forcoupon-dialog
v-if="isMutiSelectVisible"
:isMutiSelectVisible="isMutiSelectVisible"
:searchForm="searchProForm"
:selectedProList="selectedProList"
@handleMutiSelectConfirm="handleMutiSelectConfirm"
@handleMutiSelectClose="handleMutiSelectClose"
></select-muti-pro-forcoupon-dialog>
</div> </div>
</template> </template>
...@@ -473,7 +544,7 @@ export default { ...@@ -473,7 +544,7 @@ export default {
}) })
} }
this.tableParams.tableOption = false //去掉操作栏 this.tableParams.tableOption = false //去掉操作栏
this.$nextTick(()=>{ this.$nextTick(() => {
this.editStatus = false this.editStatus = false
}) })
}) })
...@@ -573,7 +644,7 @@ export default { ...@@ -573,7 +644,7 @@ export default {
this.validateRules() this.validateRules()
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => { this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) { if (valid) {
if (this.priceFlag) { if (this.priceFlag && this.editForm.useChannel == 1) {
//存在零售价低于代金券的商品 //存在零售价低于代金券的商品
return return
} }
...@@ -614,12 +685,13 @@ export default { ...@@ -614,12 +685,13 @@ export default {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => {
this.cancelJump()
}) })
.catch(() => {}) .then(() => {
this.cancelJump()
})
.catch(() => {})
} else { } else {
this.cancelJump() this.cancelJump()
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!