收银台
This commit is contained in:
parent
b2574cc2cb
commit
58db28edfb
@ -115,6 +115,9 @@ public class HangBillServiceImpl extends ServiceImpl<HangBillMapper, HangBill> i
|
||||
|
||||
@Override
|
||||
public HangBill updateHangBill(Map<String,String> map) {
|
||||
HangBill hangBill1 = this.selectHangBillByOrderNo(map.get("orderNo"));
|
||||
hangBill1.setPayStatus("unpaid");
|
||||
baseMapper.updateById(hangBill1);
|
||||
String payType = map.get("payType");
|
||||
// 调用支付接口
|
||||
this.pay(map);
|
||||
@ -214,7 +217,7 @@ public class HangBillServiceImpl extends ServiceImpl<HangBillMapper, HangBill> i
|
||||
map1.put("publicKey",merchantConfig.getPublicKey());
|
||||
map1.put("privateKey",merchantConfig.getPrivateKey());
|
||||
try {
|
||||
fyPayService.pay(map);
|
||||
fyPayService.pay(map1);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="app-center">
|
||||
|
||||
<!-- 查询-->
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>挂账</span>
|
||||
@ -89,7 +89,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<!-- 统计-->
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>统计</span>
|
||||
@ -102,6 +102,7 @@
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
<!-- 挂账列表-->
|
||||
<el-card class="box-card">
|
||||
<div class="wgang">
|
||||
<div>列表</div>
|
||||
@ -179,6 +180,10 @@
|
||||
<span v-else type="success">部分归还</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="outstandAmount"
|
||||
label="未归还金额">
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="realName"
|
||||
@ -387,12 +392,18 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="归还方式" prop="payType">
|
||||
<el-radio-group v-model="form2.payType">
|
||||
<el-radio v-for="item in payList"
|
||||
:key="item.dictValue"
|
||||
:value="item.dictValue"
|
||||
:label="item.dictValue" border>{{ item.dictLabel }}</el-radio>
|
||||
</el-radio-group>
|
||||
<!-- <el-radio-group v-model="form2.payType"-->
|
||||
<!-- @click="returnMethod">-->
|
||||
<!-- <el-radio v-for="item in payList"-->
|
||||
<!-- :key="item.dictValue"-->
|
||||
<!-- :value="item.dictValue"-->
|
||||
<!-- :label="item.dictValue" border>{{ item.dictLabel }}</el-radio>-->
|
||||
<!-- </el-radio-group>-->
|
||||
<el-radio v-model="payType" v-for="item in payList"
|
||||
:key="item.dictValue" :value="item.dictValue"
|
||||
:label="item.dictValue"
|
||||
@input="returnMethod"
|
||||
border>{{ item.dictLabel }}</el-radio>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -416,23 +427,39 @@
|
||||
¥{{ payAmount }}
|
||||
</div>
|
||||
<div style="text-align: center;color: grey;font-size: 14px;margin: 20px 0">请自行核实归还金额,提交完成后将自动处理</div>
|
||||
<div>
|
||||
<el-input v-model="authCode"
|
||||
autofocus="autofocus"
|
||||
@keydown.enter.native="collection"
|
||||
placeholder="扫描或输入付款码、支持微信、支付宝、云闪付">
|
||||
<i
|
||||
slot="suffix">
|
||||
<svg t="1697791915471" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1479" width="32" height="32"><path d="M149.333333 170.858667A21.546667 21.546667 0 0 1 170.858667 149.333333H384V106.666667H170.858667A64.213333 64.213333 0 0 0 106.666667 170.858667V384h42.666666V170.858667zM170.858667 874.666667A21.546667 21.546667 0 0 1 149.333333 853.141333V640H106.666667v213.141333A64.213333 64.213333 0 0 0 170.858667 917.333333H384v-42.666666H170.858667zM853.12 149.333333A21.546667 21.546667 0 0 1 874.666667 170.858667V384h42.666666V170.858667A64.213333 64.213333 0 0 0 853.141333 106.666667H640v42.666666h213.141333zM874.666667 853.141333A21.546667 21.546667 0 0 1 853.141333 874.666667H640v42.666666h213.141333A64.213333 64.213333 0 0 0 917.333333 853.141333V640h-42.666666v213.141333zM106.666667 490.666667h810.666666v42.666666H106.666667v-42.666666z" fill="#3D3D3D" p-id="1480"></path></svg>
|
||||
</i>
|
||||
</el-input>
|
||||
<div v-if="payType != 'CASH'">
|
||||
<div>
|
||||
<el-input v-model="authCode"
|
||||
autofocus="autofocus"
|
||||
@keydown.enter.native="collection"
|
||||
placeholder="扫描或输入付款码、支持微信、支付宝、云闪付">
|
||||
<i
|
||||
slot="suffix">
|
||||
<svg t="1697791915471" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1479" width="32" height="32"><path d="M149.333333 170.858667A21.546667 21.546667 0 0 1 170.858667 149.333333H384V106.666667H170.858667A64.213333 64.213333 0 0 0 106.666667 170.858667V384h42.666666V170.858667zM170.858667 874.666667A21.546667 21.546667 0 0 1 149.333333 853.141333V640H106.666667v213.141333A64.213333 64.213333 0 0 0 170.858667 917.333333H384v-42.666666H170.858667zM853.12 149.333333A21.546667 21.546667 0 0 1 874.666667 170.858667V384h42.666666V170.858667A64.213333 64.213333 0 0 0 853.141333 106.666667H640v42.666666h213.141333zM874.666667 853.141333A21.546667 21.546667 0 0 1 853.141333 874.666667H640v42.666666h213.141333A64.213333 64.213333 0 0 0 917.333333 853.141333V640h-42.666666v213.141333zM106.666667 490.666667h810.666666v42.666666H106.666667v-42.666666z" fill="#3D3D3D" p-id="1480"></path></svg>
|
||||
</i>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="demo-image">
|
||||
<div class="block" style="text-align: center">
|
||||
<el-image
|
||||
style="width: 200px; height: 200px"
|
||||
fit="cover"
|
||||
src="https://oil.wudb.cn/static/img/scan-demo.fcb8b1ab.png"></el-image>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="demo-image">
|
||||
<div class="block" style="text-align: center">
|
||||
<el-image
|
||||
style="width: 200px; height: 200px"
|
||||
fit="cover"
|
||||
src="https://oil.wudb.cn/static/img/scan-demo.fcb8b1ab.png"></el-image>
|
||||
<div v-else>
|
||||
<div>
|
||||
<el-input v-model="authCode"
|
||||
autofocus="autofocus"
|
||||
@input="changeSeekZero"
|
||||
@keydown.enter.native="collection"
|
||||
placeholder="请输入收款金额">
|
||||
</el-input>
|
||||
</div>
|
||||
<div style="text-align: right;margin: 10px 0">
|
||||
<span>应找零</span>
|
||||
<span style="color: red;font-size: 18px"> ¥{{ seekZero }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
@ -562,7 +589,8 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="归还方式" prop="payType">
|
||||
<el-radio-group v-model="form4.payType">
|
||||
<el-radio-group v-model="form4.payType"
|
||||
@input="changePayType">
|
||||
<el-radio v-for="item in payList"
|
||||
:key="item.dictValue"
|
||||
:value="item.dictValue"
|
||||
@ -605,6 +633,8 @@ import {getDicts} from "@/api/dict/data";
|
||||
repaidAmount:0,
|
||||
// 付款金额
|
||||
payAmount:0,
|
||||
// 找零金额
|
||||
seekZero:0,
|
||||
authCode:"",
|
||||
list:[],
|
||||
// 选中表格数据
|
||||
@ -620,6 +650,8 @@ import {getDicts} from "@/api/dict/data";
|
||||
unit:'',
|
||||
// 挂账单位列表
|
||||
unitList:[],
|
||||
// 付款方式
|
||||
payType:"WECHAT",
|
||||
form:{},
|
||||
form1:{
|
||||
unitName:"",
|
||||
@ -737,6 +769,17 @@ import {getDicts} from "@/api/dict/data";
|
||||
this.getLists();
|
||||
},
|
||||
methods:{
|
||||
changePayType(val){
|
||||
this.payType = val
|
||||
},
|
||||
// 归还方式
|
||||
returnMethod(val){
|
||||
this.form2.payType = val
|
||||
},
|
||||
// 计算找零金额
|
||||
changeSeekZero(){
|
||||
this.seekZero = this.authCode - this.oilActualPay - this.goodsActualPay
|
||||
},
|
||||
batchSub(){
|
||||
this.form4.list = JSON.stringify(this.tableList);
|
||||
this.form4.repaidAmount = this.repaidAmount;
|
||||
@ -814,6 +857,7 @@ import {getDicts} from "@/api/dict/data";
|
||||
collection(){
|
||||
let _this = this;
|
||||
if (this.isBatch){
|
||||
// 批量归还
|
||||
_this.form4.repaidAmount = _this.payAmount;
|
||||
_this.form4.authCode = _this.authCode;
|
||||
_this.form4.orderNo = _this.tableList[0].orderNo;
|
||||
@ -828,9 +872,11 @@ import {getDicts} from "@/api/dict/data";
|
||||
this.open3 = false;
|
||||
this.open4 = false;
|
||||
}else {
|
||||
// 单个归还
|
||||
_this.form2.repaidAmount = _this.payAmount;
|
||||
_this.form2.authCode = _this.authCode;
|
||||
editHangBill(this.form2).then(response => {
|
||||
console.log(response)
|
||||
if (response.data==null){
|
||||
|
||||
}else {
|
||||
@ -848,7 +894,7 @@ import {getDicts} from "@/api/dict/data";
|
||||
_this.isPay = false;
|
||||
clearInterval(_this.timer);
|
||||
}
|
||||
},500)
|
||||
},1000)
|
||||
setTimeout(function (){
|
||||
_this.loading = false;
|
||||
clearInterval(timer);
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user