收银端-会员 交班 和 油站端同步

This commit is contained in:
zhaotianfeng 2024-09-12 14:15:24 +08:00
parent de62fe26ba
commit 490ac37b45
22 changed files with 3545 additions and 1168 deletions

View File

@ -12,7 +12,7 @@
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
<el-form-item label="" prop="userNo">
<el-input
v-model="queryParams.userNo"
v-model="queryParams.name"
placeholder="请输入会员昵称"
clearable
style="width: 180px;"
@ -37,33 +37,6 @@
<el-option v-for="grade in userGradeList" :key="grade.id+''" :label="grade.name" :value="grade.id+''"/>
</el-select>
</el-form-item>
<el-form-item label="" prop="gradeId">
<el-select
v-model="queryParams.gradeId"
clearable
placeholder="请选择会员标签"
>
<el-option v-for="grade in userGradeList" :key="grade.id+''" :label="grade.name" :value="grade.id+''"/>
</el-select>
</el-form-item>
<el-form-item label="" prop="mobile">
<el-input
v-model="queryParams.mobile"
placeholder="请输入车牌号"
clearable
style="width: 180px;"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="" prop="gradeId">
<el-select
v-model="queryParams.gradeId"
clearable
placeholder="请选择性别"
>
<el-option v-for="grade in userGradeList" :key="grade.id+''" :label="grade.name" :value="grade.id+''"/>
</el-select>
</el-form-item>
<el-form-item label="" prop="mobile">
<el-input
v-model="queryParams.mobile"
@ -73,33 +46,19 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入年龄"
clearable
style="width: 180px;"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="" prop="gradeId">
<el-select
v-model="queryParams.gradeId"
v-model="queryParams.userStatus"
clearable
placeholder="请选择状态"
>
<el-option v-for="grade in userGradeList" :key="grade.id+''" :label="grade.name" :value="grade.id+''"/>
<el-option v-for="grade in userStatusList"
:key="grade.value"
:label="grade.label"
:value="grade.value"/>
</el-select>
</el-form-item>
<el-form-item label="" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入余额"
clearable
style="width: 180px;"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="">
<el-date-picker
v-model="beginTime"
@ -115,15 +74,7 @@
placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item label="" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入剩余积分"
clearable
style="width: 180px;"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<div style="float: right">
<el-button style="background: linear-gradient( 180deg, #FF8646 0%, #FFA360 100%); border: transparent "
type="primary" @click="handleQuery">搜索
@ -152,39 +103,39 @@
</div>
<!-- </el-card>-->
<!-- <el-card style="margin-top: 20px">-->
<!-- <template>-->
<!-- <div class="ds-dbox">-->
<!-- <div class="k-one">-->
<!-- <div class="title_">激活会员总数</div>-->
<!-- <div class="num-size">{{total}}</div>-->
<!-- <img class="r-bot-img" src="./imgs/hy-1.png" alt="">-->
<!-- </div>-->
<el-card style="margin-top: 20px">
<template>
<div class="ds-dbox">
<div class="k-one">
<div class="title_">激活会员总数</div>
<div class="num-size">{{total}}</div>
<img class="r-bot-img" src="./imgs/hy-1.png" alt="">
</div>
<!-- <div class="k-two">-->
<!-- <div class="title_">今日新增/昨日新增</div>-->
<!-- <div class="num-size"> {{ addNum }}/{{ yesterdayAddNum }}</div>-->
<!-- <img class="r-bot-img" src="./imgs/hy-2.png" alt="">-->
<!-- </div>-->
<!-- <div class="k-three">-->
<!-- <div class="title_">充值总人数</div>-->
<!-- <div class="num-size">{{rechargeTotal || 0}}</div>-->
<!-- <img class="r-bot-img" src="./imgs/hy-3.png" alt="">-->
<!-- </div>-->
<!-- <div class="k-four">-->
<!-- <div class="title_">储值总余额</div>-->
<!-- <div class="num-size">{{balance}}</div>-->
<!-- <img class="r-bot-img" src="./imgs/hy-4.png" alt="">-->
<!-- </div>-->
<!-- <div class="k-five">-->
<!-- <div class="title_">积分总余额</div>-->
<!-- <div class="num-size">{{point}}</div>-->
<!-- <img class="r-bot-img" src="./imgs/hy-5.png" alt="">-->
<!-- </div>-->
<!-- </div>-->
<div class="k-two">
<div class="title_">今日新增/昨日新增</div>
<div class="num-size"> {{ addNum }}/{{ yesterdayAddNum }}</div>
<img class="r-bot-img" src="./imgs/hy-2.png" alt="">
</div>
<div class="k-three">
<div class="title_">充值总人数</div>
<div class="num-size">{{rechargeTotal || 0}}</div>
<img class="r-bot-img" src="./imgs/hy-3.png" alt="">
</div>
<div class="k-four">
<div class="title_">储值总余额</div>
<div class="num-size">{{balance}}</div>
<img class="r-bot-img" src="./imgs/hy-4.png" alt="">
</div>
<div class="k-five">
<div class="title_">积分总余额</div>
<div class="num-size">{{point}}</div>
<img class="r-bot-img" src="./imgs/hy-5.png" alt="">
</div>
</div>
<!-- </template>-->
<!-- </el-card>-->
</template>
</el-card>
<!-- <el-card style="margin-top: 20px">-->
@ -753,6 +704,16 @@ export default {
},
//
fileList: [],
userStatusList:[
{
label: "使用中",
value: 0
},
{
label: "已注销",
value: 1
}
],
addMember: [],
//
@ -789,7 +750,7 @@ export default {
page: 1,
pageSize: 10
},
beginTime2: "",
beginTime2: '',
endTime2: "",
massSendRecordList: [],
@ -819,8 +780,8 @@ export default {
openPoint: false,
//
dateRange: [],
beginTime: "",
endTime: "",
beginTime: new Date(),
endTime: new Date(),
//
defaultSort: {prop: 'updateTime', order: 'descending'},
//
@ -919,6 +880,7 @@ export default {
},
//
getList() {
this.loading = true;
let dateRange = []

View File

@ -0,0 +1,79 @@
import request from '@/utils/request'
export function getHandoverApi() {
return request({
url: '/business/handoverRecord/handover',
method: 'get',
// params: query
})
}
// 根据字典类型查询字典数据信息
export function getDicts(dictType) {
return request({
url: '/system/dict/data/type/' + dictType,
method: 'get'
})
}
export function getStatisticsApi(data) {
return request({
url: 'business/integral/integralOrders/statistics',
method: 'get',
params: data
})
}
export function getHandoverApi2() {
return request({
url: '/business/handoverRecord/handover2',
method: 'get',
// params: query
})
}
export function getHandoverListApi(query) {
return request({
url: '/business/handoverRecord/queryByPage',
method: 'get',
params: query
})
}
// 查询员工列表
export function listStaff(query) {
return request({
url: '/business/member/staff/list',
method: 'get',
params: query
})
}
export function addHandoverApi(data) {
return request({
url: '/business/handoverRecord',
method: 'post',
data: data
})
}
export function printGetHandoverReport(data) {
return request({
url: 'business/printer/getHandover',
method: 'post',
data: data
})
}
export function printLocallyApi(data) {
return request({
url: '/business/handoverRecord/printLocally',
method: 'post',
data: data
})
}

View File

@ -16,6 +16,14 @@ export function ljStoreList() {
})
}
// 根据连锁店id查询店铺信息
export function storesList() {
return request({
url: '/business/storeInformation/store/stores',
method: 'get'
})
}
// 修改店铺信息
export function updateStore(data) {
return request({

View File

@ -1,5 +1,22 @@
import request from '@/utils/request'
// 根据手机号查询会员详细
export function getUserPhone(data) {
return request({
url: '/business/userManager/user/phone' ,
method: 'post',
data: data
})
}
//注销用户
export function logOffUsers(id) {
return request({
url: '/business/userManager/userbalance/'+id,
method: 'get'
})
}
// 查询会员列表
export function listUser(query) {
return request({

View File

@ -9,6 +9,15 @@ export function listUserGrade(query) {
})
}
// 查询所有会员等级列表
export function allUserGrade() {
return request({
url: '/business/userManager/userGrade/allUserGrade',
method: 'get',
})
}
// 查询会员等级详细
export function getUserGrade(id) {
return request({

View File

@ -0,0 +1,48 @@
import request from '@/utils/request'
// 分页查询所有的订单信息
export function getListApi(query) {
return request({
url: '/messageTemplate',
method: 'get',
params: query
})
}
// 查询会员标签列表
export function listUserMassSendRecord(query) {
return request({
url: '/userMassSendRecord',
method: 'get',
params: query
})
}
// 添加会员标签
export function addUserMassSend(data) {
return request({
url: '/userMassSend',
method: 'post',
data: data
})
}
// 删除会员标签
export function deleteUserMassSendRecord(id) {
return request({
url: '/userMassSendRecord/'+id,
method: 'delete',
})
}
// 查询会员标签列表
export function listUserLabel(query) {
return request({
url: '/userLabel',
method: 'get',
params: query
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 704 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 467 B

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,701 @@
<template>
<div class="">
<div style="margin-top: 0px; height: 70vh;overflow: auto" class="box-card">
<div class="title_">门店交接单</div>
<div class="d-s-b">
<div>油站名称</div>
<div>{{baseInfo.storeName}}</div>
</div>
<div class="d-s-b">
<div>油站站长</div>
<div>{{baseInfo.realName}}</div>
</div>
<div class="d-s-b">
<div>交班方式</div>
<div>{{baseInfo.handoverType}}</div>
</div>
<div class="d-s-b">
<div>开始时间</div>
<div>{{baseInfo.startTime}}</div>
</div>
<div class="d-s-b">
<div>结束时间</div>
<div>{{baseInfo.endTime}}</div>
</div>
<div class="d-s-b">
<div>订单金额</div>
<div>{{orderSummary.oilOrder}}</div>
</div>
<div class="d-s-b">
<div>优惠金额</div>
<div>{{orderSummary.allDis}}</div>
</div>
<div class="d-s-b">
<div>退款金额</div>
<div>{{orderSummary.oilRefund}}</div>
</div>
<div class="d-s-b">
<div>挂账金额</div>
<div>--</div>
</div>
<div class="d-s-b">
<div>会员消费</div>
<div>{{orderSummary.allBalanceP}}</div>
</div>
<div class="d-s-b">
<div>实收金额</div>
<div>{{orderSummary.allMoney}}</div>
</div>
<div class="d-s-b">
<div>充值金额</div>
<div>{{orderSummary.cardPaid}}</div>
</div>
<div class="d-s-b">
<div>充值赠送</div>
<div>{{orderSummary.cardGiftPaid}}</div>
</div>
<div class="d-s-b">
<div>会员总余额</div>
<div>{{orderSummary.points}}</div>
</div>
<div class="d-s-b">
<div>会员总积分</div>
<div>{{orderSummary.sumnum}}</div>
</div>
<div class="xxing"></div>
<div class="for-box">
<div class="for-title">
<div class="x-"></div>
<div>营业收入统计</div>
<div class="x-"></div>
</div>
<div class="d-s-b" style="font-weight: 600">
<div class="l-size">类型</div>
<div class="f-size">订单金额</div>
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b">
<div class="l-size">营业总额</div>
<div class="s-size">{{orderSummary.allyingye1}}</div>
<div class="r-size">{{orderSummary.allyingye}}</div>
</div>
<div class="d-s-b">
<div class="l-size">充值总额</div>
<div class="s-size">{{orderSummary.allchuzhika1}}</div>
<div class="r-size">{{orderSummary.allchuzhika}}</div>
</div>
<div class="d-s-b">
<div class="l-size">合计</div>
<div class="s-size">{{orderSummary.allyingye1 + orderSummary.allchuzhika1}}</div>
<div class="r-size">{{orderSummary.allyingye + orderSummary.allchuzhika}}</div>
</div>
</div>
<div class="for-box">
<div class="for-title">
<div class="x-"></div>
<div>支付方式统计</div>
<div class="x-"></div>
</div>
<div class="d-s-b" style="font-weight: 600">
<div class="l-size">支付方式</div>
<div class="f-size">笔数</div>
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in paymentAggregation" v-if="item.flag == 'all'">
<div class="l-size">{{calculateThePaymentMethod(item.payType)}}</div>
<div class="s-size">{{item.numberOfDeals}}</div>
<div class="r-size">{{item.paidAmount}}</div>
</div>
</div>
<div class="for-box">
<div class="for-title">
<div class="x-"></div>
<div>油品实收统计</div>
<div class="x-"></div>
</div>
<div class="d-s-b" style="font-weight: 600">
<div class="l-size">油号</div>
<div class="f-size">笔数</div>
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in oilNumberStatistics">
<div class="l-size">{{item.oilName}}</div>
<div class="s-size">{{item.numberOfDeals}}</div>
<div class="r-size">{{item.paidAmount}}</div>
</div>
</div>
<div class="for-box">
<div class="for-title">
<div class="x-"></div>
<div>优惠统计</div>
<div class="x-"></div>
</div>
<div class="d-s-b" style="font-weight: 600">
<div class="l-size">油号</div>
<div class="f-size">笔数</div>
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in oilNumberStatistics">
<div class="l-size">{{item.oilName}}</div>
<div class="s-size">{{item.numberOfDeals}}</div>
<div class="r-size">{{item.paidAmount}}</div>
</div>
</div>
<div class="for-box">
<div class="for-title">
<div class="x-"></div>
<div>退款统计</div>
<div class="x-"></div>
</div>
<div class="d-s-b" style="font-weight: 600">
<div class="l-size">类型</div>
<div class="f-size">笔数</div>
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in oilNumberStatistics">
<div class="l-size">{{item.oilName}}</div>
<div class="s-size">{{item.numberOfDeals}}</div>
<div class="r-size">{{item.paidAmount}}</div>
</div>
</div>
<div class="for-box">
<div class="for-title">
<div class="x-"></div>
<div>挂账统计</div>
<div class="x-"></div>
</div>
<div class="d-s-b" style="font-weight: 600">
<div class="l-size">挂账单位</div>
<div class="f-size">笔数</div>
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in paymentAggregation" v-if="item.flag == 'all' && item.payType == 'balance'">
<div class="l-size">{{item.name}}</div>
<div class="s-size">{{item.numberOfDeals?item.numberOfDeals:'--'}}</div>
<div class="r-size">{{item.paidAmount?item.paidAmount:'--'}}</div>
</div>
</div>
<div class="for-box">
<div class="for-title">
<div class="x-"></div>
<div>会员充值统计</div>
<div class="x-"></div>
</div>
<div class="d-s-b" style="font-weight: 600">
<div class="l-size">支付方式</div>
<div class="f-size">笔数</div>
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in paymentAggregation" v-if="item.flag == 'allbalance'">
<div class="l-size">{{calculateThePaymentMethod(item.payType)}}</div>
<div class="s-size">{{item.numberOfDeals?item.numberOfDeals:'--'}}</div>
<div class="r-size">{{item.paidAmount?item.paidAmount:'--'}}</div>
</div>
</div>
<div class="for-box">
<div class="for-title">
<div class="x-"></div>
<div>会员消费统计</div>
<div class="x-"></div>
</div>
<div class="d-s-b" style="font-weight: 600">
<div class="l-size">支付方式</div>
<div class="f-size">笔数</div>
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in paymentAggregation" v-if="item.flag == 'all' && item.payType == 'balance'">
<div class="l-size">合计</div>
<div class="s-size">{{item.numberOfDeals?item.numberOfDeals:'--'}}</div>
<div class="r-size">{{item.paidAmount?item.paidAmount:'--'}}</div>
</div>
</div>
<div class="for-box">
<div class="for-title">
<div class="x-"></div>
<div>便利店统计</div>
<div class="x-"></div>
</div>
<div class="d-s-b" style="font-weight: 600">
<div class="l-size">支付方式</div>
<div class="f-size">笔数</div>
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in paymentAggregation" v-if="item.flag == 'goods'">
<div class="l-size">{{calculateThePaymentMethod(item.payType)}}</div>
<div class="s-size">{{item.numberOfDeals?item.numberOfDeals:'--'}}</div>
<div class="r-size">{{item.paidAmount?item.paidAmount:'--'}}</div>
</div>
</div>
<div class="for-box">
<div class="for-title">
<div class="x-"></div>
<div>积分商城统计</div>
<div class="x-"></div>
</div>
<div class="d-s-b" style="font-weight: 600">
<div class="l-size">支付方式</div>
<div class="f-size">笔数</div>
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in paymentAggregation" v-if="item.flag == 'point'">
<div class="l-size">{{calculateThePaymentMethod(item.payType)}}</div>
<div class="s-size">{{item.numberOfDeals?item.numberOfDeals:'--'}}</div>
<div class="r-size">{{item.paidAmount?item.paidAmount:'--'}}</div>
</div>
</div>
<div class="for-box">
<div class="for-title">
<div class="x-"></div>
<div>新增会员统计</div>
<div class="x-"></div>
</div>
<div class="d-s-b" style="font-weight: 600">
<div class="l-size">新增会员数</div>
<!-- <div class="f-size">笔数</div>-->
<div class="r-size">{{orderSummary.sumnum}}</div>
</div>
</div>
<div class="for-box">
<div class="for-title">
<div class="x-"></div>
<div>挂账归还统计(再处理)</div>
<div class="x-"></div>
</div>
<div class="d-s-b" style="font-weight: 600">
<div class="l-size">支付方式</div>
<div class="f-size">笔数</div>
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in returnedToTheAccount">
<div class="l-size">{{item.name?item.name:'--'}}</div>
<div class="s-size">{{item.numberOfDeals?item.numberOfDeals:'--'}}</div>
<div class="r-size">{{item.paidAmount?item.paidAmount:'--'}}</div>
</div>
</div>
<div class="for-box">
<div class="for-title">
<div class="x-"></div>
<div>员工实收统计</div>
<div class="x-"></div>
</div>
<div class="d-s-b" style="font-weight: 600">
<div class="l-size">员工</div>
<div class="f-size">笔数</div>
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in employeeStatistics">
<div class="l-size">{{item.name?item.name:'--'}}</div>
<div class="s-size">{{item.numberOfDeals?item.numberOfDeals:'--'}}</div>
<div class="r-size">{{item.paidAmount?item.paidAmount:'--'}}</div>
</div>
</div>
</div>
</div>
</template>
<script>
import {getHandoverListApi, printLocallyApi,getStatisticsApi,getDicts,listStaff} from "@/api/handover/handover";
import HandoverOnly from "@/views/cashier/NewComponents/HandoverOnly.vue";
import HandoverRecord from "@/views/cashier/NewComponents/HandoverRecord.vue";
export default {
name: "HandoverDetailsInfo",
components: {HandoverRecord, HandoverOnly},
// dicts: ['zhzt'],
props: {
recordData:''
},
data() {
return {
tabs:[
"交接班",
"交班记录"
],
tabindex:'',
status:'',
openDetail:'',
queryParams:{},
handoverList : {},
handoverData:{},
baseInfo:{},
billingDetails:[],
employeeStatistics:[],
greaseGunStatistics:[],
oilNumberStatistics:[],
orderSummary:{},
paymentAggregation:[],
returnedToTheAccount:[],
}
},
created() {
console.log(11111111121212)
this.handoverList = JSON.parse(this.recordData)
this.handoverData = this.handoverList;
console.log(11111111121212,this.handoverData)
this.baseInfo = this.handoverData.baseInfo,
this.billingDetails = this.handoverData.billingDetails,
this.employeeStatistics = this.handoverData.employeeStatistics,
this.greaseGunStatistics = this.handoverData.greaseGunStatistics,
this.oilNumberStatistics = this.handoverData.oilNumberStatistics,
this.orderSummary = this.handoverData.orderSummary,
this.paymentAggregation = this.handoverData.paymentAggregation,
this.returnedToTheAccount = this.handoverData.returnedToTheAccount,
console.log("this.handoverList",this.handoverList)
// this.getHandover();
;
},
methods: {
getHandover() {
// getHandoverApi2(this.queryParams).then(res=>{
// this.handoverList = res.data;
// this.handoverData = res.data;
// this.baseInfo = this.handoverData.baseInfo,
// this.billingDetails = this.handoverData.billingDetails,
// this.employeeStatistics = this.handoverData.employeeStatistics,
// this.greaseGunStatistics = this.handoverData.greaseGunStatistics,
// this.oilNumberStatistics = this.handoverData.oilNumberStatistics,
// this.orderSummary = this.handoverData.orderSummary,
// this.paymentAggregation = this.handoverData.paymentAggregation,
// this.returnedToTheAccount = this.handoverData.returnedToTheAccount,
// console.log("this.handoverList",this.handoverList)
// })
},
getindex(index){
this.tabindex = index
},
getList(){
this.dateRange = []
if (this.beginTime && this.endTime) {
this.dateRange.push(this.beginTime.toLocaleDateString())
this.dateRange.push(this.endTime.toLocaleDateString())
}
getHandoverListApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
this.dataList = res.data.records
this.total = res.data.total
})
},
getStatistics() {
getStatisticsApi().then(res=>{
this.statisticsForm = res.data
})
console.log("123123123",this.statisticsForm)
},
//
getZhzt() {
getDicts("zhzt").then(response => {
this.zhztList = response.data;
})
},
getStatus() {
getDicts("handover").then(response => {
this.shiftHandoverList = response.data;
})
},
//
async shift() {
let msg = '交班并退出系统, 是否继续?'
let flag = false
if (this.handoverList && this.handoverList.baseInfo && this.handoverList.baseInfo.handoverOut == 'jbtc') {
flag = true
} else {
msg = '确定交班?'
}
this.$confirm(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let recordData = this.handoverList
let handoverRecord = {
startTime: this.handoverList.baseInfo.startTime,
recordData: JSON.stringify(recordData),
type: 0,
status: this.handoverList.baseInfo.handoverType,
staffId: this.staff.staffId
}
addHandoverApi(handoverRecord).then(res => {
if (flag) {
this.clean()
// removeUserId();
// this.$store.dispatch('LogOut').then(() => {
// location.href = '/';
// })
}
this.getHandover();
})
})
},
handleUpdate(){},
handleQuery(){
this.getList();
this.getHandover();
},
getStaffList() {
listStaff(this.addDateRange({ page: 1,
pageSize: 10000})).then(response => {
this.staffList = response.data.records;
}
);
},
resetQuery(){
this.queryParams = {
giftName: '',
status: '',
mobile: '',
orderNumber: '',
page:1,
pageSize:10
},
this.dateRange = []
this.beginTime = "";
this.endTime = ""
this.getList();
},
printLocally(data) {
printLocallyApi(data).then(res=>{
})
},
handleDetail(data){
this.openDetail = true
this.recordData = data.recordData;
// JSON.parse(this.recordData )
console.log("data.recordData;",this.recordData)
},
goToAbout() {
this.$router.push({
path:'/Handover',
query:{
id:9
}
});
},
billingDetails() {
let count = [];
if (this.billingDetails) {
return this.billingDetails
}
return count;
},
calculateThePaymentMethod(payType) {
switch (payType) {
case 'ALIPAY':
return '支付宝'
break;
case 'WECHAT':
return '微信'
break;
case 'UNIONPAY':
return '银联二维码'
break;
case 'CASH':
return '现金'
break;
case 'balance':
return '余额'
break;
case 'oilCard':
return '油卡'
break;
}
return '未知'
},
}
}
</script>
<style scoped lang="scss">
.app-containers {
width: 100%;
height: 100vh;
background: #f6f8f9;
box-sizing: border-box;
padding-bottom: 20px;
}
.tab-box{
width: 100%;
background: #fff;
display: flex;
box-sizing: border-box;
padding: 0px 25px;
margin-bottom: 25px;
}
.box_{
height: 100%;
border-bottom: 2px solid #fe9554;
}
.box {
padding: 10px;
height: 80px;
width: 150px;
margin-right: 0px;
background-color: rgba(204, 204, 204, 0.3);
border-radius: 8px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: left;
text-align: left;
}
.box-card{
width: 98%;
margin: 0 auto;
margin-bottom: 15px;
}
.font-chinese {
font-size: 15px;
font-family:Microsoft YaHei;
font-weight: bold;
line-height:1.5
}
.font-number {
font-size: 20px;
font-family: PingFang SC,sans-serif;
font-weight: bold;
line-height:1.3
}
.table-box{
width: 100%;
}
.flex-container1 {
display: flex;
justify-content: flex-end;
align-items: center;
flex-wrap: nowrap; /* 确保不换行 */
width: 100%; /* 让父容器占满可用宽度 */
}
.el-form--inline .el-form-item {
margin-right: 44px;
}
.tab-box{
width: 100%;
height: 40px;
background: #fff;
display: flex;
box-sizing: border-box;
margin-bottom: 25px;
}
.tab_{
width: 75px;
height: 100%;
//border-bottom: 2px solid #FF770F;
display: flex;
font-weight: 500;
font-size: 14px;
color: #999999;
align-items: center;
justify-content: center;
margin-left: 50px;
cursor: pointer;
}
.active{
border-bottom: 2px solid #FF770F !important;
color: #FF770F !important;
}
.title_{
text-align: center;
font-weight: 600;
font-size: 16px;
color: #333333;
}
.d-s-b{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-weight: 400;
font-size: 14px;
color: #333333;
margin: 20px auto;
}
.xxing{
width: 100%;
border-bottom: 1px solid #EEEEEE;
}
.for-box{
width: 100%;
margin: 20px auto;
}
.for-title{
display: flex;
align-items: center;
justify-content: center;
font-weight: 600;
font-size: 16px;
color: #333333;
}
.x-{
width: 100px;
border-bottom: 1px solid #EEEEEE;
margin: 0 15px;
}
.f-size{
width: 33%;
text-align: center;
font-weight: 600;
font-size: 16px;
color: #333333;
}
.s-size{
width: 33%;
text-align: center;
}
.l-size{
width: 33%;
text-align: left;
}
.r-size{
width: 33%;
text-align: right;
}
.bottom-{
width: 98%;
}
.table-boxs{
border-radius: 8px;
width: 98%;
background: #fff;
margin: 25px auto;
box-sizing: border-box;
padding: 15px;
}
</style>

View File

@ -1,7 +1,7 @@
<!--发票-->
<template>
<div class="app-center">
<el-button style="float: left ;margin-left: 5px" size="mini" type="primary" @click="oilOrderReport()" plain>打印交班单</el-button>
<el-button style="float: left ;margin-left: 5px" size="mini" type="primary" @click="printLocally()" plain>打印交班单</el-button>
<div id="report" ref="report" class="box-center">
<div class="box-title">
@ -174,7 +174,6 @@
<div>支付方式</div>
<div>金额</div>
</div>
<!-- {{paymentAggregation('oil') }}-->
<div class="input-box" v-for="item in paymentAggregation('oil')">
<div>{{calculateThePaymentMethod(item.payType)}}</div>
<div>{{item.paidAmount}}</div>
@ -372,10 +371,9 @@
</template>
<script>
import {printLocallyApi,addHandoverApis} from "@/api/cashier/handover";
import { printGetHandoverReport} from "@/api/handover/handover";
import BigNumber from "bignumber.js";
import {getLodop} from "@/api/LodopFuncs";
import {printGetHandoverReport} from "@/api/print";
export default {
name: "HandoverOnly",
@ -390,16 +388,23 @@ import {printGetHandoverReport} from "@/api/print";
created() {
console.log("12312231",this.recordData)
this.handoverList = JSON.parse(this.recordData)
// this.getHandover();
// this.handoverList = JSON.parse(this.recordData)
this.getHandover();
},
methods: {
oilOrderReport () {
printLocally() {
printGetHandoverReport(this.handoverList).then(res=>{
})
},
printLocally() {
getHandover() {
getHandoverApi().then(res=>{
this.handoverList = res.data;
console.log("this.handoverList",this.handoverList)
})
},
printLocally1() {
// const printHTML = document.querySelector('#report').innerHTML
// //
// window.document.body.innerHTML = printHTML
@ -480,12 +485,6 @@ import {printGetHandoverReport} from "@/api/print";
// console.log("preview",preview);
LODOP.PRINT();
},
// getHandover() {
// getHandoverApi().then(res=>{
// this.handoverList = res.data;
// console.log("this.handoverList",this.handoverList)
// })
// },
getList(){
getHandoverListApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{

View File

@ -0,0 +1,282 @@
<script>
import {listStaff,getHandoverListApi} from "@/api/handover/handover";
import HandoverDetailsInfo from "@/views/cashier/NewComponents/HandoverDetailsInfo.vue";
export default {
name: "HandoverRecord",
components: {HandoverDetailsInfo},
data() {
return {
//
openSeeDetails:false,
//
openTransactionDetail:false,
//
openGoodsSum:false,
tabs:[
"交接班",
"交班记录"
],
value:'',
tabindex:0,
openDetail:false,
dataForm:{},
dataList:[],
recordData:'',
zhztList:'',
shiftHandoverList:'',
tableData: [{
date: '--',
}],
queryParams: {
status: '',
type: '',
page:null,
pageSize:null
},
loading: false,
dateRange: [new Date(),new Date()],
beginTime:new Date(),
endTime:new Date(),
defaultSort: {prop: 'createTime', order: 'descending'},
total: 0,
staffList:[],
oilNumberStatistics:[],
goodsNumberStatistics:[],
IntegerNumberStatistics:[],
}
},
created() {
this.getList();
},
methods: {
getList() {
this.dateRange = []
if (this.beginTime && this.endTime) {
this.dateRange.push(this.beginTime.toLocaleDateString())
this.dateRange.push(this.endTime.toLocaleDateString())
}
getHandoverListApi(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
this.dataList = res.data.records
this.total = res.data.total
this.dataList.forEach(res=>{
let data = JSON.parse(res.recordData)
let orderSummary = data.orderSummary
res.oilOrder = orderSummary.oilOrder?orderSummary.oilOrder:'0' //
res.allDis = orderSummary.allDis?orderSummary.allDis :'0' //
res.allMoney = orderSummary.allMoney?orderSummary.allMoney :'0' //
res.oilRefund = orderSummary.oilRefund?orderSummary.oilRefund :'0' // 退
})
})
},
getHandoverData(data) {
JSON.parse(this.data)
},
handleQuery(){
this.getList();
},
resetQuery(){
this.queryParams = {
giftName: '',
status: '',
mobile: '',
orderNumber: '',
page:1,
pageSize:10
},
this.dateRange = []
this.beginTime = "";
this.endTime = ""
this.getList();
},
getStaffList() {
listStaff(this.addDateRange({ page: 1,
pageSize: 10000})).then(response => {
this.staffList = response.data.records;
}
);
},
transactionDetailMethod2(data) {
console.log("transactionDetailMethod2",data)
this.openGoodsSum = true
let info = JSON.parse(data.recordData);
this.oilNumberStatistics = info.oilNumberStatistics;
this.goodsNumberStatistics = info.goodsNumberStatistics;
this.IntegerNumberStatistics = info.IntegerNumberStatistics;
console.in
console.log("data",data)
},
openSeeDetailsMethods(data) {
this.openSeeDetails = true;
console.log("data")
this.recordData = data.recordData
},
transactionDetailMethod(data) {
console.log("transactionDetailMethod",data)
this.$router.push({
name: 'handover-info',
params: {
staffId : data.staffId,
btime : data.startTime,
etime : data.endTime,
}
// PinventoryId: data.id,
// PorderNumber: data.orderNumber,
// PorderDate: data.orderDate,
// PapprovalStatus: data.approvalStatus,
// PcreataByName: data.createByName
// },
});
}
}
}
</script>
<template>
<div class="">
<div class="table-boxs">
<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 staffList"
:key="option.id"
:label="option.realName"
:value="option.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="">
<el-date-picker
v-model="beginTime"
style="width: 140px"
type="date"
placeholder="交易开始日期">
</el-date-picker>
<el-date-picker
v-model="endTime"
style="width: 140px"
type="date"
placeholder="交易结束日期">
</el-date-picker>
</el-form-item>
<el-form-item class="flex-container" style="float: right">
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table :data="dataList" border style="width: 100%">
<el-table-column type="index" width="50" align="center" label="序号"/>
<el-table-column width="100" align="center" prop="staffName" label="交班人员"></el-table-column>
<el-table-column width="120" align="center" prop="status" label="交班方式"></el-table-column>
<el-table-column align="center" prop="startTime" label="开始时间"></el-table-column>
<el-table-column align="center" prop="endTime" label="结束时间"></el-table-column>
<el-table-column align="center" prop="oilOrder" label="订单金额" width="80"></el-table-column>
<el-table-column align="center" prop="allDis" label="优惠金额" width="80"></el-table-column>
<el-table-column align="center" prop="allMoney" label="实收金额" width="80"></el-table-column>
<el-table-column align="center" prop="oilRefund" label="退款金额" width="80"></el-table-column>
<el-table-column align="center" prop="createTime" label="创建时间"></el-table-column>
<el-table-column label="操作" align="center" fixed='right'>
<template slot-scope="scope">
<el-button size="mini" type="text" @click="openSeeDetailsMethods(scope.row)">查看详情</el-button>
<el-button size="mini" type="text" @click="transactionDetailMethod(scope.row)">交易明细</el-button>
<el-button size="mini" type="text" @click="transactionDetailMethod2(scope.row)">商品汇总</el-button>
<el-button size="mini" type="text">打印</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
<el-dialog title="查看详情" :visible.sync="openSeeDetails" width="600px" append-to-body :close-on-click-modal="false">
<HandoverDetailsInfo :recordData="recordData"></HandoverDetailsInfo>
</el-dialog>
<!-- <el-dialog title="交易明细" :visible.sync="openTransactionDetail" width="600px" append-to-body :close-on-click-modal="false">-->
<!-- </el-dialog>-->
<el-dialog title="商品汇总" :visible.sync="openGoodsSum" width="600px" append-to-body :close-on-click-modal="false">
<div>
<div>油品交易信息</div>
<div>
<el-table :data="oilNumberStatistics" style="width: 100%" border>
<el-table-column align="center" prop="oilName" label="油品油号" ></el-table-column>
<el-table-column align="center" prop="oilNum" label="销售数量" ></el-table-column>
<el-table-column align="center" prop="orderAmount" label="订单金额" ></el-table-column>
<el-table-column align="center" prop="paidAmount" label="实收金额" ></el-table-column>
</el-table>
</div>
</div>
<div>
<div>便利店交易信息</div>
<div>
<el-table :data="goodsNumberStatistics" style="width: 100%" border>
<el-table-column align="center" prop="goodsName" label="商品名称" ></el-table-column>
<el-table-column align="center" prop="goodsNumber" label="销售数量" ></el-table-column>
<el-table-column align="center" prop="goodsAmount" label="订单金额" ></el-table-column>
<el-table-column align="center" prop="amount" label="实收金额" ></el-table-column>
</el-table>
</div>
</div>
<div>
<div >积分商城兑换信息</div>
<div>
<el-table :data="IntegerNumberStatistics" style="width: 100%" border>
<el-table-column align="center" prop="giftName" label="商品名称" ></el-table-column>
<el-table-column align="center" prop="exchangeQuantity" label="兑换数量" ></el-table-column>
<el-table-column align="center" prop="integrals" label="消耗积分" ></el-table-column>
<el-table-column align="center" prop="amount" label="实收金额" ></el-table-column>
</el-table>
</div>
</div>
</el-dialog>
</div>
</template>
<style scoped lang="scss">
.app-containers {
width: 100%;
height: 100vh;
background: #f6f8f9;
box-sizing: border-box;
padding-bottom: 20px;
}
.tab-box{
width: 100%;
background: #fff;
display: flex;
box-sizing: border-box;
padding: 0px 25px;
margin-bottom: 25px;
}
.table-boxs{
border-radius: 8px;
width: 98%;
background: #fff;
margin: 25px auto;
box-sizing: border-box;
padding: 15px;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,130 @@
<template>
<!-- 充值对话框 -->
<el-dialog class="common-dialog" title="余额充值/扣减" :visible.sync="showDialog" width="700px" @close="cancel" destroy-on-close>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<el-col :span="24">
<el-form-item label="会员信息:">
<span>{{ memberInfo.name }}ID:{{ memberInfo.id }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="可用余额:" prop="balance">
<span>{{ memberInfo.balance.toFixed(2) }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="变更类型:" prop="type">
<el-radio-group v-model="form.type">
<el-radio key="1" label="1" value="1">增加</el-radio>
<el-radio key="2" label="2" value="2">扣减</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="变更金额:" prop="amount">
<el-input v-model="form.amount" placeholder="请输入变更金额" style="width: 200px" maxlength="100" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item class="recharge-item" prop="remark" label="备注信息:">
<el-input v-model="form.remark" type="textarea" rows="2" placeholder="请输入备注信息" maxlength="255" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { doRecharge } from "@/api/balance";
import { getMemberInfo } from "@/api/member";
export default {
name: "balanceRecharge",
props: {
showDialog:{
type:[Boolean],
default:()=>false
},
userId:{
type:[String],
default:()=> ''
}
},
data() {
return {
//
loading: false,
memberInfo: { name: '', id: '', balance: 0 },
//
form: { type: '1', amount: '', userId: '' },
//
rules: {
userId: [
{ required: true, message: "请选择会员", trigger: "blur" },
],
amount: [
{ required: true, message: "金额不能为空", trigger: "blur" },
{ min: 1, max: 6, message: '请在1至99999元范围内输入', trigger: 'blur' },
{ pattern: /((^[1-9]\d*)|^0)(\.\d{0,2}){0,1}$/, message: `请输入正确的金额`, trigger: 'blur' }
]
}
};
},
watch: {
showDialog(value) {
if (value) {
this.getMemberInfo()
}
}
},
methods: {
//
getMemberInfo() {
this.loading = true;
getMemberInfo(this.userId).then(response => {
this.form.userId = response.data.memberInfo.id;
this.memberInfo = response.data.memberInfo;
this.loading = false;
}
);
},
//
cancel() {
this.$emit('closeDialog','balance');
},
//
reset() {
this.form.userId = '';
this.form.type = '1';
this.form.amount = '';
this.form.remark = '';
this.memberInfo = { name: '', id: '', balance: 0 };
},
//
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
doRecharge(this.form).then(response => {
this.$alert("余额操作成功!");
this.$emit('closeDialog','balance');
this.reset();
});
}
});
}
}
};
</script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -0,0 +1,129 @@
<template>
<!-- 积分变更对话框 -->
<el-dialog title="积分变更" :visible.sync="showDialog" class="common-dialog" width="700px" @close="cancel" destroy-on-close>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<el-col :span="24">
<el-form-item label="会员信息:">
<span>{{ memberInfo.name }}ID:{{ memberInfo.id }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="可用积分:" prop="balance">
<span>{{ memberInfo.point }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="变更类型:" prop="type">
<el-radio-group v-model="form.type">
<el-radio key="1" label="1" value="1">增加</el-radio>
<el-radio key="2" label="2" value="2">扣减</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="变更数量:" prop="amount">
<el-input v-model="form.amount" placeholder="请输入变更数量" style="width: 200px" maxlength="100" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item class="recharge-item" prop="remark" label="备注信息:">
<el-input v-model="form.remark" type="textarea" rows="2" placeholder="请输入备注信息" maxlength="255" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { doRecharge } from "@/api/point";
import { getMemberInfo } from "@/api/member";
export default {
name: "pointRecharge",
props: {
showDialog:{
type:[Boolean],
default:()=>false
},
userId:{
type:[String],
default:()=> ''
}
},
data() {
return {
//
loading: false,
memberInfo: { name: '', id: '', point: 0 },
//
form: { type: '1', amount: '', userId: '' },
//
rules: {
userId: [
{ required: true, message: "请选择会员", trigger: "blur" },
],
amount: [
{ required: true, message: "金额不能为空", trigger: "blur" },
{ pattern: /^[0-9]{1,10}$/, message: `请输入1-10位数字`, trigger: 'blur' }
]
}
};
},
watch: {
showDialog(value) {
if (value) {
this.getMemberInfo()
}
}
},
methods: {
//
getMemberInfo() {
this.loading = true;
getMemberInfo(this.userId).then(response => {
this.form.userId = response.data.memberInfo.id;
this.memberInfo = response.data.memberInfo;
this.loading = false;
}
);
},
//
cancel() {
this.$emit('closeDialog','point');
},
//
reset() {
this.form.userId = '';
this.form.type = '1';
this.form.amount = '';
this.form.remark = '';
this.memberInfo = { name: '', id: '', point: 0 };
},
//
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
doRecharge(this.form).then(response => {
this.$alert("积分操作成功!");
this.$emit('closeDialog','point');
this.reset();
});
}
});
}
}
};
</script>

View File

@ -131,47 +131,7 @@
<div class="num-size">{{point}}</div>
<img class="r-bot-img" src="./imgs/hy-5.png" alt="">
</div>
<!-- <el-row :gutter="20">-->
<!-- <el-col :span="4">-->
<!-- <div class="sta">-->
<!-- <el-statistic-->
<!-- group-separator=","-->
<!-- :value="total"-->
<!-- title="会员总数"-->
<!-- ></el-statistic>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="4">-->
<!-- <div class="sta">-->
<!-- <el-statistic title="今日新增/昨日新增">-->
<!-- <template slot="formatter">-->
<!-- {{ addNum }}/{{ yesterdayAddNum }}-->
<!-- </template>-->
<!-- </el-statistic>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="4">-->
<!-- <div class="sta">-->
<!-- <el-statistic-->
<!-- group-separator=","-->
<!-- :precision="2"-->
<!-- :value="balance"-->
<!-- title="储值总余额"-->
<!-- ></el-statistic>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="4">-->
<!-- <div class="sta">-->
<!-- <el-statistic-->
<!-- group-separator=","-->
<!-- :value="point"-->
<!-- title="积分总余额"-->
<!-- ></el-statistic>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- </el-row>-->
</div>
</template>