This commit is contained in:
cun-nan 2024-09-13 16:30:17 +08:00
parent 82a0a39149
commit 1440ad19e7
17 changed files with 338 additions and 286 deletions

View File

@ -2,7 +2,7 @@ import request from '@/utils/request'
export function getActiveBirthday(id) {
return request({
url: 'activeBirthday/getInfoById/'+id,
url: 'activeBirthday/'+id,
method: 'get',
})
}

View File

@ -586,6 +586,25 @@ export default {
return
}
}
if (this.ruleForm.activeGift && this.ruleForm.activeGift.includes(0)) {
if (!this.pointList || this.pointList.length == 0) {
this.$message.error("请先选择赠送积分信息!")
return;
}
}
if (this.ruleForm.activeGift && this.ruleForm.activeGift.includes(3)) {
if (!this.growthValueList || this.growthValueList.length == 0) {
this.$message.error("请先选择赠送成长值信息!")
return;
}
}
if (this.ruleForm.activeGift && this.ruleForm.activeGift.includes(1)) {
if (!this.couponList || this.couponList.length == 0) {
this.$message.error("请先选择赠送优惠券信息!")
return;
}
}
this.$refs[formName].validate((valid) => {
if (valid) {
// 使

View File

@ -282,6 +282,24 @@ export default {
return
}
}
if (this.ruleForm.courtesyReward && this.ruleForm.courtesyReward.includes("0")) {
if (!this.couponList || this.couponList.length == 0) {
this.$message.error("请先选择赠送优惠券信息!")
return;
}
}
if (this.ruleForm.courtesyReward && this.ruleForm.courtesyReward.includes("3")) {
if (!this.ruleForm.points) {
this.$message.error("请输入赠送积分!")
return;
}
}
if (this.ruleForm.courtesyReward && this.ruleForm.courtesyReward.includes("2")) {
if (!this.ruleForm.growthValue) {
this.$message.error("请输入赠送成长值!")
return;
}
}
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.ruleForm.courtesyReward) this.ruleForm.courtesyReward = this.ruleForm.courtesyReward.toString()

View File

@ -64,7 +64,7 @@
</div>
</el-form-item>
<el-form-item label="适用会员等级" prop="levelId">
<el-select v-model="ruleForm.levelId" clearable placeholder="请选择会员等级">
<el-select v-model="ruleForm.levelId" multiple clearable placeholder="请选择会员等级(多选)" style="width: 100%">
<el-option
v-for="(item,index) in userGradeList"
:label="item.name"
@ -73,7 +73,7 @@
</el-select>
</el-form-item>
<el-form-item label="会员标签" prop="babelIds">
<el-select v-model="ruleForm.babelIds" clearable placeholder="请选择会员标签">
<el-select v-model="ruleForm.babelIds" multiple clearable placeholder="请选择会员标签(多选)" style="width: 100%">
<el-option
v-for="item in userLabelList"
:key="item.id+''"
@ -466,6 +466,8 @@ export default {
this.monthDay = this.ruleForm.timeSlots.split(",")
}
}
if (res.data.levelId) this.ruleForm.levelId = res.data.levelId.split(",")
if (res.data.babelIds) this.ruleForm.babelIds = res.data.babelIds.split(",")
if (res.data.applyOil) this.ruleForm.applyOil = res.data.applyOil.split(",")
if (res.data.paymentType) this.ruleForm.paymentType = res.data.paymentType.split(",")
if (res.data.activeManner) this.ruleForm.activeManner = res.data.activeManner.split(",")
@ -538,8 +540,6 @@ export default {
Typeindex3(index) {
this.tindex3 = index
this.ruleForm.timeType = index
this.weekDay = []
this.monthDay = []
},
Typeindex4(index) {
this.tindex4 = index
@ -556,6 +556,18 @@ export default {
return
}
}
if (this.ruleForm.activeManner && this.ruleForm.activeManner.includes('0')) {
if (!this.orderList || this.orderList.length == 0) {
this.$message.error("请先添加活动方式规则")
return;
}
}
if (this.ruleForm.activeManner && this.ruleForm.activeManner.includes('1')) {
if (!this.refuelList || this.refuelList.length == 0) {
this.$message.error("请先添加活动方式规则")
return;
}
}
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.ruleForm.timeType == 0) {
@ -563,6 +575,8 @@ export default {
} else if (this.ruleForm.timeType == 1) {
this.ruleForm.timeSlots = this.monthDay.toString()
}
if (this.ruleForm.levelId) this.ruleForm.levelId = this.ruleForm.levelId.toString()
if (this.ruleForm.babelIds) this.ruleForm.babelIds = this.ruleForm.babelIds.toString()
if (this.ruleForm.applyOil) this.ruleForm.applyOil = this.ruleForm.applyOil.toString()
if (this.ruleForm.paymentType) this.ruleForm.paymentType = this.ruleForm.paymentType.toString()
if (this.ruleForm.activeManner) this.ruleForm.activeManner = this.ruleForm.activeManner.toString()

View File

@ -48,7 +48,7 @@
<el-input type="textarea" v-model="ruleForm.activityDetails" placeholder="请输入活动详情"></el-input>
</el-form-item>
<el-form-item label="适用会员等级" prop="userGradeId">
<el-select v-model="ruleForm.userGradeId" clearable placeholder="请选择会员等级" style="width: 100%">
<el-select v-model="ruleForm.userGradeId" clearable multiple placeholder="请选择会员等级(多选)" style="width: 100%">
<el-option
v-for="(item,index) in userGradeList"
:label="item.name"
@ -275,6 +275,7 @@ export default {
if (res.data) {
this.ruleForm = res.data
if (res.data.courtesyReward) this.ruleForm.courtesyReward = res.data.courtesyReward.split(",")
if (res.data.userGradeId) this.ruleForm.userGradeId = res.data.userGradeId.split(",")
if (res.data.activeTimeType) this.tindex1 = res.data.activeTimeType
if (res.data.couponList) this.couponList = res.data.couponList
} else {
@ -308,9 +309,28 @@ export default {
return
}
}
if (this.ruleForm.courtesyReward && this.ruleForm.courtesyReward.includes("0")) {
if (!this.couponList || this.couponList.length == 0) {
this.$message.error("请先选择赠送优惠券信息!")
return;
}
}
if (this.ruleForm.courtesyReward && this.ruleForm.courtesyReward.includes("3")) {
if (!this.ruleForm.points) {
this.$message.error("请输入赠送积分!")
return;
}
}
if (this.ruleForm.courtesyReward && this.ruleForm.courtesyReward.includes("2")) {
if (!this.ruleForm.growthValue) {
this.$message.error("请输入赠送成长值!")
return;
}
}
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.ruleForm.courtesyReward) this.ruleForm.courtesyReward = this.ruleForm.courtesyReward.toString()
if (this.ruleForm.userGradeId) this.ruleForm.userGradeId = this.ruleForm.userGradeId.toString()
if (this.couponList) this.ruleForm.couponList = this.couponList
if (this.ruleForm.id) {
editActiveBirthday(this.ruleForm).then(response => {

View File

@ -285,6 +285,24 @@ export default {
return
}
}
if (this.ruleForm.rewardDisplay && this.ruleForm.rewardDisplay.includes("0")) {
if (!this.couponList || this.couponList.length == 0) {
this.$message.error("请先选择赠送优惠券信息!")
return;
}
}
if (this.ruleForm.rewardDisplay && this.ruleForm.rewardDisplay.includes("3")) {
if (!this.ruleForm.points) {
this.$message.error("请输入赠送积分!")
return;
}
}
if (this.ruleForm.rewardDisplay && this.ruleForm.rewardDisplay.includes("2")) {
if (!this.ruleForm.growthValue) {
this.$message.error("请输入赠送成长值!")
return;
}
}
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.ruleForm.rewardDisplay) this.ruleForm.rewardDisplay = this.ruleForm.rewardDisplay.toString()

View File

@ -74,7 +74,7 @@
</div>
</el-form-item>
<el-form-item label="适用会员等级" prop="userGradeIds">
<el-select v-model="ruleForm.userGradeIds" clearable placeholder="请选择会员等级" style="width: 100%">
<el-select v-model="ruleForm.userGradeIds" multiple clearable placeholder="请选择会员等级(多选)" style="width: 100%">
<el-option
v-for="(item,index) in userGradeList"
:label="item.name"
@ -301,8 +301,6 @@ export default {
Typeindex3(index) {
this.tindex3 = index
this.ruleForm.suitTimeSlotType = index
this.weekDay = []
this.monthDay = []
},
Typeindex4(index) {
this.tindex4 = index
@ -328,6 +326,7 @@ export default {
if (res.data) {
this.ruleForm = res.data
if (res.data.courtesyReward) this.ruleForm.courtesyReward = res.data.courtesyReward.split(",")
if (res.data.userGradeIds) this.ruleForm.userGradeIds = res.data.userGradeIds.split(",")
if (res.data.activeTimeType) this.tindex1 = res.data.activeTimeType
if (res.data.suitModule) this.tindex2 = res.data.suitModule
if (res.data.suitTimeSlotType) this.tindex3 = res.data.suitTimeSlotType
@ -376,6 +375,12 @@ export default {
return
}
}
if (this.ruleForm.courtesyReward && this.ruleForm.courtesyReward.includes("0")) {
if (!this.couponList || this.couponList.length == 0) {
this.$message.error("请先选择赠送优惠券信息!")
return;
}
}
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.ruleForm.suitTimeSlotType==0){
@ -384,6 +389,7 @@ export default {
this.ruleForm.suitDate = this.monthDay.toString()
}
if (this.ruleForm.courtesyReward) this.ruleForm.courtesyReward = this.ruleForm.courtesyReward.toString()
if (this.ruleForm.userGradeIds) this.ruleForm.userGradeIds = this.ruleForm.userGradeIds.toString()
if (this.couponList) this.ruleForm.couponList = this.couponList
if (this.ruleForm.id) {
editActivePopUp(this.ruleForm).then(response => {

View File

@ -61,7 +61,7 @@
</el-checkbox-group>
</el-form-item>
<el-form-item label="适用会员等级" prop="userGradeIds">
<el-select v-model="ruleForm.userGradeIds" clearable placeholder="请选择会员等级" style="width: 100%">
<el-select v-model="ruleForm.userGradeIds" multiple clearable placeholder="请选择会员等级" style="width: 100%">
<el-option
v-for="(item,index) in userGradeList"
:label="item.name"
@ -325,6 +325,7 @@ export default {
if (res.data) {
this.ruleForm = res.data
if (res.data.paymentType) this.ruleForm.paymentType = res.data.paymentType.split(",")
if (res.data.userGradeIds) this.ruleForm.userGradeIds = res.data.userGradeIds.split(",")
if (res.data.suitOilIds) this.ruleForm.suitOilIds = res.data.suitOilIds.split(",")
if (res.data.courtesyReward) this.ruleForm.courtesyReward = res.data.courtesyReward.split(",")
if (res.data.activeTimeType) this.tindex1 = res.data.activeTimeType
@ -364,9 +365,28 @@ export default {
return
}
}
if (this.ruleForm.courtesyReward && this.ruleForm.courtesyReward.includes("0")) {
if (!this.couponList || this.couponList.length == 0) {
this.$message.error("请先选择赠送优惠券信息!")
return;
}
}
if (this.ruleForm.courtesyReward && this.ruleForm.courtesyReward.includes("3")) {
if (!this.ruleForm.points) {
this.$message.error("请输入赠送积分!")
return;
}
}
if (this.ruleForm.courtesyReward && this.ruleForm.courtesyReward.includes("2")) {
if (!this.ruleForm.growthValue) {
this.$message.error("请输入赠送成长值!")
return;
}
}
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.ruleForm.paymentType) this.ruleForm.paymentType = this.ruleForm.paymentType.toString()
if (this.ruleForm.userGradeIds) this.ruleForm.userGradeIds = this.ruleForm.userGradeIds.toString()
if (this.ruleForm.suitOilIds) this.ruleForm.suitOilIds = this.ruleForm.suitOilIds.toString()
if (this.ruleForm.courtesyReward) this.ruleForm.courtesyReward = this.ruleForm.courtesyReward.toString()
if (this.couponList) this.ruleForm.couponList = this.couponList

View File

@ -47,7 +47,7 @@
</el-checkbox-group>
</el-form-item>
<el-form-item label="适用会员等级" prop="userGradeIds">
<el-select v-model="ruleForm.userGradeIds" clearable placeholder="请选择会员等级" style="width: 100%">
<el-select v-model="ruleForm.userGradeIds" multiple clearable placeholder="请选择会员等级(多选)" style="width: 100%">
<el-option
v-for="(item,index) in userGradeList"
:label="item.name"
@ -278,6 +278,7 @@ export default {
this.ruleForm = res.data
if (res.data.courtesyReward) this.ruleForm.courtesyReward = res.data.courtesyReward.split(",")
if (res.data.paymentType) this.ruleForm.paymentType = res.data.paymentType.split(",")
if (res.data.userGradeIds) this.ruleForm.userGradeIds = res.data.userGradeIds.split(",")
if (res.data.activeTimeType) this.tindex1 = res.data.activeTimeType
if (res.data.couponList) this.couponList = res.data.couponList
}else {
@ -312,9 +313,28 @@ export default {
return
}
}
if (this.ruleForm.courtesyReward && this.ruleForm.courtesyReward.includes("0")) {
if (!this.couponList || this.couponList.length == 0) {
this.$message.error("请先选择赠送优惠券信息!")
return;
}
}
if (this.ruleForm.courtesyReward && this.ruleForm.courtesyReward.includes("3")) {
if (!this.ruleForm.points) {
this.$message.error("请输入赠送积分!")
return;
}
}
if (this.ruleForm.courtesyReward && this.ruleForm.courtesyReward.includes("2")) {
if (!this.ruleForm.growthValue) {
this.$message.error("请输入赠送成长值!")
return;
}
}
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.ruleForm.paymentType) this.ruleForm.paymentType = this.ruleForm.paymentType.toString()
if (this.ruleForm.userGradeIds) this.ruleForm.userGradeIds = this.ruleForm.userGradeIds.toString()
if (this.ruleForm.courtesyReward) this.ruleForm.courtesyReward = this.ruleForm.courtesyReward.toString()
if (this.couponList) this.ruleForm.couponList = this.couponList
if (this.ruleForm.id) {

View File

@ -9,7 +9,7 @@
</div>
<div class="card-change" style="margin: 20px" v-if="tabindex == 0">
<!-- 短信模板查询 -->
<!-- 短信模板查询 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="180px">
<el-form-item label="" prop="name">
<el-input
@ -50,48 +50,31 @@
</el-button>
</el-form-item>
</el-form>
<!-- 短信模板列表 -->
<!-- 短信模板列表 -->
<div style="height: 100vh;overflow: auto;width: 100%">
<el-table :data="tableData" border width="500%" :header-cell-style="{'text-align':'center'}">
<el-table-column type="index" label="序号"></el-table-column>
<el-table-column prop="messageId" label="短信模板ID" width="100">
<template slot-scope="scope">
<span class="ju">{{scope.row.messageId}}</span>
<span class="ju">{{ scope.row.messageId }}</span>
</template>
</el-table-column>
<el-table-column prop="name" label="短信名称" width="100">
<el-table-column prop="name" label="短信名称" width="120">
<template slot-scope="scope">
<span class="ju">{{scope.row.name}}</span>
<span class="ju">{{ scope.row.name }}</span>
</template>
</el-table-column>
<el-table-column prop="content" label="短信模板内容" width="300">
<el-table-column prop="content" label="短信模板内容" width="350">
<template slot-scope="scope">
<span>{{scope.row.content}}</span>
<span>{{ scope.row.content }}</span>
</template>
</el-table-column>
<!-- <el-table-column prop="image" label="短信图片">-->
<!-- <template slot-scope="scope">-->
<!-- <ImagePreview :src="scope.row.image"></ImagePreview>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column prop="deptNames" label="适用范围"></el-table-column>-->
<el-table-column prop="roleIds" label="接收角色">
<template slot-scope="scope">
<span>{{scope.row.roleIds}}</span>
<span>{{ scope.row.roleIds }}</span>
</template>
</el-table-column>
<!-- <el-table-column prop="status" label="短信状态">
<template slot-scope="scope">
<div v-if="scope.row.status==0">
停用
</div>
<div v-else>
启用
</div>
</template>
</el-table-column>-->
<el-table-column label="短信模板状态" align="center" prop="status" width="100">
<el-table-column label="短信模板状态" align="center" prop="status">
<template slot-scope="scope">
<el-switch
v-model="scope.row.status"
@ -104,17 +87,17 @@
</el-switch>
</template>
</el-table-column>
<el-table-column prop="createName" label="创建人" width="100">
<el-table-column prop="createName" label="创建人">
<template slot-scope="scope">
<span class="ju">{{scope.row.createName}}</span>
<span class="ju">{{ scope.row.createName }}</span>
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建时间">
<template slot-scope="scope">
<span class="ju">{{scope.row.createTime}}</span>
<span class="ju">{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="130" class-name="small-padding fixed-width">
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
@ -153,7 +136,7 @@
/>
</div>
<!-- 发送短信 -->
<!-- 发送短信 -->
<div class="card-change" style="margin: 20px" v-if="tabindex == 1">
<el-form :model="sendqueryParams" ref="queryForm" size="small" :inline="true" label-width="180px">
@ -178,28 +161,29 @@
<el-button icon="el-icon-refresh" @click="sendresetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 发送短信列表 -->
<!-- 发送短信列表 -->
<div style="height: 70vh;overflow: auto;width: 100%">
<el-table :data="messageRecordList" border style="width: 100%">
<el-table-column type="index" label="序号"></el-table-column>
<el-table-column prop="name" label="短信名称">
<template slot-scope="scope">
<span>{{scope.row.name}}</span>
<span>{{ scope.row.name }}</span>
</template>
</el-table-column>
<el-table-column prop="content" label="短信内容">
<template slot-scope="scope">
<span>{{scope.row.content}}</span>
<span>{{ scope.row.content }}</span>
</template>
</el-table-column>
<el-table-column prop="roleIds" label="接收角色">
<template slot-scope="scope">
<span>{{scope.row.roleIds}}</span>
<span>{{ scope.row.roleIds }}</span>
</template>
</el-table-column>
<el-table-column prop="successNum" label="短信发送记录">
<template slot-scope="scope">
<span @click="showDialog(scope.row)" style="color: #0BADFE">{{scope.row.successNum || 0}}/{{scope.row.sendNum || 0}}</span>
<span @click="showDialog(scope.row)"
style="color: #0BADFE">{{ scope.row.successNum || 0 }}/{{ scope.row.sendNum || 0 }}</span>
</template>
</el-table-column>
@ -215,12 +199,12 @@
</el-table-column>
<el-table-column prop="createName" label="发送人">
<template slot-scope="scope">
<span>{{scope.row.createName}}</span>
<span>{{ scope.row.createName }}</span>
</template>
</el-table-column>
<el-table-column prop="createTime" label="发送时间">
<template slot-scope="scope">
<span>{{convertTimestampToDate(scope.row.sendTime)}}</span>
<span>{{ convertTimestampToDate(scope.row.sendTime) }}</span>
</template>
</el-table-column>
</el-table>
@ -237,36 +221,12 @@
title="短信接收人"
:visible.sync="dialogVisible"
width="50%">
<el-table
:data="msgList"
border
style="width: 100%">
<el-table-column
type="index"
label="序号"
>
</el-table-column>
<el-table-column
prop="deptNames"
label="所属机构"
>
</el-table-column>
<el-table-column
prop="mobile"
label="手机号"
width="180">
</el-table-column>
<el-table-column
prop="status"
label="短信状态"
width="180"
:formatter="statusFormatter">
</el-table-column>
<el-table-column
prop="messageNum"
label="短信条数"
width="180">
</el-table-column>
<el-table :data="msgList" border style="width: 100%">
<el-table-column type="index" label="序号"></el-table-column>
<el-table-column prop="deptNames" label="所属机构"></el-table-column>
<el-table-column prop="mobile" label="手机号" width="180"></el-table-column>
<el-table-column prop="status" label="短信状态" width="180" :formatter="statusFormatter"></el-table-column>
<el-table-column prop="messageNum" label="短信条数" width="180"></el-table-column>
</el-table>
<pagination
@ -286,17 +246,6 @@
<div class="card-change" style="margin: 20px" v-if="tabindex == 2">
<el-form :model="costqueryParams" ref="queryParams2" size="small" :inline="true" label-width="180px">
<el-form-item label="" prop="deptIdList">
<el-select v-model="costqueryParams.deptIdList" placeholder="请选择所属机构" style="width: 150px">
<el-option
v-for="item in deptListSelect"
:key="item.deptId"
:label="item.deptName"
:value="item.deptId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="" prop="createName">
<el-input
v-model="costqueryParams.createName"
@ -307,17 +256,6 @@
/>
</el-form-item>
<!-- <el-form-item label="" prop="status">
<el-select v-model="queryParams2.status" style="width: 150px" placeholder="请选择操作人">
<el-option
v-for="dict in dict.type.message_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>-->
<el-form-item style="float: right">
<el-button type="primary" icon="el-icon-search" @click="costhandleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="costresetQuery">重置</el-button>
@ -333,49 +271,51 @@
<div style="height: 70vh;overflow: auto;width: 100%">
<el-table :data="messageCostList" border style="width: 100%">
<el-table-column type="index" align="center" label="序号"></el-table-column>
<el-table-column prop="storeId" align="center" label="机构名称">
<el-table-column prop="deptName" align="center" label="机构名称">
<template slot-scope="scope">
<span>{{scope.row.deptId}}</span>
<span>{{ scope.row.deptName }}</span>
</template>
</el-table-column>
<el-table-column prop="contacts" align="center" label="联系人">
<template slot-scope="scope">
<span>{{scope.row.contacts}}</span>
<span>{{ scope.row.contacts }}</span>
</template>
</el-table-column>
<el-table-column prop="mobile" align="center" label="联系方式">
<template slot-scope="scope">
<span>{{scope.row.mobile}}</span>
<span>{{ scope.row.mobile }}</span>
</template>
</el-table-column>
<el-table-column prop="balance" align="center" label="短信余额">
<template slot-scope="scope">
<span>{{scope.row.balance}}</span>
<span>{{ scope.row.balance || 0 }}</span>
</template>
</el-table-column>
<el-table-column prop="messageNum" align="center" label="累计已发短信条数">
<template slot-scope="scope">
<span>{{scope.row.messageNum}}</span>
<span>{{ scope.row.messageNum || 0 }}</span>
</template>
</el-table-column>
<el-table-column prop="residueNum" align="center" label="剩余短信条数">
<template slot-scope="scope">
<span>{{scope.row.residueNum}}</span>
<span>{{ scope.row.residueNum || 0 }}</span>
</template>
</el-table-column>
<el-table-column prop="rechargeRecord" align="center" label="短信充值记录">
<template slot-scope="scope">
<span @click="rechargeshowDialog(scope.row)" style="color: #0BADFE">{{scope.row.rechargeRecord}}</span>
<span @click="rechargeshowDialog(scope.row)" style="color: #0BADFE">{{
scope.row.rechargeRecord || 0
}}</span>
</template>
</el-table-column>
<el-table-column prop="createName" align="center" label="操作人">
<template slot-scope="scope">
<span>{{scope.row.createName}}</span>
<span>{{ scope.row.createName }}</span>
</template>
</el-table-column>
<el-table-column prop="createTime" align="center" label="操作时间">
<template slot-scope="scope">
<span>{{scope.row.createTime}}</span>
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
@ -402,48 +342,16 @@
title="短信充值记录"
:visible.sync="rechargedialogVisible"
width="50%">
<el-table
:data="rechargeList"
border
style="width: 100%">
<el-table-column
type="index"
label="序号"
>
</el-table-column>
<el-table-column
prop="deptName"
label="所属机构"
>
</el-table-column>
<el-table-column
prop="amount"
label="充值金额(元)"
width="180">
</el-table-column>
<el-table-column
prop="unitPrice"
label="短信单价(分/条)"
width="180"
:formatter="statusFormatter">
</el-table-column>
<el-table-column
prop="messageNum"
label="短信条数"
width="180">
</el-table-column>
<el-table-column
prop="rechargeUser"
label="充值用户"
width="180">
</el-table-column>
<el-table-column
prop="createTime"
label="充值时间"
width="180">
</el-table-column>
<el-table :data="rechargeList" border style="width: 100%">
<el-table-column type="index" label="序号"></el-table-column>
<el-table-column prop="deptName" label="所属机构"></el-table-column>
<el-table-column prop="amount" label="充值金额(元)"></el-table-column>
<el-table-column prop="unitPrice" label="短信单价(分/条)"></el-table-column>
<el-table-column prop="messageNum" label="短信条数"></el-table-column>
<el-table-column prop="rechargeUser" label="充值用户"></el-table-column>
<el-table-column prop="createTime" label="充值时间"></el-table-column>
</el-table>
<pagination
v-show="rechargeTotal>0"
:total="rechargeTotal"
@ -452,32 +360,31 @@
@pagination="msgRecordList"
/>
<span slot="footer" class="dialog-footer">
<el-button @click="rechargedialogVisible = false">关闭</el-button>
</span>
<el-button @click="rechargedialogVisible = false">关闭</el-button>
</span>
</el-dialog>
</div>
<!-- 短信模板添加/修改 -->
<!-- 短信模板添加/修改 -->
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="35%" append-to-body>
<el-form ref="form" :rules="rules" :model="form" label-width="120px">
<el-form-item label="短信模板ID" prop="messageId">
<el-input v-model="form.messageId" style="width: 300px" placeholder="请输入短信模板ID"></el-input>
<el-input v-model="form.messageId" placeholder="请输入短信模板ID"></el-input>
</el-form-item>
<el-form-item label="短信名称" prop="name">
<el-input v-model="form.name" style="width: 300px" placeholder="请输入短信名称" @blur="handleBlur"></el-input>
<el-input v-model="form.name" placeholder="请输入短信名称" @blur="handleBlur"></el-input>
</el-form-item>
<el-form-item label="短信模板" prop="content">
<el-input type="textarea"
v-model="form.content"
:maxlength="200"
show-word-limit
placeholder="请输入短信模板"
style="width: 300px">
v-model="form.content"
:maxlength="200"
show-word-limit
placeholder="请输入短信模板">
</el-input>
</el-form-item>
<el-form-item label="适用范围" prop="deptIdList">
<el-select v-model="form.deptIdList" multiple placeholder="请选择所属机构" style="width: 300px">
<el-select v-model="form.deptIdList" multiple placeholder="请选择所属机构" style="width: 100%">
<el-option
v-for="item in deptListSelect"
:key="item.deptId"
@ -488,7 +395,7 @@
</el-form-item>
<!-- 接收角色 -->
<el-form-item label="接收角色" :required="true">
<el-select v-model="form.roeleList" multiple placeholder="请选择角色" style="width: 300px">
<el-select v-model="form.roeleList" 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>
@ -525,19 +432,6 @@
</div>
</el-form-item>
<!-- <el-form-item label="适用角色" prop="categoryName">-->
<!-- <el-select v-model="form.roleIds" style="width: 300px" placeholder="全部">-->
<!-- <el-option-->
<!-- v-for="dict in dict.type.role_ids"-->
<!-- :key="dict.label"-->
<!-- :label="dict.label"-->
<!-- :value="dict.label"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="短信内容" prop="content">
<el-input type="textarea" v-model="form.content" style="width: 300px"></el-input>
</el-form-item>-->
<el-form-item>
<el-button type="primary" @click="submitForm('form')">提交</el-button>
<el-button @click="open = false"> </el-button>
@ -545,12 +439,14 @@
</el-form>
</el-dialog>
<!-- 新增费用设置 -->
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open2" width="35%" append-to-body>
<el-form ref="form2" :rules="rules" :model="form2" label-width="120px">
<!-- 新增费用设置 -->
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open2" width="30%" append-to-body>
<el-form ref="form2" :rules="rules" :model="form2" label-width="80px">
<el-form-item label="机构名称" prop="deptId">
<el-select v-model="form2.deptId" placeholder="请选择所属机构" @change="getStaff(form2.deptId)" style="width: 300px">
<el-select v-model="form2.deptId" placeholder="请选择所属机构" @change="getStaff(form2.deptId)"
style="width: 100%">
<el-option
v-for="item in deptListSelect"
:key="item.deptId"
@ -560,24 +456,24 @@
</el-select>
</el-form-item>
<el-form-item label="联系人" prop="contacts">
<el-input v-model="form2.contacts" style="width: 300px"></el-input>
<el-input v-model="form2.contacts"></el-input>
</el-form-item>
<el-form-item label="联系方式" prop="mobile">
<el-input v-model="form2.mobile" style="width: 300px"></el-input>
<el-input v-model="form2.mobile"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm2"> </el-button>
<el-button @click="open2 = false"> </el-button>
</div>
</el-dialog>
<!-- 充值 -->
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open3" width="35%" append-to-body>
<el-form ref="form3" :rules="rules" :model="form3" label-width="120px">
<el-form-item label="机构名称" prop="deptIdList">
<el-select v-model="form3.deptIdList" multiple placeholder="请选择所属机构" style="width: 300px">
<!-- 充值 -->
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open3" width="30%" append-to-body>
<el-form ref="form3" :rules="rules" :model="form3" label-width="80px">
<el-form-item label="机构名称" prop="deptId">
<el-select v-model="form3.deptId" placeholder="请选择所属机构" style="width: 100%" disabled>
<el-option
v-for="item in deptListSelect"
:key="item.deptId"
@ -587,34 +483,37 @@
</el-select>
</el-form-item>
<el-form-item label="充值金额" prop="amount">
<el-input type="textarea" v-model="form3.amount" placeholder="请输入充值金额" style="width: 300px"></el-input>
<el-input v-model="form3.amount" @input="countNum()" placeholder="请输入充值金额"></el-input>
</el-form-item>
<el-form-item label="短信单价" prop="unitPrice">
<el-input type="textarea" v-model="form3.unitPrice" placeholder="请输入短信单价" style="width: 300px"></el-input>
<el-input v-model="form3.unitPrice" @input="countNum()" placeholder="请输入短信单价"></el-input>
</el-form-item>
<el-form-item label="短信条数" prop="messageNum">
<el-input type="textarea" v-model="form3.messageNum" placeholder="自动获取短信条数" style="width: 300px"></el-input>
<el-input v-model="form3.messageNum" placeholder="自动获取短信条数" disabled></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm3"> </el-button>
<el-button @click="open3 = false"> </el-button>
<el-button type="primary" @click="submitForm3"> </el-button>
<el-button @click="open3 = false"> </el-button>
</el-form-item>
</el-form>
</el-dialog>
<!-- 发送短信框 -->
<!-- 发送短信框 -->
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="sendOpen" width="35%" append-to-body>
<el-form ref="sendForm" :model="sendForm" label-width="120px">
<el-form ref="sendForm" :model="sendForm" label-width="120px">
<el-form-item label="短信接收人" prop="messageSendee">
<el-input v-model="sendForm.messageSendee" style="width: 300px" placeholder="请输入手机号,多个手机号用英文逗号隔开"></el-input>
<el-input v-model="sendForm.messageSendee"
placeholder="请输入手机号,多个手机号用英文逗号隔开"></el-input>
</el-form-item>
<el-form-item label="短信名称" prop="messageId" v-show="false">
<el-input v-model="sendForm.messageId" style="width: 300px" placeholder="请选择短信名称" disabled v-show="false"></el-input>
<el-input v-model="sendForm.messageId" placeholder="请选择短信名称" disabled
v-show="false"></el-input>
</el-form-item>
<el-form-item label="短信名称" prop="messageId">
<el-input v-model="sendForm.messageName" style="width: 300px" placeholder="请选择短信名称" disabled></el-input>
<el-input v-model="sendForm.messageName" placeholder="请选择短信名称"
disabled></el-input>
</el-form-item>
<el-form-item label="短信模板" prop="messageId">
<el-input v-model="sendForm.aa" style="width: 300px" disabled></el-input>
<el-input v-model="sendForm.aa" disabled></el-input>
</el-form-item>
<el-form-item label="发送时间" prop="sendTime">
<div class="block">
@ -637,8 +536,10 @@
<script>
import {deleteApi, getListApi, saveApi, updateApi, getNameListApi, sendMessageSaveApi,
messageRecordListApi,selectChildList,getOneApi} from "../../api/sys/message";
import {
deleteApi, getListApi, saveApi, updateApi, getNameListApi, sendMessageSaveApi,
messageRecordListApi, selectChildList, getOneApi
} from "../../api/sys/message";
import {getToken} from '../../utils/auth'
import {selectChildByDeptId} from "../../api/system/Site/site";
import NotifyMode from "./page/mode.vue";
@ -656,19 +557,19 @@ export default {
dutyList1: [],
conditions: [],
tableData: [
{ status: 0 },
{ status: 1 },
{status: 0},
{status: 1},
],
dialogVisible: false,
rechargedialogVisible: false,
currentData: [],
sendqueryParams:{
sendqueryParams: {
page: 1,
pageSize: 10,
roleIds:'',
roeleList:''
roleIds: '',
roeleList: ''
},
sendTime:'',
sendTime: '',
tabindex: 0,
tabs: [
{
@ -682,7 +583,9 @@ export default {
},
],
// tableData: [],
form: {},
form: {
conditions: []
},
deptListSelect: [],
systemPositionList: [{
value: '首页',
@ -717,7 +620,7 @@ export default {
queryParams2: {
page: 1,
pageSize: 10,
deptIdList:''
deptIdList: ''
},
messageCostList: [],
open2: false,
@ -726,7 +629,7 @@ export default {
form3: {},
sendOpen: false,
sendForm: {},
messageSendee:'',
messageSendee: '',
//
uploadAction: process.env.VUE_APP_BASE_API + 'backendApi/file/upload',
uploadHeader: {'Access-Token': getToken()}, //
@ -740,25 +643,25 @@ export default {
imagePath: process.env.VUE_APP_BASE_API,
//
hideUpload: false,
msgList:[],
msgQuery:{
msgList: [],
msgQuery: {
page: 1,
pageSize: 10,
},
costqueryParams:{
costqueryParams: {
page: 1,
pageSize: 10,
},
rechargeList:[],
rechargeQuery:{
rechargeList: [],
rechargeQuery: {
page: 1,
pageSize: 10,
},
msgTotal:0,
rechargeTotal:0,
messTemtotal:0,
costtotal:0,
sendquerytotal:0,
msgTotal: 0,
rechargeTotal: 0,
messTemtotal: 0,
costtotal: 0,
sendquerytotal: 0,
//
rules: {
messageId: [
@ -772,7 +675,7 @@ export default {
],
content: [
{required: true, message: "短信介绍不能为空", trigger: "blur"},
{ max: 200, message: '短信模板不能超过200个字符', trigger: 'blur' }
{max: 200, message: '短信模板不能超过200个字符', trigger: 'blur'}
],
deptId: [
{required: true, message: "机构名称不能为空", trigger: "blur"}
@ -802,6 +705,12 @@ export default {
this.getDutyList()
},
methods: {
//
countNum(){
if (this.form3.amount && this.form3.unitPrice){
this.form3.messageNum = (this.form3.amount / this.form3.unitPrice).toFixed(0)
}
},
convertTimestampToDate(timestamp) {
const date = new Date(timestamp);
//
@ -843,9 +752,8 @@ export default {
})
},
//
rechargeRecordList(){
rechargeRecordList() {
getCostReListApi(this.rechargeQuery).then(res => {
console.log(this.rechargeQuery)
this.rechargeList = res.data.records
this.rechargeTotal = res.data.total
})
@ -857,8 +765,10 @@ export default {
this.rechargedialogVisible = true;
},
//
recharge() {
this.clean()
recharge(data) {
this.form3 = {
deptId : data.deptId
}
this.open3 = true;
this.title = "充值"
},
@ -872,7 +782,7 @@ export default {
this.dialogVisible = true;
},
//
msgRecordList(){
msgRecordList() {
selectChildList(this.msgQuery).then(res => {
this.msgList = res.data.records
this.msgTotal = res.data.total
@ -909,7 +819,7 @@ export default {
this.$modal.msgSuccess("新增成功");
this.sendOpen = false;
this.getList();
}else {
} else {
this.$message.error(response.message)
}
});
@ -935,19 +845,19 @@ export default {
}
},
//
handleBlur(){
handleBlur() {
console.log(this.form.name)
// if (!this.form.name === undefined || this.form.name === '' || this.form.name === null) {
getNameListApi(this.form.name).then(res => {
if (res.code === 200) {
if (res.data === 1) {
this.$message({
message: '短信名称重复',
type: 'warning'
});
}
getNameListApi(this.form.name).then(res => {
if (res.code === 200) {
if (res.data === 1) {
this.$message({
message: '短信名称重复',
type: 'warning'
});
}
})
}
})
// }
},
//
@ -963,7 +873,7 @@ export default {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}else {
} else {
this.$message.error(response.message)
}
});
@ -975,7 +885,7 @@ export default {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}else {
} else {
this.$message.error(response.message)
}
});
@ -988,7 +898,7 @@ export default {
// }
});
},
getStaff(deptId){
getStaff(deptId) {
getStaffByDeptId(deptId).then(res => {
this.form2.contacts = res.data.realName
this.form2.mobile = res.data.mobile
@ -1001,23 +911,23 @@ export default {
if (valid) {
if (!this.form2.id) {
saveCostApi(this.form2).then(res => {
if (res.data==1){
if (res.data == 1) {
this.$message.success("添加成功")
this.open2 = false
this.queryParams2.page = 1;
this.getMessageCostList()
}else {
} else {
this.$message.error("添加失败,机构名称不可重复!")
}
})
} else {
updateCostApi(this.form).then(res => {
if (res.data==1) {
if (res.data == 1) {
this.$message.success("修改成功")
this.open = false
this.open2 = false
this.queryParams.page = 1;
this.getList()
}else {
} else {
this.$message.error("添加失败,机构名称不可重复!")
}
})
@ -1036,40 +946,18 @@ export default {
this.$modal.msgSuccess("新增成功");
this.open3 = false;
this.getMessageCostList();
}else {
} else {
this.$message.error(response.message)
}
});
/*if (valid) {
if (!this.form3.id) {
// saveLinkManageApi(this.form).then(res => {
// if (res.data==1){
// this.$message.success("")
// this.open = false
// this.queryParams.page = 1;
// this.getList()
// }else {
// this.$message.error("/")
// }
// })
} else {
// updateLinkManageApi(this.form).then(res => {
// if (res.data==1) {
// this.$message.success("")
// this.open = false
// this.queryParams.page = 1;
// this.getList()
// }else {
// this.$message.error("/")
// }
// })
}
}*/
});
},
handleAdd2() {
this.form2 = {}
this.open2 = true
this.title = "新增费用设置"
},
//
getMessageCostList() {
getCostListApi(this.costqueryParams).then(res => {
this.messageCostList = res.data.records
@ -1083,11 +971,9 @@ export default {
page: 1,
pageSize: 10,
};
this.getList()
} else if (index == 1) {
this.queryParams = {
page: 1,
pageSize: 10,
};
this.messageRecordListss()
} else if (index == 2) {
this.queryParams2 = {
page: 1,
@ -1164,12 +1050,11 @@ export default {
this.getMessageCostList()
},
costresetQuery() {
this.queryParams2 = {
this.costqueryParams = {
page: 1,
pageSize: 10,
deptIdList: '',
},
this.getMessageCostList()
}
this.getMessageCostList()
},
resetQuery() {
@ -1225,6 +1110,7 @@ export default {
bannerStatus: false, // Banner
note: '', //
createByName: '', //
conditions: []
};
this.selectedDat = undefined;
},

View File

@ -61,7 +61,7 @@ public class ActiveBirthday extends BaseEntity implements Serializable {
/**
* 适用会员等级
*/
private Integer userGradeId;
private String userGradeId;
/**
* 通知内容
*/

View File

@ -605,7 +605,7 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
if (ObjectUtil.isNotEmpty(activeNewlyweds.getCouponList())) {
// 往关联子表插入信息
for (ActiveNewlywedsChild activeNewlywedsChild : activeNewlyweds.getCouponList()) {
activeNewlywedsChild.setActiveNewlywedsId(activeNewlyweds1.getId());
activeNewlywedsChild.setActiveNewlywedsId(activeNewlyweds.getId());
activeNewlywedsChildService.save(activeNewlywedsChild);
}
}

View File

@ -1,6 +1,7 @@
package com.fuint.business.setting.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fuint.framework.entity.BaseEntity;
@ -86,5 +87,10 @@ public class MessageCost extends BaseEntity implements Serializable {
*/
private String updateBy;
/**
* 机构名称
*/
@TableField(exist = false)
private String deptName;
}

View File

@ -12,13 +12,29 @@ import java.util.Date;
**/
@Data
public class MessageCostRechargeRecordRepVO {
/**
* 机构名称
*/
private String deptName;
/**
*充值金额
*/
private BigDecimal amount;
/**
*短信单价/
*/
private BigDecimal unitPrice;
/**
*短信条数
*/
private int messageNum;
/**
*充值用户
*/
private String rechargeUser;
/**
*创建时间
*/
private Date createTime;
}

View File

@ -37,6 +37,10 @@ public class MessageRechargeRecord extends BaseEntity implements Serializable {
* 油站id
*/
private Integer storeId;
/**
* 机构id
*/
private Integer deptId;
/**
* 充值金额
*/

View File

@ -40,14 +40,17 @@
co.create_time,
co.create_by,
co.update_time,
co.update_by
co.update_by,
sd.dept_name deptName
FROM
message_cost co
LEFT JOIN (
SELECT
SUM( amount ) AS balance,
SUM( message_num ) AS residue_num,
store_id, COUNT(1) AS recharge_record FROM message_recharge_record WHERE store_id = #{entity.storeId} ) a ON co.store_id = a.store_id
store_id, COUNT(1) AS recharge_record FROM message_recharge_record WHERE store_id = #{entity.storeId} ) a
ON co.store_id = a.store_id
LEFT JOIN sys_dept sd ON co.dept_id = sd.dept_id
<where>
and co.store_id = #{entity.storeId}
<if test="entity.deptId != null">

View File

@ -39,6 +39,8 @@ public class MessageRechargeRecordServiceImpl extends ServiceImpl<MessageRecharg
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
messageRechargeRecord.setStoreId(nowAccountInfo.getStoreId());
messageRechargeRecord.setChainStoreId(nowAccountInfo.getChainStoreId());
messageRechargeRecord.setRechargeUser(nowAccountInfo.getRealName());
return baseMapper.insert(messageRechargeRecord);
}