This commit is contained in:
cun-nan 2024-10-23 11:13:47 +08:00
parent 74e06e1c11
commit 198c25ea5b
3 changed files with 218 additions and 171 deletions

View File

@ -5,14 +5,14 @@
<el-form-item label="" prop="giftName">
<el-input
v-model="queryParams.orderNumber"
placeholder="交易单号"
placeholder="请输入订单号"
clearable
style="width: 220px;"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="">
<el-select v-model="queryParams.status" style="width: 150px" placeholder="兑换状态" clearable>
<el-select v-model="queryParams.status" style="width: 150px" placeholder="请选择订单类型" clearable>
<el-option label="未支付" value="unpaid">未支付</el-option>
<el-option label="付款成功" value="paid">付款成功</el-option>
<el-option label="付款失败" value="payFail">付款失败</el-option>
@ -21,24 +21,44 @@
<el-form-item label="" prop="giftName">
<el-input
v-model="queryParams.mobile"
placeholder="手机号码"
placeholder="请输入用户手机"
clearable
style="width: 160px;"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="" prop="giftName">
<el-input
v-model="queryParams.mobile"
placeholder="请输入商品名称"
clearable
style="width: 160px;"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="">
<el-select v-model="queryParams.status" style="width: 150px" placeholder="请选择支付方式" clearable>
<el-option label="未支付" value="unpaid">未支付</el-option>
<el-option label="付款成功" value="paid">付款成功</el-option>
<el-option label="付款失败" value="payFail">付款失败</el-option>
</el-select>
</el-form-item>
<el-form-item label="">
<el-select v-model="queryParams.status" style="width: 150px" placeholder="请选择订单状态" clearable>
<el-option label="未支付" value="unpaid">未支付</el-option>
<el-option label="付款成功" value="paid">付款成功</el-option>
<el-option label="付款失败" value="payFail">付款失败</el-option>
</el-select>
</el-form-item>
<el-form-item label="">
<el-select v-model="queryParams.status" style="width: 150px" placeholder="请选择员工" clearable>
<el-option label="未支付" value="unpaid">未支付</el-option>
<el-option label="付款成功" value="paid">付款成功</el-option>
<el-option label="付款失败" value="payFail">付款失败</el-option>
</el-select>
</el-form-item>
<el-form-item label="">
<!-- <el-date-picker-->
<!-- v-model="dateRange"-->
<!-- style="width: 240px"-->
<!-- size="medium"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- type="daterange"-->
<!-- range-separator="-"-->
<!-- clearable-->
<!-- start-placeholder="开始日期"-->
<!-- end-placeholder="结束日期"-->
<!-- ></el-date-picker>-->
<el-date-picker
v-model="beginTime"
style="width: 160px"

View File

