Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
cc3441506b
@ -42,3 +42,9 @@ export function delExchange(id) {
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
export function getqueryGoods() {
|
||||
return request({
|
||||
url: 'business/convenience/goods/queryGoods',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
@ -51,7 +51,15 @@ export function deleteList(id) {
|
||||
|
||||
export function getoilnum(id) {
|
||||
return request({
|
||||
url: 'petrolStationManagement/oilNumber/getOilPrice/'+id,
|
||||
url: 'business/petrolStationManagement/oilNumber/getOilPrice/'+id,
|
||||
method: 'get',
|
||||
|
||||
})
|
||||
}
|
||||
// 统计
|
||||
export function getstatistics() {
|
||||
return request({
|
||||
url: 'business/marketingActivity/cardFuelRecord/selectFuelRecordCount',
|
||||
method: 'get',
|
||||
|
||||
})
|
||||
|
@ -97,3 +97,11 @@ export function exportExcelApi(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function getSalesByMtInventoryApi(data) {
|
||||
return request({
|
||||
url: 'business/convenience/mtInventoryDetails/getSalesByMtInventory',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
@ -142,7 +142,7 @@
|
||||
</el-card>
|
||||
<!-- 添加或修改兑换券对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="40%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" :label-position="labelPosition" label-width="100px">
|
||||
<el-form ref="form" :model="form" :rules="rules" :label-position="labelPosition" label-width="140px">
|
||||
<!-- <el-form-item label="所属连锁店id" prop="chainStorId">-->
|
||||
<!-- <el-input v-model="form.chainStorId" placeholder="请输入所属连锁店id" />-->
|
||||
<!-- </el-form-item>-->
|
||||
@ -160,8 +160,16 @@
|
||||
</el-radio-group>
|
||||
<!-- <p v-if="form.type == 2" style="color: red">洗车卡为不限次数卡,仅在有效期内可用,如按次数,请选择洗车券</p>-->
|
||||
</el-form-item>
|
||||
<el-form-item label="选择兑换商品" prop="giftName">
|
||||
<el-input type="textarea" v-model="form.giftName" placeholder="请输入兑换礼品名"></el-input>
|
||||
<el-form-item label="选择兑换商品" prop="giftId">
|
||||
<!-- <el-input type="textarea" v-model="form.giftName" placeholder="请输入兑换礼品名"></el-input>-->
|
||||
<el-select v-model="form.giftId" placeholder="请选择" @change="change" >
|
||||
<el-option
|
||||
v-for="dict in goodsList"
|
||||
:key="dict.id.toString()"
|
||||
:label="dict.name"
|
||||
:value="dict.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="卡券有效期" prop="validity">
|
||||
<el-input type="number" placeholder="请输入卡券有效期" v-model="form.validity">
|
||||
@ -211,13 +219,15 @@ import {
|
||||
getExchange,
|
||||
delExchange,
|
||||
addExchange,
|
||||
updateExchange
|
||||
updateExchange,
|
||||
getqueryGoods
|
||||
} from '@/api/EventMarketing/cardExchange'
|
||||
|
||||
export default {
|
||||
name: 'Exchange',
|
||||
data() {
|
||||
return {
|
||||
goodsList:[],
|
||||
labelPosition:'left',
|
||||
centerDialogVisible: false,
|
||||
loadingdialog:true,
|
||||
@ -290,6 +300,11 @@ export default {
|
||||
|
||||
},
|
||||
methods: {
|
||||
change(e){
|
||||
console.log(e)
|
||||
this.form.giftId = e
|
||||
|
||||
},
|
||||
qrcodelook(url) {
|
||||
this.loadingdialog = true
|
||||
this.centerDialogVisible = true
|
||||
@ -317,6 +332,10 @@ export default {
|
||||
this.total = response.data.total
|
||||
this.loading = false
|
||||
})
|
||||
getqueryGoods().then(res=>{
|
||||
console.log(res)
|
||||
this.goodsList = res.data
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
@ -377,6 +396,7 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
console.log(this.form)
|
||||
this.$refs['form'].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
|
@ -50,65 +50,115 @@
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
<div class="tj">
|
||||
<div class="sshi">
|
||||
<el-card class="kar" >
|
||||
<div class="tj-num">总发卡量</div>
|
||||
</el-card>
|
||||
<el-card class="kar" v-for="(item,index) in onelist" :key="index" >
|
||||
<div class="ds" >
|
||||
<div class="tjaocuo">
|
||||
|
||||
<div class="tj-num">
|
||||
面值:{{item.cardAmount || 0}}
|
||||
<div class="sshi">
|
||||
<div class="tj-text">总发卡量</div>
|
||||
<el-divider></el-divider>
|
||||
<div class="tj-num" v-if="onelist&&onelist.length == 0 ">暂无数据...</div>
|
||||
<div>
|
||||
</div>
|
||||
<div class="ds"v-for="(item,index) in onelist" :key="index" >
|
||||
|
||||
<div class="tj-num">
|
||||
<div class="one-size">
|
||||
{{item.cardAmount || 0}}
|
||||
</div>
|
||||
<div class="tj-num">
|
||||
总发卡金额:{{item.total || 0}}
|
||||
</div>
|
||||
<div class="tj-num">
|
||||
总数量:{{item.count || 0}}
|
||||
<div >
|
||||
面值
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
<div class="tj-num">
|
||||
<div class="two-size">
|
||||
{{item.total || 0}}
|
||||
</div>
|
||||
<div>
|
||||
总发卡金额
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="tj-num">
|
||||
<div class="three-size">{{item.count || 0}}</div>
|
||||
<div>
|
||||
总数量
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="sshi">
|
||||
<el-card class="kar" >
|
||||
<div class="tj-num">已使用卡量</div>
|
||||
</el-card>
|
||||
<el-card class="kar" v-for="(item,index) in twolist" :key="index" >
|
||||
<div class="ds">
|
||||
<div class="tj-text">已使用卡量</div>
|
||||
<el-divider></el-divider>
|
||||
<div class="tj-num" v-if="twolist&&twolist.length == 0 ">暂无数据...</div>
|
||||
<div>
|
||||
</div>
|
||||
<div class="ds"v-for="(item,index) in twolist" :key="index" >
|
||||
|
||||
<div class="tj-num">
|
||||
面值:{{item.cardAmount || 0}}
|
||||
<div class="tj-num">
|
||||
<div class="one-size">
|
||||
{{item.cardAmount || 0}}
|
||||
</div>
|
||||
<div class="tj-num">
|
||||
总发卡金额:{{item.total || 0}}
|
||||
</div>
|
||||
<div class="tj-num">
|
||||
总数量:{{item.count || 0}}
|
||||
<div >
|
||||
面值
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
<div class="tj-num">
|
||||
<div class="two-size">
|
||||
{{item.total || 0}}
|
||||
</div>
|
||||
<div>
|
||||
总发卡金额
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="tj-num">
|
||||
<div class="three-size">{{item.count || 0}}</div>
|
||||
<div>
|
||||
总数量
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="sshi">
|
||||
<el-card class="kar" >
|
||||
<div class="tj-num">未使用卡量</div>
|
||||
</el-card>
|
||||
<el-card class="kar" v-for="(item,index) in threelist" :key="index" >
|
||||
<div class="ds">
|
||||
<div class="tj-text">未使用卡量</div>
|
||||
<el-divider></el-divider>
|
||||
<div class="tj-num" v-if="threelist&&threelist.length == 0 ">暂无数据...</div>
|
||||
<div>
|
||||
</div>
|
||||
<div class="ds"v-for="(item,index) in threelist" :key="index" >
|
||||
|
||||
<div class="tj-num">
|
||||
面值:{{item.cardAmount || 0}}
|
||||
<div class="tj-num">
|
||||
<div class="one-size">
|
||||
{{item.cardAmount || 0}}
|
||||
</div>
|
||||
<div class="tj-num">
|
||||
总发卡金额:{{item.total || 0}}
|
||||
</div>
|
||||
<div class="tj-num">
|
||||
总数量:{{item.count || 0}}
|
||||
<div >
|
||||
面值
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="tj-num">
|
||||
<div class="two-size">
|
||||
{{item.total || 0}}
|
||||
</div>
|
||||
<div>
|
||||
总发卡金额
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="tj-num">
|
||||
<div class="three-size">{{item.count || 0}}</div>
|
||||
<div>
|
||||
总数量
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
|
||||
@ -452,9 +502,8 @@ import {
|
||||
.tj{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20px;
|
||||
|
||||
}
|
||||
.kar{
|
||||
width: 100%;
|
||||
@ -462,14 +511,38 @@ import {
|
||||
margin-bottom: 10px;
|
||||
|
||||
}
|
||||
.one-size{
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
}
|
||||
.two-size{
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
color: #78b0fb;
|
||||
}
|
||||
.three-size{
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
color: #f73f3f;
|
||||
}
|
||||
.ds{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #f4f4f4;
|
||||
border-radius: 6px;
|
||||
margin-bottom: 15px;
|
||||
box-sizing: border-box;
|
||||
padding: 15px 5px;
|
||||
}
|
||||
.tj-text{
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.tj-num{
|
||||
margin: 5px auto;
|
||||
font-size: 28px;
|
||||
//font-size: 28px;
|
||||
color: #666;
|
||||
text-align: center;
|
||||
}
|
||||
@ -494,5 +567,21 @@ import {
|
||||
}
|
||||
.sshi{
|
||||
width: 33%;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
border-radius: 6px;
|
||||
//background: #f9f9f9;
|
||||
}
|
||||
.tjaocuo{
|
||||
width: 100%;
|
||||
margin-bottom: 15px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
|
@ -30,6 +30,20 @@
|
||||
<el-button type="primary" style="margin-left: 20px" icon="el-icon-search" @click="getlist">搜索</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card style="margin-bottom: 15px">
|
||||
<div style="margin-bottom: 15px">统计</div>
|
||||
<el-divider></el-divider>
|
||||
<div class="wrap-box">
|
||||
<div class="tjbox" v-for="(item,index) in tjlist" :key="index" >
|
||||
<div>油品名称: <span class="cu">{{item.oilName}}</span> </div>
|
||||
<div>总参与人数: <span class="cu">{{item.peoples}}</span></div>
|
||||
<div>售出总金额: <span class="cu">{{item.money}}</span></div>
|
||||
<div>售出总升数: <span class="cu">{{item.litres}}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<el-button type="primary" icon="el-icon-plus" style="margin-bottom: 10px " @click="addoilBlock()">新增囤油卡</el-button>
|
||||
<el-alert
|
||||
@ -41,76 +55,98 @@
|
||||
:data="tableData"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
type="index"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="lockupPrice"
|
||||
label="囤油锁定价(元)/L"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="oilPrice"
|
||||
label="当前挂牌价(元)/L"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="gbPrice"
|
||||
label="当前国标价(元)/L"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="type"
|
||||
label="油卡类型"
|
||||
label="活动时间"
|
||||
width="330"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag>{{scope.row.type}}</el-tag>
|
||||
<div style="display: flex;align-items: center">
|
||||
<div>{{scope.row.createTime}}</div>
|
||||
<div> --- </div>
|
||||
<div>{{scope.row.endTime}}</div>
|
||||
</div>
|
||||
|
||||
<!-- <el-tag>{{scope.row.type}}</el-tag>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="oilType"
|
||||
label="油品"
|
||||
>
|
||||
prop="type"
|
||||
label="限制时间"
|
||||
width="350"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div style="display: flex;align-items: center" v-if="scope.row.stipulateTimeS">
|
||||
<div>{{scope.row.stipulateTimeS}}</div>
|
||||
<div> --- </div>
|
||||
<div>{{scope.row.stipulateTimeE}}</div>
|
||||
</div>
|
||||
|
||||
<!-- <el-tag>{{scope.row.type}}</el-tag>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="oilType"-->
|
||||
<!-- label="油品"-->
|
||||
<!-- >-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column
|
||||
prop="rechargeBalance"
|
||||
label="充值金额"
|
||||
label="充值金额(元)"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag>{{scope.row.rechargeBalance}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="lockupPrice"
|
||||
label="锁价单价"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag>{{scope.row.lockupPrice}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="lockupPrice"-->
|
||||
<!-- label="锁价单价"-->
|
||||
<!-- >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-tag>{{scope.row.lockupPrice}}</el-tag>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column
|
||||
prop="incomeLitres"
|
||||
label="升数"
|
||||
label="所得升数(L)"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag>{{scope.row.incomeLitres}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="points"
|
||||
label="赠送积分"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag>{{scope.row.points}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="activeTime"
|
||||
label="活动时间"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.activeTime == 1">不限时间</span>
|
||||
<span v-if="scope.row.activeTime == 2">自定义时间</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="activityProgress"
|
||||
label="活动进度"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="info"v-if="scope.row.activityProgress == 2">已结束</el-tag>
|
||||
<el-tag type="success" v-if="scope.row.activityProgress == 1">进行中</el-tag>
|
||||
<el-tag type="danger" v-if="scope.row.activityProgress == 0">待开始</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="points"-->
|
||||
<!-- label="赠送积分"-->
|
||||
<!-- >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-tag>{{scope.row.points}}</el-tag>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
|
||||
<el-table-column
|
||||
prop="activeStatus"
|
||||
label="状态"
|
||||
label="活动状态"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
|
||||
@ -125,11 +161,7 @@
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
align="center"
|
||||
label="更新时间">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="编辑"
|
||||
>
|
||||
@ -161,27 +193,20 @@
|
||||
center>
|
||||
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="80px" class="demo-ruleForm">
|
||||
<div style="display: flex; align-items: center ">
|
||||
<el-form-item label="油品类型" prop="oilType">
|
||||
<el-select v-model="ruleForm.oilType" placeholder="请选择" @change="getoiltype" >
|
||||
<el-option
|
||||
v-for="dict in oilList"
|
||||
:key="dict.id.toString()"
|
||||
:label="dict.oilName"
|
||||
:value="dict.id.toString()">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<div style="margin-left: 10px" v-if="oilPrice&&gbPrice">今日油价:<span style="color: red">{{oilPrice || ''}}</span> 元/L 国标油价:<span style="color: red">{{oilPrice || ''}}</span>元/L </div>
|
||||
</div>
|
||||
|
||||
<el-form-item label="油品类型" prop="oilType">
|
||||
<el-select v-model="ruleForm.oilType" placeholder="请选择" >
|
||||
<el-option
|
||||
v-for="dict in oilList"
|
||||
:key="dict.id.toString()"
|
||||
:label="dict.oilName"
|
||||
:value="dict.id.toString()">
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
<!-- <el-radio-group v-model="ruleForm.oilType" >-->
|
||||
<!-- <el-radio-->
|
||||
<!-- v-for="dict in oilList"-->
|
||||
<!-- :key="dict.id"-->
|
||||
<!-- :label="dict.oilName"-->
|
||||
<!-- :value="dict.id"-->
|
||||
<!-- />-->
|
||||
<!-- </el-radio-group>-->
|
||||
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="锁价单价" prop="lockupPrice">
|
||||
<el-input v-model="ruleForm.lockupPrice" min="1">
|
||||
@ -255,12 +280,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getList,oilName,addList,eitList,getById,getoilnum} from "@/api/EventMarketing/oilBlock";
|
||||
import { getList,oilName,addList,eitList,getById,getoilnum,getstatistics} from "@/api/EventMarketing/oilBlock";
|
||||
export default {
|
||||
dicts: ['oil_type'],
|
||||
name: 'index',
|
||||
data(){
|
||||
return{
|
||||
gbPrice:null,
|
||||
oilPrice:null,
|
||||
tjlist:[],
|
||||
value:'',
|
||||
type:0,
|
||||
centerDialogVisible:false,
|
||||
@ -344,7 +372,6 @@
|
||||
},
|
||||
'ruleForm.lockupPrice':{
|
||||
handler: function() {
|
||||
|
||||
if(this.ruleForm.rechargeBalance != 0 && this.ruleForm.lockupPrice != 0 ){
|
||||
this.ruleForm.incomeLitres = this.ruleForm.rechargeBalance / this.ruleForm.lockupPrice
|
||||
|
||||
@ -366,8 +393,19 @@
|
||||
},
|
||||
|
||||
methods:{
|
||||
//
|
||||
//
|
||||
|
||||
getoiltype(e){
|
||||
|
||||
getoilnum(e).then(res=>{
|
||||
console.log(res)
|
||||
if(res.code == 200){
|
||||
this.gbPrice = res.data.gbPrice
|
||||
this.oilPrice = res.data.oilPrice
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
radiovalue(lable){
|
||||
this.oilList = []
|
||||
oilName(this.queryParams.type).then(res=>{
|
||||
@ -385,6 +423,10 @@
|
||||
this.total = res.data.total;
|
||||
}
|
||||
})
|
||||
getstatistics().then(res=>{
|
||||
console.log(res)
|
||||
this.tjlist = res.data
|
||||
})
|
||||
|
||||
},
|
||||
addoilBlock(){
|
||||
@ -454,4 +496,22 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.tjbox{
|
||||
width: 19%;
|
||||
background: #f9f9f9;
|
||||
margin-right: 1%;
|
||||
margin-bottom: 1%;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
.cu{
|
||||
font-weight: bold;
|
||||
}
|
||||
.wrap-box{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
|
@ -90,12 +90,17 @@
|
||||
<el-table-column label="销售量" align="center" prop="unit">
|
||||
<el-table-column label="便利店销售" align="center" prop="goodsSales">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.goodsSales?scope.row.goodsSales:'--'}}
|
||||
{{scope.row.goodsSales?scope.row.goodsSales:'0'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="积分兑换" align="center" prop="inventorySales">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.inventorySales?scope.row.inventorySales:'--'}}
|
||||
{{scope.row.inventorySales?scope.row.inventorySales:'0'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="兑换卷兑换" align="center" prop="inventorySales">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.exchangeSales?scope.row.exchangeSales:'0'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
@ -241,10 +246,10 @@ import {
|
||||
editInventoryApi,
|
||||
addInventoryApi,
|
||||
batchProcessingApi,
|
||||
auditInventoryApi ,
|
||||
auditInventoryApi,
|
||||
storageInventoryApi,
|
||||
abolitionInventoryApi,
|
||||
exportExcelApi
|
||||
exportExcelApi, getSalesByMtInventoryApi
|
||||
} from "@/api/convenienceStore/inventory";
|
||||
|
||||
|
||||
@ -480,11 +485,11 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
addCommodity () {
|
||||
async addCommodity () {
|
||||
let this_ = this
|
||||
let sum = 0;
|
||||
|
||||
this.multipleSelection.forEach(mul=>{
|
||||
for (const mul of this.multipleSelection) {
|
||||
let flag = true;
|
||||
this_.detailsList.forEach(det=>{
|
||||
if (mul.id == det.goodsId) {
|
||||
@ -493,6 +498,12 @@ export default {
|
||||
}
|
||||
})
|
||||
if(flag) {
|
||||
|
||||
let getPurchaseByTankIdData
|
||||
await getSalesByMtInventoryApi().then(res=>{
|
||||
getPurchaseByTankIdData = res.data
|
||||
})
|
||||
|
||||
let now = {
|
||||
inventoryId: this.inventoryId,
|
||||
goodsId: mul.id,
|
||||
@ -506,10 +517,15 @@ export default {
|
||||
damageQuantity:0,
|
||||
profitLossAmount:0, // 盈亏金额
|
||||
inventoryDiscrepancy:0, // 库存差异
|
||||
purchase:getPurchaseByTankIdData.purchase,
|
||||
goodsSales:getPurchaseByTankIdData.goodsSales,
|
||||
inventorySales:getPurchaseByTankIdData.inventorySales,
|
||||
exchangeSales:getPurchaseByTankIdData.exchangeSales,
|
||||
|
||||
}
|
||||
this_.detailsList.push(now)
|
||||
}
|
||||
})
|
||||
}
|
||||
if(sum>0) {
|
||||
this.$modal.msgError("同一货损单不能有两件相同的商品,您选择了"+sum+"件相同的商品,已为您剔除");
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ export default {
|
||||
pageSize:null
|
||||
},
|
||||
loading: false,
|
||||
dateRange: [],
|
||||
dateRange: [new Date(),new Date()],
|
||||
defaultSort: {prop: 'createTime', order: 'descending'},
|
||||
|
||||
total: 0,
|
||||
|
@ -666,7 +666,7 @@ export default {
|
||||
// 批量图片
|
||||
giftImages: [],
|
||||
// 上传地址
|
||||
uploadAction: process.env.VUE_APP_SERVER_URL + 'backendApi/file/upload',
|
||||
uploadAction: process.env.VUE_APP_BASE_API + 'backendApi/file/upload',
|
||||
uploadHeader: { 'Access-Token' : getToken() },
|
||||
// 隐藏上传
|
||||
hideUpload: false,
|
||||
@ -676,7 +676,7 @@ export default {
|
||||
url:'http://localhost:8008/static/uploadImages/20231103/ffbbe7d3ee1441fdaf706802fa0f176a.png'}
|
||||
],
|
||||
// 图片根目录
|
||||
imagePath: process.env.VUE_APP_SERVER_URL,
|
||||
imagePath: process.env.VUE_APP_BASE_API,
|
||||
|
||||
dialogImageUrl: "",
|
||||
dialogVisible: false,
|
||||
|
@ -26,7 +26,7 @@
|
||||
<div>{{item.gunName}}</div>
|
||||
</div>
|
||||
<div class="cardbox-bottom" :class="{ 'actcolor':item.status == '启用' }">
|
||||
<div>ID:{{ item.id }}</div>
|
||||
<!-- <div>ID:{{ item.id }}</div>-->
|
||||
</div>
|
||||
<div class="cardboxb" v-if="item.oilMachineGunNumber != null ">
|
||||
<i class="el-icon-share"></i>
|
||||
|
@ -178,7 +178,7 @@
|
||||
</el-input>
|
||||
<el-alert
|
||||
v-if="orderForm.tankId"
|
||||
style="height: 25px;line-height: 16px;"
|
||||
style="height: auto;line-height: 16px;padding: 0 0 0 0;"
|
||||
:title='tTitle'
|
||||
type="warning"
|
||||
:closable="false">
|
||||
|
@ -645,8 +645,9 @@ export default {
|
||||
this.getList();
|
||||
},
|
||||
// 新增按钮操作
|
||||
handleAdd() {
|
||||
async handleAdd() {
|
||||
this.reset();
|
||||
await this.getAuditPrem()
|
||||
this.open = true;
|
||||
this.title = "新增员工";
|
||||
},
|
||||
|
@ -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";
|
||||
|
@ -58,6 +58,13 @@ public class MtInventoryDetailsController extends BaseController {
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
|
||||
@GetMapping("/getSalesByMtInventory")
|
||||
public ResponseObject getSales(Integer goodsId) {
|
||||
return getSuccessResult(mtInventoryDetailsService.getSales(goodsId));
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
|
@ -37,6 +37,8 @@ public interface MtInventoryDetailsService {
|
||||
|
||||
IPage<MtInventoryDetailsVO> getListByPage(Page page, MtInventoryDetails mtInventoryDetails);
|
||||
|
||||
|
||||
MtInventoryDetailsVO getSales(Integer goodsId);
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
|
@ -95,11 +95,14 @@ public class MtInventoryDetailsServiceImpl implements MtInventoryDetailsService
|
||||
}
|
||||
|
||||
// 查询销售数据
|
||||
LJOrder statisticsByTime = ljOrderService.getStatisticsByTime(queryTime, record.getGoodsId());
|
||||
LJOrder statisticsByTime = ljOrderService.getStatisticsByTime(queryTime, record.getGoodsId(),null);
|
||||
// 查询积分兑换数据
|
||||
IntegralOrders statisticsByTime1 = integralOrdersService.getStatisticsByTime(queryTime, record.getGoodsId());
|
||||
// 查询积分商品库存
|
||||
IntegralGift stockByGoodsId = integralGiftService.getStockByGoodsId(record.getGoodsId());
|
||||
// 兑换卷
|
||||
LJOrder statisticsByTime2 = ljOrderService.getStatisticsByTime(queryTime, record.getGoodsId(),"0");
|
||||
|
||||
|
||||
|
||||
if (ObjectUtil.isNotEmpty(statisticsByTime)) {
|
||||
@ -111,10 +114,51 @@ public class MtInventoryDetailsServiceImpl implements MtInventoryDetailsService
|
||||
if (ObjectUtil.isNotEmpty(stockByGoodsId)) {
|
||||
record.setStock(record.getStock()+stockByGoodsId.getRemainingInventory());
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(stockByGoodsId)) {
|
||||
record.setExchangeSales(statisticsByTime2.getGoodsNum().toString());
|
||||
}
|
||||
}
|
||||
return MtInventoryDetailsIPage;
|
||||
}
|
||||
|
||||
|
||||
public MtInventoryDetailsVO getSales(Integer goodsId) {
|
||||
MtInventoryDetailsVO record = new MtInventoryDetailsVO();
|
||||
record.setGoodsId(goodsId);
|
||||
Date queryTime = new Date();
|
||||
// 查询进货数据
|
||||
MtPurchaseDetails incomingGoodsData = mtPurchaseDetailsService.getIncomingGoodsData(record.getGoodsId());
|
||||
if (ObjectUtil.isNotEmpty(incomingGoodsData)) {
|
||||
record.setPurchase(incomingGoodsData.getQuantityPurchased().toString());
|
||||
queryTime = incomingGoodsData.getUpdateTime();
|
||||
}
|
||||
|
||||
// 查询销售数据
|
||||
LJOrder statisticsByTime = ljOrderService.getStatisticsByTime(queryTime, record.getGoodsId(),null);
|
||||
// 查询积分兑换数据
|
||||
IntegralOrders statisticsByTime1 = integralOrdersService.getStatisticsByTime(queryTime, record.getGoodsId());
|
||||
// 查询积分商品库存
|
||||
IntegralGift stockByGoodsId = integralGiftService.getStockByGoodsId(record.getGoodsId());
|
||||
// 兑换卷
|
||||
LJOrder statisticsByTime2 = ljOrderService.getStatisticsByTime(queryTime, record.getGoodsId(),"0");
|
||||
|
||||
|
||||
|
||||
if (ObjectUtil.isNotEmpty(statisticsByTime)) {
|
||||
record.setGoodsSales(statisticsByTime.getGoodsNum().toString());
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(statisticsByTime1)) {
|
||||
record.setInventorySales(statisticsByTime1.getExchangeQuantity().toString());
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(stockByGoodsId)) {
|
||||
record.setStock(record.getStock()+stockByGoodsId.getRemainingInventory());
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(stockByGoodsId)) {
|
||||
record.setExchangeSales(statisticsByTime2.getGoodsNum().toString());
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
|
@ -23,5 +23,6 @@ public class MtInventoryDetailsVO extends MtInventoryDetails {
|
||||
private String goodsSales;
|
||||
// 积分商品兑换量
|
||||
private String inventorySales;
|
||||
|
||||
// 兑换卷
|
||||
private String exchangeSales;
|
||||
}
|
||||
|
@ -123,8 +123,8 @@ public class IntegralOrdersController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/statistics")
|
||||
public ResponseObject statistics(Integer orderType) {
|
||||
return getSuccessResult(this.integralOrdersService.statistics(orderType));
|
||||
public ResponseObject statistics(IntegralOrdersDTO integralOrders) {
|
||||
return getSuccessResult(this.integralOrdersService.statistics(integralOrders));
|
||||
}
|
||||
|
||||
|
||||
|
@ -97,7 +97,7 @@ public interface IntegralOrdersMapper {
|
||||
* 统计数据
|
||||
* @return
|
||||
*/
|
||||
Map<String, String> statistics(@Param("storeId") Integer storeId, @Param("orderType") Integer orderType);
|
||||
Map<String, String> statistics(@Param("integralOrders") IntegralOrdersDTO integralOrders);
|
||||
|
||||
List<IntegralOrders> getListByOrderNo(@Param("orderNumber") String orderNumber,@Param("storeId") Integer storeId);
|
||||
|
||||
|
@ -103,7 +103,9 @@
|
||||
and ig.gift_name like CONCAT ('%',#{integralGift.giftName},'%')
|
||||
</if>
|
||||
<if test="integralGift.deliveryMethod != null and integralGift.deliveryMethod != ''">
|
||||
and ig.delivery_method like CONCAT ('%',#{integralGift.deliveryMethod},'%')
|
||||
and (ig.delivery_method like CONCAT ('%',#{integralGift.deliveryMethod},'%')
|
||||
or ig.delivery_method = '[]'
|
||||
)
|
||||
</if>
|
||||
|
||||
<if test="integralGift.categoryId != null">
|
||||
|
@ -295,16 +295,68 @@
|
||||
</select>
|
||||
<select id="statistics" resultType="java.util.Map">
|
||||
select count(0) num,
|
||||
sum(exchange_quantity) exchangeQuantity,
|
||||
sum(integral) integral,
|
||||
sum(amount) amount,
|
||||
SUM(CASE WHEN order_status IN ('待处理', '待发货') THEN 1 ELSE 0 END) AS await,
|
||||
SUM(CASE WHEN order_status IN ('已完成', '已发货') THEN 1 ELSE 0 END) AS dispose,
|
||||
SUM(CASE WHEN order_status IN ('已拒绝', '已退款') THEN 1 ELSE 0 END) AS refuse
|
||||
from integral_orders
|
||||
where store_id = #{storeId}
|
||||
<if test="orderType != null">
|
||||
and order_type = #{orderType}
|
||||
sum(io.exchange_quantity) exchangeQuantity,
|
||||
sum(io.integral) integral,
|
||||
sum(io.amount) amount,
|
||||
SUM(CASE WHEN io.order_status IN ('待处理', '待发货') THEN 1 ELSE 0 END) AS await,
|
||||
SUM(CASE WHEN io.order_status IN ('已完成', '已发货') THEN 1 ELSE 0 END) AS dispose,
|
||||
SUM(CASE WHEN io.order_status IN ('已拒绝', '已退款') THEN 1 ELSE 0 END) AS refuse
|
||||
from integral_orders io
|
||||
left join mt_user mu ON io.user_id = mu.id
|
||||
left join integral_gift ig ON io.gift_id = ig.id
|
||||
left join mt_user_express_address ea ON io.address_id = ea.id
|
||||
where io.store_id = #{integralOrders.storeId}
|
||||
<if test="integralOrders.orderType != null">
|
||||
and order_type = #{integralOrders.orderType}
|
||||
</if>
|
||||
<if test="integralOrders.mobile != null">
|
||||
and mu.mobile like CONCAT ('%',#{integralOrders.mobile},'%')
|
||||
</if>
|
||||
<if test="integralOrders.params.beginTime != null and integralOrders.params.beginTime != ''">
|
||||
and date_format(io.create_time,'%y%m%d') >= date_format(#{integralOrders.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="integralOrders.params.endTime != null and integralOrders.params.endTime != ''">
|
||||
and date_format(io.create_time,'%y%m%d') <= date_format(#{integralOrders.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="integralOrders.orderNumber != null and integralOrders.orderNumber != ''">
|
||||
and io.order_number like CONCAT ('%',#{integralOrders.orderNumber},'%')
|
||||
</if>
|
||||
<if test="integralOrders.shippingType != null and integralOrders.shippingType != ''">
|
||||
and io.shipping_type = #{integralOrders.shippingType}
|
||||
</if>
|
||||
|
||||
<if test="integralOrders.orderStatus != null and integralOrders.orderStatus != '' and integralOrders.orderStatus != 0 ">
|
||||
and (
|
||||
(#{integralOrders.orderStatus} = 1 and (io.order_status = '待处理' or io.order_status = '待发货')) or
|
||||
(#{integralOrders.orderStatus} = 2 and (io.order_status = '已完成' or io.order_status = '已发货')) or
|
||||
(#{integralOrders.orderStatus} = 3 and (io.order_status = '已退款' or io.order_status = '已拒绝')) or
|
||||
(#{integralOrders.orderStatus} = 4 and io.order_status = '未支付')
|
||||
)
|
||||
</if>
|
||||
<if test="integralOrders.id != null">
|
||||
and io.id = #{integralOrders.id}
|
||||
</if>
|
||||
<if test="integralOrders.userId != null">
|
||||
and io.user_id = #{integralOrders.userId}
|
||||
</if>
|
||||
<if test="integralOrders.giftId != null">
|
||||
and io.gift_id = #{integralOrders.giftId}
|
||||
</if>
|
||||
<if test="integralOrders.exchangeQuantity != null">
|
||||
and io.exchange_quantity = #{integralOrders.exchangeQuantity}
|
||||
</if>
|
||||
|
||||
<if test="integralOrders.status != null and integralOrders.status != ''">
|
||||
and io.status = #{integralOrders.status}
|
||||
</if>
|
||||
<if test="integralOrders.processingResult != null and integralOrders.processingResult != ''">
|
||||
and io.processing_result = #{integralOrders.processingResult}
|
||||
</if>
|
||||
<if test="integralOrders.createTime != null">
|
||||
and io.create_time = #{integralOrders.createTime}
|
||||
</if>
|
||||
<if test="integralOrders.updateTime != null">
|
||||
and io.update_time = #{integralOrders.updateTime}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
@ -66,7 +66,7 @@ public interface IntegralOrdersService {
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean deleteById(Integer id);
|
||||
Map<String, String> statistics(Integer orderType);
|
||||
Map<String, String> statistics(IntegralOrdersDTO integralOrders);
|
||||
|
||||
IntegralOrders integralOrdersProcessing(IntegralOrdersRequest integralOrdersList);
|
||||
|
||||
|
@ -156,9 +156,10 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> statistics(Integer orderType) {
|
||||
public Map<String, String> statistics(IntegralOrdersDTO integralOrders) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
return this.integralOrdersDao.statistics(nowAccountInfo.getStoreId(),orderType);
|
||||
integralOrders.setStoreId(nowAccountInfo.getStoreId());
|
||||
return this.integralOrdersDao.statistics(integralOrders);
|
||||
}
|
||||
|
||||
@Resource
|
||||
@ -326,7 +327,7 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
|
||||
for (IntegralOrders integralOrders : listByOrderNo) {
|
||||
// 查询员工信息
|
||||
LJStaff ljStaff = ljStaffMapper.selectById(integralOrders.getStaffId());
|
||||
|
||||
if (ObjectUtil.isEmpty(integralOrders.getIntegral())) integralOrders.setIntegral(0.0);
|
||||
totalPoints = totalPoints.add(new BigDecimal(integralOrders.getIntegral()));
|
||||
// 加兑换卷和优惠券判断
|
||||
IntegralGift integralGift = integralGiftService.queryById(integralOrders.getGiftId());
|
||||
|
@ -269,6 +269,18 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}else {
|
||||
TAccount tAccount = accountService.selectAccountByStaffId(staff.getId());
|
||||
if (ObjectUtil.isNotEmpty(tAccount)) {
|
||||
if (tAccount.getAccountName().matches("\\d+")) {
|
||||
tAccount.setAccountName(staff.getMobile());
|
||||
}
|
||||
try {
|
||||
accountService.editAccount(tAccount, null);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
return row;
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ public class HandoverRecordController extends BaseController {
|
||||
|
||||
@GetMapping("selectByTime")
|
||||
public ResponseObject selectByTime() {
|
||||
return getSuccessResult(this.handoverRecordService.selectByTime());
|
||||
return getSuccessResult(this.handoverRecordService.selectByTime(null));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -107,8 +107,8 @@ public class HandoverRecordController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("handover")
|
||||
public ResponseObject handover() {
|
||||
return getSuccessResult(handoverRecordService.handover());
|
||||
public ResponseObject handover(Integer staffId) {
|
||||
return getSuccessResult(handoverRecordService.handover(staffId));
|
||||
}
|
||||
|
||||
@GetMapping("handoverByAllOrder")
|
||||
|
@ -38,6 +38,23 @@ public class OrderGoods extends BaseEntity implements Serializable {
|
||||
* 商品数量
|
||||
*/
|
||||
private Integer num;
|
||||
/**
|
||||
* 商品单价
|
||||
*/
|
||||
private Double retailPrice;
|
||||
/**
|
||||
* 商品会员价
|
||||
*/
|
||||
private Double memberPrice;
|
||||
/**
|
||||
* 商品合计金额
|
||||
*/
|
||||
private Double allAmount;
|
||||
/**
|
||||
* 商品实付金额
|
||||
*/
|
||||
private Double payAmount;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -85,25 +85,25 @@ public interface HandoverRecordMapper {
|
||||
int deleteById(Integer id);
|
||||
|
||||
// 油品交易信息
|
||||
Map<String, Object> oilOrderStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId);
|
||||
Map<String, Object> oilOrderStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId, @Param("staffId") Integer staffId);
|
||||
// 会员储值交易信息
|
||||
Map<String, Object> cardOrderStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId);
|
||||
Map<String, Object> cardOrderStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId, @Param("staffId") Integer staffId);
|
||||
// 油卡交易信息
|
||||
Map<String, Object> fuelOrderStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId);
|
||||
Map<String, Object> fuelOrderStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId, @Param("staffId") Integer staffId);
|
||||
// 普通交易
|
||||
Map<String, Object> goodsOrderStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId);
|
||||
Map<String, Object> goodsOrderStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId, @Param("staffId") Integer staffId);
|
||||
|
||||
List<Map<String, Object>> paymentAggregation(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId);
|
||||
List<Map<String, Object>> paymentAggregation(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId, @Param("staffId") Integer staffId);
|
||||
|
||||
List<Map<String, Object>> oilNumberStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId);
|
||||
List<Map<String, Object>> oilNumberStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId, @Param("staffId") Integer staffId);
|
||||
|
||||
List<Map<String, Object>> greaseGunStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId);
|
||||
List<Map<String, Object>> greaseGunStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId, @Param("staffId") Integer staffId);
|
||||
|
||||
List<Map<String, Object>> employeeStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId);
|
||||
List<Map<String, Object>> employeeStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId, @Param("staffId") Integer staffId);
|
||||
|
||||
List<Map<String, Object>> billingDetails(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId);
|
||||
List<Map<String, Object>> billingDetails(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId,@Param("staffId") Integer staffId);
|
||||
|
||||
List<Map<String, Object>> returnedToTheAccount(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId);
|
||||
List<Map<String, Object>> returnedToTheAccount(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Integer storeId,@Param("staffId") Integer staffId);
|
||||
|
||||
}
|
||||
|
||||
|
@ -36,5 +36,5 @@ public interface LJOrderMapper extends BaseMapper<LJOrder> {
|
||||
Map<String, String> orderStatistics(@Param("order") LJOrder order);
|
||||
|
||||
|
||||
LJOrder getStatisticsByTime(@Param("time") Date time,@Param("goodsId") Integer goodsId);
|
||||
LJOrder getStatisticsByTime(@Param("time") Date time,@Param("goodsId") Integer goodsId,@Param("payType") String payType);
|
||||
}
|
||||
|
@ -99,6 +99,48 @@
|
||||
</if>
|
||||
</where>
|
||||
) AS numberOfStrokes, -- 笔数
|
||||
(SELECT count(*) FROM cashier_order
|
||||
<where>
|
||||
store_id = #{order.storeId}
|
||||
and oil_order_id is not null
|
||||
<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>
|
||||
</where>
|
||||
) AS numberOfStrokesByOil, -- 笔数
|
||||
(SELECT count(*) FROM cashier_order
|
||||
<where>
|
||||
store_id = #{order.storeId}
|
||||
and goods_order_id is not null
|
||||
<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>
|
||||
</where>
|
||||
) AS numberOfStrokesByGoods, -- 笔数
|
||||
(SELECT sum(amount) FROM cashier_order
|
||||
<where>
|
||||
store_id = #{order.storeId}
|
||||
|
@ -37,6 +37,9 @@
|
||||
hr.store_id = #{handoverRecord.storeId}
|
||||
<if test="handoverRecord.status != null and handoverRecord.status != ''">
|
||||
and hr.status = #{handoverRecord.status}
|
||||
</if>
|
||||
<if test="handoverRecord.staffId != null">
|
||||
and hr.staff_id = #{handoverRecord.staffId}
|
||||
</if>
|
||||
<if test="handoverRecord.type != null and handoverRecord.type != ''">
|
||||
and hr.type = #{handoverRecord.type}
|
||||
@ -208,7 +211,7 @@ limit 1
|
||||
<select id="oilOrderStatistics" resultType="java.util.Map">
|
||||
select
|
||||
sum(order_amount) oilOrder,-- 油品订单
|
||||
sum(if(order_status='refund',discount_amount,0.00)) oilRefund, -- 退款
|
||||
sum(if(order_status='refund',pay_amount,0.00)) oilRefund, -- 退款
|
||||
sum(if(order_status='paid',pay_amount,0.00)) oilPaid,
|
||||
sum(if(order_status='paid',discount_amount,0.00)) oilDiacount
|
||||
from oil_order
|
||||
@ -225,7 +228,10 @@ limit 1
|
||||
sum(if(pay_status='paid',gift_balance,0)) cardGiftPaid
|
||||
from card_value_record
|
||||
where store_id = #{storeId}
|
||||
and create_time BETWEEN #{startTime} AND #{endTime};
|
||||
and create_time BETWEEN #{startTime} AND #{endTime}
|
||||
<if test="staffId != null">
|
||||
and mt_staff_id = #{staffId}
|
||||
</if>;
|
||||
</select>
|
||||
<select id="fuelOrderStatistics" resultType="java.util.Map">
|
||||
select
|
||||
@ -234,7 +240,10 @@ limit 1
|
||||
sum(if(pay_status='paid',recharge_balance,0)) fuelPaid
|
||||
from card_fuel_record
|
||||
where store_id = #{storeId}
|
||||
and create_time BETWEEN #{startTime} AND #{endTime};
|
||||
and create_time BETWEEN #{startTime} AND #{endTime}
|
||||
<if test="staffId != null">
|
||||
and mt_staff_id = #{staffId}
|
||||
</if>;
|
||||
</select>
|
||||
|
||||
<select id="goodsOrderStatistics" resultType="java.util.Map">
|
||||
@ -244,7 +253,10 @@ limit 1
|
||||
SUM(IF(`status`='paid', pay_amount, 0)) AS goodsPaid
|
||||
FROM mt_order
|
||||
where store_id = #{storeId}
|
||||
and create_time BETWEEN #{startTime} AND #{endTime};
|
||||
and create_time BETWEEN #{startTime} AND #{endTime}
|
||||
<if test="staffId != null">
|
||||
and staff_id = #{staffId}
|
||||
</if>;
|
||||
</select>
|
||||
<select id="paymentAggregation" resultType="java.util.Map">
|
||||
SELECT
|
||||
@ -255,6 +267,9 @@ limit 1
|
||||
FROM oil_order
|
||||
where store_id = #{storeId}
|
||||
and create_time BETWEEN #{startTime} AND #{endTime}
|
||||
<if test="staffId != null">
|
||||
and staff_id = #{staffId}
|
||||
</if>
|
||||
GROUP BY pay_type
|
||||
|
||||
UNION ALL
|
||||
@ -267,6 +282,9 @@ limit 1
|
||||
FROM card_value_record
|
||||
where store_id = #{storeId}
|
||||
and create_time BETWEEN #{startTime} AND #{endTime}
|
||||
<if test="staffId != null">
|
||||
and mt_staff_id = #{staffId}
|
||||
</if>
|
||||
GROUP BY payment_type
|
||||
|
||||
UNION ALL
|
||||
@ -279,6 +297,9 @@ limit 1
|
||||
FROM card_fuel_record
|
||||
where store_id = #{storeId}
|
||||
and create_time BETWEEN #{startTime} AND #{endTime}
|
||||
<if test="staffId != null">
|
||||
and mt_staff_id = #{staffId}
|
||||
</if>
|
||||
GROUP BY payment_type
|
||||
|
||||
UNION ALL
|
||||
@ -291,6 +312,9 @@ limit 1
|
||||
FROM mt_order
|
||||
where store_id = #{storeId}
|
||||
and create_time BETWEEN #{startTime} AND #{endTime}
|
||||
<if test="staffId != null">
|
||||
and staff_id = #{staffId}
|
||||
</if>
|
||||
GROUP BY pay_type
|
||||
|
||||
UNION ALL
|
||||
@ -303,6 +327,9 @@ limit 1
|
||||
FROM integral_orders
|
||||
where store_id = #{storeId}
|
||||
and create_time BETWEEN #{startTime} AND #{endTime}
|
||||
<if test="staffId != null">
|
||||
and staff_id = #{staffId}
|
||||
</if>
|
||||
GROUP BY payment_type
|
||||
having payment_type is not null
|
||||
</select>
|
||||
@ -323,6 +350,9 @@ limit 1
|
||||
where on1.store_id = #{storeId}
|
||||
and oo.store_id = 60
|
||||
and oo.create_time BETWEEN #{startTime} AND #{endTime}
|
||||
<if test="staffId != null">
|
||||
and staff_id = #{staffId}
|
||||
</if>
|
||||
GROUP BY oo.oils
|
||||
</select>
|
||||
|
||||
@ -338,7 +368,9 @@ limit 1
|
||||
left join oil_gun og on oo.oil_gun_num = og.id
|
||||
where oo.store_id = #{storeId}
|
||||
and oo.create_time BETWEEN #{startTime} AND #{endTime}
|
||||
|
||||
<if test="staffId != null">
|
||||
and staff_id = #{staffId}
|
||||
</if>
|
||||
GROUP BY oo.oil_gun_num
|
||||
</select>
|
||||
|
||||
|
@ -202,6 +202,9 @@
|
||||
left join mt_order_goods mog ON mo.id = mog.goods_id
|
||||
where
|
||||
mog.goods_id = #{goodsId}
|
||||
<if test="payType != null"><!-- 开始时间检索 -->
|
||||
and mo.pay_type = #{payType}
|
||||
</if>
|
||||
<if test="time != null"><!-- 开始时间检索 -->
|
||||
and mo.create_time >= #{time}
|
||||
</if>
|
||||
|
@ -549,6 +549,10 @@
|
||||
od.order_no = #{orderNo}
|
||||
</where>
|
||||
</select>
|
||||
<!-- <if test="time != null"><!– 开始时间检索 –>-->
|
||||
<!-- and update_time <= #{time}-->
|
||||
<!-- </if>-->
|
||||
|
||||
<select id="getInfoByTime" resultType="com.fuint.business.order.vo.OilOrderVo">
|
||||
select
|
||||
SUM(oil_num) oilNum,
|
||||
@ -556,12 +560,12 @@
|
||||
from oil_order
|
||||
<where>
|
||||
<if test="time != null"><!-- 开始时间检索 -->
|
||||
and update_time >= #{time}
|
||||
and create_time >= #{time}
|
||||
</if>
|
||||
<if test="list != null and list.size() > 0"><!-- 修改此处 -->
|
||||
and tank_id in
|
||||
and oil_gun_num in
|
||||
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
||||
#{item.tankId} <!-- 修改此处 -->
|
||||
#{item.id} <!-- 修改此处 -->
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
|
@ -2,7 +2,8 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fuint.business.order.mapper.OrderGoodsMapper">
|
||||
<sql id="selectOrderGoods">
|
||||
select mog.id,mog.order_id,mog.goods_id as goods_id,mg.id as goodsId,mg.name,mg.retail_price,mg.member_price,mog.num,mg.unit
|
||||
select mog.id,mog.order_id,mog.goods_id as goods_id,mg.id as goodsId,mg.name,mog.retail_price,
|
||||
mog.member_price,mog.num,mg.unit,mog.all_amount,mog.pay_amount
|
||||
from mt_order_goods mog inner join mt_goods mg on mog.goods_id = mg.id
|
||||
</sql>
|
||||
|
||||
|
@ -33,7 +33,7 @@ public interface HandoverRecordService {
|
||||
*/
|
||||
IPage<HandoverRecord> queryByPage(@Param("page") Page page, @Param("handoverRecord") HandoverRecord handoverRecord);
|
||||
|
||||
HandoverRecord selectByTime();
|
||||
HandoverRecord selectByTime(Integer staffId);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
@ -59,7 +59,7 @@ public interface HandoverRecordService {
|
||||
*/
|
||||
boolean deleteById(Integer id);
|
||||
|
||||
public Map<String, Object> handover();
|
||||
public Map<String, Object> handover(Integer staffId);
|
||||
|
||||
public Map<String, Object> handoverByAllOrder();
|
||||
|
||||
|
@ -60,7 +60,7 @@ public interface LJOrderService extends IService<LJOrder> {
|
||||
|
||||
Map<String, String> orderStatistics(LJOrder order);
|
||||
|
||||
LJOrder getStatisticsByTime(Date time ,Integer goodsId);
|
||||
LJOrder getStatisticsByTime(Date time ,Integer goodsId, String payType);
|
||||
|
||||
/**
|
||||
* 添加商品订单信息
|
||||
|
@ -43,6 +43,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
@ -178,7 +179,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
BigDecimal refundAmtBig = new BigDecimal(map.get("refundAmt"));
|
||||
BigDecimal refundAmtBefBig = refundAmtBig.multiply(new BigDecimal("100"));
|
||||
map.put("totalAmt",money.toString());
|
||||
map.put("refundAmt",refundAmtBefBig.toString());
|
||||
map.put("refundAmt",refundAmtBefBig.setScale(0, RoundingMode.DOWN).toString());
|
||||
|
||||
map.put("orderNo",allOrderInfo.getOrderNo());
|
||||
map.put("payType",allOrderInfo.getPayType());
|
||||
@ -193,7 +194,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
throw new RuntimeException("该订单类型不支持退款!");
|
||||
}
|
||||
boolean flag = false;
|
||||
if (!"CASH".equals(allOrderInfo.getPayType()) && Integer.valueOf(map.get("refundAmt")) > 0) {
|
||||
if (!"CASH".equals(allOrderInfo.getPayType()) && Double.valueOf(map.get("refundAmt")) > 0) {
|
||||
try {
|
||||
refund = fyPayService.refund(map);
|
||||
} catch (Exception e) {
|
||||
|
@ -3,6 +3,7 @@ package com.fuint.business.order.service.impl;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.generator.config.IFileCreate;
|
||||
import com.fuint.business.member.entity.LJStaff;
|
||||
import com.fuint.business.member.service.ILJStaffService;
|
||||
import com.fuint.business.order.entity.HandoverRecord;
|
||||
@ -19,6 +20,7 @@ import com.fuint.system.dict.entity.SysDictData;
|
||||
import com.fuint.system.dict.entity.SysDictType;
|
||||
import com.fuint.system.dict.service.ISysDictDataService;
|
||||
import com.fuint.system.dict.service.ISysDictTypeService;
|
||||
import io.swagger.models.auth.In;
|
||||
import javafx.print.Printer;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -83,10 +85,11 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public HandoverRecord selectByTime() {
|
||||
public HandoverRecord selectByTime(Integer staffId) {
|
||||
HandoverRecord handoverRecord = new HandoverRecord();
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
handoverRecord.setStoreId(nowAccountInfo.getStoreId());
|
||||
handoverRecord.setStaffId(staffId);
|
||||
return handoverRecordMapper.selectByTime(handoverRecord);
|
||||
}
|
||||
|
||||
@ -100,7 +103,7 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
|
||||
public HandoverRecord insert(HandoverRecord handoverRecord) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
handoverRecord.setStoreId(nowAccountInfo.getStoreId());
|
||||
handoverRecord.setStaffId(nowAccountInfo.getStaffId());
|
||||
if (ObjectUtil.isEmpty(handoverRecord.getStaffId())) handoverRecord.setStaffId(nowAccountInfo.getStaffId());
|
||||
|
||||
this.handoverRecordMapper.insert(handoverRecord);
|
||||
return handoverRecord;
|
||||
@ -130,7 +133,7 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> handover() {
|
||||
public Map<String, Object> handover(Integer staffId) {
|
||||
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
MtStore mtStore = new MtStore();
|
||||
@ -148,15 +151,20 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
|
||||
Map<String, Object> handoverMap = new HashMap<>();
|
||||
|
||||
String startTime = "2023-01-01 12:12:12";
|
||||
HandoverRecord handoverRecord = selectByTime();
|
||||
|
||||
HandoverRecord handoverRecord = selectByTime(staffId);
|
||||
if (!ObjectUtil.isEmpty(handoverRecord) && !ObjectUtil.isEmpty(handoverRecord.getEndTime())) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
startTime = sdf.format(handoverRecord.getEndTime());
|
||||
}
|
||||
|
||||
LJStaff ljStaff = iljStaffService.selectStaffById(nowAccountInfo.getStaffId());
|
||||
String handoverType = "统一交班";
|
||||
Integer staff = nowAccountInfo.getStaffId();
|
||||
if (ObjectUtil.isNotEmpty(staffId)){
|
||||
staff = staffId;
|
||||
handoverType = "个人交班";
|
||||
}
|
||||
LJStaff ljStaff = iljStaffService.selectStaffById(staff);
|
||||
// String handover = iSysDictDataService.selectDictLabel("handover", ljStaff.getHandoverMode());
|
||||
String handoverType = "暂无";
|
||||
|
||||
// if (!ObjectUtil.isEmpty(handover)) {
|
||||
// handoverType = handover;
|
||||
@ -164,7 +172,7 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
|
||||
// 填充 baseInfo
|
||||
Map<String, Object> baseInfo = new HashMap<>();
|
||||
baseInfo.put("storeName", mtStore.getName());
|
||||
baseInfo.put("realName", nowAccountInfo.getRealName());
|
||||
baseInfo.put("realName", ljStaff.getRealName());
|
||||
baseInfo.put("handoverType", handoverType);
|
||||
baseInfo.put("startTime", startTime);
|
||||
baseInfo.put("endTime", formattedEndTime);
|
||||
@ -172,41 +180,41 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
|
||||
// baseInfo.put("handoverOut", ljStaff.getHandoverOut()); // 交班是否退出
|
||||
handoverMap.put("baseInfo",baseInfo);
|
||||
// 获取订单汇总
|
||||
Map<String, Object> orderSummaryMap = orderSummary(startTime, formattedEndTime);
|
||||
Map<String, Object> orderSummaryMap = orderSummary(startTime, formattedEndTime, staffId);
|
||||
handoverMap.put("orderSummary",orderSummaryMap);
|
||||
// 支付方式汇总
|
||||
List<Map<String, Object>> paymentAggregationMap = paymentAggregation(startTime, formattedEndTime);
|
||||
List<Map<String, Object>> paymentAggregationMap = paymentAggregation(startTime, formattedEndTime, staffId);
|
||||
handoverMap.put("paymentAggregation",paymentAggregationMap);
|
||||
// 油号统计
|
||||
List<Map<String, Object>> oilNumberStatisticsMap = oilNumberStatistics(startTime, formattedEndTime);
|
||||
List<Map<String, Object>> oilNumberStatisticsMap = oilNumberStatistics(startTime, formattedEndTime, staffId);
|
||||
handoverMap.put("oilNumberStatistics",oilNumberStatisticsMap);
|
||||
// 油枪统计
|
||||
List<Map<String, Object>> greaseGunStatisticsMap = greaseGunStatistics(startTime, formattedEndTime);
|
||||
List<Map<String, Object>> greaseGunStatisticsMap = greaseGunStatistics(startTime, formattedEndTime, staffId);
|
||||
handoverMap.put("greaseGunStatistics",greaseGunStatisticsMap);
|
||||
// 员工统计
|
||||
List<Map<String, Object>> employeeStatisticsMap = employeeStatistics(startTime, formattedEndTime);
|
||||
List<Map<String, Object>> employeeStatisticsMap = employeeStatistics(startTime, formattedEndTime, staffId);
|
||||
handoverMap.put("employeeStatistics",employeeStatisticsMap);
|
||||
// 挂账详情
|
||||
List<Map<String, Object>> billingDetailsMap = billingDetails(startTime, formattedEndTime);
|
||||
List<Map<String, Object>> billingDetailsMap = billingDetails(startTime, formattedEndTime, staffId);
|
||||
handoverMap.put("billingDetails",billingDetailsMap);
|
||||
// 挂账归还
|
||||
List<Map<String, Object>> returnedToTheAccountMap = returnedToTheAccount(startTime, formattedEndTime);
|
||||
List<Map<String, Object>> returnedToTheAccountMap = returnedToTheAccount(startTime, formattedEndTime, staffId) ;
|
||||
handoverMap.put("returnedToTheAccount",returnedToTheAccountMap);
|
||||
// 合计
|
||||
return handoverMap;
|
||||
}
|
||||
|
||||
|
||||
public Map<String, Object> orderSummary(String startTime, String endTime) {
|
||||
public Map<String, Object> orderSummary(String startTime, String endTime, Integer staffId) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
Map<String, Object> allStatistics = new HashMap<>();
|
||||
// 油品订单(订单) 油品订单(退款) 油品订单(实收) 油品优惠(实收) 油品交易(实收)
|
||||
Map<String, Object> oilOrderStatistics = handoverRecordMapper.oilOrderStatistics(startTime, endTime, nowAccountInfo.getStoreId());
|
||||
Map<String, Object> oilOrderStatistics = handoverRecordMapper.oilOrderStatistics(startTime, endTime, nowAccountInfo.getStoreId(), staffId);
|
||||
// 会员储值(订单) 会员储值(退款) 会员储值(实收) 储值赠送(订单) 储值赠送(退款) 储值赠送(实际)
|
||||
Map<String, Object> cardOrderStatistics = handoverRecordMapper.cardOrderStatistics(startTime, endTime, nowAccountInfo.getStoreId());
|
||||
Map<String, Object> fuelOrderStatistics = handoverRecordMapper.fuelOrderStatistics(startTime, endTime, nowAccountInfo.getStoreId());
|
||||
Map<String, Object> cardOrderStatistics = handoverRecordMapper.cardOrderStatistics(startTime, endTime, nowAccountInfo.getStoreId(), staffId);
|
||||
Map<String, Object> fuelOrderStatistics = handoverRecordMapper.fuelOrderStatistics(startTime, endTime, nowAccountInfo.getStoreId(), staffId);
|
||||
// 普通收款(订单) 普通收款(退款) 普通收款(实收)
|
||||
Map<String, Object> goodsOrderStatistics = handoverRecordMapper.goodsOrderStatistics(startTime, endTime, nowAccountInfo.getStoreId());
|
||||
Map<String, Object> goodsOrderStatistics = handoverRecordMapper.goodsOrderStatistics(startTime, endTime, nowAccountInfo.getStoreId(), staffId);
|
||||
if (!ObjectUtil.isEmpty(oilOrderStatistics)) {
|
||||
allStatistics.putAll(oilOrderStatistics);
|
||||
}else{
|
||||
@ -249,9 +257,9 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
|
||||
* 汇总统计
|
||||
*/
|
||||
|
||||
public List<Map<String, Object>> paymentAggregation(String startTime, String endTime) {
|
||||
public List<Map<String, Object>> paymentAggregation(String startTime, String endTime, Integer staffId) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
List<Map<String, Object>> paymentAggregation = handoverRecordMapper.paymentAggregation(startTime, endTime, nowAccountInfo.getStoreId());
|
||||
List<Map<String, Object>> paymentAggregation = handoverRecordMapper.paymentAggregation(startTime, endTime, nowAccountInfo.getStoreId(),staffId);
|
||||
List<Map<String, Object>> allRefundMapList = new ArrayList<>();
|
||||
if (!ObjectUtil.isEmpty(paymentAggregation)) {
|
||||
for (Map<String, Object> stringStringMap : paymentAggregation) {
|
||||
@ -298,9 +306,9 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
|
||||
return mapList;
|
||||
}
|
||||
|
||||
public Map<String, Object> paymentAggregation2(String startTime, String endTime) {
|
||||
public Map<String, Object> paymentAggregation2(String startTime, String endTime,Integer staffId) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
List<Map<String, Object>> paymentAggregation = handoverRecordMapper.paymentAggregation(startTime, endTime, nowAccountInfo.getStoreId());
|
||||
List<Map<String, Object>> paymentAggregation = handoverRecordMapper.paymentAggregation(startTime, endTime, nowAccountInfo.getStoreId() , staffId);
|
||||
// 共有四个 转为普通map
|
||||
Map<String, Object> allAggreMap = new HashMap<>();
|
||||
Map<String, Object> allRefundMap = new HashMap<>();
|
||||
@ -358,40 +366,40 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
|
||||
/**
|
||||
* 油号统计
|
||||
*/
|
||||
public List<Map<String, Object>> oilNumberStatistics (String startTime, String endTime) {
|
||||
public List<Map<String, Object>> oilNumberStatistics (String startTime, String endTime, Integer staffId) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
List<Map<String, Object>> oilNumberStatistics = handoverRecordMapper.oilNumberStatistics(startTime, endTime, nowAccountInfo.getStoreId());
|
||||
List<Map<String, Object>> oilNumberStatistics = handoverRecordMapper.oilNumberStatistics(startTime, endTime, nowAccountInfo.getStoreId(), staffId);
|
||||
return oilNumberStatistics;
|
||||
}
|
||||
|
||||
/**
|
||||
* 油枪统计
|
||||
*/
|
||||
public List<Map<String, Object>> greaseGunStatistics (String startTime, String endTime) {
|
||||
public List<Map<String, Object>> greaseGunStatistics (String startTime, String endTime, Integer staffId) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
List<Map<String, Object>> greaseGunStatistics = handoverRecordMapper.greaseGunStatistics(startTime, endTime, nowAccountInfo.getStoreId());
|
||||
List<Map<String, Object>> greaseGunStatistics = handoverRecordMapper.greaseGunStatistics(startTime, endTime, nowAccountInfo.getStoreId(), staffId);
|
||||
return greaseGunStatistics;
|
||||
}
|
||||
|
||||
/**
|
||||
* 员工统计
|
||||
*/
|
||||
public List<Map<String, Object>> employeeStatistics (String startTime, String endTime) {
|
||||
public List<Map<String, Object>> employeeStatistics (String startTime, String endTime, Integer staffId) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
List<Map<String, Object>> employeeStatistics = handoverRecordMapper.employeeStatistics(startTime, endTime, nowAccountInfo.getStoreId());
|
||||
List<Map<String, Object>> employeeStatistics = handoverRecordMapper.employeeStatistics(startTime, endTime, nowAccountInfo.getStoreId(), staffId);
|
||||
return employeeStatistics;
|
||||
}
|
||||
|
||||
// 挂账详情
|
||||
public List<Map<String, Object>> billingDetails (String startTime, String endTime) {
|
||||
public List<Map<String, Object>> billingDetails (String startTime, String endTime, Integer staffId) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
List<Map<String, Object>> billingDetails = handoverRecordMapper.billingDetails(startTime, endTime, nowAccountInfo.getStoreId());
|
||||
List<Map<String, Object>> billingDetails = handoverRecordMapper.billingDetails(startTime, endTime, nowAccountInfo.getStoreId(), staffId);
|
||||
return billingDetails;
|
||||
}
|
||||
// 挂账归还
|
||||
public List<Map<String, Object>> returnedToTheAccount (String startTime, String endTime) {
|
||||
public List<Map<String, Object>> returnedToTheAccount (String startTime, String endTime, Integer staffId) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
List<Map<String, Object>> returnedToTheAccount = handoverRecordMapper.returnedToTheAccount(startTime, endTime, nowAccountInfo.getStoreId());
|
||||
List<Map<String, Object>> returnedToTheAccount = handoverRecordMapper.returnedToTheAccount(startTime, endTime, nowAccountInfo.getStoreId(), staffId);
|
||||
return returnedToTheAccount;
|
||||
}
|
||||
|
||||
@ -431,7 +439,7 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
|
||||
Map<String, Object> handoverMap = new HashMap<>();
|
||||
|
||||
String startTime = "2023-01-01 12:12:12";
|
||||
HandoverRecord handoverRecord = selectByTime();
|
||||
HandoverRecord handoverRecord = selectByTime(null);
|
||||
if (!ObjectUtil.isEmpty(handoverRecord) && !ObjectUtil.isEmpty(handoverRecord.getEndTime())) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
startTime = sdf.format(handoverRecord.getEndTime());
|
||||
|
@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.convenienceSore.entity.LJGoods;
|
||||
import com.fuint.business.convenienceSore.service.LJGoodsService;
|
||||
import com.fuint.business.order.entity.LJOrder;
|
||||
import com.fuint.business.order.entity.OrderGoods;
|
||||
import com.fuint.business.order.mapper.LJOrderMapper;
|
||||
@ -118,10 +120,13 @@ public class LJOrderServiceImpl extends ServiceImpl<LJOrderMapper, LJOrder> impl
|
||||
|
||||
|
||||
@Override
|
||||
public LJOrder getStatisticsByTime(Date time, Integer goodsId) {
|
||||
return baseMapper.getStatisticsByTime(time, goodsId);
|
||||
public LJOrder getStatisticsByTime(Date time, Integer goodsId, String payType) {
|
||||
return baseMapper.getStatisticsByTime(time, goodsId, payType);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private LJGoodsService goodsService;
|
||||
|
||||
@Override
|
||||
public void addGoodOrder(LJOrder order,Integer goodsId) {
|
||||
if (ObjectUtil.isEmpty(order.getOrderNo())){
|
||||
@ -134,10 +139,15 @@ public class LJOrderServiceImpl extends ServiceImpl<LJOrderMapper, LJOrder> impl
|
||||
}
|
||||
baseMapper.insert(order);
|
||||
LJOrder ljOrder = this.selectGoodsOrder(order.getOrderNo());
|
||||
LJGoods ljGoods = goodsService.selectLJGoodsById(goodsId);
|
||||
OrderGoods orderGoods = new OrderGoods();
|
||||
orderGoods.setGoodsId(goodsId);
|
||||
orderGoods.setOrderId(ljOrder.getId());
|
||||
orderGoods.setNum(ljOrder.getGoodsNum());
|
||||
orderGoods.setRetailPrice(ljGoods.getRetailPrice());
|
||||
orderGoods.setMemberPrice(ljGoods.getMemberPrice());
|
||||
orderGoods.setAllAmount(order.getAmount());
|
||||
orderGoods.setPayAmount(order.getPayAmount());
|
||||
orderGoodsService.save(orderGoods);
|
||||
}
|
||||
}
|
||||
|
@ -521,6 +521,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
// throw new RuntimeException("支付失败");
|
||||
}
|
||||
}else {
|
||||
cashierOrder.setPayAmount(oilAmount+goodsAmount-oilDiscount-goodsDiscount);
|
||||
this.insertAllOrderInfo(orderNo,storeId,oilAmount+goodsAmount,Double.valueOf(map.get("allAmount")),payType,userId,"PC","6","paid");
|
||||
}
|
||||
|
||||
|
@ -40,6 +40,15 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
|
||||
|
||||
@Override
|
||||
public int insertOrderGoods(OrderGoods goods,Integer storeId,Boolean isMember) {
|
||||
LJGoods ljGoods = goodsService.selectLJGoodsById(goods.getGoodsId());
|
||||
goods.setRetailPrice(ljGoods.getRetailPrice());
|
||||
goods.setMemberPrice(ljGoods.getMemberPrice());
|
||||
goods.setAllAmount(ljGoods.getRetailPrice()*goods.getNum());
|
||||
if (isMember){
|
||||
goods.setPayAmount(ljGoods.getMemberPrice()*goods.getNum());
|
||||
}else {
|
||||
goods.setPayAmount(ljGoods.getRetailPrice()*goods.getNum());
|
||||
}
|
||||
int row = baseMapper.insert(goods);
|
||||
this.insertStockTrack(goods,storeId,isMember);
|
||||
return row;
|
||||
|
@ -9,8 +9,10 @@ public class OrderGoodsVo {
|
||||
private Integer goods_id;
|
||||
private Integer goodsId;
|
||||
private String name;
|
||||
private String retailPrice;
|
||||
private String memberPrice;
|
||||
private Double retailPrice;
|
||||
private Double memberPrice;
|
||||
private Double allAmount;
|
||||
private Double payAmount;
|
||||
private Integer num;
|
||||
private String unit;
|
||||
}
|
||||
|
@ -76,14 +76,14 @@ public class UserBalanceServiceImpl extends ServiceImpl<UserBalanceMapper, UserB
|
||||
UserBalance userBalance = selectUserBalance(userId, chainStoreId);
|
||||
if(ObjectUtil.isNotEmpty(userBalance)&& ObjectUtil.isNotEmpty(userBalance.getRefuelMoney())) {
|
||||
|
||||
List<Map<String, String>> resultMapList = JSON.parseObject(userBalance.getRefuelMoney(), new TypeReference<List<Map<String, Object>>>() {});
|
||||
List<Map<String, Object>> resultMapList = JSON.parseObject(userBalance.getRefuelMoney(), new TypeReference<List<Map<String, Object>>>() {});
|
||||
|
||||
if (ObjectUtil.isNotEmpty(resultMapList)) {
|
||||
for (Map<String, String> stringStringMap : resultMapList) {
|
||||
if (oilId.equals(stringStringMap.get("oilType"))) {
|
||||
BigDecimal resRefuelMoney = new BigDecimal(stringStringMap.get("refuelMoney"));
|
||||
for (Map<String, Object> stringStringMap : resultMapList) {
|
||||
if (oilId.equals(String.valueOf(stringStringMap.get("oilType")))) {
|
||||
BigDecimal resRefuelMoney = new BigDecimal(String.valueOf(stringStringMap.get("refuelMoney")));
|
||||
BigDecimal refuelMoney = resRefuelMoney.add(new BigDecimal(changeOil.toString()));
|
||||
stringStringMap.put("refuelMoney",resRefuelMoney.toString());
|
||||
stringStringMap.put("refuelMoney",refuelMoney.toString());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -455,8 +455,10 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper,SysDept> imple
|
||||
public long getCountdown() {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
SysDept sysDept = baseMapper.selectDeptById(nowAccountInfo.getDeptId());
|
||||
if (ObjectUtil.isNotEmpty(sysDept) && ObjectUtil.isNotEmpty(sysDept.getTurnoverEndTime())) {
|
||||
LocalDate endLocalDate = sysDept.getTurnoverEndTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
||||
SysDept sysDept1 = baseMapper.selectDeptById(sysDept.getParentId()); // 判断连锁店是否到期
|
||||
// if ()
|
||||
if (ObjectUtil.isNotEmpty(sysDept1) && ObjectUtil.isNotEmpty(sysDept1.getTurnoverEndTime())) {
|
||||
LocalDate endLocalDate = sysDept1.getTurnoverEndTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
||||
LocalDate startLocalDate = LocalDate.now();
|
||||
|
||||
// 计算两个日期之间的天数差
|
||||
|
@ -1,10 +1,10 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function getHandoverApi() {
|
||||
export function getHandoverApi(query) {
|
||||
return request({
|
||||
url: '/business/handoverRecord/handover',
|
||||
method: 'get',
|
||||
// params: query
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -79,11 +79,11 @@
|
||||
<div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardOrder : '0' }}</div>
|
||||
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>会员储值(退款)</div>
|
||||
<div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardRefund : '0' }}</div>
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>会员储值(退款)</div>-->
|
||||
<!-- <div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardRefund : '0' }}</div>-->
|
||||
|
||||
</div>
|
||||
<!-- </div>-->
|
||||
<div class="input-box">
|
||||
<div>会员储值(实收)</div>
|
||||
<div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardPaid : '0' }}</div>
|
||||
@ -94,11 +94,11 @@
|
||||
<div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardGiftOrder : '0' }}</div>
|
||||
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>储值赠送(退款)</div>
|
||||
<div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardGiftRefund : '0' }}</div>
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>储值赠送(退款)</div>-->
|
||||
<!-- <div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardGiftRefund : '0' }}</div>-->
|
||||
|
||||
</div>
|
||||
<!-- </div>-->
|
||||
<div class="input-box">
|
||||
<div>储值赠送(实际)</div>
|
||||
<div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardGiftPaid : '0' }}</div>
|
||||
@ -111,11 +111,11 @@
|
||||
<div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.fuelOrder : '0' }}</div>
|
||||
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>存油储值(退款)</div>
|
||||
<div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.fuelRefund : '0' }}</div>
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>存油储值(退款)</div>-->
|
||||
<!-- <div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.fuelRefund : '0' }}</div>-->
|
||||
|
||||
</div>
|
||||
<!-- </div>-->
|
||||
<div class="input-box">
|
||||
<div>存油储值(实收)</div>
|
||||
<div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.fuelPaid : '0' }}</div>
|
||||
@ -377,12 +377,24 @@
|
||||
<div class="bottom-xz">
|
||||
<!-- <div class="anniu" v-if="handoverList && handoverList.baseInfo && handoverList.baseInfo.handoverPrem == 'yqx'" @click="shift">交班</div>-->
|
||||
<div class="anniu" @click="shift">交班</div>
|
||||
<div class="anniu">
|
||||
<span @click="chooseStaff()">
|
||||
{{staff.staffName?staff.staffName:"选择员工交班"}}
|
||||
</span>
|
||||
<i v-if="staff.staffName" class="el-icon-close" @click="clean()"></i>
|
||||
</div>
|
||||
<!-- <div class="anniu-lv">云打印</div> -->
|
||||
<div class="anniu-lv" @click="printLocally()">本地打印</div>
|
||||
<div ><el-link type="primary" @click="recording">交班记录</el-link></div>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
<el-dialog :close-on-click-modal="false" width="50%" height="50%" title="选择员工" :visible.sync="openStaff"
|
||||
append-to-body>
|
||||
<select-staff @send-data="handleDataFromChild">
|
||||
|
||||
</select-staff>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -392,23 +404,52 @@ import BigNumber from "bignumber.js";
|
||||
import {removeUserId} from "@/utils/auth";
|
||||
import { getLodop } from "@/api/LodopFuncs";
|
||||
import Vue from 'vue';
|
||||
import SelectStaff from "@/components/local/selectStaff.vue";
|
||||
|
||||
export default {
|
||||
name: "Handover",
|
||||
components: {SelectStaff},
|
||||
data() {
|
||||
return {
|
||||
handoverList : {},
|
||||
|
||||
openStaff: false,
|
||||
staff:{
|
||||
staffId:'',
|
||||
staffName:null
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getHandover();
|
||||
},
|
||||
methods: {
|
||||
clean() {
|
||||
this.staff={
|
||||
staffId:'',
|
||||
staffName:null
|
||||
}
|
||||
},
|
||||
// 选择员工
|
||||
chooseStaff() {
|
||||
this.openStaff = true
|
||||
},
|
||||
handleDataFromChild(data) {
|
||||
this.openStaff = false
|
||||
|
||||
this.staff.staffId = data.mtStaffId,
|
||||
this.staff.staffName = data.realName
|
||||
console.log("realName",this.staff.staffName)
|
||||
this.getHandover();
|
||||
},
|
||||
getHandover() {
|
||||
getHandoverApi().then(res=>{
|
||||
|
||||
getHandoverApi({staffId: this.staff.staffId}).then(res=>{
|
||||
this.handoverList = res.data;
|
||||
console.log("this.handoverList",this.handoverList)
|
||||
// this.staff={
|
||||
// staffId:'',
|
||||
// staffName:null
|
||||
// }
|
||||
})
|
||||
},
|
||||
orderSummary() {
|
||||
@ -608,13 +649,15 @@ import Vue from 'vue';
|
||||
recordData:JSON.stringify(recordData),
|
||||
type:0,
|
||||
status:this.handoverList.baseInfo.handoverType,
|
||||
staffId:this.staff.staffId
|
||||
}
|
||||
addHandoverApi(handoverRecord).then(res=>{
|
||||
if (flag) {
|
||||
removeUserId();
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.href = '/';
|
||||
})
|
||||
this.clean()
|
||||
// removeUserId();
|
||||
// this.$store.dispatch('LogOut').then(() => {
|
||||
// location.href = '/';
|
||||
// })
|
||||
}
|
||||
this.getHandover();
|
||||
})
|
||||
|
@ -9,11 +9,17 @@
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px">
|
||||
<el-form-item label="交班方式" prop="status">
|
||||
<el-select v-model="queryParams.status" style="width: 150px" placeholder="交班方式" clearable>
|
||||
<el-option label="统一交班" value="统一交班">统一交班</el-option>
|
||||
<el-option label="个人交班" value="个人交班">个人交班</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="交班员工" prop="staffId">
|
||||
<el-select v-model="queryParams.staffId" style="width: 150px" placeholder="交班方式" clearable>
|
||||
<el-option
|
||||
v-for="option in shiftHandoverList"
|
||||
:key="option.dictCode"
|
||||
:label="option.dictLabel"
|
||||
:value="option.dictLabel"
|
||||
v-for="option in staffList"
|
||||
:key="option.id"
|
||||
:label="option.realName"
|
||||
:value="option.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -100,6 +106,7 @@ import {getStatisticsApi } from "@/api/cashier/integralOrder/order";
|
||||
import Detail from '@/views/cashier/NewComponents/integralOrder/detail'
|
||||
import {getDicts} from "@/api/dict/data";
|
||||
import HandoverOnly from "@/views/cashier/NewComponents/HandoverOnly";
|
||||
import {listStaff} from "@/api/staff/staff";
|
||||
|
||||
export default {
|
||||
name: "pointsCashier",
|
||||
@ -124,11 +131,11 @@ export default {
|
||||
pageSize:null
|
||||
},
|
||||
loading: false,
|
||||
dateRange: [],
|
||||
dateRange: [new Date(),new Date()],
|
||||
defaultSort: {prop: 'createTime', order: 'descending'},
|
||||
|
||||
total: 0,
|
||||
|
||||
staffList:[],
|
||||
statisticsForm: {
|
||||
num:0,
|
||||
exchangeQuantity:0,
|
||||
@ -141,6 +148,7 @@ export default {
|
||||
this.getList();
|
||||
this.getStatistics();
|
||||
this.getStatus();
|
||||
this.getStaffList();
|
||||
},
|
||||
methods: {
|
||||
getList(){
|
||||
@ -174,6 +182,14 @@ export default {
|
||||
this.getList();
|
||||
|
||||
},
|
||||
getStaffList() {
|
||||
listStaff(this.addDateRange({ page: 1,
|
||||
pageSize: 10000})).then(response => {
|
||||
this.staffList = response.data.records;
|
||||
|
||||
}
|
||||
);
|
||||
},
|
||||
resetQuery(){
|
||||
this.queryParams = {
|
||||
giftName: '',
|
||||
@ -184,6 +200,7 @@ export default {
|
||||
pageSize:10
|
||||
},
|
||||
this.dateRange = []
|
||||
this.getList();
|
||||
},
|
||||
printLocally(data) {
|
||||
printLocallyApi(data).then(res=>{
|
||||
|
@ -58,11 +58,11 @@
|
||||
<div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.oilPaid : '0' }}</div>
|
||||
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>油品优惠(实收)</div>
|
||||
<div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.oilDiacount : '0' }}</div>
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>油品优惠(实收)</div>-->
|
||||
<!-- <div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.oilDiacount : '0' }}</div>-->
|
||||
|
||||
</div>
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>抹零总额(实收)</div>-->
|
||||
<!-- <div>¥2164.55</div>-->
|
||||
|
@ -37,7 +37,7 @@
|
||||
border-radius: 5px;text-align: center">
|
||||
<el-tooltip placement="top">
|
||||
<div slot="content">
|
||||
会员等级:{{ member.gradeId?getGrade(member.gradeId):'未知' }}
|
||||
会员等级:{{ gradeName }}
|
||||
</div>
|
||||
<i class="el-icon-medal" style="font-size: 35px"></i>
|
||||
</el-tooltip>
|
||||
@ -198,7 +198,7 @@
|
||||
<el-descriptions-item label="会员备注">{{member.remark ? member.remark : "--"}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions title="会员等级">
|
||||
<el-descriptions-item label="等级名称">{{member.gradeId ? member.gradeId : "--"}}</el-descriptions-item>
|
||||
<el-descriptions-item label="等级名称">{{member.gradeId ? getGradeName(gradeList,member.gradeId) : "--"}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions title="储值余额">
|
||||
<template slot="extra">
|
||||
@ -380,7 +380,7 @@
|
||||
|
||||
<el-divider></el-divider>
|
||||
<span slot="footer" class="dialog-footer" style="display: flex;justify-content: space-around">
|
||||
<el-button @click="dialogVisiblej = false" class="but">取 消</el-button>
|
||||
<el-button @click="dialogVisiblej = false, visflg = true" class="but">取 消</el-button>
|
||||
<el-button type="primary" class="but" @click="collection">确 定 收 款</el-button>
|
||||
</span>
|
||||
</div>
|
||||
@ -462,9 +462,10 @@ import {
|
||||
import PointsCashier from "@/views/cashier/NewComponents/integralOrder/pointsCashier";
|
||||
import {getDicts} from "@/api/dict/data";
|
||||
import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/user";
|
||||
import {getUserGrade} from "@/api/cashier/usergrade";
|
||||
import {getUserGrade, listUserGrade} from "@/api/cashier/usergrade";
|
||||
import {queryStaffs, staffInfo} from "@/api/cashier/staff";
|
||||
import {getLodop} from "@/api/LodopFuncs";
|
||||
import {connectFlag, getLodop} from "@/api/LodopFuncs";
|
||||
import {listCardFavorableRecord} from "@/api/cashier/cardfavorablerecord";
|
||||
|
||||
export default {
|
||||
name: "Integral",
|
||||
@ -499,6 +500,7 @@ import {getLodop} from "@/api/LodopFuncs";
|
||||
dialogVisiblevip:false, // 会员查询
|
||||
dialogVisibleMember: false,// 模糊查询会员
|
||||
dialogVisiblej: false,// 支付方式
|
||||
visflg: false,// 支付方式
|
||||
openShoppingCart: false,
|
||||
openOrderHistory: false,
|
||||
// 会员相关
|
||||
@ -509,7 +511,8 @@ import {getLodop} from "@/api/LodopFuncs";
|
||||
select1:'会员手机号',
|
||||
// 会员信息
|
||||
userNo:"",
|
||||
|
||||
gradeName:"",
|
||||
gradeList:"",
|
||||
// 员工相关
|
||||
staffList:[],
|
||||
staff:"",
|
||||
@ -533,6 +536,8 @@ import {getLodop} from "@/api/LodopFuncs";
|
||||
this.getPayList()
|
||||
this.getStaffList();
|
||||
this.getStaff();
|
||||
this.getCouponList();
|
||||
|
||||
},
|
||||
directives: {
|
||||
// 注册一个局部的自定义指令 v-focus
|
||||
@ -595,12 +600,34 @@ import {getLodop} from "@/api/LodopFuncs";
|
||||
// })
|
||||
// }
|
||||
|
||||
console.log("111",data.markPurchases)
|
||||
console.log("222",data.remainingInventory)
|
||||
console.log("333",data)
|
||||
|
||||
if (this.shoppingCart.length != 0) {
|
||||
// 只能订购加钱购
|
||||
let flag = false
|
||||
this.shoppingCart.forEach(res => {
|
||||
if (res.exchangeMethod == "积分+加钱购") {
|
||||
flag = true
|
||||
}
|
||||
})
|
||||
|
||||
if (data.exchangeMethod == "积分+加钱购" || flag) {
|
||||
flag = false
|
||||
this.shoppingCart.forEach(res => {
|
||||
if (res.id != data.id ) {
|
||||
flag = true
|
||||
|
||||
return
|
||||
}
|
||||
})
|
||||
}
|
||||
if (flag){
|
||||
this.$message.error('“加钱购”商品仅支持在单商品结算时支持积分不足情况下使用加钱购进行付款,多个商品结算不支持“加钱够”计算');
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (data.markPurchases) {
|
||||
if (data.markPurchases) {
|
||||
if (data.markPurchases>=data.remainingInventory){
|
||||
this.$message.error('库存不足');
|
||||
return
|
||||
@ -622,6 +649,9 @@ import {getLodop} from "@/api/LodopFuncs";
|
||||
// 计算总额
|
||||
this.dataChange(data);
|
||||
|
||||
|
||||
|
||||
|
||||
if (this.shoppingCart.length === 0) {
|
||||
this.shoppingCart.push(data);
|
||||
} else {
|
||||
@ -689,12 +719,12 @@ import {getLodop} from "@/api/LodopFuncs";
|
||||
}
|
||||
},
|
||||
// 获取会员等级信息
|
||||
getGrade(id){
|
||||
getUserGrade(id).then( response => {
|
||||
this.gradeName = response.data.name;
|
||||
})
|
||||
return this.gradeName;
|
||||
},
|
||||
// getGrade(id){
|
||||
// getUserGrade(id).then( response => {
|
||||
// this.gradeName = response.data.name;
|
||||
// })
|
||||
// return this.gradeName;
|
||||
// },
|
||||
// 重置会员
|
||||
resetMember(){
|
||||
this.member = {};
|
||||
@ -744,6 +774,7 @@ import {getLodop} from "@/api/LodopFuncs";
|
||||
});
|
||||
} else {
|
||||
this.openShoppingCart = true
|
||||
this.dataChange(this.shoppingCart[0])
|
||||
}
|
||||
},
|
||||
// 购物车页面计算
|
||||
@ -795,7 +826,9 @@ import {getLodop} from "@/api/LodopFuncs";
|
||||
// 拿到总的积分
|
||||
this.member.points = this.member.points?this.member.points:0
|
||||
let points = this.member.points - exchangePoints.toNumber(); // 使用 toNumber() 获取 BigNumber 的数值
|
||||
|
||||
if (this.member.points<0) {
|
||||
points = 0
|
||||
}
|
||||
// 以及分等一多少
|
||||
if (points < 0) {
|
||||
|
||||
@ -878,32 +911,75 @@ import {getLodop} from "@/api/LodopFuncs";
|
||||
}
|
||||
|
||||
}else if (data.exchangeMethod =='积分+加钱购') {
|
||||
let exchange = new BigNumber(data.exchangePoints);
|
||||
let mark = new BigNumber(data.markPurchases);
|
||||
let exchangePoints_sum = exchange.multipliedBy(mark);
|
||||
this.$set(data, "exchangePoints_sum", exchangePoints_sum);
|
||||
|
||||
if (data.exchangePoints_sum) {
|
||||
data.exchangePoints_sum = Number(exchangePoints_sum);
|
||||
}else {
|
||||
this.$set(data, "exchangePoints_sum", exchangePoints_sum);
|
||||
|
||||
let exchangePoints_sum = 0
|
||||
let exchangeAmount_sum = 0
|
||||
|
||||
// let data1 = this.shoppingCart[0];
|
||||
// 计算加钱购商品一共多少积分
|
||||
let markPurchases = new BigNumber(data.markPurchases);
|
||||
let exchangePoints = markPurchases.multipliedBy(new BigNumber(data.exchangePoints));
|
||||
// 拿到总的积分
|
||||
this.member.points = this.member.points?this.member.points:0
|
||||
let points = this.member.points - exchangePoints.toNumber(); // 使用 toNumber() 获取 BigNumber 的数值
|
||||
console.log("points",points)
|
||||
// 以及分等一多少
|
||||
if (points < 0) {
|
||||
|
||||
// 计算需要的金额
|
||||
points = Math.abs(points);
|
||||
|
||||
|
||||
exchangeAmount_sum = points * data.moneyRatio; // 直接使用 JavaScript 中的乘法
|
||||
exchangeAmount_sum = exchangeAmount_sum.toFixed(2);
|
||||
|
||||
exchangePoints_sum = this.member.points;
|
||||
} else {
|
||||
exchangeAmount_sum = 0
|
||||
exchangePoints_sum = exchangePoints.toNumber();
|
||||
}
|
||||
this.$set(data, "exchangePoints_sum", exchangePoints_sum)
|
||||
this.$set(data, "exchangeAmount_sum", exchangeAmount_sum)
|
||||
|
||||
let ratio = new BigNumber(data.moneyRatio);
|
||||
let moneyRatio_sum = ratio.multipliedBy(mark);
|
||||
this.$set(data, "totalPoints_sum", exchangePoints_sum+"积分"+"+"+moneyRatio_sum+"");
|
||||
|
||||
if (data.moneyRatio_sum) {
|
||||
data.moneyRatio_sum = moneyRatio_sum;
|
||||
}else {
|
||||
this.$set(data, "moneyRatio_sum", moneyRatio_sum);
|
||||
}
|
||||
if (data.totalPoints_sum) {
|
||||
data.totalPoints_sum = exchangePoints_sum+"积分"+"+"+moneyRatio_sum+"";
|
||||
data.totalPoints_sum = exchangePoints_sum+"积分"+"+"+exchangeAmount_sum+"";
|
||||
}else {
|
||||
this.$set(data, "totalPoints_sum", exchangePoints_sum+"积分"+"+"+moneyRatio_sum+"");
|
||||
this.$set(data, "totalPoints_sum", exchangePoints_sum+"积分"+"+"+exchangeAmount_sum+"");
|
||||
|
||||
}
|
||||
console.log("数据",data)
|
||||
return
|
||||
|
||||
//
|
||||
// let exchange = new BigNumber(data.exchangePoints);
|
||||
// let mark = new BigNumber(data.markPurchases);
|
||||
// let exchangePoints_sum = exchange.multipliedBy(mark);
|
||||
// this.$set(data, "exchangePoints_sum", exchangePoints_sum);
|
||||
//
|
||||
// if (data.exchangePoints_sum) {
|
||||
// data.exchangePoints_sum = Number(exchangePoints_sum);
|
||||
// }else {
|
||||
// this.$set(data, "exchangePoints_sum", exchangePoints_sum);
|
||||
// }
|
||||
//
|
||||
// let ratio = new BigNumber(data.moneyRatio);
|
||||
// let moneyRatio_sum = ratio.multipliedBy(mark);
|
||||
// this.$set(data, "totalPoints_sum", exchangePoints_sum+"积分"+"+"+moneyRatio_sum+"");
|
||||
//
|
||||
// if (data.moneyRatio_sum) {
|
||||
// data.moneyRatio_sum = moneyRatio_sum;
|
||||
// }else {
|
||||
// this.$set(data, "moneyRatio_sum", moneyRatio_sum);
|
||||
// }
|
||||
// if (data.totalPoints_sum) {
|
||||
// data.totalPoints_sum = exchangePoints_sum+"积分"+"+"+moneyRatio_sum+"";
|
||||
// }else {
|
||||
// this.$set(data, "totalPoints_sum", exchangePoints_sum+"积分"+"+"+moneyRatio_sum+"");
|
||||
//
|
||||
// }
|
||||
// console.log("data积分",data)
|
||||
}
|
||||
},
|
||||
// 打开订单记录
|
||||
@ -937,6 +1013,7 @@ import {getLodop} from "@/api/LodopFuncs";
|
||||
let integralOrdersList = []
|
||||
if (this_.shoppingCart.length >0) {
|
||||
//数组组装
|
||||
console.log("this_.shoppingCart",this_.shoppingCart)
|
||||
this_.shoppingCart.forEach(res =>{
|
||||
let integralOrders = {
|
||||
userId : this_.member.id,
|
||||
@ -1012,10 +1089,37 @@ import {getLodop} from "@/api/LodopFuncs";
|
||||
},15000)
|
||||
|
||||
}
|
||||
this.printLocally()
|
||||
if (this.isPaySuccess) {
|
||||
this.printLocally()
|
||||
|
||||
}
|
||||
|
||||
// this.paymentType = ''
|
||||
},
|
||||
// 获取优惠券列表信息
|
||||
getCouponList(){
|
||||
listCardFavorableRecord().then(response => {
|
||||
this.couponList = response.data.records
|
||||
})
|
||||
let map = {
|
||||
page:1,
|
||||
pageSize:20,
|
||||
}
|
||||
listUserGrade(map).then(response => {
|
||||
this.gradeList = response.data.records
|
||||
})
|
||||
},
|
||||
// 获取会员等级id
|
||||
getGradeName(list,id){
|
||||
let name = "";
|
||||
list.forEach(item => {
|
||||
if (item.id == id){
|
||||
name = item.name
|
||||
}
|
||||
})
|
||||
this.gradeName = name;
|
||||
return name;
|
||||
},
|
||||
// 清楚数据
|
||||
handClose(){
|
||||
// if(this.isPaySuccess){
|
||||
@ -1037,9 +1141,13 @@ import {getLodop} from "@/api/LodopFuncs";
|
||||
|
||||
// this.reset()
|
||||
this.dialogVisiblej = false
|
||||
this.visflg = false
|
||||
this.authCode = '';
|
||||
},
|
||||
async printLocally(data) {
|
||||
if (!connectFlag){
|
||||
return
|
||||
}
|
||||
//初始化打印函数
|
||||
let LODOP = getLodop(); // 初始化打印
|
||||
LODOP.PRINT_INIT();
|
||||
@ -1126,7 +1234,7 @@ import {getLodop} from "@/api/LodopFuncs";
|
||||
},
|
||||
watch: {
|
||||
dialogVisiblej(newValue) {
|
||||
if (!newValue) {
|
||||
if (!newValue && !this.visflg) {
|
||||
console.log("newValue",newValue)
|
||||
|
||||
this.queryParams= {
|
||||
@ -1140,6 +1248,8 @@ import {getLodop} from "@/api/LodopFuncs";
|
||||
this.handClose()
|
||||
this.reset()
|
||||
|
||||
} else {
|
||||
this.visflg = false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2460,7 +2460,6 @@
|
||||
|
||||
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||
// let preview = LODOP.PREVIEW();
|
||||
// console.log("preview",preview);
|
||||
LODOP.PRINT();
|
||||
}
|
||||
},
|
||||
@ -2700,7 +2699,9 @@
|
||||
this.isOilStorageCard = false;
|
||||
if (this.balance>0){
|
||||
this.checkAll4 = true
|
||||
this.payType = "balance"
|
||||
if (this.goodsOrder.length==0) {
|
||||
this.payType = "balance"
|
||||
}
|
||||
}
|
||||
}else {
|
||||
this.checkAll4 = false
|
||||
@ -2720,7 +2721,9 @@
|
||||
this.checkAll3 = false
|
||||
this.isOilStorageCard = false;
|
||||
this.consumeRefuelMoney = 0;
|
||||
this.payType = "balance"
|
||||
if (this.goodsOrder.length==0) {
|
||||
this.payType = "balance"
|
||||
}
|
||||
this.countAmountFull();
|
||||
this.isUseBalance = false;
|
||||
}
|
||||
@ -2742,7 +2745,9 @@
|
||||
this.couponAmount = 0
|
||||
if (this.balance>0){
|
||||
this.checkAll4 = true
|
||||
this.payType = "balance"
|
||||
if (this.goodsOrder.length==0) {
|
||||
this.payType = "balance"
|
||||
}
|
||||
}
|
||||
}
|
||||
this.countAmountFull();
|
||||
@ -2920,13 +2925,11 @@
|
||||
// if (response.data.fixingLevel.storeValue=="no" && _this.consumeAmount>0){
|
||||
// _this.oilDiscount = 0
|
||||
// _this.checkAll4 = false
|
||||
// console.log(111)
|
||||
// }else {
|
||||
_this.oilDiscount += discount.discount
|
||||
_this.gradeDiscount.push(discount)
|
||||
_this.checkAll2 = true
|
||||
_this.checkedCities2.push(discount.gunName)
|
||||
// console.log(222)
|
||||
// }
|
||||
}
|
||||
}
|
||||
@ -3085,7 +3088,9 @@
|
||||
// }
|
||||
if (this.balance>0 && this.oilAmount>0 && !this.isOilStorageCard){
|
||||
this.checkAll4 = true
|
||||
this.payType = "balance"
|
||||
if (this.goodsOrder.length==0){
|
||||
this.payType = "balance"
|
||||
}
|
||||
this.countAmountFull()
|
||||
}
|
||||
await this.getGrade(this.member.id,this.member.gradeId)
|
||||
@ -3172,7 +3177,6 @@
|
||||
}
|
||||
}
|
||||
// }
|
||||
// console.log(_this.couponAmount,222)
|
||||
if(!this.isOilStorageCard){
|
||||
this.countAmountFull()
|
||||
}
|
||||
@ -3182,7 +3186,6 @@
|
||||
if (type==0){
|
||||
this.countAmountFull()
|
||||
}
|
||||
// console.log(discount,_this.gradeDiscount,_this.couponDiscount,_this.fullReduceDiscount,"1264")
|
||||
})
|
||||
})
|
||||
},
|
||||
@ -3258,7 +3261,9 @@
|
||||
// 满减互斥
|
||||
_this.checkAll1 = false
|
||||
_this.checkAll4 = true;
|
||||
this.payType = "balance"
|
||||
if (_this.goodsOrder.length==0) {
|
||||
_this.payType = "balance"
|
||||
}
|
||||
_this.fullReduction = 0
|
||||
_this.isUseFull = true;
|
||||
}else {
|
||||
@ -3448,7 +3453,6 @@
|
||||
},
|
||||
// 选择员工信息
|
||||
chooseStaff(data){
|
||||
console.log(data,"qusnv")
|
||||
this.staff = data;
|
||||
this.map.staffId = this.staff.id;
|
||||
this.dialogVisible = false
|
||||
@ -3460,6 +3464,7 @@
|
||||
},
|
||||
// 添加商品列表信息
|
||||
changeGoods(val){
|
||||
this.payType = "WECHAT"
|
||||
let result = true;
|
||||
let goods = this.goodsOrder;
|
||||
let _this = this;
|
||||
@ -3473,19 +3478,20 @@
|
||||
break;
|
||||
}
|
||||
goods[i].num = goods[i].num + 1;
|
||||
val.num = goods[i].num + 1;
|
||||
this.goodsTotal += 1;
|
||||
if (_this.isMember) {
|
||||
this.goodsDiscount += +((goods[i].retailPrice-goods[i].memberPrice)*goods[i].num).toFixed(2)
|
||||
}
|
||||
amount += goods[i].retailPrice * goods[i].num
|
||||
result = false;
|
||||
break;
|
||||
} else {
|
||||
result = true;
|
||||
}
|
||||
if (_this.isMember) {
|
||||
this.goodsDiscount += +((goods[i].retailPrice-goods[i].memberPrice)*goods[i].num).toFixed(2)
|
||||
}
|
||||
amount += +(goods[i].retailPrice * goods[i].num).toFixed(2)
|
||||
}
|
||||
this.goodsAmount = amount;
|
||||
this.goodsActualPay = this.goodsAmount - this.goodsDiscount;
|
||||
// this.goodsAmount = amount;
|
||||
// this.goodsActualPay = this.goodsAmount - this.goodsDiscount;
|
||||
} else {
|
||||
result = true;
|
||||
}
|
||||
@ -3498,6 +3504,7 @@
|
||||
if (_this.isMember) {
|
||||
this.goodsDiscount += (val.retailPrice - val.memberPrice)
|
||||
}
|
||||
console.log(this.goodsAmount)
|
||||
this.goodsAmount += +val.retailPrice
|
||||
this.goodsActualPay = this.goodsAmount - this.goodsDiscount;
|
||||
this.goodsOrder.push(val);
|
||||
@ -3507,14 +3514,26 @@
|
||||
this.$modal.msgError("商品库存不足,请重新选择商品")
|
||||
return;
|
||||
}
|
||||
if (_this.isMember) {
|
||||
this.goodsDiscount += (val.retailPrice - val.memberPrice) * val.num
|
||||
// if (_this.isMember) {
|
||||
// this.goodsDiscount += (val.retailPrice - val.memberPrice) * val.num
|
||||
// }
|
||||
// this.goodsAmount += val.retailPrice * val.num
|
||||
// this.goodsActualPay = this.goodsAmount - this.goodsDiscount;
|
||||
_this.goodsDiscount = 0
|
||||
_this.goodsAmount = 0
|
||||
if (this.goodsOrder.length > 0) {
|
||||
goods.forEach(item => {
|
||||
// if (item.id != val.id){
|
||||
if (_this.isMember) {
|
||||
_this.goodsDiscount += (item.retailPrice - item.memberPrice) * item.num
|
||||
}
|
||||
_this.goodsAmount += item.retailPrice * item.num
|
||||
_this.goodsActualPay = _this.goodsAmount - _this.goodsDiscount;
|
||||
// }
|
||||
})
|
||||
}
|
||||
this.goodsAmount += +val.retailPrice * val.num
|
||||
this.goodsActualPay = this.goodsAmount - this.goodsDiscount;
|
||||
}
|
||||
this.goods = ""
|
||||
|
||||
},
|
||||
// 立即结算
|
||||
settlement(){
|
||||
@ -3555,6 +3574,7 @@
|
||||
this.gradeDiscount = [];
|
||||
this.couponDiscount = [];
|
||||
this.checkAll4 = false;
|
||||
this.isExistOilOrder = false
|
||||
|
||||
if (this.member.refuelMoney!=null){
|
||||
this.refuelMoney = JSON.parse(this.member.refuelMoney)
|
||||
@ -3621,7 +3641,9 @@
|
||||
}
|
||||
if (this.balance>0 && this.oilAmount>0 && !this.isOilStorageCard){
|
||||
this.checkAll4 = true
|
||||
this.payType = "balance"
|
||||
if (this.goodsOrder.length==0) {
|
||||
this.payType = "balance"
|
||||
}
|
||||
this.countAmountFull()
|
||||
}
|
||||
await this.getGrade(this.member.id,this.member.gradeId)
|
||||
@ -3845,6 +3867,7 @@
|
||||
this.map.staffId = this.staff.id
|
||||
this.map.cardFavorableId = this.cardFavorableId
|
||||
this.map.recordId = this.recordId
|
||||
this.map.userId = this.member.id
|
||||
|
||||
let _this = this;
|
||||
if (this.payType=="APPLET_CODE"){
|
||||
@ -3877,7 +3900,6 @@
|
||||
let isPaySuccess = false;
|
||||
|
||||
await addLJGoods(_this.map).then( response => {
|
||||
console.log('3867386738673867')
|
||||
_this.orderNo = response.data.orderNo;
|
||||
if (response.data.oilOrder!=null){
|
||||
if (response.data.oilOrder.orderStatus == "paid"){
|
||||
@ -4147,11 +4169,15 @@
|
||||
payMethod(payType){
|
||||
if (payType == 'oilCard'){
|
||||
if (this.isMember){
|
||||
if (this.goodsOrder.length>0){
|
||||
this.$message.error("商品不可使用囤油卡付款")
|
||||
return;
|
||||
}
|
||||
if (this.refuelMoney1.length>0){
|
||||
this.checkAll3 = true
|
||||
this.handleCheckAllChange3(true)
|
||||
}else {
|
||||
this.$message.error("请先充值囤油卡")
|
||||
this.$message.error("请先充值!!")
|
||||
return;
|
||||
}
|
||||
}else {
|
||||
@ -4161,8 +4187,17 @@
|
||||
}
|
||||
if (payType == 'balance'){
|
||||
if (this.isMember){
|
||||
this.checkAll4 = true
|
||||
this.handleCheckAllChange4(true)
|
||||
if (this.goodsOrder.length>0){
|
||||
this.$message.error("商品不可使用储值卡付款")
|
||||
return;
|
||||
}
|
||||
if (this.balance>0){
|
||||
this.checkAll4 = true
|
||||
this.handleCheckAllChange4(true)
|
||||
}else {
|
||||
this.$message.error("请先充值!!")
|
||||
return;
|
||||
}
|
||||
}else {
|
||||
this.$message.error("请先选择会员")
|
||||
return;
|
||||
|
@ -194,7 +194,7 @@ export default {
|
||||
})
|
||||
},
|
||||
getStatistics() {
|
||||
getStatisticsApi().then(res=>{
|
||||
getStatisticsApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
this.statisticsForm = res.data
|
||||
})
|
||||
console.log("123123123",this.statisticsForm)
|
||||
@ -210,6 +210,7 @@ export default {
|
||||
handleUpdate(){},
|
||||
handleQuery(){
|
||||
this.getList();
|
||||
this.getStatistics();
|
||||
|
||||
},
|
||||
resetQuery(){
|
||||
@ -222,6 +223,9 @@ export default {
|
||||
pageSize:10
|
||||
},
|
||||
this.dateRange = []
|
||||
this.getList()
|
||||
this.getStatistics();
|
||||
|
||||
},
|
||||
handleDetail(data){
|
||||
this.openDetail = true
|
||||
|
@ -54,9 +54,19 @@
|
||||
<span>收银台订单统计</span>
|
||||
</div>
|
||||
<div class="box-gang">
|
||||
<div class="box">
|
||||
<div class="size-hui">笔数</div>
|
||||
<div class="size-bole">{{ orderStatistics.numberOfStrokes?orderStatistics.numberOfStrokes:0 }}</div>
|
||||
<div class="box" style="display: flex;align-items: center;width: 250px">
|
||||
<div>
|
||||
<div class="size-hui">笔数</div>
|
||||
<div class="size-bole">{{ orderStatistics.numberOfStrokes?orderStatistics.numberOfStrokes:0 }}</div>
|
||||
</div>
|
||||
<div style="margin-left: 30px">
|
||||
<div class="size-hui" >油品笔数</div>
|
||||
<div class="size-bole">{{ orderStatistics.numberOfStrokesByOil?orderStatistics.numberOfStrokesByOil:0 }}</div>
|
||||
</div>
|
||||
<div style="margin-left: 30px">
|
||||
<div class="size-hui">商品笔数</div>
|
||||
<div class="size-bole">{{ orderStatistics.numberOfStrokesByGoods?orderStatistics.numberOfStrokesByGoods:0 }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="size-hui">订单总金额</div>
|
||||
@ -246,32 +256,32 @@
|
||||
</div>
|
||||
<div style="margin-top: 30px">
|
||||
<el-descriptions :column="1" direction="vertical">
|
||||
<!-- <el-descriptions-item label="油品详情">-->
|
||||
<!-- <el-table-->
|
||||
<!-- v-loading="loading"-->
|
||||
<el-descriptions-item label="油品详情">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
|
||||
<!-- :data="oilInfo"-->
|
||||
<!-- style="width: 100%">-->
|
||||
<!-- <el-table-column label="油号油枪" prop="terminal">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{ getName(oilNameList,scope.row.oils) }}/{{ getName1(oilGunList,scope.row.oilGunNum) }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="油品金额" align="center" prop="orderAmount">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{ scope.row.orderAmount }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="加油升数" align="center" prop="oilNum" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{ scope.row.oilNum }}L</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="油品单价" align="center" prop="amount">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{ scope.row.oilPrice }}/L</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
:data="oilInfo"
|
||||
style="width: 100%">
|
||||
<el-table-column label="油号油枪" prop="terminal">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getName(oilNameList,scope.row.oils) }}/{{ getName1(oilGunList,scope.row.oilGunNum) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="油品金额" align="center" prop="orderAmount">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.orderAmount }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="加油升数" align="center" prop="oilNum" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.oilNum }}L</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="油品单价" align="center" prop="amount">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.oilPrice }}/L</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="满减活动优惠" align="center" prop="activeId">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span v-if="scope.row.activeType==1">{{ scope.row.deductionAmount }}</span>-->
|
||||
@ -284,8 +294,8 @@
|
||||
<!-- <span v-else>0</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- </el-table>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
</el-table>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="商品详情">
|
||||
<el-table
|
||||
:data="goodsInfo"
|
||||
@ -304,13 +314,12 @@
|
||||
<el-table-column label="数量" align="center" prop="num"/>
|
||||
<el-table-column label="合计金额" align="center" prop="num">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ (scope.row.retailPrice * scope.row.num).toFixed(2) }}</span>
|
||||
<span>{{ scope.row.allAmount }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实付金额" align="center" prop="num">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="cashierOrder.payUser == '散客'">{{ (scope.row.retailPrice * scope.row.num).toFixed(2) }}</span>
|
||||
<span v-else>{{ (scope.row.memberPrice * scope.row.num).toFixed(2) }}</span>
|
||||
<span>{{ scope.row.payAmount }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -20,16 +20,29 @@
|
||||
<el-input v-model="queryParams.orderNo" clearable placeholder="订单号检索"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="交易时间">
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="dateRange"-->
|
||||
<!-- style="width: 240px"-->
|
||||
<!-- size="medium"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- type="daterange"-->
|
||||
<!-- range-separator="至"-->
|
||||
<!-- start-placeholder="开始日期"-->
|
||||
<!-- end-placeholder="结束日期"-->
|
||||
<!-- ></el-date-picker>-->
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
size="medium"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
v-model="beginTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="开始日期">
|
||||
</el-date-picker>
|
||||
至
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
@ -142,16 +155,29 @@
|
||||
<el-input v-model="queryParams.orderNo" clearable placeholder="订单号检索"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="交易时间">
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="dateRange"-->
|
||||
<!-- style="width: 240px"-->
|
||||
<!-- size="medium"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- type="daterange"-->
|
||||
<!-- range-separator="至"-->
|
||||
<!-- start-placeholder="开始日期"-->
|
||||
<!-- end-placeholder="结束日期"-->
|
||||
<!-- ></el-date-picker>-->
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
size="medium"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
v-model="beginTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="开始日期">
|
||||
</el-date-picker>
|
||||
至
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
@ -164,7 +190,7 @@
|
||||
</div>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>升数卡统计</span>
|
||||
<span>囤油卡统计</span>
|
||||
</div>
|
||||
<div class="box-gang">
|
||||
<!-- <div class="box" v-for="(item,index) in 7" :key="index">-->
|
||||
@ -507,6 +533,8 @@ import {oilNumbers} from "@/api/cashier/oilnumber";
|
||||
totalConsumption1:0,
|
||||
totalRecharge1:0,
|
||||
dateRange:[],
|
||||
beginTime:"",
|
||||
endTime:"",
|
||||
|
||||
// 用户列表
|
||||
userList:[],
|
||||
@ -623,6 +651,10 @@ import {oilNumbers} from "@/api/cashier/oilnumber";
|
||||
if (val!=undefined){
|
||||
this.queryParams.page = val
|
||||
}
|
||||
if (this.beginTime && this.endTime) {
|
||||
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
listCardBalanceRecord(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
|
||||
this.cardBalanceList = res.data.records
|
||||
this.total = res.data.total
|
||||
@ -633,6 +665,10 @@ import {oilNumbers} from "@/api/cashier/oilnumber";
|
||||
if (val!=undefined){
|
||||
this.queryParams.page = val
|
||||
}
|
||||
if (this.beginTime && this.endTime) {
|
||||
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
cardBalanceCount(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
|
||||
this.inCount = res.data.inCount
|
||||
this.outCount = res.data.outCount
|
||||
@ -645,6 +681,10 @@ import {oilNumbers} from "@/api/cashier/oilnumber";
|
||||
if (val!=undefined){
|
||||
this.queryParams.page = val
|
||||
}
|
||||
if (this.beginTime && this.endTime) {
|
||||
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
listCardOilRecord(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
|
||||
this.cardOilList = res.data.records
|
||||
this.total1 = res.data.total
|
||||
@ -655,6 +695,10 @@ import {oilNumbers} from "@/api/cashier/oilnumber";
|
||||
if (val!=undefined){
|
||||
this.queryParams.page = val
|
||||
}
|
||||
if (this.beginTime && this.endTime) {
|
||||
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
cardOilCount(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
|
||||
this.inCount1 = res.data.inCount
|
||||
this.outCount1 = res.data.outCount
|
||||
|
@ -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">
|
||||
@ -490,6 +490,10 @@
|
||||
},
|
||||
// 获取当前位置
|
||||
getAddress(storeId) {
|
||||
// uni.showToast({
|
||||
// title:"店铺id"+storeId,
|
||||
// icon:"none"
|
||||
// })
|
||||
let _this = this;
|
||||
uni.getLocation({
|
||||
// 谷歌使用wgs84 其他使用gcj02
|
||||
|
Loading…
Reference in New Issue
Block a user