Compare commits

...

2 Commits

Author SHA1 Message Date
zhaohengkun
3ccbd60e4f bug修改 2024-11-04 10:42:04 +08:00
zhaohengkun
1a5e536cf6 1 2024-11-04 09:27:46 +08:00
4 changed files with 579 additions and 536 deletions

View File

@ -1,7 +1,7 @@
<!-- 收银台订单--> <!-- 收银台订单-->
<template> <template>
<div class="container"> <div class="container">
<div class="new-top" > <div class="new-top">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="120px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="120px">
<el-form-item label=""> <el-form-item label="">
<el-input style="width: 215px;" v-model="queryParams.orderNo" placeholder="请输入订单号"></el-input> <el-input style="width: 215px;" v-model="queryParams.orderNo" placeholder="请输入订单号"></el-input>
@ -77,18 +77,21 @@
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
> >
</el-date-picker> </el-date-picker>
<el-form-item style="float: right; margin-right: 0px "> <el-form-item style="float: right; margin-right: 0px ">
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="exportExcelCashier">导出</el-button> <el-button type="primary" @click="exportExcelCashier">导出</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div class="wit_box" > <div class="wit_box">
<div class="box-gang"> <div class="box-gang">
<div class="box"> <div class="box">
<el-tooltip class="item" effect="dark" content="退款金额(元)/笔数" placement="top-start"> <el-tooltip class="item" effect="dark" content="退款金额(元)/笔数" placement="top-start">
<div class="size-bole">{{ orderStatistics.refBalance?orderStatistics.refBalance:0 }}/{{ orderStatistics.refBalanceCount?orderStatistics.refBalanceCount:0 }}</div> <div class="size-bole">{{
orderStatistics.refBalance ? orderStatistics.refBalance : 0
}}/{{ orderStatistics.refBalanceCount ? orderStatistics.refBalanceCount : 0 }}
</div>
</el-tooltip> </el-tooltip>
<div class="size-hui"> <div class="size-hui">
<div class="dian" style="background: #0DC291"></div> <div class="dian" style="background: #0DC291"></div>
@ -97,7 +100,10 @@
</div> </div>
<div class="box"> <div class="box">
<el-tooltip class="item" effect="dark" content="油品订单退款金额(元)/笔数" placement="top-start"> <el-tooltip class="item" effect="dark" content="油品订单退款金额(元)/笔数" placement="top-start">
<div class="size-bole" style="color:#00CAFF;">{{ orderStatistics.oilOrder?orderStatistics.oilOrder:0 }}/{{ orderStatistics.oilOrderCount?orderStatistics.oilOrderCount:0 }}</div> <div class="size-bole" style="color:#00CAFF;">{{
orderStatistics.oilOrder ? orderStatistics.oilOrder : 0
}}/{{ orderStatistics.oilOrderCount ? orderStatistics.oilOrderCount : 0 }}
</div>
</el-tooltip> </el-tooltip>
<div class="size-hui"> <div class="size-hui">
@ -107,7 +113,10 @@
</div> </div>
<div class="box"> <div class="box">
<el-tooltip class="item" effect="dark" content="便利店订单退款金额(元)/笔数" placement="top-start"> <el-tooltip class="item" effect="dark" content="便利店订单退款金额(元)/笔数" placement="top-start">
<div class="size-bole" style="color:#F44522;" >{{ orderStatistics.convenienceStore?orderStatistics.convenienceStore:0 }}/{{ orderStatistics.convenienceStoreCount?orderStatistics.convenienceStoreCount:0 }}</div> <div class="size-bole" style="color:#F44522;">{{
orderStatistics.convenienceStore ? orderStatistics.convenienceStore : 0
}}/{{ orderStatistics.convenienceStoreCount ? orderStatistics.convenienceStoreCount : 0 }}
</div>
</el-tooltip> </el-tooltip>
<div class="size-hui"> <div class="size-hui">
@ -117,7 +126,9 @@
</div> </div>
<div class="box"> <div class="box">
<el-tooltip class="item" effect="dark" content="积分商城订单退款金额(元)/笔数" placement="top-start"> <el-tooltip class="item" effect="dark" content="积分商城订单退款金额(元)/笔数" placement="top-start">
<div class="size-bole" style="color:#FF7E00;" >{{orderStatistics.integral?orderStatistics.integral:0}}/{{orderStatistics.integralCount?orderStatistics.integralCount:0}}</div> <div class="size-bole" style="color:#FF7E00;">
{{ orderStatistics.integral ? orderStatistics.integral : 0 }}/{{ orderStatistics.integralCount ? orderStatistics.integralCount : 0 }}
</div>
</el-tooltip> </el-tooltip>
<div class="size-hui"> <div class="size-hui">
@ -132,48 +143,52 @@
border border
style="width: 100%"> style="width: 100%">
<el-table-column type="index" width="50" align="center" label="序号"/> <el-table-column type="index" width="50" align="center" label="序号"/>
<el-table-column prop="orderNo" align="center" label="订单号" width="220"> </el-table-column> <el-table-column prop="orderNo" align="center" label="订单号" width="220"></el-table-column>
<el-table-column prop="payChannel" align="center" label="订单类型"> <el-table-column prop="payChannel" align="center" label="订单类型">
</el-table-column> </el-table-column>
<el-table-column prop="type" align="center" label="订单分类"> <el-table-column prop="type" align="center" label="订单分类">
</el-table-column> </el-table-column>
<el-table-column prop="goodsMoney" align="center" label="订单金额(元)"> <el-table-column prop="goodsMoney" align="center" label="订单金额(元)">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.type=='3'">{{scope.row.goodsMoney + scope.row.payMoney}}</span> <span v-if="scope.row.type=='3'">{{ scope.row.goodsMoney + scope.row.payMoney }}</span>
<span v-else>{{scope.row.goodsMoney}}</span> <span v-else>{{ scope.row.goodsMoney }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="payMoney" align="center" label="实收金额(元)"> </el-table-column> <el-table-column prop="payMoney" align="center" label="实收金额(元)"></el-table-column>
<el-table-column prop="payMoney" align="center" label="会员付款金额(元)"> </el-table-column> <el-table-column prop="payMoney" align="center" label="会员付款金额(元)"></el-table-column>
<el-table-column prop="refMoney" align="center" label="退款金额(元)"> <el-table-column prop="refMoney" align="center" label="退款金额(元)">
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<span v-if="scope.row.status == 'refund'">{{scope.row.payMoney}}</span> <!-- <span v-if="scope.row.status == 'refund'">{{ scope.row.payMoney }}</span>-->
<span type="danger" v-else>--</span> <!-- <span type="danger" v-else>&#45;&#45;</span>-->
</template> <!-- </template>-->
</el-table-column> </el-table-column>
<el-table-column prop="userName" align="center" label="付款用户" > </el-table-column> <el-table-column prop="userName" align="center" label="付款用户"></el-table-column>
<el-table-column prop="payType" align="center" label="支付方式"> <el-table-column prop="payType" align="center" label="支付方式">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.payType=='CASH'">现金</span> <span v-if="scope.row.payType == 'CASH'">现金</span>
<span v-else-if="scope.row.payType=='WECHAT'">微信</span> <span v-else-if="scope.row.payType == 'WECHAT'">微信</span>
<span v-else-if="scope.row.payType=='ALIPAY'">支付宝</span> <span v-else-if="scope.row.payType == 'ALIPAY'">支付宝</span>
<span v-else="">余额</span> <span v-else-if="scope.row.payType == 'UNIONPAY'">银联二维码</span>
<span v-else-if="scope.row.payType == 'credit'">挂账</span>
<span v-else-if="scope.row.payType == 'oilCard'">囤油卡</span>
<span v-else-if="scope.row.payType == 'balance'">储值卡</span>
<span v-else>未知</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="status" align="center" label="支付状态"> <el-table-column prop="status" align="center" label="支付状态">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.status == 'unpaid'" style="color: #F44522">未支付</div> <div v-if="scope.row.status == 'unpaid'" style="color: #F44522">未支付</div>
<div v-else-if="scope.row.status == '退款中'" style="color: #FF7E00">退款中</div> <div v-else-if="scope.row.status == '退款中'" style="color: #FF7E00">退款中</div>
<div v-else-if="scope.row.status == '已退款'" style="color: #FF7E00">已退款</div> <div v-else-if="scope.row.status == '已退款'" style="color: #FF7E00">已退款</div>
<div v-else style="color: #F44522">支付失败</div> <div v-else style="color: #F44522">支付失败</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="paymentChannel" align="center" label="支付渠道"> </el-table-column> <el-table-column prop="paymentChannel" align="center" label="支付渠道"></el-table-column>
<el-table-column prop="mchntCd" align="center" label="商户号"> </el-table-column> <el-table-column prop="mchntCd" align="center" label="商户号"></el-table-column>
<el-table-column prop="createBy" align="center" label="关联员工"> </el-table-column> <el-table-column prop="createBy" align="center" label="关联员工"></el-table-column>
<el-table-column prop="updateTime" align="center" label="退款时间" width="220"> </el-table-column> <el-table-column prop="updateTime" align="center" label="退款时间" width="220"></el-table-column>
</el-table> </el-table>
</div> </div>
<pagination <pagination
@ -191,17 +206,17 @@
title="订单信息" title="订单信息"
:visible.sync="dialogVisible"> :visible.sync="dialogVisible">
<el-descriptions :title="'订单号:'+ordersInfo.orderNo"> <el-descriptions :title="'订单号:'+ordersInfo.orderNo">
<el-descriptions-item label="门店">{{ordersInfo.storeName}}</el-descriptions-item> <el-descriptions-item label="门店">{{ ordersInfo.storeName }}</el-descriptions-item>
<el-descriptions-item label="收银员">{{ordersInfo.createBy}}</el-descriptions-item> <el-descriptions-item label="收银员">{{ ordersInfo.createBy }}</el-descriptions-item>
<el-descriptions-item label="支付渠道">{{ordersInfo.payChannel}}</el-descriptions-item> <el-descriptions-item label="支付渠道">{{ ordersInfo.payChannel }}</el-descriptions-item>
<el-descriptions-item label="商户号">{{ordersInfo.mchntCd}}</el-descriptions-item> <el-descriptions-item label="商户号">{{ ordersInfo.mchntCd }}</el-descriptions-item>
<el-descriptions-item label="费率">{{ordersInfo.amount}}</el-descriptions-item> <el-descriptions-item label="费率">{{ ordersInfo.amount }}</el-descriptions-item>
<el-descriptions-item label="订单来源">{{ordersInfo.type}}</el-descriptions-item> <el-descriptions-item label="订单来源">{{ ordersInfo.type }}</el-descriptions-item>
<el-descriptions-item label="所属模块">{{ordersInfo.amount}}</el-descriptions-item> <el-descriptions-item label="所属模块">{{ ordersInfo.amount }}</el-descriptions-item>
<el-descriptions-item label="支付方式">{{ordersInfo.payType}}</el-descriptions-item> <el-descriptions-item label="支付方式">{{ ordersInfo.payType }}</el-descriptions-item>
<el-descriptions-item label="付款用户">{{ordersInfo.userName}}</el-descriptions-item> <el-descriptions-item label="付款用户">{{ ordersInfo.userName }}</el-descriptions-item>
<el-descriptions-item label="支付状态">{{ordersInfo.status}}</el-descriptions-item> <el-descriptions-item label="支付状态">{{ ordersInfo.status }}</el-descriptions-item>
<el-descriptions-item label="备注">{{ordersInfo.content}}</el-descriptions-item> <el-descriptions-item label="备注">{{ ordersInfo.content }}</el-descriptions-item>
<!-- <el-descriptions-item label="备注">--> <!-- <el-descriptions-item label="备注">-->
<!-- <el-tag size="small">学校</el-tag>--> <!-- <el-tag size="small">学校</el-tag>-->
<!-- </el-descriptions-item>--> <!-- </el-descriptions-item>-->
@ -212,27 +227,27 @@
<template slot="label"> <template slot="label">
订单金额 订单金额
</template> </template>
{{ordersInfo.goodsMoney?ordersInfo.goodsMoney:"--"}} {{ ordersInfo.goodsMoney ? ordersInfo.goodsMoney : "--" }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> <template slot="label">
优惠后应付金额 优惠后应付金额
</template> </template>
{{ordersInfo.payMoney?ordersInfo.payMoney:"--"}} {{ ordersInfo.payMoney ? ordersInfo.payMoney : "--" }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> <template slot="label">
退款金额 退款金额
</template> </template>
{{ordersInfo.refMoney?ordersInfo.refMoney:"--"}} {{ ordersInfo.refMoney ? ordersInfo.refMoney : "--" }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> <template slot="label">
实收金额 实收金额
</template> </template>
{{ordersInfo.payMoney?ordersInfo.payMoney:"--"}} {{ ordersInfo.payMoney ? ordersInfo.payMoney : "--" }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
@ -245,73 +260,71 @@
<script> <script>
import { import {
exportExcelTradingApi, getmyDataApi, getmyDataApi,
getRunningWaterByTissueApi,
getTissueByDataApi, getTissueByDataApi,
getTradingPageApi,
getDicts, getDicts,
getStaffByStorId, getStaffByStorId,
getTradingOnsPageApi, getTradingOnsPageApi,
exportExcelBackOrderMsgsApi exportExcelBackOrderMsgsApi
} from "@/api/allOrder"; } from "@/api/allOrder";
import {getTradingOnPageApi} from "../../../../api/allOrder";
export default { export default {
name: "reconciliation-trading", name: "reconciliation-trading",
data(){ data() {
return{ return {
radio1:"油号选错", radio1: "油号选错",
loading:false, loading: false,
dialogVisible:false, dialogVisible: false,
// //
staffList:[], staffList: [],
ordersInfo:{}, ordersInfo: {},
// //
dateRange: [], dateRange: [],
beginTime:"", beginTime: "",
endTime:"", endTime: "",
// //
isSysDate:false, isSysDate: false,
// //
orderList:[], orderList: [],
deptList:[], deptList: [],
// //
queryParams: { queryParams: {
page: 1, page: 1,
pageSize: 10, pageSize: 10,
beginTime:"", beginTime: "",
endTime:"", endTime: "",
orderNo:"", orderNo: "",
status:"", status: "",
payType:"", payType: "",
payChannel:"", payChannel: "",
deptType:"3", deptType: "3",
storeId:"", storeId: "",
deptId:"", deptId: "",
userName:"", userName: "",
staffId:"", staffId: "",
dataRange:[], dataRange: [],
}, },
orderStatistics:{ orderStatistics: {
CASH:"0", CASH: "0",
WECHAT:"0", WECHAT: "0",
ALIPAY:"0", ALIPAY: "0",
balance:"0", balance: "0",
CASHCount:"0", CASHCount: "0",
WECHATCount:"0", WECHATCount: "0",
ALIPAYCount:"0", ALIPAYCount: "0",
balanceCount:"0", balanceCount: "0",
refBalance:"0", refBalance: "0",
refBalanceCount:"0", refBalanceCount: "0",
oilOrder:"0", oilOrder: "0",
oilOrderCount:"0", oilOrderCount: "0",
convenienceStore:"0", convenienceStore: "0",
convenienceStoreCount:"0", convenienceStoreCount: "0",
integral:"0", integral: "0",
integralCount:"0", integralCount: "0",
}, },
total:0, total: 0,
} }
}, },
async created() { async created() {
@ -320,7 +333,7 @@ export default {
start.setMinutes(0) start.setMinutes(0)
start.setSeconds(0) start.setSeconds(0)
start.setMilliseconds(0) start.setMilliseconds(0)
this.dateRange = [start,new Date()]; this.dateRange = [start, new Date()];
this.beginTime = start this.beginTime = start
this.endTime = new Date() this.endTime = new Date()
this.isSysDate = true this.isSysDate = true
@ -329,12 +342,12 @@ export default {
// this.getList(); // this.getList();
}, },
methods:{ methods: {
async getDeptList() { async getDeptList() {
// getRunningWaterByTissueApi(this.addDateRange(this.queryParams)).then( response => { // getRunningWaterByTissueApi(this.addDateRange(this.queryParams)).then( response => {
// this.deptList = response.data.records; // this.deptList = response.data.records;
// }) // })
await getmyDataApi(this.addDateRange(this.queryParams)).then( response => { await getmyDataApi(this.addDateRange(this.queryParams)).then(response => {
this.queryParams.deptId = response.data.deptId; this.queryParams.deptId = response.data.deptId;
this.getList() this.getList()
this.getDicts() this.getDicts()
@ -343,22 +356,22 @@ export default {
}) })
}, },
exportExcelCashier() { exportExcelCashier() {
exportExcelBackOrderMsgsApi(this.queryParams).then(res=>{ exportExcelBackOrderMsgsApi(this.queryParams).then(res => {
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }); const blob = new Blob([res], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'});
this.$download.saveAs(blob,'交易明细统计.xLsx') this.$download.saveAs(blob, '交易明细统计.xLsx')
}) })
}, },
// //
async getOrderStatistics() { async getOrderStatistics() {
getTissueByDataApi(this.queryParams).then(res=>{ getTissueByDataApi(this.queryParams).then(res => {
this.orderStatistics = res.data this.orderStatistics = res.data
}) })
}, },
// //
async getList(val){ async getList(val) {
getTradingOnsPageApi(this.queryParams).then( response => { getTradingOnsPageApi(this.queryParams).then(response => {
this.orderList = response.data.records; this.orderList = response.data.records;
this.total = response.data.total; this.total = response.data.total;
this.isSysDate = false this.isSysDate = false
@ -396,7 +409,7 @@ export default {
this.queryParams = { this.queryParams = {
page: 1, page: 1,
pageSize: 10, pageSize: 10,
deptType:"3", deptType: "3",
} }
this.beginTime = "" this.beginTime = ""
this.endTime = "" this.endTime = ""
@ -409,43 +422,49 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.container{ .container {
background: #f4f5f9; background: #f4f5f9;
box-sizing: border-box; box-sizing: border-box;
padding-bottom: 8px; padding-bottom: 8px;
//height: 87.5vh; //height: 87.5vh;
} }
.app-top{
.app-top {
width: 100%; width: 100%;
height: 60px; height: 60px;
box-sizing: border-box; box-sizing: border-box;
padding: 10px; padding: 10px;
} }
.clearfix{
.clearfix {
width: 100%; width: 100%;
} }
.box-card{
.box-card {
width: 100%; width: 100%;
margin-bottom: 15px; margin-bottom: 15px;
} }
.box-gang{
.box-gang {
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.box{
.box {
padding: 5px; padding: 5px;
padding-left: 20px; padding-left: 20px;
width: 280px; width: 280px;
height: 60px; height: 60px;
background:#fff; background: #fff;
border-radius: 10px; border-radius: 10px;
border: 1px solid #FF9655; border: 1px solid #FF9655;
margin-right: 15px; margin-right: 15px;
} }
.size-hui{
.size-hui {
display: flex; display: flex;
align-items: center; align-items: center;
font-family: Source Han Sans CN, Source Han Sans CN; font-family: Source Han Sans CN, Source Han Sans CN;
@ -461,7 +480,8 @@ export default {
width: 100%; width: 100%;
} }
} }
.dian{
.dian {
width: 6px; width: 6px;
height: 6px; height: 6px;
border-radius: 50%; border-radius: 50%;
@ -472,13 +492,15 @@ export default {
margin-bottom: 15px; margin-bottom: 15px;
margin-right: 20px; margin-right: 20px;
} }
.icon-img{
.icon-img {
//margin-left: 110px; //margin-left: 110px;
width: 100%; width: 100%;
height: 20px; height: 20px;
margin-right: 5px; margin-right: 5px;
img{
img {
float: right; float: right;
//width: 100%; //width: 100%;
width: 20px; width: 20px;
@ -486,12 +508,14 @@ export default {
height: 100%; height: 100%;
} }
} }
.f-button{
.f-button {
width: 100%; width: 100%;
float: right ; float: right;
text-align: right; text-align: right;
} }
.size-bole{
.size-bole {
height: 31px; height: 31px;
font-size: 24px; font-size: 24px;
color: #0DC291; color: #0DC291;
@ -504,7 +528,8 @@ export default {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.wgang{
.wgang {
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
@ -512,27 +537,32 @@ export default {
margin-bottom: 20px; margin-bottom: 20px;
} }
.table-box{
.table-box {
width: 100%; width: 100%;
height: 52vh; height: 52vh;
overflow: auto; overflow: auto;
} }
.pagination-box{
.pagination-box {
width: 100%; width: 100%;
margin: 10px auto; margin: 10px auto;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.top-app-sou{
.top-app-sou {
width: 20%; width: 20%;
} }
.tk{
.tk {
text-align: center; text-align: center;
color: grey; color: grey;
margin: 10px 0; margin: 10px 0;
} }
.new-top{
.new-top {
width: 99%; width: 99%;
background: #FFFFFF; background: #FFFFFF;
margin: 15px auto; margin: 15px auto;
@ -542,7 +572,8 @@ export default {
border-radius: 4px; border-radius: 4px;
margin-bottom: 5px; margin-bottom: 5px;
} }
.wit_box{
.wit_box {
width: 99%; width: 99%;
background: #FFFFFF; background: #FFFFFF;
margin: 5px auto; margin: 5px auto;

View File

@ -268,10 +268,14 @@
<el-table-column prop="userName" align="center" label="付款用户"></el-table-column> <el-table-column prop="userName" align="center" label="付款用户"></el-table-column>
<el-table-column prop="payType" align="center" label="支付方式"> <el-table-column prop="payType" align="center" label="支付方式">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.payType=='CASH'">现金</span> <span v-if="scope.row.payType == 'CASH'">现金</span>
<span v-else-if="scope.row.payType=='WECHAT'">微信</span> <span v-else-if="scope.row.payType == 'WECHAT'">微信</span>
<span v-else-if="scope.row.payType=='ALIPAY'">支付宝</span> <span v-else-if="scope.row.payType == 'ALIPAY'">支付宝</span>
<span v-else="">余额</span> <span v-else-if="scope.row.payType == 'UNIONPAY'">银联二维码</span>
<span v-else-if="scope.row.payType == 'credit'">挂账</span>
<span v-else-if="scope.row.payType == 'oilCard'">囤油卡</span>
<span v-else-if="scope.row.payType == 'balance'">储值卡</span>
<span v-else>未知</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="status" align="center" label="订单状态"> <el-table-column prop="status" align="center" label="订单状态">

View File

@ -21,8 +21,10 @@ import com.fuint.business.convenienceSore.dto.LJGoodsDto;
import com.fuint.business.convenienceSore.mapper.LJGoodsMapper; import com.fuint.business.convenienceSore.mapper.LJGoodsMapper;
import com.fuint.business.convenienceSore.service.LJGoodsService; import com.fuint.business.convenienceSore.service.LJGoodsService;
import com.fuint.business.convenienceSore.service.StockTrackService; import com.fuint.business.convenienceSore.service.StockTrackService;
import com.fuint.business.fleet.entity.FleetConsumeRecord;
import com.fuint.business.fleet.entity.FleetInfo; import com.fuint.business.fleet.entity.FleetInfo;
import com.fuint.business.fleet.entity.FleetMember; import com.fuint.business.fleet.entity.FleetMember;
import com.fuint.business.fleet.mapper.FleetConsumeRecordMapper;
import com.fuint.business.fleet.mapper.FleetInfoMapper; import com.fuint.business.fleet.mapper.FleetInfoMapper;
import com.fuint.business.fleet.mapper.FleetLinesChangeMapper; import com.fuint.business.fleet.mapper.FleetLinesChangeMapper;
import com.fuint.business.fleet.mapper.FleetMemberMapper; import com.fuint.business.fleet.mapper.FleetMemberMapper;
@ -125,7 +127,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
@Autowired @Autowired
private FleetMemberMapper fleetMemberMapper; private FleetMemberMapper fleetMemberMapper;
@Autowired @Autowired
private FleetLinesChangeMapper fleetLinesChangeMapper; private FleetConsumeRecordMapper fleetConsumeRecordMapper;
@Autowired @Autowired
private FleetInfoMapper fleetInfoMapper; private FleetInfoMapper fleetInfoMapper;
@ -595,7 +597,6 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
// 参数 // 参数
String orderNo = map.get("orderNo"); String orderNo = map.get("orderNo");
// 1.根据 orderNo 查询 总订单表 收银台表 会员表 油品订单表 // 1.根据 orderNo 查询 总订单表 收银台表 会员表 油品订单表
AllOrderInfo allOrder = selectAllOrderInfoByOrderNo(orderNo); AllOrderInfo allOrder = selectAllOrderInfoByOrderNo(orderNo);
CashierOrder cashierOrder = cashierOrderService.selectCashierOrder(orderNo); CashierOrder cashierOrder = cashierOrderService.selectCashierOrder(orderNo);
@ -646,7 +647,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
.eq("store_id", userBalance.getStoreId()); .eq("store_id", userBalance.getStoreId());
MtUserFuel mtUserFuel = mtUserFuelMapper.selectOne(q2); MtUserFuel mtUserFuel = mtUserFuelMapper.selectOne(q2);
QueryWrapper<CardFuelChange> q4 = Wrappers.query(); QueryWrapper<CardFuelChange> q4 = Wrappers.query();
q2.eq("order_no", userBalance.getMtUserId()); q2.eq("order_no", allOrder.getOrderNo());
CardFuelChange cardFuelChange = cardFuelChangeMapper.selectOne(q4); CardFuelChange cardFuelChange = cardFuelChangeMapper.selectOne(q4);
mtUserFuel.setFuelAmount(mtUserFuel.getFuelAmount() + cardFuelChange.getBalance()); mtUserFuel.setFuelAmount(mtUserFuel.getFuelAmount() + cardFuelChange.getBalance());
mtUserFuelMapper.updateById(mtUserFuel); mtUserFuelMapper.updateById(mtUserFuel);
@ -660,7 +661,14 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
q6.eq("id", fleetMember.getFleetId()); q6.eq("id", fleetMember.getFleetId());
FleetInfo fleetInfo = fleetInfoMapper.selectOne(q6); FleetInfo fleetInfo = fleetInfoMapper.selectOne(q6);
// 待编辑 QueryWrapper<FleetConsumeRecord> q7 = Wrappers.query();
q7.eq("order_no", allOrder.getOrderNo());
FleetConsumeRecord fleetConsumeRecord = fleetConsumeRecordMapper.selectOne(q7);
fleetMember.setRemainingCreditLimit(fleetMember.getRemainingCreditLimit() + fleetConsumeRecord.getAfterTheChange());
fleetInfo.setTotalBalance(fleetInfo.getTotalBalance() + fleetConsumeRecord.getAfterTheChange());
fleetInfoMapper.updateById(fleetInfo);
fleetMemberMapper.updateById(fleetMember);
} }
if (orderNo.equals("card_value")) { if (orderNo.equals("card_value")) {