This commit is contained in:
wangh 2024-02-19 16:38:08 +08:00
commit a0629a80fa
31 changed files with 1319 additions and 319 deletions

View File

@ -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({

View File

@ -60,11 +60,11 @@
<el-form-item label="创建时间">
<el-date-picker
v-model="dateRange"
style="width: 240px"
style="width: 400px"
size="medium"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
type="datetimerange"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
@ -330,9 +330,18 @@ export default {
drawer:false,
//
record:{},
//
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()
},
@ -384,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();
},

View File

@ -21,13 +21,13 @@
<el-form-item label="交易时间">
<el-date-picker
v-model="dateRange"
style="width: 240px"
style="width: 400px"
size="medium"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
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:[],
//
@ -355,12 +391,18 @@ import {refundApi} from "@/api/order/refund";
}
},
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.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' });
@ -469,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){
@ -491,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)
},

View File

@ -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="68px">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="交易员工" prop="staffId">
<el-select
v-model="queryParams.staffId"
@ -49,11 +49,11 @@
<el-form-item label="交易时间">
<el-date-picker
v-model="dateRange"
style="width: 240px"
style="width: 400px"
size="medium"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
type="datetimerange"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
@ -75,15 +75,15 @@
</div>
<div class="box">
<div class="size-hui">总金额</div>
<div class="size-bole">{{orderStatistics.theTotalAmount}}</div>
<div class="size-bole">{{orderStatistics.theTotalAmount || 0}}</div>
</div>
<div class="box">
<div class="size-hui">商品总数量</div>
<div class="size-bole">{{orderStatistics.theTotalNumberOfUnits}}</div>
<div class="size-bole">{{orderStatistics.theTotalNumberOfUnits || 0}}</div>
</div>
<div class="box">
<div class="size-hui">优惠金额</div>
<div class="size-bole">{{orderStatistics.discountAmount}}</div>
<div class="size-bole">{{orderStatistics.discountAmount || 0}}</div>
</div>
<div class="box">
<div class="size-hui">微信</div>
@ -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,9 +285,18 @@ export default {
alipay:'0',
cash:'0',
},
//
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.getOrderStatistics();
this.getStaffList();
@ -409,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 = "商品详情"
})
},
//
@ -436,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;

View File

@ -71,11 +71,11 @@
<el-form-item label="交易时间">
<el-date-picker
v-model="dateRange"
style="width: 240px"
style="width: 400px"
size="medium"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
type="datetimerange"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
@ -366,10 +366,19 @@
wechat:'0',
alipay:'0',
cash:'0',
}
},
//
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.getStaffList();
this.getOrderStatistics();
this.getList();
@ -604,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
})
},
//

View File

@ -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:"&#45;&#45;" }}</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">-->
<!-- &lt;!&ndash; <el-button size="mini" type="text" icon="el-icon-edit">更多操作</el-button>&ndash;&gt;-->
@ -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
})
},
}

View File

