bug
This commit is contained in:
parent
9b11659153
commit
b137edcac0
@ -9,6 +9,14 @@ export function listCardValueRecord(cardValueRecord) {
|
||||
})
|
||||
}
|
||||
|
||||
// 查询挂账信息列表
|
||||
export function listCardValueRecords(cardValueRecord) {
|
||||
return request({
|
||||
url: '/business/marketingActivity/cardValueRecord/list',
|
||||
method: 'get',
|
||||
params: cardValueRecord
|
||||
})
|
||||
}
|
||||
// 查询挂账信息列表
|
||||
export function cardValueRecordInfo(id) {
|
||||
return request({
|
||||
|
@ -330,6 +330,8 @@ export default {
|
||||
drawer:false,
|
||||
// 挂账信息
|
||||
record:{},
|
||||
// 是否为当天时间
|
||||
isSysDate:false,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -339,6 +341,7 @@ export default {
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.dateRange = [start,new Date()];
|
||||
this.isSysDate = true
|
||||
this.getList()
|
||||
this.getPayList()
|
||||
},
|
||||
@ -390,9 +393,20 @@ export default {
|
||||
if (val!=undefined){
|
||||
this.queryParams.page = val
|
||||
}
|
||||
listHangBill(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
||||
|
||||
let dateRange1 = this.dateRange
|
||||
let dateRange = []
|
||||
if (this.isSysDate){
|
||||
dateRange.push(dateRange1[0].toLocaleDateString())
|
||||
dateRange.push(dateRange1[1].toLocaleDateString())
|
||||
}else {
|
||||
dateRange = this.dateRange
|
||||
}
|
||||
|
||||
listHangBill(this.addDateRange(this.queryParams, dateRange)).then( response => {
|
||||
this.hangBillList = response.data.records
|
||||
this.total = response.data.total;
|
||||
this.isSysDate = false
|
||||
})
|
||||
this.getStatistic();
|
||||
},
|
||||
|
@ -27,7 +27,7 @@
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
end-placeholder="结束日期" @change="lookTime"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@ -95,7 +95,7 @@
|
||||
<!-- </el-form>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column type="index" width="80" align="center" label="序号"/>
|
||||
<el-table-column type="index" width="50" align="center" label="序号"/>
|
||||
<el-table-column prop="orderNo" align="center" label="订单号" width="220"> </el-table-column>
|
||||
<el-table-column prop="amount" align="center" label="订单金额"> </el-table-column>
|
||||
<el-table-column prop="payAmount" align="center" label="实付金额"> </el-table-column>
|
||||
@ -187,14 +187,27 @@
|
||||
<el-descriptions-item label="订单金额">{{ cashierOrder.amount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="油品金额">{{ cashierOrder.oilOrderAmount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="商品金额">{{ cashierOrder.goodsOrderAmount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="油品优惠券优惠">
|
||||
<span v-if="oilInfo.length>0">{{ oilInfo[0].couponAmount || 0 }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="油品满减/折扣活动优惠">
|
||||
<span v-if="oilInfo.length>0">{{ oilInfo[0].deductionAmount || 0 }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="油品会员等级优惠">
|
||||
<span v-if="oilInfo.length>0">{{ cashierOrder.oilDiscountAmount - oilInfo[0].deductionAmount - oilInfo[0].couponAmount || 0 }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="油品优惠总额">{{ cashierOrder.oilDiscountAmount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="商品优惠总额">{{ cashierOrder.goodsDiscountAmount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="油品实付总额">{{ cashierOrder.oilPayAmount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="商品实付总额">{{ cashierOrder.goodsPayAmount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="实付金额">{{ cashierOrder.payAmount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="储值卡付款金额">
|
||||
<span>{{ cashierOrder.balanceAmount || 0 }}</span>
|
||||
<el-descriptions-item label="储值卡消费金额">
|
||||
<span v-if="oilInfo.length>0">{{ oilInfo[0].balanceAmount }}</span>
|
||||
<span v-else>0</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="囤油卡付款升数">
|
||||
<span>{{ cashierOrder.oilCardAmount || 0 }}</span>
|
||||
<el-descriptions-item label="囤油卡消费升数">
|
||||
<span v-if="oilInfo.length>0">{{ oilInfo[0].oilCardAmount }}</span>
|
||||
<span v-else>0</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="找零金额">{{ cashierOrder.seekZero }}</el-descriptions-item>
|
||||
<el-descriptions-item label="付款方式">
|
||||
@ -220,34 +233,46 @@
|
||||
</div>
|
||||
<div style="margin-top: 30px">
|
||||
<el-descriptions :column="1" direction="vertical">
|
||||
<el-descriptions-item label="油品详情">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
<!-- <el-descriptions-item label="油品详情">-->
|
||||
<!-- <el-table-->
|
||||
<!-- v-loading="loading"-->
|
||||
|
||||
:data="oilInfo"
|
||||
style="width: 100%">
|
||||
<el-table-column label="油品金额" prop="orderAmount">
|
||||
<template slot-scope="scope">
|
||||
<span>¥{{ scope.row.orderAmount }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="油号油枪" align="center" prop="terminal">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getName(oilNameList,scope.row.oils) }}/{{ scope.row.oilGunNum }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="加油升数" align="center" prop="oilNum" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.oilNum }}L</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="油品单价" align="center" prop="amount">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.oilPrice }}/L</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-descriptions-item>
|
||||
<!-- :data="oilInfo"-->
|
||||
<!-- style="width: 100%">-->
|
||||
<!-- <el-table-column label="油号油枪" prop="terminal">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{ getName(oilNameList,scope.row.oils) }}/{{ scope.row.oilGunNum }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="油品金额" align="center" prop="orderAmount">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{ scope.row.orderAmount }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="加油升数" align="center" prop="oilNum" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{ scope.row.oilNum }}L</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="油品单价" align="center" prop="amount">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{ scope.row.oilPrice }}/L</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="满减活动优惠" align="center" prop="activeId">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span v-if="scope.row.activeType==1">{{ scope.row.deductionAmount }}</span>-->
|
||||
<!-- <span v-else>0</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="折扣活动优惠" align="center" prop="activeId">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span v-if="scope.row.activeType==2">{{ scope.row.deductionAmount }}</span>-->
|
||||
<!-- <span v-else>0</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- </el-table>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<el-descriptions-item label="商品详情">
|
||||
<el-table
|
||||
:data="goodsInfo"
|
||||
@ -255,15 +280,24 @@
|
||||
<el-table-column label="商品名称" prop="name"/>
|
||||
<el-table-column label="单价" align="center" prop="retailPrice">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="cashierOrder.payUser == '散客'">{{ scope.row.retailPrice }}</span>
|
||||
<span v-else>{{ scope.row.memberPrice }}</span>
|
||||
<span>{{ scope.row.retailPrice }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="cashierOrder.payUser != '散客'" label="会员价" align="center" prop="retailPrice">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.memberPrice }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" prop="num"/>
|
||||
<el-table-column label="合计" align="center" prop="num">
|
||||
<el-table-column label="合计金额" align="center" prop="num">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="cashierOrder.payUser == '散客'">{{ scope.row.retailPrice * scope.row.num }}</span>
|
||||
<span v-else>{{ scope.row.memberPrice * scope.row.num }}</span>
|
||||
<span>{{ (scope.row.retailPrice * scope.row.num).toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实付金额" align="center" prop="num">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="cashierOrder.payUser == '散客'">{{ (scope.row.retailPrice * scope.row.num).toFixed(2) }}</span>
|
||||
<span v-else>{{ (scope.row.memberPrice * scope.row.num).toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -331,6 +365,8 @@ import {refundApi} from "@/api/order/refund";
|
||||
loading:false,
|
||||
dialogVisible:false,
|
||||
dialogRefund:false,
|
||||
// 是否为当天时间
|
||||
isSysDate:false,
|
||||
// 员工列表
|
||||
staffList:[],
|
||||
// 日期范围
|
||||
@ -361,12 +397,12 @@ import {refundApi} from "@/api/order/refund";
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.dateRange = [start,new Date()];
|
||||
this.isSysDate = true
|
||||
this.getList();
|
||||
this.getOrderStatistics();
|
||||
this.getStaffList();
|
||||
},
|
||||
methods:{
|
||||
|
||||
exportExcelCashier() {
|
||||
exportExcelCashierApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
||||
@ -475,11 +511,11 @@ import {refundApi} from "@/api/order/refund";
|
||||
},
|
||||
// 获取订单详情
|
||||
getOrdersInfo(id){
|
||||
this.dialogVisible = true;
|
||||
cashierOrder(id).then( response => {
|
||||
this.cashierOrder = response.data
|
||||
this.getOilList(this.cashierOrder.orderNo)
|
||||
this.getGoodsLists(this.cashierOrder.goodsOrderId)
|
||||
this.dialogVisible = true;
|
||||
})
|
||||
},
|
||||
getOilList(orderNo){
|
||||
@ -497,9 +533,20 @@ import {refundApi} from "@/api/order/refund";
|
||||
if (val!=undefined){
|
||||
this.queryParams.page = val
|
||||
}
|
||||
listCashierOrder(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
||||
|
||||
let dateRange1 = this.dateRange
|
||||
let dateRange = []
|
||||
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;
|
||||
this.total = response.data.total;
|
||||
this.isSysDate = false
|
||||
})
|
||||
this.getSeekZero(val)
|
||||
},
|
||||
|
@ -112,19 +112,20 @@
|
||||
<el-table
|
||||
:data="list"
|
||||
style="width: 100%">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="props">
|
||||
<el-form label-position="left" class="demo-table-expand" style="margin-left: 20px">
|
||||
<el-form-item label="收银员">
|
||||
<span>{{ queryStaf(staffList,props.row.staffId) }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="来源终端">
|
||||
<span>{{ getVal(terminalList,props.row.terminal) }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column type="expand">-->
|
||||
<!-- <template slot-scope="props">-->
|
||||
<!-- <el-form label-position="left" class="demo-table-expand" style="margin-left: 20px">-->
|
||||
<!-- <el-form-item label="收银员">-->
|
||||
<!-- <span>{{ queryStaf(staffList,props.row.staffId) }}</span>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="来源终端">-->
|
||||
<!-- <span>{{ getVal(terminalList,props.row.terminal) }}</span>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="订单ID" prop="id" width="80"/>-->
|
||||
<el-table-column type="index" width="50" align="center" label="序号"/>
|
||||
<el-table-column label="终端" align="center" prop="terminal"/>
|
||||
<el-table-column label="订单号" align="center" prop="orderNo" width="220"/>
|
||||
<el-table-column label="订单金额" align="center" prop="amount"/>
|
||||
@ -284,6 +285,8 @@ export default {
|
||||
alipay:'0',
|
||||
cash:'0',
|
||||
},
|
||||
// 是否为当天时间
|
||||
isSysDate:false,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -293,6 +296,7 @@ export default {
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.dateRange = [start,new Date()];
|
||||
this.isSysDate = true
|
||||
this.getList();
|
||||
this.getOrderStatistics();
|
||||
this.getStaffList();
|
||||
@ -415,10 +419,10 @@ export default {
|
||||
},
|
||||
// 获取商品详情
|
||||
getGoods(id){
|
||||
this.open = true;
|
||||
this.title = "商品详情"
|
||||
getOrderGoods({orderId:id}).then( response => {
|
||||
this.goodsList = response.data
|
||||
this.open = true;
|
||||
this.title = "商品详情"
|
||||
})
|
||||
},
|
||||
// 获取员工姓名
|
||||
@ -442,11 +446,22 @@ export default {
|
||||
if (val!=undefined){
|
||||
this.queryParams.page = val
|
||||
}
|
||||
|
||||
let dateRange1 = this.dateRange
|
||||
let dateRange = []
|
||||
if (this.isSysDate){
|
||||
dateRange.push(dateRange1[0].toLocaleDateString())
|
||||
dateRange.push(dateRange1[1].toLocaleDateString())
|
||||
}else {
|
||||
dateRange = this.dateRange
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
listOrder(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
||||
listOrder(this.addDateRange(this.queryParams, dateRange)).then( response => {
|
||||
this.list = response.data.records;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
this.isSysDate = false
|
||||
})
|
||||
// const app = this;
|
||||
// app.loading = true;
|
||||
|
@ -366,7 +366,9 @@
|
||||
wechat:'0',
|
||||
alipay:'0',
|
||||
cash:'0',
|
||||
}
|
||||
},
|
||||
// 是否为当天时间
|
||||
isSysDate:false,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -376,6 +378,7 @@
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.dateRange = [start,new Date()];
|
||||
this.isSysDate = true
|
||||
this.getStaffList();
|
||||
this.getOrderStatistics();
|
||||
this.getList();
|
||||
@ -610,9 +613,20 @@
|
||||
if (val!=undefined){
|
||||
this.queryParams.page = val
|
||||
}
|
||||
listOilOrder(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
||||
|
||||
let dateRange1 = this.dateRange
|
||||
let dateRange = []
|
||||
if (this.isSysDate){
|
||||
dateRange.push(dateRange1[0].toLocaleDateString())
|
||||
dateRange.push(dateRange1[1].toLocaleDateString())
|
||||
}else {
|
||||
dateRange = this.dateRange
|
||||
}
|
||||
|
||||
listOilOrder(this.addDateRange(this.queryParams, dateRange)).then( response => {
|
||||
this.oilOrderList = response.data.records;
|
||||
this.total = response.data.total;
|
||||
this.isSysDate = false
|
||||
})
|
||||
},
|
||||
// 搜索按钮操作
|
||||
|
@ -44,18 +44,18 @@
|
||||
<el-form-item label="手机号">
|
||||
<el-input v-model="queryParams.mobile" placeholder="请输入会员手机号"></el-input>
|
||||
</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="-"-->
|
||||
<!-- start-placeholder="开始日期"-->
|
||||
<!-- end-placeholder="结束日期"-->
|
||||
<!-- ></el-date-picker>-->
|
||||
<!-- </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-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
@ -112,54 +112,60 @@
|
||||
<el-table
|
||||
:data="list"
|
||||
style="width: 100%">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="props">
|
||||
<el-form label-position="left" class="demo-table-expand" style="margin-left: 20px">
|
||||
<el-form-item label="会员名称">
|
||||
<span>{{ props.row.name }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员手机号">
|
||||
<span>{{ props.row.mobile }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作人">
|
||||
<span>{{ props.row.realName }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作人手机号">
|
||||
<span>{{ props.row.staffMobile }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="储值优惠">
|
||||
<span>充值满{{ props.row.rechargeBalance }}元赠送{{ props.row.giftBalance }}元</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="会员名称"> </el-table-column>
|
||||
<el-table-column prop="bidBalance" label="储值卡面值"> </el-table-column>
|
||||
<el-table-column prop="rechargeBalance" label="储值卡实售金额"> </el-table-column>
|
||||
<el-table-column prop="giftBalance" label="储值卡赠送金额"></el-table-column>
|
||||
<el-table-column prop="paymentType" label="支付方式">
|
||||
<!-- <el-table-column type="expand">-->
|
||||
<!-- <template slot-scope="props">-->
|
||||
<!-- <el-form label-position="left" class="demo-table-expand" style="margin-left: 20px">-->
|
||||
<!-- <el-form-item label="会员名称">-->
|
||||
<!-- <span>{{ props.row.name }}</span>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="会员手机号">-->
|
||||
<!-- <span>{{ props.row.mobile }}</span>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="操作人">-->
|
||||
<!-- <span>{{ props.row.realName }}</span>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="操作人手机号">-->
|
||||
<!-- <span>{{ props.row.staffMobile }}</span>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="储值优惠">-->
|
||||
<!-- <span>充值满{{ props.row.rechargeBalance }}元赠送{{ props.row.giftBalance }}元</span>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column type="index" width="50" align="center" label="序号"/>
|
||||
<el-table-column prop="name" label="会员名称" align="center"> </el-table-column>
|
||||
<el-table-column prop="mobile" label="会员手机号" align="center"> </el-table-column>
|
||||
<el-table-column prop="bidBalance" label="储值卡面值" align="center"> </el-table-column>
|
||||
<el-table-column prop="rechargeBalance" label="储值卡实售金额" align="center"> </el-table-column>
|
||||
<el-table-column prop="giftBalance" label="储值卡赠送金额" align="center"></el-table-column>
|
||||
<el-table-column prop="paymentType" label="支付方式" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{getType(payList,scope.row.paymentType)}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="payStatus" label="支付状态">
|
||||
<el-table-column prop="payStatus" label="支付状态" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.payStatus == 'unpaid'">未支付</el-tag>
|
||||
<el-tag type="success" v-else-if="scope.row.payStatus == 'paid'">已支付</el-tag>
|
||||
<el-tag type="danger" v-else>支付失败</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="realName" label="交易员工"></el-table-column>
|
||||
<el-table-column prop="remark" label="充值备注">
|
||||
<el-table-column prop="realName" label="交易员工" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.realName || getStaffName(staffList,scope.row.mtStaffId)}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="充值备注" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.remark ? scope.row.remark:"--" }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="fringeBenefit" label="附加福利">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{ scope.row.fringeBenefit ? scope.row.fringeBenefit:"--" }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="fringeBenefit" label="储值优惠" width="180" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>充值满{{ scope.row.rechargeBalance }}元赠送{{ scope.row.giftBalance }}元</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <!– <el-button size="mini" type="text" icon="el-icon-edit">更多操作</el-button>–>-->
|
||||
@ -247,7 +253,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {cardValueRecordInfo, listCardValueRecord,orderStatisticsApi} from "@/api/order/cardvaluerecord";
|
||||
import {
|
||||
cardValueRecordInfo,
|
||||
listCardValueRecord,
|
||||
listCardValueRecords,
|
||||
orderStatisticsApi
|
||||
} from "@/api/order/cardvaluerecord";
|
||||
import {getDicts} from "@/api/order/data";
|
||||
import {queryStaffs} from "@/api/order/staff";
|
||||
import { exportExcelVipApi } from "@/api/order/exportExcel";
|
||||
@ -292,15 +303,36 @@ export default {
|
||||
wechat:'',
|
||||
alipay:'',
|
||||
cash:'',
|
||||
}
|
||||
},
|
||||
// 是否为当天时间
|
||||
isSysDate:false,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
let start = new Date();
|
||||
start.setHours(0)
|
||||
start.setMinutes(0)
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.dateRange = [start,new Date()];
|
||||
this.isSysDate = true
|
||||
this.getList();
|
||||
this.getPayList();
|
||||
this.getOrderStatistics()
|
||||
},
|
||||
methods:{
|
||||
// 获取员工名称
|
||||
getStaffName(list,id){
|
||||
let name = "--"
|
||||
if (id){
|
||||
list.forEach(item => {
|
||||
if (item.id == id){
|
||||
name = item.realName
|
||||
}
|
||||
})
|
||||
}
|
||||
return name;
|
||||
},
|
||||
exportExcelVip() {
|
||||
exportExcelVipApi(this.queryParams).then(res=>{
|
||||
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
||||
@ -385,9 +417,20 @@ export default {
|
||||
if (val!=undefined){
|
||||
this.queryParams.pageNo = val
|
||||
}
|
||||
listCardValueRecord(this.queryParams).then( response => {
|
||||
|
||||
let dateRange1 = this.dateRange
|
||||
let dateRange = []
|
||||
if (this.isSysDate){
|
||||
dateRange.push(dateRange1[0].toLocaleDateString())
|
||||
dateRange.push(dateRange1[1].toLocaleDateString())
|
||||
}else {
|
||||
dateRange = this.dateRange
|
||||
}
|
||||
|
||||
listCardValueRecords(this.addDateRange(this.queryParams, dateRange)).then( response => {
|
||||
this.list = response.data.records;
|
||||
this.total = response.data.total;
|
||||
this.isSysDate = false
|
||||
})
|
||||
},
|
||||
}
|
||||
|
@ -53,6 +53,23 @@ public class CardValueRecordController extends BaseController {
|
||||
return getSuccessResult(this.cardValueRecordService.page(page, new QueryWrapper<>(cardValueRecord)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询所有数据
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param cardValueRecord
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public ResponseObject selectAllPage(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
||||
CardValueRecord cardValueRecord) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
cardValueRecord.setStoreId(nowAccountInfo.getStoreId());
|
||||
Page page = new Page(pageNo, pageSize);
|
||||
return getSuccessResult(this.cardValueRecordService.selectCardValueRecordList(page, cardValueRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
*导出订单
|
||||
*@paramresponse
|
||||
|
@ -1,11 +1,15 @@
|
||||
package com.fuint.business.marketingActivity.cardValue.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Data;
|
||||
/**
|
||||
* 储值充值表(CardValueRecord)表实体类
|
||||
@ -84,6 +88,24 @@ public class CardValueRecord extends Model<CardValueRecord> {
|
||||
private String makeChange;
|
||||
|
||||
|
||||
/** 请求参数 */
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
@TableField(exist = false)
|
||||
private Map<String, Object> params;
|
||||
|
||||
public Map<String, Object> getParams()
|
||||
{
|
||||
if (params == null)
|
||||
{
|
||||
params = new HashMap<>();
|
||||
}
|
||||
return params;
|
||||
}
|
||||
|
||||
public void setParams(Map<String, Object> params)
|
||||
{
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -34,6 +34,12 @@ public interface CardValueRecordMapper extends BaseMapper<CardValueRecord> {
|
||||
|
||||
Map<String, String> orderStatistics(@Param("cardValueRecord") CardValueRecordDTO cardValueRecord);
|
||||
|
||||
|
||||
/**
|
||||
* 根据条件分页查询充值记录信息
|
||||
* @param page
|
||||
* @param cardValueRecord
|
||||
* @return
|
||||
*/
|
||||
IPage<CardValueRecord> selectCardValueRecordList(Page page, @Param("cardValueRecord") CardValueRecord cardValueRecord);
|
||||
}
|
||||
|
||||
|
@ -264,6 +264,29 @@
|
||||
from card_value_record
|
||||
where store_id = #{cardValueRecord.storeId}
|
||||
</select>
|
||||
<select id="selectCardValueRecordList"
|
||||
resultType="com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord">
|
||||
select * from card_value_record
|
||||
<where>
|
||||
store_id = #{cardValueRecord.storeId}
|
||||
<if test="cardValueRecord.mtStaffId != null and cardValueRecord.mtStaffId != ''">
|
||||
and mt_staff_id = #{cardValueRecord.mtStaffId}
|
||||
</if>
|
||||
<if test="cardValueRecord.paymentType != null and cardValueRecord.paymentType != ''">
|
||||
and payment_type = #{cardValueRecord.paymentType}
|
||||
</if>
|
||||
<if test="cardValueRecord.mobile != null and cardValueRecord.mobile != ''">
|
||||
and mobile like concat('%', #{cardValueRecord.mobile}, '%')
|
||||
</if>
|
||||
<if test="cardValueRecord.params.beginTime != null and cardValueRecord.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') >= date_format(#{cardValueRecord.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="cardValueRecord.params.endTime != null and cardValueRecord.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') <= date_format(#{cardValueRecord.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
||||
|
@ -68,4 +68,11 @@ public interface CardValueRecordService extends IService<CardValueRecord> {
|
||||
|
||||
Map<String, String> orderStatistics(CardValueRecordDTO cardValueRecord);
|
||||
|
||||
/**
|
||||
* 根据条件分页查询充值记录信息
|
||||
* @param page
|
||||
* @param cardValueRecord
|
||||
* @return
|
||||
*/
|
||||
IPage<CardValueRecord> selectCardValueRecordList(Page page, CardValueRecord cardValueRecord);
|
||||
}
|
||||
|
@ -960,5 +960,12 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
|
||||
|
||||
return stringStringMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<CardValueRecord> selectCardValueRecordList(Page page, CardValueRecord cardValueRecord) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
cardValueRecord.setStoreId(nowAccountInfo.getStoreId());
|
||||
return baseMapper.selectCardValueRecordList(page,cardValueRecord);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -12,6 +12,7 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
@ -18,8 +18,15 @@ import com.fuint.business.convenienceSore.entity.LJGoods;
|
||||
import com.fuint.business.convenienceSore.entity.SaleDetail;
|
||||
import com.fuint.business.convenienceSore.service.LJGoodsService;
|
||||
import com.fuint.business.convenienceSore.service.SaleDetailService;
|
||||
import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscountChild;
|
||||
import com.fuint.business.marketingActivity.activeDiscount.service.ActiveDiscountService;
|
||||
import com.fuint.business.marketingActivity.activeDiscount.vo.ActiveDiscountVO;
|
||||
import com.fuint.business.marketingActivity.activeExchange.vo.PaymentActiveVO;
|
||||
import com.fuint.business.marketingActivity.activeFullminus.service.ActiveFullminusService;
|
||||
import com.fuint.business.marketingActivity.activeFullminus.vo.ActiveFullminusVO;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableService;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableVO;
|
||||
import com.fuint.business.marketingActivity.cardFule.entity.CardFuelRecord;
|
||||
import com.fuint.business.marketingActivity.cardFule.mapper.CardFuelRecordMapper;
|
||||
import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
|
||||
@ -101,6 +108,12 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
private SaleDetailService saleDetailService;
|
||||
@Autowired
|
||||
private CardFavorableRecordService cardFavorableRecordService;
|
||||
@Resource
|
||||
private CardFavorableService cardFavorableService;
|
||||
@Resource
|
||||
private ActiveFullminusService activeFullminusService;
|
||||
@Resource
|
||||
private ActiveDiscountService activeDiscountService;
|
||||
|
||||
@Override
|
||||
public IPage<OilOrder> selectOilOrderList(Page page, OilOrder order) {
|
||||
@ -175,6 +188,43 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
public List<OilOrderVo> queryOilOrderByOrderNo(String orderNo) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
List<OilOrderVo> oilOrderVos = baseMapper.selectOilOrderByOrderNo(orderNo,nowAccountInfo.getStoreId());
|
||||
Double deductionAmount = 0.0;
|
||||
for (OilOrderVo oilOrderVo : oilOrderVos) {
|
||||
if (ObjectUtil.isNotEmpty(oilOrderVo.getActiveId()) && ObjectUtil.isNotEmpty(oilOrderVo.getActiveType())){
|
||||
// 满减
|
||||
if (oilOrderVo.getActiveType().equals("1")){
|
||||
ActiveFullminusVO oneById = activeFullminusService.getOneById(oilOrderVo.getActiveId());
|
||||
List<ActiveDiscountChild> activeDiscountChildList = oneById.getActiveDiscountChildList();
|
||||
for (ActiveDiscountChild activeDiscountChild : activeDiscountChildList) {
|
||||
if (activeDiscountChild.getAmount()<=oilOrderVo.getOrderAmount()){
|
||||
// oilOrderVo.setDeductionAmount(activeDiscountChild.getDeductionAmount());
|
||||
deductionAmount += activeDiscountChild.getDeductionAmount();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 折扣
|
||||
if (oilOrderVo.getActiveType().equals("2")){
|
||||
ActiveDiscountVO oneById = activeDiscountService.getOneById(oilOrderVo.getActiveId());
|
||||
List<ActiveDiscountChild> activeDiscountChildList = oneById.getActiveDiscountChildList();
|
||||
for (ActiveDiscountChild activeDiscountChild : activeDiscountChildList) {
|
||||
if (activeDiscountChild.getAmount()<=oilOrderVo.getOrderAmount()){
|
||||
// oilOrderVo.setDeductionAmount(oilOrderVo.getOrderAmount() - (oilOrderVo.getOrderAmount()*activeDiscountChild.getDiscount()));
|
||||
deductionAmount += oilOrderVo.getOrderAmount() - (oilOrderVo.getOrderAmount()*activeDiscountChild.getDiscount());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 优惠券
|
||||
if (ObjectUtil.isNotEmpty(oilOrderVo.getCouponId())){
|
||||
CardFavorableVO cardFavorableVO = cardFavorableService.selectOneById(oilOrderVo.getCouponId());
|
||||
oilOrderVo.setCouponAmount(cardFavorableVO.getDiscountAmount());
|
||||
}else {
|
||||
oilOrderVo.setCouponAmount(0.0);
|
||||
}
|
||||
}
|
||||
oilOrderVos.get(0).setDeductionAmount(deductionAmount);
|
||||
return oilOrderVos;
|
||||
}
|
||||
|
||||
@ -364,6 +414,10 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
order.setOrderAmount(amount);
|
||||
order.setPayAmount(0.0);
|
||||
order.setOrderNo(orderNo+"1");
|
||||
order.setDiscountAmount(0.0);
|
||||
order.setBalanceAmount(0.0);
|
||||
order.setOilCardAmount(0.0);
|
||||
order.setCouponId(null);
|
||||
}
|
||||
|
||||
if (userId!=null){
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.fuint.business.order.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fuint.business.order.entity.OilOrder;
|
||||
import lombok.Data;
|
||||
|
||||
@ -15,4 +16,10 @@ public class OilOrderVo extends OilOrder {
|
||||
private String realName;
|
||||
// 优惠券id
|
||||
private Integer cardFavorableId;
|
||||
// 满减或折扣消费优惠金额
|
||||
@TableField(exist = false)
|
||||
private Double deductionAmount;
|
||||
// 优惠券优惠金额
|
||||
@TableField(exist = false)
|
||||
private Double couponAmount;
|
||||
}
|
||||
|
@ -8,6 +8,15 @@ export function listCardValueRecord(cardValueRecord) {
|
||||
params: cardValueRecord
|
||||
})
|
||||
}
|
||||
|
||||
// 查询挂账信息列表
|
||||
export function listCardValueRecords(cardValueRecord) {
|
||||
return request({
|
||||
url: '/business/marketingActivity/cardValueRecord/list',
|
||||
method: 'get',
|
||||
params: cardValueRecord
|
||||
})
|
||||
}
|
||||
// 查询会员充值统计
|
||||
export function orderStatisticsApi(cardValueRecord) {
|
||||
return request({
|
||||
|
@ -3164,6 +3164,7 @@
|
||||
let result = true;
|
||||
let goods = this.goodsOrder;
|
||||
let _this = this;
|
||||
this.goodsDiscount = 0
|
||||
if (this.goodsOrder.length > 0) {
|
||||
let amount = 0;
|
||||
for (let i = 0; i < goods.length; i++) {
|
||||
@ -3180,10 +3181,9 @@
|
||||
result = true;
|
||||
}
|
||||
if (_this.isMember) {
|
||||
amount += +(goods[i].memberPrice * goods[i].num).toFixed(2)
|
||||
} else {
|
||||
amount += +(goods[i].retailPrice * goods[i].num).toFixed(2)
|
||||
this.goodsDiscount += +((goods[i].retailPrice-goods[i].memberPrice)*goods[i].num).toFixed(2)
|
||||
}
|
||||
amount += +(goods[i].retailPrice * goods[i].num).toFixed(2)
|
||||
}
|
||||
this.goodsAmount = amount;
|
||||
this.goodsActualPay = this.goodsAmount - this.goodsDiscount;
|
||||
@ -3197,10 +3197,9 @@
|
||||
}
|
||||
val.num = 1;
|
||||
if (_this.isMember) {
|
||||
this.goodsAmount += +val.memberPrice
|
||||
} else {
|
||||
this.goodsAmount += +val.retailPrice
|
||||
this.goodsDiscount += (val.retailPrice - val.memberPrice)
|
||||
}
|
||||
this.goodsAmount += +val.retailPrice
|
||||
this.goodsActualPay = this.goodsAmount - this.goodsDiscount;
|
||||
this.goodsOrder.push(val);
|
||||
this.goodsTotal += 1;
|
||||
@ -3210,10 +3209,9 @@
|
||||
return;
|
||||
}
|
||||
if (_this.isMember) {
|
||||
this.goodsAmount += +val.memberPrice * val.num
|
||||
} else {
|
||||
this.goodsAmount += +val.retailPrice * val.num
|
||||
this.goodsDiscount += (val.retailPrice - val.memberPrice) * val.num
|
||||
}
|
||||
this.goodsAmount += +val.retailPrice * val.num
|
||||
this.goodsActualPay = this.goodsAmount - this.goodsDiscount;
|
||||
}
|
||||
this.goods = ""
|
||||
@ -3274,7 +3272,7 @@
|
||||
async getOilOrder(){
|
||||
this.dialogVisibleamount = false
|
||||
this.form.oilType = this.oilNameID;
|
||||
this.form.type = this.type;
|
||||
// this.form.type = this.type;
|
||||
let amount = this.form.amount || 0;
|
||||
// 计算油的升数
|
||||
if (this.select == "元"){
|
||||
@ -3532,7 +3530,7 @@
|
||||
this.map.goodsAmount = this.goodsAmount;
|
||||
this.map.oilActualPay = this.oilActualPay;
|
||||
this.map.goodsActualPay = this.goodsActualPay;
|
||||
this.map.oilDiscount = (this.oilDiscount + this.goodsDiscount + this.fullReduction + this.couponAmount).toFixed(2) ;
|
||||
this.map.oilDiscount = (this.oilDiscount + this.fullReduction + this.couponAmount).toFixed(2) ;
|
||||
this.map.goodsDiscount = this.goodsDiscount;
|
||||
this.map.goodsNum = this.goodsTotal;
|
||||
this.map.balanceAmount = this.consumeAmount;
|
||||
|
@ -331,6 +331,8 @@ import {exportExcelCashierApi, exportExcelHangBillApi} from "@/api/order/exportE
|
||||
drawer:false,
|
||||
// 挂账信息
|
||||
record:{},
|
||||
// 是否为当天时间
|
||||
isSysDate:false,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -340,6 +342,7 @@ import {exportExcelCashierApi, exportExcelHangBillApi} from "@/api/order/exportE
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.dateRange = [start,new Date()];
|
||||
this.isSysDate = true
|
||||
this.getList()
|
||||
this.getPayList()
|
||||
},
|
||||
@ -399,9 +402,20 @@ import {exportExcelCashierApi, exportExcelHangBillApi} from "@/api/order/exportE
|
||||
if (val!=undefined){
|
||||
this.queryParams.page = val
|
||||
}
|
||||
listHangBill(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
||||
|
||||
let dateRange1 = this.dateRange
|
||||
let dateRange = []
|
||||
if (this.isSysDate){
|
||||
dateRange.push(dateRange1[0].toLocaleDateString())
|
||||
dateRange.push(dateRange1[1].toLocaleDateString())
|
||||
}else {
|
||||
dateRange = this.dateRange
|
||||
}
|
||||
|
||||
listHangBill(this.addDateRange(this.queryParams, dateRange)).then( response => {
|
||||
this.hangBillList = response.data.records
|
||||
this.total = response.data.total;
|
||||
this.isSysDate = false
|
||||
})
|
||||
this.getStatistic();
|
||||
},
|
||||
|
@ -106,7 +106,7 @@
|
||||
<!-- </el-form>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column type="index" width="80" align="center" label="序号"/>
|
||||
<el-table-column type="index" width="50" align="center" label="序号"/>
|
||||
<el-table-column prop="orderNo" align="center" label="订单号" width="220"> </el-table-column>
|
||||
<el-table-column prop="amount" align="center" label="订单金额"> </el-table-column>
|
||||
<el-table-column prop="payAmount" align="center" label="实付金额"> </el-table-column>
|
||||
@ -198,15 +198,26 @@
|
||||
<el-descriptions-item label="订单金额">{{ cashierOrder.amount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="油品金额">{{ cashierOrder.oilOrderAmount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="商品金额">{{ cashierOrder.goodsOrderAmount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="油品优惠券优惠">
|
||||
<span v-if="oilInfo.length>0">{{ oilInfo[0].couponAmount || 0 }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="油品满减/折扣活动优惠">
|
||||
<span v-if="oilInfo.length>0">{{ oilInfo[0].deductionAmount || 0 }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="油品会员等级优惠">
|
||||
<span v-if="oilInfo.length>0">{{ cashierOrder.oilDiscountAmount - oilInfo[0].deductionAmount - oilInfo[0].couponAmount || 0 }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="油品优惠总额">{{ cashierOrder.oilDiscountAmount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="商品优惠总额">{{ cashierOrder.goodsDiscountAmount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="油品实付总额">{{ cashierOrder.oilPayAmount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="商品实付总额">{{ cashierOrder.goodsPayAmount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="实付金额">{{ cashierOrder.payAmount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="储值卡或囤油卡消费金额">
|
||||
<span v-if="cashierOrder.oilOrderAmount - cashierOrder.oilDiscountAmount -
|
||||
(cashierOrder.payAmount+cashierOrder.goodsOrderAmount-cashierOrder.goodsDiscountAmount)>0 &&
|
||||
cashierOrder.status=='paid' && cashierOrder.payUser!='散客'">
|
||||
{{ (cashierOrder.oilOrderAmount - cashierOrder.oilDiscountAmount - (cashierOrder.payAmount-cashierOrder.goodsOrderAmount-cashierOrder.seekZero)).toFixed(2) || 0 }}
|
||||
</span>
|
||||
<el-descriptions-item label="储值卡消费金额">
|
||||
<span v-if="oilInfo.length>0">{{ oilInfo[0].balanceAmount }}</span>
|
||||
<span v-else>0</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="囤油卡消费升数">
|
||||
<span v-if="oilInfo.length>0">{{ oilInfo[0].oilCardAmount }}</span>
|
||||
<span v-else>0</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="找零金额">{{ cashierOrder.seekZero }}</el-descriptions-item>
|
||||
@ -233,34 +244,46 @@
|
||||
</div>
|
||||
<div style="margin-top: 30px">
|
||||
<el-descriptions :column="1" direction="vertical">
|
||||
<el-descriptions-item label="油品详情">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
<!-- <el-descriptions-item label="油品详情">-->
|
||||
<!-- <el-table-->
|
||||
<!-- v-loading="loading"-->
|
||||
|
||||
:data="oilInfo"
|
||||
style="width: 100%">
|
||||
<el-table-column label="油品金额" prop="orderAmount">
|
||||
<template slot-scope="scope">
|
||||
<span>¥{{ scope.row.orderAmount }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="油号油枪" align="center" prop="terminal">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getName(oilNameList,scope.row.oils) }}/{{ getName1(oilGunList,scope.row.oilGunNum) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="加油升数" align="center" prop="oilNum" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.oilNum }}L</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="油品单价" align="center" prop="amount">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.oilPrice }}/L</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-descriptions-item>
|
||||
<!-- :data="oilInfo"-->
|
||||
<!-- style="width: 100%">-->
|
||||
<!-- <el-table-column label="油号油枪" prop="terminal">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{ getName(oilNameList,scope.row.oils) }}/{{ getName1(oilGunList,scope.row.oilGunNum) }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="油品金额" align="center" prop="orderAmount">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{ scope.row.orderAmount }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="加油升数" align="center" prop="oilNum" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{ scope.row.oilNum }}L</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="油品单价" align="center" prop="amount">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{ scope.row.oilPrice }}/L</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="满减活动优惠" align="center" prop="activeId">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span v-if="scope.row.activeType==1">{{ scope.row.deductionAmount }}</span>-->
|
||||
<!-- <span v-else>0</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="折扣活动优惠" align="center" prop="activeId">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span v-if="scope.row.activeType==2">{{ scope.row.deductionAmount }}</span>-->
|
||||
<!-- <span v-else>0</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- </el-table>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<el-descriptions-item label="商品详情">
|
||||
<el-table
|
||||
:data="goodsInfo"
|
||||
@ -268,15 +291,24 @@
|
||||
<el-table-column label="商品名称" prop="name"/>
|
||||
<el-table-column label="单价" align="center" prop="retailPrice">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="cashierOrder.payUser == '散客'">{{ scope.row.retailPrice }}</span>
|
||||
<span v-else>{{ scope.row.memberPrice }}</span>
|
||||
<span>{{ scope.row.retailPrice }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="cashierOrder.payUser != '散客'" label="会员价" align="center" prop="retailPrice">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.memberPrice }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" prop="num"/>
|
||||
<el-table-column label="合计" align="center" prop="num">
|
||||
<el-table-column label="合计金额" align="center" prop="num">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="cashierOrder.payUser == '散客'">{{ scope.row.retailPrice * scope.row.num }}</span>
|
||||
<span v-else>{{ scope.row.memberPrice * scope.row.num }}</span>
|
||||
<span>{{ (scope.row.retailPrice * scope.row.num).toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实付金额" align="center" prop="num">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="cashierOrder.payUser == '散客'">{{ (scope.row.retailPrice * scope.row.num).toFixed(2) }}</span>
|
||||
<span v-else>{{ (scope.row.memberPrice * scope.row.num).toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -430,6 +462,8 @@ import {formatDate} from "@/utils";
|
||||
isOilVouchers:false,
|
||||
isGoods: false,
|
||||
isOil: false,
|
||||
// 是否为当天时间
|
||||
isSysDate:false,
|
||||
// 收银台订单列表
|
||||
orderList:[],
|
||||
// 查询参数
|
||||
@ -458,6 +492,7 @@ import {formatDate} from "@/utils";
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.dateRange = [start,new Date()];
|
||||
this.isSysDate = true
|
||||
this.getList();
|
||||
this.getOrderStatistics();
|
||||
this.getStaffList();
|
||||
@ -695,11 +730,11 @@ import {formatDate} from "@/utils";
|
||||
},
|
||||
// 获取订单详情
|
||||
getOrdersInfo(id){
|
||||
this.dialogVisible = true;
|
||||
cashierOrder(id).then( response => {
|
||||
this.cashierOrder = response.data
|
||||
this.getOilList(this.cashierOrder.orderNo)
|
||||
this.getGoodsLists(this.cashierOrder.goodsOrderId)
|
||||
this.dialogVisible = true;
|
||||
})
|
||||
},
|
||||
async getOilList(orderNo){
|
||||
@ -720,7 +755,8 @@ import {formatDate} from "@/utils";
|
||||
let h = ((date.getHours() < 10) ? ('0' + date.getHours()) : date.getHours()) + ":";
|
||||
let m = ((date.getMinutes() < 10) ? ('0' + date.getMinutes()) : date.getMinutes()) + ":";
|
||||
let s = ((date.getSeconds() < 10) ? ('0' + date.getSeconds()) : date.getSeconds());
|
||||
return new Date(y , mon , d , h , m , s);
|
||||
// return new Date(y , mon , d , h , m , s);
|
||||
return y+mon+d+h+m+s;
|
||||
},
|
||||
// 获取列表信息
|
||||
getList(val){
|
||||
@ -728,23 +764,27 @@ import {formatDate} from "@/utils";
|
||||
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 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 = []
|
||||
// this.$modal.msgError()
|
||||
// dateRange.push(time1.toString())
|
||||
// dateRange.push(time2.toString())
|
||||
// this.$modal.msgError(this.dateRange.toString())
|
||||
// this.dateRange = dateRange.toString()
|
||||
listCashierOrder(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
||||
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;
|
||||
this.total = response.data.total;
|
||||
this.isSysDate = false
|
||||
})
|
||||
this.getSeekZero(val)
|
||||
},
|
||||
|
@ -112,19 +112,20 @@
|
||||
<el-table
|
||||
:data="list"
|
||||
style="width: 100%">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="props">
|
||||
<el-form label-position="left" class="demo-table-expand" style="margin-left: 20px">
|
||||
<el-form-item label="收银员">
|
||||
<span>{{ queryStaf(staffList,props.row.staffId) }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="来源终端">
|
||||
<span>{{ getVal(terminalList,props.row.terminal) }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column type="expand">-->
|
||||
<!-- <template slot-scope="props">-->
|
||||
<!-- <el-form label-position="left" class="demo-table-expand" style="margin-left: 20px">-->
|
||||
<!-- <el-form-item label="收银员">-->
|
||||
<!-- <span>{{ queryStaf(staffList,props.row.staffId) }}</span>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="来源终端">-->
|
||||
<!-- <span>{{ getVal(terminalList,props.row.terminal) }}</span>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="订单ID" prop="id" width="80"/>-->
|
||||
<el-table-column type="index" width="50" align="center" label="序号"/>
|
||||
<el-table-column label="终端" align="center" prop="terminal"/>
|
||||
<el-table-column label="订单号" align="center" prop="orderNo" width="220"/>
|
||||
<el-table-column label="订单金额" align="center" prop="amount"/>
|
||||
@ -339,6 +340,8 @@ export default {
|
||||
alipay:'0',
|
||||
cash:'0',
|
||||
},
|
||||
// 是否为当天时间
|
||||
isSysDate:false,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -348,6 +351,7 @@ export default {
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.dateRange = [start,new Date()];
|
||||
this.isSysDate = true
|
||||
this.getList();
|
||||
this.getOrderStatistics();
|
||||
this.getStaffList();
|
||||
@ -561,10 +565,10 @@ export default {
|
||||
},
|
||||
// 获取商品详情
|
||||
getGoods(id){
|
||||
this.open = true;
|
||||
this.title = "商品详情"
|
||||
getOrderGoods({orderId:id}).then( response => {
|
||||
this.goodsList = response.data
|
||||
this.open = true;
|
||||
this.title = "商品详情"
|
||||
})
|
||||
},
|
||||
// 获取员工姓名
|
||||
@ -588,11 +592,22 @@ export default {
|
||||
if (val!=undefined){
|
||||
this.queryParams.page = val
|
||||
}
|
||||
|
||||
let dateRange1 = this.dateRange
|
||||
let dateRange = []
|
||||
if (this.isSysDate){
|
||||
dateRange.push(dateRange1[0].toLocaleDateString())
|
||||
dateRange.push(dateRange1[1].toLocaleDateString())
|
||||
}else {
|
||||
dateRange = this.dateRange
|
||||
}
|
||||
|
||||
this.loadingRes = true;
|
||||
listOrder(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
||||
listOrder(this.addDateRange(this.queryParams, dateRange)).then( response => {
|
||||
this.list = response.data.records;
|
||||
this.total = response.data.total;
|
||||
this.loadingRes = false;
|
||||
this.isSysDate = false
|
||||
})
|
||||
},
|
||||
// 搜索按钮操作
|
||||
|
@ -384,7 +384,9 @@
|
||||
wechat:'0',
|
||||
alipay:'0',
|
||||
cash:'0',
|
||||
}
|
||||
},
|
||||
// 是否为当天时间
|
||||
isSysDate:false,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -394,6 +396,7 @@
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.dateRange = [start,new Date()];
|
||||
this.isSysDate = true
|
||||
this.getStaffList();
|
||||
this.getOrderStatistics();
|
||||
this.getList();
|
||||
@ -658,9 +661,20 @@
|
||||
if (val!=undefined){
|
||||
this.queryParams.page = val
|
||||
}
|
||||
listOilOrder(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
||||
|
||||
let dateRange1 = this.dateRange
|
||||
let dateRange = []
|
||||
if (this.isSysDate){
|
||||
dateRange.push(dateRange1[0].toLocaleDateString())
|
||||
dateRange.push(dateRange1[1].toLocaleDateString())
|
||||
}else {
|
||||
dateRange = this.dateRange
|
||||
}
|
||||
|
||||
listOilOrder(this.addDateRange(this.queryParams, dateRange)).then( response => {
|
||||
this.oilOrderList = response.data.records;
|
||||
this.total = response.data.total;
|
||||
this.isSysDate = false
|
||||
})
|
||||
},
|
||||
// 搜索按钮操作
|
||||
|
@ -44,18 +44,29 @@
|
||||
<el-form-item label="手机号">
|
||||
<el-input v-model="queryParams.mobile" placeholder="请输入会员手机号"></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="交易时间">-->
|
||||
<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-form-item>-->
|
||||
<!-- v-model="queryParams.beginTime"-->
|
||||
<!-- type="datetime"-->
|
||||
<!-- placeholder="开始日期">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- 至-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="queryParams.endTime"-->
|
||||
<!-- type="datetime"-->
|
||||
<!-- placeholder="结束日期">-->
|
||||
<!-- </el-date-picker>-->
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
@ -112,59 +123,61 @@
|
||||
<el-table
|
||||
:data="list"
|
||||
style="width: 100%">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="props">
|
||||
<el-form label-position="left" class="demo-table-expand" style="margin-left: 20px">
|
||||
<el-form-item label="会员名称">
|
||||
<span>{{ props.row.name }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员手机号">
|
||||
<span>{{ props.row.mobile }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作人">
|
||||
<span>{{ props.row.realName || "--" }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作人手机号">
|
||||
<span>{{ props.row.staffMobile || "--" }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="储值优惠">
|
||||
<span>充值满{{ props.row.rechargeBalance }}元赠送{{ props.row.giftBalance }}元</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="会员名称"> </el-table-column>
|
||||
<el-table-column prop="bidBalance" label="储值卡面值"> </el-table-column>
|
||||
<el-table-column prop="amount" label="自定义充值金额"> </el-table-column>
|
||||
<el-table-column prop="rechargeBalance" label="储值卡实售金额"> </el-table-column>
|
||||
<el-table-column prop="giftBalance" label="储值卡赠送金额"></el-table-column>
|
||||
<el-table-column prop="paymentType" label="支付方式">
|
||||
<!-- <el-table-column type="expand">-->
|
||||
<!-- <template slot-scope="props">-->
|
||||
<!-- <el-form label-position="left" class="demo-table-expand" style="margin-left: 20px">-->
|
||||
<!-- <el-form-item label="会员名称">-->
|
||||
<!-- <span>{{ props.row.name }}</span>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="会员手机号">-->
|
||||
<!-- <span>{{ props.row.mobile }}</span>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="操作人">-->
|
||||
<!-- <span>{{ props.row.realName || "--" }}</span>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="操作人手机号">-->
|
||||
<!-- <span>{{ props.row.staffMobile || "--" }}</span>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="储值优惠">-->
|
||||
<!-- <span>充值满{{ props.row.rechargeBalance }}元赠送{{ props.row.giftBalance }}元</span>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column type="index" width="50" align="center" label="序号"/>
|
||||
<el-table-column prop="name" label="会员名称" align="center"> </el-table-column>
|
||||
<el-table-column prop="mobile" label="会员手机号" align="center"> </el-table-column>
|
||||
<el-table-column prop="bidBalance" label="储值卡面值" align="center"> </el-table-column>
|
||||
<el-table-column prop="amount" label="自定义充值金额" align="center"> </el-table-column>
|
||||
<el-table-column prop="rechargeBalance" label="储值卡实售金额" align="center"> </el-table-column>
|
||||
<el-table-column prop="giftBalance" label="储值卡赠送金额" align="center"></el-table-column>
|
||||
<el-table-column prop="paymentType" label="支付方式" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{getType(payList,scope.row.paymentType)}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="payStatus" label="支付状态">
|
||||
<el-table-column prop="payStatus" label="支付状态" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.payStatus == 'unpaid'">未支付</el-tag>
|
||||
<el-tag type="success" v-else-if="scope.row.payStatus == 'paid'">已支付</el-tag>
|
||||
<el-tag type="danger" v-else>支付失败</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="realName" label="交易员工">
|
||||
<el-table-column prop="realName" label="交易员工" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.realName || "--"}}</span>
|
||||
<span>{{scope.row.realName || getStaffName(staffList,scope.row.mtStaffId)}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="充值备注">
|
||||
<el-table-column prop="remark" label="充值备注" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.remark ? scope.row.remark:"--" }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="fringeBenefit" label="附加福利">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{ scope.row.fringeBenefit ? scope.row.fringeBenefit:"--" }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="fringeBenefit" label="储值优惠" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>充值满{{ scope.row.rechargeBalance }}元赠送{{ scope.row.giftBalance }}元</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-button size="mini" type="text" icon="el-icon-edit">更多操作</el-button>-->
|
||||
@ -256,7 +269,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {cardValueRecordInfo, listCardValueRecord, orderStatisticsApi} from "@/api/cashier/cardvaluerecord";
|
||||
import {
|
||||
cardValueRecordInfo,
|
||||
listCardValueRecord,
|
||||
listCardValueRecords,
|
||||
orderStatisticsApi
|
||||
} from "@/api/cashier/cardvaluerecord";
|
||||
import {getDicts} from "@/api/dict/data";
|
||||
import {queryStaffs} from "@/api/cashier/staff";
|
||||
import {refundApi} from "@/api/cashier/refund";
|
||||
@ -301,7 +319,9 @@ export default {
|
||||
wechat:'',
|
||||
alipay:'',
|
||||
cash:'',
|
||||
}
|
||||
},
|
||||
// 是否为当天时间
|
||||
isSysDate:false,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -311,11 +331,24 @@ export default {
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
this.dateRange = [start,new Date()];
|
||||
this.isSysDate = true
|
||||
this.getList();
|
||||
this.getPayList();
|
||||
this.getOrderStatistics()
|
||||
},
|
||||
methods:{
|
||||
// 获取员工名称
|
||||
getStaffName(list,id){
|
||||
let name = "--"
|
||||
if (id){
|
||||
list.forEach(item => {
|
||||
if (item.id == id){
|
||||
name = item.realName
|
||||
}
|
||||
})
|
||||
}
|
||||
return name;
|
||||
},
|
||||
exportExcelVip() {
|
||||
exportExcelVipApi(this.queryParams).then(res=>{
|
||||
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
||||
@ -484,9 +517,20 @@ export default {
|
||||
if (val!=undefined){
|
||||
this.queryParams.pageNo = val
|
||||
}
|
||||
listCardValueRecord(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
||||
|
||||
let dateRange1 = this.dateRange
|
||||
let dateRange = []
|
||||
if (this.isSysDate){
|
||||
dateRange.push(dateRange1[0].toLocaleDateString())
|
||||
dateRange.push(dateRange1[1].toLocaleDateString())
|
||||
}else {
|
||||
dateRange = this.dateRange
|
||||
}
|
||||
|
||||
listCardValueRecords(this.addDateRange(this.queryParams, dateRange)).then( response => {
|
||||
this.list = response.data.records;
|
||||
this.total = response.data.total;
|
||||
this.isSysDate = false
|
||||
})
|
||||
},
|
||||
}
|
||||
|
@ -542,9 +542,9 @@
|
||||
// 判断token是否与当前连锁店id相同
|
||||
async getTheJudgmentIsTheSame() {
|
||||
// 判断是否登录
|
||||
if (!this.AppToken) {
|
||||
return;
|
||||
}
|
||||
// if (!this.AppToken) {
|
||||
// return;
|
||||
// }
|
||||
await request({
|
||||
url: 'chainStoreInfo/theJudgmentIsTheSame',
|
||||
method: 'get',
|
||||
|
Loading…
Reference in New Issue
Block a user