This commit is contained in:
zhaotianfeng 2024-09-15 21:20:51 +08:00
commit 5af9a9092c
12 changed files with 166 additions and 106 deletions

View File

@ -650,7 +650,7 @@ export default {
resetForm(formName) {
this.$refs[formName].resetFields();
// this.getInfo()
this.$router.push({path: "/EventMarketing/center/index"})
this.$router.push({path: "/EventMarketing/center/index",query: {activeId:this.activeId}})
},
indexMethod(index) {
return index * 2;

View File

@ -328,7 +328,7 @@ export default {
this.$refs[formName].resetFields();
this.ifWrite = true
// this.getInfo()
this.$router.push({path: "/EventMarketing/center/index"})
this.$router.push({path: "/EventMarketing/center/index",query: {activeId:this.activeId}})
},
/** 查询新人有礼活动列表 */
getList() {

View File

@ -473,6 +473,9 @@ export default {
} else {
this.getList();
}
if (this.$route.query.activeId){
this.tabindex = 1
}
this.getOldList()
},

View File

@ -608,7 +608,7 @@ export default {
resetForm(formName) {
this.$refs[formName].resetFields();
// this.getInfo()
this.$router.push({path:"/EventMarketing/center/index"})
this.$router.push({path:"/EventMarketing/center/index",query: {activeId:this.activeId}})
},
}
}

View File

@ -95,13 +95,6 @@
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- -->
<div class="d-b" style="margin-bottom: 15px;margin-top: 20px">
<div class="d-s">
@ -314,7 +307,7 @@
<div style="display: flex;width: 100%;margin: 20px 0;">
<div style="width: 50%">
<el-form-item label="限时优惠名称" prop="activeId">
<el-select v-model="ruleForm1.activeId" placeholder="请选择优惠名称">
<el-select v-model="ruleForm1.activeId" placeholder="请选择优惠名称" style="width: 100%">
<el-option
v-for="(item,index) in timeShareList"
:key="index"
@ -333,7 +326,7 @@
</el-checkbox-group>
</el-form-item>
<el-form-item label=" 会员标签" prop="babelIds">
<el-select v-model="ruleForm1.babelIds" multiple placeholder="请选择会员标签">
<el-select v-model="ruleForm1.babelIds" multiple placeholder="请选择会员标签" style="width: 100%">
<el-option
v-for="item in userLabelList"
:key="item.id+''"
@ -341,36 +334,73 @@
:value="item.id+''"></el-option>
</el-select>
</el-form-item>
<el-form-item label="适用实收金额" required>
<el-col :span="11">
<el-form-item prop="moneyMin">
<el-input v-model="ruleForm1.moneyMin"></el-input>
</el-form-item>
</el-col>
<el-col :span="2">
<div style="margin-left: 5px"></div>
</el-col>
<el-col :span="11">
<el-form-item prop="moneyMax">
<el-input v-model="ruleForm1.moneyMax"></el-input>
</el-form-item>
</el-col>
</el-form-item>
<el-form-item label="适用加油升数" required>
<el-col :span="11">
<el-form-item prop="literMin">
<el-input v-model="ruleForm1.literMin"></el-input>
</el-form-item>
</el-col>
<el-col :span="2">
<div style="margin-left: 5px"></div>
</el-col>
<el-col :span="11">
<el-form-item prop="literMax">
<el-input v-model="ruleForm1.literMax"></el-input>
</el-form-item>
</el-col>
<el-form-item label="消费条件" required>
<div v-if="ruleForm1.consumeType!=1">
<el-col :span="7">
<el-select v-model="ruleForm1.consumeType" style="width: 90%">
<el-option label="实收金额" value="0"></el-option>
<el-option label="加油升数" value="1"></el-option>
</el-select>
</el-col>
<el-col :span="7">
<el-form-item prop="moneyMin">
<el-input v-model="ruleForm1.moneyMin">
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="2">
<div style="margin-left: 10px"></div>
</el-col>
<el-col :span="7">
<el-form-item prop="moneyMax">
<el-input v-model="ruleForm1.moneyMax">
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
</div>
<div v-if="ruleForm1.consumeType==1">
<el-col :span="7">
<el-select v-model="ruleForm1.consumeType" style="width: 90%">
<el-option label="实收金额" value="0"></el-option>
<el-option label="加油升数" value="1"></el-option>
</el-select>
</el-col>
<el-col :span="7">
<el-form-item prop="moneyMin">
<el-input v-model="ruleForm1.literMin">
<template slot="append">L</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="2">
<div style="margin-left: 10px"></div>
</el-col>
<el-col :span="7">
<el-form-item prop="moneyMax">
<el-input v-model="ruleForm1.literMax">
<template slot="append">L</template>
</el-input>
</el-form-item>
</el-col>
</div>
</el-form-item>
<!-- <el-form-item label="适用加油升数" required>-->
<!-- <el-col :span="11">-->
<!-- <el-form-item prop="literMin">-->
<!-- <el-input v-model="ruleForm1.literMin"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="2">-->
<!-- <div style="margin-left: 5px"></div>-->
<!-- </el-col>-->
<!-- <el-col :span="11">-->
<!-- <el-form-item prop="literMax">-->
<!-- <el-input v-model="ruleForm1.literMax"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-form-item>-->
<el-form-item label="最大优惠金额" prop="disMax">
<el-input v-model="ruleForm1.disMax"></el-input>
</el-form-item>
@ -383,7 +413,7 @@
<el-input v-model="ruleForm1.ruleName"></el-input>
</el-form-item>
<el-form-item label="适用会员等级" prop="levelId">
<el-select v-model="ruleForm1.levelId" clearable placeholder="请选择会员等级">
<el-select v-model="ruleForm1.levelId" clearable placeholder="请选择会员等级" style="width: 100%">
<el-option
v-for="(item,index) in userGradeList"
:label="item.name"
@ -416,13 +446,13 @@
<el-form-item label="适用时间段" prop="timeType">
<div>
<div class="icon-type" v-for="(item,index) in weekMonthTypeList" :key="index"
:class="{ 'acvtive' : index === tindex3 }" @click="Typeindex3(index)">
:class="{ 'acvtive' : index === tindex3 }" @click="Typeindex3(index)" style="margin-bottom: 20px">
<img src="@/assets/images/wx.png" style="width: 20px;height: 20px" v-if="index != tindex3">
<img src="@/assets/images/xz.png" style="width: 20px;height: 20px" v-if="index == tindex3">
{{ item }}
<el-select v-model="weekDay" v-if="item=='每周'" placeholder="请选择每月固定日期" multiple
:disabled="tindex3!=0"
style="margin-left: 20px;margin-bottom: 20px">
style="margin-left: 20px;">
<el-option
v-for="(item,index) in weekList"
:key="index"
@ -443,7 +473,7 @@
</div>
</div>
<div style="margin-top: 20px">
<el-form-item label="时间段" prop="timeApplyStart">
<el-form-item label="时间段" prop="timeApplyStart" label-width="60px">
<el-time-picker
v-model="ruleForm1.dayStartTime"
format="HH:mm"
@ -499,7 +529,7 @@ export default {
//
queryParams: {
pageNo: 1,
pageSize: 5,
pageSize: 1000,
activeType: 2
},
total: 0,
@ -576,6 +606,7 @@ export default {
ruleForm1: {
activeType: 2,
timeType: 0,
consumeType:'',
paymentType: []
}
}
@ -666,7 +697,7 @@ export default {
},
//
getTimeShareList() {
getRequestList({pageNo: 1, pageSize: 10000}).then(res => {
getRequestList({pageNo: 1, pageSize: 10000,activeType:2}).then(res => {
this.timeShareList = res.data.records
})
},

View File

@ -352,7 +352,7 @@ export default {
this.$refs[formName].resetFields();
this.ifWrite = true
// this.getInfo()
this.$router.push({path: "/EventMarketing/center/index"})
this.$router.push({path: "/EventMarketing/center/index",query: {activeId:this.activeId}})
},
/** 查询新人有礼活动列表 */
getList() {

View File

@ -327,7 +327,7 @@ export default {
this.$refs[formName].resetFields();
this.ifWrite = true
// this.getInfo()
this.$router.push({path: "/EventMarketing/center/index"})
this.$router.push({path: "/EventMarketing/center/index",query: {activeId:this.activeId}})
},
/** 查询新人有礼活动列表 */
getList() {

View File

@ -411,7 +411,7 @@ export default {
this.$refs[formName].resetFields();
this.ifWrite = true
// this.getInfo()
this.$router.push({path: "/EventMarketing/center/index"})
this.$router.push({path: "/EventMarketing/center/index",query: {activeId:this.activeId}})
},
/** 查询新人有礼活动列表 */
getList() {

View File

@ -95,13 +95,6 @@
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- -->
<div class="d-b" style="margin-bottom: 15px;margin-top: 20px">
<div class="d-s">
@ -342,41 +335,72 @@
</el-select>
</el-form-item>
<el-form-item label="消费条件" required>
<el-col :span="7">
<el-select v-model="ruleForm1.consumeType" multiple style="width: 90%">
<el-option label="实收金额" value="0"></el-option>
<el-option label="加油升数" value="1"></el-option>
</el-select>
</el-col>
<el-col :span="7">
<el-form-item prop="moneyMin">
<el-input v-model="ruleForm1.moneyMin"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<div style="margin-left: 10px"></div>
</el-col>
<el-col :span="7">
<el-form-item prop="moneyMax">
<el-input v-model="ruleForm1.moneyMax"></el-input>
</el-form-item>
</el-col>
</el-form-item>
<el-form-item label="适用加油升数" required>
<el-col :span="11">
<el-form-item prop="literMin">
<el-input v-model="ruleForm1.literMin"></el-input>
</el-form-item>
</el-col>
<el-col :span="2">
<div style="margin-left: 5px"></div>
</el-col>
<el-col :span="11">
<el-form-item prop="literMax">
<el-input v-model="ruleForm1.literMax"></el-input>
</el-form-item>
</el-col>
<div v-if="ruleForm1.consumeType!=1">
<el-col :span="7">
<el-select v-model="ruleForm1.consumeType" style="width: 90%">
<el-option label="实收金额" value="0"></el-option>
<el-option label="加油升数" value="1"></el-option>
</el-select>
</el-col>
<el-col :span="7">
<el-form-item prop="moneyMin">
<el-input v-model="ruleForm1.moneyMin">
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="2">
<div style="margin-left: 10px"></div>
</el-col>
<el-col :span="7">
<el-form-item prop="moneyMax">
<el-input v-model="ruleForm1.moneyMax">
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
</div>
<div v-if="ruleForm1.consumeType==1">
<el-col :span="7">
<el-select v-model="ruleForm1.consumeType" style="width: 90%">
<el-option label="实收金额" value="0"></el-option>
<el-option label="加油升数" value="1"></el-option>
</el-select>
</el-col>
<el-col :span="7">
<el-form-item prop="moneyMin">
<el-input v-model="ruleForm1.literMin">
<template slot="append">L</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="2">
<div style="margin-left: 10px"></div>
</el-col>
<el-col :span="7">
<el-form-item prop="moneyMax">
<el-input v-model="ruleForm1.literMax">
<template slot="append">L</template>
</el-input>
</el-form-item>
</el-col>
</div>
</el-form-item>
<!-- <el-form-item label="适用加油升数" required>-->
<!-- <el-col :span="11">-->
<!-- <el-form-item prop="literMin">-->
<!-- <el-input v-model="ruleForm1.literMin"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="2">-->
<!-- <div style="margin-left: 5px"></div>-->
<!-- </el-col>-->
<!-- <el-col :span="11">-->
<!-- <el-form-item prop="literMax">-->
<!-- <el-input v-model="ruleForm1.literMax"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-form-item>-->
<el-form-item label="最大优惠金额" prop="disMax">
<el-input v-model="ruleForm1.disMax"></el-input>
</el-form-item>
@ -502,7 +526,7 @@ export default {
//
queryParams: {
pageNo: 1,
pageSize: 5,
pageSize: 10000,
activeType: 1
},
total: 0,
@ -579,6 +603,7 @@ export default {
ruleForm1: {
activeType: 1,
timeType: 0,
consumeType:'',
paymentType: []
}
}
@ -589,9 +614,10 @@ export default {
},
methods: {
//
resetRule(){
resetRule() {
this.ruleForm1 = {
activeType: 1,
consumeType:'',
timeType: 0,
paymentType: []
}
@ -600,7 +626,7 @@ export default {
this.monthDay = []
},
//
deleteRule(data){
deleteRule(data) {
deletePriceRule(data.id).then(res => {
this.$message.success("删除成功")
this.getRuleList()
@ -616,12 +642,12 @@ export default {
this.getUserLabelList()
this.showDialogVisible = true
if (res.data){
if (res.data) {
this.ruleForm1 = res.data
if (res.data.paymentType) this.ruleForm1.paymentType = res.data.paymentType.split(",")
if (res.data.babelIds) this.ruleForm1.babelIds = res.data.babelIds.split(",")
if (res.data.timeSlots){
if (res.data.timeSlots) {
if (res.data.timeType == "0") {
this.weekDay = this.ruleForm1.timeSlots.split(",")
} else if (this.ruleForm1.timeType == "1") {
@ -669,7 +695,7 @@ export default {
},
//
getTimeShareList() {
getRequestList({pageNo: 1, pageSize: 10000}).then(res => {
getRequestList({pageNo: 1, pageSize: 10000,activeType:1}).then(res => {
this.timeShareList = res.data.records
})
},

View File

@ -410,7 +410,7 @@ export default {
this.$refs[formName].resetFields();
this.ifWrite = true
// this.getInfo()
this.$router.push({path: "/EventMarketing/center/index"})
this.$router.push({path: "/EventMarketing/center/index",query: {activeId:this.activeId}})
},
/** 查询新人有礼活动列表 */
getList() {

View File

@ -357,7 +357,7 @@ export default {
this.$refs[formName].resetFields();
this.ifWrite = true
// this.getInfo()
this.$router.push({path: "/EventMarketing/center/index"})
this.$router.push({path: "/EventMarketing/center/index",query: {activeId:this.activeId}})
},
/** 查询新人有礼活动列表 */
getList() {

View File

@ -106,12 +106,12 @@
<el-form :model="form" label-width="120px" >
<!-- 通知名称 -->
<el-form-item label="通知名称" :required="true">
<el-input v-model="form.notificationName" placeholder="请输入通知名称" style="width: 474px"></el-input>
<el-input v-model="form.notificationName" placeholder="请输入通知名称" ></el-input>
</el-form-item>
<!-- 通知类型 -->
<el-form-item label="通知类型" :required="true">
<el-select v-model="form.notificationType" placeholder="请选择通知类型" style="width: 474px">
<el-select v-model="form.notificationType" placeholder="请选择通知类型" style="width: 100%">
<el-option label="到期通知" value="到期通知"></el-option>
<el-option label="库存预警" value="库存预警"></el-option>
<el-option label="其他" value="其他"></el-option>
@ -122,7 +122,7 @@
<!-- 通知模板 -->
<el-form-item label="通知模板" :required="true">
<el-input type="textarea" v-model="form.templateContent" :rows="3" placeholder="请输入通知内容"
:maxlength="200" show-word-limit style="width: 474px"></el-input>
:maxlength="200" show-word-limit ></el-input>
<div>
<span @click="insertText('{油罐名称}')">{油罐名称}</span>
<span @click="insertText('{商品名称}')">{商品名称}</span>
@ -134,7 +134,7 @@
<!-- 接收角色 -->
<el-form-item label="接收角色" :required="true">
<el-select v-model="form.recipientRoles" multiple placeholder="请选择角色" style="width: 474px">
<el-select v-model="form.recipientRoles" multiple placeholder="请选择角色" style="width: 100%">
<el-option v-for="item in dutyList1" :label="item.dutyName" :value="item.dutyId"></el-option>
</el-select>
</el-form-item>
@ -148,20 +148,20 @@
<el-form-item label="发送条件" style="margin-bottom: 10px" :required="true">
<div v-for="(condition, index) in form.conditions" :key="index" class="condition-group"
style="margin-bottom: 10px">
<el-select v-model="condition.field" placeholder="请选择条件" style="width: 150px;margin-right: 10px"
<el-select v-model="condition.field" placeholder="请选择条件" style="width: 35%;margin-right: 10px"
@change="changeField(index)">
<el-option label="商品库存量" value="商品库存量"></el-option>
<el-option label="剩余可挂账额度" value="剩余可挂账额度"></el-option>
<el-option label="车队总余额" value="车队总余额"></el-option>
<!-- 添加其他选项 -->
</el-select>
<el-select v-model="condition.operator" placeholder="请选择" style="width: 100px;margin-right: 10px">
<el-select v-model="condition.operator" placeholder="请选择" style="width: 15%;margin-right: 10px">
<el-option label="大于" value="大于"></el-option>
<el-option label="等于" value="等于"></el-option>
<el-option label="小于" value="小于"></el-option>
<!-- 添加其他选项 -->
</el-select>
<el-input v-model="condition.value" placeholder="请输入" style="width: 200px;margin-right: 10px">
<el-input v-model="condition.value" placeholder="请输入" style="width: 35%;margin-right: 10px">
<template slot="append">{{ condition.field != '商品库存量' ? '元' : '件' }}</template>
</el-input>
<el-button @click="removeCondition(index)" type="danger" icon="el-icon-delete" circle></el-button>