From 48ce15731649dddd7b90c8019d99923927834e3a Mon Sep 17 00:00:00 2001
From: wangh <9483>
Date: Wed, 10 Jan 2024 15:43:57 +0800
Subject: [PATCH] bug
---
fuintAdmin/src/views/member/userInfo.vue | 878 +++++++++---------
.../impl/CardFuelRecordServiceImpl.java | 6 +-
.../cardValue/entity/CardValueRecord.java | 2 +
.../impl/CardValueRecordServiceImpl.java | 28 +-
4 files changed, 488 insertions(+), 426 deletions(-)
diff --git a/fuintAdmin/src/views/member/userInfo.vue b/fuintAdmin/src/views/member/userInfo.vue
index d496d3b35..f69f40fd0 100644
--- a/fuintAdmin/src/views/member/userInfo.vue
+++ b/fuintAdmin/src/views/member/userInfo.vue
@@ -6,8 +6,9 @@
- 子卡管理
-
+ 子卡管理
+
基础资料
@@ -17,43 +18,49 @@
-
- 会员充值
+
+ 会员充值
+
- {{form.mobile}}
+ {{ form.mobile }}
更换
- {{form.name ? form.name : "--"}}
+ {{ form.name ? form.name : "--" }}
-
-
+
+
- {{form.consumeNum}}
- {{form.refuelMoney ? form.refuelMoney : "--"}}
-
- {{form.createTime}}
+ {{ form.consumeNum }}
+ {{ form.refuelMoney ? form.refuelMoney : "--" }}
+
+
+ {{ form.createTime }}
子卡管理
{{ grade ? grade.name : "--" }}
-
-
-
-
+
+
+
+
- {{form.fixingLevel ? fixingLevelinfo(fixingLevelList,form.fixingLevel) : "--"}}
-
+ {{ form.fixingLevel ? fixingLevelinfo(fixingLevelList, form.fixingLevel) : "--" }}
+
- {{ form.description ? form.description : "--" }}
+ {{
+ form.description ? form.description : "--"
+ }}
+
@@ -101,7 +108,7 @@
:value="form.refuelMoney"
title="囤油卡余额"
>
-
+
@@ -133,41 +140,25 @@
-
+
-
+
-
-
充值金额
-
-
-
-
+
+
+ >
自定义
元
@@ -215,7 +205,8 @@
disabled>
积分
- 赠送积分 仅自定义金额模式下可手动输入,活动充值赠送积分不可手动更改[需开启积分活动有效]
+ 赠送积分 仅自定义金额模式下可手动输入,活动充值赠送积分不可手动更改[需开启积分活动有效]
@@ -234,8 +225,8 @@
提成员工
-
- 选择员工
+
+ 选择员工
仅系统储值档次支持提成员工选择、自定义充值金额匹配低一档次
@@ -263,8 +254,9 @@
支付方式
-
+
{{ dict.dictLabel }}
@@ -282,8 +274,10 @@
油品类型
-
- {{ item.type }}
+
+ {{ item.type }}
+
@@ -296,7 +290,7 @@
{{ item.incomeLitres }}L
售价{{ item.rechargeBalance }}元
@@ -314,14 +308,15 @@
积分
-
升数卡充值不支持自定义积分,选择对应充值活动获得对应积分[需开启积分活动有效]
+
升数卡充值不支持自定义积分,选择对应充值活动获得对应积分[需开启积分活动有效]
@@ -348,7 +343,9 @@
支付方式
- {{ dict.label }}
+ {{ dict.label }}
+
@@ -362,8 +359,9 @@
-
-
+
+
@@ -384,10 +382,16 @@
@@ -426,12 +430,13 @@
-
+
-
+
手机号更换后,旧手机号将无法使用,更换后实时生效
@@ -446,12 +451,13 @@
-
+
-
+
@@ -462,7 +468,7 @@
-
+
副卡账户
@@ -474,7 +480,7 @@
title="关于副卡"
:closable="false">
- {{item}}
+ {{ item }}
@@ -508,19 +514,20 @@
-
+
- {{form.name}}
- {{form.mobile}}
+ {{ form.name }}
+ {{ form.mobile }}
请绑定实体卡号
-
实体卡号最低5位且不可重复、绑定后不可删除、如需更换卡号请在会员详情页面内进行卡片重新绑定
+
+ 实体卡号最低5位且不可重复、绑定后不可删除、如需更换卡号请在会员详情页面内进行卡片重新绑定
-
+
-
会员信息:{{form.mobile}}
+
会员信息:{{ form.mobile }}
新增子卡
@@ -626,15 +633,16 @@
-
-
+
+
- {{transaction}}
+ {{ transaction }}
-
+
@@ -644,8 +652,9 @@
-
-
+
+
@@ -661,12 +670,12 @@
:label="item.name"
:value="item.id"
/>
-
-
-
-
-
-
+
+
+
+
+
+
@@ -686,7 +695,15 @@ import {getUser, updateUser} from "@/api/staff/user/user";
import {ljStoreInfo} from "@/api/staff/store";
import {getUserGrade, getUserGradeInfo} from "@/api/staff/user/usergrade";
import {getList} from "@/api/EventMarketing/oilBlock";
-import {getCountOilTypeApi,getCardValueListApi,getPrepaidCardTopUpApi,getCheckTheStatusOfYourPaymentApi,getDicts,getPrepaidFuelTopUpApi,getCheckTheStatusOfYourPaymentByFuelApi} from "@/api/EventMarketing/cardSet";
+import {
+ getCountOilTypeApi,
+ getCardValueListApi,
+ getPrepaidCardTopUpApi,
+ getCheckTheStatusOfYourPaymentApi,
+ getDicts,
+ getPrepaidFuelTopUpApi,
+ getCheckTheStatusOfYourPaymentByFuelApi
+} from "@/api/EventMarketing/cardSet";
import {getSysConfig} from "@/api/staff/user/sysconfig";
import item from "../../layout/components/Sidebar/Item.vue";
import SelectStaff from "@/components/local/selectStaff";
@@ -716,118 +733,118 @@ export default {
return item
}
},
- dicts: ['official','zhzt','zcrzdj','payment_type'],
- data(){
- return{
- baseUrl:process.env.VUE_APP_BASE_API,
- flag:null,
- fixingLevelList:[],
+ dicts: ['official', 'zhzt', 'zcrzdj', 'payment_type'],
+ data() {
+ return {
+ baseUrl: process.env.VUE_APP_BASE_API,
+ flag: null,
+ fixingLevelList: [],
// 充值余额列表
- cardValueList:[],
+ cardValueList: [],
cardValueForm: {
- cardValueId:'', // 储值卡id
+ cardValueId: '', // 储值卡id
mtStaffId: '', //
realName: '',
staffMobile: '',
- amount:'', // 自定义充值字段
- bidBalance:'', // 储值卡面值
- rechargeBalance:'', // 实际支付
- giftBalance:'',// 赠送金额
- points:'', //赠送积分
- growthValue:'', // 赠送成长值
- remark:'',
- paymentType:'WECHAT', // 支付方式
+ amount: '', // 自定义充值字段
+ bidBalance: '', // 储值卡面值
+ rechargeBalance: '', // 实际支付
+ giftBalance: '',// 赠送金额
+ points: '', //赠送积分
+ growthValue: '', // 赠送成长值
+ remark: '',
+ paymentType: 'WECHAT', // 支付方式
royaltyType: '',// 提成类型
- percentageCommissions:null,
- amountCommission:null,
- rechargeType:'0'
+ percentageCommissions: null,
+ amountCommission: null,
+ rechargeType: '0'
},
// 存油卡列表
- cardFuelDieselList:[],
- sourceCardFuelDieselList:[],
+ cardFuelDieselList: [],
+ sourceCardFuelDieselList: [],
cardFuelDieselForm: {
mtStaffId: '',
realName: '',
staffMobile: '',
- points:'',
- remark:'',
- rechargeBalance:'', //实际支付
- paymentType:'WECHAT',
- oilType:'',
- type:'',
- chainStorId:'',
- incomeLitres:'',
+ points: '',
+ remark: '',
+ rechargeBalance: '', //实际支付
+ paymentType: 'WECHAT',
+ oilType: '',
+ type: '',
+ chainStorId: '',
+ incomeLitres: '',
},
- authCode:'', // 支付码
+ authCode: '', // 支付码
timer: null,
- realyPayBills:0,
+ realyPayBills: 0,
oilTypeList: {},
- isPay:true,
- isPaySuccess:false,
- isQuery:true,
+ isPay: true,
+ isPaySuccess: false,
+ isQuery: true,
- payList:[],
+ payList: [],
// 升数卡
- literCard:[
- {liter:73.75,amount:500,lockPrice:6.78,point:50},
- {liter:151.98,amount:1000,lockPrice:6.58,point:100},
- {liter:318.47,amount:2000,lockPrice:6.28,point:200},
- {liter:493.42,amount:3000,lockPrice:6.08,point:300},
- {liter:896.06,amount:5000,lockPrice:5.58,point:500},
- {liter:1968.50,amount:10000,lockPrice:5.08,point:1000},
+ literCard: [
+ {liter: 73.75, amount: 500, lockPrice: 6.78, point: 50},
+ {liter: 151.98, amount: 1000, lockPrice: 6.58, point: 100},
+ {liter: 318.47, amount: 2000, lockPrice: 6.28, point: 200},
+ {liter: 493.42, amount: 3000, lockPrice: 6.08, point: 300},
+ {liter: 896.06, amount: 5000, lockPrice: 5.58, point: 500},
+ {liter: 1968.50, amount: 10000, lockPrice: 5.08, point: 1000},
],
// 充值金额
- amount:'',
+ amount: '',
// 充值备注
- rechargeDesc:'',
+ rechargeDesc: '',
// 支付方式
- payment:'扫码支付',
- activeKey:0,
+ payment: '扫码支付',
+ activeKey: 0,
// 每日交易介绍
- transaction:"",
- config:'-1',
- num:1,
+ transaction: "",
+ config: '-1',
+ num: 1,
// 操作类型
- type:'add',
- title:'',
+ type: 'add',
+ title: '',
// 是否显示修改对话框
openMobile: false,
openName: false,
openRecharge: false,
- openSecondCard:false,
- openBindIdCard:false,
- openSubCard:false,
- openConfig:false,
- openLevel:false,
- openConfirm:false,
- openStaff:false,
- growthValue:'whole',
- cardList:'notUse',
+ openSecondCard: false,
+ openBindIdCard: false,
+ openSubCard: false,
+ openConfig: false,
+ openLevel: false,
+ openConfirm: false,
+ openStaff: false,
+ growthValue: 'whole',
+ cardList: 'notUse',
tabPosition: 'giftCard',
balanceRecord: 'first',
tabOilType: '92',
// 关于副卡信息
- aboutSecondCard:[],
+ aboutSecondCard: [],
// 遮罩层
loading: false,
- id:'',
+ id: '',
// 会员信息
- form:{},
+ form: {},
// 店铺信息
- store:'',
+ store: '',
// 会员等级信息
- grade:'',
+ grade: '',
activeName: 'refuelOrder',
- subCardActive:'subCardManage',
- activeRecharge:'balance',
- tableData:[],
- total:0,
+ subCardActive: 'subCardManage',
+ activeRecharge: 'balance',
+ tableData: [],
+ total: 0,
queryParams: {
page: 1,
pageSize: 10,
@@ -836,14 +853,14 @@ export default {
name: '',
status: '',
},
- subCardList:[],
+ subCardList: [],
list: [],
// 表单校验
rules: {
- mobile: [{ required: true, message: "请输入手机号", trigger: "blur" }],
- name: [{ required: true, message: "请输入会员昵称,内容不可为空", trigger: "blur" }],
- type: [{ required: true, message: "请选择操作类型", trigger: "blur" }],
- fixingLevel: [{ required: true, message: "请选择认证信息", trigger: "blur" }],
+ mobile: [{required: true, message: "请输入手机号", trigger: "blur"}],
+ name: [{required: true, message: "请输入会员昵称,内容不可为空", trigger: "blur"}],
+ type: [{required: true, message: "请选择操作类型", trigger: "blur"}],
+ fixingLevel: [{required: true, message: "请选择认证信息", trigger: "blur"}],
}
}
},
@@ -860,60 +877,60 @@ export default {
this.getStore();
},
methods: {
- fixingLevelinfo(list,id){
+ fixingLevelinfo(list, id) {
let name = "";
list.forEach(item => {
- if(item.id = id){
+ if (item.id = id) {
name = item.name;
}
})
return name;
},
// 获取固定等级列表信息
- getFixingLevelList(){
+ getFixingLevelList() {
allFixingLevel().then(res => {
- if (res.code == 200){
+ if (res.code == 200) {
this.fixingLevelList = res.data
console.log(res.data)
}
})
},
// 选择员工
- chooseStaff(){
+ chooseStaff() {
this.openStaff = true
},
// 更换手机号
- replaceMobile(){
+ replaceMobile() {
this.openMobile = true;
this.title = '更换手机号'
},
// 更换会员昵称
- changeName(){
+ changeName() {
this.openName = true;
this.title = '会员昵称'
},
// 副卡管理
- secondCard(){
+ secondCard() {
this.openSecondCard = true;
- this.title = this.form.secondCard+'-副卡账户管理'
+ this.title = this.form.secondCard + '-副卡账户管理'
},
// 实体卡绑定
- bindIdCard(){
+ bindIdCard() {
this.openBindIdCard = true;
this.title = '实体卡绑定'
},
// 子卡管理
- subCard(){
+ subCard() {
this.openSubCard = true;
this.title = '子卡管理'
},
// 每日笔数
- configuration(){
+ configuration() {
this.openConfig = true;
this.title = '每日交易次数'
},
// 固定等级
- level(){
+ level() {
this.openLevel = true;
this.title = '固定等级(原专车认证)'
},
@@ -924,18 +941,23 @@ export default {
pageSize: 10000,
isonline: 0
}
- await getCardValueListApi(quy).then(res=>{
+ await getCardValueListApi(quy).then(res => {
this.cardValueList = res.data.records;
this.cardValueList.sort((a, b) => a.rechargeBalance - b.rechargeBalance);
-
+ console.log("this.grade.name",this.grade)
})
+
if (this.cardValueList.length > 0) {
// 过滤
- this.cardValueList = this.cardValueList.filter(item => {
- return item.membershipLevel.includes(this.grade.name);
- });
- console.log("this.cardValueList",this.cardValueList)
- this.rechargeCard(0);
+ if (this.grade && this.grade.name) {
+ this.cardValueList = this.cardValueList.filter(item => {
+ return item.membershipLevel.includes(this.grade.name);
+ });
+ console.log("this.cardValueList", this.cardValueList)
+ this.rechargeCard(0);
+ } else {
+ this.cardValueList = []
+ }
}
},
@@ -943,18 +965,18 @@ export default {
// this.cardValueForm.amount = null
this.$set(this.cardValueForm, 'amount', data);
- console.log("data17.16",this.cardValueForm.amount)
- if(!data) {
+ console.log("data17.16", this.cardValueForm.amount)
+ if (!data) {
this.cardValueForm.amount = 0
- }else {
+ } else {
this.cardValueForm.amount = data
}
this.cardValueForm.points = ''
- this.cardValueForm.bidBalance =''
- this.cardValueForm.giftBalance =''
+ this.cardValueForm.bidBalance = ''
+ this.cardValueForm.giftBalance = ''
this.cardValueForm.growthValue = ''
this.cardValueForm.rechargeBalance = ''
@@ -966,9 +988,9 @@ export default {
this.cardValueForm.rechargeBalance = data
- if (this.cardValueList.length > 0){
+ if (this.cardValueList.length > 0) {
// const changeList = this.cardValueList
- this.cardValueList.forEach(change=>{
+ this.cardValueList.forEach(change => {
if (data >= change.rechargeBalance) {
this.cardValueForm.points = change.points
this.cardValueForm.bidBalance = change.bidBalance
@@ -990,7 +1012,6 @@ export default {
const commissionAmount = totalAmount.multipliedBy(percentageCommissions).dividedBy(100).decimalPlaces(2);
this.cardValueForm.amountCommission = commissionAmount
}
-
}
})
}
@@ -1001,10 +1022,10 @@ export default {
pageNo: 1,
pageSize: 10000,
activeStatus: 1,
- status:1,
- activityProgress:1
+ status: 1,
+ activityProgress: 1
}
- await getList(quy).then(res=> {
+ await getList(quy).then(res => {
this.sourceCardFuelDieselList = res.data.records
})
},
@@ -1023,23 +1044,23 @@ export default {
// },
// console.log('Received data in parent:', data);
- this.cardFuelDieselForm.mtStaffId= data.mtStaffId,
- this.cardFuelDieselForm.realName= data.realName,
- this.cardFuelDieselForm.staffMobile= data.staffMobile,
+ this.cardFuelDieselForm.mtStaffId = data.mtStaffId,
+ this.cardFuelDieselForm.realName = data.realName,
+ this.cardFuelDieselForm.staffMobile = data.staffMobile,
- this.cardValueForm.mtStaffId= data.mtStaffId,
- this.cardValueForm.realName= data.realName,
- this.cardValueForm.staffMobile= data.staffMobile
+ this.cardValueForm.mtStaffId = data.mtStaffId,
+ this.cardValueForm.realName = data.realName,
+ this.cardValueForm.staffMobile = data.staffMobile
},
refStaff() {
- this.cardFuelDieselForm.mtStaffId= ''
- this.cardFuelDieselForm.realName= ''
- this.cardFuelDieselForm.staffMobile= ''
+ this.cardFuelDieselForm.mtStaffId = ''
+ this.cardFuelDieselForm.realName = ''
+ this.cardFuelDieselForm.staffMobile = ''
- this.cardValueForm.mtStaffId= ''
- this.cardValueForm.realName= ''
- this.cardValueForm.staffMobile= ''
+ this.cardValueForm.mtStaffId = ''
+ this.cardValueForm.realName = ''
+ this.cardValueForm.staffMobile = ''
},
// 查询参加存油卡油品
getCountOilType() {
@@ -1048,12 +1069,12 @@ export default {
if (this.oilTypeList.length > 0) {
// 默认选中第一个
this.tabOilType = this.oilTypeList[0].oilType
- this.selectOilType(this.oilTypeList[0].status,this.oilTypeList[0].oilType);
+ this.selectOilType(this.oilTypeList[0].status, this.oilTypeList[0].oilType);
}
})
},
// 根据油品过滤查询存油卡
- async tabOilTypeClick(data){
+ async tabOilTypeClick(data) {
// console.log("aaaaaaaaaaaaaa",data)
await this.getCardFuelDieselList()
@@ -1064,14 +1085,14 @@ export default {
this.recharge(0)
}
},
- selectOilType(status,oilType) {
+ selectOilType(status, oilType) {
this.tabOilType = oilType;
this.tabOilTypeClick(status);
},
// 查询员工
// 会员充值
- userRecharge(){
+ userRecharge() {
this.getCardFuelDieselList()
this.getCardValueList()
@@ -1084,17 +1105,17 @@ export default {
// 存油卡列表
},
// 确认充值
- confirm(flag){
+ confirm(flag) {
this.flag = flag
- if (flag ===1) {
+ if (flag === 1) {
if (this.cardValueForm.paymentType == '') {
this.$message.error('请选择支付方式');
return
}
if (this.cardValueForm.amount != null) {
this.cardValueForm.rechargeType = 1
- if (!this.cardValueForm.amount || this.cardValueForm.amount<0) {
+ if (!this.cardValueForm.amount || this.cardValueForm.amount < 0) {
this.$message.error('请选择输入自定义金额');
return
}
@@ -1103,11 +1124,11 @@ export default {
this.cardValueForm.rechargeType = 0
this.realyPayBills = this.cardValueForm.rechargeBalance
}
- }else if(flag === 2) {
+ } else if (flag === 2) {
if (this.cardFuelDieselForm.paymentType == '') {
- this.$message.error('请选择支付方式');
- return
- }
+ this.$message.error('请选择支付方式');
+ return
+ }
this.realyPayBills = this.cardFuelDieselForm.rechargeBalance
}
@@ -1120,7 +1141,7 @@ export default {
this.title = this.payment
},
// 支付方式
- payMethod(payType,flag){
+ payMethod(payType, flag) {
// this.map.payType = payType;
if (falg === 1) {
@@ -1129,7 +1150,7 @@ export default {
this.cardValueForm.paymentType = payType
},
// 获取副卡信息
- getInformation(){
+ getInformation() {
getSysConfig('second_card').then(response => {
this.aboutSecondCard = response.data.split(";")
});
@@ -1137,11 +1158,11 @@ export default {
this.transaction = response.data
});
},
- getList(){
+ getList() {
},
// 获取详情
- getUserInfo(){
+ getUserInfo() {
let _this = this;
// 获取会员详情
getUser(this.id).then(response => {
@@ -1151,20 +1172,20 @@ export default {
});
},
// 获取会员等级详情
- getGrade(id){
+ getGrade(id) {
getUserGradeInfo(id).then(response => {
this.grade = response.data;
});
},
- getStore(){
+ getStore() {
// 获取店铺详情
ljStoreInfo().then(response => {
this.store = response.data;
});
},
// 选择余额充值金额
- rechargeCard(index,item){
- console.log("index",index)
+ rechargeCard(index, item) {
+ console.log("index", index)
// this.cardValueForm.amount = null,
this.cardValueForm.rechargeType = 0
@@ -1179,9 +1200,9 @@ export default {
// this.cardValueForm.bidBalance = 1
// this.cardValueForm.amount = 0
- }else {
+ } else {
if (this.cardValueList <= 0) return
- let file={}
+ let file = {}
// 拿到金额
file = this.cardValueList[index]
@@ -1213,9 +1234,9 @@ export default {
},
// 选择充值金额
- recharge(index,item){
+ recharge(index, item) {
this.activeKey = index;
- let file={}
+ let file = {}
// 拿到金额
file = this.cardFuelDieselList[index]
this.cardFuelDieselForm.points = file.points
@@ -1229,11 +1250,11 @@ export default {
},
- async collection(){
+ async collection() {
let userForm = this.form
- if(!this.authCode && this.cardValueForm.paymentType != "CASH") {
+ if (!this.authCode && this.cardValueForm.paymentType != "CASH") {
this.$message.error('请先扫码');
return
}
@@ -1248,9 +1269,9 @@ export default {
this.cardValueForm.realyPayBills = this.realyPayBills
- let id ;
- await getPrepaidCardTopUpApi(this.cardValueForm).then(response=> {
- if (response.data!=null){
+ let id;
+ await getPrepaidCardTopUpApi(this.cardValueForm).then(response => {
+ if (response.data != null) {
this.loading = true;
id = response.data.id
// if (response.data.payStatus == "paid"){
@@ -1262,41 +1283,41 @@ export default {
//
let timer = setInterval(async () => {
getCheckTheStatusOfYourPaymentApi(id).then(response => {
- if (response.data!=null){
- if (response.data.payStatus == "unpaid"){
- this_.isQuery = true;
- }
- if (response.data.payStatus == "paid"){
- this_.isPaySuccess = true;
- this_.isQuery = false;
- }
- if (response.data.payStatus == "payFail"){
- this_.isPaySuccess = false;
- this_.isQuery = false;
- }
+ if (response.data != null) {
+ if (response.data.payStatus == "unpaid") {
+ this_.isQuery = true;
}
- })
- }, 500);
-
- let timer2 = setInterval(function () {
- if (this_.isQuery == false) {
- this_.loading = false;
- this_.isPay = false;
- clearInterval(timer);
- clearTimeout(timer3);
-
+ if (response.data.payStatus == "paid") {
+ this_.isPaySuccess = true;
+ this_.isQuery = false;
}
- },500)
+ if (response.data.payStatus == "payFail") {
+ this_.isPaySuccess = false;
+ this_.isQuery = false;
+ }
+ }
+ })
+ }, 500);
- var timer3 = setTimeout(function (){
- clearInterval(timer2);
+ let timer2 = setInterval(function () {
+ if (this_.isQuery == false) {
+ this_.loading = false;
+ this_.isPay = false;
clearInterval(timer);
- this_.loading = false;
- this_.isPay = false;
- this.isPaySuccess = false;
+ clearTimeout(timer3);
- },30000)
- }else if (this.flag === 2){
+ }
+ }, 500)
+
+ var timer3 = setTimeout(function () {
+ clearInterval(timer2);
+ clearInterval(timer);
+ this_.loading = false;
+ this_.isPay = false;
+ this.isPaySuccess = false;
+
+ }, 30000)
+ } else if (this.flag === 2) {
// console.log("cardFuelDieselForm",this.cardFuelDieselForm)
this.cardFuelDieselForm.mtUserId = userForm.id
this.cardFuelDieselForm.name = userForm.name
@@ -1304,9 +1325,9 @@ export default {
this.cardFuelDieselForm.authCode = this.authCode
- let id ;
- await getPrepaidFuelTopUpApi(this.cardFuelDieselForm).then(response=> {
- if (response.data!=null){
+ let id;
+ await getPrepaidFuelTopUpApi(this.cardFuelDieselForm).then(response => {
+ if (response.data != null) {
this.loading = true;
id = response.data.id
}
@@ -1315,39 +1336,39 @@ export default {
let timer = setInterval(async () => {
getCheckTheStatusOfYourPaymentByFuelApi(id).then(response => {
- if (response.data!=null){
- if (response.data.payStatus == "unpaid"){
- this_.isQuery = true;
- }
- if (response.data.payStatus == "paid"){
- this_.isPaySuccess = true;
- this_.isQuery = false;
- }
- if (response.data.payStatus == "payFail"){
- this_.isPaySuccess = false;
- this_.isQuery = false;
- }
+ if (response.data != null) {
+ if (response.data.payStatus == "unpaid") {
+ this_.isQuery = true;
}
- })
- }, 500);
-
- let timer2 = setInterval(function () {
- if (this_.isQuery == false) {
- this_.loading = false;
- this_.isPay = false;
- clearInterval(timer);
- clearInterval(timer2);
+ if (response.data.payStatus == "paid") {
+ this_.isPaySuccess = true;
+ this_.isQuery = false;
}
- },500)
+ if (response.data.payStatus == "payFail") {
+ this_.isPaySuccess = false;
+ this_.isQuery = false;
+ }
+ }
+ })
+ }, 500);
- setTimeout(function (){
- clearInterval(timer2);
+ let timer2 = setInterval(function () {
+ if (this_.isQuery == false) {
+ this_.loading = false;
+ this_.isPay = false;
clearInterval(timer);
- this_.loading = false;
- this_.isPay = false;
- this.isPaySuccess = false;
+ clearInterval(timer2);
+ }
+ }, 500)
- },30000)
+ setTimeout(function () {
+ clearInterval(timer2);
+ clearInterval(timer);
+ this_.loading = false;
+ this_.isPay = false;
+ this.isPaySuccess = false;
+
+ }, 30000)
let this_ = this
}
@@ -1355,58 +1376,64 @@ export default {
},
- getPayList(){
+ getPayList() {
// console.log("payment_type1")
- getDicts("payment_type").then( response => {
+ getDicts("payment_type").then(response => {
// console.log("payment_type2",response.data)
this.payList = response.data;
})
},
// 关闭支付窗口
- handClose(){
- this.isPay=true,
- this.isPaySuccess=false,
- this.isQuery=true,
- this.openConfirm = false
- this.openRecharge = false
+ handClose() {
+ this.isPay = true,
+ this.isPaySuccess = false,
+ this.isQuery = true,
+ this.openConfirm = false
+ this.openRecharge = false
- // this.isPaySuccess = false;
- this.authCode = null
- this.activeRecharge='balance',
+ // this.isPaySuccess = false;
+ this.authCode = null
+ this.activeRecharge = 'balance',
this.iniz()
- this.cardFuelDieselForm = {}
- },
+ this.cardFuelDieselForm = {}
+ },
iniz() {
- this.cardValueForm= {
- cardValueId:'', // 储值卡id
+ this.cardValueForm = {
+ cardValueId: '', // 储值卡id
mtStaffId: '', //
realName: '',
staffMobile: '',
- amount:'', // 自定义充值字段
- bidBalance:'', // 储值卡面值
- rechargeBalance:'', // 实际支付
- giftBalance:'',// 赠送金额
- points:'', //赠送积分
- growthValue:'', // 赠送成长值
- remark:'',
- paymentType:'', // 支付方式
+ amount: '', // 自定义充值字段
+ bidBalance: '', // 储值卡面值
+ rechargeBalance: '', // 实际支付
+ giftBalance: '',// 赠送金额
+ points: '', //赠送积分
+ growthValue: '', // 赠送成长值
+ remark: '',
+ paymentType: '', // 支付方式
royaltyType: '',// 提成类型
- percentageCommissions:null,
- amountCommission:null,
- rechargeType:'0'
+ percentageCommissions: null,
+ amountCommission: null,
+ rechargeType: '0'
}
+
+ // 刷新页面
+ this.getUserInfo();
+ this.getInformation();
+ this.getFixingLevelList();
+ this.getStore();
},
// 提交按钮
- submitForm: function() {
+ submitForm: function () {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id) {
updateUser(this.form).then(response => {
- if (response.data==1){
+ if (response.data == 1) {
this.$modal.msgSuccess("修改成功");
this.openMobile = false;
this.openName = false;
@@ -1414,7 +1441,7 @@ export default {
this.openLevel = false;
this.openBindIdCard = false;
this.getUserInfo();
- }else {
+ } else {
this.$modal.msgError("修改失败");
}
@@ -1426,7 +1453,7 @@ export default {
// 表单重置
reset() {
this.resetForm("form");
- this.form= {}
+ this.form = {}
},
// 取消按钮
cancel() {
@@ -1438,12 +1465,12 @@ export default {
this.isPaySuccess = false;
this.authCode = null
- this.activeRecharge='balance',
+ this.activeRecharge = 'balance',
- this.cardValueForm = {}
+ this.cardValueForm = {}
this.cardFuelDieselForm = {}
},
- cancelCollection(){
+ cancelCollection() {
this.openConfirm = false;
},
handleClick(tab, event) {
@@ -1458,107 +1485,120 @@ export default {
goBack() {
this.$router.back(-1);
}
- // 积分表、储值卡详情表、积分详情表、储值卡表、储值卡模板表、用户储值卡关联表、
+ // 积分表、储值卡详情表、积分详情表、储值卡表、储值卡模板表、用户储值卡关联表、
}
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java
index e0baf89b6..4f1049a84 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java
@@ -203,10 +203,10 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
// 支付
if (flag) {
- Integer allAmount1 = (int) (theAmountToBePaid*100);
- System.out.println("allAmount1:"+allAmount1);
+ Integer allAmount = (int) (theAmountToBePaid*100);
+ System.out.println("allAmount1:"+allAmount);
- Integer allAmount = (int) (0.01 * 100);
+// Integer allAmount = (int) (0.01 * 100);
MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(nowAccountInfo.getStoreId());
// 处理支付需要的数据
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/entity/CardValueRecord.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/entity/CardValueRecord.java
index 4a3543799..5e5a49bd7 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/entity/CardValueRecord.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/entity/CardValueRecord.java
@@ -77,5 +77,7 @@ public class CardValueRecord extends Model {
//连锁店id
private Integer chainStoreId;
+ private String status;
+
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java
index a478846d6..f72779333 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java
@@ -46,6 +46,8 @@ import com.fuint.business.userManager.mapper.LJUserMapper;
import com.fuint.business.userManager.service.UserBalanceService;
import com.fuint.business.userManager.vo.LJUserVo;
import com.fuint.common.dto.AccountInfo;
+import com.fuint.common.util.RedisLock;
+import com.fuint.common.util.RedisUtil;
import com.fuint.common.util.RocketUtil;
import com.fuint.common.util.TokenUtil;
import com.fuint.repository.mapper.MtStaffMapper;
@@ -53,6 +55,7 @@ import com.fuint.repository.model.MtStaff;
import io.lettuce.core.dynamic.annotation.Param;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
+import org.redisson.api.RLock;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -62,6 +65,7 @@ import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
+import java.util.concurrent.TimeUnit;
/**
* 储值充值表(CardValueRecord)表服务实现类
@@ -304,6 +308,9 @@ public class CardValueRecordServiceImpl extends ServiceImpl