bug
This commit is contained in:
parent
1de8243319
commit
4b1ee8a19f
@ -405,7 +405,7 @@ import {
|
||||
// 下载
|
||||
handleChange(file, fileList) {
|
||||
this.uploading = true;
|
||||
console.log(file)
|
||||
console.log(file,111)
|
||||
if(file.status === 'success'){
|
||||
this.uploading = false;
|
||||
this.openUpload = false;
|
||||
@ -413,6 +413,7 @@ import {
|
||||
|
||||
this.fileList.splice(0,1)
|
||||
this.result = file.response.data
|
||||
this.getlist()
|
||||
}
|
||||
},
|
||||
putStatus(id){
|
||||
|
@ -366,7 +366,7 @@
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="礼品卡兑换电子储值卡余额" name="giftCard">
|
||||
<el-form ref="form" :model="form2" :rules="rules1" label-width="120px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules1" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="卡号" prop="number" style="width: 500px">
|
||||
@ -1411,7 +1411,7 @@ export default {
|
||||
this.title = this.payment
|
||||
},
|
||||
confirm1(){
|
||||
this.$refs["form"].validate(valid => {
|
||||
this.$refs["form2"].validate(valid => {
|
||||
if (valid) {
|
||||
this.form2.userId = this.id
|
||||
giftCardExchange(this.form2).then(res => {
|
||||
@ -1422,6 +1422,7 @@ export default {
|
||||
this.openRecharge = false
|
||||
this.form2.number = ''
|
||||
this.form2.cardPassword = ''
|
||||
this.getUserInfo()
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -1602,6 +1603,7 @@ export default {
|
||||
// 当支付成功时
|
||||
this_.isPaySuccess = true;
|
||||
this_.isQuery = false;
|
||||
this_.getUserInfo()
|
||||
}else if (payStatus === "payFail") {
|
||||
this_.isPaySuccess = false;
|
||||
this_.isQuery = false;
|
||||
@ -1675,6 +1677,7 @@ export default {
|
||||
if (response.data.payStatus == "paid") {
|
||||
this_.isPaySuccess = true;
|
||||
this_.isQuery = false;
|
||||
this_.getUserInfo()
|
||||
}
|
||||
if (response.data.payStatus == "payFail") {
|
||||
this_.isPaySuccess = false;
|
||||
|
@ -218,15 +218,15 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24" style="display: flex;margin-bottom: 10px">
|
||||
<el-form-item label="提成来源" prop="commissionSource" style="width: 420px">
|
||||
<el-form-item label="提成来源" prop="commissionSource" style="width: 90%">
|
||||
<el-radio-group v-model="form.commissionSource" v-if="form.commissionSource == '非油品'">
|
||||
<!-- <el-radio v-for="dict in dict.type.source" @change="isChange" :label="dict.value">{{ dict.label }}</el-radio>-->
|
||||
<el-radio v-if="form.commissionSource == '非油品'" @change="isChange" label="非油品" value="非油品"></el-radio>
|
||||
</el-radio-group>
|
||||
<el-radio-group v-model="form.commissionSource" v-else>
|
||||
<!-- <el-radio v-for="dict in dict.type.source" @change="isChange" :label="dict.value">{{ dict.label }}</el-radio>-->
|
||||
<el-radio @change="isChange" label="储值卡充值" value="储值卡充值"></el-radio>
|
||||
<el-radio @change="isChange" label="囤油卡充值" value="囤油卡充值"></el-radio>
|
||||
<el-radio @change="isChange" label="电子储值卡充值" value="电子储值卡充值"></el-radio>
|
||||
<el-radio @change="isChange" label="电子囤油卡充值" value="电子囤油卡充值"></el-radio>
|
||||
<el-radio @change="isChange" label="车主加油" value="车主加油"></el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
@ -211,7 +211,7 @@ public class StaffCommissionServiceImpl extends ServiceImpl<StaffCommissionMappe
|
||||
}
|
||||
}
|
||||
}
|
||||
if (type.equals("3") && staffCommission.getCommissionSource().equals("储值卡充值")){
|
||||
if (type.equals("3") && staffCommission.getCommissionSource().equals("电子储值卡充值")){
|
||||
for (String staffRoleGroup : staffRoleGroups) {
|
||||
if (staff.getRoleId().equals(staffRoleGroup)) {
|
||||
commissionRecord.setStaffId(staffId);
|
||||
@ -247,7 +247,7 @@ public class StaffCommissionServiceImpl extends ServiceImpl<StaffCommissionMappe
|
||||
}
|
||||
}
|
||||
}
|
||||
if (type.equals("4") && staffCommission.getCommissionSource().equals("囤油卡充值")){
|
||||
if (type.equals("4") && staffCommission.getCommissionSource().equals("电子囤油卡充值")){
|
||||
for (String staffRoleGroup : staffRoleGroups) {
|
||||
if (staff.getRoleId().equals(staffRoleGroup)) {
|
||||
commissionRecord.setStaffId(staffId);
|
||||
|
@ -841,10 +841,12 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
|
||||
if (CollectionUtils.isNotEmpty(activeConsumptionVOS)){
|
||||
for (ActiveConsumptionVO activeConsumptionVO : activeConsumptionVOS) {
|
||||
BigDecimal amount = new BigDecimal(activeConsumptionVO.getAmount());
|
||||
if (activeConsumptionVO.getMoneyType().equals("1") && paymentActiveDTO.getOrderAmount()>=activeConsumptionVO.getAmount()){
|
||||
if (ObjectUtils.isNotEmpty(activeConsumptionVO.getMoneyType()) && activeConsumptionVO.getMoneyType().equals("1")
|
||||
&& paymentActiveDTO.getOrderAmount()>=activeConsumptionVO.getAmount()){
|
||||
activeConsumptionVOS1.add(activeConsumptionVO);
|
||||
}
|
||||
if (activeConsumptionVO.getMoneyType().equals("2") && paymentActiveDTO.getAmount().compareTo(amount)>0){
|
||||
if (ObjectUtils.isNotEmpty(activeConsumptionVO.getMoneyType()) && activeConsumptionVO.getMoneyType().equals("2")
|
||||
&& paymentActiveDTO.getAmount().compareTo(amount)>0){
|
||||
activeConsumptionVOS1.add(activeConsumptionVO);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.fuint.business.marketingActivity.cardGift.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.excel.EasyExcelFactory;
|
||||
import com.alipay.api.domain.LoginUserDTO;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@ -176,7 +177,14 @@ public class CardGiftServiceImpl extends ServiceImpl<CardGiftMapper, CardGift> i
|
||||
public CardGift exchange(CardGift cardGift) {
|
||||
//登录用户id
|
||||
Integer userId = TokenUtil.getNowAccountInfo().getId();
|
||||
LJUserVo ljUserVo = ljUserService.selectUserById(userId, TokenUtil.getNowAccountInfo().getStoreId());
|
||||
if (ObjectUtil.isNotEmpty(cardGift.getUserId())){
|
||||
userId = cardGift.getUserId();
|
||||
}
|
||||
Integer storeId = TokenUtil.getNowAccountInfo().getStoreId();
|
||||
if (ObjectUtil.isNotEmpty(cardGift.getStoreId())){
|
||||
storeId = cardGift.getStoreId();
|
||||
}
|
||||
LJUserVo ljUserVo = ljUserService.selectUserById(userId, storeId);
|
||||
LambdaQueryWrapper<CardGift> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(CardGift::getNumber,cardGift.getNumber());
|
||||
queryWrapper.eq(CardGift::getStatus,"1");
|
||||
|
@ -289,7 +289,10 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
// 商品优惠金额
|
||||
Double goodsDiscount = Double.valueOf(map.get("goodsDiscount"));
|
||||
// 员工id
|
||||
Integer staffId = Integer.valueOf(map.get("staffId"));
|
||||
Integer staffId = null;
|
||||
if (ObjectUtil.isNotEmpty(map.get("staffId"))){
|
||||
staffId = Integer.valueOf(map.get("staffId"));
|
||||
}
|
||||
// 会员消费金额(储值卡需要减少的金额)
|
||||
Double consumeAmount = Double.valueOf(map.get("consumeAmount"));
|
||||
Integer userId = null;
|
||||
@ -359,7 +362,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
ljOrder.setDiscount(goodsDiscount);
|
||||
ljOrder.setStaffId(staffId);
|
||||
ljOrder.setStatus(payStatus);
|
||||
if (payType.equals("CASH")){
|
||||
if (payType.equals("CASH") && ObjectUtil.isNotEmpty(staffId)){
|
||||
staffCommissionService.countStaffCommission(staffId,storeId,goodsAmount,goodsActualPay,"2",orderNo);
|
||||
ljOrder.setPayTime(new Date());
|
||||
}
|
||||
@ -412,7 +415,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
order.setDiscountAmount(oilDiscount);
|
||||
order.setBalanceAmount(Double.valueOf(balanceAmount));
|
||||
order.setOilCardAmount(Double.valueOf(oilCardAmount));
|
||||
if (payType.equals("CASH")){
|
||||
if (payType.equals("CASH") && ObjectUtil.isNotEmpty(staffId)){
|
||||
staffCommissionService.countStaffCommission(staffId,storeId,oilAmount,oilActualPay,"1",orderNo);
|
||||
}
|
||||
order.setCouponId(recordId);
|
||||
@ -427,7 +430,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
order.setCouponId(null);
|
||||
}
|
||||
|
||||
if (userId!=null){
|
||||
if (ObjectUtil.isNotEmpty(userId)){
|
||||
this.updateGrowthValue(oilAmount,oilActualPay, userId, Integer.valueOf(jsonObjects.get(i).get("oilName").toString()),refuelMoney,storeId,orderNo);
|
||||
}
|
||||
order.setStoreId(storeId);
|
||||
@ -551,7 +554,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
|
||||
// 调用消费有礼接口
|
||||
public void updateCardAndActiveById(Integer storeId,Integer userId,Integer activeId,Integer cardFavorableId,String type,Double orderAmount,Integer oilId){
|
||||
if (userId!=null){
|
||||
if (ObjectUtil.isNotEmpty(userId)){
|
||||
LJUserVo userVo = userService.queryUserById(userId, storeId);
|
||||
PaymentActiveVO paymentActiveVO = new PaymentActiveVO();
|
||||
paymentActiveVO.setUserId(userId);
|
||||
@ -1383,7 +1386,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
* @param storeId 店铺id
|
||||
*/
|
||||
private void updateGrowthValue(Double oilAmount,Double oilActualPay,Integer userid,Integer oilId,String refuelMoney,Integer storeId,String orderNo){
|
||||
if (oilId!=null){
|
||||
if (ObjectUtil.isNotEmpty(oilId)){
|
||||
OilName oilName = oilNameService.selectOilNameById(oilId);
|
||||
// 获取成长值增长数值
|
||||
Integer gasGrowthValue = null;
|
||||
@ -1421,7 +1424,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
// }else {
|
||||
// balance.setRefuelMoney(refuelMoney);
|
||||
// }
|
||||
if (ObjectUtil.isNotEmpty(refuelMoney)){
|
||||
if (ObjectUtil.isNotEmpty(refuelMoney) && !refuelMoney.equals("null")){
|
||||
String refuelMoney1 = balance.getRefuelMoney();
|
||||
JSONArray objects = JSONArray.parseArray(refuelMoney);
|
||||
JSONArray objects1 = JSONArray.parseArray(refuelMoney1);
|
||||
|
@ -994,6 +994,12 @@ public class MemberServiceImpl extends ServiceImpl<MtUserMapper, MtUser> impleme
|
||||
}
|
||||
// 新增会员余额信息
|
||||
userBalanceService.insertUserBalance(userBalanceAdd);
|
||||
}else {
|
||||
LJUserGrade ljUserGrade = ljUserGradeService.selectUserGradeByStoreId(Integer.parseInt(storeId));
|
||||
if (ObjectUtil.isNotEmpty(ljUserGrade) && ObjectUtil.isNotEmpty(ljUserGrade.getId())) {
|
||||
userBalance.setGradeId(ljUserGrade.getId());
|
||||
}
|
||||
userBalanceService.updateUserBalance(userBalance);
|
||||
}
|
||||
// 查询关联表里面是否有信息 (注册邀请)
|
||||
MtInvitation mtInvitation1 = mtInvitationMapper.queryByStoreId(Integer.parseInt(storeId), mtUser.getId());
|
||||
|
@ -3,7 +3,7 @@ import request from '@/utils/request'
|
||||
// 测试支付接口
|
||||
export function giftCardExchange(query) {
|
||||
return request({
|
||||
url: '/business/marketingActivity/cardGift/exchange',
|
||||
url: '/business/marketingActivity/cardGift/exchange?number=' + query.number + "&cardPassword=" + query.cardPassword + "&userId=" + query.userId,
|
||||
method: 'get',
|
||||
data:query
|
||||
})
|
||||
|
@ -797,7 +797,7 @@
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="礼品卡兑换电子储值卡余额" name="giftCard">
|
||||
<el-form ref="form" :model="form3" :rules="rules2" label-width="120px">
|
||||
<el-form ref="form3" :model="form3" :rules="rules2" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="卡号" prop="number" style="width: 500px">
|
||||
@ -1763,15 +1763,17 @@
|
||||
},
|
||||
// 会员充值
|
||||
async userRecharge() {
|
||||
// if (this.isSure){
|
||||
if (this.member){
|
||||
if (this.isSure){
|
||||
// if (this.member){
|
||||
this.$message.error("请先选择会员")
|
||||
return;
|
||||
}
|
||||
|
||||
await getUserGrade(this.member.gradeId).then(res => {
|
||||
this.grade = res.data
|
||||
})
|
||||
if (this.member && this.member.gradeId){
|
||||
await getUserGrade(this.member.gradeId).then(res => {
|
||||
this.grade = res.data
|
||||
})
|
||||
}
|
||||
|
||||
await this.getCardFuelDieselList()
|
||||
await this.getCardValueList()
|
||||
@ -2079,16 +2081,19 @@
|
||||
}
|
||||
},
|
||||
confirm1(){
|
||||
this.$refs["form"].validate(valid => {
|
||||
this.$refs["form3"].validate(valid => {
|
||||
if (valid) {
|
||||
giftCardExchange(this.form2).then(res => {
|
||||
this.form3.userId = this.member.id
|
||||
let cardGift = this.form3
|
||||
giftCardExchange(cardGift).then(res => {
|
||||
if (res.data.id == '' || res.data.id == null) {
|
||||
this.$message.error('兑换失败!');
|
||||
} else {
|
||||
this.$message.success('兑换成功!');
|
||||
this.openRecharge = false
|
||||
this.form2.number = ''
|
||||
this.form2.cardPassword = ''
|
||||
this.form3.number = ''
|
||||
this.form3.cardPassword = ''
|
||||
this.getMemberAfter();
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -3860,7 +3865,6 @@
|
||||
},
|
||||
// 确定收款
|
||||
async collection(){
|
||||
this.loading = true;
|
||||
if (this.payType=="CASH"){
|
||||
if (this.authCode<((+this.oilActualPay) + (+this.goodsActualPay)) || this.seekZero<0){
|
||||
this.$modal.msgError("请输入正确的金额");
|
||||
@ -3875,6 +3879,7 @@
|
||||
this.$modal.msgError("请先扫码");
|
||||
return;
|
||||
}
|
||||
this.loading = true;
|
||||
// JSON.parse()
|
||||
this.map.seekZero = this.seekZero;
|
||||
this.map.oilAmount = this.oilAmount;
|
||||
|
@ -367,7 +367,7 @@
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="礼品卡兑换电子储值卡余额" name="giftCard">
|
||||
<el-form ref="form" :model="form2" :rules="rules1" label-width="120px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules1" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="卡号" prop="number" style="width: 500px">
|
||||
@ -1368,8 +1368,9 @@ export default {
|
||||
}
|
||||
},
|
||||
confirm1(){
|
||||
this.$refs["form"].validate(valid => {
|
||||
this.$refs["form2"].validate(valid => {
|
||||
if (valid) {
|
||||
this.form2.userId = this.id;
|
||||
giftCardExchange(this.form2).then(res => {
|
||||
if (res.data.id == '' || res.data.id == null) {
|
||||
this.$message.error('兑换失败!');
|
||||
@ -1378,6 +1379,7 @@ export default {
|
||||
this.openRecharge = false
|
||||
this.form2.number = ''
|
||||
this.form2.cardPassword = ''
|
||||
this.getUserInfo();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -487,7 +487,8 @@
|
||||
if (uni.getStorageSync("inviteStaffId") || this.staffList.length==0) {
|
||||
this.toPayment(uni.getStorageSync("inviteStaffId"))
|
||||
} else {
|
||||
this.$refs.popup.open('bottom')
|
||||
// this.$refs.popup.open('bottom')
|
||||
this.toPayment(uni.getStorageSync("inviteStaffId"))
|
||||
}
|
||||
} else {
|
||||
if (this.value == "") {
|
||||
@ -547,17 +548,19 @@
|
||||
// if (!this.AppToken) {
|
||||
// return;
|
||||
// }
|
||||
await request({
|
||||
url: 'chainStoreInfo/theJudgmentIsTheSame',
|
||||
method: 'get',
|
||||
data: {
|
||||
"chainStoreId": uni.getStorageSync("chainStoreId")
|
||||
}
|
||||
}).then(res => {
|
||||
if (!res.data) {
|
||||
uni.removeStorageSync("App-Token");
|
||||
}
|
||||
})
|
||||
if (this.AppToken) {
|
||||
await request({
|
||||
url: 'chainStoreInfo/theJudgmentIsTheSame',
|
||||
method: 'get',
|
||||
data: {
|
||||
"chainStoreId": uni.getStorageSync("chainStoreId")
|
||||
}
|
||||
}).then(res => {
|
||||
if (!res.data) {
|
||||
uni.removeStorageSync("App-Token");
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (uni.getStorageSync("appltType")== "WECHAT") {
|
||||
// 判断当前登录的code是否相同
|
||||
|
@ -596,8 +596,8 @@
|
||||
//礼品卡兑换
|
||||
exchangeGift() {
|
||||
request({
|
||||
url: '/business/marketingActivity/cardGift/exchange?number=' + this.number + "&cardPassword=" +
|
||||
this.cardPassword,
|
||||
url: '/business/marketingActivity/cardGift/exchange?number=' + this.number + "&cardPassword=" +
|
||||
this.cardPassword + "&storeId=" + uni.getStorageSync("storeId"),
|
||||
method: 'get',
|
||||
}).then(res => {
|
||||
if (res.data.id == '' || res.data.id == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user