This commit is contained in:
cun-nan 2024-10-18 17:10:18 +08:00
parent 86b9c1997d
commit 2dfb19b84d
4 changed files with 92 additions and 8 deletions

View File

@ -17,10 +17,13 @@ import com.fuint.business.member.service.ILJDutyService;
import com.fuint.business.member.service.ILJStaffService;
import com.fuint.business.order.entity.AllOrderInfo;
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.util.TokenUtil;
import com.fuint.system.role.entity.TDuty;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
@ -38,6 +41,9 @@ public class StaffCommissionServiceImpl extends ServiceImpl<StaffCommissionMappe
private ILJDutyService dutyService;
@Autowired
private AllOrderInfoMapper allOrderInfoMapper;
@Autowired
@Lazy
private AllOrderInfoService allOrderInfoService;
@Override
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) {
AllOrderInfo allOrderInfo = allOrderInfoMapper.selectOne(new LambdaQueryWrapper<AllOrderInfo>()
.eq(AllOrderInfo::getOrderNo, orderNo));
AllOrderInfo allOrderInfo1 = allOrderInfoService.selectAllOrderInfoByOrderNo(orderNo);
commissionRecordService.addRecord(allOrderInfo.getId());
// if (ObjectUtil.isNotEmpty(staffId)) {
// LJStaff staff = staffService.selectStaffById(staffId);

View File

@ -536,7 +536,7 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
baseMapper.insert(cardValueRecordDTO);
orderId = cardValueRecordDTO.getId();
// 当为现金支付时插入到总的订单表
if ("CASH".equals(cardValueRecordDTO.getPaymentType())) {
if ("CASH".equals(selectCard.getPaymentType())) {
cardValueRecordDTO.setRealyPayBills(cardValueRecordDTO.getRechargeBalance());
AllOrderInfo allOrderInfo = getAllOrderInfo(cardValueRecordDTO);
allOrderInfo.setPaymentChannel("现金支付");

View File

@ -16,9 +16,8 @@
trigger="hover">
<div> 储值卡{{ chooseVipUser.cardBalance || 0 }}</div>
<div v-if="chooseVipUser.userFuels">
<div v-for="(item,index) in chooseVipUser.userFuels" :key="index"> 囤油卡{{
item.fuelAmount
}}
<div v-for="(item,index) in chooseVipUser.userFuels" :key="index">
囤油卡{{item.fuelAmount}}
</div>
</div>
<div v-if="chooseVipUser.fleetInfoUniVos">
@ -582,7 +581,7 @@ import {
getCheckTheStatusOfYourPaymentApi,
rechargeCard
} 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 {cashierOrderByOrderNo} from '@/api/cashier/cashierorder'
import {addHangBill} from "../../../api/cashier/hangbill";
@ -1051,8 +1050,10 @@ export default {
}
});
let this_ = this
console.log(this.payForm,1054)
//
let timer = setInterval(async () => {
let flag = false
await getCheckTheStatusOfYourPaymentApi(id).then(async response => {
if (response.data != null) {
const payStatus = response.data.payStatus
@ -1064,8 +1065,9 @@ export default {
this_.isQuery = false;
this_.rechargeBalCard = true
// await this_.printLocally1()
await this_.cardValueReport()
await this_.getMemberAfter();
flag = true
// await this_.cardValueReport()
// await this_.getMemberAfter();
clearInterval(timer);
} else if (payStatus === "payFail") {
this_.isPaySuccess = false;
@ -1073,8 +1075,9 @@ export default {
clearInterval(timer);
}
}
await this_.getMemberAfter();
// await this_.getMemberAfter();
})
if (flag) await this_.cardValueReport()
}, 1000);
let timer2 = setInterval(function () {
@ -1119,7 +1122,9 @@ export default {
this.$message.error('请选择输入充值本金');
return
}
console.log(selectCard,1122)
this.payForm.rechargeBalance = selectCard.rechargeBalance
this.payForm.lockupPrice = selectCard.lockupPrice
this.payForm.realyPayBills = selectCard.rechargeBalance
this.payForm.selectCardId = selectCard.id
this.payForm.cardType = selectCard.cardType
@ -1208,6 +1213,70 @@ export default {
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() {
this.realAmount = 0.00

View File

@ -60,13 +60,20 @@ export default {
},
methods:{
chooseFuel(data){
console.log(data,63)
this.$set(this.selectCard,'id',data.id)
this.$set(this.selectCard,'points',data.points)
this.$set(this.selectCard,'rechargeBalance',data.rechargeBalance)
this.$set(this.selectCard,'lockupPrice',data.lockPrice)
},
changeFuelId(){
this.$set(this.selectCard,'id',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()
},
getOilList(){
@ -75,6 +82,7 @@ export default {
this.oilList = res.data.records
if (this.oilList&&this.oilList.length>0){
this.$set(this.selectCard,'oilNumberId',this.oilList[0].id)
this.$set(this.selectCard,'oilName',this.oilList[0].oilName)
this.getFuelCards()
}