@ -68,15 +68,15 @@
<el-row :gutter="10" class="mb8">
<el-col :span="21">
<span style="font-size: 18px">等级规则</span>
<span style="font-size: 14px">最多支持20个等级</span>
</el-col>
<el-col :span="3">
<el-button
type="primary"
icon="el-icon-plus"
@click="handleAdd"
>新增会员等级</el-button>
<!-- <span style="font-size: 14px">最多支持20个等级</span>-->
</el-col>
<!-- <el-col :span="3">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- icon="el-icon-plus"-->
<!-- @click="handleAdd"-->
<!-- >新增会员等级</el-button>-->
<!-- </el-col>-->
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
</el-row>
<el-table ref="tables" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
@ -199,12 +199,12 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- >删除</el-button>-->
</template>
</el-table-column>
</el-table>
@ -274,6 +274,174 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div style="font-size: 16px">
充值特权
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="是否充值送券" prop="ifRechargeCoupon">
<el-radio-group v-model="form.ifRechargeCoupon">
<!-- <el-radio-->
<!-- v-for="dict in dict.type.yhlx"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"></el-radio>-->
<el-radio label="0" value="0"></el-radio>
<el-radio label="1" value="1"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<div v-if="form.ifRechargeCoupon && form.ifRechargeCoupon=='1'">
<el-row>
<el-col :span="24">
<el-form-item label="赠送类型" prop="activeGift" >
<el-checkbox-group v-model="form.activeGift">
<el-checkbox label="1" >赠送优惠券</el-checkbox>
<el-checkbox label="2" >赠送兑换券</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row>
</div>
<!-- 选择优惠券-->
<div class="xh-box" v-if="form.activeGift && form.activeGift.indexOf('1')>-1 " >
<div class="box-bt"> <div >赠送卡券</div> <el-button type="primary" icon="el-icon-plus" @click="getlistFavorable()" >新增</el-button> </div>
<div style="margin: 10px 0px">
<el-table
:data="form.tableDatas"
border
style="width: 100%">
<el-table-column
prop="giftCardName"
label="卡券名称"
width="0">
</el-table-column>
<el-table-column
prop="giftCardType"
label="券类型"
width="80">
<template slot-scope="scope">
<span v-if="scope.row.giftCardType == 0" >油品券</span>
<span v-if="scope.row.giftCardType == 1" >商品券</span>
<span v-if="scope.row.giftCardType == 2" >通用券</span>
</template>
</el-table-column>
<el-table-column
prop="date"
label="券详情"
width="80">
<template slot-scope="scope">
<span>{{scope.row.giftCardDetail}}</span>
</template>
</el-table-column>
<el-table-column
prop="date"
label="有效期(天)"
width="240">
<template slot-scope="scope">
<span v-if="scope.row.timeType == 0" > <el-input-number v-model="scope.row.validityZero" controls-position="right" :min="1" :max="9999"></el-input-number> </span>
<span v-if="scope.row.timeType == 1" > <el-input-number v-model="scope.row.validityOne" controls-position="right" :min="1" :max="9999"></el-input-number> </span>
<span v-if="scope.row.timeType == 2" > <el-input-number v-model="scope.row.validityTwo" controls-position="right" :min="1" :max="9999"></el-input-number> </span>
</template>
</el-table-column>
<el-table-column
prop="date"
label="数量"
width="240">
<template slot-scope="scope">
<el-input-number v-model="scope.row.giftCardTotal" controls-position="right" :min="1" :max="9999"></el-input-number>
</template>
</el-table-column>
<el-table-column
prop="address"
label="操作">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
@click="deletedata(scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
<!-- 选择兑换券-->
<div class="xh-box" v-if="form.activeGift && form.activeGift.indexOf('2')>-1 " >
<div class="box-bt"> <div >选择兑换券</div> <el-button type="primary" icon="el-icon-plus" @click="getlistExchange()" >新增</el-button> </div>
<div style="margin: 10px 0px">
<el-table
:data="tableDatas"
border
style="width: 100%">
<el-table-column
prop="giftCardName"
label="卡券名称"
width="80">
</el-table-column>
<el-table-column
prop="date"
label="券类型"
width="80">
<template slot-scope="scope">
<span v-if="scope.row.giftCardType == 0" >油品券</span>
<span v-if="scope.row.giftCardType == 1" >商品券</span>
<span v-if="scope.row.giftCardType == 2" >通用券</span>
</template>
</el-table-column>
<el-table-column
prop="date"
label="券详情"
width="80">
<template slot-scope="scope">
<span>{{scope.row.giftCardDetail}}</span>
</template>
</el-table-column>
<el-table-column
prop="date"
label="有效期(天)"
width="240">
<template slot-scope="scope">
<span > <el-input-number v-model="scope.row.giftCardTime" controls-position="right" :min="1" :max="9999"></el-input-number> </span>
</template>
</el-table-column>
<el-table-column
prop="date"
label="数量"
width="240">
<template slot-scope="scope">
<el-input-number v-model="scope.row.giftCardTotal" controls-position="right" :min="1" :max="9999"></el-input-number>
</template>
</el-table-column>
<el-table-column
prop="address"
label="操作"
>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
@click="deletedhdata(scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
<el-row>
<el-col :span="24">
<div style="font-size: 16px">
@ -437,6 +605,135 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<el-dialog title="优惠券列表" :visible.sync="dialogTableVisible">
<div style="display: flex;align-items: center; margin-bottom: 20px ">
<el-input v-model="youhuiquan.name" placeholder="优惠券名称"></el-input>
<el-button type="primary" icon="el-icon-search" @click="getlistFavorable" >搜索</el-button>
</div>
<el-table
:data="tableData"
border
style="width: 100%">
<el-table-column
prop="name"
label="卡券名称"
width="100">
</el-table-column>
<el-table-column
prop="date"
label="券类型"
width="100">
<template slot-scope="scope">
<span v-if="scope.row.type == 0" >油品券</span>
<span v-if="scope.row.type == 1" >商品券</span>
<span v-if="scope.row.type == 2" >通用券</span>
</template>
</el-table-column>
<el-table-column
prop="date"
label="券详情"
width="100">
<template slot-scope="scope">
<span>{{scope.row.satisfiedAmount}} {{scope.row.discountAmount}} </span>
</template>
</el-table-column>
<el-table-column
prop="date"
label="有效期(天)"
width="180">
<template slot-scope="scope">
<span v-if="scope.row.timeType == 0" >{{scope.row.validityZero}} </span>
<span v-if="scope.row.timeType == 1" >{{scope.row.validityOne}} </span>
<span v-if="scope.row.timeType == 2" >{{scope.row.validityTwo}} </span>
</template>
</el-table-column>
<el-table-column
prop="address"
label="操作">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
@click="chosedata(scope.row)"
>选择</el-button>
</template>
</el-table-column>
</el-table>
<div><pagination
v-show="ytotal>0"
:total="ytotal"
:page.sync="youhuiquan.pageNum"
:limit.sync="youhuiquan.pageSize"
@pagination="getlistFavorable"
/></div>
</el-dialog>
<!-- 兑换券列表-->
<el-dialog title="兑换券列表" :visible.sync="dialogTableVisibledh">
<div style="display: flex;align-items: center; margin-bottom: 20px ">
<el-input v-model="duihuanquan.name" placeholder="兑换券名称"></el-input>
<el-button type="primary" icon="el-icon-search" @click="getlistExchange" >搜索</el-button>
</div>
<el-table
:data="tableDatadh"
border
style="width: 100%">
<el-table-column
prop="name"
label="卡券名称"
width="100">
</el-table-column>
<el-table-column
prop="date"
label="券类型"
width="100">
<template slot-scope="scope">
<span v-if="scope.row.type == 0" >油品券</span>
<span v-if="scope.row.type == 1" >商品券</span>
<span v-if="scope.row.type == 2" >通用券</span>
</template>
</el-table-column>
<el-table-column
prop="date"
label="使用说明"
width="100">
<template slot-scope="scope">
<span>{{scope.row.useInstructions}}</span>
</template>
</el-table-column>
<el-table-column
prop="date"
label="有效期(天)"
width="180">
<template slot-scope="scope">
<span >{{scope.row.validity}} </span>
</template>
</el-table-column>
<el-table-column
prop="address"
label="操作">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
@click="Favorabledata(scope.row)"
>选择</el-button>
</template>
</el-table-column>
</el-table>
<div><pagination
v-show="dtotal>0"
:total="dtotal"
:page.sync="duihuanquan.pageNum"
:limit.sync="duihuanquan.pageSize"
@pagination="getlistExchange"
/></div>
</el-dialog>
</div>
</template>
@ -453,11 +750,32 @@ import {
import {getChainStoreConfig, updateChainStoreConfig} from "@/api/staff/user/chainstoreconfig";
import {editSysConfig, getSysConfig} from "@/api/staff/user/sysconfig";
import {ljStoreInfo, updateStoreRule} from "@/api/staff/store";
import {listExchange, listFavorable} from "@/api/EventMarketing/activeConsumption";
export default {
name: "UserGradeIndex",
dicts: ['yhlx','zhzt','yhhdz'],
data() {
return {
tableDatas:[],//
tableDatadh:[],//
//
youhuiquan:{
name:'',
pageNum: 1,
pageSize: 10,
},
//
duihuanquan:{
name:'',
pageNum: 1,
pageSize: 10,
total:0
},
ytotal:0,
dtotal:0,
dialogTableVisible:false,
dialogTableVisibledh:false,//
tableData:[],
level1:true,
level2:false,
//
@ -526,7 +844,7 @@ export default {
form: { id: '', grade: "", name: '',gasoline:1,dieselOil:1,naturalGas:1,preferential:'自定义优惠',
gasolineDiscount:'无优惠',dieselDiscount:'无优惠',naturalGasDiscount:'无优惠',promotionGroup:'',
// catchCondition: '', userPrivilege: '', catchType: '', catchValue: '', validDay: '',discount: '', speedPoint: '',
status: 'qy' },
status: 'qy',tableDatas:[] },
//
queryParams: {
page: 1,
@ -535,6 +853,8 @@ export default {
catchType: '',
status: ''
},
pdidlist:[],//id
pddhidlist:[],//id
//
rules: {
grade: [
@ -547,6 +867,9 @@ export default {
growthValue: [
{ required: true, message: "请填写会员升级所需成长值", trigger: "blur" },
],
ifRechargeCoupon: [
{ required: true, message: "请选择充值时是否赠送优惠券或兑换券", trigger: "blur" },
],
gasoline: [
{ required: true, message: "请填写汽油成长值", trigger: "blur" },
],
@ -578,6 +901,124 @@ export default {
this.getISEnableLevel();
},
methods: {
//
deletedhdata(row){
if(this.tableDatas&&this.tableDatas.length>0){
let delIdx=-1;
for ( let item of this.tableDatas) {
delIdx++;
if (item.id===row.id){
break
}
}
this.pddhidlist.splice(delIdx,1);
this.tableDatas.splice(delIdx,1);
}
},
//
getlistExchange(){
this.tableDatadh = []
listExchange(this.duihuanquan).then(res=>{
if(res.code==200){
this.dialogTableVisibledh = true
this.tableDatadh = res.data.records
this.dtotal = res.data.total
}
})
},
//
Favorabledata(row){
this.dialogTableVisibledh = false
if(this.pddhidlist.indexOf(row.id)>-1 ){
this.$message.error("该兑换卡券已存在")
return
}
this.pddhidlist.push(row.id)
console.log(row)
let data ={
activeGift: 2, // 01 2. 3 4.
goodsIds: "", //id
goodsName:"" , //
goodsTotal: "", //
vouchersId:row.id, //id
giftCardName:row.name, //
giftCardType: row.type, //
validityZero: null,
validityOne: null,
validityTwo:null,
validity:row.validity,
giftCardDetail: row.useInstructions , //
giftCardTime: row.validity, //
giftCardTotal: 1 //
}
this.tableDatas.push(data)
this.$message.success("新增成功")
},
//
chosedata(row){
this.dialogTableVisible = false
if(this.pdidlist.indexOf(row.id)>-1 ){
this.$message.error("该优惠卡券已存在")
return
}
this.pdidlist.push(row.id)
let data ={
activeGift: 1, // 01 2. 3 4.
goodsIds: "", //id
goodsName:"" , //
goodsTotal: "", //
vouchersId:row.id, //id
giftCardName:row.name, //
giftCardType: row.type, //
timeType: row.timeType,
validityZero: row.validityZero,
validityOne: row.validityOne,
validityTwo:row.validityTwo,
giftCardDetail: "满"+ row.satisfiedAmount+"减 "+row.discountAmount+"元" , //
giftCardTime: "", //
giftCardTotal: 1//
}
// this.form.tableDatas.push(data)
this.$message.success("新增成功")
},
//
deletedata(row){
if(this.form.tableDatas&&this.form.tableDatas.length>0){
let delIdx=-1;
for ( let item of this.form.tableDatas) {
delIdx++;
if (item.id===row.id){
break
}
}
this.pdidlist.splice(delIdx,1);
this.form.tableDatas.splice(delIdx,1);
}
},
//
getlistFavorable(){
this.tableData = []
listFavorable(this.youhuiquan).then(res=>{
if(res.code == 200){
this.dialogTableVisible = true
this.tableData = res.data.records
this.ytotal = res.data.total
}
})
},
//
getISEnableLevel(){
getChainStoreConfig().then(response => {
@ -782,6 +1223,7 @@ export default {
this.form.gasolineRule = JSON.stringify(this.gasolinePreferential)
this.form.dieselRule = JSON.stringify(this.dieselPreferential)
this.form.naturalGasRule = JSON.stringify(this.naturalGasPreferential)
this.form.activeGift = this.form.activeGift.toString()
if (this.form.id) {
updateUserGrade(this.form).then(response => {
if (response.data==1) {
@ -828,6 +1270,11 @@ export default {
this.gasolinePreferential = JSON.parse(this.form.gasolineRule)
this.dieselPreferential = JSON.parse(this.form.dieselRule)
this.naturalGasPreferential = JSON.parse(this.form.naturalGasRule)
if (response.data.activeGift){
_this.form.activeGift = response.data.activeGift.split(",")
}else {
_this.form.activeGift = []
}
this.open = true;
this.title = "编辑会员等级";
});

View File

@ -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

View File

@ -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;
}
}

View File

@ -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);
}

View File

@ -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') &gt;= 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') &lt;= date_format(#{cardValueRecord.params.endTime},'%y%m%d')
</if>
</where>
order by create_time desc
</select>
</mapper>

View File

@ -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);
}

View File

@ -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);
}
}

View File

@ -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;
/**

View File

@ -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){

View File

@ -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;
}

View File

@ -84,6 +84,13 @@ public class LJUserGrade extends BaseEntity implements Serializable {
@ApiModelProperty("优惠活动组")
private String promotionGroup;
@ApiModelProperty("是否充值送券0否1是")
private String ifRechargeCoupon;
/**
* 赠送类型1赠送优惠券2赠送兑换券
*/
private String activeGift;
@TableField(exist = false)
private List<JSONObject> gasolineRuleList;

View File

@ -95,6 +95,12 @@ public interface LJUserGradeService extends IService<LJUserGrade> {
*/
public int insertUserGrade(LJUserGrade userGrade,Integer storeId);
/**
* 添加固定四个等级的会员等级信息
* @param storeId
*/
void addUserGrade(Integer storeId,Integer chainStoreId);
List<LJUserGrade> selectUserGradeByChainStoreId(Integer chainStoreId);
/**

View File

@ -204,6 +204,38 @@ public class LJUserGradeServiceImpl extends ServiceImpl<LJUserGradeMapper, LJUse
return row;
}
@Override
public void addUserGrade(Integer storeId,Integer chainStoreId) {
LJUserGrade userGrade = new LJUserGrade();
userGrade.setStoreId(storeId);
userGrade.setChainStoreId(chainStoreId);
userGrade.setGrade(1);
userGrade.setName("普通会员");
userGrade.setGrowthValue(100);
userGrade.setStatus("qy");
userGrade.setIfRechargeCoupon("0");
userGrade.setPreferential("自定义优惠");
userGrade.setGasolineDiscount("无优惠");
userGrade.setGasolineRule("[{\"gasolineRule1\":1,\"gasolineRule2\":1,\"gasolineRule3\":1}]");
userGrade.setDieselDiscount("无优惠");
userGrade.setDieselRule("[{\"dieselRule1\":1,\"dieselRule2\":1,\"dieselRule3\":1}]");
userGrade.setNaturalGasDiscount("无优惠");
userGrade.setNaturalGasRule("[{\"naturalGas1\":1,\"naturalGas2\":1,\"naturalGas3\":1}]");
this.insertUserGrade(userGrade,storeId);
userGrade.setGrade(2);
userGrade.setName("白金会员");
userGrade.setGrowthValue(200);
this.insertUserGrade(userGrade,storeId);
userGrade.setGrade(3);
userGrade.setName("黄金会员");
userGrade.setGrowthValue(300);
this.insertUserGrade(userGrade,storeId);
userGrade.setGrade(4);
userGrade.setName("钻石会员");
userGrade.setGrowthValue(400);
this.insertUserGrade(userGrade,storeId);
}
@Override
public List<LJUserGrade> selectUserGradeByChainStoreId(Integer chainStoreId) {
QueryWrapper queryWrapper = new QueryWrapper();

View File

@ -260,21 +260,22 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper,SysDept> imple
// 判断当前连锁店是否存在会员等级信息 不存在则添加一个默认的等级
List<LJUserGrade> ljUserGrades = userGradeService.selectUserGradeByChainStoreId(chainStoreInfo.getId());
if (ljUserGrades.size()==0){
LJUserGrade userGrade = new LJUserGrade();
userGrade.setStoreId(store.getId());
userGrade.setChainStoreId(chainStoreInfo.getId());
userGrade.setGrade(1);
userGrade.setName("普通会员");
userGrade.setStatus("qy");
userGrade.setGrowthValue(1);
userGrade.setPreferential("自定义优惠");
userGrade.setGasolineDiscount("无优惠");
userGrade.setGasolineRule("[{\"gasolineRule1\":1,\"gasolineRule2\":1,\"gasolineRule3\":1}]");
userGrade.setDieselDiscount("无优惠");
userGrade.setDieselRule("[{\"dieselRule1\":1,\"dieselRule2\":1,\"dieselRule3\":1}]");
userGrade.setNaturalGasDiscount("无优惠");
userGrade.setNaturalGasRule("[{\"naturalGas1\":1,\"naturalGas2\":1,\"naturalGas3\":1}]");
userGradeService.insertUserGrade(userGrade,store.getId());
// LJUserGrade userGrade = new LJUserGrade();
// userGrade.setStoreId(store.getId());
// userGrade.setChainStoreId(chainStoreInfo.getId());
// userGrade.setGrade(1);
// userGrade.setName("普通会员");
// userGrade.setStatus("qy");
// userGrade.setGrowthValue(100);
// userGrade.setPreferential("自定义优惠");
// userGrade.setGasolineDiscount("无优惠");
// userGrade.setGasolineRule("[{\"gasolineRule1\":1,\"gasolineRule2\":1,\"gasolineRule3\":1}]");
// userGrade.setDieselDiscount("无优惠");
// userGrade.setDieselRule("[{\"dieselRule1\":1,\"dieselRule2\":1,\"dieselRule3\":1}]");
// userGrade.setNaturalGasDiscount("无优惠");
// userGrade.setNaturalGasRule("[{\"naturalGas1\":1,\"naturalGas2\":1,\"naturalGas3\":1}]");
// userGradeService.insertUserGrade(userGrade,store.getId());
userGradeService.addUserGrade(store.getId(),chainStoreInfo.getId());
}

View File

@ -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({

View File

@ -599,7 +599,7 @@
style="display: flex;margin: 13px 5px;box-sizing: border-box;flex-wrap: wrap; ">
<div class="mon"
v-for="(item,index) in cardValueList" :key="index"
:class="activeKey === index ? 'select' : ''"
:class="activeKey === index ? 'select2' : ''"
@click="rechargeCard(index)">
<div class="top1"><span class="amount1">{{ item.rechargeBalance }}</span></div>
<div>赠送<span class="amount">{{ item.giftBalance }}</span></div>
@ -607,7 +607,7 @@
</div>
<div style="font-size: 16px;width: 30%;margin-left: 13px;margin-top: 8px;"
:class="activeKey === cardValueList.length ? 'select' : ''"
:class="activeKey === cardValueList.length ? 'select2' : ''"
@click="rechargeCard(cardValueList.length,-1)">
<el-input placeholder="请输入充值金额"
size="medium"
@ -730,7 +730,7 @@
<div style="display: flex;margin: 20px 5px;box-sizing: border-box;flex-wrap: wrap;">
<div class="mon2"
v-for="(item,index) in cardFuelDieselList" :key="index"
:class="activeKey === index ? 'select' : ''"
:class="activeKey === index ? 'select2' : ''"
@click="recharge(index)">
<div class="top1"><span class="amount1">{{ item.incomeLitres }}</span>L</div>
<div>售价<span class="amount">{{ item.rechargeBalance }}</span></div>
@ -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;
@ -4410,7 +4408,7 @@
color: #00afff;
font-size: 20px;
}
.select {
.select2 {
position: relative;
background-color: #fff;
box-shadow: 0px 2px 7px 0px rgba(85, 110, 97, 0.35);
@ -4418,7 +4416,7 @@
border: 1px solid #00aaff;
}
.select:before {
.select2:before {
content: '';
position: absolute;
right: 0;
@ -4427,7 +4425,7 @@
border-top-color: transparent;
border-left-color: transparent;
}
.select:after {
.select2:after {
content: '';
width: 4px;
height: 6px;

View File

@ -60,10 +60,10 @@
<el-form-item label="创建时间">
<el-date-picker
v-model="dateRange"
style="width: 240px"
style="width: 400px"
size="medium"
value-format="yyyy-MM-dd"
type="daterange"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
@ -331,9 +331,18 @@ import {exportExcelCashierApi, exportExcelHangBillApi} from "@/api/order/exportE
drawer:false,
//
record:{},
//
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()
},
@ -393,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();
},

View File

@ -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:[],
//
@ -452,6 +486,13 @@ import {formatDate} from "@/utils";
}
},
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.getOrderStatistics();
this.getStaffList();
@ -699,11 +740,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){
@ -724,7 +765,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){
@ -732,23 +774,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)
},

View File

@ -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="68px">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="交易员工" prop="staffId">
<el-select
v-model="queryParams.staffId"
@ -49,10 +49,10 @@
<el-form-item label="交易时间">
<el-date-picker
v-model="dateRange"
style="width: 240px"
style="width: 400px"
size="medium"
value-format="yyyy-MM-dd"
type="daterange"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
@ -75,15 +75,15 @@
</div>
<div class="box">
<div class="size-hui">总金额</div>
<div class="size-bole">{{orderStatistics.theTotalAmount}}</div>
<div class="size-bole">{{orderStatistics.theTotalAmount || 0}}</div>
</div>
<div class="box">
<div class="size-hui">商品总数量</div>
<div class="size-bole">{{orderStatistics.theTotalNumberOfUnits}}</div>
<div class="size-bole">{{orderStatistics.theTotalNumberOfUnits || 0}}</div>
</div>
<div class="box">
<div class="size-hui">优惠金额</div>
<div class="size-bole">{{orderStatistics.discountAmount}}</div>
<div class="size-bole">{{orderStatistics.discountAmount || 0}}</div>
</div>
<div class="box">
<div class="size-hui">微信</div>
@ -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,9 +340,18 @@ export default {
alipay:'0',
cash:'0',
},
//
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.getOrderStatistics();
this.getStaffList();
@ -555,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 = "商品详情"
})
},
//
@ -582,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
})
},
//

View File

@ -71,10 +71,10 @@
<el-form-item label="交易时间">
<el-date-picker
v-model="dateRange"
style="width: 240px"
style="width: 400px"
size="medium"
value-format="yyyy-MM-dd"
type="daterange"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
@ -166,7 +166,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="terminal" label="终端" align="center" width="80">
<template slot-scope="props">
<span>{{ getVal(terminalList,props.row.terminal) }}</span>
@ -384,10 +384,19 @@
wechat:'0',
alipay:'0',
cash:'0',
}
},
//
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.getStaffList();
this.getOrderStatistics();
this.getList();
@ -652,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
})
},
//

View File

@ -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: 240px"-->
<!-- size="medium"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- type="daterange"-->
<!-- 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 || "&#45;&#45;" }}</span>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="操作人手机号">-->
<!-- <span>{{ props.row.staffMobile || "&#45;&#45;" }}</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:"&#45;&#45;" }}</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,15 +319,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' });
@ -478,9 +517,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
})
},
}

View File

@ -542,9 +542,9 @@
// tokenid
async getTheJudgmentIsTheSame() {
//
if (!this.AppToken) {
return;
}
// if (!this.AppToken) {
// return;
// }
await request({
url: 'chainStoreInfo/theJudgmentIsTheSame',
method: 'get',

View File

@ -78,6 +78,12 @@
<view class="hui-size">交易时间</view>
<view class="">{{oilOrder.payTime}}</view>
</view>
<view class="box-title" v-if="oilOrder.orderStatus=='paid' && oilOrder.remark">订单评价</view>
<view class="dis-fx" v-if="oilOrder.orderStatus=='paid' && oilOrder.remark">
<view class="hui-size">订单评价</view>
<view class="">{{ oilOrder.remark }}</view>
</view>
</view>
<view class="anniu" v-if="oilOrder.orderStatus=='paid' && oilOrder.remark==null || oilOrder.orderStatus=='paid' && oilOrder.remark==''" @click="gocomment()">
@ -189,7 +195,7 @@
},
gocomment() {
uni.navigateTo({
url: '/pagesMy/comment/comment?orderId=' + this.orderId
url: '/pagesMy/comment/comment?orderId=' + this.oilOrder.id
})
},
goback() {

View File

@ -350,8 +350,11 @@
// method: 'post',
// data: _this.preferentialData,
// }).then((res)=>{})
uni.reLaunch({
url: '/pagesRefuel/orderSuccess/index'
// uni.reLaunch({
// url: '/pagesRefuel/orderSuccess/index'
// })
uni.navigateTo({
url: '/pagesRefuel/orderSuccess/index?orderNo='+_this.orderNo,
})
return;
}
@ -390,8 +393,12 @@
// }).then((res)=>{
// console.log(res);
// })
uni.reLaunch({
url: '/pagesRefuel/orderSuccess/index'
// uni.reLaunch({
// url: '/pagesRefuel/orderSuccess/index'
// })
uni.navigateTo({
url: '/pagesRefuel/orderSuccess/index?orderNo='+_this.orderNo,
})
},
fail: function (err) {
@ -423,8 +430,12 @@
// method: 'post',
// data: _this.preferentialData,
// }).then((res)=>{})
uni.reLaunch({
url: '/pagesRefuel/orderSuccess/index'
// uni.reLaunch({
// url: '/pagesRefuel/orderSuccess/index'
// })
uni.navigateTo({
url: '/pagesRefuel/orderSuccess/index?orderNo='+_this.orderNo,
})
}else{
request({

View File

@ -16,7 +16,9 @@
您已完成支付<br/>
谢谢您对来个油惠的支持
</view>
<view @click="goBack" style="border: solid 1px #30a1ff;border-radius: 50px;margin: 20px auto;width: 150px;
<view v-if="orderNo" @click="goOrderInfo" style="border: solid 1px #30a1ff;border-radius: 50px;margin: 20px auto;width: 150px;
height: 40px;line-height: 40px;color: #30a1ff;">{{timestamp}}s后去评价</view>
<view v-else @click="goBack" style="border: solid 1px #30a1ff;border-radius: 50px;margin: 20px auto;width: 150px;
height: 40px;line-height: 40px;color: #30a1ff;">{{timestamp}}s后返回首页</view>
</view>
</view>
@ -29,12 +31,22 @@
return {
timestamp:3,
timer:{},
orderNo:"",
}
},
onLoad() {
onLoad(e) {
if (e.orderNo){
this.orderNo = e.orderNo
}
this.countdown()
},
methods: {
goOrderInfo(){
clearInterval(this.timer)
uni.navigateTo({
url: '/pagesMy/details/details?orderNo=' + this.orderNo,
})
},
//
countdown(){
let _this = this
@ -43,7 +55,12 @@
_this.timestamp--;
// 0
if(_this.timestamp === 0) {
_this.goBack()
if (_this.orderNo){
_this.goOrderInfo()
}else{
_this.goBack()
}
clearInterval(this.timer)
_this.timestamp = 3
}