Merge branch 'master' of https://gitee.com/nny_1/oilSystem
This commit is contained in:
commit
c4cad9159b
@ -9,6 +9,15 @@ export function listCashierOrder(query) {
|
||||
})
|
||||
}
|
||||
|
||||
// 查询收银台订单列表
|
||||
export function cashierOrderSeekZeroAmount(query) {
|
||||
return request({
|
||||
url: '/business/cashierOrder/seekZeroAmount',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 根据id查询收银台订单列表
|
||||
export function cashierOrder(id) {
|
||||
return request({
|
||||
|
@ -80,3 +80,11 @@ export function orderStatisticsApi(query) {
|
||||
}
|
||||
|
||||
|
||||
// 查询油罐信息
|
||||
export function getOilNumberGun() {
|
||||
return request({
|
||||
url: '/business/petrolStationManagement/oilGun/selectByNumberTGUn',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -62,10 +62,14 @@
|
||||
<!-- <el-table-column label="员工id" align="center" prop="mtStaffId" />-->
|
||||
<!-- <el-table-column label="兑换券id" align="center" prop="cardExchangeId" />-->
|
||||
|
||||
<el-table-column label="序号" align="center" prop="mtUserId" />
|
||||
<!-- <el-table-column label="序号" align="center" prop="mtUserId" />-->
|
||||
<el-table-column
|
||||
type="index"
|
||||
width="50">
|
||||
</el-table-column>
|
||||
<el-table-column label="手机号码" align="center" prop="mobile" />
|
||||
<el-table-column label="姓名" align="center" prop="name" />
|
||||
<el-table-column label="头像" align="center" prop="photo" />
|
||||
<!-- <el-table-column label="头像" align="center" prop="photo" />-->
|
||||
<el-table-column label="核销人手机号" align="center" prop="staffMobile" />
|
||||
<el-table-column label="核销人姓名" align="center" prop="realName" />
|
||||
<el-table-column label="开始时间" align="center" prop="startTime" width="180">
|
||||
|
@ -269,20 +269,20 @@
|
||||
<el-radio label="1">参数二维码</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="奖励显示" prop="rewardDisplay">
|
||||
<!-- <el-form-item label="奖励显示" prop="rewardDisplay">
|
||||
<el-radio-group v-model="ruleForm.rewardDisplay">
|
||||
<el-radio label="0">优惠券总额</el-radio>
|
||||
<el-radio label="1">成长值总额</el-radio>
|
||||
<el-radio label="2">积分总额</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="活动规则" prop="activeRule">
|
||||
<el-input type="textarea" v-model="ruleForm.activeRule"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动状态" prop="status">
|
||||
<el-radio-group v-model="ruleForm.status">
|
||||
<el-radio label="0">进行中</el-radio>
|
||||
<el-radio label="1">待生效</el-radio>
|
||||
<!-- <el-radio label="1">待生效</el-radio>-->
|
||||
<el-radio label="2">已结束</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
@ -49,16 +49,19 @@
|
||||
<!-- </el-row>-->
|
||||
|
||||
<el-table v-loading="loading" :data="recordList" @selection-change="handleSelectionChange">
|
||||
<el-table-column label="序号" align="center" prop="mtUserId" />
|
||||
<el-table-column
|
||||
type="index"
|
||||
width="50">
|
||||
</el-table-column>
|
||||
<el-table-column label="手机号码" align="center" prop="mobile" />
|
||||
<el-table-column label="名字" align="center" prop="name" />
|
||||
<el-table-column label="头像" align="center" prop="photo" >
|
||||
<!-- <el-table-column label="头像" align="center" prop="photo" >
|
||||
|
||||
<template slot-scope="scope">
|
||||
<el-avatar size="medium" :src="imgUrl + scope.row.photo"></el-avatar>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>-->
|
||||
|
||||
<el-table-column label="开始时间" align="center" prop="startTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="认证会员" name="member">
|
||||
<el-tab-pane label="认证企业会员" name="member">
|
||||
<el-form :model="queryParam" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="手机号" prop="mobile">
|
||||
<el-input
|
||||
@ -31,7 +31,7 @@
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.rzzt"
|
||||
v-for="dict in dict.type.zhzt"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
@ -56,7 +56,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="固定等级认证" name="fixingLevel">
|
||||
<el-tab-pane label="设置企业会员等级" name="fixingLevel">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="等级状态" prop="status">
|
||||
<el-select
|
||||
@ -146,7 +146,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.rzzt" :value="scope.row.status"/>
|
||||
<dict-tag :options="dict.type.zhzt" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="120" fixed='right'>
|
||||
@ -531,7 +531,7 @@
|
||||
<el-radio-group v-model="form1.status">
|
||||
<el-radio label="enable">启用</el-radio>
|
||||
<el-radio label="disable">禁用</el-radio>
|
||||
<el-radio label="dsh">待审核</el-radio>
|
||||
<!-- <el-radio label="dsh">待审核</el-radio>-->
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -65,6 +65,10 @@
|
||||
<div class="size-hui">商品总金额</div>
|
||||
<div class="size-bole">{{ orderStatistics.theTotalAmountOfTheItem?orderStatistics.theTotalAmountOfTheItem:0 }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">找零总金额</div>
|
||||
<div class="size-bole">{{ seekZeroAmount }}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
@ -94,6 +98,7 @@
|
||||
<el-table-column prop="orderNo" label="订单号" width="220"> </el-table-column>
|
||||
<el-table-column prop="amount" label="订单金额"> </el-table-column>
|
||||
<el-table-column prop="payAmount" label="实付金额"> </el-table-column>
|
||||
<el-table-column prop="seekZero" label="找零金额"> </el-table-column>
|
||||
<el-table-column label="订单金额组成">
|
||||
<el-table-column prop="oilOrderAmount" label="油品金额">
|
||||
<template slot-scope="scope">
|
||||
@ -167,17 +172,27 @@
|
||||
<el-descriptions-item label="油品优惠总额">{{ cashierOrder.oilDiscountAmount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="商品优惠总额">{{ cashierOrder.goodsDiscountAmount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="实付金额">{{ cashierOrder.payAmount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="找零金额">{{ cashierOrder.seekZero }}</el-descriptions-item>
|
||||
<el-descriptions-item label="付款方式">
|
||||
<span v-if="cashierOrder.payType == 'CASH'">现金</span>
|
||||
<span v-else-if="cashierOrder.payType == 'WECHAT'">微信</span>
|
||||
<span v-else-if="cashierOrder.payType == 'ALIPAY'">支付宝</span>
|
||||
<span v-else-if="cashierOrder.payType == 'UNIONPAY'">银联二维码</span>
|
||||
<span v-else>小程序码</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="付款状态">
|
||||
<el-tag v-if="cashierOrder.status == 'unpaid'">未支付</el-tag>
|
||||
<el-tag type="success" v-else-if="cashierOrder.status == 'paid'">已支付</el-tag>
|
||||
<el-tag type="danger" v-else>支付失败</el-tag>
|
||||
<el-tag type="warning" v-else-if="cashierOrder.status == 'payFail'">支付失败</el-tag>
|
||||
<el-tag type="danger" v-else-if="cashierOrder.status == 'refund'">已退款</el-tag>
|
||||
<el-tag type="info" v-else>退款中</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="交易时间">
|
||||
{{ cashierOrder.payTime ? parseTime(cashierOrder.payTime):"--" }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<div>
|
||||
<div style="margin-top: 30px">
|
||||
<el-descriptions :column="1" direction="vertical">
|
||||
<el-descriptions-item label="油品详情">
|
||||
<el-table
|
||||
@ -262,7 +277,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {cashierOrder, listCashierOrder, orderStatisticsApi} from "@/api/order/cashierorder";
|
||||
import {cashierOrder, cashierOrderSeekZeroAmount, listCashierOrder, orderStatisticsApi} from "@/api/order/cashierorder";
|
||||
import {queryStaffs} from "@/api/order/staff";
|
||||
import {oilOrderList, oilOrders} from "@/api/order/oilorder";
|
||||
import {getOilNameList} from "@/api/order/oilnumgun";
|
||||
@ -308,6 +323,7 @@ import {refundApi} from "@/api/order/refund";
|
||||
theTotalAmountOfTheItem:'0',
|
||||
},
|
||||
total:0,
|
||||
seekZeroAmount:0,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -451,6 +467,17 @@ import {refundApi} from "@/api/order/refund";
|
||||
this.orderList = response.data.records;
|
||||
this.total = response.data.total;
|
||||
})
|
||||
this.getSeekZero(val)
|
||||
},
|
||||
getSeekZero(val){
|
||||
if (val!=undefined){
|
||||
this.queryParams.page = val
|
||||
}
|
||||
cashierOrderSeekZeroAmount(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
||||
if (response.data) {
|
||||
this.seekZeroAmount = response.data
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取员工列表信息
|
||||
getStaffList(){
|
||||
|
@ -157,6 +157,9 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button style="width: 60px" size="mini"
|
||||
@click="patchwork(scope.row)"
|
||||
type="primary" plain round>补打</el-button>
|
||||
<el-button style="width: 60px" size="mini"
|
||||
v-if = "scope.row.status === 'paid'"
|
||||
@click="handleRefund(scope.row.id)"
|
||||
@ -302,7 +305,15 @@ export default {
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
// 补打
|
||||
patchwork(data){
|
||||
const orderNo = data.orderNo
|
||||
this.$modal.confirm('确定您要补打当前订单吗?当前订单号[' + orderNo + '],请确保云打印机正在运行中').then(function() {
|
||||
// return delUser(row.id);
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess("打印指令已发送打印机,请查看打印结果");
|
||||
}).catch(() => {});
|
||||
},
|
||||
// 退款
|
||||
async handleRefund(id){
|
||||
|
||||
|
@ -153,10 +153,13 @@
|
||||
<el-form-item label="来源终端">
|
||||
<span>{{ getVal(terminalList,props.row.terminal) }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单备注">
|
||||
<el-form-item label="用户评价">
|
||||
<span>{{ props.row.remark ? props.row.remark:"--" }}</span>
|
||||
<div style="color: grey;font-size: 12px">订单备注为系统后台操作备注信息,非用户提交信息</div>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="订单备注">-->
|
||||
<!-- <span>{{ props.row.remark ? props.row.remark:"--" }}</span>-->
|
||||
<!-- <div style="color: grey;font-size: 12px">订单备注为系统后台操作备注信息,非用户提交信息</div>-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -193,7 +196,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column prop="invoicing" label="开票标识" align="center" > </el-table-column>
|
||||
<el-table-column prop="orderType" label="订单类型" align="center" > </el-table-column>
|
||||
|
||||
<el-table-column label="交易时间" align="center" width="160" prop="payTime">
|
||||
<template slot-scope="scope">
|
||||
@ -201,14 +204,14 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button style="width: 60px" size="mini"
|
||||
@click="patchwork(scope.row)"
|
||||
type="primary" plain round>补打</el-button>
|
||||
<el-button style="width: 60px" size="mini"
|
||||
@click="handleRefund(scope.row.id)"
|
||||
v-if = "scope.row.status === 'paid'"
|
||||
v-if = "scope.row.orderStatus === 'paid'"
|
||||
type="danger" plain round>退款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -256,6 +259,42 @@
|
||||
<el-button type="primary" @click="refundConfirmed()">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 支付成功后小票打印内容-->
|
||||
<div id="reportSuccess" ref="report" class="box-center" v-show="false">
|
||||
<div class="box-title">订单统计</div>
|
||||
<div class="box-ge">
|
||||
<div class="input-box">
|
||||
<div>{{ getName(oilNameList,oilOrder.oils) }}/{{ getName1(oilGunList,oilOrder.oilGunNum) }}</div>
|
||||
<div>¥{{ oilOrder.amount }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>支付方式</div>
|
||||
<div v-if="oilOrder.payType == 'CASH'">现金</div>
|
||||
<div v-else-if="oilOrder.payType == 'WECHAT'">微信</div>
|
||||
<div v-else-if="oilOrder.payType == 'ALIPAY'">支付宝</div>
|
||||
<div v-else-if="oilOrder.payType == 'UNIONPAY'">银联二维码</div>
|
||||
<div v-else>小程序码</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>合计</div>
|
||||
<div>¥{{ oilOrder.orderAmount }}</div>
|
||||
</div>
|
||||
<div class="input-box" v-if="oilOrder.discountAmount>0">
|
||||
<div>优惠合计</div>
|
||||
<div>¥{{ oilOrder.discountAmount }}</div>
|
||||
</div>
|
||||
<div class="input-box" v-if="oilOrder.orderStatus=='paid'">
|
||||
<div>储值卡或囤油卡付款</div>
|
||||
<div>¥{{ (oilOrder.orderAmount - oilOrder.discountAmount - oilOrder.payAmount).toFixed(2) }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>实付款</div>
|
||||
<div>¥{{ oilOrder.payAmount }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -326,6 +365,86 @@
|
||||
this.getUserList();
|
||||
},
|
||||
methods:{
|
||||
async printLocally() {
|
||||
//初始化打印函数
|
||||
let LODOP = getLodop(); // 初始化打印
|
||||
LODOP.PRINT_INIT();
|
||||
var bodyStyle = `<style>
|
||||
.input-box{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
}
|
||||
.box-ge{
|
||||
border-bottom: 1px solid #000000 ;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
}
|
||||
.box-title{
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
margin-top: 15px;
|
||||
}
|
||||
.input-hui{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 15px 0px;
|
||||
background: #b2b2b2;
|
||||
box-sizing: border-box;
|
||||
padding: 5px 0px;
|
||||
}
|
||||
.input-hui-frou{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 15px 0px;
|
||||
background: #b2b2b2;
|
||||
box-sizing: border-box;
|
||||
padding: 5px 0px;
|
||||
div{
|
||||
width: 25%;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
.input-box-frou{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
div{
|
||||
width: 25%;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
.box-center{
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
`
|
||||
var fromHtml = bodyStyle+this.$refs.report.innerHTML
|
||||
|
||||
|
||||
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
|
||||
|
||||
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW",true);
|
||||
|
||||
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||
// let preview = LODOP.PREVIEW();
|
||||
// console.log("preview",preview);
|
||||
LODOP.PRINT();
|
||||
|
||||
},
|
||||
exportExcelOilOrder() {
|
||||
exportExcelOilOrderApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
||||
|
@ -48,24 +48,24 @@
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">订单总金额</div>
|
||||
<div class="size-bole">{{ orderStatistics.theTotalAmountOfTheOrder }}</div>
|
||||
<div class="size-bole">{{ orderStatistics.theTotalAmountOfTheOrder || 0 }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">实付总金额</div>
|
||||
<div class="size-bole">{{ orderStatistics.theTotalAmountPaid }}</div>
|
||||
<div class="size-bole">{{ orderStatistics.theTotalAmountPaid || 0 }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">油品优惠</div>
|
||||
<div class="size-bole">{{ orderStatistics.oilDiscounts }}</div>
|
||||
<div class="size-bole">{{ orderStatistics.oilDiscounts || 0 }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">油品总金额</div>
|
||||
<div class="size-bole">{{ orderStatistics.theTotalAmountOfOil }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">商品总金额</div>
|
||||
<div class="size-bole">{{ orderStatistics.theTotalAmountOfTheItem?orderStatistics.theTotalAmountOfTheItem:0 }}</div>
|
||||
<div class="size-bole">{{ orderStatistics.theTotalAmountOfOil || 0 }}</div>
|
||||
</div>
|
||||
<!-- <div class="box">-->
|
||||
<!-- <div class="size-hui">商品总金额</div>-->
|
||||
<!-- <div class="size-bole">{{ orderStatistics.theTotalAmountOfTheItem?orderStatistics.theTotalAmountOfTheItem:0 }}</div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
@ -90,6 +90,9 @@
|
||||
<el-form-item label="收银员">
|
||||
<span>{{ getMobile(staffList,props.row.staffId) }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户评价">
|
||||
<span>{{ props.row.remark ? props.row.remark:"--" }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -126,7 +129,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column prop="invoicing" label="开票标识" align="center" > </el-table-column>
|
||||
<!-- <el-table-column prop="invoicing" label="开票标识" align="center" > </el-table-column>-->
|
||||
|
||||
<el-table-column label="交易时间" align="center" width="160" prop="payTime">
|
||||
<template slot-scope="scope">
|
||||
|
@ -55,7 +55,7 @@
|
||||
:label="item.gunName"
|
||||
:value="item.id">
|
||||
<span style="float: left">{{ item.oilName }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.gunName }}号枪</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.gunName }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -144,7 +144,11 @@
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="terminal" label="终端" align="center" width="80"></el-table-column>
|
||||
<el-table-column prop="terminal" label="终端" align="center" width="80">
|
||||
<template slot-scope="props">
|
||||
<span>{{ getVal(terminalList,props.row.terminal) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="oils" label="油品/油枪" align="center">
|
||||
<template slot-scope="props">
|
||||
<span>{{ getName(oilNameList,props.row.oils) }}/{{ getName1(oilGunList,props.row.oilGunNum) }}</span>
|
||||
@ -166,10 +170,10 @@
|
||||
|
||||
<el-table-column prop="createTime" label="交易时间" align="center"></el-table-column>
|
||||
|
||||
<el-table-column prop="orderStatus" label="支付状态">
|
||||
<el-table-column prop="orderStatus" label="支付状态" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.orderStatus == 'unpaid'">未支付</el-tag>
|
||||
<el-tag type="info" v-else>支付失败</el-tag>
|
||||
<!-- <el-tag type="info" v-else>支付失败</el-tag>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@ -204,7 +208,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {listOilOrder,orderStatisticsApi} from "@/api/order/oilorder";
|
||||
import {getOilNumberGun, listOilOrder, orderStatisticsApi} from "@/api/order/oilorder";
|
||||
import {getDicts} from "@/api/order/data";
|
||||
import {getOilNameList, getOilNumGun} from "@/api/order/oilnumgun";
|
||||
import {queryStaffs} from "@/api/order/staff";
|
||||
@ -218,7 +222,7 @@
|
||||
queryParams: {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
orderStatus:"paid",
|
||||
orderStatus:"unpaid",
|
||||
},
|
||||
// 总条数
|
||||
total:0,
|
||||
@ -251,6 +255,7 @@
|
||||
cash:'0',
|
||||
},
|
||||
oilGunList:[],
|
||||
terminalList:[],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -267,6 +272,15 @@
|
||||
this.$download.saveAs(blob,'未支付订单统计.xLsx')
|
||||
})
|
||||
},
|
||||
getVal(list,val){
|
||||
let name = "";
|
||||
list.forEach(item => {
|
||||
if (item.dictValue == val){
|
||||
name = item.dictLabel
|
||||
}
|
||||
})
|
||||
return name;
|
||||
},
|
||||
// 获取油枪信息
|
||||
getOilGunList(){
|
||||
getOilNumberGun().then(res => {
|
||||
@ -362,6 +376,9 @@
|
||||
queryStaffs().then( response => {
|
||||
this.staffList = response.data;
|
||||
})
|
||||
getDicts("terminal").then( response => {
|
||||
this.terminalList = response.data;
|
||||
})
|
||||
},
|
||||
// 获取列表信息
|
||||
getList(val){
|
||||
|
@ -25,9 +25,9 @@
|
||||
clearable
|
||||
placeholder="全部"
|
||||
>
|
||||
<el-option label="油品订单出售" :value="1"></el-option>
|
||||
<el-option label="商品订单出售" :value="2"></el-option>
|
||||
<el-option label="储值卡充值" :value="3"></el-option>
|
||||
<el-option label="油品订单提成" :value="1"></el-option>
|
||||
<el-option label="商品订单提成" :value="2"></el-option>
|
||||
<el-option label="储值卡充值提成" :value="3"></el-option>
|
||||
<el-option label="油品退款" :value="4"></el-option>
|
||||
<el-option label="商品退款" :value="5"></el-option>
|
||||
</el-select>
|
||||
@ -77,9 +77,9 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="类型" prop="type" align="center" >
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.type==1">油品订单出售</span>
|
||||
<span v-if="scope.row.type==2">商品订单出售</span>
|
||||
<span v-if="scope.row.type==3">储值卡充值</span>
|
||||
<span v-if="scope.row.type==1">油品订单提成</span>
|
||||
<span v-if="scope.row.type==2">商品订单提成</span>
|
||||
<span v-if="scope.row.type==3">储值卡充值提成</span>
|
||||
<span v-if="scope.row.type==4">油品退款</span>
|
||||
<span v-if="scope.row.type==5">商品退款</span>
|
||||
</template>
|
||||
@ -205,7 +205,9 @@
|
||||
<el-col :span="24" style="display: flex;margin-bottom: 10px">
|
||||
<el-form-item label="提成来源" prop="commissionSource" style="width: 420px">
|
||||
<el-radio-group v-model="form.commissionSource">
|
||||
<el-radio v-for="dict in dict.type.source" @change="isChange" :label="dict.value">{{ dict.label }}</el-radio>
|
||||
<!-- <el-radio v-for="dict in dict.type.source" @change="isChange" :label="dict.value">{{ dict.label }}</el-radio>-->
|
||||
<el-radio v-if="form.commissionSource == '油品'" @change="isChange" label="油品" value="油品"></el-radio>
|
||||
<el-radio v-if="form.commissionSource == '非油品'" @change="isChange" label="非油品" value="非油品"></el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -357,7 +359,7 @@ export default {
|
||||
// 表单校验
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: "供应商名称不能为空", trigger: "blur" },
|
||||
{ required: true, message: "提成方案名称不能为空", trigger: "blur" },
|
||||
],
|
||||
commissionSource: [
|
||||
{ required: true, message: "请选择提成来源", trigger: "blur" },
|
||||
|
@ -143,9 +143,9 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="角色组" prop="role">
|
||||
<el-select v-model="form.roleId" placeholder="请选择角色" style="width: 270px">
|
||||
<el-option label="油站站长" :value="12" ></el-option>
|
||||
<el-option label="加油员" :value="15" ></el-option>
|
||||
<el-option label="收银员" :value="16" ></el-option>
|
||||
<el-option label="油站站长" :value="12+''" ></el-option>
|
||||
<el-option label="加油员" :value="15+''" ></el-option>
|
||||
<el-option label="收银员" :value="16+''" ></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -49,8 +49,8 @@ public class Const {
|
||||
public static String NOTIFY_PUBLIC_KEYS="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCbBAl3xSB7YeUnze4yYZmnTeT7OtXZr0sP10TsDVRH2SY/VEjgS9KPmHMmVeKZT3+6xKsUvulgVyie46GGtZPrnoh+glF1gzsYAXJ7dvR/R5nYO5VvfwK/ChPFTiKhbTtO4OKtchgBZuqCbsemG+gFIiVJo37dY0Kg0zISmFHdOQIDAQAB";
|
||||
|
||||
//异步通知(回调地址)
|
||||
// public static String notify_url = "https://www.tuofeng.cc/oilAdmin/api/fyPay/notify";
|
||||
public static String notify_url = "https://8q4f124343.yicp.fun/api/fyPay/notify";
|
||||
public static String notify_url = "https://www.tuofeng.cc/oilAdmin/api/fyPay/notify";
|
||||
// public static String notify_url = "https://8q4f124343.yicp.fun/api/fyPay/notify";
|
||||
|
||||
//下单
|
||||
public static String fuiou_21_url = "https://fundwx.fuiou.com/preCreate";
|
||||
|
@ -206,6 +206,10 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
// 商品订单
|
||||
goodsOrder.setStatus("paid");
|
||||
goodsOrder.setPayTime(date);
|
||||
Boolean isMember = false;
|
||||
if (goodsOrder.getUserId()!=null){
|
||||
isMember = true;
|
||||
}
|
||||
staffCommissionService.countStaffCommission(goodsOrder.getStaffId(),goodsOrder.getStoreId(),goodsOrder.getAmount(),goodsOrder.getPayAmount(),0.0,"2",orderNo);
|
||||
if (!map1.get("goodsOrder").equals("[]")){
|
||||
List<JSONObject> goods = JSONArray.parseArray(map1.get("goodsOrder"), JSONObject.class);
|
||||
@ -214,7 +218,7 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
orderGoods.setOrderId(goodsOrder.getId());
|
||||
orderGoods.setGoodsId(Integer.valueOf(good.get("id").toString()));
|
||||
orderGoods.setNum(Integer.valueOf(good.get("num").toString()));
|
||||
orderGoodsService.insertOrderGoods(orderGoods,storeId1);
|
||||
orderGoodsService.insertOrderGoods(orderGoods,storeId1,isMember);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -181,7 +181,7 @@ public class StaffCommissionServiceImpl extends ServiceImpl<StaffCommissionMappe
|
||||
if (staff.getRoleId().equals(staffRoleGroup)) {
|
||||
commissionRecord.setStaffId(staffId);
|
||||
commissionRecord.setStoreId(storeId);
|
||||
commissionRecord.setType(staffCommission.getCommissionSource() + "订单出售");
|
||||
commissionRecord.setType(type);
|
||||
commissionRecord.setDescription(staffCommission.getCommissionSource() + "订单出售提成");
|
||||
commissionRecord.setOrderNo(orderNo);
|
||||
Double royaltyRate = Double.valueOf(staffCommission.getRoyaltyRate().substring(0, staffCommission.getRoyaltyRate().length() - 1));
|
||||
|
@ -3,7 +3,7 @@
|
||||
<mapper namespace="com.fuint.business.convenienceSore.mapper.SaleStatisticMapper">
|
||||
<sql id="selectSale">
|
||||
select sa.*,mg.name,mg.goods_no,mg.pinyin_code,mg.unit from sale_statistic sa
|
||||
inner join mt_goods mg on sa.goods_id = mg.id
|
||||
left join mt_goods mg on sa.goods_id = mg.id
|
||||
</sql>
|
||||
|
||||
<select id="selectSaleList" resultType="com.fuint.business.convenienceSore.vo.SaleStatisticVo">
|
||||
|
@ -22,5 +22,5 @@ public interface SaleDetailService extends IService<SaleDetail> {
|
||||
* @param saleDetail
|
||||
* @return
|
||||
*/
|
||||
public int insertSaleDetail(SaleDetail saleDetail);
|
||||
public int insertSaleDetail(SaleDetail saleDetail,Boolean isMember);
|
||||
}
|
||||
|
@ -46,18 +46,38 @@ public class SaleDetailServiceImpl extends ServiceImpl<SaleDetailMapper, SaleDet
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int insertSaleDetail(SaleDetail saleDetail) {
|
||||
public int insertSaleDetail(SaleDetail saleDetail,Boolean isMember) {
|
||||
// 修改商品库存 库存不可小于0 小于0的话返回-1
|
||||
LJGoods ljGoods = goodsService.selectLJGoodsById(saleDetail.getGoodsId());
|
||||
int stock = ljGoods.getStock() - saleDetail.getSaleNumber();
|
||||
if (stock>=0){
|
||||
LJGoods goods = new LJGoods();
|
||||
goods.setStock(stock);
|
||||
goods.setId(ljGoods.getId());
|
||||
goodsService.updateLJGoods(goods);
|
||||
// int stock = ljGoods.getStock() - saleDetail.getSaleNumber();
|
||||
// if (stock>=0){
|
||||
// LJGoods goods = new LJGoods();
|
||||
// goods.setStock(stock);
|
||||
// goods.setId(ljGoods.getId());
|
||||
// goodsService.updateLJGoods(goods);
|
||||
// }else {
|
||||
// return -1;
|
||||
// }
|
||||
|
||||
// 计算成本
|
||||
Double costMoney = ljGoods.getBuyingPrice() * saleDetail.getSaleNumber();
|
||||
saleDetail.setCostTotal(costMoney);
|
||||
// 计算盈利额
|
||||
Double profitMoney = 0.0;
|
||||
// 销售总额
|
||||
Double saleMoney = 0.0;
|
||||
if (isMember){
|
||||
// 使用会员价
|
||||
profitMoney = (ljGoods.getMemberPrice() * saleDetail.getSaleNumber()) - costMoney;
|
||||
saleMoney = ljGoods.getMemberPrice() * saleDetail.getSaleNumber();
|
||||
}else {
|
||||
return -1;
|
||||
// 不使用会员价
|
||||
profitMoney = (ljGoods.getRetailPrice() * saleDetail.getSaleNumber()) - costMoney;
|
||||
saleMoney = ljGoods.getRetailPrice() * saleDetail.getSaleNumber();
|
||||
}
|
||||
saleDetail.setProfitTotal(profitMoney);
|
||||
saleDetail.setSaleTotal(saleMoney);
|
||||
|
||||
// 根据商品id查询销售信息是否存在
|
||||
SaleStatistic saleStatistic = saleStatisticService.selectSaleByGoodsId(saleDetail.getGoodsId());
|
||||
SaleStatistic saleStatistic1 = new SaleStatistic();
|
||||
|
@ -3,9 +3,11 @@ package com.fuint.business.marketingActivity.activeConsumption.entity;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class ActiveConsumptionChild {
|
||||
private static final long serialVersionUID = 231279479087493223L;
|
||||
/**
|
||||
@ -83,164 +85,4 @@ public class ActiveConsumptionChild {
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
|
||||
private Date updateTime;
|
||||
|
||||
public String getTimeType() {
|
||||
return timeType;
|
||||
}
|
||||
|
||||
public void setTimeType(String timeType) {
|
||||
this.timeType = timeType;
|
||||
}
|
||||
|
||||
public Integer getValidityZero() {
|
||||
return validityZero;
|
||||
}
|
||||
|
||||
public void setValidityZero(Integer validityZero) {
|
||||
this.validityZero = validityZero;
|
||||
}
|
||||
|
||||
public Integer getValidityOne() {
|
||||
return validityOne;
|
||||
}
|
||||
|
||||
public void setValidityOne(Integer validityOne) {
|
||||
this.validityOne = validityOne;
|
||||
}
|
||||
|
||||
public Integer getValidityTwo() {
|
||||
return validityTwo;
|
||||
}
|
||||
|
||||
public void setValidityTwo(Integer validityTwo) {
|
||||
this.validityTwo = validityTwo;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getActiveConsumptionId() {
|
||||
return activeConsumptionId;
|
||||
}
|
||||
|
||||
public void setActiveConsumptionId(Integer activeConsumptionId) {
|
||||
this.activeConsumptionId = activeConsumptionId;
|
||||
}
|
||||
|
||||
public String getActiveGift() {
|
||||
return activeGift;
|
||||
}
|
||||
|
||||
public void setActiveGift(String activeGift) {
|
||||
this.activeGift = activeGift;
|
||||
}
|
||||
|
||||
public Integer getGoodsIds() {
|
||||
return goodsIds;
|
||||
}
|
||||
|
||||
public void setGoodsIds(Integer goodsIds) {
|
||||
this.goodsIds = goodsIds;
|
||||
}
|
||||
|
||||
public String getGoodsName() {
|
||||
return goodsName;
|
||||
}
|
||||
|
||||
public void setGoodsName(String goodsName) {
|
||||
this.goodsName = goodsName;
|
||||
}
|
||||
|
||||
public Integer getGoodsTotal() {
|
||||
return goodsTotal;
|
||||
}
|
||||
|
||||
public void setGoodsTotal(Integer goodsTotal) {
|
||||
this.goodsTotal = goodsTotal;
|
||||
}
|
||||
|
||||
public Integer getVouchersId() {
|
||||
return vouchersId;
|
||||
}
|
||||
|
||||
public void setVouchersId(Integer vouchersId) {
|
||||
this.vouchersId = vouchersId;
|
||||
}
|
||||
|
||||
public String getGiftCardName() {
|
||||
return giftCardName;
|
||||
}
|
||||
|
||||
public void setGiftCardName(String giftCardName) {
|
||||
this.giftCardName = giftCardName;
|
||||
}
|
||||
|
||||
public String getGiftCardType() {
|
||||
return giftCardType;
|
||||
}
|
||||
|
||||
public void setGiftCardType(String giftCardType) {
|
||||
this.giftCardType = giftCardType;
|
||||
}
|
||||
|
||||
public String getGiftCardDetail() {
|
||||
return giftCardDetail;
|
||||
}
|
||||
|
||||
public void setGiftCardDetail(String giftCardDetail) {
|
||||
this.giftCardDetail = giftCardDetail;
|
||||
}
|
||||
|
||||
public Integer getGiftCardTime() {
|
||||
return giftCardTime;
|
||||
}
|
||||
|
||||
public void setGiftCardTime(Integer giftCardTime) {
|
||||
this.giftCardTime = giftCardTime;
|
||||
}
|
||||
|
||||
public Integer getGiftCardTotal() {
|
||||
return giftCardTotal;
|
||||
}
|
||||
|
||||
public void setGiftCardTotal(Integer giftCardTotal) {
|
||||
this.giftCardTotal = giftCardTotal;
|
||||
}
|
||||
|
||||
public String getCreateBy() {
|
||||
return createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getUpdateBy() {
|
||||
return updateBy;
|
||||
}
|
||||
|
||||
public void setUpdateBy(String updateBy) {
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.marketingActivity.activeConsumption.entity.ActiveConsumption;
|
||||
import com.fuint.business.marketingActivity.activeConsumption.entity.ActiveConsumptionChild;
|
||||
import com.fuint.business.marketingActivity.activeConsumption.service.ActiveConsumptionChildService;
|
||||
import com.fuint.business.marketingActivity.activeConsumption.service.ActiveConsumptionService;
|
||||
import com.fuint.business.marketingActivity.activeConsumption.vo.ActiveConsumptionAppletVO;
|
||||
import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscount;
|
||||
@ -123,6 +125,8 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
|
||||
@Autowired
|
||||
@Lazy
|
||||
private ChainStoreConfigService chainStoreConfigService;
|
||||
@Resource
|
||||
private ActiveConsumptionChildService activeConsumptionChildService;
|
||||
/**
|
||||
* 分页查询所有
|
||||
* @param
|
||||
@ -861,8 +865,42 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
|
||||
}
|
||||
userBalanceService.save(userBalance1);
|
||||
}
|
||||
//查询改活动下的卡券列表
|
||||
LambdaQueryWrapper<ActiveConsumptionChild> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ActiveConsumptionChild::getActiveConsumptionId,activeConsumptionVO.getActiveId());
|
||||
List<ActiveConsumptionChild> list = activeConsumptionChildService.list(queryWrapper);
|
||||
if (ObjectUtils.isNotEmpty(list)){
|
||||
|
||||
for (ActiveConsumptionChild activeConsumptionChild : list) {
|
||||
if (ObjectUtils.isNotEmpty(activeConsumptionChild) && activeConsumptionChild.getActiveGift().equals("1")){
|
||||
CardFavorableRecord cardFavorableRecord = new CardFavorableRecord();
|
||||
cardFavorableRecord.setCardFavorableId(activeConsumptionChild.getVouchersId());
|
||||
cardFavorableRecord.setStoreId(storeId1);
|
||||
cardFavorableRecord.setMtUserId(TokenUtil.getNowAccountInfo().getId());
|
||||
cardFavorableRecord.setName(ljUserVo.getName());
|
||||
cardFavorableRecord.setMobile(ljUserVo.getMobile());
|
||||
cardFavorableRecord.setStatus("0");
|
||||
cardFavorableRecord.setExchangeFrom("充值送券");
|
||||
cardFavorableRecordService.addCardFavorableRecord(cardFavorableRecord);
|
||||
//兑换券
|
||||
}else if (ObjectUtils.isNotEmpty(activeConsumptionChild) && activeConsumptionChild.getActiveGift().equals("2")){
|
||||
CardExchangeRecord cardExchangeRecord = new CardExchangeRecord();
|
||||
cardExchangeRecord.setCardExchangeId(activeConsumptionChild.getVouchersId());
|
||||
cardExchangeRecord.setStoreId(storeId1);
|
||||
cardExchangeRecord.setMtUserId(ljUserVo.getId());
|
||||
cardExchangeRecord.setName(ljUserVo.getName());
|
||||
cardExchangeRecord.setMobile(ljUserVo.getMobile());
|
||||
cardExchangeRecord.setPhoto(ljUserVo.getAvatar());
|
||||
cardExchangeRecord.setStatus("0");
|
||||
cardExchangeRecord.setExchangeFrom("充值送券");
|
||||
cardExchangeRecordService.addCardExchangeRecord(cardExchangeRecord);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//优惠券
|
||||
if (StringUtils.isNotEmpty(activeConsumptionVO.getActiveGift()) && activeConsumptionVO.getActiveGift().equals("1")){
|
||||
//if (StringUtils.isNotEmpty(activeConsumptionVO.getActiveGift()) && activeConsumptionVO.getActiveGift().equals("1")){
|
||||
/*if (ObjectUtils.isNotEmpty(list) && activeConsumptionVO.getActiveGift().equals("1")){
|
||||
CardFavorableRecord cardFavorableRecord = new CardFavorableRecord();
|
||||
cardFavorableRecord.setCardFavorableId(activeConsumptionVO.getVouchersId());
|
||||
cardFavorableRecord.setStoreId(storeId1);
|
||||
@ -884,7 +922,7 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
|
||||
cardExchangeRecord.setStatus("0");
|
||||
cardExchangeRecord.setExchangeFrom("充值送券");
|
||||
cardExchangeRecordService.addCardExchangeRecord(cardExchangeRecord);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ public class ActiveNewlywedsRecordsServiceImpl extends ServiceImpl<ActiveNewlywe
|
||||
}
|
||||
}
|
||||
//用户余额
|
||||
UserBalance userBalance = userBalanceService.selectUserBalance(userId,ljUserVo.getChainStoreId());
|
||||
UserBalance userBalance = userBalanceService.selectUserBalance(userId,nowAccountInfo.getChainStoreId());
|
||||
//积分
|
||||
if (ObjectUtils.isNotEmpty(userBalance.getPoints()) && ObjectUtils.isNotEmpty(activeNewlyweds.getPoints())){
|
||||
userBalance.setPoints(userBalance.getPoints() + activeNewlyweds.getPoints());
|
||||
|
@ -17,6 +17,8 @@ import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDate;
|
||||
import java.time.ZoneId;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@ -126,7 +128,10 @@ public class CardExchangeRecordServiceImpl extends ServiceImpl<CardExchangeRecor
|
||||
cardExchangeRecord.setGiftName(cardExchange.getGiftName());
|
||||
cardExchangeRecord.setDescription(cardExchange.getUseInstructions());
|
||||
cardExchangeRecord.setStartTime(new Date());
|
||||
cardExchangeRecord.setOutTime(new Date(new Date().getTime() + cardExchange.getValidity() * 86400000));
|
||||
LocalDate today = LocalDate.now();
|
||||
LocalDate localDate = today.plusDays(cardExchange.getValidity());
|
||||
Date from = Date.from(localDate.atStartOfDay(ZoneId.systemDefault()).toInstant());
|
||||
cardExchangeRecord.setOutTime(from);
|
||||
return save(cardExchangeRecord);
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package com.fuint.business.marketingActivity.cardFavorable.controller;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.marketingActivity.activeExchange.vo.PaymentActiveVO;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.dto.CardFavorableAdnUserDTO;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.dto.IdListDTO;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorable;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
|
||||
@ -96,6 +97,17 @@ public class CardFavorableRecordController extends BaseController {
|
||||
return getSuccessResult(this.cardFavorableRecordService.drawDown(idList));
|
||||
}
|
||||
|
||||
/**
|
||||
* pc端一键发券接口
|
||||
*
|
||||
* @param cardFavorableAdnUserDTO
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping("issueCardFavorable")
|
||||
public ResponseObject issueCardFavorable(@RequestBody CardFavorableAdnUserDTO cardFavorableAdnUserDTO) {
|
||||
return getSuccessResult(this.cardFavorableRecordService.issueCardFavorable(cardFavorableAdnUserDTO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 小程序端判断是否领取优惠券
|
||||
* @return 新增结果
|
||||
|
@ -0,0 +1,13 @@
|
||||
package com.fuint.business.marketingActivity.cardFavorable.dto;
|
||||
|
||||
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorable;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class CardFavorableAdnUserDTO extends CardFavorable {
|
||||
//会员列表
|
||||
private List<Integer> userIds;
|
||||
private List<Integer> cardFavorableIds;
|
||||
}
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.business.marketingActivity.activeExchange.vo.PaymentActiveVO;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.dto.CardFavorableAdnUserDTO;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.dto.IdListDTO;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableRecordVO;
|
||||
@ -63,5 +64,12 @@ public interface CardFavorableRecordService extends IService<CardFavorableRecord
|
||||
* @return
|
||||
*/
|
||||
boolean updateCardAndActiveById(PaymentActiveVO paymentActiveVO);
|
||||
|
||||
/**
|
||||
* pc端一键发券接口
|
||||
* @param cardFavorableAdnUserDTO
|
||||
* @return
|
||||
*/
|
||||
boolean issueCardFavorable(CardFavorableAdnUserDTO cardFavorableAdnUserDTO);
|
||||
}
|
||||
|
||||
|
@ -14,6 +14,7 @@ import com.fuint.business.marketingActivity.activeExchange.vo.PaymentActiveVO;
|
||||
import com.fuint.business.marketingActivity.activeFullminusRecords.entity.ActiveFullminusRecords;
|
||||
import com.fuint.business.marketingActivity.activeFullminusRecords.mapper.ActiveFullminusRecordsMapper;
|
||||
import com.fuint.business.marketingActivity.activeFullminusRecords.service.ActiveFullminusRecordsService;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.dto.CardFavorableAdnUserDTO;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.dto.IdListDTO;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorable;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.mapper.CardFavorableRecordMapper;
|
||||
@ -301,5 +302,38 @@ public class CardFavorableRecordServiceImpl extends ServiceImpl<CardFavorableRec
|
||||
activeExchangeService.activeConsumption(paymentActiveDTO);
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* pc端一键发券接口
|
||||
* @param cardFavorableAdnUserDTO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean issueCardFavorable(CardFavorableAdnUserDTO cardFavorableAdnUserDTO) {
|
||||
boolean flag = false;
|
||||
//油站信息
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
//会员ids
|
||||
List<Integer> userIds = cardFavorableAdnUserDTO.getUserIds();
|
||||
//优惠券ids
|
||||
List<Integer> cardIds = cardFavorableAdnUserDTO.getCardFavorableIds();
|
||||
for (Integer cardId : cardIds) {
|
||||
CardFavorableRecord cardFavorableRecord = new CardFavorableRecord();
|
||||
if (CollectionUtils.isNotEmpty(userIds)){
|
||||
for (Integer userId : userIds) {
|
||||
LJUser userInfo = userService.queryUserByUserId(userId);
|
||||
cardFavorableRecord.setCardFavorableId(cardId);
|
||||
cardFavorableRecord.setStoreId(nowAccountInfo.getStoreId());
|
||||
cardFavorableRecord.setChainStorId(nowAccountInfo.getChainStoreId());
|
||||
cardFavorableRecord.setName(userInfo.getName());
|
||||
cardFavorableRecord.setMobile(userInfo.getMobile());
|
||||
cardFavorableRecord.setStatus("0");
|
||||
cardFavorableRecord.setExchangeFrom("店铺一键送券!");
|
||||
flag = addCardFavorableRecord(cardFavorableRecord);
|
||||
}
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,6 +22,7 @@ public class CardValueRecordDTO extends CardValueRecord {
|
||||
private Integer cardRecordId;
|
||||
private String appltType;
|
||||
private String paymentType;
|
||||
private String payStatus;
|
||||
|
||||
// /**
|
||||
// * 会员id
|
||||
|
@ -67,11 +67,30 @@
|
||||
combined_result.storeId,
|
||||
combined_result.OilName,
|
||||
combined_result.type,
|
||||
combined_result.paymentType
|
||||
combined_result.paymentType,
|
||||
combined_result.payStatus
|
||||
FROM
|
||||
(SELECT '储值卡' AS recordName,payment_type paymentType,mt_user_id mtUserId, recharge_balance rechargeBalance, gift_balance obtain, fringe_benefit oilName,royalty_type type,create_time createTime, chain_store_id chainStoreId, store_id storeId FROM card_value_record
|
||||
(SELECT '储值卡' AS recordName,payment_type paymentType,mt_user_id mtUserId,
|
||||
recharge_balance rechargeBalance, gift_balance obtain, fringe_benefit oilName,royalty_type type,
|
||||
create_time createTime, chain_store_id chainStoreId, store_id storeId,pay_status payStatus FROM card_value_record
|
||||
UNION
|
||||
SELECT '升数卡' AS recordName,payment_type paymentType,mt_user_id mtUserId, recharge_balance rechargeBalance, income_litres obtain,oil_name oilName,type, create_time createTime, chain_store_id chainStoreId, store_id storeId FROM card_fuel_record) AS combined_result
|
||||
SELECT '升数卡' AS recordName,payment_type paymentType,mt_user_id mtUserId, recharge_balance rechargeBalance,
|
||||
income_litres obtain,oil_name oilName,type, create_time createTime, chain_store_id chainStoreId,
|
||||
store_id storeId,pay_status payStatus FROM card_fuel_record
|
||||
UNION
|
||||
SELECT '储值卡' AS recordName,
|
||||
change_type paymentType,
|
||||
user_id mtUserId,
|
||||
balance rechargeBalance,
|
||||
after_the_change obtain,
|
||||
order_no oilName,
|
||||
from_type type,
|
||||
create_time createTime,
|
||||
chain_store_id chainStoreId,
|
||||
store_id storeId,
|
||||
id payStatus
|
||||
from card_balance_change cbc
|
||||
where change_type = 0) AS combined_result
|
||||
|
||||
<where>
|
||||
<if test="cardValueRecord.mtUserId != null">
|
||||
|
@ -676,7 +676,15 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
|
||||
public IPage<CardValueRecordDTO> selectAllRecord(@Param("page") Page page, CardValueRecordDTO cardValueRecord) {
|
||||
cardValueRecord.setStoreId(cardValueRecord.getStoreId());
|
||||
cardValueRecord.setMtUserId(TokenUtil.getNowAccountInfo().getId());
|
||||
return this.cardValueRecordMapper.selectAllRecord(page, cardValueRecord);
|
||||
IPage<CardValueRecordDTO> cardValueRecordDTOIPage = this.cardValueRecordMapper.selectAllRecord(page, cardValueRecord);
|
||||
List<CardValueRecordDTO> records = cardValueRecordDTOIPage.getRecords();
|
||||
for (CardValueRecordDTO record : records) {
|
||||
if (record.getPaymentType().equals("0")){
|
||||
record.setPayStatus("paid");
|
||||
record.setPaymentType("xf");
|
||||
}
|
||||
}
|
||||
return cardValueRecordDTOIPage;
|
||||
}
|
||||
|
||||
public void export(HttpServletResponse response, CardValueRecord cardValueRecord) {
|
||||
|
@ -38,6 +38,22 @@ public class CashierOrderController extends BaseController {
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据条件分页查询收银员订单信息
|
||||
* @param order
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/seekZeroAmount")
|
||||
public ResponseObject seekZeroAmount(CashierOrder order,
|
||||
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
Double seekZeroAmount = cashierOrderService.selectCashierOrderSeekZeroAmount(page, order);
|
||||
return getSuccessResult(seekZeroAmount);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出订单
|
||||
* @param response
|
||||
|
@ -21,6 +21,14 @@ public interface CashierOrderMapper extends BaseMapper<CashierOrder> {
|
||||
*/
|
||||
public IPage<CashierOrder> selectCashierOrderList(Page page, @Param("order") CashierOrder order);
|
||||
|
||||
/**
|
||||
* 根据条件分页查询订单信息
|
||||
* @param page
|
||||
* @param order
|
||||
* @return
|
||||
*/
|
||||
public Double selectCashierOrderSeekZeroAmount(Page page,@Param("order") CashierOrder order);
|
||||
|
||||
|
||||
List<CashierOrderExcel> selectCashierOrderListExport(@Param("order") CashierOrder order);
|
||||
|
||||
|
@ -204,7 +204,29 @@
|
||||
) AS theTotalAmountOfTheItem -- 商品总金额
|
||||
|
||||
</select>
|
||||
<!-- <select id="orderStatistics" resultType="java.util.Map">-->
|
||||
<select id="selectCashierOrderSeekZeroAmount" resultType="java.lang.Double">
|
||||
select sum(seek_zero) from cashier_order
|
||||
<where>
|
||||
store_id = #{order.storeId}
|
||||
<if test="order.staffId != null and order.staffId != ''">
|
||||
and staff_id = #{order.staffId}
|
||||
</if>
|
||||
<if test="order.orderNo != null and order.orderNo != ''">
|
||||
and order_no like concat('%', #{order.orderNo}, '%')
|
||||
</if>
|
||||
<if test="order.terminal != null and order.terminal != ''">
|
||||
and terminal like concat('%', #{order.terminal}, '%')
|
||||
</if>
|
||||
<if test="order.params.beginTime != null and order.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(pay_time,'%y%m%d') >= date_format(#{order.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="order.params.endTime != null and order.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(pay_time,'%y%m%d') <= date_format(#{order.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
order by create_time desc
|
||||
</where>
|
||||
</select>
|
||||
<!-- <select id="orderStatistics" resultType="java.util.Map">-->
|
||||
<!-- SELECT-->
|
||||
<!-- (SELECT count(*) FROM cashier_order) AS 笔数,-->
|
||||
<!-- (SELECT sum(amount) FROM cashier_order) AS 订单总金额,-->
|
||||
|
@ -20,6 +20,14 @@ public interface CashierOrderService extends IService<CashierOrder> {
|
||||
*/
|
||||
public IPage<CashierOrder> selectCashierOrderList(Page page, CashierOrder order);
|
||||
|
||||
/**
|
||||
* 根据条件分页查询订单信息
|
||||
* @param page
|
||||
* @param order
|
||||
* @return
|
||||
*/
|
||||
public Double selectCashierOrderSeekZeroAmount(Page page, CashierOrder order);
|
||||
|
||||
void export(HttpServletResponse response, CashierOrder order);
|
||||
|
||||
/**
|
||||
|
@ -164,4 +164,13 @@ public interface OilOrderService extends IService<OilOrder> {
|
||||
* @return
|
||||
*/
|
||||
int editOilOrder(OilOrder oilOrder);
|
||||
|
||||
/**
|
||||
* 添加销售统计信息
|
||||
* @param goodsId 商品id
|
||||
* @param goodsNum 商品数量
|
||||
* @param storeId 店铺id
|
||||
* @param isMember 是否为会员
|
||||
*/
|
||||
void addGoodsSaleStatistic(Integer goodsId,Integer goodsNum,Integer storeId,Boolean isMember);
|
||||
}
|
||||
|
@ -24,11 +24,11 @@ public interface OrderGoodsService extends IService<OrderGoods> {
|
||||
* @param goods
|
||||
* @return
|
||||
*/
|
||||
public int insertOrderGoods(OrderGoods goods,Integer storeId);
|
||||
public int insertOrderGoods(OrderGoods goods,Integer storeId,Boolean isMember);
|
||||
|
||||
/**
|
||||
* 添加库存跟踪信息
|
||||
* @param goods
|
||||
*/
|
||||
public void insertStockTrack(OrderGoods goods,Integer storeId);
|
||||
public void insertStockTrack(OrderGoods goods,Integer storeId,Boolean isMember);
|
||||
}
|
||||
|
@ -32,6 +32,14 @@ public class CashierOrderServiceImpl extends ServiceImpl<CashierOrderMapper, Cas
|
||||
return cashierOrderIPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Double selectCashierOrderSeekZeroAmount(Page page, CashierOrder order) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
Integer storeId = nowAccountInfo.getStoreId();
|
||||
order.setStoreId(storeId);
|
||||
return baseMapper.selectCashierOrderSeekZeroAmount(page,order);
|
||||
}
|
||||
|
||||
public void export(HttpServletResponse response, CashierOrder order) {
|
||||
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
|
@ -15,7 +15,9 @@ import com.fuint.api.fuyou.service.MerchantConfigService;
|
||||
import com.fuint.api.fuyou.service.OilConfigService;
|
||||
import com.fuint.business.commission.service.StaffCommissionService;
|
||||
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.cardFule.entity.CardFuelRecord;
|
||||
import com.fuint.business.marketingActivity.cardFule.mapper.CardFuelRecordMapper;
|
||||
import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
|
||||
@ -98,6 +100,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
private GrowthValueChangeService growthValueChangeService;
|
||||
@Autowired
|
||||
private ChainStoreConfigService chainStoreConfigService;
|
||||
@Autowired
|
||||
private SaleDetailService saleDetailService;
|
||||
|
||||
@Override
|
||||
public IPage<OilOrder> selectOilOrderList(Page page, OilOrder order) {
|
||||
@ -221,14 +225,16 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
// 会员消费金额(储值卡需要减少的金额)
|
||||
Double consumeAmount = Double.valueOf(map.get("consumeAmount"));
|
||||
Integer userId = null;
|
||||
Boolean isMember = false;
|
||||
// 根据日期生成订单信息
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||
String timestamp = dateFormat.format(new Date());
|
||||
String randomString = UUID.randomUUID().toString().replace("-","").substring(0,6);
|
||||
String orderNo = "2345"+timestamp+randomString;
|
||||
if (map.get("userId") != null && !map.get("userId").equals("")){
|
||||
if (StringUtils.isNotEmpty(map.get("userId"))){
|
||||
// 会员id
|
||||
userId = Integer.valueOf(map.get("userId"));
|
||||
isMember = true;
|
||||
|
||||
this.insertCardBalance(consumeAmount,userId,storeId,orderNo);
|
||||
}
|
||||
@ -311,7 +317,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
orderGoods.setOrderId(ljOrder2.getId());
|
||||
orderGoods.setGoodsId(Integer.valueOf(good.get("id").toString()));
|
||||
orderGoods.setNum(Integer.valueOf(good.get("num").toString()));
|
||||
orderGoodsService.insertOrderGoods(orderGoods,storeId);
|
||||
orderGoodsService.insertOrderGoods(orderGoods,storeId,isMember);
|
||||
}
|
||||
}
|
||||
ljOrder1 = orderService.selectGoodsOrder(orderNo);
|
||||
@ -1333,16 +1339,16 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
|
||||
this.insertGrowthValueChange(userid,storeId,addGrowthVal,growthAfter,orderNo);
|
||||
|
||||
CardBalanceChange cardBalanceChange = new CardBalanceChange();
|
||||
// 添加余额记录信息
|
||||
cardBalanceChange.setUserId(userid);
|
||||
cardBalanceChange.setChangeType("0");
|
||||
cardBalanceChange.setFromType("油品订单消费");
|
||||
cardBalanceChange.setBalance(oilAmount - oilActualPay);
|
||||
cardBalanceChange.setOrderNo(orderNo);
|
||||
cardBalanceChange.setStoreId(storeId);
|
||||
|
||||
cardBalanceChangeService.insertCardBalance(cardBalanceChange);
|
||||
// CardBalanceChange cardBalanceChange = new CardBalanceChange();
|
||||
//// 添加余额记录信息
|
||||
// cardBalanceChange.setUserId(userid);
|
||||
// cardBalanceChange.setChangeType("0");
|
||||
// cardBalanceChange.setFromType("油品订单消费");
|
||||
// cardBalanceChange.setBalance(oilAmount - oilActualPay);
|
||||
// cardBalanceChange.setOrderNo(orderNo);
|
||||
// cardBalanceChange.setStoreId(storeId);
|
||||
//
|
||||
// cardBalanceChangeService.insertCardBalance(cardBalanceChange);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1635,4 +1641,13 @@ return stringDoubleMap;
|
||||
oilOrder1.setRemark(oilOrder.getRemark());
|
||||
return baseMapper.updateById(oilOrder1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addGoodsSaleStatistic(Integer goodsId, Integer goodsNum, Integer storeId, Boolean isMember) {
|
||||
SaleDetail saleDetail = new SaleDetail();
|
||||
saleDetail.setGoodsId(goodsId);
|
||||
saleDetail.setStoreId(storeId);
|
||||
saleDetail.setSaleNumber(goodsNum);
|
||||
saleDetailService.insertSaleDetail(saleDetail,isMember);
|
||||
}
|
||||
}
|
||||
|
@ -2,9 +2,11 @@ package com.fuint.business.order.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.convenienceSore.entity.LJGoods;
|
||||
import com.fuint.business.convenienceSore.entity.SaleDetail;
|
||||
import com.fuint.business.convenienceSore.entity.StockStatistic;
|
||||
import com.fuint.business.convenienceSore.entity.StockTrack;
|
||||
import com.fuint.business.convenienceSore.service.LJGoodsService;
|
||||
import com.fuint.business.convenienceSore.service.SaleDetailService;
|
||||
import com.fuint.business.convenienceSore.service.StockStatisticService;
|
||||
import com.fuint.business.convenienceSore.service.StockTrackService;
|
||||
import com.fuint.business.order.entity.OrderGoods;
|
||||
@ -27,6 +29,8 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
|
||||
private StockTrackService trackService;
|
||||
@Autowired
|
||||
private LJGoodsService goodsService;
|
||||
@Autowired
|
||||
private SaleDetailService saleDetailService;
|
||||
|
||||
@Override
|
||||
public List<OrderGoodsVo> selectOrderGoods(int orderId) {
|
||||
@ -35,14 +39,14 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertOrderGoods(OrderGoods goods,Integer storeId) {
|
||||
public int insertOrderGoods(OrderGoods goods,Integer storeId,Boolean isMember) {
|
||||
int row = baseMapper.insert(goods);
|
||||
this.insertStockTrack(goods,storeId);
|
||||
this.insertStockTrack(goods,storeId,isMember);
|
||||
return row;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertStockTrack(OrderGoods goods,Integer storeId) {
|
||||
public void insertStockTrack(OrderGoods goods,Integer storeId,Boolean isMember) {
|
||||
if (storeId==null){
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
storeId = nowAccountInfo.getStoreId();
|
||||
@ -62,5 +66,12 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
|
||||
Integer stock = ljGoods.getStock();
|
||||
ljGoods.setStock(stock-goods.getNum());
|
||||
goodsService.updateLJGoods(ljGoods);
|
||||
|
||||
// 添加销售统计信息
|
||||
SaleDetail saleDetail = new SaleDetail();
|
||||
saleDetail.setGoodsId(goods.getGoodsId());
|
||||
saleDetail.setStoreId(storeId);
|
||||
saleDetail.setSaleNumber(goods.getNum());
|
||||
saleDetailService.insertSaleDetail(saleDetail,isMember);
|
||||
}
|
||||
}
|
||||
|
@ -85,6 +85,9 @@ public class LJStore extends BaseEntity implements Serializable {
|
||||
@ApiModelProperty("门头照")
|
||||
private String doorstepPhoto;
|
||||
|
||||
@ApiModelProperty("是否删除")
|
||||
private String ifDelete;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<String> welfareList;
|
||||
|
||||
|
@ -117,18 +117,21 @@ public class LJStoreServiceImpl extends ServiceImpl<LJStoreMapper, LJStore> impl
|
||||
distance = min;
|
||||
}else {
|
||||
LJStore store = this.selectStoreByStoreId(Integer.valueOf(storeId));
|
||||
double dLat = Math.toRadians(Double.parseDouble(store.getLatitude()) - lat);
|
||||
double dLon = Math.toRadians(Double.parseDouble(store.getLongitude()) - lon);
|
||||
if (store.getStatus().equals("qy") && store.getIfDelete().equals("0")){
|
||||
double dLat = Math.toRadians(Double.parseDouble(store.getLatitude()) - lat);
|
||||
double dLon = Math.toRadians(Double.parseDouble(store.getLongitude()) - lon);
|
||||
|
||||
double a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
|
||||
Math.cos(Math.toRadians(lat)) * Math.cos(Math.toRadians(Double.parseDouble(store.getLatitude()))) *
|
||||
Math.sin(dLon / 2) * Math.sin(dLon / 2);
|
||||
double a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
|
||||
Math.cos(Math.toRadians(lat)) * Math.cos(Math.toRadians(Double.parseDouble(store.getLatitude()))) *
|
||||
Math.sin(dLon / 2) * Math.sin(dLon / 2);
|
||||
|
||||
double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
|
||||
double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
|
||||
|
||||
double min = earthRadius * c;
|
||||
distance = min;
|
||||
ljStore = store;
|
||||
}
|
||||
|
||||
double min = earthRadius * c;
|
||||
distance = min;
|
||||
ljStore = store;
|
||||
}
|
||||
|
||||
// 判断当前店铺是否存在此用户的会员信息,没有的话进行添加
|
||||
|
@ -9,6 +9,15 @@ export function listCashierOrder(query) {
|
||||
})
|
||||
}
|
||||
|
||||
// 查询收银台订单列表
|
||||
export function cashierOrderSeekZeroAmount(query) {
|
||||
return request({
|
||||
url: '/business/cashierOrder/seekZeroAmount',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 根据id查询收银台订单列表
|
||||
export function cashierOrder(id) {
|
||||
return request({
|
||||
|
@ -452,7 +452,7 @@
|
||||
<div>
|
||||
<el-input v-model="authCode"
|
||||
v-focus
|
||||
:autofocus="autofocus"
|
||||
:key="inputKey"
|
||||
@keydown.enter.native="collection"
|
||||
placeholder="扫描或输入付款码、支持微信、支付宝、云闪付">
|
||||
<i
|
||||
@ -473,7 +473,7 @@
|
||||
<div>
|
||||
<el-input v-model="authCode"
|
||||
v-focus ref="getFocus"
|
||||
:autofocus="autofocus"
|
||||
:key="inputKey"
|
||||
@input="changeSeekZero"
|
||||
@keydown.enter.native="collection"
|
||||
placeholder="请输入收款金额">
|
||||
@ -781,9 +781,9 @@
|
||||
<div>优惠合计</div>
|
||||
<div>¥{{ oilDiscount + goodsDiscount + fullReduction + couponAmount }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div class="input-box" v-if="isMember">
|
||||
<div>储值卡或囤油卡付款</div>
|
||||
<div>¥{{ oilAmount+(+goodsAmount) - (oilDiscount + goodsDiscount + fullReduction + couponAmount) }}</div>
|
||||
<div>¥{{ consumeAmount }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>实付款</div>
|
||||
@ -822,6 +822,7 @@
|
||||
data(){
|
||||
return{
|
||||
gunIndex:[],
|
||||
inputKey:'111',
|
||||
autofocus:false,
|
||||
baseUrl:process.env.VUE_APP_BASE_API,
|
||||
// 满减全选
|
||||
@ -1196,6 +1197,9 @@
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
.box-center{
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
`
|
||||
var fromHtml = bodyStyle+this.$refs.report.innerHTML
|
||||
@ -1212,7 +1216,7 @@
|
||||
|
||||
},
|
||||
clear(){
|
||||
this.autofocus = false
|
||||
// this.autofocus = false
|
||||
this.dialogVisiblej = false
|
||||
this.seekZero = 0
|
||||
},
|
||||
@ -2214,7 +2218,7 @@
|
||||
},
|
||||
// 立即结算
|
||||
settlement(){
|
||||
this.autofocus = true
|
||||
// this.autofocus = true
|
||||
if (this.payType=="APPLET_CODE") {
|
||||
if (this.goodsOrder.length > 0) {
|
||||
this.$modal.msgError("非油商品不可使用小程序码支付")
|
||||
@ -2224,6 +2228,13 @@
|
||||
this.authCode = ""
|
||||
this.seekZero = 0;
|
||||
this.isPay = false
|
||||
let inputKey = Math.random();
|
||||
if (this.inputKey==inputKey){
|
||||
this.inputKey==inputKey+"a"
|
||||
}else {
|
||||
this.inputKey=inputKey
|
||||
}
|
||||
|
||||
this.dialogVisiblej = true
|
||||
|
||||
this.getStaff()
|
||||
|
@ -65,6 +65,10 @@
|
||||
<div class="size-hui">商品总金额</div>
|
||||
<div class="size-bole">{{ orderStatistics.theTotalAmountOfTheItem?orderStatistics.theTotalAmountOfTheItem:0 }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">找零总金额</div>
|
||||
<div class="size-bole">{{ seekZeroAmount }}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
@ -94,6 +98,7 @@
|
||||
<el-table-column prop="orderNo" label="订单号" width="220"> </el-table-column>
|
||||
<el-table-column prop="amount" label="订单金额"> </el-table-column>
|
||||
<el-table-column prop="payAmount" label="实付金额"> </el-table-column>
|
||||
<el-table-column prop="seekZero" label="找零金额"> </el-table-column>
|
||||
<el-table-column label="订单金额组成">
|
||||
<el-table-column prop="oilOrderAmount" label="油品金额">
|
||||
<template slot-scope="scope">
|
||||
@ -167,17 +172,27 @@
|
||||
<el-descriptions-item label="油品优惠总额">{{ cashierOrder.oilDiscountAmount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="商品优惠总额">{{ cashierOrder.goodsDiscountAmount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="实付金额">{{ cashierOrder.payAmount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="找零金额">{{ cashierOrder.seekZero }}</el-descriptions-item>
|
||||
<el-descriptions-item label="付款方式">
|
||||
<span v-if="cashierOrder.payType == 'CASH'">现金</span>
|
||||
<span v-else-if="cashierOrder.payType == 'WECHAT'">微信</span>
|
||||
<span v-else-if="cashierOrder.payType == 'ALIPAY'">支付宝</span>
|
||||
<span v-else-if="cashierOrder.payType == 'UNIONPAY'">银联二维码</span>
|
||||
<span v-else>小程序码</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="付款状态">
|
||||
<el-tag v-if="cashierOrder.status == 'unpaid'">未支付</el-tag>
|
||||
<el-tag type="success" v-else-if="cashierOrder.status == 'paid'">已支付</el-tag>
|
||||
<el-tag type="danger" v-else>支付失败</el-tag>
|
||||
<el-tag type="warning" v-else-if="cashierOrder.status == 'payFail'">支付失败</el-tag>
|
||||
<el-tag type="danger" v-else-if="cashierOrder.status == 'refund'">已退款</el-tag>
|
||||
<el-tag type="info" v-else>退款中</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="交易时间">
|
||||
{{ cashierOrder.payTime ? parseTime(cashierOrder.payTime):"--" }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<div>
|
||||
<div style="margin-top: 30px">
|
||||
<el-descriptions :column="1" direction="vertical">
|
||||
<el-descriptions-item label="油品详情">
|
||||
<el-table
|
||||
@ -263,7 +278,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {cashierOrder, listCashierOrder,orderStatisticsApi} from "@/api/cashier/cashierorder";
|
||||
import {
|
||||
cashierOrder,
|
||||
cashierOrderSeekZeroAmount,
|
||||
listCashierOrder,
|
||||
orderStatisticsApi
|
||||
} from "@/api/cashier/cashierorder";
|
||||
import {queryStaffs} from "@/api/cashier/staff";
|
||||
import {oilOrderList, oilOrders} from "@/api/cashier/oilorder";
|
||||
import {getOilNameList} from "@/api/cashier/oilnumgun";
|
||||
@ -309,6 +329,7 @@ import {refundApi} from "@/api/cashier/refund";
|
||||
theTotalAmountOfTheItem:'0',
|
||||
},
|
||||
total:0,
|
||||
seekZeroAmount:0,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -452,6 +473,17 @@ import {refundApi} from "@/api/cashier/refund";
|
||||
this.orderList = response.data.records;
|
||||
this.total = response.data.total;
|
||||
})
|
||||
this.getSeekZero(val)
|
||||
},
|
||||
getSeekZero(val){
|
||||
if (val!=undefined){
|
||||
this.queryParams.page = val
|
||||
}
|
||||
cashierOrderSeekZeroAmount(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
||||
if (response.data) {
|
||||
this.seekZeroAmount = response.data
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取员工列表信息
|
||||
getStaffList(){
|
||||
|
@ -158,6 +158,9 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button style="width: 60px" size="mini"
|
||||
@click="patchwork(scope.row)"
|
||||
type="primary" plain round>补打</el-button>
|
||||
<el-button style="width: 60px" size="mini"
|
||||
v-if = "scope.row.status === 'paid'"
|
||||
@click="handleRefund(scope.row.id)"
|
||||
@ -304,7 +307,15 @@ export default {
|
||||
this.orderStatistics = res.data;
|
||||
})
|
||||
},
|
||||
|
||||
// 补打
|
||||
patchwork(data){
|
||||
const orderNo = data.orderNo
|
||||
this.$modal.confirm('确定您要补打当前订单吗?当前订单号[' + orderNo + '],请确保云打印机正在运行中').then(function() {
|
||||
// return delUser(row.id);
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess("打印指令已发送打印机,请查看打印结果");
|
||||
}).catch(() => {});
|
||||
},
|
||||
// 退款
|
||||
async handleRefund(id){
|
||||
|
||||
|
@ -154,10 +154,13 @@
|
||||
<el-form-item label="来源终端">
|
||||
<span>{{ getVal(terminalList,props.row.terminal) }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单备注">
|
||||
<el-form-item label="用户评价">
|
||||
<span>{{ props.row.remark ? props.row.remark:"--" }}</span>
|
||||
<div style="color: grey;font-size: 12px">订单备注为系统后台操作备注信息,非用户提交信息</div>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="订单备注">-->
|
||||
<!-- <span>{{ props.row.remark ? props.row.remark:"--" }}</span>-->
|
||||
<!-- <div style="color: grey;font-size: 12px">订单备注为系统后台操作备注信息,非用户提交信息</div>-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -194,7 +197,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column prop="invoicing" label="开票标识" align="center" > </el-table-column>
|
||||
<el-table-column prop="orderType" label="订单类型" align="center" > </el-table-column>
|
||||
|
||||
<el-table-column label="交易时间" align="center" width="160" prop="payTime">
|
||||
<template slot-scope="scope">
|
||||
@ -202,14 +205,14 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button style="width: 60px" size="mini"
|
||||
@click="patchwork(scope.row)"
|
||||
type="primary" plain round>补打</el-button>
|
||||
<el-button style="width: 60px" size="mini"
|
||||
@click="handleRefund(scope.row.id)"
|
||||
v-if = "scope.row.status === 'paid'"
|
||||
v-if = "scope.row.orderStatus === 'paid'"
|
||||
type="danger" plain round>退款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -258,6 +261,42 @@
|
||||
<el-button type="primary" @click="refundConfirmed()">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 支付成功后小票打印内容-->
|
||||
<div id="reportSuccess" ref="report" class="box-center" v-show="false">
|
||||
<div class="box-title">订单统计</div>
|
||||
<div class="box-ge">
|
||||
<div class="input-box">
|
||||
<div>{{ getName(oilNameList,oilOrder.oils) }}/{{ getName1(oilGunList,oilOrder.oilGunNum) }}</div>
|
||||
<div>¥{{ oilOrder.amount }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>支付方式</div>
|
||||
<div v-if="oilOrder.payType == 'CASH'">现金</div>
|
||||
<div v-else-if="oilOrder.payType == 'WECHAT'">微信</div>
|
||||
<div v-else-if="oilOrder.payType == 'ALIPAY'">支付宝</div>
|
||||
<div v-else-if="oilOrder.payType == 'UNIONPAY'">银联二维码</div>
|
||||
<div v-else>小程序码</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>合计</div>
|
||||
<div>¥{{ oilOrder.orderAmount }}</div>
|
||||
</div>
|
||||
<div class="input-box" v-if="oilOrder.discountAmount>0">
|
||||
<div>优惠合计</div>
|
||||
<div>¥{{ oilOrder.discountAmount }}</div>
|
||||
</div>
|
||||
<div class="input-box" v-if="oilOrder.orderStatus=='paid'">
|
||||
<div>储值卡或囤油卡付款</div>
|
||||
<div>¥{{ (oilOrder.orderAmount - oilOrder.discountAmount - oilOrder.payAmount).toFixed(2) }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>实付款</div>
|
||||
<div>¥{{ oilOrder.payAmount }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -272,6 +311,7 @@
|
||||
import {cashierOrder} from "@/api/cashier/cashierorder";
|
||||
import {getOrderInfoApi, refundApi} from "@/api/cashier/refund";
|
||||
import {exportExcelOilOrderApi} from "@/api/order/exportExcel";
|
||||
import {getLodop} from "@/api/LodopFuncs";
|
||||
|
||||
export default {
|
||||
name: "order_Cashier",
|
||||
@ -333,6 +373,86 @@
|
||||
this.getUserList();
|
||||
},
|
||||
methods:{
|
||||
async printLocally() {
|
||||
//初始化打印函数
|
||||
let LODOP = getLodop(); // 初始化打印
|
||||
LODOP.PRINT_INIT();
|
||||
var bodyStyle = `<style>
|
||||
.input-box{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
}
|
||||
.box-ge{
|
||||
border-bottom: 1px solid #000000 ;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
}
|
||||
.box-title{
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
margin-top: 15px;
|
||||
}
|
||||
.input-hui{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 15px 0px;
|
||||
background: #b2b2b2;
|
||||
box-sizing: border-box;
|
||||
padding: 5px 0px;
|
||||
}
|
||||
.input-hui-frou{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 15px 0px;
|
||||
background: #b2b2b2;
|
||||
box-sizing: border-box;
|
||||
padding: 5px 0px;
|
||||
div{
|
||||
width: 25%;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
.input-box-frou{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
div{
|
||||
width: 25%;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
.box-center{
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
`
|
||||
var fromHtml = bodyStyle+this.$refs.report.innerHTML
|
||||
|
||||
|
||||
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
|
||||
|
||||
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW",true);
|
||||
|
||||
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||
// let preview = LODOP.PREVIEW();
|
||||
// console.log("preview",preview);
|
||||
LODOP.PRINT();
|
||||
|
||||
},
|
||||
exportExcelOilOrder() {
|
||||
exportExcelOilOrderApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
||||
|
@ -48,24 +48,24 @@
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">订单总金额</div>
|
||||
<div class="size-bole">{{ orderStatistics.theTotalAmountOfTheOrder }}</div>
|
||||
<div class="size-bole">{{ orderStatistics.theTotalAmountOfTheOrder || 0 }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">实付总金额</div>
|
||||
<div class="size-bole">{{ orderStatistics.theTotalAmountPaid }}</div>
|
||||
<div class="size-bole">{{ orderStatistics.theTotalAmountPaid || 0 }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">油品优惠</div>
|
||||
<div class="size-bole">{{ orderStatistics.oilDiscounts }}</div>
|
||||
<div class="size-bole">{{ orderStatistics.oilDiscounts || 0 }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">油品总金额</div>
|
||||
<div class="size-bole">{{ orderStatistics.theTotalAmountOfOil }}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">商品总金额</div>
|
||||
<div class="size-bole">{{ orderStatistics.theTotalAmountOfTheItem?orderStatistics.theTotalAmountOfTheItem:0 }}</div>
|
||||
<div class="size-bole">{{ orderStatistics.theTotalAmountOfOil || 0 }}</div>
|
||||
</div>
|
||||
<!-- <div class="box">-->
|
||||
<!-- <div class="size-hui">商品总金额</div>-->
|
||||
<!-- <div class="size-bole">{{ orderStatistics.theTotalAmountOfTheItem?orderStatistics.theTotalAmountOfTheItem:0 }}</div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
@ -90,6 +90,9 @@
|
||||
<el-form-item label="收银员">
|
||||
<span>{{ getMobile(staffList,props.row.staffId) }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户评价">
|
||||
<span>{{ props.row.remark ? props.row.remark:"--" }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -126,7 +129,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column prop="invoicing" label="开票标识" align="center" > </el-table-column>
|
||||
<!-- <el-table-column prop="invoicing" label="开票标识" align="center" > </el-table-column>-->
|
||||
|
||||
<el-table-column label="交易时间" align="center" width="160" prop="payTime">
|
||||
<template slot-scope="scope">
|
||||
|
@ -55,7 +55,7 @@
|
||||
:label="item.gunName"
|
||||
:value="item.id">
|
||||
<span style="float: left">{{ item.oilName }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.gunName }}号枪</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.gunName }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -170,7 +170,7 @@
|
||||
|
||||
<el-table-column prop="createTime" label="交易时间" align="center"></el-table-column>
|
||||
|
||||
<el-table-column prop="orderStatus" label="支付状态">
|
||||
<el-table-column prop="orderStatus" label="支付状态" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.orderStatus == 'unpaid'">未支付</el-tag>
|
||||
<!-- <el-tag type="info" v-else>支付失败</el-tag>-->
|
||||
|
@ -86,9 +86,9 @@
|
||||
|
||||
<view class="station-title" style="display: flex;justify-content: space-between;">
|
||||
{{store.name}}{{store.description ? "("+store.description+")" : ""}}
|
||||
<view class="" @click="goChooseAddress" style="width: 22%;font-size: 14px;font-weight: 400;">
|
||||
<!-- <view class="" @click="goChooseAddress" style="width: 22%;font-size: 14px;font-weight: 400;">
|
||||
<view>切换位置 <uni-icons type="right" color="#304fff" size="16"></uni-icons> </view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view><!--顺通石化加油站(工业南路站)-->
|
||||
<view style="display: flex;">
|
||||
<view class="bule-icon" v-if="welfare.length!=0" v-for="(item,index) in welfare" :key="index">
|
||||
@ -169,8 +169,12 @@
|
||||
],
|
||||
// 当前经度信息
|
||||
longitude: "",
|
||||
// 纬度
|
||||
// 当前纬度信息
|
||||
latitude: "",
|
||||
// 店铺经度信息
|
||||
lon: "",
|
||||
// 店铺纬度信息
|
||||
lat: "",
|
||||
// 店铺信息
|
||||
store: {
|
||||
name: "测试油站",
|
||||
@ -480,30 +484,41 @@
|
||||
|
||||
},
|
||||
}).then((response) => {
|
||||
_this.distance = (Math.ceil(response.data.distance))
|
||||
.toFixed(1)
|
||||
_this.store = response.data.store
|
||||
uni.setStorageSync("storeId", response.data.store.id)
|
||||
uni.setStorageSync("chainStoreId", response.data.store.chainStoreId)
|
||||
// console.log(uni.getStorageSync("chainStoreId"));
|
||||
let welfare = response.data.store.welfare
|
||||
if (welfare) {
|
||||
if (welfare.includes(",")) {
|
||||
_this.welfare = response.data.store.welfare
|
||||
.split(",")
|
||||
} else {
|
||||
_this.welfare.push(response.data.store.welfare)
|
||||
if (response.data.store){
|
||||
_this.distance = (Math.ceil(response.data.distance))
|
||||
.toFixed(1)
|
||||
_this.store = response.data.store
|
||||
uni.setStorageSync("storeId", response.data.store.id)
|
||||
uni.setStorageSync("chainStoreId", response.data.store.chainStoreId)
|
||||
// console.log(uni.getStorageSync("chainStoreId"));
|
||||
let welfare = response.data.store.welfare
|
||||
if (welfare) {
|
||||
if (welfare.includes(",")) {
|
||||
_this.welfare = response.data.store.welfare
|
||||
.split(",")
|
||||
} else {
|
||||
_this.welfare.push(response.data.store.welfare)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (response.data.store.doorstepPhoto) {
|
||||
let list = JSON.parse(response.data.store.doorstepPhoto)
|
||||
_this.list3 = [];
|
||||
list.forEach(item => {
|
||||
_this.list3.push(_this.baseUrl + item)
|
||||
if (response.data.store.doorstepPhoto) {
|
||||
let list = JSON.parse(response.data.store.doorstepPhoto)
|
||||
_this.list3 = [];
|
||||
list.forEach(item => {
|
||||
_this.list3.push(_this.baseUrl + item)
|
||||
})
|
||||
}
|
||||
|
||||
_this.lon = _this.store.longitude,
|
||||
_this.lat = _this.store.latitude,
|
||||
|
||||
_this.getIndexBanner()
|
||||
}else{
|
||||
uni.showToast({
|
||||
title:"当前店铺已关闭!!!",
|
||||
icon:"none"
|
||||
})
|
||||
}
|
||||
|
||||
_this.getIndexBanner()
|
||||
|
||||
})
|
||||
|
||||
// uni.showToast({
|
||||
@ -616,9 +631,12 @@
|
||||
})
|
||||
},
|
||||
goGoGo() {
|
||||
let lat = Number(this.lat)
|
||||
let lon = Number(this.lon)
|
||||
uni.openLocation({
|
||||
latitude: 36.651441,
|
||||
longitude: 116.901224,
|
||||
latitude: lat,
|
||||
longitude: lon,
|
||||
|
||||
success: function() {
|
||||
console.log('success');
|
||||
},
|
||||
|
@ -20,7 +20,7 @@
|
||||
<view class="left-img">
|
||||
<view class="huiz" v-if="item.couponType == '优惠券'">¥{{item.couponAmount}}</view>
|
||||
<view class="hui-icon" v-if="item.couponType != '优惠券'">
|
||||
<image src="../../static/imgs/iconcar.png" mode="aspectFit"></image>
|
||||
<image src="../../static/imgs/iconcar.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="cbai">{{item.couponType}}</view>
|
||||
</view>
|
||||
@ -29,9 +29,9 @@
|
||||
<view class="hui-size">{{item.couponContent}}</view>
|
||||
<view class="dis-bt">
|
||||
<view class="hui-size">有效期:{{item.endTime || ''}}</view>
|
||||
<view class="anniu" v-if="item.couponType == '优惠券'"
|
||||
<view class="anniu" v-if="item.couponType == '优惠券'" <!--
|
||||
@click="goRecharge(item.id,item.cardRecordId)">
|
||||
<text>立即使用</text>
|
||||
<text>立即使用</text> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<view class="min-size" style="margin-bottom: 10px;" >
|
||||
达到当前等级所需成长值为{{item.growthValue}}
|
||||
</view>
|
||||
<u-line-progress :percentage="30" activeColor="#2F72F7"></u-line-progress>
|
||||
<u-line-progress :percentage="percentage" activeColor="#2F72F7"></u-line-progress>
|
||||
</view>
|
||||
<view class="right-img">
|
||||
<image src="../../static/imgs/vipxz.png" mode="aspectFit"></image>
|
||||
@ -155,6 +155,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
percentage:0,
|
||||
title: '',
|
||||
info: [{
|
||||
colorClass: 'uni-bg-red',
|
||||
@ -211,6 +212,29 @@
|
||||
this.getMember()
|
||||
},
|
||||
methods: {
|
||||
getPercentage(id){
|
||||
let grade = {}
|
||||
request({
|
||||
url: "business/userManager/userGrade/" + this.member.gradeId,
|
||||
method: 'get',
|
||||
}).then((res) => {
|
||||
grade = res.data
|
||||
this.userGradeList.forEach(item => {
|
||||
if (item.id == id){
|
||||
if (grade.grade > item.grade){
|
||||
this.percentage = 100
|
||||
}
|
||||
if (grade.grade < item.grade){
|
||||
this.percentage = 0
|
||||
}
|
||||
if (grade.grade == item.grade){
|
||||
this.percentage = ((this.member.growthValue / item.growthValue) * 100).toFixed(0)
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
// 获取当前登入用户的等级信息
|
||||
getMember(){
|
||||
request({
|
||||
@ -218,6 +242,7 @@
|
||||
method: 'get',
|
||||
}).then((res) => {
|
||||
this.member = res.data
|
||||
this.getPercentage(this.userGrade.id)
|
||||
})
|
||||
},
|
||||
getChainConfig(storeId){
|
||||
@ -255,6 +280,7 @@
|
||||
this.dieselRule = JSON.parse(res.data[0].dieselRule)
|
||||
this.naturalGasRule = JSON.parse(res.data[0].naturalGasRule)
|
||||
}
|
||||
// this.getPercentage(res.data[0].id)
|
||||
}else{
|
||||
this.isExist = false
|
||||
}
|
||||
@ -268,6 +294,7 @@
|
||||
this.dieselRule = JSON.parse(this.userGradeList[this.current].dieselRule)
|
||||
this.naturalGasRule = JSON.parse(this.userGradeList[this.current].naturalGasRule)
|
||||
}
|
||||
this.getPercentage(this.userGrade.id)
|
||||
},
|
||||
goBack() {
|
||||
uni.navigateBack()
|
||||
|
@ -44,9 +44,9 @@
|
||||
<view class="hui-size">实付金额</view>
|
||||
<view class="">{{oilOrder.payAmount}}元</view>
|
||||
</view>
|
||||
<view class="dis-fx">
|
||||
<view class="dis-fx" v-if="oilOrder.orderStatus=='paid'">
|
||||
<view class="hui-size">储值卡或囤油卡消费金额</view>
|
||||
<view class="">{{oilOrder.orderAmount - oilOrder.discountAmount - oilOrder.payAmount}}元</view>
|
||||
<view class="">{{(oilOrder.orderAmount - oilOrder.discountAmount - oilOrder.payAmount).toFixed(2)}}元</view>
|
||||
</view>
|
||||
<!-- <view class="box-title">优惠信息</view> -->
|
||||
<view class="dis-fx" v-if="oilOrder.discountAmount>0">
|
||||
|
@ -18,7 +18,7 @@
|
||||
<view class="min-size">优惠券总额</view>
|
||||
</view>
|
||||
<view class="or-box">
|
||||
<view class="max-size">{{this.activeRecommendRecordsList.length}}人</view>
|
||||
<view class="max-size">{{this.activeRecommendRecordsList.length || 0}}人</view>
|
||||
<view class="min-size">邀请人数</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -16,34 +16,56 @@
|
||||
<view class="">已经抵用0.00</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="box-gang">
|
||||
<!-- <view class="box-gang">
|
||||
<view class="">明细</view>
|
||||
<!-- <view class="hui-anniu">全部 <u-icon name="arrow-down-fill" size="18"></u-icon> </view> -->
|
||||
</view>
|
||||
<view class="hui-anniu">全部 <u-icon name="arrow-down-fill" size="18"></u-icon> </view>
|
||||
</view> -->
|
||||
<view class="fuji">
|
||||
<scroll-view scroll-y="true" :scroll-top="scrollTop" id="scrollList" style="height: 78vh;"
|
||||
@scrolltolower="scrolltolower">
|
||||
|
||||
<view class="mx-box" @click="godetails()" v-for="(item,index) in list" :key="index">
|
||||
<view class="mx-box" v-for="(item,index) in list" :key="index">
|
||||
<view class="m-b-box">
|
||||
<view class="box-name">加油站名称</view>
|
||||
<view class="moneyname">充值成功</view>
|
||||
<!-- <view class="box-name">加油站名称</view> -->
|
||||
<!-- <view class="moneyname">充值成功</view>payStatus -->
|
||||
<view class="box-name">{{getStoreName(storeList,item.storeId)}}</view>
|
||||
<view class="moneyname" v-if="item.payStatus=='paid'">已支付</view>
|
||||
<view class="moneyname" v-else-if="item.payStatus=='payFail'">支付失败</view>
|
||||
<view class="moneyname" v-else-if="item.payStatus=='refund'">已退款</view>
|
||||
<view class="moneyname" v-else-if="item.payStatus=='refunding'">退款中</view>
|
||||
<view class="moneyname" v-else>未支付</view>
|
||||
</view>
|
||||
<view class="y-bt">
|
||||
<view class="sizehui">支付方式</view>
|
||||
<!-- <view class="sizehei">¥{{item.paymentType}}</view> -->
|
||||
<view class="sizehei" v-if="item.paymentType == 'CASH'">现金</view>
|
||||
<view class="sizehei" v-else-if="item.paymentType == 'WECHAT'">微信</view>
|
||||
<view class="sizehei" v-else-if="item.paymentType == 'ALIPAY'">支付宝</view>
|
||||
<view class="sizehei" v-else-if="item.paymentType == 'UNIONPAY'">银联二维码</view>
|
||||
<view class="sizehei" v-else-if="item.paymentType == 'xf'">消费</view>
|
||||
<view class="sizehei" v-else>小程序码</view>
|
||||
</view>
|
||||
<view class="y-bt">
|
||||
<view class="sizehui">订单金额</view>
|
||||
<view class="sizehei">¥{{item.rechargeBalance}}</view>
|
||||
<view class="sizehei" v-if="item.paymentType =='xf' ">¥{{'-'+item.rechargeBalance}}</view>
|
||||
</view>
|
||||
<view class="y-bt">
|
||||
<view class="sizehui">优惠合计</view>
|
||||
<view class="sizehong">¥{{item.obtain}}</view>
|
||||
<view class="sizehong">¥{{item.obtain || 0}}</view>
|
||||
</view>
|
||||
<view class="y-bt">
|
||||
<view class="sizehui">订单时间</view>
|
||||
<view class="sizehei">{{item.createTime}}</view>
|
||||
</view>
|
||||
<view class="dibu">
|
||||
<!-- <view class="dibu">
|
||||
<view class="xiaanniu">评价有礼</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<u-empty v-if="list.length == 0" mode="coupon" text="内容为空"
|
||||
icon="http://cdn.uviewui.com/uview/empty/coupon.png">
|
||||
</u-empty>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
|
||||
@ -65,12 +87,14 @@
|
||||
chainStoreId: '',
|
||||
recordName: '储值卡',
|
||||
pageNo: 1,
|
||||
pageSize: 10
|
||||
pageSize:5
|
||||
},
|
||||
cardBalance: 0.00,
|
||||
title: '',
|
||||
|
||||
|
||||
// 店铺列表信息
|
||||
storeList: [],
|
||||
status: 'more', // 状态-正在加载中
|
||||
scrollTop: 0,
|
||||
}
|
||||
},
|
||||
|
||||
@ -83,8 +107,28 @@
|
||||
this.list = []
|
||||
this.getUserBalance();
|
||||
this.getAllOrderList();
|
||||
this.getStores();
|
||||
},
|
||||
methods: {
|
||||
// 滚动区域
|
||||
scrolltolower() {
|
||||
if (this.orderList.length < this.total) {
|
||||
this.query.page++;
|
||||
this.getAllOrderList()
|
||||
} else {
|
||||
this.status = "no-more"
|
||||
}
|
||||
},
|
||||
// 查询店铺列表信息
|
||||
getStores() {
|
||||
let _this = this;
|
||||
request({
|
||||
url: "business/storeInformation/store/list",
|
||||
method: 'get',
|
||||
}).then((res) => {
|
||||
_this.storeList = res.data
|
||||
})
|
||||
},
|
||||
// 查询全部充值订单
|
||||
getAllOrderList() {
|
||||
request({
|
||||
@ -129,7 +173,20 @@
|
||||
},
|
||||
goback() {
|
||||
uni.navigateBack()
|
||||
}
|
||||
},
|
||||
getStoreName(list, id) {
|
||||
let name = "";
|
||||
list.forEach(item => {
|
||||
if (item.id == id) {
|
||||
if (item.description != "" && item.description != null) {
|
||||
name = item.name + "(" + item.description + ")"
|
||||
} else {
|
||||
name = item.name
|
||||
}
|
||||
}
|
||||
})
|
||||
return name;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -240,6 +297,7 @@
|
||||
background-color: #ffffff;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.m-b-box {
|
||||
|
@ -284,12 +284,12 @@
|
||||
} else {
|
||||
this.status = "no-more"
|
||||
}
|
||||
if (this.balanceList.length < this.total1) {
|
||||
this.map1.page++;
|
||||
this.getBalanceOrder()
|
||||
} else {
|
||||
this.status = "no-more"
|
||||
}
|
||||
// if (this.balanceList.length < this.total1) {
|
||||
// this.map1.page++;
|
||||
// this.getBalanceOrder()
|
||||
// } else {
|
||||
// this.status = "no-more"
|
||||
// }
|
||||
},
|
||||
// 查询我的油品订单信息
|
||||
getMyOrder() {
|
||||
|
@ -17,16 +17,22 @@
|
||||
<view class="">已经抵用0.00</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="box-gang">
|
||||
<!-- <view class="box-gang">
|
||||
<view class="">明细</view>
|
||||
<!-- <view class="hui-anniu">全部 <u-icon name="arrow-down-fill" size="18"></u-icon> </view> -->
|
||||
</view>
|
||||
<view class="hui-anniu">全部 <u-icon name="arrow-down-fill" size="18"></u-icon> </view>
|
||||
</view> -->
|
||||
<view class="fuji" v-for="(item,index) in list" :key="index">
|
||||
|
||||
<view class="mx-box">
|
||||
<view class="m-b-box">
|
||||
<view class="box-name">加油站名称</view>
|
||||
<view class="moneyname">充值成功</view>
|
||||
<!-- <view class="box-name">加油站名称</view>
|
||||
<view class="moneyname">充值成功</view> -->
|
||||
<view class="box-name">{{getStoreName(storeList,item.storeId)}}</view>
|
||||
<view class="moneyname" v-if="item.payStatus=='paid'">已支付</view>
|
||||
<view class="moneyname" v-else-if="item.payStatus=='payFail'">支付失败</view>
|
||||
<view class="moneyname" v-else-if="item.payStatus=='refund'">已退款</view>
|
||||
<view class="moneyname" v-else-if="item.payStatus=='refunding'">退款中</view>
|
||||
<view class="moneyname" v-else>未支付</view>
|
||||
</view>
|
||||
<view class="y-bt">
|
||||
<view class="sizehui">油品类型</view>
|
||||
@ -48,9 +54,9 @@
|
||||
<view class="sizehui">订单时间</view>
|
||||
<view class="sizehei">{{item.createTime}}</view>
|
||||
</view>
|
||||
<view class="dibu">
|
||||
<!-- <view class="dibu">
|
||||
<view class="xiaanniu">评价有礼</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@ -77,6 +83,8 @@
|
||||
},
|
||||
refuelMoney: [],
|
||||
title: '',
|
||||
// 店铺列表信息
|
||||
storeList: [],
|
||||
|
||||
|
||||
}
|
||||
@ -90,8 +98,32 @@
|
||||
this.list = []
|
||||
this.getAllOrderList();
|
||||
this.getUserBalance()
|
||||
this.getStores();
|
||||
},
|
||||
methods: {
|
||||
// 查询店铺列表信息
|
||||
getStores() {
|
||||
let _this = this;
|
||||
request({
|
||||
url: "business/storeInformation/store/list",
|
||||
method: 'get',
|
||||
}).then((res) => {
|
||||
_this.storeList = res.data
|
||||
})
|
||||
},
|
||||
getStoreName(list, id) {
|
||||
let name = "";
|
||||
list.forEach(item => {
|
||||
if (item.id == id) {
|
||||
if (item.description != "" && item.description != null) {
|
||||
name = item.name + "(" + item.description + ")"
|
||||
} else {
|
||||
name = item.name
|
||||
}
|
||||
}
|
||||
})
|
||||
return name;
|
||||
},
|
||||
// 查询全部充值订单
|
||||
getAllOrderList() {
|
||||
request({
|
||||
|
@ -252,7 +252,7 @@
|
||||
},
|
||||
onLoad(e) {
|
||||
this.orderNo = e.orderNo
|
||||
// this.orderNo = "234520240124103747dec173"
|
||||
// this.orderNo = "2345202401261502301206e6"
|
||||
},
|
||||
onShow() {
|
||||
this.getOilOrder();
|
||||
@ -469,12 +469,14 @@
|
||||
}
|
||||
}
|
||||
if (falg == false) {
|
||||
this.chooseCardBalance(0)
|
||||
// this.chooseCardBalance(0)
|
||||
// this.chooseGrade(this.user.id,this.user.gradeId)
|
||||
}
|
||||
if (this.oilCardRedece==0){
|
||||
if (!this.isFixingLevel){
|
||||
this.getPaymentPreferential(this.user.gradeId)
|
||||
}else{
|
||||
this.chooseCardBalance(0)
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -491,6 +493,7 @@
|
||||
this.balanceRedece = this.user.cardBalance
|
||||
this.deductAmount = (this.oilOrder.orderAmount - this.fullRedece - this.couponRedece - this.gradeRedece-this.balanceRedece).toFixed(2)
|
||||
this.payAmount = (this.oilOrder.orderAmount - this.fullRedece - this.couponRedece - this.gradeRedece-this.balanceRedece).toFixed(2)
|
||||
console.log(this.oilOrder.orderAmount, this.fullRedece, this.couponRedece, this.gradeRedece,this.balanceRedece,111);
|
||||
}
|
||||
}else{
|
||||
// 使用囤油卡
|
||||
@ -511,6 +514,7 @@
|
||||
}else{
|
||||
this.deductAmount = (this.oilOrder.orderAmount - this.fullRedece - this.couponRedece - this.gradeRedece).toFixed(2)
|
||||
this.payAmount = (this.oilOrder.orderAmount - this.fullRedece - this.couponRedece - this.gradeRedece).toFixed(2)
|
||||
console.log(this.oilOrder.orderAmount, this.fullRedece, this.couponRedece, this.gradeRedece,this.balanceRedece,222);
|
||||
}
|
||||
},
|
||||
// 查看是否有可使用的会员等级优惠
|
||||
@ -734,9 +738,11 @@
|
||||
_this.refuelMoneyAfter = JSON.parse(res.data.userVo.refuelMoney)
|
||||
_this.chooseRefuelMoney()
|
||||
}else{
|
||||
_this.chooseCardBalance(0)
|
||||
|
||||
if (!this.isFixingLevel){
|
||||
_this.getPaymentPreferential(this.user.gradeId)
|
||||
}else{
|
||||
_this.chooseCardBalance(0)
|
||||
}
|
||||
}
|
||||
console.log("afterGrade");
|
||||
|
Loading…
Reference in New Issue
Block a user