bug
This commit is contained in:
parent
857f954c2c
commit
bf998c65b6
@ -58,16 +58,29 @@
|
||||
/>
|
||||
</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="dateRange"
|
||||
style="width: 400px"
|
||||
size="medium"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
v-model="beginTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="开始日期">
|
||||
</el-date-picker>
|
||||
至
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">查询</el-button>
|
||||
@ -116,30 +129,31 @@
|
||||
<el-table
|
||||
:data="hangBillList"
|
||||
style="width: 100%">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="props">
|
||||
<el-form label-position="left" style="margin-left: 20px" inline class="demo-table-expand">
|
||||
<el-form-item label="操作人手机号">
|
||||
<span>{{ props.row.mobile }}</span>
|
||||
</el-form-item><br/>
|
||||
<el-form-item label="更新时间">
|
||||
<span>{{ props.row.updateTime ? props.row.updateTime:"--" }}</span>
|
||||
</el-form-item><br/>
|
||||
<el-form-item label="单据备注">
|
||||
<span>{{ props.row.remark ? props.row.remark:"--" }}</span>
|
||||
</el-form-item><br/>
|
||||
<el-form-item label="单据金额">
|
||||
<span>{{ props.row.amount ? props.row.amount:"0" }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="已还金额">
|
||||
<span>{{ props.row.repaidAmount ? props.row.repaidAmount:"0" }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="未还金额">
|
||||
<span>{{ props.row.outstandAmount ? props.row.outstandAmount:"0" }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column type="expand">-->
|
||||
<!-- <template slot-scope="props">-->
|
||||
<!-- <el-form label-position="left" style="margin-left: 20px" inline class="demo-table-expand">-->
|
||||
<!-- <el-form-item label="操作人手机号">-->
|
||||
<!-- <span>{{ props.row.mobile }}</span>-->
|
||||
<!-- </el-form-item><br/>-->
|
||||
<!-- <el-form-item label="更新时间">-->
|
||||
<!-- <span>{{ props.row.updateTime ? props.row.updateTime:"--" }}</span>-->
|
||||
<!-- </el-form-item><br/>-->
|
||||
<!-- <el-form-item label="单据备注">-->
|
||||
<!-- <span>{{ props.row.remark ? props.row.remark:"--" }}</span>-->
|
||||
<!-- </el-form-item><br/>-->
|
||||
<!-- <el-form-item label="单据金额">-->
|
||||
<!-- <span>{{ props.row.amount ? props.row.amount:"0" }}</span>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="已还金额">-->
|
||||
<!-- <span>{{ props.row.repaidAmount ? props.row.repaidAmount:"0" }}</span>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="未还金额">-->
|
||||
<!-- <span>{{ props.row.outstandAmount ? props.row.outstandAmount:"0" }}</span>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<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 align="center" label="挂账单位">
|
||||
<el-table-column prop="unitName" align="center" label="单位名称"> </el-table-column>
|
||||
@ -317,6 +331,8 @@ export default {
|
||||
mobile:"",
|
||||
},
|
||||
dateRange:[],
|
||||
beginTime:"",
|
||||
endTime:"",
|
||||
returnRecordList:[],
|
||||
payList:[],
|
||||
// 归还账单总数
|
||||
@ -341,6 +357,8 @@ export default {
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.dateRange = [start,new Date()];
|
||||
this.beginTime = start
|
||||
this.endTime = new Date()
|
||||
this.isSysDate = true
|
||||
this.getList()
|
||||
this.getPayList()
|
||||
@ -395,12 +413,17 @@ export default {
|
||||
}
|
||||
|
||||
let dateRange1 = this.dateRange
|
||||
// let dateRange = []
|
||||
// if (this.isSysDate){
|
||||
// dateRange.push(dateRange1[0].toLocaleDateString())
|
||||
// dateRange.push(dateRange1[1].toLocaleDateString())
|
||||
// }else {
|
||||
// dateRange = this.dateRange
|
||||
// }
|
||||
let dateRange = []
|
||||
if (this.isSysDate){
|
||||
dateRange.push(dateRange1[0].toLocaleDateString())
|
||||
dateRange.push(dateRange1[1].toLocaleDateString())
|
||||
}else {
|
||||
dateRange = this.dateRange
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
|
||||
listHangBill(this.addDateRange(this.queryParams, dateRange)).then( response => {
|
||||
@ -412,20 +435,25 @@ export default {
|
||||
},
|
||||
// 获取挂账统计信息
|
||||
getStatistic(){
|
||||
hangBillReturnTotal(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
|
||||
let dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
hangBillReturnTotal(this.addDateRange(this.queryParams, dateRange)).then(res => {
|
||||
this.returnTotal = res.data
|
||||
})
|
||||
hangBillAllAmount(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
|
||||
hangBillAllAmount(this.addDateRange(this.queryParams, dateRange)).then(res => {
|
||||
if (res.data) {
|
||||
this.allAmount = res.data
|
||||
}
|
||||
})
|
||||
hangBillAllReturnAmount(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
|
||||
hangBillAllReturnAmount(this.addDateRange(this.queryParams, dateRange)).then(res => {
|
||||
if (res.data) {
|
||||
this.returnAllAmount = res.data
|
||||
}
|
||||
})
|
||||
hangBillAllNoReturnAmount(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
|
||||
hangBillAllNoReturnAmount(this.addDateRange(this.queryParams, dateRange)).then(res => {
|
||||
if (res.data) {
|
||||
this.noReturnAllAmount = res.data
|
||||
}
|
||||
@ -440,6 +468,8 @@ export default {
|
||||
resetQuery() {
|
||||
this.dateRange = [];
|
||||
this.queryParams.page = 1;
|
||||
this.beginTime = ""
|
||||
this.endTime = ""
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
|
@ -19,16 +19,29 @@
|
||||
<el-input v-model="queryParams.orderNo" clearable placeholder="订单号检索"></el-input>
|
||||
</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="dateRange"
|
||||
style="width: 400px"
|
||||
size="medium"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期" @change="lookTime"
|
||||
></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>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
@ -371,6 +384,8 @@ import {refundApi} from "@/api/order/refund";
|
||||
staffList:[],
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
beginTime:"",
|
||||
endTime:"",
|
||||
// 收银台订单列表
|
||||
orderList:[],
|
||||
// 查询参数
|
||||
@ -397,6 +412,8 @@ import {refundApi} from "@/api/order/refund";
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.dateRange = [start,new Date()];
|
||||
this.beginTime = start
|
||||
this.endTime = new Date()
|
||||
this.isSysDate = true
|
||||
this.getList();
|
||||
this.getOrderStatistics();
|
||||
@ -404,7 +421,12 @@ import {refundApi} from "@/api/order/refund";
|
||||
},
|
||||
methods:{
|
||||
exportExcelCashier() {
|
||||
exportExcelCashierApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
let dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
exportExcelCashierApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
|
||||
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
||||
this.$download.saveAs(blob,'收银台订单统计.xLsx')
|
||||
})
|
||||
@ -412,7 +434,12 @@ import {refundApi} from "@/api/order/refund";
|
||||
// 获取订单统计信息
|
||||
|
||||
getOrderStatistics() {
|
||||
orderStatisticsApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
let dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
orderStatisticsApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
|
||||
this.orderStatistics = res.data
|
||||
})
|
||||
},
|
||||
@ -535,12 +562,18 @@ import {refundApi} from "@/api/order/refund";
|
||||
}
|
||||
|
||||
let dateRange1 = this.dateRange
|
||||
// let dateRange = []
|
||||
// if (this.isSysDate){
|
||||
// dateRange.push(dateRange1[0].toLocaleDateString())
|
||||
// dateRange.push(dateRange1[1].toLocaleDateString())
|
||||
// }else {
|
||||
// dateRange = this.dateRange
|
||||
// }
|
||||
|
||||
let dateRange = []
|
||||
if (this.isSysDate){
|
||||
dateRange.push(dateRange1[0].toLocaleDateString())
|
||||
dateRange.push(dateRange1[1].toLocaleDateString())
|
||||
}else {
|
||||
dateRange = this.dateRange
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
|
||||
listCashierOrder(this.addDateRange(this.queryParams, dateRange)).then( response => {
|
||||
@ -554,7 +587,12 @@ import {refundApi} from "@/api/order/refund";
|
||||
if (val!=undefined){
|
||||
this.queryParams.page = val
|
||||
}
|
||||
cashierOrderSeekZeroAmount(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
||||
let dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
cashierOrderSeekZeroAmount(this.addDateRange(this.queryParams, dateRange)).then( response => {
|
||||
if (response.data) {
|
||||
this.seekZeroAmount = response.data
|
||||
}
|
||||
@ -573,6 +611,7 @@ import {refundApi} from "@/api/order/refund";
|
||||
handleQuery() {
|
||||
this.queryParams.page = 1;
|
||||
this.getList();
|
||||
this.getOrderStatistics();
|
||||
},
|
||||
// 重置按钮操作
|
||||
resetQuery() {
|
||||
@ -581,6 +620,8 @@ import {refundApi} from "@/api/order/refund";
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
this.beginTime = ""
|
||||
this.endTime = ""
|
||||
// this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="box-card">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="85px">
|
||||
<el-form-item label="交易员工" prop="staffId">
|
||||
<el-select
|
||||
v-model="queryParams.staffId"
|
||||
@ -47,16 +47,29 @@
|
||||
/>
|
||||
</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="dateRange"
|
||||
style="width: 400px"
|
||||
size="medium"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
v-model="beginTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="开始日期">
|
||||
</el-date-picker>
|
||||
至
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">查询</el-button>
|
||||
@ -245,6 +258,8 @@ export default {
|
||||
staffList:[],
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
beginTime:"",
|
||||
endTime:"",
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
loadingRes: true,
|
||||
@ -296,6 +311,8 @@ export default {
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.dateRange = [start,new Date()];
|
||||
this.beginTime = start
|
||||
this.endTime = new Date()
|
||||
this.isSysDate = true
|
||||
this.getList();
|
||||
this.getOrderStatistics();
|
||||
@ -304,14 +321,24 @@ export default {
|
||||
},
|
||||
methods:{
|
||||
exportExcelGoodsOrder() {
|
||||
exportExcelGoodsOrderApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
let dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
exportExcelGoodsOrderApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
|
||||
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
||||
this.$download.saveAs(blob,'商品订单统计.xLsx')
|
||||
})
|
||||
},
|
||||
// 订单统计
|
||||
getOrderStatistics (){
|
||||
orderStatisticsApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
let dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
orderStatisticsApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
|
||||
this.orderStatistics = res.data;
|
||||
|
||||
})
|
||||
@ -448,12 +475,17 @@ export default {
|
||||
}
|
||||
|
||||
let dateRange1 = this.dateRange
|
||||
// let dateRange = []
|
||||
// if (this.isSysDate){
|
||||
// dateRange.push(dateRange1[0].toLocaleDateString())
|
||||
// dateRange.push(dateRange1[1].toLocaleDateString())
|
||||
// }else {
|
||||
// dateRange = this.dateRange
|
||||
// }
|
||||
let dateRange = []
|
||||
if (this.isSysDate){
|
||||
dateRange.push(dateRange1[0].toLocaleDateString())
|
||||
dateRange.push(dateRange1[1].toLocaleDateString())
|
||||
}else {
|
||||
dateRange = this.dateRange
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
@ -494,6 +526,8 @@ export default {
|
||||
this.queryParams.orderSn = '';
|
||||
this.queryParams.storeIds = '';
|
||||
this.storeIds = [];
|
||||
this.beginTime = ""
|
||||
this.endTime = ""
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
|
@ -69,16 +69,29 @@
|
||||
<el-input v-model="queryParams.orderNo" clearable placeholder="订单号、官方单号检索"></el-input>
|
||||
</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="dateRange"
|
||||
style="width: 400px"
|
||||
size="medium"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></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>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
@ -319,6 +332,7 @@
|
||||
import {exportExcelOilOrderApi} from "@/api/order/exportExcel";
|
||||
import {getOilNumberGun} from "@/api/oilConfig/oilGuns";
|
||||
import {getOrderInfoApi, refundApi} from "@/api/order/refund";
|
||||
import {getLodop} from "@/api/LodopFuncs";
|
||||
|
||||
export default {
|
||||
name: "order_Oil",
|
||||
@ -343,6 +357,8 @@
|
||||
oilNumList:[],
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
beginTime:"",
|
||||
endTime:"",
|
||||
// 油品订单列表
|
||||
oilOrderList:[],
|
||||
payTypeList:[],
|
||||
@ -378,6 +394,8 @@
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.dateRange = [start,new Date()];
|
||||
this.beginTime = start
|
||||
this.endTime = new Date()
|
||||
this.isSysDate = true
|
||||
this.getStaffList();
|
||||
this.getOrderStatistics();
|
||||
@ -468,7 +486,12 @@
|
||||
|
||||
},
|
||||
exportExcelOilOrder() {
|
||||
exportExcelOilOrderApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
let dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
exportExcelOilOrderApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
|
||||
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
||||
this.$download.saveAs(blob,'油品订单统计.xLsx')
|
||||
})
|
||||
@ -615,12 +638,17 @@
|
||||
}
|
||||
|
||||
let dateRange1 = this.dateRange
|
||||
// let dateRange = []
|
||||
// if (this.isSysDate){
|
||||
// dateRange.push(dateRange1[0].toLocaleDateString())
|
||||
// dateRange.push(dateRange1[1].toLocaleDateString())
|
||||
// }else {
|
||||
// dateRange = this.dateRange
|
||||
// }
|
||||
let dateRange = []
|
||||
if (this.isSysDate){
|
||||
dateRange.push(dateRange1[0].toLocaleDateString())
|
||||
dateRange.push(dateRange1[1].toLocaleDateString())
|
||||
}else {
|
||||
dateRange = this.dateRange
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
|
||||
listOilOrder(this.addDateRange(this.queryParams, dateRange)).then( response => {
|
||||
@ -642,6 +670,8 @@
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
this.beginTime = ""
|
||||
this.endTime = ""
|
||||
// this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
|
@ -45,16 +45,29 @@
|
||||
<el-input v-model="queryParams.mobile" placeholder="请输入会员手机号"></el-input>
|
||||
</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="dateRange"
|
||||
style="width: 400px"
|
||||
size="medium"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
v-model="beginTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="开始日期">
|
||||
</el-date-picker>
|
||||
至
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
@ -273,6 +286,8 @@ export default {
|
||||
staffList:[],
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
beginTime:"",
|
||||
endTime:"",
|
||||
oilOrder:{},
|
||||
// 退款密码
|
||||
password:"",
|
||||
@ -315,6 +330,8 @@ export default {
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.dateRange = [start,new Date()];
|
||||
this.beginTime = start
|
||||
this.endTime = new Date()
|
||||
this.isSysDate = true
|
||||
this.getList();
|
||||
this.getPayList();
|
||||
@ -409,6 +426,8 @@ export default {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
this.beginTime = ""
|
||||
this.endTime = ""
|
||||
// this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
@ -419,12 +438,17 @@ export default {
|
||||
}
|
||||
|
||||
let dateRange1 = this.dateRange
|
||||
// let dateRange = []
|
||||
// if (this.isSysDate){
|
||||
// dateRange.push(dateRange1[0].toLocaleDateString())
|
||||
// dateRange.push(dateRange1[1].toLocaleDateString())
|
||||
// }else {
|
||||
// dateRange = this.dateRange
|
||||
// }
|
||||
let dateRange = []
|
||||
if (this.isSysDate){
|
||||
dateRange.push(dateRange1[0].toLocaleDateString())
|
||||
dateRange.push(dateRange1[1].toLocaleDateString())
|
||||
}else {
|
||||
dateRange = this.dateRange
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
|
||||
listCardValueRecords(this.addDateRange(this.queryParams, dateRange)).then( response => {
|
||||
|
@ -119,8 +119,20 @@ public interface LJUserService extends IService<LJUser> {
|
||||
*/
|
||||
public int insertUser(LJUserVo user);
|
||||
|
||||
/**
|
||||
* 添加用户信息
|
||||
* @param user
|
||||
* @return
|
||||
*/
|
||||
int addUser(LJUser user);
|
||||
|
||||
/**
|
||||
* 修改用户信息
|
||||
* @param user
|
||||
* @return
|
||||
*/
|
||||
int editUserById(LJUser user);
|
||||
|
||||
/**
|
||||
* 修改会员信息
|
||||
* @param user
|
||||
|
@ -428,6 +428,47 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
||||
return row;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int editUserById(LJUser user) {
|
||||
// 生成会员号
|
||||
if (StringUtils.isEmpty(user.getUserNo())){
|
||||
Random random = new Random();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < 7; i++) {
|
||||
sb.append(random.nextInt(10));
|
||||
}
|
||||
String digits = sb.toString();
|
||||
|
||||
int sum = 0;
|
||||
for (int i = 0; i < digits.length(); i++) {
|
||||
int digit = Integer.parseInt(String.valueOf(digits.charAt(i)));
|
||||
if (i % 2 == 0) {
|
||||
sum += digit;
|
||||
} else {
|
||||
sum += digit * 3;
|
||||
}
|
||||
}
|
||||
int checksum = (10 - (sum % 10)) % 10;
|
||||
|
||||
String number = digits + checksum;
|
||||
user.setUserNo(number);
|
||||
}
|
||||
if (StringUtils.isEmpty(user.getName())){
|
||||
if (StringUtils.isNotEmpty(user.getMobile())) {
|
||||
String before = user.getMobile().substring(0, 3);
|
||||
String after = user.getMobile().substring(7);
|
||||
user.setName(before + "****" + after);
|
||||
}
|
||||
}else {
|
||||
user.setName(user.getName());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(user.getMobile())) {
|
||||
user.setDescription("支付宝登录自动注册");
|
||||
}
|
||||
int row = baseMapper.updateById(user);
|
||||
return row;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改会员信息
|
||||
* @param userVo
|
||||
|
@ -767,6 +767,8 @@ public class MemberServiceImpl extends ServiceImpl<MtUserMapper, MtUser> impleme
|
||||
MtUser mtUser = new MtUser();
|
||||
|
||||
if (ObjectUtil.isEmpty(mtUserMobile)) {
|
||||
|
||||
if (ObjectUtil.isEmpty(user)) {
|
||||
//
|
||||
// 新增
|
||||
// LJUserVo userVo = new LJUserVo();
|
||||
@ -786,11 +788,25 @@ public class MemberServiceImpl extends ServiceImpl<MtUserMapper, MtUser> impleme
|
||||
} else if (gender.equals(GenderEnum.UNKNOWN.getKey().toString())) {
|
||||
gender = GenderEnum.FEMALE.getKey().toString();
|
||||
}
|
||||
|
||||
if (ObjectUtil.isEmpty(user)) {
|
||||
save(mtUser);
|
||||
}else {
|
||||
baseMapper.updateById(mtUser);
|
||||
user.setOpenId(openId);
|
||||
|
||||
user.setMobile(mobile);
|
||||
user.setName("("+mobile+")微信自动注册用户");
|
||||
user.setCreateTime(new Date());
|
||||
user.setUpdateTime(new Date());
|
||||
user.setDescription("微信登录自动注册");
|
||||
user.setStatus("qy");
|
||||
user.setSex(Integer.parseInt(gender));
|
||||
user.setUserNo(editUserNo());
|
||||
// 微信用户 1:男;2:女 0:未知
|
||||
if (gender.equals(GenderEnum.FEMALE.getKey().toString())) {
|
||||
gender = GenderEnum.UNKNOWN.getKey().toString();
|
||||
} else if (gender.equals(GenderEnum.UNKNOWN.getKey().toString())) {
|
||||
gender = GenderEnum.FEMALE.getKey().toString();
|
||||
}
|
||||
ljUserService.updateById(user);
|
||||
}
|
||||
|
||||
// 新增余额信息
|
||||
|
@ -74,18 +74,31 @@ public class AlipayController extends BaseController {
|
||||
}
|
||||
String userId = alipayProfile.getUserId();
|
||||
|
||||
// 根据支付宝userId查询用户信息
|
||||
LJUser user1 = userService.selectUserByUserId(userId);
|
||||
// 根据手机号查询用户信息
|
||||
LJUser user = userService.selectUserByMobile(mobile);
|
||||
if (ObjectUtil.isNotEmpty(user)){
|
||||
// 存在则修改用户的支付宝userid
|
||||
user.setUserId(userId);
|
||||
if (ObjectUtil.isNotEmpty(user1)) {
|
||||
if (user1.getId()!=user.getId()){
|
||||
userService.deleteUserById(user1.getId());
|
||||
}
|
||||
}
|
||||
userService.updateById(user);
|
||||
}else {
|
||||
if (ObjectUtil.isEmpty(user1)) {
|
||||
// 不存在则添加用户的支付宝userid
|
||||
LJUser ljUser = new LJUser();
|
||||
ljUser.setMobile(mobile);
|
||||
ljUser.setUserId(userId);
|
||||
userService.addUser(ljUser);
|
||||
}else {
|
||||
user1.setMobile(mobile);
|
||||
user1.setUserId(userId);
|
||||
userService.editUserById(user1);
|
||||
}
|
||||
}
|
||||
LJUser ljUser = userService.selectUserByMobile(mobile);
|
||||
// 根据userid和连锁店id查询是否存在对应的余额信息
|
||||
@ -145,6 +158,26 @@ public class AlipayController extends BaseController {
|
||||
if (ObjectUtil.isEmpty(alipayProfile)) {
|
||||
return getSuccessResult("false");
|
||||
}
|
||||
|
||||
// 判断是否为未登录状态下支付
|
||||
if (ObjectUtil.isNotEmpty(map.get("isRefuel")) && map.get("isRefuel").equals("true")){
|
||||
LJUser user = userService.selectUserByUserId(alipayProfile.getUserId());
|
||||
if (ObjectUtil.isEmpty(user)){
|
||||
LJUser ljUser = new LJUser();
|
||||
ljUser.setUserId(alipayProfile.getUserId());
|
||||
userService.addUser(ljUser);
|
||||
}
|
||||
LJUser user1 = userService.selectUserByUserId(alipayProfile.getUserId());
|
||||
// 将用户id存入token
|
||||
AccountInfo accountInfo = new AccountInfo();
|
||||
// String userAgent = request.getHeader("user-agent");
|
||||
// String token = TokenUtil.generateToken(userAgent, user1.getId());
|
||||
// accountInfo.setToken(token);
|
||||
accountInfo.setId(user1.getId());
|
||||
TokenUtil.saveAccountToken(accountInfo);
|
||||
return getSuccessResult(true);
|
||||
}
|
||||
|
||||
if (ObjectUtil.isEmpty(alipayProfile.getUserId())) return getSuccessResult("false");
|
||||
|
||||
String userId = alipayProfile.getUserId();
|
||||
|
@ -6,7 +6,7 @@
|
||||
<span>挂账</span>
|
||||
</div>
|
||||
|
||||
<el-form :model="queryParams2" ref="queryForm" size="small" :inline="true" label-width="68px">
|
||||
<el-form :model="queryParams2" ref="queryForm" size="small" :inline="true" label-width="80px">
|
||||
<el-form-item label="单位名称" prop="unitName">
|
||||
<el-input
|
||||
v-model="queryParams2.unitName"
|
||||
@ -45,16 +45,31 @@
|
||||
<el-option label="禁用" value="jy"/>
|
||||
</el-select>
|
||||
</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="dateRange"
|
||||
style="width: 400px"
|
||||
size="medium"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
v-model="beginTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="开始日期">
|
||||
</el-date-picker>
|
||||
至
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery1">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery1">重置</el-button>
|
||||
@ -821,8 +836,9 @@
|
||||
<template slot-scope="scope">
|
||||
<el-input-number size="mini" style="width: 100px"
|
||||
v-model="scope.row.repaidAmount"
|
||||
:min="0" :max="scope.row.repaidAmount"
|
||||
@change="handleChange(scope.row)"></el-input-number>
|
||||
:min="0" :max="scope.row.amount"
|
||||
@change="handleChange(scope.row)">
|
||||
</el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -886,6 +902,70 @@
|
||||
<el-button type="primary" @click="submitReturn1">确认归还</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 支付成功后小票打印内容-->
|
||||
<div id="reportSuccess" ref="report" class="box-center" v-show="false">
|
||||
<div class="box-title">订单统计</div>
|
||||
<div class="box-ge" v-if="isBatch">
|
||||
<div class="input-box">
|
||||
<div>挂账单位</div>
|
||||
<div>{{ repayList[0].unitName }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>挂账金额</div>
|
||||
<div>¥{{ amount }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>归还金额</div>
|
||||
<div>¥{{ repaidAmount }}</div>
|
||||
</div>
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>未归还金额</div>-->
|
||||
<!-- <div>¥{{ outstandAmount }}</div>-->
|
||||
<!-- </div>-->
|
||||
<div class="input-box">
|
||||
<div>支付方式</div>
|
||||
<div v-if="payType == 'CASH'">现金</div>
|
||||
<div v-else-if="payType == 'WECHAT'">微信</div>
|
||||
<div v-else-if="payType == 'ALIPAY'">支付宝</div>
|
||||
<div v-else-if="payType == 'UNIONPAY'">银联二维码</div>
|
||||
</div>
|
||||
<div class="input-box" v-if="seekZero>0">
|
||||
<div>找零金额</div>
|
||||
<div>¥{{ seekZero }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-ge" v-else>
|
||||
<div class="input-box">
|
||||
<div>挂账单位</div>
|
||||
<div>{{ form2.unitName }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>挂账金额</div>
|
||||
<div>¥{{ form2.amount }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>归还金额</div>
|
||||
<div>¥{{ form2.repaidAmount }}</div>
|
||||
</div>
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>未归还金额</div>-->
|
||||
<!-- <div>¥{{ form2.outstandAmount }}</div>-->
|
||||
<!-- </div>-->
|
||||
<div class="input-box">
|
||||
<div>支付方式</div>
|
||||
<div v-if="payType == 'CASH'">现金</div>
|
||||
<div v-else-if="payType == 'WECHAT'">微信</div>
|
||||
<div v-else-if="payType == 'ALIPAY'">支付宝</div>
|
||||
<div v-else-if="payType == 'UNIONPAY'">银联二维码</div>
|
||||
</div>
|
||||
<div class="input-box" v-if="seekZero>0">
|
||||
<div>找零金额</div>
|
||||
<div>¥{{ seekZero }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -910,6 +990,7 @@ import {
|
||||
import {getDicts} from "@/api/dict/data";
|
||||
import {listReturnRecord, returnRecordByOrderNo, returnRecordInfo} from "@/api/cashier/returnrecord";
|
||||
import {queryStaffs} from "@/api/staff/staff";
|
||||
import {getLodop} from "@/api/LodopFuncs";
|
||||
|
||||
export default {
|
||||
name: "credit",
|
||||
@ -998,6 +1079,8 @@ import {queryStaffs} from "@/api/staff/staff";
|
||||
},
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
beginTime:"",
|
||||
endTime:"",
|
||||
// 挂账记录列表
|
||||
hangBillList:[],
|
||||
// 归还记录列表
|
||||
@ -1061,6 +1144,86 @@ import {queryStaffs} from "@/api/staff/staff";
|
||||
},
|
||||
},
|
||||
methods:{
|
||||
async printLocally() {
|
||||
//初始化打印函数
|
||||
let LODOP = getLodop(); // 初始化打印
|
||||
LODOP.PRINT_INIT();
|
||||
var bodyStyle = `<style>
|
||||
.input-box{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
}
|
||||
.box-ge{
|
||||
border-bottom: 1px solid #000000 ;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
}
|
||||
.box-title{
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
margin-top: 15px;
|
||||
}
|
||||
.input-hui{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 15px 0px;
|
||||
background: #b2b2b2;
|
||||
box-sizing: border-box;
|
||||
padding: 5px 0px;
|
||||
}
|
||||
.input-hui-frou{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 15px 0px;
|
||||
background: #b2b2b2;
|
||||
box-sizing: border-box;
|
||||
padding: 5px 0px;
|
||||
div{
|
||||
width: 25%;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
.input-box-frou{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
div{
|
||||
width: 25%;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
.box-center{
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
`
|
||||
var fromHtml = bodyStyle+this.$refs.report.innerHTML
|
||||
|
||||
|
||||
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
|
||||
|
||||
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW",true);
|
||||
|
||||
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||
// let preview = LODOP.PREVIEW();
|
||||
// console.log("preview",preview);
|
||||
LODOP.PRINT();
|
||||
|
||||
},
|
||||
getStaffList(){
|
||||
queryStaffs().then(res => {
|
||||
this.staffList = res.data
|
||||
@ -1075,6 +1238,8 @@ import {queryStaffs} from "@/api/staff/staff";
|
||||
resetQuery1() {
|
||||
this.resetForm("queryForm");
|
||||
this.dateRange = []
|
||||
this.beginTime = ""
|
||||
this.endTime = ""
|
||||
this.handleQuery1();
|
||||
},
|
||||
changeCreditAmount(){
|
||||
@ -1113,7 +1278,12 @@ import {queryStaffs} from "@/api/staff/staff";
|
||||
if (val!=undefined){
|
||||
this.queryParams2.page = val
|
||||
}
|
||||
creditUnits(this.addDateRange(this.queryParams2, this.dateRange)).then(res => {
|
||||
let dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
creditUnits(this.addDateRange(this.queryParams2, dateRange)).then(res => {
|
||||
this.creditUnitList = res.data.records
|
||||
this.total3 = res.data.total;
|
||||
|
||||
@ -1124,7 +1294,12 @@ import {queryStaffs} from "@/api/staff/staff";
|
||||
if (val!=undefined){
|
||||
this.queryParams2.page = val
|
||||
}
|
||||
creditUnitsStatistic(this.addDateRange(this.queryParams2, this.dateRange)).then(res => {
|
||||
let dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
creditUnitsStatistic(this.addDateRange(this.queryParams2, dateRange)).then(res => {
|
||||
this.allCreditLimit = res.data.allCreditLimit
|
||||
this.allUsedCreditLimit = res.data.allUsedCreditLimit
|
||||
this.allResidueCreditLimit = res.data.allResidueCreditLimit
|
||||
@ -1132,20 +1307,25 @@ import {queryStaffs} from "@/api/staff/staff";
|
||||
},
|
||||
// 获取挂账统计信息
|
||||
getStatistic(){
|
||||
hangBillReturnTotal(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
|
||||
let dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
hangBillReturnTotal(this.addDateRange(this.queryParams, dateRange)).then(res => {
|
||||
this.returnTotal = res.data
|
||||
})
|
||||
hangBillAllAmount(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
|
||||
hangBillAllAmount(this.addDateRange(this.queryParams, dateRange)).then(res => {
|
||||
if (res.data) {
|
||||
this.allAmount = res.data
|
||||
}
|
||||
})
|
||||
hangBillAllReturnAmount(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
|
||||
hangBillAllReturnAmount(this.addDateRange(this.queryParams, dateRange)).then(res => {
|
||||
if (res.data) {
|
||||
this.returnAllAmount = res.data
|
||||
}
|
||||
})
|
||||
hangBillAllNoReturnAmount(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
|
||||
hangBillAllNoReturnAmount(this.addDateRange(this.queryParams, dateRange)).then(res => {
|
||||
if (res.data) {
|
||||
this.noReturnAllAmount = res.data
|
||||
}
|
||||
@ -1202,6 +1382,8 @@ import {queryStaffs} from "@/api/staff/staff";
|
||||
this.form4.list = JSON.stringify(this.tableList);
|
||||
this.form4.repaidAmount = this.repaidAmount;
|
||||
this.form4.payType = "WECHAT"
|
||||
this.payType = "WECHAT"
|
||||
this.seekZero = 0
|
||||
this.open4 = true;
|
||||
},
|
||||
batchReturn(data){
|
||||
@ -1342,6 +1524,7 @@ import {queryStaffs} from "@/api/staff/staff";
|
||||
_this.isPay = false;
|
||||
_this.isQuery = false;
|
||||
_this.loading = false;
|
||||
_this.printLocally()
|
||||
clearInterval(timer);
|
||||
}
|
||||
if (item.payStatus == "payFail"){
|
||||
@ -1415,6 +1598,7 @@ import {queryStaffs} from "@/api/staff/staff";
|
||||
// 归还
|
||||
repay(id){
|
||||
this.payType = "WECHAT"
|
||||
this.seekZero = 0
|
||||
hangBillInfo(id).then( response => {
|
||||
this.open2 = true;
|
||||
this.form2 = response.data
|
||||
@ -1532,7 +1716,12 @@ import {queryStaffs} from "@/api/staff/staff";
|
||||
if (val!=undefined){
|
||||
this.queryParams.page = val
|
||||
}
|
||||
listHangBill(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
||||
let dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
listHangBill(this.addDateRange(this.queryParams, dateRange)).then( response => {
|
||||
this.hangBillList = response.data.records
|
||||
this.total = response.data.total;
|
||||
})
|
||||
@ -1547,6 +1736,8 @@ import {queryStaffs} from "@/api/staff/staff";
|
||||
resetQuery() {
|
||||
this.dateRange = [];
|
||||
this.queryParams.page = 1;
|
||||
this.beginTime = ""
|
||||
this.endTime = ""
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
|
@ -58,16 +58,29 @@
|
||||
/>
|
||||
</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="dateRange"
|
||||
style="width: 400px"
|
||||
size="medium"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
v-model="beginTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="开始日期">
|
||||
</el-date-picker>
|
||||
至
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">查询</el-button>
|
||||
@ -116,30 +129,31 @@
|
||||
<el-table
|
||||
:data="hangBillList"
|
||||
style="width: 100%">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="props">
|
||||
<el-form label-position="left" style="margin-left: 20px" inline class="demo-table-expand">
|
||||
<el-form-item label="操作人手机号">
|
||||
<span>{{ props.row.mobile }}</span>
|
||||
</el-form-item><br/>
|
||||
<el-form-item label="更新时间">
|
||||
<span>{{ props.row.updateTime ? props.row.updateTime:"--" }}</span>
|
||||
</el-form-item><br/>
|
||||
<el-form-item label="单据备注">
|
||||
<span>{{ props.row.remark ? props.row.remark:"--" }}</span>
|
||||
</el-form-item><br/>
|
||||
<el-form-item label="单据金额">
|
||||
<span>{{ props.row.amount ? props.row.amount:"0" }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="已还金额">
|
||||
<span>{{ props.row.repaidAmount ? props.row.repaidAmount:"0" }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="未还金额">
|
||||
<span>{{ props.row.outstandAmount ? props.row.outstandAmount:"0" }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column type="expand">-->
|
||||
<!-- <template slot-scope="props">-->
|
||||
<!-- <el-form label-position="left" style="margin-left: 20px" inline class="demo-table-expand">-->
|
||||
<!-- <el-form-item label="操作人手机号">-->
|
||||
<!-- <span>{{ props.row.mobile }}</span>-->
|
||||
<!-- </el-form-item><br/>-->
|
||||
<!-- <el-form-item label="更新时间">-->
|
||||
<!-- <span>{{ props.row.updateTime ? props.row.updateTime:"--" }}</span>-->
|
||||
<!-- </el-form-item><br/>-->
|
||||
<!-- <el-form-item label="单据备注">-->
|
||||
<!-- <span>{{ props.row.remark ? props.row.remark:"--" }}</span>-->
|
||||
<!-- </el-form-item><br/>-->
|
||||
<!-- <el-form-item label="单据金额">-->
|
||||
<!-- <span>{{ props.row.amount ? props.row.amount:"0" }}</span>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="已还金额">-->
|
||||
<!-- <span>{{ props.row.repaidAmount ? props.row.repaidAmount:"0" }}</span>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="未还金额">-->
|
||||
<!-- <span>{{ props.row.outstandAmount ? props.row.outstandAmount:"0" }}</span>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<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 align="center" label="挂账单位">
|
||||
<el-table-column prop="unitName" align="center" label="单位名称"> </el-table-column>
|
||||
@ -318,6 +332,8 @@ import {exportExcelCashierApi, exportExcelHangBillApi} from "@/api/order/exportE
|
||||
mobile:"",
|
||||
},
|
||||
dateRange:[],
|
||||
beginTime:"",
|
||||
endTime:"",
|
||||
returnRecordList:[],
|
||||
payList:[],
|
||||
// 归还账单总数
|
||||
@ -342,6 +358,8 @@ import {exportExcelCashierApi, exportExcelHangBillApi} from "@/api/order/exportE
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.dateRange = [start,new Date()];
|
||||
this.beginTime = start
|
||||
this.endTime = new Date()
|
||||
this.isSysDate = true
|
||||
this.getList()
|
||||
this.getPayList()
|
||||
@ -351,7 +369,12 @@ import {exportExcelCashierApi, exportExcelHangBillApi} from "@/api/order/exportE
|
||||
exportExcelCashier() {
|
||||
// this.dateRange.push(this.beginTime)
|
||||
// this.dateRange.push(this.endTime)
|
||||
exportExcelHangBillApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
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')
|
||||
})
|
||||
@ -404,12 +427,17 @@ import {exportExcelCashierApi, exportExcelHangBillApi} from "@/api/order/exportE
|
||||
}
|
||||
|
||||
let dateRange1 = this.dateRange
|
||||
// let dateRange = []
|
||||
// if (this.isSysDate){
|
||||
// dateRange.push(dateRange1[0].toLocaleDateString())
|
||||
// dateRange.push(dateRange1[1].toLocaleDateString())
|
||||
// }else {
|
||||
// dateRange = this.dateRange
|
||||
// }
|
||||
let dateRange = []
|
||||
if (this.isSysDate){
|
||||
dateRange.push(dateRange1[0].toLocaleDateString())
|
||||
dateRange.push(dateRange1[1].toLocaleDateString())
|
||||
}else {
|
||||
dateRange = this.dateRange
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
|
||||
listHangBill(this.addDateRange(this.queryParams, dateRange)).then( response => {
|
||||
@ -421,20 +449,25 @@ import {exportExcelCashierApi, exportExcelHangBillApi} from "@/api/order/exportE
|
||||
},
|
||||
// 获取挂账统计信息
|
||||
getStatistic(){
|
||||
hangBillReturnTotal(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
|
||||
let dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
hangBillReturnTotal(this.addDateRange(this.queryParams, dateRange)).then(res => {
|
||||
this.returnTotal = res.data
|
||||
})
|
||||
hangBillAllAmount(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
|
||||
hangBillAllAmount(this.addDateRange(this.queryParams, dateRange)).then(res => {
|
||||
if (res.data) {
|
||||
this.allAmount = res.data
|
||||
}
|
||||
})
|
||||
hangBillAllReturnAmount(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
|
||||
hangBillAllReturnAmount(this.addDateRange(this.queryParams, dateRange)).then(res => {
|
||||
if (res.data) {
|
||||
this.returnAllAmount = res.data
|
||||
}
|
||||
})
|
||||
hangBillAllNoReturnAmount(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
|
||||
hangBillAllNoReturnAmount(this.addDateRange(this.queryParams, dateRange)).then(res => {
|
||||
if (res.data) {
|
||||
this.noReturnAllAmount = res.data
|
||||
}
|
||||
@ -449,6 +482,8 @@ import {exportExcelCashierApi, exportExcelHangBillApi} from "@/api/order/exportE
|
||||
resetQuery() {
|
||||
this.dateRange = [];
|
||||
this.queryParams.page = 1;
|
||||
this.beginTime = ""
|
||||
this.endTime = ""
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
|
@ -19,27 +19,29 @@
|
||||
<el-input v-model="queryParams.orderNo" clearable placeholder="订单号检索"></el-input>
|
||||
</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="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"-->
|
||||
<!-- type="datetime"-->
|
||||
<!-- placeholder="开始日期">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- 至-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="endTime"-->
|
||||
<!-- type="datetime"-->
|
||||
<!-- placeholder="结束日期">-->
|
||||
<!-- </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>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
@ -507,18 +509,23 @@ import ScanPayCodeDialog from "@/views/cashier/components/scanPayCodeDialog.vue"
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.dateRange = [start,new Date()];
|
||||
this.beginTime = start
|
||||
this.endTime = new Date()
|
||||
this.isSysDate = true
|
||||
this.getList();
|
||||
this.getOrderStatistics();
|
||||
// this.getOrderStatistics();
|
||||
this.getStaffList();
|
||||
this.getOilGunList();
|
||||
},
|
||||
methods:{
|
||||
|
||||
exportExcelCashier() {
|
||||
// this.dateRange.push(this.beginTime)
|
||||
// this.dateRange.push(this.endTime)
|
||||
exportExcelCashierApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
let dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
exportExcelCashierApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
|
||||
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
||||
this.$download.saveAs(blob,'收银台订单统计.xLsx')
|
||||
})
|
||||
@ -526,9 +533,12 @@ import ScanPayCodeDialog from "@/views/cashier/components/scanPayCodeDialog.vue"
|
||||
// 获取订单统计信息
|
||||
|
||||
getOrderStatistics() {
|
||||
// this.dateRange.push(this.beginTime)
|
||||
// this.dateRange.push(this.endTime)
|
||||
orderStatisticsApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
let dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
orderStatisticsApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
|
||||
this.orderStatistics = res.data
|
||||
})
|
||||
},
|
||||
@ -729,7 +739,7 @@ import ScanPayCodeDialog from "@/views/cashier/components/scanPayCodeDialog.vue"
|
||||
this.loading = false;
|
||||
|
||||
this.getList();
|
||||
this.getOrderStatistics();
|
||||
// this.getOrderStatistics();
|
||||
this.getStaffList();
|
||||
|
||||
},
|
||||
@ -809,22 +819,18 @@ import ScanPayCodeDialog from "@/views/cashier/components/scanPayCodeDialog.vue"
|
||||
this.queryParams.page = val
|
||||
}
|
||||
|
||||
// let time1 = ""
|
||||
// let time2 = ""
|
||||
// if (this.beginTime && this.endTime){
|
||||
// // let beginTime = this.beginTime.getTime()
|
||||
// // let endTime = this.endTime.getTime()
|
||||
// time1 = this.parseTime1(this.beginTime)
|
||||
// time2 = this.parseTime1(this.endTime)
|
||||
// }
|
||||
let dateRange1 = this.dateRange
|
||||
let dateRange = []
|
||||
if (this.isSysDate){
|
||||
dateRange.push(dateRange1[0].toLocaleDateString())
|
||||
dateRange.push(dateRange1[1].toLocaleDateString())
|
||||
}else {
|
||||
dateRange = this.dateRange
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
// if (this.isSysDate){
|
||||
// dateRange.push(dateRange1[0].toLocaleDateString())
|
||||
// dateRange.push(dateRange1[1].toLocaleDateString())
|
||||
// }else {
|
||||
// dateRange = this.dateRange
|
||||
// }
|
||||
|
||||
listCashierOrder(this.addDateRange(this.queryParams, dateRange)).then( response => {
|
||||
this.orderList = response.data.records;
|
||||
@ -832,14 +838,18 @@ import ScanPayCodeDialog from "@/views/cashier/components/scanPayCodeDialog.vue"
|
||||
this.isSysDate = false
|
||||
})
|
||||
this.getSeekZero(val)
|
||||
this.getOrderStatistics()
|
||||
},
|
||||
getSeekZero(val){
|
||||
if (val!=undefined){
|
||||
this.queryParams.page = val
|
||||
}
|
||||
// this.dateRange.push(this.beginTime)
|
||||
// this.dateRange.push(this.endTime)
|
||||
cashierOrderSeekZeroAmount(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
||||
let dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
cashierOrderSeekZeroAmount(this.addDateRange(this.queryParams, dateRange)).then( response => {
|
||||
if (response.data) {
|
||||
this.seekZeroAmount = response.data
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="box-card">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="85px">
|
||||
<el-form-item label="交易员工" prop="staffId">
|
||||
<el-select
|
||||
v-model="queryParams.staffId"
|
||||
@ -47,16 +47,29 @@
|
||||
/>
|
||||
</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="dateRange"
|
||||
style="width: 400px"
|
||||
size="medium"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
v-model="beginTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="开始日期">
|
||||
</el-date-picker>
|
||||
至
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">查询</el-button>
|
||||
@ -300,6 +313,8 @@ export default {
|
||||
staffList:[],
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
beginTime:"",
|
||||
endTime:"",
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
loadingRes: true,
|
||||
@ -351,6 +366,8 @@ export default {
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.dateRange = [start,new Date()];
|
||||
this.beginTime = start
|
||||
this.endTime = new Date()
|
||||
this.isSysDate = true
|
||||
this.getList();
|
||||
this.getOrderStatistics();
|
||||
@ -359,14 +376,24 @@ export default {
|
||||
},
|
||||
methods:{
|
||||
exportExcelGoodsOrder() {
|
||||
exportExcelGoodsOrderApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
let dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
exportExcelGoodsOrderApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
|
||||
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
||||
this.$download.saveAs(blob,'商品订单统计.xLsx')
|
||||
})
|
||||
},
|
||||
// 订单统计
|
||||
getOrderStatistics (){
|
||||
orderStatisticsApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
let dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
orderStatisticsApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
|
||||
this.orderStatistics = res.data;
|
||||
})
|
||||
},
|
||||
@ -594,12 +621,17 @@ export default {
|
||||
}
|
||||
|
||||
let dateRange1 = this.dateRange
|
||||
// let dateRange = []
|
||||
// if (this.isSysDate){
|
||||
// dateRange.push(dateRange1[0].toLocaleDateString())
|
||||
// dateRange.push(dateRange1[1].toLocaleDateString())
|
||||
// }else {
|
||||
// dateRange = this.dateRange
|
||||
// }
|
||||
let dateRange = []
|
||||
if (this.isSysDate){
|
||||
dateRange.push(dateRange1[0].toLocaleDateString())
|
||||
dateRange.push(dateRange1[1].toLocaleDateString())
|
||||
}else {
|
||||
dateRange = this.dateRange
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
|
||||
this.loadingRes = true;
|
||||
@ -625,6 +657,8 @@ export default {
|
||||
this.queryParams.orderSn = '';
|
||||
this.queryParams.storeIds = '';
|
||||
this.storeIds = [];
|
||||
this.beginTime = ""
|
||||
this.endTime = ""
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
|
@ -69,16 +69,29 @@
|
||||
<el-input v-model="queryParams.orderNo" clearable placeholder="订单号、官方单号检索"></el-input>
|
||||
</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="dateRange"
|
||||
style="width: 400px"
|
||||
size="medium"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></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>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
@ -359,6 +372,8 @@
|
||||
oilNumList:[],
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
beginTime:"",
|
||||
endTime:"",
|
||||
// 油品订单列表
|
||||
oilOrderList:[],
|
||||
payTypeList:[],
|
||||
@ -396,6 +411,8 @@
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.dateRange = [start,new Date()];
|
||||
this.beginTime = start
|
||||
this.endTime = new Date()
|
||||
this.isSysDate = true
|
||||
this.getStaffList();
|
||||
this.getOrderStatistics();
|
||||
@ -486,7 +503,12 @@
|
||||
|
||||
},
|
||||
exportExcelOilOrder() {
|
||||
exportExcelOilOrderApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
let dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
exportExcelOilOrderApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
|
||||
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
||||
this.$download.saveAs(blob,'油品订单统计.xLsx')
|
||||
})
|
||||
@ -663,12 +685,17 @@
|
||||
}
|
||||
|
||||
let dateRange1 = this.dateRange
|
||||
// let dateRange = []
|
||||
// if (this.isSysDate){
|
||||
// dateRange.push(dateRange1[0].toLocaleDateString())
|
||||
// dateRange.push(dateRange1[1].toLocaleDateString())
|
||||
// }else {
|
||||
// dateRange = this.dateRange
|
||||
// }
|
||||
let dateRange = []
|
||||
if (this.isSysDate){
|
||||
dateRange.push(dateRange1[0].toLocaleDateString())
|
||||
dateRange.push(dateRange1[1].toLocaleDateString())
|
||||
}else {
|
||||
dateRange = this.dateRange
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
|
||||
listOilOrder(this.addDateRange(this.queryParams, dateRange)).then( response => {
|
||||
@ -690,6 +717,8 @@
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
this.beginTime = ""
|
||||
this.endTime = ""
|
||||
// this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
|
@ -45,27 +45,29 @@
|
||||
<el-input v-model="queryParams.mobile" placeholder="请输入会员手机号"></el-input>
|
||||
</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="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="queryParams.beginTime"-->
|
||||
<!-- type="datetime"-->
|
||||
<!-- placeholder="开始日期">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- 至-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="queryParams.endTime"-->
|
||||
<!-- type="datetime"-->
|
||||
<!-- placeholder="结束日期">-->
|
||||
<!-- </el-date-picker>-->
|
||||
v-model="beginTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="开始日期">
|
||||
</el-date-picker>
|
||||
至
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
@ -289,6 +291,8 @@ export default {
|
||||
staffList:[],
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
beginTime:"",
|
||||
endTime:"",
|
||||
oilOrder:{},
|
||||
// 退款密码
|
||||
password:"",
|
||||
@ -331,6 +335,8 @@ export default {
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.dateRange = [start,new Date()];
|
||||
this.beginTime = start
|
||||
this.endTime = new Date()
|
||||
this.isSysDate = true
|
||||
this.getList();
|
||||
this.getPayList();
|
||||
@ -509,6 +515,8 @@ export default {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
this.beginTime = ""
|
||||
this.endTime = ""
|
||||
// this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
@ -519,12 +527,17 @@ export default {
|
||||
}
|
||||
|
||||
let dateRange1 = this.dateRange
|
||||
// let dateRange = []
|
||||
// if (this.isSysDate){
|
||||
// dateRange.push(dateRange1[0].toLocaleDateString())
|
||||
// dateRange.push(dateRange1[1].toLocaleDateString())
|
||||
// }else {
|
||||
// dateRange = this.dateRange
|
||||
// }
|
||||
let dateRange = []
|
||||
if (this.isSysDate){
|
||||
dateRange.push(dateRange1[0].toLocaleDateString())
|
||||
dateRange.push(dateRange1[1].toLocaleDateString())
|
||||
}else {
|
||||
dateRange = this.dateRange
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
|
||||
listCardValueRecords(this.addDateRange(this.queryParams, dateRange)).then( response => {
|
||||
|
@ -225,7 +225,7 @@
|
||||
this.chainStoreId = uni.getStorageSync("chainStoreId")
|
||||
this.staffId = uni.getStorageSync("inviteStaffId")
|
||||
await this.getUserAuthority();
|
||||
await this.getOilType();
|
||||
// await this.getOilType();
|
||||
} else {
|
||||
if (uni.getStorageSync("storeId")) {
|
||||
this.storeId = uni.getStorageSync("storeId")
|
||||
@ -236,11 +236,11 @@
|
||||
}
|
||||
}
|
||||
await this.getUserAuthority();
|
||||
await this.getOilType();
|
||||
// await this.getOilType();
|
||||
await this.getTheJudgmentIsTheSame();
|
||||
}else{
|
||||
await this.getUserAuthority();
|
||||
await this.getOilType();
|
||||
// await this.getOilType();
|
||||
await this.getTheJudgmentIsTheSame();
|
||||
}
|
||||
},
|
||||
@ -362,7 +362,7 @@
|
||||
let _this = this;
|
||||
// this.getAddress();
|
||||
uni.getSetting({
|
||||
success(res) {
|
||||
async success(res) {
|
||||
// console.log(res, 111,"dingw")
|
||||
if (!res.authSetting['scope.userLocation']) {
|
||||
// uni.authorize({
|
||||
@ -375,11 +375,11 @@
|
||||
// // 用户拒绝
|
||||
// }
|
||||
// })
|
||||
_this.getAddress(uni.getStorageSync("storeId"));
|
||||
await _this.getAddress(uni.getStorageSync("storeId"));
|
||||
} else {
|
||||
// 用户同意获取位置信息
|
||||
// _this.isExistStoreId()
|
||||
_this.getAddress(uni.getStorageSync("storeId"));
|
||||
await _this.getAddress(uni.getStorageSync("storeId"));
|
||||
}
|
||||
},
|
||||
fail(err) {
|
||||
@ -407,6 +407,7 @@
|
||||
|
||||
|
||||
// 判断当前登录的code是否相同
|
||||
if (uni.getStorageSync("appltType")== "WECHAT") {
|
||||
wx.login({
|
||||
success(res) {
|
||||
if (res.code) {
|
||||
@ -427,7 +428,32 @@
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (uni.getStorageSync("appltType")== "ALIPAY") {
|
||||
my.getAuthCode({
|
||||
scopes: 'auth_base',
|
||||
success: res => {
|
||||
const authCode = res.authCode;
|
||||
console.log(res)
|
||||
request({
|
||||
url: "clientApi/sign/alipayLogin/getUserid2",
|
||||
method: 'post',
|
||||
data: {
|
||||
authCode: authCode,
|
||||
storeId: uni.getStorageSync("storeId"),
|
||||
},
|
||||
}).then((resp) => {
|
||||
if (!res.data) {
|
||||
uni.removeStorageSync("App-Token");
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: err => {
|
||||
console.log('my.getAuthCode 调用失败', err)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
@ -516,6 +542,7 @@
|
||||
_this.lat = _this.store.latitude,
|
||||
|
||||
_this.getIndexBanner()
|
||||
_this.getOilType();
|
||||
}else{
|
||||
uni.showToast({
|
||||
title:"当前店铺已关闭!!!",
|
||||
|
@ -586,8 +586,30 @@
|
||||
})
|
||||
}
|
||||
|
||||
if (uni.getStorageSync("appltType")== "WECHAT") {
|
||||
|
||||
if (uni.getStorageSync("appltType")== "ALIPAY") {
|
||||
my.getAuthCode({
|
||||
scopes: 'auth_base',
|
||||
success: res => {
|
||||
const authCode = res.authCode;
|
||||
console.log(res)
|
||||
request({
|
||||
url: "clientApi/sign/alipayLogin/getUserid2",
|
||||
method: 'post',
|
||||
data: {
|
||||
authCode: authCode,
|
||||
storeId: uni.getStorageSync("storeId"),
|
||||
isRefuel: true,
|
||||
},
|
||||
}).then((resp) => {
|
||||
if (!res.data) {
|
||||
uni.removeStorageSync("App-Token");
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: err => {
|
||||
console.log('my.getAuthCode 调用失败', err)
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
// 退格键被点击
|
||||
|
@ -17,7 +17,7 @@
|
||||
<image v-else src="../../static/imgs/myx.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="username">{{user.name?user.name:"未填写"}}({{user.mobile}})</view>
|
||||
<view class="username">{{user.name?user.name:"未填写"}}({{user.mobile || "暂无"}})</view>
|
||||
<view class="">
|
||||
<u-rate active-color="#ffd74e" :count="count" v-model="value"></u-rate>
|
||||
</view>
|
||||
|
@ -39,7 +39,7 @@ const request = config => {
|
||||
// debugger
|
||||
let res = response
|
||||
|
||||
console.log(res,config.url);
|
||||
// console.log(res,config.url);
|
||||
const code = res.data.code || 200
|
||||
const msg = errorCode[code] || res.data.msg || errorCode['default']
|
||||
if (code === 401) {
|
||||
|
Loading…
Reference in New Issue
Block a user