8.31
This commit is contained in:
parent
3051492756
commit
64adcf9782
@ -786,9 +786,9 @@
|
||||
<el-input type="textarea" v-model="ruleForm.activityDetails" placeholder="请输入活动详情"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动奖品" prop="activeGift">
|
||||
<el-checkbox-group v-model="ruleForm.activeGift">
|
||||
<el-checkbox-group v-model="ruleForm.activeGift" @change="changes" >
|
||||
<div style="display: flex;font-size: 14px;margin: 15px 0">
|
||||
<el-checkbox value="0" name="type"><!--积分--></el-checkbox>
|
||||
<el-checkbox label="选项一" key="0" name="type"><!--积分--></el-checkbox>
|
||||
<div style="margin-left: 10px">按</div>
|
||||
<el-select v-model="pointOrderType" style="margin: 0 10px" placeholder="请选择">
|
||||
<el-option label="订单金额" value="0"></el-option>
|
||||
@ -815,7 +815,7 @@
|
||||
</div>
|
||||
|
||||
<div style="display: flex;font-size: 14px;margin: 15px 0">
|
||||
<el-checkbox value="3" name="type"><!--成长值--></el-checkbox>
|
||||
<el-checkbox label="选项二" key="3" name="type"><!--成长值--></el-checkbox>
|
||||
<div style="margin-left: 10px">按</div>
|
||||
<el-select v-model="growthValueOrderType" style="margin: 0 10px" placeholder="请选择">
|
||||
<el-option label="订单金额" value="0"></el-option>
|
||||
@ -843,7 +843,7 @@
|
||||
</div>
|
||||
|
||||
<div style="display: flex;font-size: 14px;margin: 15px 0">
|
||||
<el-checkbox value="1" name="type"><!--优惠券--></el-checkbox>
|
||||
<el-checkbox label="选项三" key="1" name="type"><!--优惠券--></el-checkbox>
|
||||
<div style="margin-left: 10px">按</div>
|
||||
<el-select v-model="couponOrderType" style="margin: 0 10px" placeholder="请选择">
|
||||
<el-option label="订单金额" value="0"></el-option>
|
||||
@ -879,6 +879,8 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<el-form-item style="text-align: center">
|
||||
<el-button @click="resetForm('ruleForm')">取消</el-button>
|
||||
<el-button type="primary" @click="submitRuleForm('ruleForm')">保存</el-button>
|
||||
@ -914,6 +916,8 @@ export default {
|
||||
dicts: ['payment_type'],
|
||||
data() {
|
||||
return {
|
||||
checkedCities:[],
|
||||
cityOptions:['上海', '北京', '广州', '深圳'],
|
||||
opendetails: false,
|
||||
looklist: [],
|
||||
statisticsyou: {},
|
||||
@ -1094,6 +1098,13 @@ export default {
|
||||
this.getUserLabelList()
|
||||
},
|
||||
methods: {
|
||||
handleCheckedCitiesChange(e){
|
||||
console.log(e,this.checkedCities)
|
||||
|
||||
},
|
||||
changes(e){
|
||||
console.log('1098',e)
|
||||
},
|
||||
getUserLabelList(){
|
||||
listUserLabel({page:1,pageSize:10000}).then(res => {
|
||||
this.userLabelList = res.data.records
|
||||
@ -1103,12 +1114,30 @@ export default {
|
||||
getInfoActivity().then(res => {
|
||||
if (res.data) {
|
||||
this.ruleForm = res.data
|
||||
console.log(res.data,'1109')
|
||||
if (res.data.activityTimeType) this.tindex1 = res.data.activityTimeType
|
||||
if (res.data.suitTimeSlotType) this.tindex3 = res.data.suitTimeSlotType
|
||||
if (res.data.paymentType) this.ruleForm.paymentType = res.data.paymentType.split(",")
|
||||
if (res.data.dieselUserLevel) this.ruleForm.dieselUserLevel = res.data.dieselUserLevel.split(",")
|
||||
if (res.data.userLabelIds) this.ruleForm.userLabelIds = res.data.userLabelIds.split(",")
|
||||
if (res.data.activeGift) this.ruleForm.activeGift = res.data.activeGift.split(",")
|
||||
if( res.data.activeGift){
|
||||
console.log( '198', this.ruleForm.activeGift)
|
||||
this.ruleForm.activeGift = res.data.activeGift.split(",")
|
||||
|
||||
for (let i = 0; i < this.ruleForm.activeGift.length; i++) {
|
||||
if(this.ruleForm.activeGift[i] == '0'){
|
||||
this.ruleForm.activeGift[i] = '选项一'
|
||||
}
|
||||
if(this.ruleForm.activeGift[i] == '3' ){
|
||||
this.ruleForm.activeGift[i] = '选项二'
|
||||
}
|
||||
if(this.ruleForm.activeGift[i] == '1'){
|
||||
this.ruleForm.activeGift[i] = '选项三'
|
||||
}
|
||||
}
|
||||
}else {
|
||||
this.ruleForm.activeGift = []
|
||||
}
|
||||
if (res.data.suitDate){
|
||||
if (res.data.suitTimeSlotType == 0){
|
||||
this.weekDay = res.data.suitDate.split(",")
|
||||
@ -1135,7 +1164,9 @@ export default {
|
||||
this.growthValueList = []
|
||||
this.couponList = []
|
||||
}
|
||||
console.log( '1147', this.ruleForm.activeGift)
|
||||
})
|
||||
|
||||
},
|
||||
getCardCoupon() {
|
||||
listCardCoupon({status: 1, putType: 1}).then(res => {
|
||||
@ -1187,6 +1218,17 @@ export default {
|
||||
this.ruleForm.suitTimeSlotType = index
|
||||
},
|
||||
submitRuleForm(formName) {
|
||||
for (let i = 0; i < this.ruleForm.activeGift.length; i++) {
|
||||
if(this.ruleForm.activeGift[i] == '选项一'){
|
||||
this.ruleForm.activeGift[i] = 0
|
||||
}
|
||||
if(this.ruleForm.activeGift[i] == '选项二'){
|
||||
this.ruleForm.activeGift[i] = 3
|
||||
}
|
||||
if(this.ruleForm.activeGift[i] == '选项三'){
|
||||
this.ruleForm.activeGift[i] = 1
|
||||
}
|
||||
}
|
||||
if (this.tindex1 == 1){
|
||||
if (!this.ruleForm.activeStartTime || !this.ruleForm.activeEndTime){
|
||||
this.$message.error("请选择活动开始时间")
|
||||
|
Loading…
Reference in New Issue
Block a user