no message
This commit is contained in:
parent
34854109bf
commit
2e7f18845a
@ -23,7 +23,13 @@ export function addHandoverApi(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function printGetHandoverReport(data) {
|
||||
return request({
|
||||
url: 'business/printer/getHandover',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function printLocallyApi(data) {
|
||||
return request({
|
||||
url: '/business/handoverRecord/printLocally',
|
||||
|
@ -371,7 +371,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import {printLocallyApi,addHandoverApis} from "@/api/handover/handover";
|
||||
import {printLocallyApi, addHandoverApis, printGetHandoverReport} from "@/api/handover/handover";
|
||||
import BigNumber from "bignumber.js";
|
||||
import {getLodop} from "@/api/LodopFuncs";
|
||||
|
||||
@ -392,8 +392,12 @@ import {getLodop} from "@/api/LodopFuncs";
|
||||
// this.getHandover();
|
||||
},
|
||||
methods: {
|
||||
|
||||
printLocally() {
|
||||
printGetHandoverReport(this.handoverList).then(res=>{
|
||||
|
||||
})
|
||||
},
|
||||
printLocally1() {
|
||||
// const printHTML = document.querySelector('#report').innerHTML
|
||||
// // 将打印的区域赋值,进行打印
|
||||
// window.document.body.innerHTML = printHTML
|
||||
@ -541,6 +545,12 @@ import {getLodop} from "@/api/LodopFuncs";
|
||||
case 'CASH':
|
||||
return '现金'
|
||||
break;
|
||||
case 'balance':
|
||||
return '余额'
|
||||
break;
|
||||
case 'oilCard':
|
||||
return '油卡'
|
||||
break;
|
||||
}
|
||||
return '未知'
|
||||
},
|
||||
|
@ -27,7 +27,6 @@ public class CardValueRecordDTO extends CardValueRecord {
|
||||
private String appltType;
|
||||
private String paymentType;
|
||||
private String payStatus;
|
||||
private String payChannel;
|
||||
private String types;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
|
||||
private Date expireTime;
|
||||
|
@ -28,6 +28,9 @@ public class CardValueRecord extends Model<CardValueRecord> {
|
||||
private Integer mtUserId;
|
||||
//会员名字
|
||||
private String name;
|
||||
|
||||
private String payChannel;
|
||||
|
||||
//会员手机号码
|
||||
private String mobile;
|
||||
//员工id
|
||||
|
@ -468,7 +468,13 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
|
||||
allOrderInfo.setPayMoney(cardValueRecordDTO.getRealyPayBills());
|
||||
allOrderInfo.setPayType("CASH");
|
||||
allOrderInfo.setUserId(cardValueRecordDTO.getMtUserId());
|
||||
allOrderInfo.setPayChannel("cashier");
|
||||
if (ObjectUtil.isNotEmpty(cardValueRecordDTO.getPayChannel())) {
|
||||
allOrderInfo.setPayChannel(cardValueRecordDTO.getPayChannel());
|
||||
|
||||
}else {
|
||||
allOrderInfo.setPayChannel("cashier");
|
||||
|
||||
}
|
||||
allOrderInfo.setStatus("paid");
|
||||
allOrderInfo.setContent("储值卡充值");
|
||||
allOrderInfo.setPayTime(new Date());
|
||||
|
@ -214,7 +214,17 @@ public class PrinterServiceImpl implements PrinterService {
|
||||
Handover.setHandover(handover);
|
||||
Integer random6 = (int) ((Math.random() * 9 + 1) * 100000);
|
||||
String url=m.print(infoByStoreId.getMachineCode(), Handover.printHandover(), "Z"+System.currentTimeMillis()+random6.toString());
|
||||
if (ObjectUtil.isNotEmpty(url)) {
|
||||
// 使用 Fastjson 将 JSON 字符串解析为 JSONObject
|
||||
JSONObject jsonObject = JSON.parseObject(url);
|
||||
|
||||
String error = jsonObject.getString("error");
|
||||
if ("18".equals(error)) {
|
||||
getToken(storeId);
|
||||
getHandover(handover,storeId);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void oilOrderReport(Map<String, Object> oilOrder,Integer storeId) {
|
||||
|
@ -405,6 +405,12 @@ public class Handover {
|
||||
return "银联二维码";
|
||||
case "CASH":
|
||||
return "现金";
|
||||
case "balance":
|
||||
return "余额";
|
||||
case "APPLET_CODE":
|
||||
return "会员码";
|
||||
case "oilCard":
|
||||
return "油卡";
|
||||
default:
|
||||
return "其他";
|
||||
}
|
||||
|
@ -503,6 +503,15 @@ import {printGetHandoverReport, rePrintOilOrderReport} from "@/api/print";
|
||||
case 'CASH':
|
||||
return '现金'
|
||||
break;
|
||||
case 'balance':
|
||||
return '余额'
|
||||
break;
|
||||
case 'APPLET_CODE':
|
||||
return '会员码'
|
||||
break;
|
||||
case 'oilCard':
|
||||
return '油卡'
|
||||
break;
|
||||
}
|
||||
return '未知'
|
||||
},
|
||||
|
@ -174,6 +174,7 @@
|
||||
<div>支付方式</div>
|
||||
<div>金额</div>
|
||||
</div>
|
||||
<!-- {{paymentAggregation('oil') }}-->
|
||||
<div class="input-box" v-for="item in paymentAggregation('oil')">
|
||||
<div>{{calculateThePaymentMethod(item.payType)}}</div>
|
||||
<div>¥{{item.paidAmount}}</div>
|
||||
@ -546,6 +547,12 @@ import {printGetHandoverReport} from "@/api/print";
|
||||
case 'CASH':
|
||||
return '现金'
|
||||
break;
|
||||
case 'balance':
|
||||
return '余额'
|
||||
break;
|
||||
case 'oilCard':
|
||||
return '油卡'
|
||||
break;
|
||||
}
|
||||
return '未知'
|
||||
},
|
||||
|
@ -1627,6 +1627,8 @@
|
||||
creditLimit: [ { required: true, message: "请填写挂账额度", trigger: "blur" }, ],
|
||||
status: [ { required: true, message: "请选择挂账单位状态", trigger: "blur" }, ],
|
||||
},
|
||||
continuePolling: true, // 控制轮询的变量
|
||||
|
||||
// 表单校验
|
||||
rules2: {
|
||||
number: [{required: true, message: "请输入卡号", trigger: "blur"}],
|
||||
@ -2034,6 +2036,7 @@
|
||||
},
|
||||
cancelCollection() {
|
||||
this.openConfirm = false;
|
||||
this.continuePolling = false;
|
||||
},
|
||||
// 选择余额充值金额
|
||||
rechargeCard(index, item) {
|
||||
@ -2126,7 +2129,7 @@
|
||||
this.activeRecharge = 'balance'
|
||||
this.cardValueForm = {}
|
||||
this.cardFuelDieselForm = {}
|
||||
|
||||
this.continuePolling = false
|
||||
this.iniz()
|
||||
},
|
||||
iniz() {
|
||||
@ -2206,7 +2209,7 @@
|
||||
this.openConfirm = true;
|
||||
this.isPay = true
|
||||
|
||||
this.getCode(this.realyPayBills)
|
||||
this.getCode(this.realyPayBills,1)
|
||||
|
||||
},
|
||||
printLocally() {
|
||||
@ -2482,6 +2485,7 @@
|
||||
clear(){
|
||||
// this.autofocus = false
|
||||
this.dialogVisiblej = false
|
||||
this.continuePolling = false
|
||||
this.seekZero = 0
|
||||
let mobile = this.member.mobile
|
||||
getUserInfoMobile({mobile:mobile}).then( response => {
|
||||
@ -3629,18 +3633,24 @@
|
||||
}
|
||||
|
||||
this.dialogVisiblej = true
|
||||
this.getCode(((+this.oilActualPay) + (+this.goodsActualPay)).toFixed(2));
|
||||
this.getCode(((+this.oilActualPay) + (+this.goodsActualPay)).toFixed(2),2);
|
||||
// this.getStaff()
|
||||
},
|
||||
// 网络下发之后获取条码
|
||||
getCode(amount) {
|
||||
getCode(amount,flag) {
|
||||
console.log("this.payType",this.payType) // 现金不参与
|
||||
if (this.payType == "CASH" && flag == 1) {
|
||||
return
|
||||
}
|
||||
if (this.cardValueForm.paymentType == "CASH" && flag == 1)
|
||||
this.jishuqi++;
|
||||
if (this.jishuqi == 30) {
|
||||
this.jishuqi = 0
|
||||
return
|
||||
}
|
||||
this.continuePolling = true;
|
||||
getReturnCode ({payAmount:amount}).then(res=>{
|
||||
if (res.data === "300") {
|
||||
if (res.data === "300" && this.continuePolling) {
|
||||
setTimeout(() => {
|
||||
this.getCode(amount); // 重新发起请求
|
||||
}, 1000); // 停顿一秒
|
||||
@ -3669,13 +3679,14 @@
|
||||
}
|
||||
oilOrderR.push(o)
|
||||
})
|
||||
console.log("11111111111111111111",this.goodsOrder)
|
||||
let goodsOrderR = []
|
||||
this.goodsOrder.forEach(order=>{
|
||||
let o = {
|
||||
oilName : order.name,
|
||||
unit : order.num+order.unit,
|
||||
amount : order.memberPrice.toString()
|
||||
// amount : order.memberPrice.toString()
|
||||
amount : order.retailPrice.toString()
|
||||
|
||||
}
|
||||
goodsOrderR.push(o)
|
||||
})
|
||||
@ -4243,6 +4254,7 @@
|
||||
// 会员消费金额(储值卡需要减少的金额)
|
||||
consumeAmount:0,
|
||||
typeIdex:'',
|
||||
|
||||
};
|
||||
this.payType = "WECHAT"
|
||||
},
|
||||
@ -4356,6 +4368,7 @@
|
||||
this.dialogVisiblejLoading = false
|
||||
// this.resetting1()
|
||||
this.authCode = "";
|
||||
this.continuePolling = false;
|
||||
this.userNo = ""
|
||||
this.map = {
|
||||
allAmount:0,
|
||||
|
@ -761,7 +761,6 @@ import {ifRefPassApi} from "@/api/staff/store";
|
||||
let oilOrderR = []
|
||||
let balanceAmount = 0
|
||||
let oilCardAmount = 0
|
||||
console.log("123123123",this.oilInfo)
|
||||
|
||||
|
||||
this.oilInfo.forEach(order=>{
|
||||
@ -787,7 +786,8 @@ import {ifRefPassApi} from "@/api/staff/store";
|
||||
let o = {
|
||||
oilName : order.name,
|
||||
unit : order.num+""+order.unit,
|
||||
amount : order.memberPrice.toString()
|
||||
// amount : order.memberPrice.toString()
|
||||
amount : order.retailPrice.toString()
|
||||
}
|
||||
goodsOrderR.push(o)
|
||||
})
|
||||
|
@ -526,7 +526,8 @@ export default {
|
||||
let o = {
|
||||
oilName : order.name,
|
||||
unit : order.num+""+order.unit,
|
||||
amount : order.memberPrice.toString()
|
||||
// amount : order.memberPrice.toString()
|
||||
amount : order.retailPrice.toString()
|
||||
}
|
||||
goodsOrderR.push(o)
|
||||
})
|
||||
|
@ -1508,7 +1508,7 @@ export default {
|
||||
await this.getSendPrintIndex(this.realyPayBills);
|
||||
this.openConfirm = true;
|
||||
this.isPay = true
|
||||
this.getCode(this.realyPayBills)
|
||||
this.getCode(this.realyPayBills,flag)
|
||||
|
||||
this.title = this.payment
|
||||
},
|
||||
@ -2155,7 +2155,13 @@ export default {
|
||||
},
|
||||
|
||||
// 网络下发之后获取条码
|
||||
getCode(amount) {
|
||||
getCode(amount,flag) {
|
||||
if (this.cardValueForm.paymentType == "CASH" && flag == 1) {
|
||||
return
|
||||
}
|
||||
if (this.cardFuelDieselForm.paymentType == "CASH" && flag == 2) {
|
||||
return
|
||||
}
|
||||
this.jishuqi++;
|
||||
if (this.jishuqi == 30) {
|
||||
this.jishuqi = 0
|
||||
|
@ -77,12 +77,18 @@
|
||||
<view class="right-centne">
|
||||
<view class="h_"> <text class="hao_">订单号:</text> <text>{{item.orderNo}}</text>
|
||||
</view>
|
||||
<view class="h_"><text class="hao_">油号:</text>{{item.oilName}}</view>
|
||||
<view class="h_"><text class="hao_">升数:</text>{{item.shengshu}}L</view>
|
||||
<view class="h_"><text class="hao_">消费类型:</text>{{item.content}}</view>
|
||||
<template v-if="item.content == '储值卡充值'">
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="h_"><text class="hao_">油号:</text>{{item.oilName}}</view>
|
||||
<view class="h_"><text class="hao_">升数:</text>{{item.shengshu}}L</view>
|
||||
</template>
|
||||
<view class="h_"><text class="hao_">下单时间:</text>{{item.payTime}}</view>
|
||||
<view class="b-bx">
|
||||
<view class="b-bx" v-if="!item.content == '储值卡充值'">
|
||||
<view class=""> <text class="hao_">应付:</text>¥{{item.goodsMoney}}</view>
|
||||
<view class=""><text class="hao_">优惠:</text>¥0.00</view>
|
||||
<view class=""><text class="hao_">优惠:</text>¥{{item.discountAmount?item.discountAmount:0}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -322,6 +322,8 @@
|
||||
this.order.authCode = this.authCode
|
||||
this.order.realyPayBills = this.realyPayBills
|
||||
this.order.actualPayment = actualPayment
|
||||
this.order.payChannel = "POS"
|
||||
this.order.terminal = "POS"
|
||||
// cardValueId
|
||||
|
||||
// growthValue
|
||||
|
@ -25,12 +25,18 @@
|
||||
<view class="right-centne">
|
||||
<view class="h_"> <text class="hao_">订单号:</text> <text>{{item.orderNo}}</text>
|
||||
</view>
|
||||
<view class="h_"><text class="hao_">油号:</text>{{item.oilName}}</view>
|
||||
<view class="h_"><text class="hao_">升数:</text>{{item.shengshu}}L</view>
|
||||
<view class="h_"><text class="hao_">消费类型:</text>{{item.content}}</view>
|
||||
<template v-if="item.content == '储值卡充值'">
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="h_"><text class="hao_">油号:</text>{{item.oilName}}</view>
|
||||
<view class="h_"><text class="hao_">升数:</text>{{item.shengshu}}L</view>
|
||||
</template>
|
||||
<view class="h_"><text class="hao_">下单时间:</text>{{item.payTime}}</view>
|
||||
<view class="b-bx">
|
||||
<view class="b-bx" v-if="!item.content == '储值卡充值'">
|
||||
<view class=""> <text class="hao_">应付:</text>¥{{item.goodsMoney}}</view>
|
||||
<view class=""><text class="hao_">优惠:</text>¥0.00</view>
|
||||
<view class=""><text class="hao_">优惠:</text>¥{{item.discountAmount?item.discountAmount:0}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
Loading…
Reference in New Issue
Block a user