no message

This commit is contained in:
DESKTOP-369JRHT\12997 2024-06-06 17:16:22 +08:00
parent 34854109bf
commit 2e7f18845a
16 changed files with 115 additions and 25 deletions

View File

@ -23,7 +23,13 @@ export function addHandoverApi(data) {
data: data data: data
}) })
} }
export function printGetHandoverReport(data) {
return request({
url: 'business/printer/getHandover',
method: 'post',
data: data
})
}
export function printLocallyApi(data) { export function printLocallyApi(data) {
return request({ return request({
url: '/business/handoverRecord/printLocally', url: '/business/handoverRecord/printLocally',

View File

@ -371,7 +371,7 @@
</template> </template>
<script> <script>
// import {printLocallyApi,addHandoverApis} from "@/api/handover/handover"; import {printLocallyApi, addHandoverApis, printGetHandoverReport} from "@/api/handover/handover";
import BigNumber from "bignumber.js"; import BigNumber from "bignumber.js";
import {getLodop} from "@/api/LodopFuncs"; import {getLodop} from "@/api/LodopFuncs";
@ -392,8 +392,12 @@ import {getLodop} from "@/api/LodopFuncs";
// this.getHandover(); // this.getHandover();
}, },
methods: { methods: {
printLocally() { printLocally() {
printGetHandoverReport(this.handoverList).then(res=>{
})
},
printLocally1() {
// const printHTML = document.querySelector('#report').innerHTML // const printHTML = document.querySelector('#report').innerHTML
// // // //
// window.document.body.innerHTML = printHTML // window.document.body.innerHTML = printHTML
@ -541,6 +545,12 @@ import {getLodop} from "@/api/LodopFuncs";
case 'CASH': case 'CASH':
return '现金' return '现金'
break; break;
case 'balance':
return '余额'
break;
case 'oilCard':
return '油卡'
break;
} }
return '未知' return '未知'
}, },

View File

@ -27,7 +27,6 @@ public class CardValueRecordDTO extends CardValueRecord {
private String appltType; private String appltType;
private String paymentType; private String paymentType;
private String payStatus; private String payStatus;
private String payChannel;
private String types; private String types;
@JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
private Date expireTime; private Date expireTime;

View File

@ -28,6 +28,9 @@ public class CardValueRecord extends Model<CardValueRecord> {
private Integer mtUserId; private Integer mtUserId;
//会员名字 //会员名字
private String name; private String name;
private String payChannel;
//会员手机号码 //会员手机号码
private String mobile; private String mobile;
//员工id //员工id

View File

@ -468,7 +468,13 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
allOrderInfo.setPayMoney(cardValueRecordDTO.getRealyPayBills()); allOrderInfo.setPayMoney(cardValueRecordDTO.getRealyPayBills());
allOrderInfo.setPayType("CASH"); allOrderInfo.setPayType("CASH");
allOrderInfo.setUserId(cardValueRecordDTO.getMtUserId()); allOrderInfo.setUserId(cardValueRecordDTO.getMtUserId());
allOrderInfo.setPayChannel("cashier"); if (ObjectUtil.isNotEmpty(cardValueRecordDTO.getPayChannel())) {
allOrderInfo.setPayChannel(cardValueRecordDTO.getPayChannel());
}else {
allOrderInfo.setPayChannel("cashier");
}
allOrderInfo.setStatus("paid"); allOrderInfo.setStatus("paid");
allOrderInfo.setContent("储值卡充值"); allOrderInfo.setContent("储值卡充值");
allOrderInfo.setPayTime(new Date()); allOrderInfo.setPayTime(new Date());

View File

@ -214,7 +214,17 @@ public class PrinterServiceImpl implements PrinterService {
Handover.setHandover(handover); Handover.setHandover(handover);
Integer random6 = (int) ((Math.random() * 9 + 1) * 100000); Integer random6 = (int) ((Math.random() * 9 + 1) * 100000);
String url=m.print(infoByStoreId.getMachineCode(), Handover.printHandover(), "Z"+System.currentTimeMillis()+random6.toString()); 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) { public void oilOrderReport(Map<String, Object> oilOrder,Integer storeId) {

View File

@ -405,6 +405,12 @@ public class Handover {
return "银联二维码"; return "银联二维码";
case "CASH": case "CASH":
return "现金"; return "现金";
case "balance":
return "余额";
case "APPLET_CODE":
return "会员码";
case "oilCard":
return "油卡";
default: default:
return "其他"; return "其他";
} }

View File

@ -503,6 +503,15 @@ import {printGetHandoverReport, rePrintOilOrderReport} from "@/api/print";
case 'CASH': case 'CASH':
return '现金' return '现金'
break; break;
case 'balance':
return '余额'
break;
case 'APPLET_CODE':
return '会员码'
break;
case 'oilCard':
return '油卡'
break;
} }
return '未知' return '未知'
}, },

View File

@ -174,6 +174,7 @@
<div>支付方式</div> <div>支付方式</div>
<div>金额</div> <div>金额</div>
</div> </div>
<!-- {{paymentAggregation('oil') }}-->
<div class="input-box" v-for="item in paymentAggregation('oil')"> <div class="input-box" v-for="item in paymentAggregation('oil')">
<div>{{calculateThePaymentMethod(item.payType)}}</div> <div>{{calculateThePaymentMethod(item.payType)}}</div>
<div>{{item.paidAmount}}</div> <div>{{item.paidAmount}}</div>
@ -546,6 +547,12 @@ import {printGetHandoverReport} from "@/api/print";
case 'CASH': case 'CASH':
return '现金' return '现金'
break; break;
case 'balance':
return '余额'
break;
case 'oilCard':
return '油卡'
break;
} }
return '未知' return '未知'
}, },

