655 lines
20 KiB
Vue
655 lines
20 KiB
Vue
<!-- 收银台订单-->
|
|
<template>
|
|
<div class="container">
|
|
<div class="new-top">
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="120px">
|
|
<el-form-item label="">
|
|
<el-input style="width: 215px;" v-model="queryParams.orderNo" placeholder="请输入订单号"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="" prop="payChannel">
|
|
<el-select
|
|
v-model="queryParams.type"
|
|
clearable
|
|
placeholder="请选择订单类型啊"
|
|
>
|
|
<el-option label="小程序" value="applet"/>
|
|
<el-option label="收银台" value="cashier"/>
|
|
<el-option label="POS端" value="POS"/>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item label="" prop="payChannel">
|
|
<el-select
|
|
v-model="queryParams.payChannel"
|
|
clearable
|
|
placeholder="请选择订单分类"
|
|
>
|
|
<el-option label="油品" value="1"/>
|
|
<el-option label="商品" value="2"/>
|
|
<el-option label="储值卡" value="3"/>
|
|
<el-option label="积分" value="4"/>
|
|
<el-option label="囤油卡" value="5"/>
|
|
<el-option label="收银台订单" value="6"/>
|
|
<el-option label="挂账订单" value="7"/>
|
|
<el-option label="pos" value="8"/>
|
|
</el-select>
|
|
</el-form-item>
|
|
|
|
<!-- <el-form-item label="" prop="payType">-->
|
|
<!-- <el-select-->
|
|
<!-- v-model="queryParams.payType"-->
|
|
<!-- clearable-->
|
|
<!-- placeholder="请选择支付方式"-->
|
|
<!-- >-->
|
|
<!-- <el-option label="现金" value="CASH"/>-->
|
|
<!-- <el-option label="微信" value="WECHAT"/>-->
|
|
<!-- <el-option label="支付宝" value="ALIPAY"/>-->
|
|
<!-- <el-option label="余额" value="balance"/>-->
|
|
<!-- </el-select>-->
|
|
<!-- </el-form-item>-->
|
|
<el-form-item label="" prop="payType">
|
|
<el-select v-model="queryParams.payType" placeholder="请选择支付方式" clearable>
|
|
<el-option
|
|
v-for="dicts in this.dictPayType"
|
|
:key="dicts.dictValue"
|
|
:label="dicts.dictLabel"
|
|
:value="dicts.dictValue"
|
|
/>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item label="" prop="status">
|
|
<el-select
|
|
v-model="queryParams.status"
|
|
clearable
|
|
placeholder="请选择订单状态"
|
|
>
|
|
<el-option label="已支付" value="paid"/>
|
|
<el-option label="未支付" value="unpaid"/>
|
|
<el-option label="已退款" value="refund"/>
|
|
</el-select>
|
|
</el-form-item>
|
|
<!-- <el-form-item label="" prop="payType">-->
|
|
<!-- <el-select-->
|
|
<!-- v-model="queryParams.payChannel"-->
|
|
<!-- clearable-->
|
|
<!-- placeholder="请选择支付渠道"-->
|
|
<!-- >-->
|
|
<!-- <el-option label="小程序" value="applet"/>-->
|
|
<!-- <el-option label="收银台" value="cashier"/>-->
|
|
<!-- <el-option label="POS端" value="POS"/>-->
|
|
<!-- </el-select>-->
|
|
<!-- </el-form-item>-->
|
|
<el-form-item label="" prop="paymentChannel">
|
|
<el-select v-model="queryParams.paymentChannel" placeholder="请选择支付通道" clearable>
|
|
<el-option
|
|
v-for="dicts in this.dict"
|
|
:key="dicts.dictValue"
|
|
:label="dicts.dictLabel"
|
|
:value="dicts.dictValue"
|
|
/>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item label="" style="margin-right: 0px" prop="status">
|
|
<el-select
|
|
v-model="queryParams.status"
|
|
clearable
|
|
placeholder="请选择员工"
|
|
>
|
|
<el-option label="已支付" value="paid"/>
|
|
<el-option label="未支付" value="unpaid"/>
|
|
<el-option label="已退款" value="refund"/>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item label="" prop="status">
|
|
<el-input v-model="queryParams.userId" placeholder="请输入付款用户"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="">
|
|
<el-date-picker
|
|
v-model="beginTime"
|
|
style="width: 140px"
|
|
type="date"
|
|
placeholder="交易开始日期">
|
|
</el-date-picker>
|
|
至
|
|
<el-date-picker
|
|
v-model="endTime"
|
|
style="width: 140px"
|
|
type="date"
|
|
placeholder="交易结束日期">
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
<el-form-item style="float: right; margin-right: 0px ">
|
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
|
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
|
<el-button type="primary">导出</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
</div>
|
|
<div class="wit_box">
|
|
<div class="box-gang">
|
|
<div class="box">
|
|
<el-tooltip class="item" effect="dark" placement="top-start">
|
|
<div class="size-bole">{{ map.s1 || 0 }}/{{ map.s2 || 0 }}</div>
|
|
</el-tooltip>
|
|
<div class="size-hui">
|
|
<div class="dian" style="background: #0DC291"></div>
|
|
<div class="nei">微信收款(元)/笔数</div>
|
|
</div>
|
|
</div>
|
|
<div class="box">
|
|
<el-tooltip class="item" effect="dark" placement="top-start">
|
|
<div class="size-bole" style="color:#00CAFF;">{{ map.s3 || 0 }}/{{ map.s4 || 0 }}</div>
|
|
</el-tooltip>
|
|
|
|
<div class="size-hui">
|
|
<div class="dian" style="background: #00CAFF"></div>
|
|
<div class="nei">支付宝收款(元)/笔数</div>
|
|
</div>
|
|
</div>
|
|
<div class="box">
|
|
<el-tooltip class="item" effect="dark" placement="top-start">
|
|
<div class="size-bole" style="color:#F44522;">{{ map.s5 || 0 }}/{{ map.s6 || 0 }}</div>
|
|
</el-tooltip>
|
|
|
|
<div class="size-hui">
|
|
<div class="dian" style="background: #F44522"></div>
|
|
<div class="nei">银联二维码(元)/笔数</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="box">
|
|
<el-tooltip class="item" effect="dark" content="999999/999999999999" placement="top-start">
|
|
<div class="size-bole" style="color:#0D2ED8;">{{ map.s7 || 0 }}/{{ map.s8 || 0 }}</div>
|
|
</el-tooltip>
|
|
|
|
|
|
<div class="size-hui">
|
|
<div class="dian" style="background: #0D2ED8"></div>
|
|
<div class="nei">现金收款(元)/笔数</div>
|
|
</div>
|
|
</div>
|
|
<div class="box">
|
|
<el-tooltip class="item" effect="dark" placement="top-start">
|
|
<div class="size-bole" style="color:#790DD8;">{{ map.s9 || 0 }}/{{ map.s10 || 0 }} </div>
|
|
</el-tooltip>
|
|
|
|
<div class="size-hui">
|
|
<div class="dian" style="background: #790DD8"></div>
|
|
<div class="nei">会员消费(元)/笔数</div>
|
|
</div>
|
|
</div>
|
|
<div class="box">
|
|
<el-tooltip class="item" effect="dark" placement="top-start">
|
|
<div class="size-bole" style="color:#D80D54;">{{ map.s11 || 0 }}/{{ map.s12 || 0 }}</div>
|
|
</el-tooltip>
|
|
|
|
<div class="size-hui">
|
|
<div class="dian" style="background: #D80D54"></div>
|
|
<div class="nei">挂帐收款(元)/笔数</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="table-box" style="margin-top: 15px">
|
|
<el-table
|
|
:data="orderList"
|
|
border
|
|
style="width: 100%">
|
|
<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="payChannel" align="center" label="订单类型">
|
|
<template slot-scope="scope">
|
|
<span v-if="scope.row.payChannel=='cashier'">收银台</span>
|
|
<span v-else-if="scope.row.payChannel=='POS'">POS机</span>
|
|
<span v-else-if="scope.row.payChannel=='PC'">平台</span>
|
|
<span v-else-if="scope.row.payChannel=='applet'">小程序</span>
|
|
<span v-else>其他</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="type" align="center" label="订单分类">
|
|
<template slot-scope="scope">
|
|
<span v-if="scope.row.type=='1'">油品订单</span>
|
|
<span v-else-if="scope.row.type=='2'">商品订单</span>
|
|
<span v-else-if="scope.row.type=='3'">储值卡订单</span>
|
|
<span v-else-if="scope.row.type=='4'">积分商城订单</span>
|
|
<span v-else-if="scope.row.type=='5'">囤油卡订单</span>
|
|
<span v-else-if="scope.row.type=='6'">收银台订单</span>
|
|
<span v-else-if="scope.row.type=='7'">挂账订单</span>
|
|
<span v-else-if="scope.row.type=='8'">POS订单</span>
|
|
<span v-else>其他</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="goodsMoney" align="center" label="订单金额(元)">
|
|
</el-table-column>
|
|
<el-table-column prop="discountAmount" 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="归还金额(元)">
|
|
<template slot-scope="scope">
|
|
<span v-if="scope.row.type == 7">{{ scope.row.goodsMoney}}</span>
|
|
<span v-else> -- </span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="userName" align="center" label="付款用户"></el-table-column>
|
|
<el-table-column prop="payType" align="center" label="支付方式">
|
|
<template slot-scope="scope">
|
|
<span v-if="scope.row.payType=='CASH'">现金</span>
|
|
<span v-else-if="scope.row.payType=='WECHAT'">微信</span>
|
|
<span v-else-if="scope.row.payType=='ALIPAY'">支付宝</span>
|
|
<span v-else="">余额</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="status" align="center" label="订单状态">
|
|
<template slot-scope="scope">
|
|
<div v-if="scope.row.status == 'unpaid'" style="color: #F44522">未支付</div>
|
|
<div v-else-if="scope.row.status == 'paid'" style="color: #0DC291">已支付</div>
|
|
<div v-else-if="scope.row.status == 'refund'" style="color: #F44522">已退款</div>
|
|
<div v-else style="color: #F44522">支付失败</div>
|
|
</template>
|
|
</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="createBy" align="center" label="关联员工"></el-table-column>
|
|
|
|
<el-table-column prop="createTime" align="center" label="订单创建时间" width="220"></el-table-column>
|
|
<el-table-column prop="updateTime" align="center" label="订单完成时间" width="220"></el-table-column>
|
|
</el-table>
|
|
</div>
|
|
<pagination
|
|
v-show="total>0"
|
|
:total="total"
|
|
:page.sync="queryParams.page"
|
|
:limit.sync="queryParams.pageSize"
|
|
@pagination="getDeptList"
|
|
/>
|
|
</div>
|
|
<el-dialog
|
|
title="订单信息"
|
|
:visible.sync="dialogVisible">
|
|
<el-descriptions :title="'订单号:'+ordersInfo.orderNo">
|
|
<el-descriptions-item label="门店">{{ ordersInfo.storeName }}</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.mchntCd }}</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.amount }}</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.status }}</el-descriptions-item>
|
|
<el-descriptions-item label="备注">{{ ordersInfo.content }}</el-descriptions-item>
|
|
</el-descriptions>
|
|
<el-descriptions class="margin-top" title="金额详情" :column="3" border>
|
|
<el-descriptions-item>
|
|
<template slot="label">
|
|
订单金额
|
|
</template>
|
|
{{ ordersInfo.goodsMoney ? ordersInfo.goodsMoney : "--" }}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label">
|
|
优惠后应付金额
|
|
</template>
|
|
{{ ordersInfo.payMoney ? ordersInfo.payMoney : "--" }}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label">
|
|
退款金额
|
|
</template>
|
|
{{ ordersInfo.refMoney ? ordersInfo.refMoney : "--" }}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item>
|
|
<template slot="label">
|
|
实收金额
|
|
</template>
|
|
{{ ordersInfo.payMoney ? ordersInfo.payMoney : "--" }}
|
|
</el-descriptions-item>
|
|
</el-descriptions>
|
|
|
|
|
|
</el-dialog>
|
|
|
|
</div>
|
|
</template>
|
|
<script>
|
|
|
|
import {
|
|
exportExcelTradingApi,
|
|
orderStatistics,
|
|
transactionList,
|
|
getDicts
|
|
} from "@/api/allOrder";
|
|
import {getStaffByStorId} from "../../../../api/allOrder";
|
|
|
|
export default {
|
|
name: "reconciliation-trading",
|
|
data() {
|
|
return {
|
|
dict:{},
|
|
dictPayType:{},
|
|
map:{},
|
|
radio1: "油号选错",
|
|
loading: false,
|
|
dialogVisible: false,
|
|
// 员工列表
|
|
staffList: [],
|
|
ordersInfo: {},
|
|
// 日期范围
|
|
dateRange: [],
|
|
beginTime: "",
|
|
endTime: "",
|
|
// 是否为当天时间
|
|
isSysDate: false,
|
|
// 收银台订单列表
|
|
orderList: [],
|
|
deptList: [],
|
|
|
|
// 查询参数
|
|
queryParams: {
|
|
page: 1,
|
|
pageSize: 10,
|
|
beginTime: "",
|
|
endTime: "",
|
|
orderNo: "",
|
|
status: "",
|
|
payType: "",
|
|
payChannel: "",
|
|
deptType: "3",
|
|
storeId: "",
|
|
deptId: "",
|
|
},
|
|
orderStatistics: {
|
|
CASH: "0",
|
|
WECHAT: "0",
|
|
ALIPAY: "0",
|
|
balance: "0",
|
|
CASHCount: "0",
|
|
WECHATCount: "0",
|
|
ALIPAYCount: "0",
|
|
balanceCount: "0",
|
|
refBalance: "0",
|
|
refBalanceCount: "0",
|
|
},
|
|
total: 0,
|
|
}
|
|
},
|
|
async created() {
|
|
let start = new Date();
|
|
start.setHours(0)
|
|
start.setMinutes(0)
|
|
start.setSeconds(0)
|
|
start.setMilliseconds(0)
|
|
this.dateRange = [start, new Date()];
|
|
this.beginTime = start
|
|
this.endTime = new Date()
|
|
this.isSysDate = true
|
|
await this.getDeptList();
|
|
|
|
// this.getList();
|
|
|
|
},
|
|
methods: {
|
|
|
|
async getDeptList() {
|
|
this.getList()
|
|
this.getDicts()
|
|
this.getStaffByStorId()
|
|
},
|
|
exportExcelCashier() {
|
|
let dateRange = []
|
|
if (this.beginTime && this.endTime) {
|
|
dateRange.push(this.beginTime.toLocaleDateString())
|
|
dateRange.push(this.endTime.toLocaleDateString())
|
|
}
|
|
exportExcelTradingApi(this.addDateRange(this.queryParams, dateRange)).then(res => {
|
|
const blob = new Blob([res], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'});
|
|
this.$download.saveAs(blob, '交易明细统计.xLsx')
|
|
})
|
|
},
|
|
// 获取订单统计信息
|
|
|
|
async getOrderStatistics() {
|
|
let dateRange = []
|
|
if (this.beginTime && this.endTime) {
|
|
dateRange.push(this.beginTime.toLocaleDateString())
|
|
dateRange.push(this.endTime.toLocaleDateString())
|
|
}
|
|
orderStatistics(this.addDateRange(this.queryParams, dateRange)).then(res => {
|
|
this.map = res.data
|
|
})
|
|
},
|
|
|
|
// 获取数据列表
|
|
async getList(val) {
|
|
let dateRange = []
|
|
if (this.beginTime && this.endTime) {
|
|
dateRange.push(this.beginTime.toLocaleDateString())
|
|
dateRange.push(this.endTime.toLocaleDateString())
|
|
}
|
|
transactionList(this.addDateRange(this.queryParams, dateRange)).then(response => {
|
|
this.orderList = response.data.records;
|
|
this.total = response.data.total;
|
|
this.isSysDate = false
|
|
this.getOrderStatistics()
|
|
|
|
})
|
|
},
|
|
|
|
|
|
// 获取字典
|
|
async getDicts() {
|
|
getDicts("payment_channel").then(response => {
|
|
this.dict = response.data;
|
|
})
|
|
getDicts("payment_type").then(response => {
|
|
this.dictPayType = response.data;
|
|
})
|
|
},
|
|
|
|
// 获取字典
|
|
async getStaffByStorId() {
|
|
getStaffByStorId().then(response => {
|
|
this.staffList = response.data;
|
|
})
|
|
},
|
|
getOrdersInfo(data) {
|
|
this.dialogVisible = true;
|
|
this.ordersInfo = data
|
|
},
|
|
// 搜索按钮操作
|
|
handleQuery() {
|
|
this.queryParams.page = 1;
|
|
this.getDeptList()
|
|
|
|
// this.getList();
|
|
},
|
|
// 重置按钮操作
|
|
resetQuery() {
|
|
this.dateRange = [];
|
|
this.queryParams = {
|
|
page: 1,
|
|
pageSize: 10,
|
|
deptType: "3",
|
|
}
|
|
this.beginTime = ""
|
|
this.endTime = ""
|
|
this.getDeptList()
|
|
|
|
this.handleQuery();
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
.container {
|
|
background: #f4f5f9;
|
|
box-sizing: border-box;
|
|
padding-bottom: 8px;
|
|
//height: 87.5vh;
|
|
}
|
|
|
|
.app-top {
|
|
width: 100%;
|
|
|
|
height: 60px;
|
|
box-sizing: border-box;
|
|
padding: 10px;
|
|
}
|
|
|
|
.clearfix {
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
.box-card {
|
|
width: 100%;
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
.box-gang {
|
|
width: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.box {
|
|
//box-sizing: border-box;
|
|
padding: 5px;
|
|
//background: #f9f9f9;
|
|
padding-left: 20px;
|
|
|
|
width: 211px;
|
|
height: 60px;
|
|
background: #fff;
|
|
border-radius: 10px;
|
|
border: 1px solid #FF9655;
|
|
|
|
}
|
|
|
|
.size-hui {
|
|
display: flex;
|
|
align-items: center;
|
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
font-weight: 400;
|
|
font-size: 13px;
|
|
color: #888888;
|
|
text-align: left;
|
|
font-style: normal;
|
|
text-transform: none;
|
|
|
|
.nei {
|
|
color: #333333;
|
|
width: 150px;
|
|
}
|
|
}
|
|
|
|
.dian {
|
|
width: 6px;
|
|
height: 6px;
|
|
border-radius: 50%;
|
|
margin-right: 5px;
|
|
}
|
|
|
|
.el-form--inline .el-form-item {
|
|
margin-bottom: 15px;
|
|
margin-right: 21px;
|
|
}
|
|
|
|
.icon-img {
|
|
|
|
//margin-left: 110px;
|
|
width: 100%;
|
|
height: 20px;
|
|
margin-right: 5px;
|
|
|
|
img {
|
|
float: right;
|
|
//width: 100%;
|
|
width: 20px;
|
|
|
|
height: 100%;
|
|
}
|
|
}
|
|
|
|
.f-button {
|
|
width: 100%;
|
|
float: right;
|
|
text-align: right;
|
|
}
|
|
|
|
.size-bole {
|
|
//font-weight: bold;
|
|
|
|
//width: 53px;
|
|
height: 31px;
|
|
//font-family: YouSheBiaoTiHei;
|
|
font-size: 24px;
|
|
color: #0DC291;
|
|
font-weight: 600;
|
|
font-size: 24px;
|
|
//line-height: 0px;
|
|
text-align: left;
|
|
font-style: normal;
|
|
text-transform: none;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.wgang {
|
|
width: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: 20px;
|
|
|
|
}
|
|
|
|
.table-box {
|
|
width: 100%;
|
|
height: 58vh;
|
|
overflow: auto;
|
|
}
|
|
|
|
.pagination-box {
|
|
width: 100%;
|
|
margin: 10px auto;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.top-app-sou {
|
|
width: 20%;
|
|
}
|
|
|
|
.tk {
|
|
text-align: center;
|
|
color: grey;
|
|
margin: 10px 0;
|
|
}
|
|
|
|
.new-top {
|
|
width: 98%;
|
|
background: #FFFFFF;
|
|
margin: 15px auto;
|
|
height: 115px;
|
|
box-sizing: border-box;
|
|
padding: 15px;
|
|
border-radius: 4px;
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.wit_box {
|
|
width: 98%;
|
|
background: #FFFFFF;
|
|
margin: 5px auto;
|
|
box-sizing: border-box;
|
|
padding: 15px;
|
|
border-radius: 4px;
|
|
height: 74vh;
|
|
}
|
|
|
|
</style>
|