Commit 4e71d609 by 前端

Merge branch 'wuwx_dev_v2.0.0' into 'v2.0.0'

Wuwx dev v2.0.0

See merge request !25
2 parents 77d78069 add1d3db
......@@ -33,17 +33,36 @@
<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>
</template>
<template slot="directionalFlagHtml">
<template slot="directionalFlagHtml" v-if="editForm.useChannel != 1">
<div>
<el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">所有客户可用</el-radio>
<span class="promptCopy">创建成功后立即生效,所有小程序用户均可领用</span>
</div>
<div>
<el-radio v-model="editForm.directionalFlag" label="2" :disabled="apear != 'couponAdd'">定向礼包专用</el-radio>
<span class="promptCopy">企微员工通过企微工作台定向礼包发送给客户</span>
</div>
<div>
<el-radio v-model="editForm.directionalFlag" label="3" :disabled="apear != 'couponAdd'">关联商品可用</el-radio>
<span class="promptCopy">关联商品,用户支付成功后才能进行核销使用</span>
</div>
</template>
<template slot="directionalFlagHtml" v-else>
<div>
<el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">所有客户可用</el-radio>
<span class="promptCopy">创建成功后立即生效,所有小程序用户均可领用</span>
</div>
<div>
<el-radio v-model="editForm.directionalFlag" label="2" :disabled="apear != 'couponAdd'">定向礼包专用</el-radio>
<span class="promptCopy">企微员工通过企微工作台定向礼包发送给客户</span>
</div>
</template>
<template slot="effectiveHtml">
<el-radio v-model="editForm.effectiveType" label="3" :disabled="apear != 'couponAdd'">无有效期</el-radio>
<br />
<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-date-picker v-model="editForm.effectiveTime" type="datetimerange" style="width: 340px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :picker-options="pickerOption" :default-time="defaultTime" :format="format" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker>
<el-date-picker v-model="editForm.effectiveTime" @change="haveChange" type="datetimerange" style="width: 340px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :picker-options="pickerOption" :default-time="defaultTime" :format="format" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker>
</el-radio>
</el-form-item>
<el-form-item prop="effectiveDays" ref="effectiveDays">
......@@ -342,7 +361,8 @@ export default {
},
'editForm.effectiveTime'(newValue, oldValue) {
if (newValue && newValue.length == 2) {
this.couponTime = this.setDateString(newValue[0], true) + ' ~ ' + this.setDateString(newValue[1], true)
// this.couponTime = this.setDateString(newValue[0], true) + ' ~ ' + this.setDateString(newValue[1], true)
this.couponTime = newValue[0] + ' ~ ' + newValue[1]
} else {
this.couponTime = ''
}
......@@ -416,6 +436,11 @@ export default {
},
methods: {
haveChange() {
let oDateOne = new Date(this.editForm.effectiveTime[0]).getTime()
let timeStamp = new Date().getTime()
if(oDateOne < timeStamp) this.editForm.effectiveTime = []
},
// 编辑按钮
editMessage() {
let anticipatedCostIndex = this.editFormData.findIndex(item => item.name == 'anticipatedCost')
......@@ -845,4 +870,10 @@ export default {
word-break: break-word;
overflow: auto;
}
.promptCopy {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
margin-left: -10px;
}
</style>
......@@ -50,14 +50,23 @@
<p class="edit-title">{{ title }}折扣劵</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="directionalFlagHtml">
<div>
<el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">所有客户可用</el-radio>
<span class="promptCopy">创建成功后立即生效,所有小程序用户均可领用</span>
</div>
<div>
<el-radio v-model="editForm.directionalFlag" label="2" :disabled="apear != 'couponAdd'">定向礼包专用</el-radio>
<span class="promptCopy">企微员工通过企微工作台定向礼包发送给客户</span>
</div>
<div>
<el-radio v-model="editForm.directionalFlag" label="3" :disabled="apear != 'couponAdd'">关联商品可用</el-radio>
<span class="promptCopy">关联商品,用户支付成功后才能进行核销使用</span>
</div>
</template>
<template slot="effectiveHtml">
<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-date-picker v-model="editForm.effectiveTime" type="datetimerange" style="width: 340px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :default-time="defaultTime" :format="format" :picker-options="pickerOption" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker>
<el-date-picker v-model="editForm.effectiveTime" @change="haveChange" type="datetimerange" style="width: 340px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :default-time="defaultTime" :format="format" :picker-options="pickerOption" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker>
</el-radio>
</el-form-item>
<el-form-item prop="effectiveDays" ref="effectiveDays">
......@@ -242,7 +251,8 @@ export default {
},
'editForm.effectiveTime'(newValue, oldValue) {
if (newValue && newValue.length == 2) {
this.couponTime = this.setDateString(newValue[0], true) + ' ~ ' + this.setDateString(newValue[1], true)
// this.couponTime = this.setDateString(newValue[0], true) + ' ~ ' + this.setDateString(newValue[1], true)
this.couponTime = newValue[0] + ' ~ ' + newValue[1]
} else {
this.couponTime = ''
}
......@@ -257,6 +267,11 @@ export default {
},
methods: {
haveChange() {
let oDateOne = new Date(this.editForm.effectiveTime[0]).getTime()
let timeStamp = new Date().getTime()
if(oDateOne < timeStamp) this.editForm.effectiveTime = []
},
// 编辑按钮
editMessage() {
let anticipatedCostIndex = this.editFormData.findIndex(item => item.name == 'anticipatedCost')
......@@ -642,4 +657,10 @@ export default {
word-break: break-word;
overflow: auto;
}
.promptCopy {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
margin-left: -10px;
}
</style>
......@@ -29,14 +29,23 @@
<p class="edit-title">{{ title }}兑换券</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="directionalFlagHtml">
<div>
<el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">所有客户可用</el-radio>
<span class="promptCopy">创建成功后立即生效,所有小程序用户均可领用</span>
</div>
<div>
<el-radio v-model="editForm.directionalFlag" label="2" :disabled="apear != 'couponAdd'">定向礼包专用</el-radio>
<span class="promptCopy">企微员工通过企微工作台定向礼包发送给客户</span>
</div>
<div>
<el-radio v-model="editForm.directionalFlag" label="3" :disabled="apear != 'couponAdd'">关联商品可用</el-radio>
<span class="promptCopy">关联商品,用户支付成功后才能进行核销使用</span>
</div>
</template>
<template slot="effectiveHtml">
<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-date-picker v-model="editForm.effectiveTime" type="datetimerange" style="width: 340px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :default-time="defaultTime" :format="format" :picker-options="pickerOption" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker>
<el-date-picker v-model="editForm.effectiveTime" @change="haveChange" type="datetimerange" style="width: 340px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :default-time="defaultTime" :format="format" :picker-options="pickerOption" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker>
</el-radio>
</el-form-item>
<el-form-item prop="effectiveDays" ref="effectiveDays">
......@@ -220,7 +229,8 @@ export default {
},
'editForm.effectiveTime'(newValue, oldValue) {
if (newValue && newValue.length == 2) {
this.couponTime = this.setDateString(newValue[0], true) + ' ~ ' + this.setDateString(newValue[1], true)
// this.couponTime = this.setDateString(newValue[0], true) + ' ~ ' + this.setDateString(newValue[1], true)
this.couponTime = newValue[0] + ' ~ ' + newValue[1]
} else {
this.couponTime = ''
}
......@@ -235,6 +245,11 @@ export default {
},
methods: {
haveChange() {
let oDateOne = new Date(this.editForm.effectiveTime[0]).getTime()
let timeStamp = new Date().getTime()
if(oDateOne < timeStamp) this.editForm.effectiveTime = []
},
// 编辑按钮
editMessage() {
let anticipatedCostIndex = this.editFormData.findIndex(item => item.name == 'anticipatedCost')
......@@ -516,4 +531,10 @@ export default {
word-break: break-word;
overflow: auto;
}
.promptCopy {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
margin-left: -10px;
}
</style>
......@@ -97,8 +97,8 @@
</div>
</div>
<template slot="association">
<el-button type="text" @click="dialogTableVisible = true" v-if="routeInfo.addOrEdit !== 3">选择</el-button>
<el-dialog title="选择优惠券" v-if="dialogTableVisible" :visible.sync="dialogTableVisible">
<el-button type="default" @click="dialogTableVisible = true" v-if="routeInfo.addOrEdit !== 3">+选择</el-button>
<glsx-dialog title="选择优惠券" :isVisible.sync="dialogTableVisible" width="50%" @confirmDialog="associationConfirm" @closeDialog="associationCancel" >
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
......@@ -110,11 +110,11 @@
</div>
</GLTable>
<!-- 表格区域 end -->
<div class="associationBtn">
<!-- <div class="associationBtn">
<el-button type="primary" @click="associationConfirm">确定</el-button>
<el-button type="default" @click="associationCancel">取消</el-button>
</div>
</el-dialog>
</div> -->
</glsx-dialog>
<div class="association-X" v-if="editForm.relatedCouponId">
<div class="associationRow">
<span class="associationLists">名称</span>
......@@ -122,13 +122,13 @@
<span class="associationLists">使用途径</span>
<span class="associationLists" v-if="routeInfo.addOrEdit !== 3">操作</span>
</div>
<div class="associationRow">
<div class="associationRow" style="background:white;">
<el-tooltip effect="dark" :content="editForm.relatedCouponName" placement="bottom">
<span class="associationLists">{{editForm.relatedCouponName}}</span>
<span class="associationLists-X">{{editForm.relatedCouponName}}</span>
</el-tooltip>
<span class="associationLists">{{editForm.relatedDiscountType}}</span>
<span class="associationLists">{{editForm.relatedUseChannel}}</span>
<span class="associationLists-X">{{editForm.relatedDiscountType}}</span>
<span class="associationLists-X">{{editForm.relatedUseChannel}}</span>
<span class="associationLists" v-if="routeInfo.addOrEdit !== 3"><el-button type="text" @click="del()">删除</el-button></span>
</div>
</div>
......@@ -1655,7 +1655,7 @@ export default {
// console.log('this.$refs.coupon',this.$refs.coupon[0])
//接收到的数据为空
this.templateSelection = this.$refs.coupon[0].data;
this.$refs.coupon[0].data.length ? (this.$refs.coupon[0].tableHeightValues = '') : this.$refs.coupon[0].setTableHeightFun()
// this.$refs.coupon[0].data.length ? (this.$refs.coupon[0].tableHeightValues = '') : this.$refs.coupon[0].setTableHeightFun()
},
handleSearch() {
this.$refs.coupon[0].refreshTable()
......@@ -1846,12 +1846,17 @@ export default {
bottom: 26px;
}
.association-X {
width: 320px;
margin-left: -25px;
width: 670px;
height: 108px;
border: 1px solid #EEE;
margin-top: 10px;
}
.association-X .associationRow {
display: flex;
/* justify-content:space-evenly; */
height: 54px;
background: #F4F6FC;
align-items: center;
justify-content: center;
}
.association-X .associationRow .associationLists {
display: block;
......@@ -1860,5 +1865,25 @@ export default {
text-overflow: ellipsis;
flex: 1;
text-align: center;
font-size: 14px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #424242;
}
.association-X .associationRow .associationLists-X {
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex: 1;
text-align: center;
font-size: 14px;
color: #666;
}
.marketing .footer-btns {
float: none !important;
}
.el-checkbox__input.is-checked+.el-checkbox__label {
color: #606266;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!