@ -3,17 +3,17 @@
<div class="app-container"> <!-- 表单查询-->
<el-card class="box-card">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px">
<el-form-item label="" prop="orderNo">
<el-input
v-model="queryParams.orderNo"
placeholder="请输入订单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="" prop="orderNo">
<el-input
v-model="queryParams.orderNo"
placeholder="请输入订单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="" prop="returnType">
<el-select
<el-select
v-model="queryParams.returnType"
clearable
placeholder="请选择类型"
@ -22,10 +22,23 @@
<el-option label="归还" value="1"></el-option>
</el-select>
</el-form-item>
<el-form-item label="" prop="staffId">
<el-select
v-model="queryParams.staffId"
clearable
placeholder="请选择员工"
@change="$forceUpdate"
>
<el-option v-for="item in staffList" :key="item.id" :label="item.realName" :value="item.id">
<span style="float: left">{{ item.realName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.mobile }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="" prop="status">
<el-select
v-model="queryParams.status"
placeholder="请选择订单状态"
placeholder="请选择状态"
clearable
>
<el-option label="未归还" value="0"></el-option>
@ -33,50 +46,31 @@
<el-option label="部分归还" value="2"></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="" prop="unitName">-->
<!-- <el-input-->
<!-- v-model="queryParams.unitName"-->
<!-- placeholder="单位名称"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="" prop="personCredit">-->
<!-- <el-input-->
<!-- v-model="queryParams.personCredit"-->
<!-- placeholder="挂账人"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="" prop="contactMobile">-->
<!-- <el-input-->
<!-- v-model="queryParams.contactMobile"-->
<!-- placeholder="请输入挂账人联系电话"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="" prop="mobile">
<el-input
v-model="queryParams.mobile"
placeholder="请输入操作人手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="" prop="unitName">-->
<!-- <el-input-->
<!-- v-model="queryParams.unitName"-->
<!-- placeholder="单位名称"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="" prop="personCredit">-->
<!-- <el-input-->
<!-- v-model="queryParams.personCredit"-->
<!-- placeholder="挂账人"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="" prop="contactMobile">-->
<!-- <el-input-->
<!-- v-model="queryParams.contactMobile"-->
<!-- placeholder="请输入挂账人联系电话"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="">
<!-- 挂账人-->
<!-- <el-date-picker-->
<!-- v-model="dateRange"-->
<!-- style="width: 400px"-->
<!-- size="medium"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- type="datetimerange"-->
<!-- range-separator="至"-->
<!-- start-placeholder="开始日期"-->
<!-- end-placeholder="结束日期"-->
<!-- ></el-date-picker>-->
<el-date-picker
v-model="beginTime"
style="width: 160px"
@ -94,7 +88,7 @@
<el-form-item style="float: right">
<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" @click = "exportExcelCashier()">导出</el-button>
<el-button type="primary" @click="exportExcelCashier()">导出</el-button>
</el-form-item>
</el-form>
@ -105,27 +99,27 @@
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="unitName" align="center" label="挂账单位"> </el-table-column>
<el-table-column prop="personCredit" align="center" label="挂账人"> </el-table-column>
<el-table-column prop="contactMobile" align="center" label="联系电话"> </el-table-column>
<el-table-column prop="returnType" align="center" label="类型">
<template slot-scope="scope">
<el-tag v-if="scope.row.returnType == 0">挂账</el-tag>
<el-tag v-else type="success">归还</el-tag>
</template>
</el-table-column>
<el-table-column prop="amount" align="center" label="挂账金额(元)"> </el-table-column>
<el-table-column prop="repaidAmount" align="center" label="已归还金额(元)"> </el-table-column>
<el-table-column prop="outstandAmount" align="center" label="未归还金额(元)"> </el-table-column>
<el-table-column prop="status" align="center" label="状态">
<el-table-column prop="unitName" align="center" label="挂账单位"></el-table-column>
<el-table-column prop="personCredit" align="center" label="挂账人"></el-table-column>
<el-table-column prop="contactMobile" align="center" label="联系电话"></el-table-column>
<el-table-column prop="returnType" align="center" label="类型">
<template slot-scope="scope">
<span v-if="scope.row.status == 0">未归还</span>
<span v-else-if="scope.row.status == 1" type="success">已归还</span>
<span v-else type="success">部分归还</span>
<div v-if="scope.row.returnType == 0">挂账</div>
<div v-else>归还</div>
</template>
</el-table-column>
<el-table-column prop="realName" align="center" label="操作人"> </el-table-column>
<el-table-column prop="amount" align="center" label="挂账金额(元)"></el-table-column>
<el-table-column prop="repaidAmount" align="center" label="已归还金额(元)"></el-table-column>
<el-table-column prop="outstandAmount" align="center" label="未归还金额(元)"></el-table-column>
<el-table-column prop="status" align="center" label="状态">
<template slot-scope="scope">
<span v-if="scope.row.status == 0" style="color: #F44522">未归还</span>
<span v-else-if="scope.row.status == 1" style="color: #0DC291">已归还</span>
<span v-else style="color: #0DC291">部分归还</span>
</template>
</el-table-column>
<el-table-column prop="realName" align="center" label="操作人"></el-table-column>
<el-table-column prop="createTime" align="center" label="操作时间" width="220">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime) || parseTime(scope.row.createTime) }}</span>
@ -138,7 +132,8 @@
size="mini"
type="text"
@click="returnRecord(scope.row.id)"
>归还详情</el-button>
>归还详情
</el-button>
</template>
</el-table-column>
</el-table>
@ -170,27 +165,27 @@
<div slot="header" class="clearfix">
<div style="position: relative;">
<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);">
<h2>单据号{{record.orderNo}}</h2>
<h2>单据号{{ record.orderNo }}</h2>
</div>
</div>
<br>
<div style="display: flex; justify-content: space-between;">
<span>操作员工</span>
<span>{{ record.realName }}</span>
<span>{{ record.realName }}</span>
</div>
</div>
<div >
<div style="display: flex; justify-content: space-between;">
<div>
<div style="display: flex; justify-content: space-between;">
<span>挂账单位</span>
<span>{{record.unitName}}</span>
<span>{{ record.unitName }}</span>
</div>
<div style="display: flex; justify-content: space-between;margin: 10px 0">
<div style="display: flex; justify-content: space-between;margin: 10px 0">
<span>挂账人</span>
<span>{{record.personCredit}}</span>
<span>{{ record.personCredit }}</span>
</div>
<div style="display: flex; justify-content: space-between;">
<div style="display: flex; justify-content: space-between;">
<span>联系电话</span>
<span>{{record.contactMobile}}</span>
<span>{{ record.contactMobile }}</span>
</div>
</div>
</el-card>
@ -205,11 +200,11 @@
<el-tag v-else type="success">归还</el-tag>
</template>
</el-table-column>
<el-table-column label="归还金额" align="center" prop="amount" />
<el-table-column label="找零金额" align="center" prop="seekZero" />
<el-table-column label="归还金额" align="center" prop="amount"/>
<el-table-column label="找零金额" align="center" prop="seekZero"/>
<el-table-column label="归还方式" align="center" prop="status">
<template slot-scope="scope">
<span>{{ getPayMeth(payList,scope.row.status) }}</span>
<span>{{ getPayMeth(payList, scope.row.status) }}</span>
</template>
</el-table-column>
<el-table-column label="支付状态" align="center" prop="payStatus">
@ -219,7 +214,7 @@
<el-tag type="danger" v-else>支付失败</el-tag>
</template>
</el-table-column>
<el-table-column label="操作人" align="center" prop="realName" />
<el-table-column label="操作人" align="center" prop="realName"/>
<el-table-column label="支付时间" align="center" prop="payTime" width="200">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.payTime) }}</span>
@ -254,48 +249,51 @@ import {
import {getDicts} from "@/api/order/data";
import {listReturnRecord} from "@/api/order/returnrecord";
import {exportExcelHangBillApi} from "@/api/order/exportExcel";
import {queryStaffs} from "@/api/order/staff";
export default {
name: "order_Cashier",
data(){
return{
data() {
return {
queryParams1: {
page: 1,
pageSize: 10,
hangBillId:"",
hangBillId: "",
},
hangBillList:[],
total:0,
total2:0,
loading:false,
queryParams:{
page:1,
pageSize:10,
returnType:"",
status:"",
unitName:"",
personCredit:"",
contactMobile:"",
mobile:"",
hangBillList: [],
total: 0,
total2: 0,
loading: false,
queryParams: {
page: 1,
pageSize: 10,
returnType: "",
status: "",
unitName: "",
personCredit: "",
contactMobile: "",
mobile: "",
},
dateRange:[],
beginTime:"",
endTime:"",
returnRecordList:[],
payList:[],
dateRange: [],
beginTime: "",
endTime: "",
returnRecordList: [],
payList: [],
//
staffList: [],
//
returnTotal:0,
returnTotal: 0,
//
allAmount:0,
allAmount: 0,
//
returnAllAmount:0,
returnAllAmount: 0,
//
noReturnAllAmount:0,
drawer:false,
noReturnAllAmount: 0,
drawer: false,
//
record:{},
record: {},
//
isSysDate:false,
isSysDate: false,
}
},
created() {
@ -304,7 +302,7 @@ export default {
start.setMinutes(0)
start.setSeconds(0)
start.setMilliseconds(0)
this.dateRange = [start,new Date()];
this.dateRange = [start, new Date()];
this.beginTime = start
this.endTime = new Date()
this.isSysDate = true
@ -316,30 +314,37 @@ export default {
exportExcelCashier() {
// this.dateRange.push(this.beginTime)
// this.dateRange.push(this.endTime)
let dateRange = []
if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString())
dateRange.push(this.endTime.toLocaleDateString())
}
exportExcelHangBillApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
this.$download.saveAs(blob,'挂账订单统计.xLsx')
})
this.$confirm('是否导出列表中的数据!', '提示', {
confirmButtonText: '导出',
cancelButtonText: '取消'
}).then(() => {
let dateRange = []
if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString())
dateRange.push(this.endTime.toLocaleDateString())
}
exportExcelHangBillApi(this.addDateRange(this.queryParams, dateRange)).then(res => {
const blob = new Blob([res], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'});
this.$download.saveAs(blob, '挂账订单统计.xLsx')
})
}).catch(() => {
});
},
//
returnRecord(id){
returnRecord(id) {
this.record = {}
this.drawer = true
hangBillInfo(id).then(response => {
this.record = response.data
})
this.getRecordList(id,1);
this.getRecordList(id, 1);
},
getRecordList(id,val){
if (val!=1){
getRecordList(id, val) {
if (val != 1) {
this.queryParams1.page = id
this.queryParams1.hangBillId = this.record.id
}else {
} else {
this.queryParams1.hangBillId = id
}
listReturnRecord(this.queryParams1).then(response => {
@ -352,12 +357,15 @@ export default {
getDicts("payment_type").then(response => {
this.payList = response.data;
})
queryStaffs().then(response => {
this.staffList = response.data;
})
},
getPayMeth(list,val){
getPayMeth(list, val) {
let name = "";
if (list!=null && list!=""){
if (list != null && list != "") {
list.forEach(item => {
if (item.dictValue == val){
if (item.dictValue == val) {
name = item.dictLabel
}
})
@ -368,8 +376,8 @@ export default {
handleClose(done) {
done();
},
getList(val){
if (val!=undefined){
getList(val) {
if (val != undefined) {
this.queryParams.page = val
}
@ -387,7 +395,7 @@ export default {
dateRange.push(this.endTime.toLocaleDateString())
}
listHangBill(this.addDateRange(this.queryParams, dateRange)).then( response => {
listHangBill(this.addDateRange(this.queryParams, dateRange)).then(response => {
this.hangBillList = response.data.records
this.total = response.data.total;
this.isSysDate = false
@ -395,7 +403,7 @@ export default {
this.getStatistic();
},
//
getStatistic(){
getStatistic() {
let dateRange = []
if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString())
@ -406,17 +414,17 @@ export default {
})
hangBillAllAmount(this.addDateRange(this.queryParams, dateRange)).then(res => {
// if (res.data) {
this.allAmount = res.data
this.allAmount = res.data
// }
})
hangBillAllReturnAmount(this.addDateRange(this.queryParams, dateRange)).then(res => {
// if (res.data) {
this.returnAllAmount = res.data
this.returnAllAmount = res.data
// }
})
hangBillAllNoReturnAmount(this.addDateRange(this.queryParams, dateRange)).then(res => {
// if (res.data) {
this.noReturnAllAmount = res.data
this.noReturnAllAmount = res.data
// }
})
},
@ -439,27 +447,31 @@ export default {
</script>
<style scoped lang="scss">
.app-top{
.app-top {
width: 100%;
height: 60px;
box-sizing: border-box;
padding: 10px;
}
.clearfix{
.clearfix {
width: 100%;
}
.box-card{
.box-card {
width: 100%;
margin-bottom: 15px;
}
.box-gang{
.box-gang {
width: 100%;
display: flex;
align-items: center;
}
.box{
.box {
//box-sizing: border-box;
padding: 5px;
//background: #f9f9f9;
@ -468,14 +480,16 @@ export default {
width: 211px;
height: 60px;
background: rgba(64,158,255,0.05);
background: rgba(64, 158, 255, 0.05);
border-radius: 6px 6px 6px 6px;
border: 1px solid #fe8c4a;
}
.el-form--inline .el-form-item {
margin-right: 44px;
}
.size-hui{
.size-hui {
display: flex;
align-items: center;
//width: 200px;
@ -487,11 +501,13 @@ export default {
text-align: left;
font-style: normal;
text-transform: none;
.nei {
width: 150px;
}
}
.size-bole{
.size-bole {
//font-weight: bold;
//width: 53px;
@ -505,7 +521,8 @@ export default {
font-style: normal;
text-transform: none;
}
.wgang{
.wgang {
width: 100%;
display: flex;
align-items: center;
@ -513,33 +530,40 @@ export default {
margin-bottom: 20px;
}
.table-box{
.table-box {
width: 100%;
height: 70vh;
overflow: auto;
}
.pagination-box{
.pagination-box {
width: 100%;
margin: 10px auto;
display: flex;
align-items: center;
justify-content: center;
align-items: end;
justify-content: end;
}
.top-app-sou{
.top-app-sou {
width: 20%;
}
.icon-img{
.icon-img {
//margin-left: 110px;
width: 100%;
height: 20px;
margin-right: 5px;
img{
img {
float: right;
//width: 100%;
width: 20px;
height: 100%;
}
}
.box1{
.box1 {
//box-sizing: border-box;
padding: 5px;
//background: #f9f9f9;
@ -549,7 +573,7 @@ export default {
width: 211px;
height: 60px;
background: rgba(255,150,85,0.05);
background: rgba(255, 150, 85, 0.05);
border-radius: 6px 6px 6px 6px;
border: 1px solid #FF9655;
}

View File

@ -30,6 +30,9 @@
<if test="hangBill.mobile != null and hangBill.mobile != ''">
and ms.mobile like concat('%', #{hangBill.mobile}, '%')
</if>
<if test="hangBill.staffId != null and hangBill.staffId != ''">
and hb.staff_id = #{hangBill.staffId}
</if>
<if test="hangBill.params.beginTime != null and hangBill.params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(hb.create_time,'%y%m%d') &gt;= date_format(#{hangBill.params.beginTime},'%y%m%d')
</if>