bug
This commit is contained in:
parent
6e16f6ac5d
commit
2398ead499
@ -1479,12 +1479,12 @@ export default {
|
||||
}, 1000);
|
||||
|
||||
let timer2 = setInterval(function () {
|
||||
if (!this_.isQuery) {
|
||||
if (!this_.isQuery || !this_.openConfirm) {
|
||||
this_.loading = false;
|
||||
this_.isPay = false;
|
||||
clearInterval(timer);
|
||||
clearTimeout(timer3);
|
||||
|
||||
console.log("t2")
|
||||
}
|
||||
}, 500)
|
||||
|
||||
@ -1494,7 +1494,8 @@ export default {
|
||||
this_.loading = false;
|
||||
this_.isPay = false;
|
||||
this.isPaySuccess = false;
|
||||
}, 30000)
|
||||
console.log("t3")
|
||||
}, 10000)
|
||||
|
||||
} else if (this.flag === 2) {
|
||||
if (!this.authCode && this.cardFuelDieselForm.paymentType !== "CASH") {
|
||||
@ -1537,7 +1538,7 @@ export default {
|
||||
}, 500);
|
||||
|
||||
let timer2 = setInterval(function () {
|
||||
if (this_.isQuery == false) {
|
||||
if (this_.isQuery == false || !this_.openConfirm) {
|
||||
this_.loading = false;
|
||||
this_.isPay = false;
|
||||
clearInterval(timer);
|
||||
|
@ -82,6 +82,10 @@ public class CashierOrder extends BaseEntity implements Serializable {
|
||||
* 实付金额
|
||||
*/
|
||||
private Double payAmount;
|
||||
/**
|
||||
* 找零金额
|
||||
*/
|
||||
private Double seekZero;
|
||||
/**
|
||||
* 订单状态:已支付、未支付、支付失败
|
||||
*/
|
||||
|
@ -194,6 +194,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
Double oilActualPay = Double.valueOf(map.get("oilActualPay"));
|
||||
// 商品实付金额
|
||||
Double goodsActualPay = Double.valueOf(map.get("goodsActualPay"));
|
||||
// 找零金额
|
||||
Double seekZero = Double.valueOf(map.get("seekZero"));
|
||||
// 付款用户
|
||||
String payUser = null;
|
||||
if (map.get("payUser") != null && !map.get("payUser").equals("")){
|
||||
@ -313,12 +315,15 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
cashierOrder.setStoreId(storeId);
|
||||
cashierOrder.setPayUser(payUser);
|
||||
cashierOrder.setAmount(oilAmount+goodsAmount);
|
||||
cashierOrder.setPayAmount(oilActualPay+goodsActualPay);
|
||||
cashierOrder.setStatus(payStatus);
|
||||
if (payType.equals("CASH")){
|
||||
cashierOrder.setPayAmount(Double.valueOf(map.get("authCode")));
|
||||
cashierOrder.setPayTime(new Date());
|
||||
this.insertAllOrderInfo(orderNo,storeId,Double.valueOf(map.get("allAmount")),payType,userId,"PC","6","paid");
|
||||
}else {
|
||||
cashierOrder.setPayAmount(oilActualPay+goodsActualPay);
|
||||
}
|
||||
cashierOrder.setSeekZero(seekZero);
|
||||
cashierOrder.setOrderNo(orderNo);
|
||||
cashierOrder.setGoodsOrderAmount(goodsAmount);
|
||||
cashierOrder.setGoodsDiscountAmount(goodsDiscount);
|
||||
@ -631,6 +636,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
// cashierOrder.setOilDiscountAmount(Double.valueOf(map.get("oilDiscount")));
|
||||
cashierOrder.setTerminal(map.get("terminal"));
|
||||
cashierOrder.setOilOrderId(oilOrder.getId());
|
||||
cashierOrder.setSeekZero(0.0);
|
||||
cashierOrderService.insertCashierOrder(cashierOrder);
|
||||
this.insertAllOrderInfo(orderNo, storeId, oilAmount, map.get("payType"), userId, "PC", "1", status);
|
||||
res.put("success","success");
|
||||
@ -690,6 +696,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
// cashierOrder.setOilDiscountAmount(Double.valueOf(map.get("oilDiscount")));
|
||||
cashierOrder.setTerminal(map.get("terminal"));
|
||||
cashierOrder.setOilOrderId(oilOrder.getId());
|
||||
cashierOrder.setSeekZero(0.0);
|
||||
cashierOrderService.insertCashierOrder(cashierOrder);
|
||||
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");
|
||||
@ -858,6 +865,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
cashierOrder.setOilOrderAmount(oilOrder.getOrderAmount());
|
||||
cashierOrder.setOilDiscountAmount(oilOrder.getDiscountAmount());
|
||||
cashierOrder.setTerminal(oilOrder.getTerminal());
|
||||
cashierOrder.setSeekZero(0.0);
|
||||
cashierOrderService.insertCashierOrder(cashierOrder);
|
||||
return orderNo;
|
||||
}
|
||||
@ -1060,6 +1068,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
cashierOrder.setStatus("paid");
|
||||
cashierOrder.setOilDiscountAmount(oilOrder.getDiscountAmount());
|
||||
cashierOrder.setPayAmount(oilOrder.getPayAmount());
|
||||
cashierOrder.setSeekZero(0.0);
|
||||
cashierOrderService.updateCashierOrder(cashierOrder);
|
||||
}
|
||||
}
|
||||
|
@ -943,36 +943,30 @@ import {listReturnRecord, returnRecordByOrderNo, returnRecordInfo} from "@/api/c
|
||||
this.getList();
|
||||
},
|
||||
// 收款
|
||||
collection(){
|
||||
async collection(){
|
||||
if (this.payType=="CASH"){
|
||||
if (this.authCode==undefined || this.authCode=="" || this.seekZero<0){
|
||||
this.$modal.msgError("请输入正确的金额");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!this.authCode){
|
||||
this.$modal.msgError("请先扫码");
|
||||
return;
|
||||
}
|
||||
let _this = this;
|
||||
if (this.isBatch){
|
||||
// 批量归还
|
||||
_this.form4.repaidAmount = _this.payAmount;
|
||||
_this.form4.authCode = _this.authCode;
|
||||
_this.form4.seekZero = _this.seekZero
|
||||
batchHangBill(_this.form4).then(response => {
|
||||
await batchHangBill(_this.form4).then(response => {
|
||||
// 返回订单号信息
|
||||
_this.orderNo = response.data
|
||||
})
|
||||
_this.loading = true;
|
||||
_this.queryPayStatus();
|
||||
let timer = setInterval(function () {
|
||||
if (_this.isQuery == false) {
|
||||
_this.loading = false;
|
||||
_this.isPay = false;
|
||||
clearInterval(_this.timer);
|
||||
}
|
||||
},1000)
|
||||
setTimeout(function (){
|
||||
_this.loading = false;
|
||||
clearInterval(timer);
|
||||
},30000)
|
||||
|
||||
this.open3 = false;
|
||||
this.open4 = false;
|
||||
this.getLists();
|
||||
@ -982,23 +976,13 @@ import {listReturnRecord, returnRecordByOrderNo, returnRecordInfo} from "@/api/c
|
||||
_this.form2.repaidAmount = _this.payAmount;
|
||||
_this.form2.authCode = _this.authCode;
|
||||
_this.form2.seekZero = _this.seekZero
|
||||
editHangBill(this.form2).then(response => {
|
||||
await editHangBill(this.form2).then(response => {
|
||||
// 返回订单号信息
|
||||
_this.orderNo = response.data
|
||||
})
|
||||
_this.loading = true;
|
||||
_this.queryPayStatus();
|
||||
let timer = setInterval(function () {
|
||||
if (_this.isQuery == false) {
|
||||
_this.loading = false;
|
||||
_this.isPay = false;
|
||||
clearInterval(_this.timer);
|
||||
}
|
||||
},1000)
|
||||
setTimeout(function (){
|
||||
_this.loading = false;
|
||||
clearInterval(timer);
|
||||
},30000)
|
||||
|
||||
this.open2 = false;
|
||||
this.getList();
|
||||
}
|
||||
@ -1006,7 +990,8 @@ import {listReturnRecord, returnRecordByOrderNo, returnRecordInfo} from "@/api/c
|
||||
// 查询支付状态
|
||||
queryPayStatus(){
|
||||
let _this = this;
|
||||
_this.timer = setInterval(function (){
|
||||
_this.loading = true;
|
||||
let timer = setInterval(function (){
|
||||
returnRecordByOrderNo({orderNo:_this.orderNo}).then(response => {
|
||||
response.data.forEach(item => {
|
||||
if (item.payStatus == "unpaid"){
|
||||
@ -1015,14 +1000,43 @@ import {listReturnRecord, returnRecordByOrderNo, returnRecordInfo} from "@/api/c
|
||||
if (item.payStatus == "paid"){
|
||||
_this.isPaySuccess = true;
|
||||
_this.isQuery = false;
|
||||
_this.loading = false;
|
||||
clearInterval(timer);
|
||||
}
|
||||
if (item.payStatus == "payFail"){
|
||||
_this.isPaySuccess = false;
|
||||
_this.isQuery = false;
|
||||
_this.loading = false;
|
||||
clearInterval(timer);
|
||||
}
|
||||
})
|
||||
})
|
||||
},1001)
|
||||
},500)
|
||||
let timer2 = setInterval(function () {
|
||||
if (_this.isBatch) {
|
||||
if (_this.isQuery || !_this.open3 || !_this.open4){
|
||||
_this.loading = false;
|
||||
_this.isPay = false;
|
||||
clearInterval(timer);
|
||||
clearTimeout(timer3);
|
||||
}
|
||||
}else {
|
||||
if (_this.isQuery || !_this.open2) {
|
||||
_this.loading = false;
|
||||
_this.isPay = false;
|
||||
clearInterval(timer);
|
||||
clearTimeout(timer3);
|
||||
}
|
||||
}
|
||||
}, 500)
|
||||
|
||||
var timer3 = setTimeout(function () {
|
||||
clearInterval(timer2);
|
||||
clearInterval(timer);
|
||||
_this.loading = false;
|
||||
_this.isPay = false;
|
||||
this.isPaySuccess = false;
|
||||
}, 10000)
|
||||
},
|
||||
submitReturn(){
|
||||
this.isPay = true;
|
||||
|
@ -438,6 +438,7 @@
|
||||
:visible.sync="dialogVisiblej"
|
||||
width="30%"
|
||||
:close-on-click-modal="false">
|
||||
|
||||
<div v-if="isPay==false"
|
||||
v-loading="loading">
|
||||
<div style="text-align: center;font-size: 15px;font-weight: bold">应收金额</div>
|
||||
@ -1906,7 +1907,6 @@
|
||||
_this.couponDiscount =[];
|
||||
_this.couponIds = [];
|
||||
selectCoupon(_this.preferentialData).then(response => {
|
||||
// console.log(response)
|
||||
_this.couponAmount = 0;
|
||||
_this.couponIds = response.data
|
||||
if (response.data.length>0){
|
||||
@ -2261,7 +2261,6 @@
|
||||
this.goodsOrder.push(val);
|
||||
this.goodsTotal += 1;
|
||||
}else {
|
||||
console.log(222)
|
||||
if (val.stock==0){
|
||||
this.$modal.msgError("商品库存不足,请重新选择商品")
|
||||
return;
|
||||
@ -2286,8 +2285,9 @@
|
||||
}
|
||||
this.authCode = ""
|
||||
this.seekZero = 0;
|
||||
this.dialogVisiblej = true
|
||||
this.isPay = false
|
||||
this.dialogVisiblej = true
|
||||
|
||||
this.getStaff()
|
||||
},
|
||||
// 重置油品订单
|
||||
@ -2531,13 +2531,17 @@
|
||||
})
|
||||
},
|
||||
// 确定收款
|
||||
collection(){
|
||||
async collection(){
|
||||
if (this.payType=="CASH"){
|
||||
if (this.authCode==undefined || this.authCode=="" || this.seekZero<0){
|
||||
this.$modal.msgError("请输入正确的金额");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!this.authCode){
|
||||
this.$modal.msgError("请先扫码");
|
||||
return;
|
||||
}
|
||||
// JSON.parse()
|
||||
this.map.seekZero = this.seekZero;
|
||||
this.map.oilAmount = this.oilAmount;
|
||||
@ -2562,7 +2566,7 @@
|
||||
this.$modal.msgError("非油商品不可使用小程序码支付")
|
||||
return;
|
||||
}
|
||||
scanAppletQrCode(_this.map).then( resp => {
|
||||
await scanAppletQrCode(_this.map).then( resp => {
|
||||
if (resp.data.success=='success'){
|
||||
this.loading = true;
|
||||
setTimeout(function (){
|
||||
@ -2585,7 +2589,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
addLJGoods(_this.map).then( response => {
|
||||
await addLJGoods(_this.map).then( response => {
|
||||
_this.orderNo = response.data.orderNo;
|
||||
if (response.data.oilOrder!=null){
|
||||
if (response.data.oilOrder.orderStatus == "paid"){
|
||||
@ -2620,16 +2624,7 @@
|
||||
})
|
||||
this.loading = true;
|
||||
_this.queryPayStatus();
|
||||
let timer = setInterval(function () {
|
||||
if (_this.isQuery == false) {
|
||||
_this.loading = false;
|
||||
_this.isPay = true;
|
||||
clearInterval(_this.timer);
|
||||
}
|
||||
},500)
|
||||
setTimeout(function (){
|
||||
clearInterval(timer);
|
||||
},30000)
|
||||
|
||||
_this.resetting1();
|
||||
},
|
||||
resetting1(){
|
||||
@ -2693,6 +2688,7 @@
|
||||
consumeAmount:0,
|
||||
typeIdex:'',
|
||||
};
|
||||
this.payType = "WECHAT"
|
||||
},
|
||||
updateRefuelMoney(){
|
||||
let _this = this;
|
||||
@ -2714,7 +2710,7 @@
|
||||
// 查询订单支付状态
|
||||
queryPayStatus(){
|
||||
let _this = this;
|
||||
_this.timer = setInterval(function (){
|
||||
let timer = setInterval(function (){
|
||||
// "234520231228115544f073f4"
|
||||
cashierOrderByOrderNo({orderNo:_this.orderNo}).then( response => {
|
||||
if (response.data!=null){
|
||||
@ -2726,16 +2722,39 @@
|
||||
_this.isPay = true;
|
||||
_this.isQuery = false;
|
||||
_this.amount = 0
|
||||
|
||||
_this.loading = false;
|
||||
clearInterval(timer);
|
||||
}
|
||||
if (response.data.status == "payFail"){
|
||||
_this.isPaySuccess = false;
|
||||
_this.isPay = true;
|
||||
_this.isQuery = false;
|
||||
|
||||
_this.loading = false;
|
||||
clearInterval(timer);
|
||||
}
|
||||
}
|
||||
_this.resetting1();
|
||||
})
|
||||
},500)
|
||||
let timer2 = setInterval(function () {
|
||||
if (_this.isQuery || !_this.dialogVisiblej) {
|
||||
_this.loading = false;
|
||||
_this.isPay = true;
|
||||
clearInterval(timer);
|
||||
clearTimeout(timer3);
|
||||
|
||||
}
|
||||
}, 500)
|
||||
|
||||
var timer3 = setTimeout(function () {
|
||||
clearInterval(timer2);
|
||||
clearInterval(timer);
|
||||
_this.loading = false;
|
||||
_this.isPay = true;
|
||||
this.isPaySuccess = false;
|
||||
}, 10000)
|
||||
},
|
||||
handClose(){
|
||||
// this.resetting1()
|
||||
@ -2784,6 +2803,7 @@
|
||||
this.member = {};
|
||||
this.isPaySuccess = false;
|
||||
this.isPay = false;
|
||||
|
||||
this.dialogVisiblej = false
|
||||
},
|
||||
// 支付方式
|
||||
|
@ -1485,7 +1485,7 @@ export default {
|
||||
}, 1000);
|
||||
|
||||
let timer2 = setInterval(function () {
|
||||
if (!this_.isQuery) {
|
||||
if (!this_.isQuery || !this_.openConfirm) {
|
||||
this_.loading = false;
|
||||
this_.isPay = false;
|
||||
clearInterval(timer);
|
||||
@ -1543,7 +1543,7 @@ export default {
|
||||
}, 500);
|
||||
|
||||
let timer2 = setInterval(function () {
|
||||
if (this_.isQuery == false) {
|
||||
if (this_.isQuery == false || !this_.openConfirm) {
|
||||
this_.loading = false;
|
||||
this_.isPay = false;
|
||||
clearInterval(timer);
|
||||
|
Loading…
Reference in New Issue
Block a user