Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
9126fc46aa
@ -46,4 +46,46 @@ export function deleteList(id) {
|
||||
|
||||
})
|
||||
}
|
||||
// 下载
|
||||
export function getdownload(query) {
|
||||
return request({
|
||||
url: 'business/marketingActivity/cardGift/export',
|
||||
method: 'get',
|
||||
|
||||
})
|
||||
}
|
||||
// 查询条件
|
||||
export function getsoucondition() {
|
||||
return request({
|
||||
url: 'business/marketingActivity/cardGift',
|
||||
method: 'get',
|
||||
|
||||
})
|
||||
}
|
||||
// 查询统计
|
||||
export function getselectGiftValue() {
|
||||
return request({
|
||||
url: 'business/marketingActivity/cardGift/selectGiftValue',
|
||||
method: 'get',
|
||||
|
||||
})
|
||||
}
|
||||
// 统计
|
||||
export function getqb() {
|
||||
return request({
|
||||
url: 'business/marketingActivity/cardGift/countGiftValue',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
export function getyi() {
|
||||
return request({
|
||||
url: 'business/marketingActivity/cardGift/countGiftValue?useStatus=1',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
export function getwei() {
|
||||
return request({
|
||||
url: 'business/marketingActivity/cardGift/countGiftValue?useStatus=0',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
@ -49,3 +49,11 @@ export function deleteList(id) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getoilnum(id) {
|
||||
return request({
|
||||
url: 'petrolStationManagement/oilNumber/getOilPrice/'+id,
|
||||
method: 'get',
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -315,9 +315,9 @@
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
.el-upload {
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
line-height: 150px;
|
||||
//width: 150px;
|
||||
//height: 150px;
|
||||
//line-height: 150px;
|
||||
}
|
||||
.mini-btn {
|
||||
padding: 4px 8px 4px 8px;
|
||||
|
@ -110,52 +110,52 @@
|
||||
}
|
||||
|
||||
.hideSidebar {
|
||||
.sidebar-container {
|
||||
width: 54px !important;
|
||||
}
|
||||
|
||||
.main-container {
|
||||
margin-left: 54px;
|
||||
}
|
||||
|
||||
.submenu-title-noDropdown {
|
||||
padding: 0 !important;
|
||||
position: relative;
|
||||
.el-tooltip {
|
||||
padding: 0 !important;
|
||||
|
||||
.svg-icon {
|
||||
margin-left: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-submenu {
|
||||
overflow: hidden;
|
||||
|
||||
&>.el-submenu__title {
|
||||
padding: 0 !important;
|
||||
|
||||
.svg-icon {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.el-menu--collapse {
|
||||
.el-submenu {
|
||||
&>.el-submenu__title {
|
||||
&>span {
|
||||
height: 0;
|
||||
width: 0;
|
||||
overflow: hidden;
|
||||
visibility: hidden;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//.sidebar-container {
|
||||
// width: 54px !important;
|
||||
//}
|
||||
//
|
||||
//.main-container {
|
||||
// margin-left: 54px;
|
||||
//}
|
||||
//
|
||||
//.submenu-title-noDropdown {
|
||||
// padding: 0 !important;
|
||||
// position: relative;
|
||||
// .el-tooltip {
|
||||
// padding: 0 !important;
|
||||
//
|
||||
// .svg-icon {
|
||||
// margin-left: 20px;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//.el-submenu {
|
||||
// overflow: hidden;
|
||||
//
|
||||
// &>.el-submenu__title {
|
||||
// padding: 0 !important;
|
||||
//
|
||||
// .svg-icon {
|
||||
// margin-left: 20px;
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//.el-menu--collapse {
|
||||
// .el-submenu {
|
||||
// &>.el-submenu__title {
|
||||
// &>span {
|
||||
// height: 0;
|
||||
// width: 0;
|
||||
// overflow: hidden;
|
||||
// visibility: hidden;
|
||||
// display: inline-block;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
.el-menu--collapse .el-menu .el-submenu {
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<div class="right-menu">
|
||||
<template v-if="device!=='mobile'">
|
||||
<span v-if="day>=0" class="right-menu-item hover-effect" style="color: #ff1f1f; margin-right: 10px">油站有效期还剩{{day}}天</span>
|
||||
<span v-if="day>=0 && day<11" class="right-menu-item hover-effect" style="color: #ff1f1f; margin-right: 10px">油站有效期还剩{{day}}天</span>
|
||||
|
||||
<search id="header-search" class="right-menu-item" />
|
||||
<ScreenData class="right-menu-item hover-effect" style="font-size: 24px"></ScreenData>
|
||||
|
@ -2,8 +2,8 @@
|
||||
<div class="sidebar-logo-container" :class="{'collapse':collapse}" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
|
||||
<transition name="sidebarLogoFade">
|
||||
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
|
||||
<img v-if="logo" :src="logo" class="sidebar-logo" />
|
||||
<h1 v-else class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1>
|
||||
<img :src="logo" class="sidebar-logo" />
|
||||
<h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1>
|
||||
<!-- <h1 v-else class="sidebar-title" style="color: #00ff80" >{{ title }} </h1>-->
|
||||
</router-link>
|
||||
<router-link v-else key="expand" class="sidebar-logo-link" to="/">
|
||||
|
@ -3,7 +3,14 @@
|
||||
<!-- 礼品卡-->
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<div class="top-hang">
|
||||
<el-input v-model="queryParams.number" clearable style="width: 20%;margin-right: 10px" placeholder="礼品卡号 "></el-input>
|
||||
<el-select v-model="queryParams.cardAmount" style="margin-right: 10px" placeholder="请选择面值">
|
||||
<el-option
|
||||
v-for="item in jglist"
|
||||
:key="item.cardAmount"
|
||||
:label="item.cardAmount"
|
||||
:value="item.cardAmount">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select v-model="queryParams.activateStatus" style="margin-right: 10px" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in option"
|
||||
@ -21,31 +28,90 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-button type="primary" icon="el-icon-search" @click="getlist">查询</el-button>
|
||||
<div class="butoon">
|
||||
<a style=";color: #00afff"
|
||||
href="/dev-api/business/marketingActivity/cardGift/export"> 下载模板 </a >
|
||||
</div>
|
||||
<div >
|
||||
<el-upload
|
||||
|
||||
class=""
|
||||
v-loading="uploading"
|
||||
action="/dev-api/business/marketingActivity/cardGift/exchangeImport"
|
||||
:headers="headers"
|
||||
:limit="1"
|
||||
:on-change="handleChange"
|
||||
style="margin-left: 15px"
|
||||
:file-list="fileList">
|
||||
<el-button size="small" type="primary" icon="el-icon-upload">点击上传</el-button>
|
||||
</el-upload>
|
||||
</div>
|
||||
|
||||
|
||||
</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="tj-num">
|
||||
面值:{{item.cardAmount || 0}}
|
||||
</div>
|
||||
<div class="tj-num">
|
||||
总发卡金额:{{item.total || 0}}
|
||||
</div>
|
||||
<div class="tj-num">
|
||||
总数量:{{item.count || 0}}
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</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-num">
|
||||
面值:{{item.cardAmount || 0}}
|
||||
</div>
|
||||
<div class="tj-num">
|
||||
总发卡金额:{{item.total || 0}}
|
||||
</div>
|
||||
<div class="tj-num">
|
||||
总数量:{{item.count || 0}}
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</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-num">
|
||||
面值:{{item.cardAmount || 0}}
|
||||
</div>
|
||||
<div class="tj-num">
|
||||
总发卡金额:{{item.total || 0}}
|
||||
</div>
|
||||
<div class="tj-num">
|
||||
总数量:{{item.count || 0}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<el-card class="kar" >
|
||||
<div class="tj-num">{{tjdata.tatol || 0}}</div>
|
||||
<div class="tj-siez">礼品卡总数</div>
|
||||
</el-card>
|
||||
<el-card class="kar" >
|
||||
<div class="tj-num">{{tjdata.alreadyTatal || 0}}</div>
|
||||
<div class="tj-siez">已激活</div>
|
||||
</el-card>
|
||||
<el-card class="kar" >
|
||||
<div class="tj-num">{{tjdata.total_amount || 0}}</div>
|
||||
<div class="tj-siez">总额度</div>
|
||||
</el-card>
|
||||
<el-card class="kar" >
|
||||
<div class="tj-num">{{tjdata.remaining_amount || 0}}</div>
|
||||
<div class="tj-siez">剩余额度</div>
|
||||
</el-card>
|
||||
<!-- <el-card class="kar" style="cursor: pointer;height: 106px " >
|
||||
|
||||
<div class="tj-num"> <el-tag v-if="tjdata.exchangeStatus == 0" @click="putStatus(1)">启用</el-tag> <el-tag type="info" v-if="tjdata.exchangeStatus == 1 " @click="putStatus(0)">禁用</el-tag> </div>
|
||||
<div class="tj-siez">兑换功能状态</div>
|
||||
</el-card>-->
|
||||
</div>
|
||||
|
||||
<el-card style="margin-bottom: 20px">
|
||||
@ -60,34 +126,25 @@
|
||||
label="ID"
|
||||
width="80">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="batchNumber"
|
||||
label="批次号"
|
||||
width="220">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="cardAmount"
|
||||
label="面值金额"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="number"
|
||||
label="礼品卡卡号"
|
||||
label="电子礼品卡号"
|
||||
width="210">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="cardPassword"
|
||||
label="兑换卡密"
|
||||
prop="cardAmount"
|
||||
label="面值"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="activateStatus"
|
||||
label="激活状态"
|
||||
width="120">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.activateStatus == 1"> <el-tag type="success">已使用</el-tag> </span>
|
||||
<span v-if="scope.row.activateStatus != 1"> <el-tag type="info">未激活</el-tag> </span>
|
||||
</template>
|
||||
prop="effectiveTimeStart"
|
||||
label="使用时间"
|
||||
width="220">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="sailTime"
|
||||
label="售出时间"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="status"
|
||||
@ -106,12 +163,32 @@
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
label="创建时间"
|
||||
width="220"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="effectiveTimeStart"
|
||||
label="有效期"
|
||||
width="220"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
|
||||
<div>{{scope.row.effectiveTimeStart}}</div>- <div>{{scope.row.effectiveTimeEnd}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="createBy"
|
||||
label="操作员"
|
||||
width="220"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="remark"
|
||||
label="备注信息"
|
||||
@ -126,6 +203,7 @@
|
||||
@pagination="getlist"
|
||||
/>
|
||||
</el-card>
|
||||
|
||||
<el-dialog
|
||||
title="生产礼品卡"
|
||||
:visible.sync="centerDialogVisible"
|
||||
@ -161,11 +239,34 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getList,getListtj,addList,eitList,deleteList,oilDepotConfiguration } from "@/api/EventMarketing/giftBlock";
|
||||
import {
|
||||
getList,
|
||||
getListtj,
|
||||
addList,
|
||||
eitList,
|
||||
deleteList,
|
||||
oilDepotConfiguration,
|
||||
getdownload,
|
||||
getselectGiftValue,
|
||||
|
||||
getyi,
|
||||
getwei,
|
||||
getqb
|
||||
} from "@/api/EventMarketing/giftBlock";
|
||||
import {getToken} from "@/utils/auth";
|
||||
export default {
|
||||
name: 'index',
|
||||
data() {
|
||||
return {
|
||||
jglist:[],
|
||||
onelist:[],
|
||||
twolist:[],
|
||||
threelist:[],
|
||||
headers: {
|
||||
'Access-Token': getToken(),
|
||||
},
|
||||
uploading: false,
|
||||
fileList: [],
|
||||
labelPosition:'left',
|
||||
queryParams: {
|
||||
number:'',
|
||||
@ -252,6 +353,20 @@
|
||||
|
||||
},
|
||||
methods:{
|
||||
|
||||
// 下载
|
||||
handleChange(file, fileList) {
|
||||
this.uploading = true;
|
||||
console.log(file)
|
||||
if(file.status === 'success'){
|
||||
this.uploading = false;
|
||||
this.openUpload = false;
|
||||
this.openUser = false;
|
||||
|
||||
this.fileList.splice(0,1)
|
||||
this.result = file.response.data
|
||||
}
|
||||
},
|
||||
putStatus(id){
|
||||
let data = {
|
||||
id:1,
|
||||
@ -266,6 +381,21 @@
|
||||
|
||||
},
|
||||
getlist(){
|
||||
getselectGiftValue().then(res=>{
|
||||
console.log(res)
|
||||
this.jglist = res.data
|
||||
})
|
||||
getqb().then(res=>{
|
||||
|
||||
this.onelist = res.data
|
||||
console.log(this.onelist)
|
||||
})
|
||||
getyi().then(res=>{
|
||||
this.twolist = res.data
|
||||
})
|
||||
getwei().then(res=>{
|
||||
this.threelist = res.data
|
||||
})
|
||||
this.queryParams.pageNo=this.pageNo
|
||||
this.queryParams.pageSize=this.pageSize
|
||||
getList(this.queryParams).then(res=>{
|
||||
@ -322,13 +452,20 @@
|
||||
.tj{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.kar{
|
||||
width: 25%;
|
||||
margin-right: 10px;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
margin-bottom: 10px;
|
||||
|
||||
}
|
||||
.ds{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.tj-num{
|
||||
margin: 5px auto;
|
||||
@ -347,4 +484,15 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.butoon{
|
||||
box-sizing: border-box;
|
||||
padding: 6px 10px;
|
||||
border: 1px solid #409eff;
|
||||
border-radius: 6px;
|
||||
font-size: 16px;
|
||||
margin-left: 15px;
|
||||
}
|
||||
.sshi{
|
||||
width: 33%;
|
||||
}
|
||||
</style>
|
||||
|
@ -188,14 +188,14 @@
|
||||
<template slot="append">元/升</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="充值金额" prop="rechargeBalance">
|
||||
<el-form-item label="满足金额" prop="rechargeBalance">
|
||||
<el-input v-model="ruleForm.rechargeBalance" min="1">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所得升数" prop="incomeLitres">
|
||||
<el-form-item label="换算升数" prop="incomeLitres">
|
||||
<el-input v-model="ruleForm.incomeLitres.toFixed(2)">
|
||||
<template slot="append">升</template>
|
||||
<template slot="append">L</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="赠送积分" prop="points">
|
||||
@ -255,7 +255,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getList,oilName,addList,eitList,getById} from "@/api/EventMarketing/oilBlock";
|
||||
import { getList,oilName,addList,eitList,getById,getoilnum} from "@/api/EventMarketing/oilBlock";
|
||||
export default {
|
||||
dicts: ['oil_type'],
|
||||
name: 'index',
|
||||
@ -366,16 +366,15 @@
|
||||
},
|
||||
|
||||
methods:{
|
||||
//
|
||||
//
|
||||
radiovalue(lable){
|
||||
|
||||
this.oilList = []
|
||||
oilName(this.queryParams.type).then(res=>{
|
||||
this.oilList = res.data.records
|
||||
console.log('我的油站' ,res)
|
||||
})
|
||||
this.getlist()
|
||||
|
||||
},
|
||||
getlist(){
|
||||
this.queryParams.pageNo=this.pageNo
|
||||
|
@ -181,11 +181,11 @@
|
||||
<el-form-item label="商品条码" prop="goodsNo">
|
||||
<el-input v-model="form.goodsNo"
|
||||
@keydown.enter.native="getGoods(form)"
|
||||
:disabled="title == '编辑商品'"
|
||||
:disabled="title == '商品维护'"
|
||||
v-focus
|
||||
clearable
|
||||
placeholder="商品的条码信息">
|
||||
<el-button slot="append" @click="getGoods(form)">查询</el-button>
|
||||
<!-- <el-button slot="append" @click="getGoods(form)">查询</el-button>-->
|
||||
</el-input>
|
||||
<!-- <div style="text-align: right;color: grey;font-size: 12px">-->
|
||||
<!-- 商品无条码?您可以<span style="color: #00afff" @click="createGoodNo">生成条码</span>-->
|
||||
@ -319,7 +319,7 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio-group v-model="form.status" :disabled="form.stock==0">
|
||||
<!-- <el-radio v-for="dict in dict.type.zhzt" :label="dict.value">{{ dict.label }}</el-radio>-->
|
||||
<el-radio label="qy" value="qy">上架</el-radio>
|
||||
<el-radio label="jy" value="jy">下架</el-radio>
|
||||
@ -474,7 +474,6 @@ export default {
|
||||
results = [];
|
||||
let falg = false;
|
||||
_this.supplierList.forEach(item => {
|
||||
console.log(item)
|
||||
if(item.name.includes(queryString)){
|
||||
results.push(item)
|
||||
falg = true
|
||||
@ -498,6 +497,7 @@ export default {
|
||||
// console.log(res)
|
||||
if (res.data==1){
|
||||
this.$modal.msgSuccess("已为您自动添加此供应商")
|
||||
this.supplier = val;
|
||||
this.getSuppilers(val)
|
||||
}
|
||||
})
|
||||
@ -697,7 +697,7 @@ export default {
|
||||
// this.cvsGoodId = response.data.cvsGoodId
|
||||
this.open = true;
|
||||
this.isAdd = true;
|
||||
this.title = "编辑商品";
|
||||
this.title = "商品维护";
|
||||
});
|
||||
},
|
||||
// 删除按钮操作
|
||||
|
@ -241,7 +241,7 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="form1.status">
|
||||
<el-radio-group v-model="form1.status" disabled="">
|
||||
<!-- <el-radio v-for="dict in dict.type.zhzt" :label="dict.value">{{ dict.label }}</el-radio>-->
|
||||
<el-radio label="qy" value="qy">上架</el-radio>
|
||||
<el-radio label="jy" value="jy">下架</el-radio>
|
||||
@ -454,7 +454,6 @@ export default {
|
||||
results = [];
|
||||
let falg = false;
|
||||
_this.supplierList.forEach(item => {
|
||||
console.log(item)
|
||||
if(item.name.includes(queryString)){
|
||||
results.push(item)
|
||||
falg = true
|
||||
@ -480,6 +479,7 @@ export default {
|
||||
addSupplier({name:val,remark:"添加商品自动添加"}).then(res => {
|
||||
// console.log(res)
|
||||
if (res.data==1){
|
||||
this.supplier = val;
|
||||
this.$modal.msgSuccess("已为您自动添加此供应商")
|
||||
this.getSuppilers(val)
|
||||
}
|
||||
@ -680,7 +680,7 @@ export default {
|
||||
selectParentById(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "编辑品类";
|
||||
this.title = "修改品类信息";
|
||||
});
|
||||
},
|
||||
// 删除按钮操作
|
||||
@ -725,7 +725,7 @@ export default {
|
||||
}
|
||||
.app-container{
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
height: 100%;
|
||||
background: #f6f8f9;
|
||||
}
|
||||
</style>
|
||||
|
@ -438,7 +438,8 @@ export default {
|
||||
let stock = new BigNumber(data.stock);
|
||||
// 计算库存差异
|
||||
|
||||
let addStocke = inventoryQuantity.plus(damageQuantity)
|
||||
let addStocke = inventoryQuantity.minus(damageQuantity)
|
||||
// let addStocke = inventoryQuantity.plus(damageQuantity)
|
||||
inventoryDiscrepancy = addStocke.minus(stock)
|
||||
// 计算盈亏金额
|
||||
profitLossAmount = inventoryDiscrepancy.multipliedBy(purchasePrice);
|
||||
|
@ -31,16 +31,29 @@
|
||||
/>
|
||||
</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>
|
||||
@ -173,6 +186,8 @@ export default {
|
||||
},
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
beginTime:"",
|
||||
endTime:"",
|
||||
dialogVisible: false,
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
@ -192,6 +207,10 @@ export default {
|
||||
methods: {
|
||||
// 导出信息
|
||||
exportSale(){
|
||||
if (this.beginTime && this.endTime) {
|
||||
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
exportSale(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
const blob = new Blob([response], { type: 'application/json' })
|
||||
this.$download.saveAs(blob,'商品销售统计.xlsx')
|
||||
@ -202,7 +221,11 @@ export default {
|
||||
detail(data){
|
||||
this.table = true;
|
||||
this.queryParam.saleId = data.id;
|
||||
listSaleDetail(this.queryParam).then(response => {
|
||||
if (this.beginTime && this.endTime) {
|
||||
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
listSaleDetail(this.addDateRange(this.queryParam, this.dateRange)).then(response => {
|
||||
this.detailList = response.data.records;
|
||||
this.total1 = response.data.total;
|
||||
this.loading = false;
|
||||
@ -211,6 +234,10 @@ export default {
|
||||
// 获取销售统计列表
|
||||
getList(){
|
||||
this.loading = true;
|
||||
if (this.beginTime && this.endTime) {
|
||||
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
listSale(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
this.list = response.data.records;
|
||||
this.total = response.data.total;
|
||||
@ -229,6 +256,8 @@ export default {
|
||||
// 重置按钮操作
|
||||
resetQuery() {
|
||||
this.dateRange = [];
|
||||
this.beginTime = ""
|
||||
this.endTime = ""
|
||||
this.resetForm("queryForm");
|
||||
this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order);
|
||||
this.handleQuery();
|
||||
|
@ -386,7 +386,7 @@ export default {
|
||||
<style scoped>
|
||||
.app-container{
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
height: 100%;
|
||||
background: #f6f8f9;
|
||||
}
|
||||
.clearfix:before,
|
||||
|
@ -104,7 +104,8 @@
|
||||
<el-table-column label="礼品库存信息" align="center">
|
||||
<el-table-column label="总库存" align="center" prop="totalInventory" width="80px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="clickInventory(scope.row)">{{ scope.row.totalInventory===-1?'无限制': scope.row.totalInventory}}</el-button>
|
||||
<el-button v-if="scope.row.totalInventory" type="text" @click="clickInventory(scope.row)">{{ scope.row.totalInventory===-1?'无限制': scope.row.totalInventory}}</el-button>
|
||||
<el-button v-else type="text" @click="clickInventory(scope.row)">--</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已用" align="center" prop="usedInventory" width="80px">
|
||||
@ -279,7 +280,7 @@
|
||||
<el-col :span="7" v-if="showList.goods">
|
||||
<!-- giftQuantity-->
|
||||
<el-form-item label="商品库存" prop="">
|
||||
<el-input v-model="stock" controls-position="right" :min="1" :max="10" label="" style="width: 202px;" :disabled="true"></el-input>
|
||||
<el-input v-model="stock" controls-position="right" :min="1" :max="10" label="" style="width: 202px;" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -292,7 +293,7 @@
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="礼品库存" prop="totalInventory">
|
||||
<el-input v-model.number="dataForm.totalInventory" placeholder="礼品库存" maxlength="30" style="width: 202px;"/>
|
||||
<el-input :disabled="title === '修改礼品'" v-model.number="dataForm.totalInventory" placeholder="礼品库存" maxlength="30" style="width: 202px;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -506,16 +507,17 @@
|
||||
|
||||
<el-dialog title="库存变更" :visible.sync="openInventory" width="500px" append-to-body :close-on-click-modal="false">
|
||||
<el-form ref="form" :model="inventoryForm" :rules="rulesInventory" label-width="100px">
|
||||
<el-form-item label="当前总库存" prop="totalInventory" >
|
||||
<el-input disabled v-model="inventoryForm.totalInventory" placeholder="" maxlength="30" style="width: 270px;">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="已用库存" prop="usedInventory" >
|
||||
<el-input disabled v-model="inventoryForm.usedInventory" placeholder="" maxlength="30" style="width: 270px;">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="当前总库存" prop="totalInventory" >-->
|
||||
<!-- <el-input disabled v-model="inventoryForm.totalInventory" placeholder="" maxlength="30" style="width: 270px;">-->
|
||||
<!-- </el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="已用库存" prop="usedInventory" >-->
|
||||
<!-- <el-input disabled v-model="inventoryForm.usedInventory" placeholder="" maxlength="30" style="width: 270px;">-->
|
||||
<!-- </el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="可用库存" prop="remainingInventory" >
|
||||
<el-input disabled v-model="inventoryForm.remainingInventory" placeholder="" maxlength="30" style="width: 270px;">
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="变更类型" prop="moneyRatio" >
|
||||
@ -828,6 +830,12 @@ export default {
|
||||
},
|
||||
|
||||
submitInventory: function(){
|
||||
console.log("inventoryForm",this.inventoryForm)
|
||||
|
||||
if (!this.inventoryForm.editInventory || this.inventoryForm.inventoryFlag == 2) {
|
||||
this.$message('请填写更改内容');
|
||||
return
|
||||
}
|
||||
if (this.inventoryForm.inventoryFlag === 1) {
|
||||
this.inventoryForm.editInventory = - this.inventoryForm.editInventory
|
||||
} else if(this.inventoryForm.inventoryFlag === 2) {
|
||||
@ -836,6 +844,8 @@ export default {
|
||||
if (this.inventoryForm.totalInventory == '无限制') {
|
||||
this.inventoryForm.editInventory = this.inventoryForm.editInventory+1
|
||||
}
|
||||
|
||||
console.log("inventoryForm",this.inventoryForm)
|
||||
updateGiftInventoryApi(this.inventoryForm).then(res=>{
|
||||
|
||||
this.getList();
|
||||
|
@ -271,6 +271,7 @@ export default {
|
||||
})
|
||||
},
|
||||
handleAdd(){
|
||||
this.form1 = {}
|
||||
this.title = "新增挂账单位"
|
||||
this.open1 = true
|
||||
},
|
||||
@ -307,7 +308,7 @@ export default {
|
||||
this.open1 = false;
|
||||
this.getList();
|
||||
}else {
|
||||
this.$modal.msgError("挂账单位信息修改失败");
|
||||
this.$modal.msgError("挂账单位信息修改失败,挂账单位名称不可重复");
|
||||
}
|
||||
})
|
||||
}else {
|
||||
@ -317,7 +318,7 @@ export default {
|
||||
this.open1 = false;
|
||||
this.getList();
|
||||
}else {
|
||||
this.$modal.msgError("挂账单位信息创建失败,挂站单位名称不可重复");
|
||||
this.$modal.msgError("挂账单位信息创建失败,挂账单位名称不可重复");
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -69,16 +69,29 @@
|
||||
<!-- </el-select>-->
|
||||
<!-- </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>
|
||||
@ -522,6 +535,8 @@ export default {
|
||||
openPoint: false,
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
beginTime:"",
|
||||
endTime:"",
|
||||
// 默认排序
|
||||
defaultSort: {prop: 'updateTime', order: 'descending'},
|
||||
// 表单参数
|
||||
@ -594,7 +609,13 @@ export default {
|
||||
// 查询列表
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listUser(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
||||
|
||||
let dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
listUser(this.addDateRange(this.queryParams, dateRange)).then( response => {
|
||||
this.list = response.data.records;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
@ -602,7 +623,12 @@ export default {
|
||||
},
|
||||
// 获得统计信息
|
||||
getStatistic(){
|
||||
listStatistic(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
||||
let dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
listStatistic(this.addDateRange(this.queryParams, dateRange)).then( response => {
|
||||
this.addNum = response.data.addNum;
|
||||
this.yesterdayAddNum = response.data.yesterdayAddNum;
|
||||
if (!response.data.balance) {
|
||||
@ -648,6 +674,8 @@ export default {
|
||||
this.queryParams.official = "";
|
||||
this.ifBalance = ""
|
||||
this.storeIds = [];
|
||||
this.beginTime = ""
|
||||
this.endTime = ""
|
||||
this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order);
|
||||
this.handleQuery();
|
||||
},
|
||||
|
@ -444,15 +444,16 @@
|
||||
<div>
|
||||
<el-input v-model="authCode"
|
||||
v-focus ref="getFocus"
|
||||
autofocus
|
||||
autofocus maxlength="10"
|
||||
@input="changeSeekZero"
|
||||
@keydown.enter.native="collection"
|
||||
oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')"
|
||||
placeholder="请输入收款金额">
|
||||
</el-input>
|
||||
</div>
|
||||
<div style="text-align: right;margin: 10px 0">
|
||||
<span>应找零</span>
|
||||
<span style="color: red;font-size: 18px"> ¥{{ seekZero }}</span>
|
||||
<span style="color: red;font-size: 18px"> ¥{{ seekZero.toFixed(2) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
@ -1068,9 +1069,9 @@ export default {
|
||||
// 计算找零金额
|
||||
changeSeekZero(){
|
||||
if (this.flag === 1) {
|
||||
this.seekZero = (this.authCode - this.realyPayBills).toFixed(2)
|
||||
this.seekZero = this.authCode - this.realyPayBills
|
||||
} else if (this.flag === 2) {
|
||||
this.seekZero = (this.authCode - this.realyPayBills).toFixed(2)
|
||||
this.seekZero = this.authCode - this.realyPayBills
|
||||
}
|
||||
},
|
||||
handleQuery(){
|
||||
|
@ -497,13 +497,13 @@ export default {
|
||||
inventoryVolume:mul.storedQuantity,
|
||||
currentAveragePrice: mul.discountedPrice,
|
||||
currentInventoryVolume: mul.storedQuantity,
|
||||
|
||||
totalPrice: mul.totalPrice,
|
||||
theTotalPurchasePrice:getPurchaseByTankIdData.theTotalPurchasePrice, // 采购总价
|
||||
theAmountOfOilPurchased:getPurchaseByTankIdData.theAmountOfOilPurchased, // 采购油量
|
||||
purchaseUnitPrice:getPurchaseByTankIdData.purchaseUnitPrice, // 采购单价
|
||||
totalOilVolumeSold:getPurchaseByTankIdData.totalOilVolumeSold, // 销售总油量
|
||||
theTotalSalePrice:getPurchaseByTankIdData.theTotalSalePrice, // 销售总价
|
||||
totalPrice:getPurchaseByTankIdData.purchaseUnitPrice*getPurchaseByTankIdData.totalOilVolumeSold // 当前剩余油量总价
|
||||
// totalPrice:getPurchaseByTankIdData.purchaseUnitPrice*getPurchaseByTankIdData.totalOilVolumeSold // 当前剩余油量总价
|
||||
}
|
||||
|
||||
|
||||
|
@ -165,10 +165,10 @@
|
||||
<!-- <el-button style="width: 60px" size="mini"-->
|
||||
<!-- @click="patchwork(scope.row)"-->
|
||||
<!-- type="primary" plain round>补打</el-button>-->
|
||||
<el-button style="width: 60px" size="mini"
|
||||
v-if = "scope.row.status === 'paid'"
|
||||
@click="handleRefund(scope.row.id)"
|
||||
type="danger" plain round>退款</el-button>
|
||||
<!-- <el-button style="width: 60px" size="mini"-->
|
||||
<!-- v-if = "scope.row.status === 'paid'"-->
|
||||
<!-- @click="handleRefund(scope.row.id)"-->
|
||||
<!-- type="danger" plain round>退款</el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
@ -169,17 +169,17 @@
|
||||
<span>{{ parseTime(scope.row.payTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-button style="width: 60px" size="mini"-->
|
||||
<!-- @click="patchwork(scope.row)"-->
|
||||
<!-- type="primary" plain round>补打</el-button>-->
|
||||
<el-button style="width: 60px" size="mini"
|
||||
v-if = "scope.row.status === 'paid'"
|
||||
@click="handleRefund(scope.row.id)"
|
||||
type="danger" plain round>退款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-button style="width: 60px" size="mini"-->
|
||||
<!-- v-if = "scope.row.status === 'paid'"-->
|
||||
<!-- @click="handleRefund(scope.row.id)"-->
|
||||
<!-- type="danger" plain round>退款</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
|
@ -229,17 +229,17 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-button style="width: 60px" size="mini"-->
|
||||
<!-- @click="patchwork(scope.row)"-->
|
||||
<!-- type="primary" plain round>补打</el-button>-->
|
||||
<el-button style="width: 60px" size="mini"
|
||||
@click="handleRefund(scope.row.id)"
|
||||
v-if = "scope.row.orderStatus === 'paid'"
|
||||
type="danger" plain round>退款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-button style="width: 60px" size="mini"-->
|
||||
<!-- @click="handleRefund(scope.row.id)"-->
|
||||
<!-- v-if = "scope.row.orderStatus === 'paid'"-->
|
||||
<!-- type="danger" plain round>退款</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="pagination-box">
|
||||
|
@ -20,16 +20,29 @@
|
||||
</el-select>
|
||||
</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>
|
||||
@ -328,16 +341,29 @@
|
||||
<el-input v-model="queryParams2.orderNo" 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="handleQuery1">搜索</el-button>
|
||||
@ -452,6 +478,8 @@ export default {
|
||||
staffList:[],
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
beginTime:"",
|
||||
endTime:"",
|
||||
// 表单参数
|
||||
form: {
|
||||
type:'orderAmount',
|
||||
@ -498,6 +526,10 @@ export default {
|
||||
methods:{
|
||||
getStaffCommissionList(){
|
||||
this.loading = true
|
||||
if (this.beginTime && this.endTime) {
|
||||
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
listStaffCommissionRecord(this.addDateRange(this.queryParams1, this.dateRange)).then(res => {
|
||||
this.staffCommissionList = res.data.records;
|
||||
this.total1 = res.data.total;
|
||||
@ -586,6 +618,10 @@ export default {
|
||||
// 查询员工提成记录信息
|
||||
getCommissionList(){
|
||||
this.loading = true;
|
||||
if (this.beginTime && this.endTime) {
|
||||
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
listCommissionRecord(this.addDateRange(this.queryParams2, this.dateRange)).then(res => {
|
||||
this.commissionList = res.data.records;
|
||||
this.total2 = res.data.total;
|
||||
@ -655,6 +691,8 @@ export default {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
this.beginTime = ""
|
||||
this.endTime = ""
|
||||
// this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
|
@ -209,3 +209,11 @@ export function deptDelete(id) {
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
export function isTopLevelNodesApi(data) {
|
||||
return request({
|
||||
url: '/system/dept/isTopLevelNodes',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
@ -7,6 +7,7 @@
|
||||
</div>
|
||||
<el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
|
||||
<el-menu
|
||||
|
||||
:default-active="activeMenu"
|
||||
:collapse="isCollapse"
|
||||
:background-color="settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground"
|
||||
@ -14,7 +15,7 @@
|
||||
:unique-opened="true"
|
||||
:active-text-color="settings.theme"
|
||||
:collapse-transition="false"
|
||||
mode="vertical"
|
||||
mode="horizontal "
|
||||
style="margin-bottom: 80px;"
|
||||
>
|
||||
<sidebar-item
|
||||
|
@ -30,319 +30,322 @@
|
||||
</el-col>
|
||||
|
||||
<el-col :span="17">
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<el-card style="margin-bottom: 20px;">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="用户信息" name="list">
|
||||
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
|
||||
label-width="68px">
|
||||
<el-form-item label="用户名" prop="accountName">
|
||||
<el-input
|
||||
v-model="queryParams.accountName"
|
||||
placeholder="请输入用户名"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="真实姓名" prop="accountName">
|
||||
<el-input
|
||||
v-model="queryParams.realName"
|
||||
placeholder="请输入真实姓名"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="accountStatus">
|
||||
<el-select
|
||||
v-model="queryParams.accountStatus"
|
||||
placeholder="用户状态"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option key="1" label="启用" value="1"/>
|
||||
<el-option key="0" label="禁用" value="0"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- </el-card>-->
|
||||
<!-- <el-card >-->
|
||||
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
|
||||
<el-table-column label="用户名" align="center" key="accountName" prop="accountName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="真实姓名" align="center" key="realName" prop="realName" />
|
||||
|
||||
<el-table-column label="所属机构" align="center" prop="storeName" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.deptName ? scope.row.deptName : '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" key="accountStatus" v-if="columns[2].visible">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.accountStatus"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
@change="handleStatusChange(scope.row)"
|
||||
></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createDate" v-if="columns[3].visible" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.createTime }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="160"
|
||||
class-name="small-padding fixed-width"
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
|
||||
label-width="68px">
|
||||
<el-form-item label="用户名" prop="accountName">
|
||||
<el-input
|
||||
v-model="queryParams.accountName"
|
||||
placeholder="请输入用户名"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="真实姓名" prop="accountName">
|
||||
<el-input
|
||||
v-model="queryParams.realName"
|
||||
placeholder="请输入真实姓名"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="accountStatus">
|
||||
<el-select
|
||||
v-model="queryParams.accountStatus"
|
||||
placeholder="用户状态"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<!-- v-hasPermi="['system:account:edit']" -->
|
||||
<!-- v-hasPermi="['system:account:delete']" -->
|
||||
<el-option key="1" label="启用" value="1"/>
|
||||
<el-option key="0" label="禁用" value="0"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:account:resetPwd', 'system:account:edit']">
|
||||
<span class="el-dropdown-link">
|
||||
<i class="el-icon-d-arrow-right el-icon--right"></i>更多
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="handleResetPwd" icon="el-icon-key" v-hasPermi="['system:account:edit']">重置密码</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<!-- tab第一张-->
|
||||
</el-tab-pane>
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- </el-card>-->
|
||||
<!-- <el-card >-->
|
||||
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
|
||||
<el-table-column label="用户名" align="center" key="accountName" prop="accountName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="真实姓名" align="center" key="realName" prop="realName" />
|
||||
|
||||
<el-table-column label="所属机构" align="center" prop="storeName" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.deptName ? scope.row.deptName : '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" key="accountStatus" v-if="columns[2].visible">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.accountStatus"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
@change="handleStatusChange(scope.row)"
|
||||
></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createDate" v-if="columns[3].visible" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.createTime }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="160"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<!-- v-hasPermi="['system:account:edit']" -->
|
||||
<!-- v-hasPermi="['system:account:delete']" -->
|
||||
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:account:resetPwd', 'system:account:edit']">
|
||||
<span class="el-dropdown-link">
|
||||
<i class="el-icon-d-arrow-right el-icon--right"></i>更多
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="handleResetPwd" icon="el-icon-key" v-hasPermi="['system:account:edit']">重置密码</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<!-- tab第一张-->
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="机构信息" name="info">
|
||||
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
|
||||
<el-form-item label="父级节点" prop="name">
|
||||
<el-cascader :options="Thetree" v-model="cascader" :props="defaultProps" @change="handleChanges" :placeholder="parentName" ></el-cascader>
|
||||
</el-form-item>
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
|
||||
<el-form-item label="父级节点" prop="name">
|
||||
<el-cascader :disabled="isTopDept" :options="Thetree" v-model="cascader" :props="defaultProps" @change="handleChanges" :placeholder="parentName" ></el-cascader>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="上级部门" prop="parentId">-->
|
||||
<!-- <treeselect v-model="cascader" :options="Thetree" :normalizer="normalizer" @change="handleChanges" placeholder="啊" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="节点名称" prop="deptName">
|
||||
<el-input v-model="ruleForm.deptName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人名称" prop="leaderName">
|
||||
<el-input v-model="ruleForm.leaderName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人电话" prop="leaderPhone">
|
||||
<el-input v-model="ruleForm.leaderPhone"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型" prop="deptType">
|
||||
<el-radio-group v-model="ruleForm.deptType">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.node_type"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="上级部门" prop="parentId">-->
|
||||
<!-- <treeselect v-model="cascader" :options="Thetree" :normalizer="normalizer" @change="handleChanges" placeholder="啊" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="节点名称" prop="deptName">
|
||||
<el-input :disabled="isTopDept" v-model="ruleForm.deptName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人名称" prop="leaderName">
|
||||
<el-input :disabled="isTopDept" v-model="ruleForm.leaderName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人电话" prop="leaderPhone">
|
||||
<el-input :disabled="isTopDept" v-model="ruleForm.leaderPhone"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型" prop="deptType">
|
||||
<el-radio-group :disabled="isTopDept" v-model="ruleForm.deptType">
|
||||
<el-radio
|
||||
v-for="dict in judgementNodeType(dict.type.node_type)"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
|
||||
<template v-if="ruleForm.deptType !== '3'">
|
||||
<el-row >
|
||||
<el-col :span="20">
|
||||
<el-form-item label="额度设置方式" prop="">
|
||||
<el-radio-group v-model="ruleForm.turnoverType" @input="changeTheBillingRule">
|
||||
<el-radio label=1>无限制</el-radio>
|
||||
<el-radio label=2>时间限制</el-radio>
|
||||
<el-radio label=3>预付费</el-radio>
|
||||
<el-radio label=4>后付费</el-radio>
|
||||
<el-radio label=5>年付费</el-radio>
|
||||
<el-radio label=6>可创建油站站点数量</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row>
|
||||
|
||||
<template v-if="ruleForm.turnoverType === '2'">
|
||||
<el-form-item label="时间限制" prop="turnoverType" style="width:220px">
|
||||
<el-date-picker
|
||||
v-model="timeFrame"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
|
||||
<template v-if="ruleForm.turnoverType === '3'">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="预付金额">
|
||||
<el-input-number v-model="ruleForm.prepaidAmount" @input="rateCalculation()">
|
||||
<template slot="append">元</template>
|
||||
</el-input-number>
|
||||
<template v-if="ruleForm.deptType !== '3'">
|
||||
<el-row >
|
||||
<el-col :span="20">
|
||||
<el-form-item label="额度设置方式" prop="">
|
||||
<el-radio-group :disabled="isTopDept" v-model="ruleForm.turnoverType" @input="changeTheBillingRule">
|
||||
<el-radio label=1>无限制</el-radio>
|
||||
<el-radio label=2>时间限制</el-radio>
|
||||
<el-radio label=3>预付费</el-radio>
|
||||
<el-radio label=4>后付费</el-radio>
|
||||
<el-radio label=5>年付费</el-radio>
|
||||
<el-radio label=6>可创建油站站点数量</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="费率">
|
||||
<el-input v-model="ruleForm.rates" @input="rateCalculation()">
|
||||
<template slot="append">%</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="可跑流量">
|
||||
<el-input v-model="ruleForm.turnoverLimit" :disabled="true">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
<template v-if="ruleForm.turnoverType === '4'">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="费率">
|
||||
<el-input v-model="ruleForm.rates" @input="rateCalculation()">
|
||||
<template slot="append">%</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="实际交易量">
|
||||
<el-input v-model="ruleForm.turnoverLimit" :disabled="true">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="系统服务费">
|
||||
<el-input v-model="ruleForm.prepaidAmount" :disabled="true">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
<template v-if="ruleForm.turnoverType === '5'">
|
||||
<el-col :span="10">
|
||||
<el-form-item label="时间范围">
|
||||
<template v-if="ruleForm.turnoverType === '2'">
|
||||
<el-form-item label="时间限制" prop="turnoverType" style="width:220px">
|
||||
<el-date-picker
|
||||
:disabled="isTopDept"
|
||||
v-model="timeFrame"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="价格">
|
||||
<el-input v-model="ruleForm.prepaidAmount"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
|
||||
<template v-if="ruleForm.turnoverType === '3'">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="预付金额">
|
||||
<el-input-number :disabled="isTopDept" v-model="ruleForm.prepaidAmount" @input="rateCalculation()">
|
||||
<template slot="append">元</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="费率">
|
||||
<el-input :disabled="isTopDept" v-model="ruleForm.rates" @input="rateCalculation()">
|
||||
<template slot="append">%</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="可跑流量">
|
||||
<el-input v-model="ruleForm.turnoverLimit" :disabled="true">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
<template v-if="ruleForm.turnoverType === '6'">
|
||||
<el-col :span="10">
|
||||
<template v-if="ruleForm.turnoverType === '4'">
|
||||
<el-col :span="6">
|
||||
<el-form-item :disabled="isTopDept" label="费率">
|
||||
<el-input v-model="ruleForm.rates" @input="rateCalculation()">
|
||||
<template slot="append">%</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-form-item label="可创建油站数量" label-width="110px">
|
||||
<el-input-number v-model="ruleForm.storeNum" @change="handleChangeInputNumber" :min="1"
|
||||
:max="1000" label="可创建油站数量"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-row>
|
||||
</template>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="实际交易量">
|
||||
<el-input v-model="ruleForm.turnoverLimit" :disabled="true">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="系统服务费">
|
||||
<el-input v-model="ruleForm.prepaidAmount" :disabled="true">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
<el-row v-if="ruleForm.deptType === '3'">
|
||||
<el-form-item label="时间范围">
|
||||
<el-date-picker
|
||||
v-model="timeFrame"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
<template v-if="ruleForm.turnoverType === '5'">
|
||||
<el-col :span="10">
|
||||
<el-form-item label="时间范围">
|
||||
<el-date-picker
|
||||
:disabled="isTopDept"
|
||||
v-model="timeFrame"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="价格">
|
||||
<el-input :disabled="isTopDept" v-model="ruleForm.prepaidAmount"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
<template v-if="ruleForm.turnoverType === '6'">
|
||||
<el-col :span="10">
|
||||
|
||||
<el-form-item label="可创建油站数量" label-width="110px">
|
||||
<el-input-number :disabled="isTopDept" v-model="ruleForm.storeNum" @change="handleChangeInputNumber" :min="1"
|
||||
:max="1000" label="可创建油站数量"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
|
||||
<!-- <el-row v-if="ruleForm.deptType === '3'">-->
|
||||
<!-- <el-form-item label="时间范围">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="timeFrame"-->
|
||||
<!-- type="daterange"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- range-separator="至"-->
|
||||
<!-- start-placeholder="开始日期"-->
|
||||
<!-- end-placeholder="结束日期">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-row>-->
|
||||
|
||||
<el-form-item label="状态" prop="name">
|
||||
<el-switch :disabled="isTopDept" v-model="value10" @change="getswitch" ></el-switch>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
|
||||
<el-form-item label="状态" prop="name">
|
||||
<el-switch v-model="value10" @change="getswitch" ></el-switch>
|
||||
</el-form-item>
|
||||
<template v-if="!isTopDept">
|
||||
<el-form-item v-if="pdinfo == 1">
|
||||
<el-button type="primary" @click="submitForms('ruleForm')">新增</el-button>
|
||||
<!--<el-button @click="resetForm('ruleForm')">重置</el-button> -->
|
||||
</el-form-item>
|
||||
<el-form-item v-if="pdinfo == 2">
|
||||
<el-button type="primary" @click="submitFormseide('ruleForm')">保存</el-button>
|
||||
<!--<el-button @click="resetForm('ruleForm')">重置</el-button> -->
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
</el-form>
|
||||
|
||||
|
||||
<el-form-item v-if="pdinfo == 1">
|
||||
<el-button type="primary" @click="submitForms('ruleForm')">新增</el-button>
|
||||
<!--<el-button @click="resetForm('ruleForm')">重置</el-button> -->
|
||||
</el-form-item>
|
||||
<el-form-item v-if="pdinfo == 2">
|
||||
<el-button type="primary" @click="submitFormseide('ruleForm')">保存</el-button>
|
||||
<!--<el-button @click="resetForm('ruleForm')">重置</el-button> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
|
||||
</el-tab-pane>
|
||||
</el-tab-pane>
|
||||
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
@ -475,7 +478,7 @@ import {
|
||||
deptedit,
|
||||
deptDelete,
|
||||
Userlist,
|
||||
jklist, getDutyList
|
||||
jklist, getDutyList, isTopLevelNodesApi
|
||||
} from "@/api/system/Site/site";
|
||||
// import { getStoreStaffList } from "@/api/staff";
|
||||
import { getAccountList, getAccount, delAccount, addAccount, updateAccount, resetAccountPwd, changeAccountStatus } from "@/api/system/account";
|
||||
@ -483,15 +486,24 @@ import {
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import BigNumber from 'bignumber.js';
|
||||
import node from "../../../../gasStation-uni/uni_modules/uview-ui/components/u-parse/node/node.vue";
|
||||
|
||||
|
||||
|
||||
|
||||
export default {
|
||||
name: "User",
|
||||
computed: {
|
||||
node() {
|
||||
return node
|
||||
}
|
||||
},
|
||||
dicts: ['node_type'],
|
||||
data() {
|
||||
return {
|
||||
isEditDept:true,
|
||||
isTopDept:true,
|
||||
|
||||
|
||||
timeFrame:[],
|
||||
value10:true,
|
||||
@ -504,7 +516,7 @@ export default {
|
||||
activeName: 'list',
|
||||
ruleForm: {
|
||||
parentId:'',
|
||||
deptType:'1',
|
||||
deptType:'3',
|
||||
status:'qy',
|
||||
leaderName:'',
|
||||
leaderPhone:'',
|
||||
@ -600,6 +612,7 @@ export default {
|
||||
status: '',
|
||||
deptId: ''
|
||||
},
|
||||
isClick: false,
|
||||
// 列信息
|
||||
columns: [
|
||||
{key: 0, label: `用户编号`, visible: true},
|
||||
@ -762,6 +775,17 @@ export default {
|
||||
this.cleanUp()
|
||||
this.getList()
|
||||
},
|
||||
|
||||
// 创建节点类型判断
|
||||
judgementNodeType(typeList) {
|
||||
let evenNumbers = typeList
|
||||
// isClick
|
||||
if (this.deptType == 3 || (this.deptType == 2 && !this.isClick)) {
|
||||
evenNumbers = typeList.filter(number => number.label === "基本门店");
|
||||
this.ruleForm.deptType = "3"
|
||||
}
|
||||
return evenNumbers
|
||||
},
|
||||
// 状态修改
|
||||
getswitch(e){
|
||||
console.log(e)
|
||||
@ -772,10 +796,26 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
activecilck(data){
|
||||
async activecilck(data){
|
||||
|
||||
// 判断是点击还是修改该
|
||||
this.isClick = true
|
||||
|
||||
console.log('点树',data)
|
||||
|
||||
this.cleanUp()
|
||||
|
||||
let flag = true
|
||||
await this.getIsTopLevelNodesApi(data.id).then(res=>{
|
||||
flag = res
|
||||
console.log('点树2222',res)
|
||||
|
||||
})
|
||||
this.$forceUpdate();
|
||||
this.isTopDept = flag
|
||||
|
||||
|
||||
|
||||
// 点击树之后
|
||||
this.queryParams.deptId = data.id
|
||||
this.deptType = data.deptType
|
||||
@ -819,7 +859,7 @@ export default {
|
||||
submitForms(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
|
||||
console.log("timeFrame",this.timeFrame)
|
||||
if (this.timeFrame){
|
||||
this.ruleForm.turnoverStartTime = this.timeFrame[0]
|
||||
this.ruleForm.turnoverEndTime = this.timeFrame[1]
|
||||
@ -905,13 +945,21 @@ export default {
|
||||
}
|
||||
},
|
||||
// 新增数据
|
||||
addNode(id,label) {
|
||||
// 默认类型
|
||||
async addNode(id,label) {
|
||||
let _this = this
|
||||
// 默认类型
|
||||
this.isClick = false
|
||||
this.ruleForm.deptType = "3"
|
||||
this.$nextTick(() => {
|
||||
console.log("新增树的返回222", this.ruleForm);
|
||||
});
|
||||
|
||||
// _this.ruleForm.deptType = '1'
|
||||
// 点击树获取部门信息
|
||||
Userlist(id).then(res=>{
|
||||
await Userlist(id).then(res=>{
|
||||
console.log("新增树的返回",res)
|
||||
|
||||
this.deptType = res.data.deptType
|
||||
if (res.data.deptType === "3") {
|
||||
this.parentName = res.data.parentName
|
||||
this.ruleForm.parentId = res.data.parentId
|
||||
@ -921,6 +969,7 @@ export default {
|
||||
}
|
||||
|
||||
})
|
||||
this.isTopDept = false
|
||||
|
||||
},
|
||||
//修改树
|
||||
@ -999,16 +1048,37 @@ export default {
|
||||
},
|
||||
// <el-button size="mini" type="text" on-click={ () => this.appedit(data) }>修改</el-button>
|
||||
renderContent(h, { node, data, store }) {
|
||||
console.log("node",node)
|
||||
console.log("data",data)
|
||||
console.log("store",store)
|
||||
let isAdd = data.deptType == '3'
|
||||
return (
|
||||
<span class="custom-tree-node">
|
||||
<span class="custom-tree-box">{node.label}</span>
|
||||
<span>
|
||||
<el-button size="mini" type="text" on-click={ () => this.append(data) }>新增</el-button>
|
||||
|
||||
<el-button size="mini" type="text" on-click={ () => this.remove(node, data) }>删除</el-button>
|
||||
</span>
|
||||
{!isAdd ?
|
||||
<el-button size="mini" type="text" on-click={() => this.append(data)}>新增</el-button>
|
||||
: null
|
||||
}
|
||||
{node.level !== 1 ?
|
||||
<el-button size="mini" type="text" on-click={() => this.remove(node, data)}>删除</el-button>
|
||||
: null
|
||||
}
|
||||
</span>
|
||||
</span>);
|
||||
},
|
||||
|
||||
|
||||
async getIsTopLevelNodesApi(deptId) {
|
||||
let flag = false
|
||||
await isTopLevelNodesApi({deptId:deptId}).then(res =>{
|
||||
if (res.code === 200) {
|
||||
flag = res.data
|
||||
}
|
||||
})
|
||||
return flag
|
||||
},
|
||||
|
||||
/** 查询用户列表 */
|
||||
async getList() {
|
||||
console.log("123123123",this.form)
|
||||
@ -1225,7 +1295,14 @@ export default {
|
||||
|
||||
app.form.password1 = row.password
|
||||
//获取角色
|
||||
this.getRoleList();
|
||||
let permissionType
|
||||
|
||||
if (row.deptType === "3") {
|
||||
permissionType = 'staff'
|
||||
}else {
|
||||
permissionType = 'system'
|
||||
}
|
||||
this.getRoleList(permissionType);
|
||||
|
||||
},
|
||||
|
||||
@ -1354,8 +1431,9 @@ export default {
|
||||
}
|
||||
.left-box{
|
||||
box-sizing: border-box;
|
||||
height: 90vh;
|
||||
height: 75vh;
|
||||
padding: 15px;
|
||||
overflow-y: auto; /* 只显示垂直滚动条 */
|
||||
}
|
||||
.title-h{
|
||||
font-size: 18px;
|
||||
|
@ -293,10 +293,7 @@ export default {
|
||||
// 展开/折叠操作
|
||||
toggleExpandAll() {
|
||||
this.refreshTable = false;
|
||||
this.isExpandAll = !this.isExpandAll;
|
||||
this.$nextTick(() => {
|
||||
this.refreshTable = true;
|
||||
});
|
||||
|
||||
},
|
||||
// 修改按钮操作
|
||||
handleUpdate(row) {
|
||||
|
@ -182,7 +182,7 @@ public class CommissionRecordServiceImpl implements CommissionRecordService {
|
||||
queryWrapper.eq("type",type);
|
||||
queryWrapper.eq("order_no",orderNo);
|
||||
CommissionRecord commissionRecord = commissionRecordMapper.selectOne(queryWrapper);
|
||||
if (ObjectUtil.isNotEmpty(commissionRecord)){
|
||||
if (ObjectUtil.isNotEmpty(commissionRecord) && ObjectUtil.isNotEmpty(commissionRecord.getAmount())){
|
||||
CommissionRecord record = new CommissionRecord();
|
||||
if (type.equals("1")){
|
||||
record.setType("4");
|
||||
|
@ -42,7 +42,7 @@ public class MtInventoryDetails extends BaseEntity {
|
||||
/**
|
||||
* 库存差异
|
||||
*/
|
||||
private Double inventoryDiscrepancy;
|
||||
private Integer inventoryDiscrepancy;
|
||||
/**
|
||||
* 盘点数量
|
||||
*/
|
||||
|
@ -7,6 +7,8 @@ import com.fuint.business.convenienceSore.entity.SaleDetail;
|
||||
import com.fuint.business.convenienceSore.vo.SaleDetailVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface SaleDetailMapper extends BaseMapper<SaleDetail> {
|
||||
/**
|
||||
* 根据条件分页查询销售详情信息
|
||||
@ -14,4 +16,11 @@ public interface SaleDetailMapper extends BaseMapper<SaleDetail> {
|
||||
* @return
|
||||
*/
|
||||
public IPage<SaleDetailVo> selectSaleDetailList(Page page, @Param("saleDetail") SaleDetailVo saleDetail);
|
||||
|
||||
/**
|
||||
* 根据条件查询销售详情信息
|
||||
* @param saleDetail
|
||||
* @return
|
||||
*/
|
||||
List<SaleDetailVo> selectSaleDetails(@Param("saleDetail") SaleDetailVo saleDetail);
|
||||
}
|
||||
|
@ -342,10 +342,16 @@
|
||||
|
||||
|
||||
|
||||
<!-- <update id="editGoods">-->
|
||||
<!-- update mt_goods set-->
|
||||
<!-- stock = stock + #{inventoryDiscrepancy} ,-->
|
||||
<!-- update_time = NOW()-->
|
||||
<!-- where id = #{goodsId}-->
|
||||
<!-- </update>-->
|
||||
<update id="editGoods">
|
||||
update mt_goods set
|
||||
stock = stock + #{inventoryDiscrepancy} ,
|
||||
update_time = NOW()
|
||||
stock = #{inventoryQuantity} ,
|
||||
update_time = NOW()
|
||||
where id = #{goodsId}
|
||||
</update>
|
||||
|
||||
|
@ -198,6 +198,7 @@
|
||||
|
||||
</where>
|
||||
group by mp.id
|
||||
order by mp.create_time DESC
|
||||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
|
@ -161,9 +161,11 @@
|
||||
mpd.id detailsId,
|
||||
s.id supplierId,
|
||||
s.name supplierName
|
||||
from mt_purchase_details mpd
|
||||
from mt_purchase mp
|
||||
left join mt_purchase_details mpd ON mp.id = mpd.purchase_id
|
||||
left join mt_goods mg ON mg.id = mpd.goods_id
|
||||
left join supplier s ON mg.supplier_id = s.id
|
||||
where mp.id = #{pId}
|
||||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
|
@ -11,6 +11,26 @@
|
||||
<where>
|
||||
sd.store_id = #{saleDetail.storeId}
|
||||
and sd.sale_id = #{saleDetail.saleId}
|
||||
<if test="saleDetail.params.beginTime != null and saleDetail.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(sd.create_time,'%y%m%d') >= date_format(#{saleDetail.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="saleDetail.params.endTime != null and saleDetail.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(sd.create_time,'%y%m%d') <= date_format(#{saleDetail.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectSaleDetails" resultType="com.fuint.business.convenienceSore.vo.SaleDetailVo"
|
||||
parameterType="com.fuint.business.convenienceSore.vo.SaleDetailVo">
|
||||
<include refid="selectSaleDetail"></include>
|
||||
<where>
|
||||
sd.store_id = #{saleDetail.storeId}
|
||||
and sd.sale_id = #{saleDetail.saleId}
|
||||
<if test="saleDetail.params.beginTime != null and saleDetail.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(sd.create_time,'%y%m%d') >= date_format(#{saleDetail.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="saleDetail.params.endTime != null and saleDetail.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(sd.create_time,'%y%m%d') <= date_format(#{saleDetail.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
@ -19,12 +19,6 @@
|
||||
<if test="sale.goodsNo != null and sale.goodsNo != ''">
|
||||
and mg.goods_no like concat('%', #{sale.goodsNo}, '%')
|
||||
</if>
|
||||
<if test="sale.params.beginTime != null and sale.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(sa.update_time,'%y%m%d') >= date_format(#{sale.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="sale.params.endTime != null and sale.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(sa.update_time,'%y%m%d') <= date_format(#{sale.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectSales" resultType="com.fuint.business.convenienceSore.vo.SaleStatisticVo"
|
||||
|
@ -7,6 +7,8 @@ import com.fuint.business.convenienceSore.entity.SaleDetail;
|
||||
import com.fuint.business.convenienceSore.vo.SaleDetailVo;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 销售详情信息 业务层
|
||||
*/
|
||||
@ -19,6 +21,13 @@ public interface SaleDetailService extends IService<SaleDetail> {
|
||||
*/
|
||||
public IPage<SaleDetailVo> selectSaleDetailList(Page page, SaleDetailVo saleDetail);
|
||||
|
||||
/**
|
||||
* 根据条件查询销售详情信息
|
||||
* @param saleDetail
|
||||
* @return
|
||||
*/
|
||||
List<SaleDetailVo> selectSaleDetails(SaleDetailVo saleDetail);
|
||||
|
||||
/**
|
||||
* 添加销售详情信息
|
||||
* @param saleDetail
|
||||
|
@ -47,6 +47,16 @@ public interface StockStatisticService extends IService<StockStatistic> {
|
||||
*/
|
||||
public int insertStock(StockStatistic stock);
|
||||
|
||||
/**
|
||||
* 修改库存统计信息,增加库存跟踪信息
|
||||
* @param goodsId 商品id
|
||||
* @param costAmount 成本金额
|
||||
* @param document 商品提成来源(例:商品出售)
|
||||
* @param changeNumber 商品变动数量
|
||||
* @return
|
||||
*/
|
||||
public int insertStockStatisticTrack(Integer goodsId,Double costAmount,String document,Integer changeNumber);
|
||||
|
||||
/**
|
||||
* 根据商品id删除库存统计信息
|
||||
* @param goodsId
|
||||
|
@ -17,7 +17,7 @@ public interface StockTrackService extends IService<StockTrack> {
|
||||
public IPage<StockTrack> selectStockTrackList(Page page,Integer stockId);
|
||||
|
||||
/**
|
||||
* 增加供应商信息
|
||||
* 增加库存跟踪信息
|
||||
* @param stockTrack
|
||||
* @return
|
||||
*/
|
||||
|
@ -213,7 +213,9 @@ public class CvsGoodsServiceImpl extends ServiceImpl<CvsGoodsMapper,CvsGoods> im
|
||||
public int updateCvsGood(CvsGoods goods) {
|
||||
CvsGoods cvsGoods = this.selectCvsGoodsByName(goods.getName(), goods.getStoreId());
|
||||
int row = 0;
|
||||
if (ObjectUtil.isEmpty(cvsGoods)){
|
||||
if (ObjectUtil.isNotEmpty(cvsGoods) && goods.getId()!=cvsGoods.getId()){
|
||||
row = 0;
|
||||
}else {
|
||||
row = baseMapper.updateById(goods);
|
||||
}
|
||||
return row;
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.fuint.business.convenienceSore.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.fuint.business.convenienceSore.dto.MtInventoryDto;
|
||||
import com.fuint.business.convenienceSore.entity.*;
|
||||
@ -177,7 +178,7 @@ public class MtInventoryServiceImpl implements MtInventoryService {
|
||||
|
||||
//添加货损出库的数据
|
||||
|
||||
if (mtReturnsDetailsVO.getDamageQuantity()>0) {
|
||||
if (ObjectUtil.isNotEmpty(mtReturnsDetailsVO.getDamageQuantity()) && mtReturnsDetailsVO.getDamageQuantity()>0) {
|
||||
stockTrack = new StockTrack();
|
||||
stockTrack.setStockId(stockStatistic.getId());
|
||||
stockTrack.setStoreId(nowAccountInfo.getStoreId());
|
||||
|
@ -16,6 +16,8 @@ import com.fuint.common.util.TokenUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 销售详情信息 业务层
|
||||
*/
|
||||
@ -40,6 +42,13 @@ public class SaleDetailServiceImpl extends ServiceImpl<SaleDetailMapper, SaleDet
|
||||
return saleDetailVoIPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SaleDetailVo> selectSaleDetails(SaleDetailVo saleDetail) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
saleDetail.setStoreId(nowAccountInfo.getStoreId());
|
||||
return baseMapper.selectSaleDetails(saleDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加销售详情信息
|
||||
* @param saleDetail
|
||||
|
@ -1,15 +1,20 @@
|
||||
package com.fuint.business.convenienceSore.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
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.SaleStatistic;
|
||||
import com.fuint.business.convenienceSore.mapper.SaleStatisticMapper;
|
||||
import com.fuint.business.convenienceSore.service.SaleDetailService;
|
||||
import com.fuint.business.convenienceSore.service.SaleStatisticService;
|
||||
import com.fuint.business.convenienceSore.vo.SaleDetailVo;
|
||||
import com.fuint.business.convenienceSore.vo.SaleStatisticVo;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
@ -19,6 +24,10 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
public class SaleStatisticServiceImpl extends ServiceImpl<SaleStatisticMapper, SaleStatistic> implements SaleStatisticService {
|
||||
@Autowired
|
||||
@Lazy
|
||||
private SaleDetailService saleDetailService;
|
||||
|
||||
/**
|
||||
* 根据条件分页查询销售统计信息
|
||||
* @param page
|
||||
@ -30,6 +39,28 @@ public class SaleStatisticServiceImpl extends ServiceImpl<SaleStatisticMapper, S
|
||||
Integer storeId = nowAccountInfo.getStoreId();
|
||||
saleStatisticVo.setStoreId(storeId);
|
||||
IPage<SaleStatisticVo> saleStatisticVoIPage = baseMapper.selectSaleList(page, saleStatisticVo);
|
||||
for (SaleStatisticVo record : saleStatisticVoIPage.getRecords()) {
|
||||
SaleDetailVo saleDetailVo = new SaleDetailVo();
|
||||
saleDetailVo.setSaleId(record.getId());
|
||||
saleDetailVo.setParams(saleStatisticVo.getParams());
|
||||
List<SaleDetailVo> saleDetailVos = saleDetailService.selectSaleDetails(saleDetailVo);
|
||||
Integer saleNumber = 0;
|
||||
Double saleTotal = 0.0;
|
||||
Double costTotal = 0.0;
|
||||
Double profitTotal = 0.0;
|
||||
if (CollectionUtil.isNotEmpty(saleDetailVos)){
|
||||
for (SaleDetailVo detailVo : saleDetailVos) {
|
||||
saleNumber += detailVo.getSaleNumber();
|
||||
saleTotal += detailVo.getSaleTotal();
|
||||
costTotal += detailVo.getCostTotal();
|
||||
profitTotal += detailVo.getProfitTotal();
|
||||
}
|
||||
}
|
||||
record.setSaleNumber(saleNumber);
|
||||
record.setSaleTotal(saleTotal);
|
||||
record.setCostTotal(costTotal);
|
||||
record.setProfitTotal(profitTotal);
|
||||
}
|
||||
return saleStatisticVoIPage;
|
||||
}
|
||||
|
||||
|
@ -6,12 +6,18 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
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.entity.StockStatistic;
|
||||
import com.fuint.business.convenienceSore.entity.StockTrack;
|
||||
import com.fuint.business.convenienceSore.mapper.StockStatisticMapper;
|
||||
import com.fuint.business.convenienceSore.service.LJGoodsService;
|
||||
import com.fuint.business.convenienceSore.service.StockStatisticService;
|
||||
import com.fuint.business.convenienceSore.service.StockTrackService;
|
||||
import com.fuint.business.convenienceSore.vo.StockStatisticVo;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
@ -21,6 +27,13 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
public class StockStatisticServiceImpl extends ServiceImpl<StockStatisticMapper, StockStatistic> implements StockStatisticService {
|
||||
@Autowired
|
||||
@Lazy
|
||||
private LJGoodsService goodsService;
|
||||
@Autowired
|
||||
@Lazy
|
||||
private StockTrackService stockTrackService;
|
||||
|
||||
/**
|
||||
* 根据条件分页查询库存统计信息
|
||||
* @param page
|
||||
@ -84,6 +97,22 @@ public class StockStatisticServiceImpl extends ServiceImpl<StockStatisticMapper,
|
||||
return row;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertStockStatisticTrack(Integer goodsId,Double costAmount,String document,Integer changeNumber) {
|
||||
goodsService.subtractGoodesStockByLock(goodsId,changeNumber);
|
||||
StockStatistic stockStatistic = selectStockByGoodsId(goodsId);
|
||||
stockStatistic.setCostAmount(stockStatistic.getCostAmount()+costAmount);
|
||||
int row = this.editStock(stockStatistic);
|
||||
// 添加库存跟踪信息
|
||||
StockTrack stockTrack = new StockTrack();
|
||||
stockTrack.setStockId(stockStatistic.getId());
|
||||
stockTrack.setStoreId(stockStatistic.getStoreId());
|
||||
stockTrack.setDocument(document);
|
||||
stockTrack.setChangeNumber(changeNumber);
|
||||
stockTrackService.insertStockTrack(stockTrack);
|
||||
return row;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据商品id删除库存统计信息
|
||||
* @param goodsId
|
||||
|
@ -412,7 +412,8 @@
|
||||
<update id="updateInventory">
|
||||
update integral_gift
|
||||
set
|
||||
total_inventory = total_inventory + #{editInventory},
|
||||
total_inventory = total_inventory +0+ #{editInventory},
|
||||
remaining_inventory = remaining_inventory +0+ #{editInventory},
|
||||
update_by = #{updateBy},
|
||||
update_time = NOW()
|
||||
where id =#{id}
|
||||
|
@ -190,8 +190,31 @@ public class IntegralGiftServiceImpl implements IntegralGiftService {
|
||||
*/
|
||||
@Override
|
||||
public boolean updateInventory(@Param("id") Integer id,@Param("editInventory") Integer editInventory) {
|
||||
if (ObjectUtil.isEmpty(editInventory)) throw new RuntimeException("输入需要修改的数值");
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
return this.integralGiftDao.updateInventory(id,editInventory,nowAccountInfo.getStaffId()) > 0;
|
||||
IntegralGift integralGift1 = this.integralGiftDao.queryById(id);
|
||||
if (editInventory<0 && integralGift1.getRemainingInventory() < -editInventory) {
|
||||
throw new RuntimeException("库存不得少于0");
|
||||
}
|
||||
int i = this.integralGiftDao.updateInventory(id,editInventory,nowAccountInfo.getStaffId());
|
||||
// 根据id查询积分商品
|
||||
IntegralGift integralGift = integralGiftDao.queryById(id);
|
||||
if ("实物商品".equals(integralGift.getGiftType()) && ObjectUtil.isNotEmpty(integralGift.getGoodsId())) {
|
||||
LJGoods byId = ljGoodsService.getById(integralGift.getGoodsId());
|
||||
if (editInventory>byId.getStock()) {
|
||||
// 当增加库存是需要判断商品库存是否足够
|
||||
throw new RuntimeException("该商品库存不足");
|
||||
}
|
||||
LJGoodsDto goods = new LJGoodsDto();
|
||||
goods.setId(byId.getId());
|
||||
goods.setStoreId(byId.getStoreId());
|
||||
goods.setNumberOfChanges(-editInventory);
|
||||
goods.setDocument("积分商品更改库存");
|
||||
ljGoodsService.editGoodsInventory(goods);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
@Resource
|
||||
RedisLock redisLock;
|
||||
|
@ -351,7 +351,7 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
|
||||
for (Map<String, String> stringObjectMap : resultMapList) {
|
||||
if (stringObjectMap.get("type").equals(cardFuelRecord.getType()) &&
|
||||
stringObjectMap.get("oilType").equals(cardFuelRecord.getOilType())) {
|
||||
String refuelMoney = stringObjectMap.get("refuelMoney").toString();
|
||||
String refuelMoney = String.valueOf(stringObjectMap.get("refuelMoney"));
|
||||
// Double.valueOf(refuelMoney);
|
||||
|
||||
BigDecimal ref = new BigDecimal(refuelMoney);
|
||||
|
@ -101,7 +101,7 @@ public class QrCodeUtils {
|
||||
File file1 = new File("/temp/qrCode/");
|
||||
// 判断目录是否存在
|
||||
if (!file1.exists()) {
|
||||
file1.mkdir();
|
||||
file1.mkdirs();
|
||||
}
|
||||
|
||||
FileOutputStream outImgStream = new FileOutputStream(outImgPath);
|
||||
|
@ -84,6 +84,7 @@ public class AllOrderInfo extends BaseEntity implements Serializable {
|
||||
* 退款订单
|
||||
*/
|
||||
private String refOrderNo;
|
||||
private String refBy;
|
||||
|
||||
}
|
||||
|
||||
|
@ -329,7 +329,8 @@ limit 1
|
||||
|
||||
<select id="greaseGunStatistics" resultType="java.util.Map">
|
||||
SELECT
|
||||
oo.oil_gun_num gunName,
|
||||
-- oo.oil_gun_num gunName,
|
||||
og.gun_name gunName,
|
||||
SUM(IF(order_status='paid', pay_amount, 0)) AS paidAmount,
|
||||
SUM(IF(order_status='paid', oil_num, 0)) AS oilNum,
|
||||
count(order_status='paid') numberOfDeals
|
||||
@ -415,12 +416,12 @@ limit 1
|
||||
select
|
||||
cu.unit_name name,
|
||||
hb.credit_unit_id ,
|
||||
sum(amount) amount,
|
||||
sum(outstand_amount) amount,
|
||||
count(*) numberOfDeals
|
||||
from
|
||||
hang_bill hb
|
||||
left join credit_unit cu ON hb.credit_unit_id = cu.id
|
||||
where hb.status = 0
|
||||
where hb.status IN (0,2)
|
||||
and hb.store_id = #{storeId}
|
||||
and hb.create_time BETWEEN #{startTime} AND #{endTime}
|
||||
group by hb.credit_unit_id
|
||||
|
@ -61,4 +61,11 @@ public interface LJOrderService extends IService<LJOrder> {
|
||||
Map<String, String> orderStatistics(LJOrder order);
|
||||
|
||||
LJOrder getStatisticsByTime(Date time ,Integer goodsId);
|
||||
|
||||
/**
|
||||
* 添加商品订单信息
|
||||
* @param order
|
||||
* @param goodsId 商品id
|
||||
*/
|
||||
void addGoodOrder(LJOrder order,Integer goodsId);
|
||||
}
|
||||
|
@ -155,6 +155,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
@Override
|
||||
@Transactional
|
||||
public int refund(Map<String, String> map) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
Map<String, String> refund = new HashMap<>();
|
||||
// try {
|
||||
AllOrderInfo allOrderInfo = selectAllOrderInfoByOrderNo(map.get("orderNo"));
|
||||
@ -192,7 +193,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
throw new RuntimeException("该订单类型不支持退款!");
|
||||
}
|
||||
boolean flag = false;
|
||||
if (!"CASH".equals(allOrderInfo.getPayType()) && Double.valueOf(map.get("refundAmt")) > 0) {
|
||||
if (!"CASH".equals(allOrderInfo.getPayType()) && Integer.valueOf(map.get("refundAmt")) > 0) {
|
||||
try {
|
||||
refund = fyPayService.refund(map);
|
||||
} catch (Exception e) {
|
||||
@ -210,6 +211,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
allOrderInfo.setStatus("refund");
|
||||
allOrderInfo.setReasonRefund(map.get("refundRemark"));
|
||||
allOrderInfo.setRefOrderNo(map.get("refundOrderNo"));
|
||||
allOrderInfo.setRefBy(nowAccountInfo.getStaffId().toString());
|
||||
baseMapper.updateById(allOrderInfo);
|
||||
// 处理油品订单
|
||||
OilOrder oilOrder = new OilOrder();
|
||||
@ -218,7 +220,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
}
|
||||
|
||||
// 处理商品订单
|
||||
LJOrder ljOrder = new LJOrder();
|
||||
LJOrder ljOrder = null;
|
||||
|
||||
if (ObjectUtil.isNotEmpty(map.get("isGoods")) && "true".equals(map.get("isGoods"))) {
|
||||
ljOrder = ljOrderService.selectGoodsOrder(map.get("orderNo"));
|
||||
@ -237,13 +239,14 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
// 判断是否推掉优惠卷
|
||||
disposeOil(oilOrder,map);
|
||||
commissionRecordService.addRefundRecord(oilOrder.getOrderNo(),"1",oilOrder.getStaffId(),oilOrder.getStoreId());
|
||||
growthValueChangeService.refundGrowthValueChange(oilOrder.getOrderNo(),oilOrder.getUserId(),oilOrder.getStoreId());
|
||||
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(ljOrder)) {
|
||||
if (ObjectUtil.isNotEmpty(ljOrder) ) {
|
||||
disposeGoods(ljOrder,map.get("refundOrderNo"));
|
||||
commissionRecordService.addRefundRecord(ljOrder.getOrderNo(),"2",ljOrder.getStaffId(),ljOrder.getStoreId());
|
||||
}
|
||||
|
||||
growthValueChangeService.refundGrowthValueChange(oilOrder.getOrderNo(),oilOrder.getUserId(),oilOrder.getStoreId());
|
||||
if (flag) {
|
||||
return 1;// 当前为现金支付
|
||||
}
|
||||
@ -323,20 +326,22 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
oilTracking.setTankId(oilGun.getTankId());
|
||||
oilTracking.setOrderNumber(map.get("refundOrderNo"));
|
||||
OilTracking insert = oilTrackingService.insert(oilTracking);
|
||||
|
||||
// 处理储值卡
|
||||
if (ObjectUtil.isNotEmpty(order.getBalanceAmount())) {
|
||||
userBalanceService.addUserBalance(order.getUserId(),nowAccountInfo.getChainStoreId(),order.getBalanceAmount());
|
||||
}
|
||||
// 处理屯油卡
|
||||
if (ObjectUtil.isNotEmpty(order.getOilCardAmount())) {
|
||||
userBalanceService.addUserOil(order.getOils(),order.getUserId(),nowAccountInfo.getChainStoreId(),order.getOilCardAmount());
|
||||
}
|
||||
// 处理优惠券
|
||||
if (ObjectUtil.isNotEmpty(map.get("isOilVouchers")) && "true".equals(map.get("isOilVouchers"))) {
|
||||
if (ObjectUtil.isNotEmpty(order.getCouponId())) {
|
||||
cardFavorableRecordService.updateStatus(order.getCouponId());
|
||||
if (ObjectUtil.isNotEmpty(order.getUserId())) {
|
||||
// 处理储值卡
|
||||
if (ObjectUtil.isNotEmpty(order.getBalanceAmount())) {
|
||||
userBalanceService.addUserBalance(order.getUserId(),nowAccountInfo.getChainStoreId(),order.getBalanceAmount());
|
||||
}
|
||||
// 处理屯油卡
|
||||
if (ObjectUtil.isNotEmpty(order.getOilCardAmount())) {
|
||||
userBalanceService.addUserOil(order.getOils(),order.getUserId(),nowAccountInfo.getChainStoreId(),order.getOilCardAmount());
|
||||
}
|
||||
// 处理优惠券
|
||||
if (ObjectUtil.isNotEmpty(map.get("isOilVouchers")) && "true".equals(map.get("isOilVouchers"))) {
|
||||
if (ObjectUtil.isNotEmpty(order.getCouponId())) {
|
||||
cardFavorableRecordService.updateStatus(order.getCouponId());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -137,7 +137,17 @@ public class CreditUnitServiceImpl extends ServiceImpl<CreditUnitMapper, CreditU
|
||||
|
||||
@Override
|
||||
public int updateCreditUnit(CreditUnit creditUnit) {
|
||||
int row = baseMapper.updateById(creditUnit);
|
||||
// 查询挂账单位是否存在相同名字
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("unit_name",creditUnit.getUnitName());
|
||||
queryWrapper.eq("store_id",creditUnit.getStoreId());
|
||||
CreditUnit creditUnit1 = baseMapper.selectOne(queryWrapper);
|
||||
int row = 0;
|
||||
if (ObjectUtil.isNotEmpty(creditUnit1) && creditUnit1.getId() != creditUnit.getId()){
|
||||
row = 0;
|
||||
}else {
|
||||
row = baseMapper.updateById(creditUnit);
|
||||
}
|
||||
return row;
|
||||
}
|
||||
}
|
||||
|
@ -1,26 +1,37 @@
|
||||
package com.fuint.business.order.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
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.order.entity.LJOrder;
|
||||
import com.fuint.business.order.entity.OrderGoods;
|
||||
import com.fuint.business.order.mapper.LJOrderMapper;
|
||||
import com.fuint.business.order.service.LJOrderService;
|
||||
import com.fuint.business.order.service.OrderGoodsService;
|
||||
import com.fuint.business.order.vo.Excel.LJOrderExcel;
|
||||
import com.fuint.business.order.vo.LJOrderVo;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
@Service
|
||||
public class LJOrderServiceImpl extends ServiceImpl<LJOrderMapper, LJOrder> implements LJOrderService {
|
||||
@Autowired
|
||||
@Lazy
|
||||
private OrderGoodsService orderGoodsService;
|
||||
|
||||
@Override
|
||||
public IPage<LJOrder> selectOrderList(Page page, LJOrder order) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
@ -110,4 +121,23 @@ public class LJOrderServiceImpl extends ServiceImpl<LJOrderMapper, LJOrder> impl
|
||||
public LJOrder getStatisticsByTime(Date time, Integer goodsId) {
|
||||
return baseMapper.getStatisticsByTime(time, goodsId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addGoodOrder(LJOrder order,Integer goodsId) {
|
||||
if (ObjectUtil.isEmpty(order.getOrderNo())){
|
||||
// 根据日期生成订单信息
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||
String timestamp = dateFormat.format(new Date());
|
||||
String randomString = UUID.randomUUID().toString().replace("-","").substring(0,6);
|
||||
String orderNo = "2345"+timestamp+randomString;
|
||||
order.setOrderNo(orderNo);
|
||||
}
|
||||
baseMapper.insert(order);
|
||||
LJOrder ljOrder = this.selectGoodsOrder(order.getOrderNo());
|
||||
OrderGoods orderGoods = new OrderGoods();
|
||||
orderGoods.setGoodsId(goodsId);
|
||||
orderGoods.setOrderId(ljOrder.getId());
|
||||
orderGoods.setNum(ljOrder.getGoodsNum());
|
||||
orderGoodsService.save(orderGoods);
|
||||
}
|
||||
}
|
||||
|
@ -62,10 +62,11 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
|
||||
trackService.insertStockTrack(stockTrack);
|
||||
|
||||
// 修改库存数量
|
||||
LJGoods ljGoods = goodsService.selectLJGoodsById(goods.getGoodsId());
|
||||
Integer stock = ljGoods.getStock();
|
||||
ljGoods.setStock(stock-goods.getNum());
|
||||
goodsService.updateLJGoods(ljGoods);
|
||||
// LJGoods ljGoods = goodsService.selectLJGoodsById(goods.getGoodsId());
|
||||
// Integer stock = ljGoods.getStock();
|
||||
// ljGoods.setStock(stock-goods.getNum());
|
||||
// goodsService.updateLJGoods(ljGoods);
|
||||
goodsService.subtractGoodesStockByLock(goods.getGoodsId(),goods.getNum());
|
||||
|
||||
// 添加销售统计信息
|
||||
SaleDetail saleDetail = new SaleDetail();
|
||||
|
@ -300,7 +300,7 @@
|
||||
LEFT JOIN oil_purchase p ON po.purchase_id = p.id
|
||||
WHERE
|
||||
p.STATUS = 'qrts'
|
||||
AND po.tank_id = 1
|
||||
AND po.tank_id = #{tankId}
|
||||
</select>
|
||||
|
||||
|
||||
|
@ -180,8 +180,8 @@ public class OilInventoryOrderServiceImpl implements OilInventoryOrderService {
|
||||
List<OilPurchaseOrder> oilPurchaseOrders = oilPurchaseOrderMapper.getlistByTankId(tankId);
|
||||
// 计算每个订单的平均进价并进行相加
|
||||
for (OilPurchaseOrder oilPurchaseOrder : oilPurchaseOrders) {
|
||||
bigSunPrice.add( new BigDecimal(oilPurchaseOrder.getTotalAmount().toString()));
|
||||
bigSumL.add( new BigDecimal(oilPurchaseOrder.getPurchaseVolume().toString()));
|
||||
bigSunPrice = bigSunPrice.add( new BigDecimal(oilPurchaseOrder.getTotalAmount().toString()));
|
||||
bigSumL = bigSumL.add( new BigDecimal(oilPurchaseOrder.getPurchaseVolume().toString()));
|
||||
}
|
||||
// 用总的钱数/总的量
|
||||
BigDecimal result = new BigDecimal(0);
|
||||
|
@ -159,7 +159,7 @@ public class OilTankServiceImpl implements OilTankService {
|
||||
BigDecimal totalAmountBigDecimal = new BigDecimal(totalAmount.toString());
|
||||
BigDecimal totalPriceBigDecimal = totalAmountBigDecimal.add(new BigDecimal(oilTank.getTotalPrice().toString()));
|
||||
// 计算单价
|
||||
BigDecimal discountedPriceBigDecimal = totalPriceBigDecimal.divide(storedQuantityBigDecimal,2);
|
||||
BigDecimal discountedPriceBigDecimal = totalPriceBigDecimal.divide(storedQuantityBigDecimal,2, BigDecimal.ROUND_HALF_UP);
|
||||
discountedPrice = Double.valueOf(discountedPriceBigDecimal.toString());
|
||||
} else {
|
||||
// 根据单价处理总价
|
||||
|
@ -33,5 +33,7 @@ public class ChainStoreInfo extends BaseEntity {
|
||||
private String leaderPhone;
|
||||
@TableField(exist = false)
|
||||
private List<MtStore> storeList;
|
||||
@TableField(exist = false)
|
||||
private Integer deptId;
|
||||
}
|
||||
|
||||
|
@ -10,13 +10,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
chain_store_info csi
|
||||
inner join sys_dept sd on sd.dept_id = csi.contract_dept_id
|
||||
inner join mt_store ms on ms.chain_store_id = csi.id
|
||||
where sd.ancestors like concat(#{ownDeptStr},'%')
|
||||
where (sd.ancestors like concat(#{ownDeptStr},'%') or csi.contract_dept_id = #{chainStoreInfo.contractDeptId})
|
||||
and csi.status = 'qy'
|
||||
and sd.if_delete = 0
|
||||
<if test="chainStoreInfo.storeName !=null and chainStoreInfo.storeName !=''">
|
||||
and (csi.store_name like concat('%',#{chainStoreInfo.storeName},'%') or ms.name like concat('%',#{chainStoreInfo.storeName},'%'))
|
||||
</if>
|
||||
|
||||
group by csi.id
|
||||
order by csi.create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
</mapper>
|
||||
<!--<if test="chainStoreInfo.contractDeptId !=null and chainStoreInfo.contractDeptId !=''">-->
|
||||
<!--and FIND_IN_SET(#{chainStoreInfo.contractDeptId}, sd.ancestors) > 0-->
|
||||
<!--</if>-->
|
||||
<!-- # and sd.dept_id = #{chainStoreInfo.contractDeptId}-->
|
@ -50,7 +50,15 @@ public class ChainStoreInfoServiceImpl extends ServiceImpl<ChainStoreInfoMapper,
|
||||
public IPage<ChainStoreInfo> listVo(Page page, ChainStoreInfo chainStoreInfo) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
SysDept sysDept = deptService.getById(nowAccountInfo.getDeptId());
|
||||
IPage<ChainStoreInfo> res = baseMapper.listVo(page,chainStoreInfo,sysDept.getAncestors());
|
||||
if (ObjectUtil.isEmpty(chainStoreInfo.getContractDeptId())) {
|
||||
chainStoreInfo.setContractDeptId(nowAccountInfo.getDeptId());
|
||||
}
|
||||
String ancestors = sysDept.getAncestors();
|
||||
if (!"0".equals(sysDept.getAncestors())) {
|
||||
ancestors = sysDept.getAncestors()+sysDept.getDeptId();
|
||||
}
|
||||
|
||||
IPage<ChainStoreInfo> res = baseMapper.listVo(page,chainStoreInfo,ancestors);
|
||||
res.getRecords().forEach(it->{
|
||||
LambdaQueryWrapper<MtStore> queryWrapper =new LambdaQueryWrapper<>();
|
||||
if (ObjectUtil.isNotEmpty(chainStoreInfo.getStatus())) {
|
||||
|
@ -128,17 +128,19 @@ public class LJStoreServiceImpl extends ServiceImpl<LJStoreMapper, LJStore> impl
|
||||
}else {
|
||||
LJStore store = this.selectStoreByStoreId(Integer.valueOf(storeId));
|
||||
if (store.getStatus().equals("qy") && store.getIfDelete().equals("0")){
|
||||
double dLat = Math.toRadians(Double.parseDouble(store.getLatitude()) - lat);
|
||||
double dLon = Math.toRadians(Double.parseDouble(store.getLongitude()) - lon);
|
||||
if (StringUtils.isNotEmpty(store.getLatitude()) && StringUtils.isNotEmpty(store.getLongitude())) {
|
||||
double dLat = Math.toRadians(Double.parseDouble(store.getLatitude()) - lat);
|
||||
double dLon = Math.toRadians(Double.parseDouble(store.getLongitude()) - lon);
|
||||
|
||||
double a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
|
||||
Math.cos(Math.toRadians(lat)) * Math.cos(Math.toRadians(Double.parseDouble(store.getLatitude()))) *
|
||||
Math.sin(dLon / 2) * Math.sin(dLon / 2);
|
||||
double a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
|
||||
Math.cos(Math.toRadians(lat)) * Math.cos(Math.toRadians(Double.parseDouble(store.getLatitude()))) *
|
||||
Math.sin(dLon / 2) * Math.sin(dLon / 2);
|
||||
|
||||
double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
|
||||
double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
|
||||
|
||||
double min = earthRadius * c;
|
||||
distance = min;
|
||||
double min = earthRadius * c;
|
||||
distance = min;
|
||||
}
|
||||
ljStore = store;
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ public class QRCodeServiceImpl extends ServiceImpl<QRCodeMapper, QRCode> impleme
|
||||
File file1 = new File("/temp/qrCode/");
|
||||
// 判断目录是否存在
|
||||
if (!file1.exists()) {
|
||||
file1.mkdir();
|
||||
file1.mkdirs();
|
||||
}
|
||||
|
||||
File file =new File(finalPath);
|
||||
|
@ -3,6 +3,7 @@ package com.fuint.business.userManager.mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.fuint.business.userManager.entity.UserBalance;
|
||||
import com.fuint.business.userManager.vo.UserBalanceVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface UserBalanceMapper extends BaseMapper<UserBalance> {
|
||||
|
||||
@ -10,5 +11,5 @@ public interface UserBalanceMapper extends BaseMapper<UserBalance> {
|
||||
|
||||
int updateRefuelMoney(UserBalance userBalance);
|
||||
|
||||
int addUserBalance(Integer id, Double changeCardBalance);
|
||||
int addUserBalance(@Param("id") Integer id, @Param("changeCardBalance") Double changeCardBalance);
|
||||
}
|
||||
|
@ -162,6 +162,7 @@
|
||||
and date_format(mub.create_time,'%y%m%d') <= date_format(#{user.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY mub.create_time desc
|
||||
</select>
|
||||
|
||||
<!-- 查询会员统计信息-->
|
||||
|
@ -226,15 +226,15 @@ public class LJUserGradeServiceImpl extends ServiceImpl<LJUserGradeMapper, LJUse
|
||||
this.insertUserGrade(userGrade,storeId);
|
||||
userGrade.setGrade(2);
|
||||
userGrade.setName("白金会员");
|
||||
userGrade.setGrowthValue(200);
|
||||
userGrade.setGrowthValue(500);
|
||||
this.insertUserGrade(userGrade,storeId);
|
||||
userGrade.setGrade(3);
|
||||
userGrade.setName("黄金会员");
|
||||
userGrade.setGrowthValue(300);
|
||||
userGrade.setGrowthValue(2000);
|
||||
this.insertUserGrade(userGrade,storeId);
|
||||
userGrade.setGrade(4);
|
||||
userGrade.setName("钻石会员");
|
||||
userGrade.setGrowthValue(400);
|
||||
userGrade.setGrowthValue(5000);
|
||||
this.insertUserGrade(userGrade,storeId);
|
||||
}
|
||||
|
||||
|
@ -78,21 +78,28 @@ public class UserBalanceServiceImpl extends ServiceImpl<UserBalanceMapper, UserB
|
||||
|
||||
List<Map<String, String>> resultMapList = JSON.parseObject(userBalance.getRefuelMoney(), new TypeReference<List<Map<String, Object>>>() {});
|
||||
|
||||
|
||||
|
||||
for (Map<String, String> stringStringMap : resultMapList) {
|
||||
if (oilId.equals(stringStringMap.get("oilType"))) {
|
||||
BigDecimal resRefuelMoney = new BigDecimal(stringStringMap.get("refuelMoney"));
|
||||
BigDecimal refuelMoney = resRefuelMoney.add(new BigDecimal(changeOil.toString()));
|
||||
stringStringMap.put("refuelMoney",resRefuelMoney.toString());
|
||||
break;
|
||||
if (ObjectUtil.isNotEmpty(resultMapList)) {
|
||||
for (Map<String, String> stringStringMap : resultMapList) {
|
||||
if (oilId.equals(stringStringMap.get("oilType"))) {
|
||||
BigDecimal resRefuelMoney = new BigDecimal(stringStringMap.get("refuelMoney"));
|
||||
BigDecimal refuelMoney = resRefuelMoney.add(new BigDecimal(changeOil.toString()));
|
||||
stringStringMap.put("refuelMoney",resRefuelMoney.toString());
|
||||
break;
|
||||
}
|
||||
}
|
||||
String jsonString = JSON.toJSONString(resultMapList);
|
||||
userBalance.setRefuelMoney(jsonString);
|
||||
}
|
||||
|
||||
String jsonString = JSON.toJSONString(resultMapList);
|
||||
userBalance.setRefuelMoney(jsonString);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
int row = baseMapper.updateRefuelMoney(userBalance);
|
||||
|
||||
// 增加屯油卡记录
|
||||
return row;
|
||||
}
|
||||
|
||||
@ -100,6 +107,8 @@ public class UserBalanceServiceImpl extends ServiceImpl<UserBalanceMapper, UserB
|
||||
@Override
|
||||
public int addUserBalance(Integer userId, Integer chainStoreId, Double changeBalance) {
|
||||
UserBalance userBalance = selectUserBalance(userId, chainStoreId);
|
||||
|
||||
// 增加余额记录
|
||||
return baseMapper.addUserBalance(userBalance.getId(), changeBalance);
|
||||
}
|
||||
|
||||
|
@ -155,4 +155,14 @@ public class SysDeptController extends BaseController
|
||||
public ResponseObject getCountdown() {
|
||||
return getSuccessResult(deptService.getCountdown());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前节点是否为当前登录账号的顶级节点
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/isTopLevelNodes")
|
||||
public ResponseObject isTopLevelNodes(Integer deptId) {
|
||||
return getSuccessResult(deptService.isTopLevelNodes(deptId));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -125,4 +125,6 @@ public interface ISysDeptService extends IService<SysDept>
|
||||
public int deleteDeptById(Long deptId);
|
||||
|
||||
long getCountdown();
|
||||
|
||||
boolean isTopLevelNodes(Integer deptId);
|
||||
}
|
||||
|
@ -465,4 +465,13 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper,SysDept> imple
|
||||
|
||||
return -999;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTopLevelNodes(Integer deptId) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
if (deptId.toString().equals(nowAccountInfo.getDeptId().toString())) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
server.port=8008
|
||||
env.profile=dev
|
||||
#env.properties.path=D:/workspaces/oilSystem/fuintBackend/configure/
|
||||
env.properties.path=D:/oil/oil/oilSystem/fuintBackend/configure/
|
||||
env.properties.path=D:/code/oilSystem/fuintBackend/configure/
|
||||
|
||||
|
||||
|
||||
|
@ -73,6 +73,8 @@ public class TAccount extends BaseEntity implements Serializable {
|
||||
private Long deptId;
|
||||
@TableField(exist = false)
|
||||
private String deptName;
|
||||
@TableField(exist = false)
|
||||
private String deptType;
|
||||
// @TableField(exist = false)
|
||||
private String mobile;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
<select id="listAccount" resultType="com.fuint.repository.model.TAccount">
|
||||
SELECT
|
||||
ta.*,sd.dept_name, ms.mobile
|
||||
ta.*,sd.dept_name, ms.mobile,sd.dept_type deptType
|
||||
FROM
|
||||
`t_account` ta
|
||||
left join sys_dept sd on sd.dept_id = ta.dept_id
|
||||
|
@ -1,8 +1,8 @@
|
||||
version: 1.0.0
|
||||
files:
|
||||
- url: fuint收银系统 Setup 1.0.0.exe
|
||||
- url: 蓝鲸智慧油站收银台 Setup 1.0.0.exe
|
||||
sha512: l8J4ix1xsfolq3NvAnhnnJqGvA/5vEESaDt+SJn9cld2YBC/RhWK0OuTSW+bXSm/EAfIFCciDGZ589pkTKALPg==
|
||||
size: 76790468
|
||||
path: fuint收银系统 Setup 1.0.0.exe
|
||||
path: 蓝鲸智慧油站收银台 Setup 1.0.0.exe
|
||||
sha512: l8J4ix1xsfolq3NvAnhnnJqGvA/5vEESaDt+SJn9cld2YBC/RhWK0OuTSW+bXSm/EAfIFCciDGZ589pkTKALPg==
|
||||
releaseDate: '2023-09-06T05:42:03.990Z'
|
||||
|
2
fuintCashier/env/.env
vendored
2
fuintCashier/env/.env
vendored
@ -1,3 +1,3 @@
|
||||
API_HOST = 'https://www.fuint.cn/fuint-application/'
|
||||
NODE_ENV = 'development'
|
||||
SYSTEM_NAME = 'fuint收银系统'
|
||||
SYSTEM_NAME = '蓝鲸智慧油站收银台'
|
||||
|
@ -28,7 +28,7 @@
|
||||
"url": "http://127.0.0.1"
|
||||
}
|
||||
],
|
||||
"productName": "fuint收银系统",
|
||||
"productName": "蓝鲸智慧油站收银台",
|
||||
"appId": "cn.fuint.cashier",
|
||||
"directories": {
|
||||
"output": "build"
|
||||
|
@ -59,7 +59,7 @@ function info() {
|
||||
dialog.showMessageBox({
|
||||
title: '关于',
|
||||
type: 'info',
|
||||
message: 'fuint收银系统',
|
||||
message: '蓝鲸智慧油站收银台',
|
||||
detail: `版本信息:${version}\n引擎版本:${process.versions.v8}\n当前系统:${os.type()} ${os.arch()} ${os.release()}`,
|
||||
noLink: true,
|
||||
buttons: ['查看官网', '确定']
|
||||
|
@ -1,5 +1,5 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = fuint收银系统
|
||||
VUE_APP_TITLE = 蓝鲸智慧油站收银台
|
||||
|
||||
# 测试环境配置
|
||||
ENV = 'staging'
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "fuintCashier",
|
||||
"version": "1.0.1",
|
||||
"description": "fuint收银系统",
|
||||
"description": "蓝鲸智慧油站收银台",
|
||||
"author": "FSQ",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
|
@ -7,7 +7,7 @@ var MainJS = "CLodopfuncs.js",
|
||||
URL_HTTP1 = "http://localhost:8000/" + MainJS, //http用8000/18000
|
||||
URL_HTTP2 = "http://localhost:18000/" + MainJS,
|
||||
URL_HTTP3 = "https://localhost.lodop.net:8443/" + MainJS; //https用8000/8443
|
||||
|
||||
var connectFlag = false;
|
||||
var CreatedOKLodopObject, CLodopIsLocal, LoadJsState;
|
||||
|
||||
//==判断是否需要CLodop(那些不支持插件的浏览器):==
|
||||
@ -68,6 +68,10 @@ function checkOrTryHttp() {
|
||||
}
|
||||
head.insertBefore(JS1, head.firstChild);
|
||||
}
|
||||
// 判断本地是否存在 CLodopfuncs.js 文件的函数
|
||||
function isLocalFileExist() {
|
||||
return typeof window['getLodop'] === 'undefined'; // getLodop为CLodopfuncs.js提供的全局变量名称
|
||||
}
|
||||
|
||||
//==加载Lodop对象的主过程:==
|
||||
(function loadCLodop() {
|
||||
@ -77,14 +81,27 @@ function checkOrTryHttp() {
|
||||
if (!window.WebSocket && window.MozWebSocket) window.WebSocket = window.MozWebSocket;
|
||||
//ws方式速度快(小于200ms)且可避免CORS错误,但要求Lodop版本足够新:
|
||||
try {
|
||||
var WSK1 = new WebSocket(URL_WS1);
|
||||
WSK1.onopen = function (e) { setTimeout("checkOrTryHttp();", 200); }
|
||||
WSK1.onmessage = function (e) { if (!window.getCLodop) eval(e.data); }
|
||||
WSK1.onerror = function (e) {
|
||||
var WSK2 = new WebSocket(URL_WS2);
|
||||
WSK2.onopen = function (e) { setTimeout("checkOrTryHttp();", 200); }
|
||||
WSK2.onmessage = function (e) { if (!window.getCLodop) eval(e.data); }
|
||||
WSK2.onerror = function (e) { checkOrTryHttp(); }
|
||||
if (isLocalFileExist()) {
|
||||
var WSK1 = new WebSocket(URL_WS1);
|
||||
WSK1.onopen = function (e) {
|
||||
connectFlag = true
|
||||
setTimeout("checkOrTryHttp();", 200);
|
||||
}
|
||||
WSK1.onmessage = function (e) {
|
||||
if (!window.getCLodop) eval(e.data);
|
||||
}
|
||||
WSK1.onerror = function (e) {
|
||||
var WSK2 = new WebSocket(URL_WS2);
|
||||
WSK2.onopen = function (e) {
|
||||
setTimeout("checkOrTryHttp();", 200);
|
||||
}
|
||||
WSK2.onmessage = function (e) {
|
||||
if (!window.getCLodop) eval(e.data);
|
||||
}
|
||||
WSK2.onerror = function (e) {
|
||||
checkOrTryHttp();
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
checkOrTryHttp();
|
||||
@ -93,6 +110,7 @@ function checkOrTryHttp() {
|
||||
|
||||
//==获取LODOP对象主过程,判断是否安装、需否升级:==
|
||||
function getLodop(oOBJECT, oEMBED) {
|
||||
try {
|
||||
var strFontTag = "<br><font color='#FF00FF'>打印控件";
|
||||
var strLodopInstall = strFontTag + "未安装!点击这里<a href='install_lodop32.exe' target='_self'>执行安装</a>";
|
||||
var strLodopUpdate = strFontTag + "需要升级!点击这里<a href='install_lodop32.exe' target='_self'>执行升级</a>";
|
||||
@ -110,7 +128,7 @@ function getLodop(oOBJECT, oEMBED) {
|
||||
var strLodop7Update_ARM = strLodop7FontTag + "需升级," + strLodop7HrefARM;
|
||||
var strInstallOK = ",成功后请刷新本页面或重启浏览器。</font>";
|
||||
var LODOP;
|
||||
try {
|
||||
|
||||
var isWinIE = (/MSIE/i.test(navigator.userAgent)) || (/Trident/i.test(navigator.userAgent));
|
||||
var isWinIE64 = isWinIE && (/x64/i.test(navigator.userAgent));
|
||||
var isLinuxX86 = (/Linux/i.test(navigator.platform)) && (/x86/i.test(navigator.platform));
|
||||
@ -186,4 +204,4 @@ function getLodop(oOBJECT, oEMBED) {
|
||||
alert("getLodop出错:" + err);
|
||||
}
|
||||
}
|
||||
export { getLodop };
|
||||
export { getLodop,connectFlag };
|
||||
|
@ -108,6 +108,11 @@ export const constantRoutes = [
|
||||
name: 'Integral',
|
||||
component: () => import('@/views/cashier/NewComponents/Integral'),
|
||||
},
|
||||
{
|
||||
path: '/IntegralOrder',
|
||||
name: 'Integral',
|
||||
component: () => import('@/views/cashier/NewComponents/integralOrder/pointsCashier'),
|
||||
},
|
||||
{
|
||||
path: '/Handover',
|
||||
name: 'Handover',
|
||||
|
@ -49,7 +49,7 @@ service.interceptors.request.use(config => {
|
||||
const s_url = sessionObj.url; // 请求地址
|
||||
const s_data = sessionObj.data; // 请求数据
|
||||
const s_time = sessionObj.time; // 请求时间
|
||||
const interval = 2000; // 间隔时间(ms),小于此时间视为重复提交
|
||||
const interval = 999; // 间隔时间(ms),小于此时间视为重复提交
|
||||
if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url) {
|
||||
const message = '数据正在处理,请耐心等待';
|
||||
console.warn(`[${s_url}]: ` + message)
|
||||
|
@ -62,11 +62,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>-->
|
||||
|
@ -412,6 +412,42 @@
|
||||
<el-drawer title="订单记录" :visible.sync="openOrderHistory" direction="rtl" size="1300px">
|
||||
<PointsCashier></PointsCashier>
|
||||
</el-drawer>
|
||||
|
||||
|
||||
<div id="reportSuccess" ref="report" class="box-center" v-show="false">
|
||||
<div class="box-title">积分商城订单</div>
|
||||
<div class="box-ge">
|
||||
<div v-for="item in shoppingCart" :key="item.id">
|
||||
<div class="input-box">
|
||||
<div>商品名称</div>
|
||||
<div>{{ item.giftName }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>商品数量</div>
|
||||
<div>{{ item.markPurchases }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>价格</div>
|
||||
<span v-if="item.exchangeMethod == '积分' || item.exchangeMethod == '积分+金额' || item.exchangeMethod == '积分+加钱购'">{{item.exchangePoints}}积分</span>
|
||||
<span v-if="item.exchangeMethod == '积分+金额'">+</span>
|
||||
<span v-if="item.exchangeMethod == '金额' || item.exchangeMethod == '积分+金额'">¥{{item.exchangeAmount}}</span>
|
||||
<span v-if="item.exchangeMethod == '积分+加钱购'">+{{item.moneyRatio}}加钱比例</span> </div>
|
||||
</div>
|
||||
<hr/>
|
||||
|
||||
<div class="input-box">
|
||||
<div>积分合计:</div>
|
||||
<div>{{allPoints}}</div>
|
||||
</div>
|
||||
<div class="input-box" v-if="allAmout">
|
||||
<div>总价合计:</div>
|
||||
<div>¥{{allAmout}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -428,6 +464,7 @@ import {
|
||||
import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/user";
|
||||
import {getUserGrade} from "@/api/cashier/usergrade";
|
||||
import {queryStaffs, staffInfo} from "@/api/cashier/staff";
|
||||
import {getLodop} from "@/api/LodopFuncs";
|
||||
|
||||
export default {
|
||||
name: "Integral",
|
||||
@ -558,6 +595,9 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
|
||||
// })
|
||||
// }
|
||||
|
||||
console.log("111",data.markPurchases)
|
||||
console.log("222",data.remainingInventory)
|
||||
console.log("333",data)
|
||||
|
||||
|
||||
if (data.markPurchases) {
|
||||
@ -567,6 +607,10 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
|
||||
}
|
||||
data.markPurchases = data.markPurchases+1
|
||||
}else {
|
||||
if (data.remainingInventory == 0) {
|
||||
this.$message.error('库存不足');
|
||||
return
|
||||
}
|
||||
this.$set(data, "markPurchases", 1);
|
||||
}
|
||||
this.markPurchasesAll++
|
||||
@ -968,6 +1012,8 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
|
||||
},15000)
|
||||
|
||||
}
|
||||
this.printLocally()
|
||||
|
||||
// this.paymentType = ''
|
||||
},
|
||||
// 清楚数据
|
||||
@ -993,6 +1039,90 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
|
||||
this.dialogVisiblej = false
|
||||
this.authCode = '';
|
||||
},
|
||||
async printLocally(data) {
|
||||
//初始化打印函数
|
||||
let LODOP = getLodop(); // 初始化打印
|
||||
LODOP.PRINT_INIT();
|
||||
var bodyStyle = `<style>
|
||||
.input-box{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
}
|
||||
.box-ge{
|
||||
border-bottom: 1px solid #000000 ;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
}
|
||||
.box-title{
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
margin-top: 15px;
|
||||
}
|
||||
.input-hui{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 15px 0px;
|
||||
background: #b2b2b2;
|
||||
box-sizing: border-box;
|
||||
padding: 5px 0px;
|
||||
}
|
||||
.input-hui-frou{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 15px 0px;
|
||||
background: #b2b2b2;
|
||||
box-sizing: border-box;
|
||||
padding: 5px 0px;
|
||||
div{
|
||||
width: 25%;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
.input-box-frou{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
div{
|
||||
width: 25%;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
.box-center{
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
`
|
||||
// var fromHtml = bodyStyle+this.$refs.report.innerHTML
|
||||
var fromHtml = ''
|
||||
|
||||
fromHtml = bodyStyle+this.$refs.report.innerHTML
|
||||
|
||||
|
||||
|
||||
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
|
||||
|
||||
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW",true);
|
||||
|
||||
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||
// let preview = LODOP.PREVIEW();
|
||||
// console.log("preview",preview);
|
||||
LODOP.PRINT();
|
||||
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
dialogVisiblej(newValue) {
|
||||
|
@ -4,7 +4,7 @@
|
||||
<div class="center-left">
|
||||
<div class="center-vh">
|
||||
<div class="center-left-top">
|
||||
<div class="vip-bottom" v-if="isMember == false" @click="dialogVisiblevip = true">
|
||||
<div class="vip-bottom" v-if="isMember == false" @click="queryUser">
|
||||
<div>会员搜索</div>
|
||||
</div>
|
||||
<div v-else style="width: 96%;margin: 0 auto;display: flex;justify-content: space-between">
|
||||
@ -120,14 +120,14 @@
|
||||
</div>
|
||||
<div>-¥{{ oilDiscount.toFixed(2) }}</div>
|
||||
</div>
|
||||
<div class="center-left-hj" v-show="isMember && refuelMoney">
|
||||
<div class="center-left-hj" v-show="isMember && refuelMoney1.length>0">
|
||||
<div>
|
||||
<el-checkbox
|
||||
style="color: black;font-size: 16px"
|
||||
v-model="checkAll3" @change="handleCheckAllChange3">
|
||||
</el-checkbox><!--:indeterminate="isIndeterminate3"-->
|
||||
囤油卡
|
||||
<div style="margin: 5px 0" v-for="(item,index) in refuelMoney" :key="index">
|
||||
<div style="margin: 5px 0" v-for="(item,index) in refuelMoney1" :key="index">
|
||||
({{ item.type }}卡
|
||||
<!-- <span style="color: #00afff">{{ item.oilType }}</span>-->
|
||||
余额:{{ item.refuelMoney }}L)
|
||||
@ -482,9 +482,10 @@
|
||||
<div>
|
||||
<el-input v-model="authCode"
|
||||
v-focus ref="getFocus"
|
||||
:key="inputKey"
|
||||
:key="inputKey" maxlength="10"
|
||||
@input="changeSeekZero"
|
||||
@keydown.enter.native="collection"
|
||||
oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')"
|
||||
placeholder="请输入收款金额">
|
||||
</el-input>
|
||||
</div>
|
||||
@ -862,9 +863,10 @@
|
||||
<div>
|
||||
<el-input v-model="authCode"
|
||||
v-focus ref="getFocus"
|
||||
autofocus
|
||||
@input="changeSeekZero"
|
||||
autofocus maxlength="10"
|
||||
@input="changeSeekZero1"
|
||||
@keydown.enter.native="collection1"
|
||||
oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')"
|
||||
placeholder="请输入收款金额">
|
||||
</el-input>
|
||||
</div>
|
||||
@ -1103,7 +1105,7 @@
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 支付成功后小票打印内容-->
|
||||
<!-- 支付成功后小票打印内容 收银台订单-->
|
||||
<div id="reportSuccess" ref="report" class="box-center" v-show="false">
|
||||
<div class="box-title">订单统计</div>
|
||||
<div class="box-ge">
|
||||
@ -1116,10 +1118,6 @@
|
||||
<div v-if="isMember == false">{{ item.retailPrice }}</div>
|
||||
<div v-else>¥{{ item.memberPrice }}</div>
|
||||
</div>
|
||||
<div class="input-box" v-if="rechargeBalCard">
|
||||
<div>充值金额</div>
|
||||
<div>{{ rechargeBalCard.amount ? rechargeBalCard.amount : rechargeBalCard.rechargeBalance }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>支付方式</div>
|
||||
<div v-if="payType == 'CASH'">现金</div>
|
||||
@ -1127,25 +1125,15 @@
|
||||
<div v-else-if="payType == 'ALIPAY'">支付宝</div>
|
||||
<div v-else-if="payType == 'UNIONPAY'">银联二维码</div>
|
||||
<div v-else-if="payType == 'credit'">挂账</div>
|
||||
<div v-else-if="payType == 'oilCard'">囤油卡</div>
|
||||
<div v-else-if="payType == 'balance'">储值卡</div>
|
||||
<div v-else>小程序码</div>
|
||||
</div>
|
||||
<div class="input-box" v-if="rechargeBalCard">
|
||||
<div>赠送金额</div>
|
||||
<div>¥{{ rechargeBalCard.giftBalance }}</div>
|
||||
</div>
|
||||
<div class="input-box" v-if="rechargeBalCard">
|
||||
<div>到账金额</div>
|
||||
<div>¥{{ rechargeBalCard.amount ? rechargeBalCard.giftBalance + rechargeBalCard.amount : rechargeBalCard.giftBalance + rechargeBalCard.rechargeBalance }}</div>
|
||||
</div>
|
||||
<div class="input-box" v-if="rechargeBalCard">
|
||||
<div>实付款</div>
|
||||
<div>¥{{ rechargeBalCard.amount ? rechargeBalCard.amount : rechargeBalCard.rechargeBalance }}</div>
|
||||
</div>
|
||||
<div class="input-box1">
|
||||
<div v-if="payType == 'credit'">挂账单位</div>
|
||||
<div>{{ form1.unitName }}</div>
|
||||
</div>
|
||||
<div class="input-box" v-if="!rechargeBalCard && rechargeOilCard">
|
||||
<div class="input-box">
|
||||
<div v-if="payType != 'credit'">合计</div>
|
||||
<div v-else>挂账金额</div>
|
||||
<div>¥{{ (oilAmount+(+goodsAmount)).toFixed(2) }}</div>
|
||||
@ -1162,7 +1150,7 @@
|
||||
<div>囤油卡付款</div>
|
||||
<div>¥{{ consumeRefuelMoney.toFixed(2) }}</div>
|
||||
</div>
|
||||
<div class="input-box" v-if="!rechargeBalCard && rechargeOilCard">
|
||||
<div class="input-box">
|
||||
<div>实付款</div>
|
||||
<div v-if="payType == 'credit'">¥0.00</div>
|
||||
<div v-else>¥{{ ((+oilActualPay)+(+goodsActualPay)).toFixed(2) }}</div>
|
||||
@ -1173,6 +1161,79 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 支付成功后小票打印内容 充值订单-->
|
||||
<div id="reportSuccess" ref="report1" class="box-center" v-show="false">
|
||||
<div class="box-title">订单统计</div>
|
||||
<div class="box-ge">
|
||||
<div class="input-box">
|
||||
<div>充值金额</div>
|
||||
<div>¥{{ realyPayBills }}</div>
|
||||
</div>
|
||||
<div class="input-box" v-if="cardValueForm.giftBalance">
|
||||
<div>赠送金额</div>
|
||||
<div>¥{{ cardValueForm.giftBalance }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>到账金额</div>
|
||||
<div>¥{{ cardValueForm.giftBalance + realyPayBills }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>支付方式</div>
|
||||
<div v-if="cardValueForm.paymentType == 'CASH'">现金</div>
|
||||
<div v-else-if="cardValueForm.paymentType == 'WECHAT'">微信</div>
|
||||
<div v-else-if="cardValueForm.paymentType == 'ALIPAY'">支付宝</div>
|
||||
<div v-else-if="cardValueForm.paymentType == 'UNIONPAY'">银联二维码</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>实付款</div>
|
||||
<div v-if="cardValueForm.paymentType == 'CASH'">¥{{ authCode }}</div>
|
||||
<div v-else>¥{{ realyPayBills }}</div>
|
||||
</div>
|
||||
<div class="input-box" v-if="seekZero>0">
|
||||
<div>找零</div>
|
||||
<div>¥{{ seekZero.toFixed(2) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 支付成功后小票打印内容 充值订单-->
|
||||
<div id="reportSuccess" ref="report2" class="box-center" v-show="false">
|
||||
<div class="box-title">订单统计</div>
|
||||
<div class="box-ge">
|
||||
<div class="input-box">
|
||||
<div>充值油品</div>
|
||||
<div>{{ cardFuelDieselForm.type }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>充值升数</div>
|
||||
<div>{{ cardFuelDieselForm.incomeLitres }}L</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>订单金额</div>
|
||||
<div>¥{{ realyPayBills }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>锁价金额</div>
|
||||
<div>¥{{ cardFuelDieselForm.lockupPrice }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>支付方式</div>
|
||||
<div v-if="cardFuelDieselForm.paymentType == 'CASH'">现金</div>
|
||||
<div v-else-if="cardFuelDieselForm.paymentType == 'WECHAT'">微信</div>
|
||||
<div v-else-if="cardFuelDieselForm.paymentType == 'ALIPAY'">支付宝</div>
|
||||
<div v-else-if="cardFuelDieselForm.paymentType == 'UNIONPAY'">银联二维码</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>实付款</div>
|
||||
<div>¥{{ realyPayBills }}</div>
|
||||
</div>
|
||||
<div class="input-box" v-if="seekZero>0">
|
||||
<div>找零</div>
|
||||
<div>¥{{ seekZero.toFixed(2) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -1191,7 +1252,7 @@
|
||||
import {addHangBill} from "@/api/cashier/hangbill";
|
||||
import {addCreditUnit, listCreditUnit} from "@/api/cashier/creditunit";
|
||||
import {cashierOrderByOrderNo} from "@/api/cashier/cashierorder";
|
||||
import {getLodop} from "@/api/LodopFuncs";
|
||||
import {getLodop,connectFlag} from "@/api/LodopFuncs";
|
||||
import {giftCardExchange} from "@/api/cashier/giftCard/giftcard";
|
||||
import BigNumber from "bignumber.js";
|
||||
import {
|
||||
@ -1209,8 +1270,8 @@
|
||||
components: {SelectStaff},
|
||||
data(){
|
||||
return{
|
||||
rechargeBalCard:{},
|
||||
rechargeOilCard:{},
|
||||
rechargeBalCard:false,
|
||||
rechargeOilCard:false,
|
||||
openStaff:false,
|
||||
cardFuelDieselForm: {
|
||||
mtStaffId: '',
|
||||
@ -1298,6 +1359,7 @@
|
||||
fullReduction:0,
|
||||
// 囤油卡信息
|
||||
refuelMoney:null,
|
||||
refuelMoney1:[],
|
||||
paymentActive:{
|
||||
type: 0,
|
||||
amount: 0,
|
||||
@ -1594,6 +1656,10 @@
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
queryUser(){
|
||||
this.refuelMoney = null
|
||||
this.dialogVisiblevip = true
|
||||
},
|
||||
handleDataFromChild(data) {
|
||||
this.openStaff = false
|
||||
// this.cardFuelDieselForm= {
|
||||
@ -1776,13 +1842,15 @@
|
||||
}
|
||||
},
|
||||
// 充值后更新会员信息
|
||||
getMemberAfter(){
|
||||
getUserInfoMobile({mobile:this.member.mobile}).then(res => {
|
||||
async getMemberAfter(){
|
||||
await getUserInfoMobile({mobile:this.member.mobile}).then(res => {
|
||||
if (res.data){
|
||||
this.member = res.data
|
||||
if (res.data.refuelMoney){
|
||||
this.refuelMoney = JSON.parse(res.data.refuelMoney)
|
||||
}
|
||||
this.rechargeBalCard = false
|
||||
this.rechargeOilCard = false
|
||||
}
|
||||
})
|
||||
},
|
||||
@ -1829,21 +1897,23 @@
|
||||
let this_ = this
|
||||
//
|
||||
let timer = setInterval(async () => {
|
||||
await getCheckTheStatusOfYourPaymentApi(id).then(response => {
|
||||
await getCheckTheStatusOfYourPaymentApi(id).then(async response => {
|
||||
if (response.data != null) {
|
||||
const payStatus = response.data.payStatus
|
||||
if (payStatus === "unpaid") {
|
||||
this_.isQuery = true;
|
||||
}else if (payStatus === "paid") {
|
||||
} else if (payStatus === "paid") {
|
||||
// 当支付成功时
|
||||
this_.isPaySuccess = true;
|
||||
this_.isQuery = false;
|
||||
// this_.rechargeBalCard = response.data
|
||||
// this_.printLocally()
|
||||
this_.getMemberAfter();
|
||||
}else if (payStatus === "payFail") {
|
||||
this_.rechargeBalCard = true
|
||||
await this_.printLocally1()
|
||||
await this_.getMemberAfter();
|
||||
clearInterval(timer);
|
||||
} else if (payStatus === "payFail") {
|
||||
this_.isPaySuccess = false;
|
||||
this_.isQuery = false;
|
||||
clearInterval(timer);
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -1906,7 +1976,7 @@
|
||||
|
||||
|
||||
let timer = setInterval(async () => {
|
||||
getCheckTheStatusOfYourPaymentByFuelApi(id).then(response => {
|
||||
getCheckTheStatusOfYourPaymentByFuelApi(id).then(async response => {
|
||||
if (response.data != null) {
|
||||
if (response.data.payStatus == "unpaid") {
|
||||
this_.isQuery = true;
|
||||
@ -1914,13 +1984,15 @@
|
||||
if (response.data.payStatus == "paid") {
|
||||
this_.isPaySuccess = true;
|
||||
this_.isQuery = false;
|
||||
this_.rechargeOilCard = response.data
|
||||
this_.printLocally()
|
||||
this_.getMemberAfter();
|
||||
this_.rechargeOilCard = true
|
||||
await this.printLocally2()
|
||||
await this.getMemberAfter();
|
||||
clearInterval(timer);
|
||||
}
|
||||
if (response.data.payStatus == "payFail") {
|
||||
this_.isPaySuccess = false;
|
||||
this_.isQuery = false;
|
||||
clearInterval(timer);
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -2118,11 +2190,16 @@
|
||||
this.isPay = true
|
||||
|
||||
},
|
||||
async printLocally() {
|
||||
printLocally() {
|
||||
if (!connectFlag){
|
||||
return
|
||||
}
|
||||
try {
|
||||
//初始化打印函数
|
||||
let LODOP = getLodop(); // 初始化打印
|
||||
LODOP.PRINT_INIT();
|
||||
var bodyStyle = `<style>
|
||||
if (LODOP) {
|
||||
LODOP.PRINT_INIT();
|
||||
var bodyStyle = `<style>
|
||||
.input-box{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
@ -2190,19 +2267,203 @@
|
||||
}
|
||||
</style>
|
||||
`
|
||||
var fromHtml = bodyStyle+this.$refs.report.innerHTML
|
||||
var fromHtml = bodyStyle + this.$refs.report.innerHTML
|
||||
|
||||
|
||||
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
|
||||
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
|
||||
|
||||
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW",true);
|
||||
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW", true);
|
||||
|
||||
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||
// let preview = LODOP.PREVIEW();
|
||||
// console.log("preview",preview);
|
||||
LODOP.PRINT();
|
||||
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||
// let preview = LODOP.PREVIEW();
|
||||
// console.log("preview",preview);
|
||||
LODOP.PRINT();
|
||||
}
|
||||
}catch (e){
|
||||
console.log(e,'打印机报错')
|
||||
}
|
||||
|
||||
},
|
||||
async printLocally1() {
|
||||
if (!connectFlag){
|
||||
return
|
||||
}
|
||||
//初始化打印函数
|
||||
let LODOP = getLodop(); // 初始化打印
|
||||
console.log(LODOP)
|
||||
if (LODOP) {
|
||||
LODOP.PRINT_INIT();
|
||||
var bodyStyle = `<style>
|
||||
.input-box{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
}
|
||||
.input-box1{
|
||||
width: 100%;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
}
|
||||
.box-ge{
|
||||
border-bottom: 1px solid #000000 ;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
}
|
||||
.box-title{
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
margin-top: 15px;
|
||||
}
|
||||
.input-hui{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 15px 0px;
|
||||
background: #b2b2b2;
|
||||
box-sizing: border-box;
|
||||
padding: 5px 0px;
|
||||
}
|
||||
.input-hui-frou{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 15px 0px;
|
||||
background: #b2b2b2;
|
||||
box-sizing: border-box;
|
||||
padding: 5px 0px;
|
||||
div{
|
||||
width: 25%;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
.input-box-frou{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
div{
|
||||
width: 25%;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
.box-center{
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
`
|
||||
var fromHtml = bodyStyle + this.$refs.report1.innerHTML
|
||||
|
||||
|
||||
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
|
||||
|
||||
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW", true);
|
||||
|
||||
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||
// let preview = LODOP.PREVIEW();
|
||||
// console.log("preview",preview);
|
||||
LODOP.PRINT();
|
||||
}
|
||||
|
||||
},
|
||||
async printLocally2() {
|
||||
if (!connectFlag){
|
||||
return
|
||||
}
|
||||
//初始化打印函数
|
||||
let LODOP = getLodop(); // 初始化打印
|
||||
if (LODOP) {
|
||||
LODOP.PRINT_INIT();
|
||||
var bodyStyle = `<style>
|
||||
.input-box{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
}
|
||||
.input-box1{
|
||||
width: 100%;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
}
|
||||
.box-ge{
|
||||
border-bottom: 1px solid #000000 ;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
}
|
||||
.box-title{
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
margin-top: 15px;
|
||||
}
|
||||
.input-hui{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 15px 0px;
|
||||
background: #b2b2b2;
|
||||
box-sizing: border-box;
|
||||
padding: 5px 0px;
|
||||
}
|
||||
.input-hui-frou{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 15px 0px;
|
||||
background: #b2b2b2;
|
||||
box-sizing: border-box;
|
||||
padding: 5px 0px;
|
||||
div{
|
||||
width: 25%;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
.input-box-frou{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
div{
|
||||
width: 25%;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
.box-center{
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
`
|
||||
var fromHtml = bodyStyle+this.$refs.report2.innerHTML
|
||||
|
||||
|
||||
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
|
||||
|
||||
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW",true);
|
||||
|
||||
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||
// let preview = LODOP.PREVIEW();
|
||||
// console.log("preview",preview);
|
||||
LODOP.PRINT();
|
||||
}
|
||||
},
|
||||
clear(){
|
||||
// this.autofocus = false
|
||||
this.dialogVisiblej = false
|
||||
@ -2310,16 +2571,19 @@
|
||||
obj = item;
|
||||
obj.value = `${item.unitName}(${item.personCredit} ${item.contactMobile})`
|
||||
results.push(obj)
|
||||
return;
|
||||
}
|
||||
if (item.personCredit.includes(queryString)){
|
||||
obj = item;
|
||||
obj.value = `${item.unitName}(${item.personCredit} ${item.contactMobile})`
|
||||
results.push(obj)
|
||||
return;
|
||||
}
|
||||
if (item.contactMobile.includes(queryString)){
|
||||
obj = item;
|
||||
obj.value = `${item.unitName}(${item.personCredit} ${item.contactMobile})`
|
||||
results.push(obj)
|
||||
return;
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -2329,6 +2593,10 @@
|
||||
changeSeekZero(){
|
||||
this.seekZero = this.authCode - this.oilActualPay - this.goodsActualPay
|
||||
},
|
||||
// 计算找零金额
|
||||
changeSeekZero1(){
|
||||
this.seekZero = this.authCode - this.realyPayBills
|
||||
},
|
||||
// 获取会员等级id
|
||||
getGradeName(list,id){
|
||||
let name = "";
|
||||
@ -2500,7 +2768,8 @@
|
||||
this.countAmountFull();
|
||||
},
|
||||
// 模糊查询商品信息
|
||||
querySearch(queryString, cb) {
|
||||
async querySearch(queryString, cb) {
|
||||
await this.getGoods()
|
||||
let _this = this;
|
||||
let results = _this.goodsList;
|
||||
if (queryString != ""){
|
||||
@ -2508,9 +2777,11 @@
|
||||
_this.goodsList.forEach(item => {
|
||||
if(item.name.includes(queryString)){
|
||||
results.push(item)
|
||||
return;
|
||||
}
|
||||
if(item.goodsNo.includes(queryString)){
|
||||
results.push(item)
|
||||
return;
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -3155,6 +3426,8 @@
|
||||
this.member = data;
|
||||
if (data.refuelMoney){
|
||||
this.refuelMoney = JSON.parse(data.refuelMoney)
|
||||
}else {
|
||||
this.refuelMoney = null
|
||||
}
|
||||
this.dialogVisibleMember = false;
|
||||
},
|
||||
@ -3377,6 +3650,7 @@
|
||||
for (let i = 0;i < _this.refuelMoney.length;i++){
|
||||
// 囤油卡升数变化
|
||||
if (_this.refuelMoney[i].oilType==item.oilName && _this.refuelMoney[i].refuelMoney>0){
|
||||
this.refuelMoney1.push(item)
|
||||
id = item.id
|
||||
_this.isOilStorageCard = true
|
||||
if (_this.refuelMoney[i].refuelMoney >= item.liters){
|
||||
@ -3387,10 +3661,6 @@
|
||||
hoardAmount = item.amount - (_this.refuelMoney[i].refuelMoney * item.oilPrice).toFixed(2)
|
||||
}
|
||||
}
|
||||
// }else {
|
||||
// _this.$message.error(item.liters)
|
||||
// hoardAmount = item.amount
|
||||
// }
|
||||
}
|
||||
}
|
||||
_this.consumeRefuelMoney += +conRefMon
|
||||
@ -3476,6 +3746,8 @@
|
||||
this.member = response.data
|
||||
if (response.data.refuelMoney){
|
||||
this.refuelMoney = JSON.parse(response.data.refuelMoney)
|
||||
}else {
|
||||
this.refuelMoney = null
|
||||
}
|
||||
this.storeId = response.data.storeId
|
||||
this.isSure = false
|
||||
@ -3605,24 +3877,15 @@
|
||||
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"){
|
||||
|
||||
_this.isPaySuccess = true;
|
||||
isPaySuccess = true
|
||||
_this.isPay = true;
|
||||
_this.seekZero = 0
|
||||
_this.loading = false;
|
||||
_this.amount = 0
|
||||
// for (let i =0;i<_this.oilPreferentialData.length;i++){
|
||||
// _this.oilPreferentialData[i].oilPreferential.storeId = response.data.oilOrder.storeId
|
||||
// _this.oilPreferentialData[i].oilPreferential.orderAmount = response.data.oilOrder.orderAmount
|
||||
// _this.oilPreferentialData[i].oilPreferential.userId = response.data.oilOrder.userId
|
||||
// _this.oilPreferentialData[i].oilPreferential.oilId = response.data.oilOrder.oils
|
||||
// _this.oilPreferentialData[i].oilPreferential.mtUserLevel = _this.member.gradeId
|
||||
// _this.oilPreferentialData[i].oilPreferential.cardFavorableId = _this.cardFavorableId
|
||||
// usePaymentActive(_this.oilPreferentialData[i].oilPreferential).then(res => {})
|
||||
// }
|
||||
_this.printLocally()
|
||||
_this.resetting1()
|
||||
return;
|
||||
@ -3633,8 +3896,6 @@
|
||||
_this.isPaySuccess = true;
|
||||
isPaySuccess = true
|
||||
_this.isPay = true;
|
||||
_this.seekZero = 0
|
||||
_this.amount = 0
|
||||
_this.loading = false;
|
||||
_this.printLocally()
|
||||
_this.resetting1()
|
||||
@ -3884,6 +4145,29 @@
|
||||
},
|
||||
// 支付方式
|
||||
payMethod(payType){
|
||||
if (payType == 'oilCard'){
|
||||
if (this.isMember){
|
||||
if (this.refuelMoney1.length>0){
|
||||
this.checkAll3 = true
|
||||
this.handleCheckAllChange3(true)
|
||||
}else {
|
||||
this.$message.error("请先充值囤油卡")
|
||||
return;
|
||||
}
|
||||
}else {
|
||||
this.$message.error("请先选择会员")
|
||||
return
|
||||
}
|
||||
}
|
||||
if (payType == 'balance'){
|
||||
if (this.isMember){
|
||||
this.checkAll4 = true
|
||||
this.handleCheckAllChange4(true)
|
||||
}else {
|
||||
this.$message.error("请先选择会员")
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.typeIdex = payType
|
||||
this.map.payType = payType;
|
||||
this.payType = payType;
|
||||
|
@ -236,8 +236,8 @@ export default {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #f6f8f9;
|
||||
padding-top: 0px;
|
||||
padding: 0px
|
||||
padding-top: 10px;
|
||||
padding: 10px
|
||||
}
|
||||
.box {
|
||||
padding: 10px;
|
||||
|
@ -185,9 +185,57 @@
|
||||
</div>
|
||||
<div class="app-left-title">蓝鲸油站收银 </div>
|
||||
</div>
|
||||
<div class="app-left-box" v-for="(item,index) in tabarr" :class="{'bule': leftindex == index }" :key="index" @click="gocomponents(index,item.path)">
|
||||
<i :class="item.icon" style="font-size: 18px" ></i> <div style="cursor: pointer;margin-left: 10px">{{item.name}}</div>
|
||||
<div class="app-left-box" v-for="(item,index) in tabarr" v-if="item.name !== '积分'" :class="{'bule': leftindex == item.index1}" :key="index" @click="gocomponents(index,item.path)">
|
||||
|
||||
<!-- <template v-if="item.name === '积分'">-->
|
||||
<!-- <i :class="item.icon" style="font-size: 18px" ></i> <div style="cursor: pointer;margin-left: 10px">{{item.name}}</div>-->
|
||||
<!-- <template v-if="isClick">-->
|
||||
<!-- <br/>-->
|
||||
<!-- <div style="cursor: pointer;margin-left: 10px">积分商城</div>-->
|
||||
<!-- <br/>-->
|
||||
<!-- <div style="cursor: pointer;margin-left: 10px">积分订单</div>-->
|
||||
<!-- </template>-->
|
||||
<!-- </template>-->
|
||||
<i :class="item.icon" style="font-size: 18px" ></i> <div style="cursor: pointer;margin-left: 10px">{{item.name}}</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="app-left-box2" v-for="(item,index) in tabarr" v-if="item.name === '积分'" :key="index">
|
||||
<div class="app-left-box" @click="isClickMethod()" :class="{'bule': leftindex == item.index1 }">
|
||||
<i :class="item.icon" style="font-size: 18px" ></i> <div style="cursor: pointer;margin-left: 10px">{{item.name}}</div>
|
||||
|
||||
</div>
|
||||
<!-- <transition name="el-zoom-in-top">-->
|
||||
<el-collapse-transition>
|
||||
|
||||
<div v-if="isClick">
|
||||
<div class="app-left-box" @click="gocomponents(5,'/Integral')">
|
||||
<div style="cursor: pointer;margin-left: 10px">积分商城</div>
|
||||
</div>
|
||||
<div class="app-left-box" @click="gocomponents(5,'/IntegralOrder')">
|
||||
<div style="cursor: pointer;margin-left: 10px">积分订单</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-collapse-transition>
|
||||
<!-- </transition>-->
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <el-collapse>-->
|
||||
<!-- <el-collapse-item title="v3.8.7 - 2023-12-08" title-class="no-border">-->
|
||||
<!-- <ol>-->
|
||||
<!-- <li>操作日志记录部门名称</li>-->
|
||||
<!-- <li>全局数据存储用户编号</li>-->
|
||||
<!-- <li>新增编程式判断资源访问权限</li>-->
|
||||
<!-- </ol>-->
|
||||
<!-- </el-collapse-item>-->
|
||||
<!-- </el-collapse>-->
|
||||
|
||||
|
||||
<div class="app-left-box" @click="logout">
|
||||
<div style="cursor: pointer;margin-left: 10px">退出登录</div>
|
||||
</div>
|
||||
@ -260,17 +308,23 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isClick:false,
|
||||
activeName: 'second',
|
||||
tabarr:[
|
||||
{name:'收银台',icon:'el-icon-s-platform',path:'/homeindex'},
|
||||
{name:'收银台',icon:'el-icon-s-platform',path:'/homeindex' ,index1:0},
|
||||
// {name:'充值',icon: 'el-icon-s-finance',path:'/Recharge'},
|
||||
{name:'订单',icon: 'el-icon-s-order',path:'/Order'},
|
||||
{name:'会员',icon: 'el-icon-s-custom',path:'/Vip'},
|
||||
{name:'核销',icon: 'el-icon-s-check',path:'/WriteOff'},
|
||||
{name:'挂账管理',icon:'el-icon-s-claim',path:'/credit'},
|
||||
{name:'积分',icon:'el-icon-s-data',path:'/Integral'},
|
||||
{name:'交班',icon: 'el-icon-s-flag',path:'/Handover'},
|
||||
{name:'订单',icon: 'el-icon-s-order',path:'/Order',index1:1},
|
||||
{name:'会员',icon: 'el-icon-s-custom',path:'/Vip',index1:2},
|
||||
{name:'核销',icon: 'el-icon-s-check',path:'/WriteOff',index1:3},
|
||||
{name:'挂账管理',icon:'el-icon-s-claim',path:'/credit',index1:4},
|
||||
{name:'积分',icon:'el-icon-s-data',path:'/Integral',index1:5},
|
||||
{name:'交班',icon: 'el-icon-s-flag',path:'/Handover',index1:6},
|
||||
],
|
||||
tabarr2:[
|
||||
{name:'积分',icon:'el-icon-s-data',path:'/Integral'},
|
||||
{name:'订单记录',icon:'el-icon-s-data',path:'/Integral'},
|
||||
],
|
||||
|
||||
leftindex:0,
|
||||
oilList:[
|
||||
{color:'#e5f0ff'},
|
||||
@ -411,6 +465,10 @@ export default {
|
||||
// this.getCartList();
|
||||
},
|
||||
methods: {
|
||||
isClickMethod() {
|
||||
this.leftindex = 5
|
||||
this.isClick = !this.isClick
|
||||
},
|
||||
handleChange(value) {
|
||||
console.log(value);
|
||||
},
|
||||
@ -875,6 +933,11 @@ export default {
|
||||
font-weight: 700;
|
||||
color: #5393ff !important;
|
||||
}
|
||||
|
||||
//.bule1{
|
||||
// font-weight: 700;
|
||||
// color: #81b0ff !important;
|
||||
//}
|
||||
.app-left{
|
||||
width: 180px;
|
||||
height: 100vh;
|
||||
@ -1354,4 +1417,21 @@ export default {
|
||||
::v-deep .el-tabs--border-card > .el-tabs__content {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.no-border .el-collapse-item__header {
|
||||
border-bottom: none;
|
||||
}
|
||||
.el-menu {
|
||||
border-right: solid 0px #ffffff;
|
||||
list-style-type: none; /* 隐藏列表项的默认符号 */
|
||||
position: relative;
|
||||
margin: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
.el-submenu .el-menu-item {
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
padding: 0 39px;
|
||||
min-width: 0px;
|
||||
}
|
||||
</style>
|
||||
|
@ -325,7 +325,8 @@
|
||||
width="25%"
|
||||
:visible.sync="dialogRefund">
|
||||
<div style="text-align: center;font-weight: bold">
|
||||
¥<span style="font-size: 35px">{{ cashierOrder.payAmount }}</span>
|
||||
<!-- ¥<span style="font-size: 35px">{{ cashierOrder.payAmount }}</span>-->
|
||||
¥<span style="font-size: 35px">{{ cashierOrder.goodsPayAmount + cashierOrder.oilPayAmount }}</span>
|
||||
</div>
|
||||
<div class="tk">退款金额</div>
|
||||
<div class="tk">退款单号:{{ cashierOrder.orderNo }}</div>
|
||||
@ -333,20 +334,20 @@
|
||||
<span>退款内容:</span>
|
||||
<br>
|
||||
<span>商品:</span>
|
||||
<el-checkbox v-model="isGoods">¥{{cashierOrder.goodsPayAmount}}</el-checkbox>
|
||||
<el-checkbox v-model="isGoods" @click="calculateRefunds()">¥{{cashierOrder.goodsPayAmount}}</el-checkbox>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
<span>油品:</span>
|
||||
<template >
|
||||
<el-checkbox v-if="oilInfo.length > 0" v-model="isOil">
|
||||
<el-checkbox v-if="oilInfo.length > 0" v-model="isOil" @click="calculateRefunds()">
|
||||
|
||||
<span v-if="oilInfo[0].payAmount && oilInfo[0].payAmount!='0.00'"> ¥{{cashierOrder.oilPayAmount}}</span>
|
||||
<span v-if="oilInfo[0].balanceAmount>0">储值卡:{{oilInfo[0].balanceAmount}} </span>
|
||||
<span v-if="oilInfo[0].oilCardAmount>0">屯油卡:{{ oilInfo[0].oilCardAmount}} </span>
|
||||
</el-checkbox>
|
||||
<el-checkbox v-if="oilInfo.length > 0 && oilInfo[0].couponId" v-model="isOilVouchers">优惠卷</el-checkbox>
|
||||
<el-checkbox v-if="isOil && oilInfo.length > 0 && oilInfo[0].couponId" v-model="isOilVouchers">优惠卷</el-checkbox>
|
||||
|
||||
<!-- <el-checkbox v-if="oilInfo.length > 0 && oilInfo[0].balanceAmount>0" v-model="isOilCard">储值卡:{{oilInfo[0].balanceAmount}}</el-checkbox>-->
|
||||
<!-- <el-checkbox v-if="oilInfo.length > 0 && oilInfo[0].oilCardAmount>0" v-model="isOilFuel">屯油卡:{{ oilInfo[0].oilCardAmount }}</el-checkbox>-->
|
||||
@ -427,6 +428,70 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="reportSuccess2" ref="report2" class="box-center" v-show="false">
|
||||
<div class="box-title">订单退款</div>
|
||||
<div class="box-ge">
|
||||
<div v-if="isOil" v-for="item in oilInfo" :key="item.id">
|
||||
<div class="input-box">
|
||||
<div>{{ getName(oilNameList,item.oils) }}/{{ getName1(oilGunList,item.oilGunNum) }}</div>
|
||||
<div>¥{{ item.orderAmount }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>加油升数</div>
|
||||
<div>{{ item.oilNum }}L</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="isOil">
|
||||
<div v-if="oilInfo[0].balanceAmount>0" class="input-box">
|
||||
<div>储值卡</div>
|
||||
<div>{{oilInfo[0].balanceAmount}}</div>
|
||||
</div>
|
||||
<div v-if="oilInfo[0].oilCardAmount>0" class="input-box">
|
||||
<div>屯油卡</div>
|
||||
<div>{{ oilInfo[0].oilCardAmount}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div v-if="isGoods" v-for="item in goodsInfo" :key="item.id">
|
||||
<div class="input-box">
|
||||
<div>商品名称:</div>
|
||||
<div>{{ item.name }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>商品数量:</div>
|
||||
<div>{{ item.num }}{{ item.unit }}</div>
|
||||
</div>
|
||||
<div class="input-box" v-if="!cashierOrder.userId">
|
||||
<div>商品单价:</div>
|
||||
<div>¥{{ item.retailPrice }}</div>
|
||||
</div>
|
||||
<div class="input-box" v-else>
|
||||
<div>商品单价:</div>
|
||||
<div>¥{{ item.memberPrice }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>支付方式</div>
|
||||
<div v-if="cashierOrder.payType == 'CASH'">现金</div>
|
||||
<div v-else-if="cashierOrder.payType == 'WECHAT'">微信</div>
|
||||
<div v-else-if="cashierOrder.payType == 'ALIPAY'">支付宝</div>
|
||||
<div v-else-if="cashierOrder.payType == 'UNIONPAY'">银联二维码</div>
|
||||
<div v-else>小程序码</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>合计:</div>
|
||||
<div>¥{{ cashierOrder.amount }}</div>
|
||||
</div>
|
||||
|
||||
<div class="input-box">
|
||||
<div>实退款:</div>
|
||||
<div>¥{{ calculateRefundsV }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -443,7 +508,7 @@ import {getOilNameList} from "@/api/cashier/oilnumgun";
|
||||
import {getOrderGoods} from "@/api/cashier/goodsorder";
|
||||
import {exportExcelCashierApi} from "@/api/order/exportExcel";
|
||||
import {refundApi} from "@/api/cashier/refund";
|
||||
import {getLodop} from "@/api/LodopFuncs";
|
||||
import {connectFlag, getLodop} from "@/api/LodopFuncs";
|
||||
import {getOilNumberGun} from "@/api/cashier/oilGuns";
|
||||
import {formatDate} from "@/utils";
|
||||
import ScanPayCodeDialog from "@/views/cashier/components/scanPayCodeDialog.vue";
|
||||
@ -453,6 +518,7 @@ import ScanPayCodeDialog from "@/views/cashier/components/scanPayCodeDialog.vue"
|
||||
components: {ScanPayCodeDialog},
|
||||
data(){
|
||||
return{
|
||||
calculateRefundsV:0,
|
||||
// 退款备注
|
||||
refundRemark:"",
|
||||
radio1:"油号选错",
|
||||
@ -563,7 +629,11 @@ import ScanPayCodeDialog from "@/views/cashier/components/scanPayCodeDialog.vue"
|
||||
return name;
|
||||
},
|
||||
|
||||
async printLocally() {
|
||||
async printLocally(data) {
|
||||
if (!connectFlag){
|
||||
return
|
||||
}
|
||||
|
||||
//初始化打印函数
|
||||
let LODOP = getLodop(); // 初始化打印
|
||||
LODOP.PRINT_INIT();
|
||||
@ -630,7 +700,14 @@ import ScanPayCodeDialog from "@/views/cashier/components/scanPayCodeDialog.vue"
|
||||
}
|
||||
</style>
|
||||
`
|
||||
var fromHtml = bodyStyle+this.$refs.report.innerHTML
|
||||
// var fromHtml = bodyStyle+this.$refs.report.innerHTML
|
||||
var fromHtml = ''
|
||||
if (data == 'report') {
|
||||
fromHtml = bodyStyle+this.$refs.report.innerHTML
|
||||
}else {
|
||||
fromHtml = bodyStyle+this.$refs.report2.innerHTML
|
||||
|
||||
}
|
||||
|
||||
|
||||
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
|
||||
@ -655,7 +732,7 @@ import ScanPayCodeDialog from "@/views/cashier/components/scanPayCodeDialog.vue"
|
||||
})
|
||||
await this.getOilList(this.cashierOrder.orderNo)
|
||||
await this.getGoodsLists(this.cashierOrder.goodsOrderId)
|
||||
this.printLocally()
|
||||
this.printLocally('report')
|
||||
}).catch(() => {});
|
||||
},
|
||||
// 退款
|
||||
@ -699,10 +776,34 @@ import ScanPayCodeDialog from "@/views/cashier/components/scanPayCodeDialog.vue"
|
||||
// });
|
||||
},
|
||||
|
||||
// 计算退款总价
|
||||
calculateRefunds() {
|
||||
let refundAmt = 0
|
||||
if (this.isGoods) {
|
||||
refundAmt += this.cashierOrder.goodsPayAmount
|
||||
}
|
||||
if (this.isOil && this.cashierOrder.oilPayAmount > 0) {
|
||||
refundAmt += this.cashierOrder.oilPayAmount
|
||||
}
|
||||
|
||||
this.calculateRefundsV = refundAmt;
|
||||
},
|
||||
|
||||
async refundConfirmed() {
|
||||
this.calculateRefunds();
|
||||
if(!this.isOil && !this.isGoods) {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '请选择退款项'
|
||||
});
|
||||
return
|
||||
}
|
||||
this.dialogRefund = false;
|
||||
this.loading = true;
|
||||
console.log("cashierOrder",this.cashierOrder)
|
||||
|
||||
|
||||
|
||||
// 计算退款总价
|
||||
let refundAmt = 0
|
||||
if (this.isGoods) {
|
||||
@ -730,10 +831,14 @@ import ScanPayCodeDialog from "@/views/cashier/components/scanPayCodeDialog.vue"
|
||||
refundAmt: refundAmt
|
||||
}
|
||||
await refundApi(map).then(res=>{
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '退款成功'
|
||||
});
|
||||
if(res.code == 200) {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '退款成功'
|
||||
});
|
||||
this.printLocally()
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
this.loading = false;
|
||||
|
@ -301,7 +301,7 @@ import {getDicts} from "@/api/dict/data";
|
||||
import { exportExcelGoodsOrderApi } from "@/api/order/exportExcel";
|
||||
import {cashierOrder} from "@/api/cashier/cashierorder";
|
||||
import {refundApi, getOrderInfoApi} from "@/api/cashier/refund";
|
||||
import {getLodop} from "@/api/LodopFuncs";
|
||||
import {connectFlag, getLodop} from "@/api/LodopFuncs";
|
||||
|
||||
export default {
|
||||
name: "order_Cashier",
|
||||
@ -399,6 +399,9 @@ export default {
|
||||
},
|
||||
|
||||
async printLocally() {
|
||||
if (!connectFlag){
|
||||
return
|
||||
}
|
||||
//初始化打印函数
|
||||
let LODOP = getLodop(); // 初始化打印
|
||||
LODOP.PRINT_INIT();
|
||||
|
@ -349,7 +349,7 @@
|
||||
import {cashierOrder} from "@/api/cashier/cashierorder";
|
||||
import {getOrderInfoApi, refundApi} from "@/api/cashier/refund";
|
||||
import {exportExcelOilOrderApi} from "@/api/order/exportExcel";
|
||||
import {getLodop} from "@/api/LodopFuncs";
|
||||
import {connectFlag, getLodop} from "@/api/LodopFuncs";
|
||||
import {getInfoByIdApi} from "@/api/cashier/cardfavorablerecord";
|
||||
|
||||
export default {
|
||||
@ -429,6 +429,9 @@
|
||||
},
|
||||
methods:{
|
||||
async printLocally() {
|
||||
if (!connectFlag){
|
||||
return
|
||||
}
|
||||
//初始化打印函数
|
||||
let LODOP = getLodop(); // 初始化打印
|
||||
LODOP.PRINT_INIT();
|
||||
|
@ -260,7 +260,7 @@ import {listOilOrder, oilOrderInfo} from "@/api/cashier/oilorder";
|
||||
import {getOilNameList} from "@/api/cashier/oilnumgun";
|
||||
import {getOilNumberGun} from "@/api/cashier/oilGuns";
|
||||
import {refundApi} from "@/api/cashier/refund";
|
||||
import {getLodop} from "@/api/LodopFuncs";
|
||||
import {connectFlag, getLodop} from "@/api/LodopFuncs";
|
||||
|
||||
export default {
|
||||
name: "order_Cashier",
|
||||
@ -390,6 +390,9 @@ import {getLodop} from "@/api/LodopFuncs";
|
||||
},
|
||||
|
||||
async printLocally() {
|
||||
if (!connectFlag){
|
||||
return
|
||||
}
|
||||
//初始化打印函数
|
||||
let LODOP = getLodop(); // 初始化打印
|
||||
LODOP.PRINT_INIT();
|
||||
|
@ -281,7 +281,7 @@ import {getDicts} from "@/api/dict/data";
|
||||
import {queryStaffs} from "@/api/cashier/staff";
|
||||
import {refundApi} from "@/api/cashier/refund";
|
||||
import {exportExcelVipApi} from "@/api/order/exportExcel";
|
||||
import {getLodop} from "@/api/LodopFuncs";
|
||||
import {connectFlag, getLodop} from "@/api/LodopFuncs";
|
||||
|
||||
export default {
|
||||
name: "order_Cashier",
|
||||
@ -379,6 +379,9 @@ export default {
|
||||
},
|
||||
|
||||
async printLocally() {
|
||||
if (!connectFlag){
|
||||
return
|
||||
}
|
||||
//初始化打印函数
|
||||
let LODOP = getLodop(); // 初始化打印
|
||||
LODOP.PRINT_INIT();
|
||||
|
@ -69,16 +69,29 @@
|
||||
</el-select>
|
||||
</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>
|
||||
@ -203,11 +216,7 @@
|
||||
<div>{{ scope.row.consumeNum }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="注册时间" align="center" width="160" prop="createTime">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="注册时间" align="center" width="160" prop="balCreateTime"/>
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.status == 'qy'">启用</el-tag>
|
||||
@ -521,6 +530,8 @@
|
||||
openPoint: false,
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
beginTime:"",
|
||||
endTime:"",
|
||||
// 默认排序
|
||||
defaultSort: {prop: 'updateTime', order: 'descending'},
|
||||
// 表单参数
|
||||
@ -587,7 +598,12 @@
|
||||
// 查询列表
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listUser(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
||||
let dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
listUser(this.addDateRange(this.queryParams, dateRange)).then( response => {
|
||||
this.list = response.data.records;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
@ -596,7 +612,12 @@
|
||||
},
|
||||
// 获得统计信息
|
||||
getStatistic(){
|
||||
listStatistic(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
||||
let dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
listStatistic(this.addDateRange(this.queryParams, dateRange)).then( response => {
|
||||
this.addNum = response.data.addNum;
|
||||
this.yesterdayAddNum = response.data.yesterdayAddNum;
|
||||
if (!response.data.balance) {
|
||||
@ -636,6 +657,8 @@
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams.storeIds = '';
|
||||
this.storeIds = [];
|
||||
this.beginTime = ""
|
||||
this.endTime = ""
|
||||
this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order);
|
||||
this.handleQuery();
|
||||
},
|
||||
|
@ -445,15 +445,16 @@
|
||||
<div>
|
||||
<el-input v-model="authCode"
|
||||
v-focus ref="getFocus"
|
||||
autofocus
|
||||
autofocus maxlength="10"
|
||||
@input="changeSeekZero"
|
||||
@keydown.enter.native="collection"
|
||||
oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')"
|
||||
placeholder="请输入收款金额">
|
||||
</el-input>
|
||||
</div>
|
||||
<div style="text-align: right;margin: 10px 0">
|
||||
<span>应找零</span>
|
||||
<span style="color: red;font-size: 18px"> ¥{{ seekZero }}</span>
|
||||
<span style="color: red;font-size: 18px"> ¥{{ seekZero.toFixed(2) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
@ -814,6 +815,80 @@
|
||||
<el-button type="primary" @click="submitSubCard">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<!-- 支付成功后小票打印内容 充值订单-->
|
||||
<div id="reportSuccess" ref="report1" class="box-center" v-show="false">
|
||||
<div class="box-title">订单统计</div>
|
||||
<div class="box-ge">
|
||||
<div class="input-box">
|
||||
<div>充值金额</div>
|
||||
<div>¥{{ realyPayBills }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>赠送金额</div>
|
||||
<div>¥{{ cardValueForm.giftBalance }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>到账金额</div>
|
||||
<div>¥{{ cardValueForm.giftBalance + realyPayBills }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>支付方式</div>
|
||||
<div v-if="cardValueForm.paymentType == 'CASH'">现金</div>
|
||||
<div v-else-if="cardValueForm.paymentType == 'WECHAT'">微信</div>
|
||||
<div v-else-if="cardValueForm.paymentType == 'ALIPAY'">支付宝</div>
|
||||
<div v-else-if="cardValueForm.paymentType == 'UNIONPAY'">银联二维码</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>实付款</div>
|
||||
<div v-if="cardValueForm.paymentType == 'CASH'">¥{{ authCode }}</div>
|
||||
<div v-else>¥{{ realyPayBills }}</div>
|
||||
</div>
|
||||
<div class="input-box" v-if="seekZero>0">
|
||||
<div>找零</div>
|
||||
<div>¥{{ seekZero.toFixed(2) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 支付成功后小票打印内容 充值订单-->
|
||||
<div id="reportSuccess" ref="report2" class="box-center" v-show="false">
|
||||
<div class="box-title">订单统计</div>
|
||||
<div class="box-ge">
|
||||
<div class="input-box">
|
||||
<div>充值油品</div>
|
||||
<div>{{ cardFuelDieselForm.type }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>充值升数</div>
|
||||
<div>{{ cardFuelDieselForm.incomeLitres }}L</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>订单金额</div>
|
||||
<div>¥{{ realyPayBills }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>锁价金额</div>
|
||||
<div>¥{{ cardFuelDieselForm.lockupPrice }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>支付方式</div>
|
||||
<div v-if="cardFuelDieselForm.paymentType == 'CASH'">现金</div>
|
||||
<div v-else-if="cardFuelDieselForm.paymentType == 'WECHAT'">微信</div>
|
||||
<div v-else-if="cardFuelDieselForm.paymentType == 'ALIPAY'">支付宝</div>
|
||||
<div v-else-if="cardFuelDieselForm.paymentType == 'UNIONPAY'">银联二维码</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>实付款</div>
|
||||
<div>¥{{ realyPayBills }}</div>
|
||||
</div>
|
||||
<div class="input-box" v-if="seekZero>0">
|
||||
<div>找零</div>
|
||||
<div>¥{{ seekZero.toFixed(2) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -853,6 +928,7 @@ import {getUserGradeInfo} from "@/api/cashier/usergrade";
|
||||
import {getDicts} from "@/api/dict/data";
|
||||
import {getSysConfig} from "@/api/cashier/user/sysconfig";
|
||||
import {giftCardExchange} from "@/api/cashier/giftCard/giftcard";
|
||||
import {connectFlag, getLodop} from "@/api/LodopFuncs";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@ -874,6 +950,8 @@ export default {
|
||||
dicts: ['official', 'zhzt', 'zcrzdj', 'payment_type','pay_status'],
|
||||
data() {
|
||||
return {
|
||||
rechargeBalCard:false,
|
||||
rechargeOilCard:false,
|
||||
orderList:[],
|
||||
openSubCard1:false,
|
||||
baseUrl: process.env.VUE_APP_BASE_API,
|
||||
@ -1063,9 +1141,9 @@ export default {
|
||||
// 计算找零金额
|
||||
changeSeekZero(){
|
||||
if (this.flag === 1) {
|
||||
this.seekZero = (this.authCode - this.realyPayBills).toFixed(2)
|
||||
this.seekZero = this.authCode - this.realyPayBills
|
||||
} else if (this.flag === 2) {
|
||||
this.seekZero = (this.authCode - this.realyPayBills).toFixed(2)
|
||||
this.seekZero = this.authCode - this.realyPayBills
|
||||
}
|
||||
},
|
||||
getName(list,type){
|
||||
@ -1460,6 +1538,8 @@ export default {
|
||||
// _this.refuelMoney = parseFloat(refuelMoney[0].refuelMoney)
|
||||
}
|
||||
this.getGrade(response.data.gradeId);
|
||||
this.rechargeBalCard = false
|
||||
this.rechargeOilCard = false
|
||||
});
|
||||
},
|
||||
getAllAmount(){
|
||||
@ -1550,6 +1630,186 @@ export default {
|
||||
|
||||
},
|
||||
|
||||
async printLocally1() {
|
||||
if (!connectFlag){
|
||||
return
|
||||
}
|
||||
//初始化打印函数
|
||||
let LODOP = getLodop(); // 初始化打印
|
||||
if (LODOP) {
|
||||
LODOP.PRINT_INIT();
|
||||
var bodyStyle = `<style>
|
||||
.input-box{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
}
|
||||
.input-box1{
|
||||
width: 100%;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
}
|
||||
.box-ge{
|
||||
border-bottom: 1px solid #000000 ;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
}
|
||||
.box-title{
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
margin-top: 15px;
|
||||
}
|
||||
.input-hui{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 15px 0px;
|
||||
background: #b2b2b2;
|
||||
box-sizing: border-box;
|
||||
padding: 5px 0px;
|
||||
}
|
||||
.input-hui-frou{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 15px 0px;
|
||||
background: #b2b2b2;
|
||||
box-sizing: border-box;
|
||||
padding: 5px 0px;
|
||||
div{
|
||||
width: 25%;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
.input-box-frou{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
div{
|
||||
width: 25%;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
.box-center{
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
`
|
||||
var fromHtml = bodyStyle + this.$refs.report1.innerHTML
|
||||
|
||||
|
||||
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
|
||||
|
||||
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW", true);
|
||||
|
||||
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||
// let preview = LODOP.PREVIEW();
|
||||
// console.log("preview",preview);
|
||||
LODOP.PRINT();
|
||||
}
|
||||
|
||||
},
|
||||
async printLocally2() {
|
||||
if (!connectFlag){
|
||||
return
|
||||
}
|
||||
//初始化打印函数
|
||||
let LODOP = getLodop(); // 初始化打印
|
||||
if (LODOP) {
|
||||
LODOP.PRINT_INIT();
|
||||
var bodyStyle = `<style>
|
||||
.input-box{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
}
|
||||
.input-box1{
|
||||
width: 100%;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
}
|
||||
.box-ge{
|
||||
border-bottom: 1px solid #000000 ;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
}
|
||||
.box-title{
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
margin-top: 15px;
|
||||
}
|
||||
.input-hui{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 15px 0px;
|
||||
background: #b2b2b2;
|
||||
box-sizing: border-box;
|
||||
padding: 5px 0px;
|
||||
}
|
||||
.input-hui-frou{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 15px 0px;
|
||||
background: #b2b2b2;
|
||||
box-sizing: border-box;
|
||||
padding: 5px 0px;
|
||||
div{
|
||||
width: 25%;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
.input-box-frou{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
div{
|
||||
width: 25%;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
.box-center{
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
`
|
||||
var fromHtml = bodyStyle + this.$refs.report2.innerHTML
|
||||
|
||||
|
||||
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
|
||||
|
||||
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW", true);
|
||||
|
||||
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||
// let preview = LODOP.PREVIEW();
|
||||
// console.log("preview",preview);
|
||||
LODOP.PRINT();
|
||||
}
|
||||
|
||||
},
|
||||
async collection() {
|
||||
let actualPayment = 0
|
||||
let makeChange = 0
|
||||
@ -1593,16 +1853,20 @@ export default {
|
||||
let this_ = this
|
||||
//
|
||||
let timer = setInterval(async () => {
|
||||
await getCheckTheStatusOfYourPaymentApi(id).then(response => {
|
||||
await getCheckTheStatusOfYourPaymentApi(id).then(async response => {
|
||||
if (response.data != null) {
|
||||
const payStatus = response.data.payStatus
|
||||
if (payStatus === "unpaid") {
|
||||
this_.isQuery = true;
|
||||
}else if (payStatus === "paid") {
|
||||
} else if (payStatus === "paid") {
|
||||
// 当支付成功时
|
||||
this_.isPaySuccess = true;
|
||||
this_.isQuery = false;
|
||||
}else if (payStatus === "payFail") {
|
||||
this_.rechargeBalCard = true
|
||||
await this_.printLocally1()
|
||||
await this_.getUserInfo()
|
||||
clearInterval(timer);
|
||||
} else if (payStatus === "payFail") {
|
||||
this_.isPaySuccess = false;
|
||||
this_.isQuery = false;
|
||||
}
|
||||
@ -1667,7 +1931,7 @@ export default {
|
||||
|
||||
|
||||
let timer = setInterval(async () => {
|
||||
getCheckTheStatusOfYourPaymentByFuelApi(id).then(response => {
|
||||
getCheckTheStatusOfYourPaymentByFuelApi(id).then(async response => {
|
||||
if (response.data != null) {
|
||||
if (response.data.payStatus == "unpaid") {
|
||||
this_.isQuery = true;
|
||||
@ -1675,6 +1939,10 @@ export default {
|
||||
if (response.data.payStatus == "paid") {
|
||||
this_.isPaySuccess = true;
|
||||
this_.isQuery = false;
|
||||
this_.rechargeOilCard = true
|
||||
await this_.printLocally2()
|
||||
await this_.getUserInfo()
|
||||
clearInterval(timer);
|
||||
}
|
||||
if (response.data.payStatus == "payFail") {
|
||||
this_.isPaySuccess = false;
|
||||
|
@ -98,7 +98,7 @@
|
||||
<view class="dis-bt">
|
||||
<view class="">
|
||||
<view class="hui1">{{ store.address }}</view>
|
||||
<view class="hui2" v-if="distance!=''">{{ distance }}km</view>
|
||||
<view class="hui2" v-if="distance">{{ distance }}km</view>
|
||||
</view>
|
||||
<view class="lananniu" @click="goGoGo" v-if="distance!=''">
|
||||
<uni-icons type="paperplane-filled" color="#195ADA" size="16"></uni-icons>
|
||||
@ -363,7 +363,6 @@
|
||||
// this.getAddress();
|
||||
uni.getSetting({
|
||||
async success(res) {
|
||||
// console.log(res, 111,"dingw")
|
||||
if (!res.authSetting['scope.userLocation']) {
|
||||
// uni.authorize({
|
||||
// scope: 'scope.userLocation',
|
||||
@ -518,6 +517,7 @@
|
||||
_this.distance = (Math.ceil(response.data.distance))
|
||||
.toFixed(1)
|
||||
_this.store = response.data.store
|
||||
console.log(response,"storeId");
|
||||
uni.setStorageSync("storeId", response.data.store.id)
|
||||
uni.setStorageSync("chainStoreId", response.data.store.chainStoreId)
|
||||
// console.log(uni.getStorageSync("chainStoreId"));
|
||||
@ -572,6 +572,7 @@
|
||||
let params = {
|
||||
storeId: uni.getStorageSync("storeId")
|
||||
}
|
||||
console.log(uni.getStorageSync("storeId"));
|
||||
request({
|
||||
url: 'business/petrolStationManagement/oilNumber/getList2',
|
||||
method: 'get',
|
||||
|
@ -361,7 +361,7 @@
|
||||
method: 'get',
|
||||
}).then((res) => {
|
||||
_this.oilNumberList = res.data;
|
||||
if (res.data) {
|
||||
if (res.data.length>0) {
|
||||
// _this.getOilGun(res.data[0].numberId);
|
||||
_this.oilPrice = res.data[0].oilPrice
|
||||
_this.oilUnit = res.data[0].unit
|
||||
|
@ -63,7 +63,7 @@ const request = config => {
|
||||
})
|
||||
reject('无效的会话,或者会话已过期,请重新登录。')
|
||||
} else if (code === 1001) {
|
||||
showConfirm('您暂未登录,您可以继续留在该页面,或者重新登录?').then(res => {
|
||||
showConfirm('登录状态已过期,您可以继续留在该页面,或者重新登录?').then(res => {
|
||||
console.log("res", res)
|
||||
if (res.confirm) {
|
||||
uni.reLaunch({
|
||||
|
Loading…
Reference in New Issue
Block a user