This commit is contained in:
cun-nan 2024-01-17 17:36:21 +08:00
parent 45677555fc
commit 0111c8055c
7 changed files with 55 additions and 20 deletions

View File

@ -62,7 +62,7 @@ public class FyPayController {
// 业务逻辑 判断订单状态 // 业务逻辑 判断订单状态
AllOrderInfo allOrderInfo = allOrderInfoService.selectAllOrderInfoByOrderNo(orderNo); AllOrderInfo allOrderInfo = allOrderInfoService.selectAllOrderInfoByOrderNo(orderNo);
if (ObjectUtil.isNotEmpty(allOrderInfo)){ if (ObjectUtil.isNotEmpty(allOrderInfo)){
allOrderInfo.setPayMoney(Double.valueOf(settleOrderAmt)); allOrderInfo.setPayMoney(Double.valueOf(settleOrderAmt)/100);
allOrderInfo.setTransactionId(transactionId); allOrderInfo.setTransactionId(transactionId);
allOrderInfo.setStatus("paid"); allOrderInfo.setStatus("paid");
allOrderInfo.setPayTime(new Date()); allOrderInfo.setPayTime(new Date());

View File

@ -210,6 +210,7 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
if (StringUtils.isNotEmpty(staff.getPassword())){ if (StringUtils.isNotEmpty(staff.getPassword())){
TAccount tAccount = accountService.selectAccountByStaffId(staff.getId()); TAccount tAccount = accountService.selectAccountByStaffId(staff.getId());
tAccount.setPassword(staff.getPassword()); tAccount.setPassword(staff.getPassword());
tAccount.setAccountName(staff.getMobile());
accountService.entryptPassword(tAccount); accountService.entryptPassword(tAccount);
try { try {
accountService.editAccount(tAccount,null); accountService.editAccount(tAccount,null);

View File

@ -98,5 +98,9 @@ public class CashierOrder extends BaseEntity implements Serializable {
* 退款备注 * 退款备注
*/ */
private String refundRemark; private String refundRemark;
/**
* 支付方式
*/
private String payType;
} }

View File

@ -330,6 +330,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
cashierOrder.setOilOrderAmount(oilAmount); cashierOrder.setOilOrderAmount(oilAmount);
cashierOrder.setOilDiscountAmount(oilDiscount); cashierOrder.setOilDiscountAmount(oilDiscount);
cashierOrder.setTerminal(terminal); cashierOrder.setTerminal(terminal);
cashierOrder.setPayType(payType);
// 添加油品订单信息 // 添加油品订单信息
if (!oilOrder.equals("[]")){ if (!oilOrder.equals("[]")){
@ -638,6 +639,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
cashierOrder.setTerminal(map.get("terminal")); cashierOrder.setTerminal(map.get("terminal"));
cashierOrder.setOilOrderId(oilOrder.getId()); cashierOrder.setOilOrderId(oilOrder.getId());
cashierOrder.setSeekZero(0.0); cashierOrder.setSeekZero(0.0);
cashierOrder.setPayType(map.get("payType"));
cashierOrderService.insertCashierOrder(cashierOrder); cashierOrderService.insertCashierOrder(cashierOrder);
this.insertAllOrderInfo(orderNo, storeId, oilAmount, map.get("payType"), userId, "PC", "1", status); this.insertAllOrderInfo(orderNo, storeId, oilAmount, map.get("payType"), userId, "PC", "1", status);
res.put("success","success"); res.put("success","success");
@ -698,6 +700,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
cashierOrder.setTerminal(map.get("terminal")); cashierOrder.setTerminal(map.get("terminal"));
cashierOrder.setOilOrderId(oilOrder.getId()); cashierOrder.setOilOrderId(oilOrder.getId());
cashierOrder.setSeekZero(0.0); cashierOrder.setSeekZero(0.0);
cashierOrder.setPayType(map.get("payType"));
cashierOrderService.insertCashierOrder(cashierOrder); cashierOrderService.insertCashierOrder(cashierOrder);
this.updateGrowthValue1(oilAmount,userId, Integer.valueOf(oilOrder.getOils()),0.0,storeId,orderNo); this.updateGrowthValue1(oilAmount,userId, Integer.valueOf(oilOrder.getOils()),0.0,storeId,orderNo);
this.insertAllOrderInfo(orderNo,accountInfo.getStoreId(),oilAmount,map.get("payType"),userId,"PC","1","paid"); this.insertAllOrderInfo(orderNo,accountInfo.getStoreId(),oilAmount,map.get("payType"),userId,"PC","1","paid");
@ -867,6 +870,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
cashierOrder.setOilDiscountAmount(oilOrder.getDiscountAmount()); cashierOrder.setOilDiscountAmount(oilOrder.getDiscountAmount());
cashierOrder.setTerminal(oilOrder.getTerminal()); cashierOrder.setTerminal(oilOrder.getTerminal());
cashierOrder.setSeekZero(0.0); cashierOrder.setSeekZero(0.0);
cashierOrder.setPayType(oilOrder.getPayType());
cashierOrderService.insertCashierOrder(cashierOrder); cashierOrderService.insertCashierOrder(cashierOrder);
return orderNo; return orderNo;
} }
@ -1065,6 +1069,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
this.addOilTracks(oilOrder,oilOrder.getStoreId()); this.addOilTracks(oilOrder,oilOrder.getStoreId());
CashierOrder cashierOrder = cashierOrderService.selectCashierOrder(orderNo); CashierOrder cashierOrder = cashierOrderService.selectCashierOrder(orderNo);
if (ObjectUtil.isNotEmpty(cashierOrder)){ if (ObjectUtil.isNotEmpty(cashierOrder)){
cashierOrder.setOilOrderId(oilOrder.getId());
cashierOrder.setPayTime(new Date()); cashierOrder.setPayTime(new Date());
cashierOrder.setStatus("paid"); cashierOrder.setStatus("paid");
cashierOrder.setOilDiscountAmount(oilOrder.getDiscountAmount()); cashierOrder.setOilDiscountAmount(oilOrder.getDiscountAmount());

View File

@ -62,33 +62,37 @@ export function editHangBill(data) {
} }
// 当前店铺归还账单的数量 // 当前店铺归还账单的数量
export function hangBillReturnTotal() { export function hangBillReturnTotal(query) {
return request({ return request({
url: '/business/hangBill/returnTotal', url: '/business/hangBill/returnTotal',
method: 'get', method: 'get',
params: query
}) })
} }
// 当前店铺归还账单的数量 // 当前店铺归还账单的数量
export function hangBillAllAmount() { export function hangBillAllAmount(query) {
return request({ return request({
url: '/business/hangBill/allAmount', url: '/business/hangBill/allAmount',
method: 'get', method: 'get',
params: query
}) })
} }
// 当前店铺归还账单的数量 // 当前店铺归还账单的数量
export function hangBillAllReturnAmount() { export function hangBillAllReturnAmount(query) {
return request({ return request({
url: '/business/hangBill/allReturnAmount', url: '/business/hangBill/allReturnAmount',
method: 'get', method: 'get',
params: query
}) })
} }
// 当前店铺归还账单的数量 // 当前店铺归还账单的数量
export function hangBillAllNoReturnAmount() { export function hangBillAllNoReturnAmount(query) {
return request({ return request({
url: '/business/hangBill/allNoReturnAmount', url: '/business/hangBill/allNoReturnAmount',
method: 'get', method: 'get',
params: query
}) })
} }

View File

@ -554,6 +554,21 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 立即结算-->
<el-dialog
title="扫码支付"
:visible.sync="dialogVisiblejLoading"
width="30%"
:close-on-click-modal="false">
<div>
<el-result icon="info" title="支付状态未查询成功,请移至订单查看">
<template slot="extra">
<el-button type="primary" @click="handClose"> </el-button>
</template>
</el-result>
</div>
</el-dialog>
<!-- 批量挂账归还--> <!-- 批量挂账归还-->
<el-dialog title="批量挂账归还" :visible.sync="open3" append-to-body> <el-dialog title="批量挂账归还" :visible.sync="open3" append-to-body>
<el-form ref="form3" :model="form3"> <el-form ref="form3" :model="form3">
@ -757,6 +772,7 @@ import {listReturnRecord, returnRecordByOrderNo, returnRecordInfo} from "@/api/c
open3:false, open3:false,
open4:false, open4:false,
dialogVisiblej:false, dialogVisiblej:false,
dialogVisiblejLoading: false,
// //
isQuery:true, isQuery:true,
// //
@ -784,7 +800,7 @@ import {listReturnRecord, returnRecordByOrderNo, returnRecordInfo} from "@/api/c
this.getUnitList(); this.getUnitList();
this.getPayList(); this.getPayList();
this.getLists(); this.getLists();
this.getStatistic(); // this.getStatistic();
}, },
directives: { directives: {
// v-focus // v-focus
@ -802,20 +818,20 @@ import {listReturnRecord, returnRecordByOrderNo, returnRecordInfo} from "@/api/c
methods:{ methods:{
// //
getStatistic(){ getStatistic(){
hangBillReturnTotal().then(res => { hangBillReturnTotal(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
this.returnTotal = res.data this.returnTotal = res.data
}) })
hangBillAllAmount().then(res => { hangBillAllAmount(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
if (res.data) { if (res.data) {
this.allAmount = res.data this.allAmount = res.data
} }
}) })
hangBillAllReturnAmount().then(res => { hangBillAllReturnAmount(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
if (res.data) { if (res.data) {
this.returnAllAmount = res.data this.returnAllAmount = res.data
} }
}) })
hangBillAllNoReturnAmount().then(res => { hangBillAllNoReturnAmount(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
if (res.data) { if (res.data) {
this.noReturnAllAmount = res.data this.noReturnAllAmount = res.data
} }
@ -941,6 +957,7 @@ import {listReturnRecord, returnRecordByOrderNo, returnRecordInfo} from "@/api/c
this.repaidAmount = repaidAmount this.repaidAmount = repaidAmount
}, },
handClose(){ handClose(){
this.dialogVisiblejLoading = false
this.isPay = true; this.isPay = true;
this.isPaySuccess = false; this.isPaySuccess = false;
this.dialogVisiblej = false; this.dialogVisiblej = false;
@ -1002,15 +1019,18 @@ import {listReturnRecord, returnRecordByOrderNo, returnRecordInfo} from "@/api/c
response.data.forEach(item => { response.data.forEach(item => {
if (item.payStatus == "unpaid"){ if (item.payStatus == "unpaid"){
_this.isQuery = true; _this.isQuery = true;
_this.dialogVisiblejLoading = true
} }
if (item.payStatus == "paid"){ if (item.payStatus == "paid"){
_this.isPaySuccess = true; _this.isPaySuccess = true;
_this.isPay = false;
_this.isQuery = false; _this.isQuery = false;
_this.loading = false; _this.loading = false;
clearInterval(timer); clearInterval(timer);
} }
if (item.payStatus == "payFail"){ if (item.payStatus == "payFail"){
_this.isPaySuccess = false; _this.isPaySuccess = false;
_this.isPay = false;
_this.isQuery = false; _this.isQuery = false;
_this.loading = false; _this.loading = false;
clearInterval(timer); clearInterval(timer);
@ -1021,15 +1041,15 @@ import {listReturnRecord, returnRecordByOrderNo, returnRecordInfo} from "@/api/c
let timer2 = setInterval(function () { let timer2 = setInterval(function () {
if (_this.isBatch) { if (_this.isBatch) {
if (_this.isQuery || !_this.open3 || !_this.open4){ if (_this.isQuery || !_this.open3 || !_this.open4){
_this.loading = false; // _this.loading = false;
_this.isPay = false; // _this.isPay = false;
clearInterval(timer); clearInterval(timer);
clearTimeout(timer3); clearTimeout(timer3);
} }
}else { }else {
if (_this.isQuery || !_this.open2) { if (_this.isQuery || !_this.open2) {
_this.loading = false; // _this.loading = false;
_this.isPay = false; // _this.isPay = false;
clearInterval(timer); clearInterval(timer);
clearTimeout(timer3); clearTimeout(timer3);
} }
@ -1180,6 +1200,7 @@ import {listReturnRecord, returnRecordByOrderNo, returnRecordInfo} from "@/api/c
this.hangBillList = response.data.records this.hangBillList = response.data.records
this.total = response.data.total; this.total = response.data.total;
}) })
this.getStatistic();
}, },
// //
handleQuery() { handleQuery() {

View File

@ -82,11 +82,11 @@
<view style="display: flex;"> <view style="display: flex;">
<span style="margin-right: 10px;display: flex;"> <span style="margin-right: 10px;display: flex;">
-{{fullRedece}} -{{fullRedece}}
<span style="margin-left: 8px;margin-top: 8px;"> <!-- <span style="margin-left: 8px;margin-top: 8px;">
<u-checkbox-group> <u-checkbox-group>
<u-checkbox v-model="checkFull" :checked="checkFull" @change="changeFull"></u-checkbox> <u-checkbox v-model="checkFull" :checked="checkFull" @change="changeFull"></u-checkbox>
</u-checkbox-group> </u-checkbox-group>
</span> </span> -->
</span> </span>
</view> </view>
</view> </view>
@ -99,11 +99,11 @@
<view style="display: flex;"> <view style="display: flex;">
<span style="margin-right: 10px;display: flex;"> <span style="margin-right: 10px;display: flex;">
-{{couponRedece}} -{{couponRedece}}
<span style="margin-left: 8px;margin-top: 8px;"> <!-- <span style="margin-left: 8px;margin-top: 8px;">
<u-checkbox-group> <u-checkbox-group>
<u-checkbox v-model="checkCoupon" :checked="checkCoupon" @change="changeCoupon"></u-checkbox> <u-checkbox v-model="checkCoupon" :checked="checkCoupon" @change="changeCoupon"></u-checkbox>
</u-checkbox-group> </u-checkbox-group>
</span> </span> -->
</span> </span>
</view> </view>
</view> </view>
@ -116,11 +116,11 @@
<view style="display: flex;"> <view style="display: flex;">
<span style="margin-right: 10px;display: flex;"> <span style="margin-right: 10px;display: flex;">
-{{gradeRedece}} -{{gradeRedece}}
<span style="margin-left: 8px;margin-top: 8px;"> <!-- <span style="margin-left: 8px;margin-top: 8px;">
<u-checkbox-group> <u-checkbox-group>
<u-checkbox v-model="checkGrade" @change="changeGrade"></u-checkbox> <u-checkbox v-model="checkGrade" @change="changeGrade"></u-checkbox>
</u-checkbox-group> </u-checkbox-group>
</span> </span> -->
</span> </span>
</view> </view>
</view> </view>