10.18
This commit is contained in:
parent
86b9c1997d
commit
2dfb19b84d
@ -17,10 +17,13 @@ import com.fuint.business.member.service.ILJDutyService;
|
|||||||
import com.fuint.business.member.service.ILJStaffService;
|
import com.fuint.business.member.service.ILJStaffService;
|
||||||
import com.fuint.business.order.entity.AllOrderInfo;
|
import com.fuint.business.order.entity.AllOrderInfo;
|
||||||
import com.fuint.business.order.mapper.AllOrderInfoMapper;
|
import com.fuint.business.order.mapper.AllOrderInfoMapper;
|
||||||
|
import com.fuint.business.order.service.AllOrderInfoService;
|
||||||
|
import com.fuint.business.order.vo.AllOrderInfoUniVo;
|
||||||
import com.fuint.common.dto.AccountInfo;
|
import com.fuint.common.dto.AccountInfo;
|
||||||
import com.fuint.common.util.TokenUtil;
|
import com.fuint.common.util.TokenUtil;
|
||||||
import com.fuint.system.role.entity.TDuty;
|
import com.fuint.system.role.entity.TDuty;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
@ -38,6 +41,9 @@ public class StaffCommissionServiceImpl extends ServiceImpl<StaffCommissionMappe
|
|||||||
private ILJDutyService dutyService;
|
private ILJDutyService dutyService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private AllOrderInfoMapper allOrderInfoMapper;
|
private AllOrderInfoMapper allOrderInfoMapper;
|
||||||
|
@Autowired
|
||||||
|
@Lazy
|
||||||
|
private AllOrderInfoService allOrderInfoService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<StaffCommissionVo> selectCommissionList(Page page, StaffCommission commission) {
|
public IPage<StaffCommissionVo> selectCommissionList(Page page, StaffCommission commission) {
|
||||||
@ -123,6 +129,7 @@ public class StaffCommissionServiceImpl extends ServiceImpl<StaffCommissionMappe
|
|||||||
public void countStaffCommission(Integer staffId, Integer storeId, Double amount, Double payAmount, String type, String orderNo) {
|
public void countStaffCommission(Integer staffId, Integer storeId, Double amount, Double payAmount, String type, String orderNo) {
|
||||||
AllOrderInfo allOrderInfo = allOrderInfoMapper.selectOne(new LambdaQueryWrapper<AllOrderInfo>()
|
AllOrderInfo allOrderInfo = allOrderInfoMapper.selectOne(new LambdaQueryWrapper<AllOrderInfo>()
|
||||||
.eq(AllOrderInfo::getOrderNo, orderNo));
|
.eq(AllOrderInfo::getOrderNo, orderNo));
|
||||||
|
AllOrderInfo allOrderInfo1 = allOrderInfoService.selectAllOrderInfoByOrderNo(orderNo);
|
||||||
commissionRecordService.addRecord(allOrderInfo.getId());
|
commissionRecordService.addRecord(allOrderInfo.getId());
|
||||||
// if (ObjectUtil.isNotEmpty(staffId)) {
|
// if (ObjectUtil.isNotEmpty(staffId)) {
|
||||||
// LJStaff staff = staffService.selectStaffById(staffId);
|
// LJStaff staff = staffService.selectStaffById(staffId);
|
||||||
|
|||||||
@ -536,7 +536,7 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
|
|||||||
baseMapper.insert(cardValueRecordDTO);
|
baseMapper.insert(cardValueRecordDTO);
|
||||||
orderId = cardValueRecordDTO.getId();
|
orderId = cardValueRecordDTO.getId();
|
||||||
// 当为现金支付时插入到总的订单表
|
// 当为现金支付时插入到总的订单表
|
||||||
if ("CASH".equals(cardValueRecordDTO.getPaymentType())) {
|
if ("CASH".equals(selectCard.getPaymentType())) {
|
||||||
cardValueRecordDTO.setRealyPayBills(cardValueRecordDTO.getRechargeBalance());
|
cardValueRecordDTO.setRealyPayBills(cardValueRecordDTO.getRechargeBalance());
|
||||||
AllOrderInfo allOrderInfo = getAllOrderInfo(cardValueRecordDTO);
|
AllOrderInfo allOrderInfo = getAllOrderInfo(cardValueRecordDTO);
|
||||||
allOrderInfo.setPaymentChannel("现金支付");
|
allOrderInfo.setPaymentChannel("现金支付");
|
||||||
|
|||||||
@ -16,9 +16,8 @@
|
|||||||
trigger="hover">
|
trigger="hover">
|
||||||
<div> 储值卡:¥{{ chooseVipUser.cardBalance || 0 }}</div>
|
<div> 储值卡:¥{{ chooseVipUser.cardBalance || 0 }}</div>
|
||||||
<div v-if="chooseVipUser.userFuels">
|
<div v-if="chooseVipUser.userFuels">
|
||||||
<div v-for="(item,index) in chooseVipUser.userFuels" :key="index"> 囤油卡:¥{{
|
<div v-for="(item,index) in chooseVipUser.userFuels" :key="index">
|
||||||
item.fuelAmount
|
囤油卡:¥{{item.fuelAmount}}
|
||||||
}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="chooseVipUser.fleetInfoUniVos">
|
<div v-if="chooseVipUser.fleetInfoUniVos">
|
||||||
@ -582,7 +581,7 @@ import {
|
|||||||
getCheckTheStatusOfYourPaymentApi,
|
getCheckTheStatusOfYourPaymentApi,
|
||||||
rechargeCard
|
rechargeCard
|
||||||
} from "@/api/cashier/cardSet";
|
} from "@/api/cashier/cardSet";
|
||||||
import {getReturnCode, printOilOrderReport} from '@/api/print'
|
import {getReturnCode, printOilOrderReport,printCardValueReport,printFuelDieselReport} from '../../../api/print'
|
||||||
import {addLJGoods, scanAppletQrCode} from "@/api/cashier/oilorder";
|
import {addLJGoods, scanAppletQrCode} from "@/api/cashier/oilorder";
|
||||||
import {cashierOrderByOrderNo} from '@/api/cashier/cashierorder'
|
import {cashierOrderByOrderNo} from '@/api/cashier/cashierorder'
|
||||||
import {addHangBill} from "../../../api/cashier/hangbill";
|
import {addHangBill} from "../../../api/cashier/hangbill";
|
||||||
@ -1051,8 +1050,10 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
let this_ = this
|
let this_ = this
|
||||||
|
console.log(this.payForm,1054)
|
||||||
//
|
//
|
||||||
let timer = setInterval(async () => {
|
let timer = setInterval(async () => {
|
||||||
|
let flag = false
|
||||||
await getCheckTheStatusOfYourPaymentApi(id).then(async response => {
|
await getCheckTheStatusOfYourPaymentApi(id).then(async response => {
|
||||||
if (response.data != null) {
|
if (response.data != null) {
|
||||||
const payStatus = response.data.payStatus
|
const payStatus = response.data.payStatus
|
||||||
@ -1064,8 +1065,9 @@ export default {
|
|||||||
this_.isQuery = false;
|
this_.isQuery = false;
|
||||||
this_.rechargeBalCard = true
|
this_.rechargeBalCard = true
|
||||||
// await this_.printLocally1()
|
// await this_.printLocally1()
|
||||||
await this_.cardValueReport()
|
flag = true
|
||||||
await this_.getMemberAfter();
|
// await this_.cardValueReport()
|
||||||
|
// await this_.getMemberAfter();
|
||||||
clearInterval(timer);
|
clearInterval(timer);
|
||||||
} else if (payStatus === "payFail") {
|
} else if (payStatus === "payFail") {
|
||||||
this_.isPaySuccess = false;
|
this_.isPaySuccess = false;
|
||||||
@ -1073,8 +1075,9 @@ export default {
|
|||||||
clearInterval(timer);
|
clearInterval(timer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await this_.getMemberAfter();
|
// await this_.getMemberAfter();
|
||||||
})
|
})
|
||||||
|
if (flag) await this_.cardValueReport()
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
let timer2 = setInterval(function () {
|
let timer2 = setInterval(function () {
|
||||||
@ -1119,7 +1122,9 @@ export default {
|
|||||||
this.$message.error('请选择输入充值本金');
|
this.$message.error('请选择输入充值本金');
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
console.log(selectCard,1122)
|
||||||
this.payForm.rechargeBalance = selectCard.rechargeBalance
|
this.payForm.rechargeBalance = selectCard.rechargeBalance
|
||||||
|
this.payForm.lockupPrice = selectCard.lockupPrice
|
||||||
this.payForm.realyPayBills = selectCard.rechargeBalance
|
this.payForm.realyPayBills = selectCard.rechargeBalance
|
||||||
this.payForm.selectCardId = selectCard.id
|
this.payForm.selectCardId = selectCard.id
|
||||||
this.payForm.cardType = selectCard.cardType
|
this.payForm.cardType = selectCard.cardType
|
||||||
@ -1208,6 +1213,70 @@ export default {
|
|||||||
console.log(res, 1121)
|
console.log(res, 1121)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 用户余额/礼品卡充值打印
|
||||||
|
cardValueReport(){
|
||||||
|
// 支付方式
|
||||||
|
const payTypeMap = {
|
||||||
|
'CASH': '现金',
|
||||||
|
'WECHAT': '微信',
|
||||||
|
'ALIPAY': '支付宝',
|
||||||
|
'UNIONPAY': '银联二维码',
|
||||||
|
'after_pay': '挂账',
|
||||||
|
'fule_card': '囤油卡',
|
||||||
|
'card_value': '储值卡',
|
||||||
|
'car_card_value': '车队卡',
|
||||||
|
};
|
||||||
|
|
||||||
|
if (this.payForm.cardType==0 || this.payForm.cardType==2){
|
||||||
|
console.log(1226)
|
||||||
|
let payTypeText = payTypeMap[this.payForm.paymentType]
|
||||||
|
let actualPay = this.payForm.paymentType == 'CASH' ? this.payForm.authCode:this.payForm.realyPayBills
|
||||||
|
|
||||||
|
let a = {
|
||||||
|
// 充值金额
|
||||||
|
realyPayBills:this.payForm.realyPayBills,
|
||||||
|
//赠送金额
|
||||||
|
giftBalance:this.payForm.giftBalance,
|
||||||
|
// 到账金额
|
||||||
|
getAmount:Number(this.payForm.giftBalance) + Number(this.payForm.realyPayBills),
|
||||||
|
payType:payTypeText,
|
||||||
|
|
||||||
|
// 实付款
|
||||||
|
actualPay: actualPay,
|
||||||
|
// 找零
|
||||||
|
seekZero:this.payForm.seekZero.toFixed(2),
|
||||||
|
}
|
||||||
|
printCardValueReport(a).then(res => {
|
||||||
|
console.log(res,1245)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.payForm.cardType==1){
|
||||||
|
let payTypeText1 = payTypeMap[this.payForm.paymentType]
|
||||||
|
console.log(this.payForm,1256)
|
||||||
|
let b = {
|
||||||
|
// 充值油品
|
||||||
|
oilType:this.payForm.oilName,
|
||||||
|
// 充值升数
|
||||||
|
incomeLitres:(this.payForm.rechargeBalance / this.payForm.lockupPrice).toFixed(2),
|
||||||
|
// 订单金额
|
||||||
|
realyPayBills:this.payForm.rechargeBalance,
|
||||||
|
// 锁价金额
|
||||||
|
lockupPrice:this.payForm.lockupPrice,
|
||||||
|
// 支付方式
|
||||||
|
payType:payTypeText1,
|
||||||
|
// 实付款
|
||||||
|
|
||||||
|
// 找零
|
||||||
|
seekZero:this.payForm.seekZero.toFixed(2),
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(b,1271)
|
||||||
|
printFuelDieselReport(b).then(res=>{
|
||||||
|
console.log(res,1273)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
//表单重置
|
//表单重置
|
||||||
resetting1() {
|
resetting1() {
|
||||||
this.realAmount = 0.00
|
this.realAmount = 0.00
|
||||||
|
|||||||
@ -60,13 +60,20 @@ export default {
|
|||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
chooseFuel(data){
|
chooseFuel(data){
|
||||||
|
console.log(data,63)
|
||||||
this.$set(this.selectCard,'id',data.id)
|
this.$set(this.selectCard,'id',data.id)
|
||||||
this.$set(this.selectCard,'points',data.points)
|
this.$set(this.selectCard,'points',data.points)
|
||||||
this.$set(this.selectCard,'rechargeBalance',data.rechargeBalance)
|
this.$set(this.selectCard,'rechargeBalance',data.rechargeBalance)
|
||||||
|
this.$set(this.selectCard,'lockupPrice',data.lockPrice)
|
||||||
},
|
},
|
||||||
changeFuelId(){
|
changeFuelId(){
|
||||||
this.$set(this.selectCard,'id',null)
|
this.$set(this.selectCard,'id',null)
|
||||||
this.$set(this.selectCard,'points',null)
|
this.$set(this.selectCard,'points',null)
|
||||||
|
this.oilList.forEach(item => {
|
||||||
|
if (this.selectCard.oilNumberId==item.id){
|
||||||
|
this.$set(this.selectCard,'oilName',item.oilName)
|
||||||
|
}
|
||||||
|
})
|
||||||
this.getFuelCards()
|
this.getFuelCards()
|
||||||
},
|
},
|
||||||
getOilList(){
|
getOilList(){
|
||||||
@ -75,6 +82,7 @@ export default {
|
|||||||
this.oilList = res.data.records
|
this.oilList = res.data.records
|
||||||
if (this.oilList&&this.oilList.length>0){
|
if (this.oilList&&this.oilList.length>0){
|
||||||
this.$set(this.selectCard,'oilNumberId',this.oilList[0].id)
|
this.$set(this.selectCard,'oilNumberId',this.oilList[0].id)
|
||||||
|
this.$set(this.selectCard,'oilName',this.oilList[0].oilName)
|
||||||
this.getFuelCards()
|
this.getFuelCards()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user