View File

@ -1627,6 +1627,8 @@
creditLimit: [ { required: true, message: "请填写挂账额度", trigger: "blur" }, ], creditLimit: [ { required: true, message: "请填写挂账额度", trigger: "blur" }, ],
status: [ { required: true, message: "请选择挂账单位状态", trigger: "blur" }, ], status: [ { required: true, message: "请选择挂账单位状态", trigger: "blur" }, ],
}, },
continuePolling: true, //
// //
rules2: { rules2: {
number: [{required: true, message: "请输入卡号", trigger: "blur"}], number: [{required: true, message: "请输入卡号", trigger: "blur"}],
@ -2034,6 +2036,7 @@
}, },
cancelCollection() { cancelCollection() {
this.openConfirm = false; this.openConfirm = false;
this.continuePolling = false;
}, },
// //
rechargeCard(index, item) { rechargeCard(index, item) {
@ -2126,7 +2129,7 @@
this.activeRecharge = 'balance' this.activeRecharge = 'balance'
this.cardValueForm = {} this.cardValueForm = {}
this.cardFuelDieselForm = {} this.cardFuelDieselForm = {}
this.continuePolling = false
this.iniz() this.iniz()
}, },
iniz() { iniz() {
@ -2206,7 +2209,7 @@
this.openConfirm = true; this.openConfirm = true;
this.isPay = true this.isPay = true
this.getCode(this.realyPayBills) this.getCode(this.realyPayBills,1)
}, },
printLocally() { printLocally() {
@ -2482,6 +2485,7 @@
clear(){ clear(){
// this.autofocus = false // this.autofocus = false
this.dialogVisiblej = false this.dialogVisiblej = false
this.continuePolling = false
this.seekZero = 0 this.seekZero = 0
let mobile = this.member.mobile let mobile = this.member.mobile
getUserInfoMobile({mobile:mobile}).then( response => { getUserInfoMobile({mobile:mobile}).then( response => {
@ -3629,18 +3633,24 @@
} }
this.dialogVisiblej = true this.dialogVisiblej = true
this.getCode(((+this.oilActualPay) + (+this.goodsActualPay)).toFixed(2)); this.getCode(((+this.oilActualPay) + (+this.goodsActualPay)).toFixed(2),2);
// this.getStaff() // 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++; this.jishuqi++;
if (this.jishuqi == 30) { if (this.jishuqi == 30) {
this.jishuqi = 0 this.jishuqi = 0
return return
} }
this.continuePolling = true;
getReturnCode ({payAmount:amount}).then(res=>{ getReturnCode ({payAmount:amount}).then(res=>{
if (res.data === "300") { if (res.data === "300" && this.continuePolling) {
setTimeout(() => { setTimeout(() => {
this.getCode(amount); // this.getCode(amount); //
}, 1000); // }, 1000); //
@ -3669,13 +3679,14 @@
} }
oilOrderR.push(o) oilOrderR.push(o)
}) })
console.log("11111111111111111111",this.goodsOrder)
let goodsOrderR = [] let goodsOrderR = []
this.goodsOrder.forEach(order=>{ this.goodsOrder.forEach(order=>{
let o = { let o = {
oilName : order.name, oilName : order.name,
unit : order.num+order.unit, unit : order.num+order.unit,
amount : order.memberPrice.toString() // amount : order.memberPrice.toString()
amount : order.retailPrice.toString()
} }
goodsOrderR.push(o) goodsOrderR.push(o)
}) })
@ -4243,6 +4254,7 @@
// //
consumeAmount:0, consumeAmount:0,
typeIdex:'', typeIdex:'',
}; };
this.payType = "WECHAT" this.payType = "WECHAT"
}, },
@ -4356,6 +4368,7 @@
this.dialogVisiblejLoading = false this.dialogVisiblejLoading = false
// this.resetting1() // this.resetting1()
this.authCode = ""; this.authCode = "";
this.continuePolling = false;
this.userNo = "" this.userNo = ""
this.map = { this.map = {
allAmount:0, allAmount:0,

View File

@ -761,7 +761,6 @@ import {ifRefPassApi} from "@/api/staff/store";
let oilOrderR = [] let oilOrderR = []
let balanceAmount = 0 let balanceAmount = 0
let oilCardAmount = 0 let oilCardAmount = 0
console.log("123123123",this.oilInfo)
this.oilInfo.forEach(order=>{ this.oilInfo.forEach(order=>{
@ -787,7 +786,8 @@ import {ifRefPassApi} from "@/api/staff/store";
let o = { let o = {
oilName : order.name, oilName : order.name,
unit : order.num+""+order.unit, unit : order.num+""+order.unit,
amount : order.memberPrice.toString() // amount : order.memberPrice.toString()
amount : order.retailPrice.toString()
} }
goodsOrderR.push(o) goodsOrderR.push(o)
}) })

View File

@ -526,7 +526,8 @@ export default {
let o = { let o = {
oilName : order.name, oilName : order.name,
unit : order.num+""+order.unit, unit : order.num+""+order.unit,
amount : order.memberPrice.toString() // amount : order.memberPrice.toString()
amount : order.retailPrice.toString()
} }
goodsOrderR.push(o) goodsOrderR.push(o)
}) })

View File

@ -1508,7 +1508,7 @@ export default {
await this.getSendPrintIndex(this.realyPayBills); await this.getSendPrintIndex(this.realyPayBills);
this.openConfirm = true; this.openConfirm = true;
this.isPay = true this.isPay = true
this.getCode(this.realyPayBills) this.getCode(this.realyPayBills,flag)
this.title = this.payment 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++; this.jishuqi++;
if (this.jishuqi == 30) { if (this.jishuqi == 30) {
this.jishuqi = 0 this.jishuqi = 0

View File

@ -77,12 +77,18 @@
<view class="right-centne"> <view class="right-centne">
<view class="h_"> <text class="hao_">订单号:</text> <text>{{item.orderNo}}</text> <view class="h_"> <text class="hao_">订单号:</text> <text>{{item.orderNo}}</text>
</view> </view>
<view class="h_"><text class="hao_">油号:</text>{{item.oilName}}</view> <view class="h_"><text class="hao_">消费类型:</text>{{item.content}}</view>
<view class="h_"><text class="hao_">升数:</text>{{item.shengshu}}L</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="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>{{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> </view>
</view> </view>

View File

@ -322,6 +322,8 @@
this.order.authCode = this.authCode this.order.authCode = this.authCode
this.order.realyPayBills = this.realyPayBills this.order.realyPayBills = this.realyPayBills
this.order.actualPayment = actualPayment this.order.actualPayment = actualPayment
this.order.payChannel = "POS"
this.order.terminal = "POS"
// cardValueId // cardValueId
// growthValue // growthValue

View File

@ -25,12 +25,18 @@
<view class="right-centne"> <view class="right-centne">
<view class="h_"> <text class="hao_">订单号:</text> <text>{{item.orderNo}}</text> <view class="h_"> <text class="hao_">订单号:</text> <text>{{item.orderNo}}</text>
</view> </view>
<view class="h_"><text class="hao_">油号:</text>{{item.oilName}}</view> <view class="h_"><text class="hao_">消费类型:</text>{{item.content}}</view>
<view class="h_"><text class="hao_">升数:</text>{{item.shengshu}}L</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="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>{{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> </view>
</view> </view>