Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
c971b639eb
@ -11,6 +11,6 @@ VUE_APP_BASE_API = '/dev-api'
|
|||||||
VUE_APP_PUBLIC_PATH = '/'
|
VUE_APP_PUBLIC_PATH = '/'
|
||||||
|
|
||||||
# 后端接口地址
|
# 后端接口地址
|
||||||
VUE_APP_SERVER_URL = 'http://192.168.0.178:8008/'
|
VUE_APP_SERVER_URL = 'http://192.168.0.138:8008/'
|
||||||
|
|
||||||
|
|
||||||
# http://192.168.1.6:8008/
|
|
||||||
|
@ -49,6 +49,7 @@ Vue.prototype.addDateRange = addDateRange
|
|||||||
Vue.prototype.getName = getName
|
Vue.prototype.getName = getName
|
||||||
Vue.prototype.download = download
|
Vue.prototype.download = download
|
||||||
Vue.prototype.handleTree = handleTree
|
Vue.prototype.handleTree = handleTree
|
||||||
|
Vue.prototype.imgurl = 'http://192.168.0.138:8008'
|
||||||
// 全局组件挂载
|
// 全局组件挂载
|
||||||
Vue.component('DictTag', DictTag)
|
Vue.component('DictTag', DictTag)
|
||||||
Vue.component('Pagination', Pagination)
|
Vue.component('Pagination', Pagination)
|
||||||
|
@ -49,16 +49,17 @@
|
|||||||
<!-- </el-row>-->
|
<!-- </el-row>-->
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="recordList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="recordList" @selection-change="handleSelectionChange">
|
||||||
<!-- <el-table-column type="selection" width="55" align="center" />-->
|
|
||||||
<!-- <el-table-column label="主键id" align="center" prop="id" />-->
|
|
||||||
<!-- <el-table-column label="员工id" align="center" prop="mtStaffId" />-->
|
|
||||||
<!-- <el-table-column label="兑换券id" align="center" prop="cardExchangeId" />-->
|
|
||||||
<!-- <el-table-column label="员工手机号码" align="center" prop="staffMobile" />-->
|
|
||||||
<!-- <el-table-column label="员工姓名" align="center" prop="realName" />-->
|
|
||||||
<el-table-column label="序号" align="center" prop="mtUserId" />
|
<el-table-column label="序号" align="center" prop="mtUserId" />
|
||||||
<el-table-column label="手机号码" align="center" prop="mobile" />
|
<el-table-column label="手机号码" align="center" prop="mobile" />
|
||||||
<el-table-column label="名字" align="center" prop="name" />
|
<el-table-column label="名字" align="center" prop="name" />
|
||||||
<el-table-column label="头像" align="center" prop="photo" />
|
<el-table-column label="头像" align="center" prop="photo" >
|
||||||
|
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-avatar size="medium" :src="imgUrl + scope.row.photo"></el-avatar>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="开始时间" align="center" prop="startTime" width="180">
|
<el-table-column label="开始时间" align="center" prop="startTime" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.startTime }}</span>
|
<span>{{ scope.row.startTime }}</span>
|
||||||
@ -202,6 +203,7 @@ export default {
|
|||||||
name: "Record",
|
name: "Record",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
imgUrl:this.imgurl,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
@ -250,6 +252,8 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
console.log(this.imgUrl)
|
||||||
|
console.log(this.imgurl)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询兑换券领取记录列表 */
|
/** 查询兑换券领取记录列表 */
|
||||||
|
@ -369,19 +369,13 @@
|
|||||||
methods:{
|
methods:{
|
||||||
//
|
//
|
||||||
radiovalue(lable){
|
radiovalue(lable){
|
||||||
/*this.queryParamss.type = lable;
|
|
||||||
console.log("222222222222"+queryParamss)
|
|
||||||
getList(this.queryParamss).then(res=>{
|
|
||||||
if(res.code == 200){
|
|
||||||
this.tableData = res.data.records
|
|
||||||
this.total = res.data.total;
|
|
||||||
}
|
|
||||||
})*/
|
|
||||||
this.oilList = []
|
this.oilList = []
|
||||||
oilName(this.queryParams.type).then(res=>{
|
oilName(this.queryParams.type).then(res=>{
|
||||||
this.oilList = res.data.records
|
this.oilList = res.data.records
|
||||||
console.log('我的油站' ,res)
|
console.log('我的油站' ,res)
|
||||||
})
|
})
|
||||||
|
this.getlist()
|
||||||
|
|
||||||
},
|
},
|
||||||
getlist(){
|
getlist(){
|
||||||
|
@ -292,7 +292,7 @@
|
|||||||
},
|
},
|
||||||
total:0,
|
total:0,
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -61,24 +61,7 @@
|
|||||||
<el-table-column label="ID" align="center" prop="id" width="80" />
|
<el-table-column label="ID" align="center" prop="id" width="80" />
|
||||||
<el-table-column label="姓名" align="center" prop="realName" />
|
<el-table-column label="姓名" align="center" prop="realName" />
|
||||||
<el-table-column label="手机号" align="center" prop="mobile" width="110"/>
|
<el-table-column label="手机号" align="center" prop="mobile" width="110"/>
|
||||||
<!-- <el-table-column label="核销权限" align="center" prop="writeOff"/>-->
|
|
||||||
<!-- <el-table-column label="特殊权限" align="center" prop="specialPrem">-->
|
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- <span>{{scope.row.specialPrem ? scope.row.specialPrem : "--"}}</span>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<!-- <el-table-column label="退款权限" align="center" prop="refund">-->
|
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- <dict-tag :options="dict.type.ywqx" :value="scope.row.refund"/>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<!-- <el-table-column label="核销码" align="center" prop="writeOffCode">-->
|
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- <span @click="getQRcode(scope.row.writeOffCode,'woc')">-->
|
|
||||||
<!-- <svg t="1701161298120" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4306" width="16" height="16"><path d="M384 64l-249.6 0c-51.2 0-89.6 41.6-89.6 89.6l0 227.2c0 51.2 41.6 89.6 89.6 89.6l249.6 0c51.2 0 89.6-41.6 89.6-89.6l0-227.2C473.6 105.6 435.2 64 384 64zM428.8 380.8c0 25.6-19.2 44.8-44.8 44.8l-249.6 0c-25.6 0-44.8-19.2-44.8-44.8l0-227.2c0-25.6 19.2-44.8 44.8-44.8l249.6 0c25.6 0 44.8 19.2 44.8 44.8L428.8 380.8z" p-id="4307"></path><path d="M192 192l134.4 0 0 134.4-134.4 0 0-134.4Z" p-id="4308"></path><path d="M377.6 544l-243.2 0c-48 0-86.4 38.4-86.4 89.6l0 220.8c0 48 38.4 89.6 86.4 89.6l243.2 0c48 0 86.4-38.4 86.4-89.6l0-220.8C467.2 582.4 425.6 544 377.6 544zM422.4 851.2c0 25.6-19.2 44.8-44.8 44.8l-243.2 0c-25.6 0-44.8-19.2-44.8-44.8l0-220.8c0-25.6 19.2-44.8 44.8-44.8l243.2 0c25.6 0 44.8 19.2 44.8 44.8L422.4 851.2z" p-id="4309"></path><path d="M192 668.8l131.2 0 0 131.2-131.2 0 0-131.2Z" p-id="4310"></path><path d="M633.6 470.4l249.6 0c51.2 0 89.6-41.6 89.6-89.6l0-227.2c0-51.2-41.6-89.6-89.6-89.6l-249.6 0c-51.2 0-89.6 41.6-89.6 89.6l0 227.2C544 432 585.6 470.4 633.6 470.4zM588.8 153.6c0-25.6 19.2-44.8 44.8-44.8l249.6 0c25.6 0 44.8 19.2 44.8 44.8l0 227.2c0 25.6-19.2 44.8-44.8 44.8l-249.6 0c-25.6 0-44.8-19.2-44.8-44.8L588.8 153.6z" p-id="4311"></path><path d="M700.8 192l134.4 0 0 134.4-134.4 0 0-134.4Z" p-id="4312"></path><path d="M572.8 716.8l137.6 0c12.8 0 22.4-9.6 22.4-22.4l0-137.6c0-12.8-9.6-22.4-22.4-22.4l-137.6 0c-12.8 0-22.4 9.6-22.4 22.4l0 137.6C550.4 707.2 560 716.8 572.8 716.8z" p-id="4313"></path><path d="M886.4 563.2l0 38.4c0 12.8 12.8 25.6 25.6 25.6l38.4 0c12.8 0 25.6-12.8 25.6-25.6l0-38.4c0-12.8-12.8-25.6-25.6-25.6l-38.4 0C899.2 537.6 886.4 547.2 886.4 563.2z" p-id="4314"></path><path d="M582.4 944l48 0c12.8 0 22.4-9.6 22.4-22.4l0-48c0-12.8-9.6-22.4-22.4-22.4l-48 0c-12.8 0-22.4 9.6-22.4 22.4l0 48C560 934.4 569.6 944 582.4 944z" p-id="4315"></path><path d="M944 704l-99.2 0c-16 0-28.8 12.8-28.8 28.8l0 44.8-48 0c-19.2 0-32 12.8-32 32l0 99.2c0 16 12.8 28.8 28.8 28.8l179.2 3.2c16 0 28.8-12.8 28.8-28.8l0-179.2C972.8 716.8 960 704 944 704z" p-id="4316"></path></svg>-->
|
|
||||||
<!-- </span>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<el-table-column label="员工码" align="center" prop="staffCode">
|
<el-table-column label="员工码" align="center" prop="staffCode">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span @click="getStaffQRcode(scope.row.id)">
|
<span @click="getStaffQRcode(scope.row.id)">
|
||||||
@ -92,13 +75,7 @@
|
|||||||
<el-tag type="info" v-if="scope.row.status=='jy'">禁用</el-tag>
|
<el-tag type="info" v-if="scope.row.status=='jy'">禁用</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="公众号" align="center" prop="official">-->
|
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- <span v-if="scope.row.official">-->
|
|
||||||
<!-- <dict-tag :options="dict.type.official" :value="scope.row.official"/>-->
|
|
||||||
<!-- </span>-->
|
|
||||||
<!-- <span v-else>--</span>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
<!-- </el-table-column>-->
|
||||||
<el-table-column label="一键加油" align="center" prop="isRefuel">
|
<el-table-column label="一键加油" align="center" prop="isRefuel">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -172,14 +149,7 @@
|
|||||||
:label="item.dutyName"
|
:label="item.dutyName"
|
||||||
:value="item.dutyId"
|
:value="item.dutyId"
|
||||||
></el-option>
|
></el-option>
|
||||||
<!-- <el-option-->
|
|
||||||
<!-- v-for="dict in dict.type.staff_role"-->
|
|
||||||
<!-- :key="dict.value"-->
|
|
||||||
<!-- :label="dict.label"-->
|
|
||||||
<!-- :value="dict.value"-->
|
|
||||||
<!-- />-->
|
|
||||||
<!-- <el-option value="普通员工">普通员工</el-option>-->
|
|
||||||
<!-- <el-option value="收银员">收银员</el-option>-->
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -190,54 +160,18 @@
|
|||||||
<el-input v-model="form.password" type="password" placeholder="请输入登录密码" maxlength="30"/>
|
<el-input v-model="form.password" type="password" placeholder="请输入登录密码" maxlength="30"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="8">-->
|
|
||||||
<!-- <el-form-item label="退款权限" prop="refund">-->
|
|
||||||
<!-- <el-select v-model="form.refund" placeholder="请选择权限">-->
|
|
||||||
<!-- <el-option-->
|
|
||||||
<!-- v-for="dict in dict.type.ywqx"-->
|
|
||||||
<!-- :key="dict.value"-->
|
|
||||||
<!-- :label="dict.label"-->
|
|
||||||
<!-- :value="dict.value"-->
|
|
||||||
<!-- />-->
|
|
||||||
<!-- </el-select>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col :span="8">-->
|
|
||||||
<!-- <el-form-item label="退款密码" prop="refundPassword">-->
|
|
||||||
<!-- <el-input v-model="form.refundPassword" type="password" placeholder="请输入退款密码" maxlength="30"/>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<!-- <el-col :span="8" style="display: flex;margin-bottom: 20px">-->
|
|
||||||
<!-- <template>-->
|
|
||||||
<!-- <span style="margin-right: 10px">核销权限</span>-->
|
|
||||||
<!-- <el-checkbox-group v-model="writeOff" ref="" @change="getCheckbox">-->
|
|
||||||
<!-- <el-checkbox-->
|
|
||||||
<!-- v-for="dict in dict.type.write_off"-->
|
|
||||||
<!-- :key="dict.value"-->
|
|
||||||
<!-- :label="dict.label"-->
|
|
||||||
<!-- :value="dict.value"-->
|
|
||||||
<!-- ></el-checkbox>-->
|
|
||||||
<!-- </el-checkbox-group>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col :span="16" style="display: flex">-->
|
|
||||||
<!-- <span style="margin-right: 10px">特殊权限</span>-->
|
|
||||||
<!-- <el-checkbox-group v-model="specialPrem" @change="getCheckbox">-->
|
|
||||||
<!-- <el-checkbox-->
|
|
||||||
<!-- v-for="dict in dict.type.special_prem"-->
|
|
||||||
<!-- :key="dict.value"-->
|
|
||||||
<!-- :label="dict.label"-->
|
|
||||||
<!-- :value="dict.value"-->
|
|
||||||
<!-- ></el-checkbox>-->
|
|
||||||
<!-- </el-checkbox-group>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row :span="24">
|
||||||
<el-col :span="24" style="display: flex;margin-bottom: 10px">
|
<el-col :span="2" style="display: flex;margin-bottom: 10px">
|
||||||
<span style="margin-right: 10px;width: 70px">审核权限</span>
|
<span style="margin-right: 10px;width: 70px">审核权限</span>
|
||||||
<el-checkbox-group v-model="auditPrem" @change="getCheckbox">
|
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="22" style="display: flex;margin-bottom: 10px">
|
||||||
|
<el-checkbox-group v-model="form.auditPrem" @change="getCheckbox">
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
v-for="dict in dict.type.shqx"
|
v-for="dict in dict.type.shqx"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
@ -245,7 +179,10 @@
|
|||||||
:value="dict.value"
|
:value="dict.value"
|
||||||
></el-checkbox>
|
></el-checkbox>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
|
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@ -268,48 +205,7 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="8">-->
|
|
||||||
<!-- <el-form-item label="POS加油员" prop="pos">-->
|
|
||||||
<!-- <el-select v-model="form.pos">-->
|
|
||||||
<!-- <el-option-->
|
|
||||||
<!-- v-for="dict in dict.type.zhzt"-->
|
|
||||||
<!-- :key="dict.value"-->
|
|
||||||
<!-- :label="dict.label"-->
|
|
||||||
<!-- :value="dict.value"-->
|
|
||||||
<!-- />-->
|
|
||||||
<!-- </el-select>-->
|
|
||||||
<!-- <br/>-->
|
|
||||||
<!-- <el-tooltip-->
|
|
||||||
<!-- class="item"-->
|
|
||||||
<!-- effect="dark"-->
|
|
||||||
<!-- placement="bottom">-->
|
|
||||||
<!-- <div slot="content"> 启用后,当前账户登录POS端后油品收银必选加油员才可进行<br/>下步操作(需系统开启加油选择加油员功能) </div>-->
|
|
||||||
<!-- <span>启用后,当前账户登录...</span>-->
|
|
||||||
<!-- </el-tooltip>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col :span="8">-->
|
|
||||||
<!-- <el-form-item label="交易统计" prop="transaction">-->
|
|
||||||
<!-- <el-select v-model="form.transaction">-->
|
|
||||||
<!-- <el-option-->
|
|
||||||
<!-- v-for="dict in dict.type.transaction"-->
|
|
||||||
<!-- :key="dict.value"-->
|
|
||||||
<!-- :label="dict.label"-->
|
|
||||||
<!-- :value="dict.value"-->
|
|
||||||
<!-- />-->
|
|
||||||
<!-- </el-select>-->
|
|
||||||
<!-- <br/>-->
|
|
||||||
<!-- <el-tooltip-->
|
|
||||||
<!-- class="item"-->
|
|
||||||
<!-- effect="dark"-->
|
|
||||||
<!-- placement="bottom">-->
|
|
||||||
<!-- <div slot="content"> 交易订单显示信息、终端支持:(PC、<br/>POS、小程序) </div>-->
|
|
||||||
<!-- <span>交易订单显示信息...</span>-->
|
|
||||||
<!-- </el-tooltip>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- </el-row>-->
|
|
||||||
<!-- <el-row>-->
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="收款通知" prop="notice">
|
<el-form-item label="收款通知" prop="notice">
|
||||||
<el-select v-model="form.notice">
|
<el-select v-model="form.notice">
|
||||||
@ -330,206 +226,10 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="8">-->
|
|
||||||
<!-- <el-form-item label="指定油枪" prop="oilGunId" v-show="form.notice == 'zdyx'">-->
|
|
||||||
<!-- <el-select v-model="form.oilGunId">-->
|
|
||||||
<!-- <el-option-->
|
|
||||||
<!-- v-for="dict in dict.type.notice"-->
|
|
||||||
<!-- :key="dict.value"-->
|
|
||||||
<!-- :label="dict.label"-->
|
|
||||||
<!-- :value="dict.value"-->
|
|
||||||
<!-- />-->
|
|
||||||
<!-- </el-select>-->
|
|
||||||
<!-- <br/>-->
|
|
||||||
<!-- <el-tooltip-->
|
|
||||||
<!-- class="item"-->
|
|
||||||
<!-- effect="dark"-->
|
|
||||||
<!-- placement="bottom">-->
|
|
||||||
<!-- <div slot="content">多选,已选油枪号的交易将发送<br/>模板消息)</div>-->
|
|
||||||
<!-- <span>多选,已选油枪号...</span>-->
|
|
||||||
<!-- </el-tooltip>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col :span="8">-->
|
|
||||||
<!-- <el-form-item label="时间范围" prop="timeFrame">-->
|
|
||||||
<!-- <el-select v-model="form.timeFrame">-->
|
|
||||||
<!-- <el-option-->
|
|
||||||
<!-- v-for="dict in dict.type.time_frame"-->
|
|
||||||
<!-- :key="dict.value"-->
|
|
||||||
<!-- :label="dict.label"-->
|
|
||||||
<!-- :value="dict.value"-->
|
|
||||||
<!-- />-->
|
|
||||||
<!-- </el-select>-->
|
|
||||||
<!-- <br/>-->
|
|
||||||
<!-- <el-tooltip-->
|
|
||||||
<!-- class="item"-->
|
|
||||||
<!-- effect="dark"-->
|
|
||||||
<!-- placement="bottom">-->
|
|
||||||
<!-- <div slot="content">当前账户下可查看交易的时间范围(PC、<br/>POS端)</div>-->
|
|
||||||
<!-- <span>当前账户下可查看...</span>-->
|
|
||||||
<!-- </el-tooltip>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- <el-row>-->
|
|
||||||
<!-- <el-col :span="8">-->
|
|
||||||
<!-- <el-form-item label="交班模式" prop="handoverMode">-->
|
|
||||||
<!-- <el-select v-model="form.handoverMode">-->
|
|
||||||
<!-- <el-option-->
|
|
||||||
<!-- v-for="dict in dict.type.handover"-->
|
|
||||||
<!-- :key="dict.value"-->
|
|
||||||
<!-- :label="dict.label"-->
|
|
||||||
<!-- :value="dict.value"-->
|
|
||||||
<!-- />-->
|
|
||||||
<!-- </el-select>-->
|
|
||||||
<!-- <br/>-->
|
|
||||||
<!-- <span> 根据需求自行选择模式 </span>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col :span="8">-->
|
|
||||||
<!-- <el-form-item label="交班权限" prop="handoverPrem">-->
|
|
||||||
<!-- <el-select v-model="form.handoverPrem" placeholder="请选择所属店铺">-->
|
|
||||||
<!-- <el-option-->
|
|
||||||
<!-- v-for="dict in dict.type.ywqx"-->
|
|
||||||
<!-- :key="dict.value"-->
|
|
||||||
<!-- :label="dict.label"-->
|
|
||||||
<!-- :value="dict.value"-->
|
|
||||||
<!-- />-->
|
|
||||||
<!-- </el-select>-->
|
|
||||||
<!-- <br/>-->
|
|
||||||
<!-- <el-tooltip-->
|
|
||||||
<!-- class="item"-->
|
|
||||||
<!-- effect="dark"-->
|
|
||||||
<!-- placement="bottom">-->
|
|
||||||
<!-- <div slot="content"> 若无权限,则无法查看交班统计信息和<br/>进行交班操作 </div>-->
|
|
||||||
<!-- <span>若无权限,则无法查看...</span>-->
|
|
||||||
<!-- </el-tooltip>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col :span="8">-->
|
|
||||||
<!-- <el-form-item label="交班退出" prop="handoverOut">-->
|
|
||||||
<!-- <el-select v-model="form.handoverOut">-->
|
|
||||||
<!-- <el-option-->
|
|
||||||
<!-- v-for="dict in dict.type.handover_quit"-->
|
|
||||||
<!-- :key="dict.value"-->
|
|
||||||
<!-- :label="dict.label"-->
|
|
||||||
<!-- :value="dict.value"-->
|
|
||||||
<!-- />-->
|
|
||||||
<!-- </el-select>-->
|
|
||||||
<!-- <br/>-->
|
|
||||||
<!-- <el-tooltip-->
|
|
||||||
<!-- class="item"-->
|
|
||||||
<!-- effect="dark"-->
|
|
||||||
<!-- placement="bottom">-->
|
|
||||||
<!-- <div slot="content"> 进行交班处理后是否退出当前账户 </div>-->
|
|
||||||
<!-- <span>进行交班处理后是否...</span>-->
|
|
||||||
<!-- </el-tooltip>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- </el-row>-->
|
|
||||||
<!-- <el-row>-->
|
|
||||||
<!-- <el-col :span="8">-->
|
|
||||||
<!-- <el-form-item label="交班记录" prop="record">-->
|
|
||||||
<!-- <el-select v-model="form.record">-->
|
|
||||||
<!-- <el-option-->
|
|
||||||
<!-- v-for="dict in dict.type.jbjl"-->
|
|
||||||
<!-- :key="dict.value"-->
|
|
||||||
<!-- :label="dict.label"-->
|
|
||||||
<!-- :value="dict.value"-->
|
|
||||||
<!-- />-->
|
|
||||||
<!-- </el-select>-->
|
|
||||||
<!-- <br/>-->
|
|
||||||
<!-- <el-tooltip-->
|
|
||||||
<!-- class="item"-->
|
|
||||||
<!-- effect="dark"-->
|
|
||||||
<!-- placement="bottom">-->
|
|
||||||
<!-- <div slot="content"> 全部记录:查看所有员工交班记录,名下<br/>记录:员工自己名下记录(需有交班权限才可查看),<br/>禁用权限:无权限查看交班记录,记录为空 </div>-->
|
|
||||||
<!-- <span>全部记录:查看所有...</span>-->
|
|
||||||
<!-- </el-tooltip>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col :span="8">-->
|
|
||||||
<!-- <el-form-item label="交班商户号" prop="merchantStatus">-->
|
|
||||||
<!-- <el-select v-model="form.merchantStatus">-->
|
|
||||||
<!-- <el-option-->
|
|
||||||
<!-- v-for="dict in dict.type.zhzt"-->
|
|
||||||
<!-- :key="dict.value"-->
|
|
||||||
<!-- :label="dict.label"-->
|
|
||||||
<!-- :value="dict.value"-->
|
|
||||||
<!-- />-->
|
|
||||||
<!-- </el-select>-->
|
|
||||||
<!-- <br/>-->
|
|
||||||
<!-- <el-tooltip-->
|
|
||||||
<!-- class="item"-->
|
|
||||||
<!-- effect="dark"-->
|
|
||||||
<!-- placement="bottom">-->
|
|
||||||
<!-- <div slot="content"> 交班信息是否显示商户号统计信息,禁<br/>用后当前员工则无商户号统计信息 </div>-->
|
|
||||||
<!-- <span>交班信息是否显示商...</span>-->
|
|
||||||
<!-- </el-tooltip>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col :span="8">-->
|
|
||||||
<!-- <el-form-item label="员工筛选" prop="screen">-->
|
|
||||||
<!-- <el-select v-model="form.screen">-->
|
|
||||||
<!-- <el-option-->
|
|
||||||
<!-- v-for="dict in dict.type.zhzt"-->
|
|
||||||
<!-- :key="dict.value"-->
|
|
||||||
<!-- :label="dict.label"-->
|
|
||||||
<!-- :value="dict.value"-->
|
|
||||||
<!-- />-->
|
|
||||||
<!-- </el-select>-->
|
|
||||||
<!-- <br/>-->
|
|
||||||
<!-- <el-tooltip-->
|
|
||||||
<!-- class="item"-->
|
|
||||||
<!-- effect="dark"-->
|
|
||||||
<!-- placement="bottom">-->
|
|
||||||
<!-- <div slot="content"> 交易信息是否可以筛选员工进行查<br/>询,启用后可筛选、则反之 </div>-->
|
|
||||||
<!-- <span>交易信息是否可以...</span>-->
|
|
||||||
<!-- </el-tooltip>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- </el-row>-->
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<!-- <el-col :span="8">-->
|
|
||||||
<!-- <el-form-item label="POS权限" prop="posPrem">-->
|
|
||||||
<!-- <div class="block">-->
|
|
||||||
<!-- <el-cascader-->
|
|
||||||
<!-- v-model="posPrem"-->
|
|
||||||
<!-- :options="posOptions"-->
|
|
||||||
<!-- :props="props"-->
|
|
||||||
<!-- @change="handleNodeClick1"-->
|
|
||||||
<!-- clearable></el-cascader>-->
|
|
||||||
<!-- <br/>-->
|
|
||||||
<!-- <el-tooltip-->
|
|
||||||
<!-- class="item"-->
|
|
||||||
<!-- effect="dark"-->
|
|
||||||
<!-- placement="bottom">-->
|
|
||||||
<!-- <div slot="content"> POS手持机中功能对应操作权限 </div>-->
|
|
||||||
<!-- <span>POS手持机中...</span>-->
|
|
||||||
<!-- </el-tooltip>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col :span="8">-->
|
|
||||||
<!-- <el-form-item label="小程序权限" prop="appletPrem">-->
|
|
||||||
<!-- <div class="block">-->
|
|
||||||
<!-- <el-cascader-->
|
|
||||||
<!-- v-model="appletPrem"-->
|
|
||||||
<!-- :options="appletOptions"-->
|
|
||||||
<!-- :props="props"-->
|
|
||||||
<!-- @change="handleNodeClick2"-->
|
|
||||||
<!-- clearable></el-cascader>-->
|
|
||||||
<!-- <br/>-->
|
|
||||||
<!-- <el-tooltip-->
|
|
||||||
<!-- class="item"-->
|
|
||||||
<!-- effect="dark"-->
|
|
||||||
<!-- placement="bottom">-->
|
|
||||||
<!-- <div slot="content"> 小程序管理端功能对应操作权限 </div>-->
|
|
||||||
<!-- <span>小程序管理端功能...</span>-->
|
|
||||||
<!-- </el-tooltip>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="账户状态" prop="status">
|
<el-form-item label="账户状态" prop="status">
|
||||||
<el-select v-model="form.status">
|
<el-select v-model="form.status">
|
||||||
@ -808,7 +508,7 @@ export default {
|
|||||||
getCheckbox(){
|
getCheckbox(){
|
||||||
this.form.writeOff = this.writeOff.toString();
|
this.form.writeOff = this.writeOff.toString();
|
||||||
this.form.specialPrem = this.specialPrem.toString();
|
this.form.specialPrem = this.specialPrem.toString();
|
||||||
this.form.auditPrem = this.auditPrem.toString();
|
this.form.auditPrem = this.form.auditPrem.toString();
|
||||||
},
|
},
|
||||||
// 页面跳转
|
// 页面跳转
|
||||||
toTarget(url) {
|
toTarget(url) {
|
||||||
@ -884,7 +584,7 @@ export default {
|
|||||||
this.posPrem = '';
|
this.posPrem = '';
|
||||||
this.appletPrem = '';
|
this.appletPrem = '';
|
||||||
this.writeOff = [];
|
this.writeOff = [];
|
||||||
this.auditPrem = [];
|
this.form.auditPrem = [];
|
||||||
this.form = {
|
this.form = {
|
||||||
id:'', userId:'', mobile:'', realName:'', wechat:'', merchantId:'', storeId:'', auditedStatus:'A',
|
id:'', userId:'', mobile:'', realName:'', wechat:'', merchantId:'', storeId:'', auditedStatus:'A',
|
||||||
auditedTime:'', description:'', isRefuel:'yc', handoverMode:'dqmdtyjb', handoverPrem:'yqx', handoverOut:'jbtc', record:'qbjl',
|
auditedTime:'', description:'', isRefuel:'yc', handoverMode:'dqmdtyjb', handoverPrem:'yqx', handoverOut:'jbtc', record:'qbjl',
|
||||||
@ -950,8 +650,8 @@ export default {
|
|||||||
this.form.refundPassword = '123456'
|
this.form.refundPassword = '123456'
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "编辑员工信息";
|
this.title = "编辑员工信息";
|
||||||
if (this.auditPrem.length > 0){
|
if (this.form.auditPrem.length > 0){
|
||||||
this.auditPrem = this.form.auditPrem.split(",");
|
this.form.auditPrem = this.form.auditPrem.split(",");
|
||||||
}
|
}
|
||||||
if (this.writeOff.length > 0){
|
if (this.writeOff.length > 0){
|
||||||
this.writeOff = this.form.writeOff.split(",");
|
this.writeOff = this.form.writeOff.split(",");
|
||||||
|
@ -11,7 +11,6 @@ VUE_APP_BASE_API = '/dev-api'
|
|||||||
VUE_APP_PUBLIC_PATH = '/'
|
VUE_APP_PUBLIC_PATH = '/'
|
||||||
|
|
||||||
# 后端接口地址
|
# 后端接口地址
|
||||||
VUE_APP_SERVER_URL = 'http://192.168.0.178:8008/'
|
VUE_APP_SERVER_URL = 'http://192.168.0.138:8008/'
|
||||||
|
|
||||||
|
|
||||||
# cp端地址
|
|
||||||
VUE_PC_SERVER_URL = 'http://192.168.0.178:82/'
|
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
package com.fuint.api.fuyou.controller;
|
package com.fuint.api.fuyou.controller;
|
||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
import com.fuint.api.fuyou.entity.Const;
|
import com.fuint.api.fuyou.entity.Const;
|
||||||
import com.fuint.api.fuyou.service.FyPayService;
|
import com.fuint.api.fuyou.service.FyPayService;
|
||||||
import com.fuint.api.fuyou.util.Utils;
|
import com.fuint.api.fuyou.util.Utils;
|
||||||
import com.fuint.business.integral.service.IntegralOrdersService;
|
import com.fuint.business.integral.service.IntegralOrdersService;
|
||||||
|
import com.fuint.business.marketingActivity.cardFule.service.CardFuelRecordService;
|
||||||
import com.fuint.business.marketingActivity.cardValue.service.CardValueRecordService;
|
import com.fuint.business.marketingActivity.cardValue.service.CardValueRecordService;
|
||||||
import com.fuint.business.order.entity.AllOrderInfo;
|
import com.fuint.business.order.entity.AllOrderInfo;
|
||||||
import com.fuint.business.order.entity.OilOrder;
|
import com.fuint.business.order.entity.OilOrder;
|
||||||
@ -37,13 +39,16 @@ public class FyPayController {
|
|||||||
private CardValueRecordService cardValueRecordService;
|
private CardValueRecordService cardValueRecordService;
|
||||||
@Autowired
|
@Autowired
|
||||||
@Lazy
|
@Lazy
|
||||||
|
private CardFuelRecordService cardFuelRecordService;
|
||||||
|
@Autowired
|
||||||
|
@Lazy
|
||||||
private AllOrderInfoService allOrderInfoService;
|
private AllOrderInfoService allOrderInfoService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private RedisLock redisLock;
|
private RedisLock redisLock;
|
||||||
|
|
||||||
// 接收支付平台异步通知的接口
|
// 接收支付平台异步通知的接口
|
||||||
@PostMapping("/notify")
|
@PostMapping("/notify")
|
||||||
public String notifyUrl(HttpServletRequest request,HttpServletResponse response) throws UnsupportedEncodingException {
|
public String notifyUrl(HttpServletRequest request,HttpServletResponse response) throws UnsupportedEncodingException, JsonProcessingException {
|
||||||
System.out.println("----------------收到支付回调--------"+request.getParameter("req"));
|
System.out.println("----------------收到支付回调--------"+request.getParameter("req"));
|
||||||
String notifyData = request.getParameter("req");
|
String notifyData = request.getParameter("req");
|
||||||
String decode = URLDecoder.decode(notifyData, Const.charset);
|
String decode = URLDecoder.decode(notifyData, Const.charset);
|
||||||
@ -74,7 +79,7 @@ public class FyPayController {
|
|||||||
return "0";
|
return "0";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void updateOrderStatus(String orderNo,String type){
|
public void updateOrderStatus(String orderNo,String type) throws JsonProcessingException {
|
||||||
if ("1".equals(type)) {
|
if ("1".equals(type)) {
|
||||||
orderService.updateOrderStatus(orderNo,"paid");
|
orderService.updateOrderStatus(orderNo,"paid");
|
||||||
}else if ("4".equals(type)) {
|
}else if ("4".equals(type)) {
|
||||||
@ -83,6 +88,8 @@ public class FyPayController {
|
|||||||
|
|
||||||
}else if ("3".equals(type)){
|
}else if ("3".equals(type)){
|
||||||
cardValueRecordService.rechargeFinallDeal(orderNo);
|
cardValueRecordService.rechargeFinallDeal(orderNo);
|
||||||
|
}else if ("5".equals(type)){
|
||||||
|
cardFuelRecordService.fuleRechargeFinallDeal(orderNo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -248,7 +248,7 @@ public class FyPayServiceImpl implements FyPayService {
|
|||||||
if ("CVR".equals(type)) {
|
if ("CVR".equals(type)) {
|
||||||
payStates = "paid";
|
payStates = "paid";
|
||||||
receiveParameter.setType("2");
|
receiveParameter.setType("2");
|
||||||
if (goodsOrder.getUserId()!=null){
|
if (ObjectUtil.isNotEmpty(goodsOrder) && ObjectUtil.isNotEmpty(goodsOrder.getUserId())){
|
||||||
receiveParameter.setUserId(goodsOrder.getUserId());
|
receiveParameter.setUserId(goodsOrder.getUserId());
|
||||||
}
|
}
|
||||||
// if (!ObjectUtil.isEmpty(map1.get("orderId"))) {
|
// if (!ObjectUtil.isEmpty(map1.get("orderId"))) {
|
||||||
@ -386,6 +386,7 @@ public class FyPayServiceImpl implements FyPayService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
log.error(e.getMessage());
|
log.error(e.getMessage());
|
||||||
}
|
}
|
||||||
return resMap;
|
return resMap;
|
||||||
@ -516,13 +517,17 @@ public class FyPayServiceImpl implements FyPayService {
|
|||||||
String insCd = map1.get("insCd");
|
String insCd = map1.get("insCd");
|
||||||
String mchntCd = map1.get("mchntCd");
|
String mchntCd = map1.get("mchntCd");
|
||||||
Map<String, String> map = Builder.buildFuiou24();
|
Map<String, String> map = Builder.buildFuiou24();
|
||||||
map.put("mchnt_order_no",orderNo);
|
map.put("version", "1.0");
|
||||||
map.put("order_type",payType);
|
|
||||||
map.put("total_amt", allAmount);
|
|
||||||
map.put("refund_amt", allAmount);
|
|
||||||
map.put("ins_cd", insCd);
|
map.put("ins_cd", insCd);
|
||||||
map.put("mchnt_cd", mchntCd);
|
map.put("mchnt_cd", mchntCd);
|
||||||
|
map.put("term_id", "88888888");
|
||||||
|
map.put("mchnt_order_no",orderNo);
|
||||||
|
map.put("random_str", "orderNo");
|
||||||
|
map.put("order_type",payType);
|
||||||
map.put("refund_order_no", refundOrderNo);
|
map.put("refund_order_no", refundOrderNo);
|
||||||
|
map.put("refund_amt", allAmount);
|
||||||
|
map.put("total_amt", allAmount);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 请求报文
|
// 请求报文
|
||||||
|
@ -17,4 +17,8 @@ public interface LJGoodsMapper extends BaseMapper<LJGoods> {
|
|||||||
public IPage<LJGoods> selectLJGoodsList(Page page, @Param("goods") LJGoods goods);
|
public IPage<LJGoods> selectLJGoodsList(Page page, @Param("goods") LJGoods goods);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int subtractGoodesStockByLock(@Param("id") Integer id, @Param("stock") Integer stock);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -40,4 +40,12 @@
|
|||||||
order by sort
|
order by sort
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<update id="subtractGoodesStockByLock">
|
||||||
|
update mt_goods set
|
||||||
|
stock = stock - #{stock}
|
||||||
|
where id = #{id}
|
||||||
|
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.fuint.business.convenienceSore.dto.LJGoodsDto;
|
import com.fuint.business.convenienceSore.dto.LJGoodsDto;
|
||||||
import com.fuint.business.convenienceSore.entity.LJGoods;
|
import com.fuint.business.convenienceSore.entity.LJGoods;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -79,4 +80,6 @@ public interface LJGoodsService extends IService<LJGoods> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
boolean editGoodsInventory(LJGoodsDto goods);
|
boolean editGoodsInventory(LJGoodsDto goods);
|
||||||
|
|
||||||
|
boolean subtractGoodesStockByLock(@Param("id") Integer id, @Param("stock") Integer stock);
|
||||||
}
|
}
|
||||||
|
@ -16,8 +16,10 @@ import com.fuint.business.convenienceSore.service.LJGoodsService;
|
|||||||
import com.fuint.business.convenienceSore.service.StockStatisticService;
|
import com.fuint.business.convenienceSore.service.StockStatisticService;
|
||||||
import com.fuint.business.convenienceSore.service.StockTrackService;
|
import com.fuint.business.convenienceSore.service.StockTrackService;
|
||||||
import com.fuint.common.dto.AccountInfo;
|
import com.fuint.common.dto.AccountInfo;
|
||||||
|
import com.fuint.common.util.RedisLock;
|
||||||
import com.fuint.common.util.StringUtils;
|
import com.fuint.common.util.StringUtils;
|
||||||
import com.fuint.common.util.TokenUtil;
|
import com.fuint.common.util.TokenUtil;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -25,10 +27,12 @@ import org.springframework.transaction.TransactionDefinition;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品信息 业务层
|
* 商品信息 业务层
|
||||||
@ -256,4 +260,29 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
|
|||||||
int i = trackService.insertStockTrack(stockTrack);
|
int i = trackService.insertStockTrack(stockTrack);
|
||||||
return i>0;
|
return i>0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
RedisLock redisLock;
|
||||||
|
/**
|
||||||
|
* 减少商品库存
|
||||||
|
* @param goods
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean subtractGoodesStockByLock(@Param("id") Integer id, @Param("stock") Integer stock) {
|
||||||
|
// 根据油罐id加锁 同一时间只能
|
||||||
|
String lockKey = "integralGift-"+id;
|
||||||
|
Boolean isLock = redisLock.tryLock(lockKey,500,5000, TimeUnit.MILLISECONDS);
|
||||||
|
if (isLock) {
|
||||||
|
LJGoods ljGoods = baseMapper.selectById(id);
|
||||||
|
if (stock.compareTo(ljGoods.getStock())>0) {
|
||||||
|
throw new RuntimeException("“"+ ljGoods.getName() +"”商品库存不足,无法进行减少!");
|
||||||
|
}
|
||||||
|
baseMapper.subtractGoodesStockByLock(id,stock);
|
||||||
|
redisLock.unlock(lockKey);
|
||||||
|
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,9 @@ public class IntegralGift extends BaseEntity {
|
|||||||
* 礼品剩余库存
|
* 礼品剩余库存
|
||||||
*/
|
*/
|
||||||
private Integer remainingInventory;
|
private Integer remainingInventory;
|
||||||
|
/**
|
||||||
|
* 使用的库存
|
||||||
|
*/
|
||||||
private Integer usedInventory;
|
private Integer usedInventory;
|
||||||
/**
|
/**
|
||||||
* 商家卡券
|
* 商家卡券
|
||||||
|
@ -86,5 +86,7 @@ public interface IntegralGiftMapper {
|
|||||||
|
|
||||||
int updateInventory(@Param("id") Integer id,@Param("editInventory") Integer editInventory,@Param("updateBy") Integer updateBy);
|
int updateInventory(@Param("id") Integer id,@Param("editInventory") Integer editInventory,@Param("updateBy") Integer updateBy);
|
||||||
|
|
||||||
|
int updateInventoryByLock(@Param("id") Integer id,@Param("editInventory") Integer editInventory);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -411,5 +411,15 @@
|
|||||||
where id =#{id}
|
where id =#{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
<update id="updateInventoryByLock">
|
||||||
|
update integral_gift
|
||||||
|
set
|
||||||
|
remaining_inventory = remaining_inventory - #{editInventory}, -- 剩余库存
|
||||||
|
total_inventory = used_inventory + #{editInventory}, -- 使用库存
|
||||||
|
update_time = NOW()
|
||||||
|
where id =#{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
@ -70,4 +70,7 @@ public interface IntegralGiftService {
|
|||||||
*/
|
*/
|
||||||
boolean updateInventory(@Param("id") Integer id,@Param("editInventory") Integer editInventory);
|
boolean updateInventory(@Param("id") Integer id,@Param("editInventory") Integer editInventory);
|
||||||
|
|
||||||
|
boolean updateInventoryByLock(@Param("id") Integer id,@Param("editInventory") Integer editInventory);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import com.fuint.business.integral.service.IntegralGiftService;
|
|||||||
import com.fuint.business.integral.service.IntegralOrdersService;
|
import com.fuint.business.integral.service.IntegralOrdersService;
|
||||||
import com.fuint.business.integral.vo.IntegralGiftVO;
|
import com.fuint.business.integral.vo.IntegralGiftVO;
|
||||||
import com.fuint.common.dto.AccountInfo;
|
import com.fuint.common.dto.AccountInfo;
|
||||||
|
import com.fuint.common.util.RedisLock;
|
||||||
import com.fuint.common.util.TokenUtil;
|
import com.fuint.common.util.TokenUtil;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -16,6 +17,7 @@ import org.springframework.stereotype.Service;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (IntegralGift)表服务实现类
|
* (IntegralGift)表服务实现类
|
||||||
@ -119,4 +121,26 @@ public class IntegralGiftServiceImpl implements IntegralGiftService {
|
|||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
return this.integralGiftDao.updateInventory(id,editInventory,nowAccountInfo.getStaffId()) > 0;
|
return this.integralGiftDao.updateInventory(id,editInventory,nowAccountInfo.getStaffId()) > 0;
|
||||||
}
|
}
|
||||||
|
@Resource
|
||||||
|
RedisLock redisLock;
|
||||||
|
/**
|
||||||
|
* 处理积分商品库存(库存减少)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean updateInventoryByLock(@Param("id") Integer id,@Param("editInventory") Integer editInventory) {
|
||||||
|
// 根据油罐id加锁 同一时间只能
|
||||||
|
String lockKey = "integralGift-"+id;
|
||||||
|
Boolean isLock = redisLock.tryLock(lockKey,500,5000, TimeUnit.MILLISECONDS);
|
||||||
|
if (isLock) {
|
||||||
|
redisLock.unlock(lockKey);
|
||||||
|
|
||||||
|
IntegralGift integralGift = integralGiftDao.queryById(id);
|
||||||
|
if (editInventory.compareTo(integralGift.getRemainingInventory())>0) {
|
||||||
|
throw new RuntimeException("该积分商品库存不足!");
|
||||||
|
}else {
|
||||||
|
integralGiftDao.updateInventoryByLock(id, editInventory);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -376,6 +376,9 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
|
|||||||
ljGoodsService.editGoodsInventory(goods);
|
ljGoodsService.editGoodsInventory(goods);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 处理积分库存
|
||||||
|
integralGiftService.updateInventoryByLock(integralOrders.getGiftId(),integralOrders.getExchangeQuantity());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 用户积分余额变动
|
// 用户积分余额变动
|
||||||
|
@ -49,6 +49,7 @@ public class CardValueRecordController extends BaseController {
|
|||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
cardValueRecord.setStoreId(nowAccountInfo.getStoreId());
|
cardValueRecord.setStoreId(nowAccountInfo.getStoreId());
|
||||||
Page page = new Page(pageNo, pageSize);
|
Page page = new Page(pageNo, pageSize);
|
||||||
|
page.setDesc("create_time");
|
||||||
return getSuccessResult(this.cardValueRecordService.page(page, new QueryWrapper<>(cardValueRecord)));
|
return getSuccessResult(this.cardValueRecordService.page(page, new QueryWrapper<>(cardValueRecord)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
and combined_result.recordName = #{cardValueRecord.recordName}
|
and combined_result.recordName = #{cardValueRecord.recordName}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
ORDER BY createTime
|
ORDER BY create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectFuleRecord"
|
<select id="selectFuleRecord"
|
||||||
@ -51,7 +51,7 @@
|
|||||||
and combined_result.recordName = #{cardValueRecord.recordName}
|
and combined_result.recordName = #{cardValueRecord.recordName}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
ORDER BY createTime
|
ORDER BY create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ public interface CardValueRecordService extends IService<CardValueRecord> {
|
|||||||
|
|
||||||
CardValueRecord checkTheStatusOfYourPayment(Integer id);
|
CardValueRecord checkTheStatusOfYourPayment(Integer id);
|
||||||
|
|
||||||
boolean editPayStatus(Integer id, String payStatus);
|
boolean editPayStatus(@Param("id") Integer id,@Param("payStates") String payStates);
|
||||||
|
|
||||||
|
|
||||||
IPage<CardValueRecordDTO> selectCardRecord(@Param("page") Page page, CardValueRecordDTO cardValueRecord);
|
IPage<CardValueRecordDTO> selectCardRecord(@Param("page") Page page, CardValueRecordDTO cardValueRecord);
|
||||||
|
@ -61,4 +61,14 @@ public class AllOrderInfoController extends BaseController {
|
|||||||
return getSuccessResult(allOrderInfoService.getOrderNum(storeId));
|
return getSuccessResult(allOrderInfoService.getOrderNum(storeId));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退款
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/refund")
|
||||||
|
public ResponseObject refund(@RequestBody Map<String,String> map){
|
||||||
|
return getSuccessResult(allOrderInfoService.refund(map));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ public class CardBalanceChangeController extends BaseController {
|
|||||||
stroeBalanceCountVO.setOutCount(collectOut.size());
|
stroeBalanceCountVO.setOutCount(collectOut.size());
|
||||||
//充值笔数
|
//充值笔数
|
||||||
List<CardBalanceChange> collectIn = records.stream().filter(s -> s.getChangeType().equals("1")).collect(Collectors.toList());
|
List<CardBalanceChange> collectIn = records.stream().filter(s -> s.getChangeType().equals("1")).collect(Collectors.toList());
|
||||||
stroeBalanceCountVO.setOutCount(collectIn.size());
|
stroeBalanceCountVO.setInCount(collectIn.size());
|
||||||
//消费总额
|
//消费总额
|
||||||
double totalConsumption = 0.0;
|
double totalConsumption = 0.0;
|
||||||
for (CardBalanceChange cardBalanceChange1 : collectOut) {
|
for (CardBalanceChange cardBalanceChange1 : collectOut) {
|
||||||
|
@ -6,6 +6,8 @@ import com.fuint.business.order.entity.AllOrderInfo;
|
|||||||
import com.fuint.business.order.vo.AllOrderInfoVo;
|
import com.fuint.business.order.vo.AllOrderInfoVo;
|
||||||
import com.fuint.business.order.vo.CardBalanceChangeVo;
|
import com.fuint.business.order.vo.CardBalanceChangeVo;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public interface AllOrderInfoService {
|
public interface AllOrderInfoService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -52,6 +54,9 @@ public interface AllOrderInfoService {
|
|||||||
public int updateAllOrderInfoByOrderNo(String orderNo,String status);
|
public int updateAllOrderInfoByOrderNo(String orderNo,String status);
|
||||||
|
|
||||||
|
|
||||||
|
public int refund(Map<String,String> map);
|
||||||
|
|
||||||
|
|
||||||
public int getOrderNum(Integer StoreId);
|
public int getOrderNum(Integer StoreId);
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,12 +5,16 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.fuint.api.fuyou.entity.Const;
|
||||||
|
import com.fuint.api.fuyou.entity.MerchantConfig;
|
||||||
|
import com.fuint.api.fuyou.service.FyPayService;
|
||||||
import com.fuint.api.fuyou.service.MerchantConfigService;
|
import com.fuint.api.fuyou.service.MerchantConfigService;
|
||||||
import com.fuint.business.order.entity.AllOrderInfo;
|
import com.fuint.business.order.entity.AllOrderInfo;
|
||||||
import com.fuint.business.order.mapper.AllOrderInfoMapper;
|
import com.fuint.business.order.mapper.AllOrderInfoMapper;
|
||||||
import com.fuint.business.order.service.AllOrderInfoService;
|
import com.fuint.business.order.service.AllOrderInfoService;
|
||||||
import com.fuint.business.order.service.OilOrderService;
|
import com.fuint.business.order.service.OilOrderService;
|
||||||
import com.fuint.business.order.vo.AllOrderInfoVo;
|
import com.fuint.business.order.vo.AllOrderInfoVo;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@ -21,6 +25,7 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllOrderInfo> implements AllOrderInfoService {
|
public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllOrderInfo> implements AllOrderInfoService {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -91,4 +96,40 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
|||||||
// 调用统计方法
|
// 调用统计方法
|
||||||
return baseMapper.selectCount(queryWrapper);
|
return baseMapper.selectCount(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private FyPayService fyPayService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int refund(Map<String, String> map) {
|
||||||
|
Map<String, String> refund = null;
|
||||||
|
try {
|
||||||
|
|
||||||
|
// 根据订单号查询订单
|
||||||
|
AllOrderInfo allOrderInfo = selectAllOrderInfoByOrderNo(map.get("orderNo"));
|
||||||
|
map.put("orderNo",allOrderInfo.getOrderNo());
|
||||||
|
map.put("payType",allOrderInfo.getPayType());
|
||||||
|
map.put("allAmount",allOrderInfo.getPayMoney().toString());
|
||||||
|
|
||||||
|
|
||||||
|
MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(allOrderInfo.getStoreId());
|
||||||
|
// 机构号
|
||||||
|
map.put("insCd", merchantConfig.getInsCd());
|
||||||
|
// 商户号
|
||||||
|
map.put("mchntCd", merchantConfig.getMchntCd());
|
||||||
|
// 生成退款id
|
||||||
|
// map.put("refundOrderNo", "ref_" + allOrderInfo.getOrderNo());
|
||||||
|
map.put("refundOrderNo", allOrderInfo.getOrderNo());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
refund = fyPayService.refund(map);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
throw new RuntimeException("退款失败");
|
||||||
|
}
|
||||||
|
log.info("refund{}",refund);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,19 +9,28 @@ import com.fuint.business.order.entity.CashierOrder;
|
|||||||
import com.fuint.business.order.mapper.CardBalanceChangeMapper;
|
import com.fuint.business.order.mapper.CardBalanceChangeMapper;
|
||||||
import com.fuint.business.order.service.CardBalanceChangeService;
|
import com.fuint.business.order.service.CardBalanceChangeService;
|
||||||
import com.fuint.business.order.vo.CardBalanceChangeVo;
|
import com.fuint.business.order.vo.CardBalanceChangeVo;
|
||||||
|
import com.fuint.business.storeInformation.entity.LJStore;
|
||||||
|
import com.fuint.business.storeInformation.service.ILJStoreService;
|
||||||
import com.fuint.common.dto.AccountInfo;
|
import com.fuint.common.dto.AccountInfo;
|
||||||
import com.fuint.common.util.TokenUtil;
|
import com.fuint.common.util.TokenUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class CardBalanceChangeServiceImpl extends ServiceImpl<CardBalanceChangeMapper, CardBalanceChange> implements CardBalanceChangeService {
|
public class CardBalanceChangeServiceImpl extends ServiceImpl<CardBalanceChangeMapper, CardBalanceChange> implements CardBalanceChangeService {
|
||||||
|
@Autowired
|
||||||
|
private ILJStoreService storeService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int insertCardBalance(CardBalanceChange cardBalanceChange) {
|
public int insertCardBalance(CardBalanceChange cardBalanceChange) {
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
if (cardBalanceChange.getStoreId()==null){
|
||||||
Integer storeId = nowAccountInfo.getStoreId();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
cardBalanceChange.setStoreId(storeId);
|
cardBalanceChange.setStoreId(nowAccountInfo.getStoreId());
|
||||||
|
}
|
||||||
|
LJStore store = storeService.selectStoreByStoreId(cardBalanceChange.getStoreId());
|
||||||
|
cardBalanceChange.setChainStoreId(store.getChainStoreId());
|
||||||
int row = baseMapper.insert(cardBalanceChange);
|
int row = baseMapper.insert(cardBalanceChange);
|
||||||
return row;
|
return row;
|
||||||
}
|
}
|
||||||
|
@ -80,8 +80,12 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
|||||||
@Autowired
|
@Autowired
|
||||||
private OilNameService oilNameService;
|
private OilNameService oilNameService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
private OilNumberService oilNumberService;
|
||||||
|
@Autowired
|
||||||
private CardBalanceChangeService cardBalanceChangeService;
|
private CardBalanceChangeService cardBalanceChangeService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
private OilBalanceChangeService oilBalanceChangeService;
|
||||||
|
@Autowired
|
||||||
private OilConfigService oilConfigService;
|
private OilConfigService oilConfigService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private LJGoodsService goodsService;
|
private LJGoodsService goodsService;
|
||||||
@ -206,11 +210,16 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
|||||||
// 会员消费金额(储值卡需要减少的金额)
|
// 会员消费金额(储值卡需要减少的金额)
|
||||||
Double consumeAmount = Double.valueOf(map.get("consumeAmount"));
|
Double consumeAmount = Double.valueOf(map.get("consumeAmount"));
|
||||||
Integer userId = null;
|
Integer userId = null;
|
||||||
|
// 根据日期生成订单信息
|
||||||
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||||
|
String timestamp = dateFormat.format(new Date());
|
||||||
|
String randomString = UUID.randomUUID().toString().replace("-","").substring(0,6);
|
||||||
|
String orderNo = "2345"+timestamp+randomString;
|
||||||
if (map.get("userId") != null && !map.get("userId").equals("")){
|
if (map.get("userId") != null && !map.get("userId").equals("")){
|
||||||
// 会员id
|
// 会员id
|
||||||
userId = Integer.valueOf(map.get("userId"));
|
userId = Integer.valueOf(map.get("userId"));
|
||||||
|
|
||||||
this.insertCardBalance(consumeAmount,userId,storeId);
|
this.insertCardBalance(consumeAmount,userId,storeId,orderNo);
|
||||||
}
|
}
|
||||||
// 优惠券id
|
// 优惠券id
|
||||||
Integer couponId = null;
|
Integer couponId = null;
|
||||||
@ -234,11 +243,6 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
|||||||
payStatus = "unpaid";
|
payStatus = "unpaid";
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据日期生成订单信息
|
|
||||||
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;
|
|
||||||
|
|
||||||
|
|
||||||
Map<String,Object> orders = new HashMap<>();
|
Map<String,Object> orders = new HashMap<>();
|
||||||
@ -477,64 +481,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
|||||||
|
|
||||||
Double cardBalance = balance.getCardBalance();
|
Double cardBalance = balance.getCardBalance();
|
||||||
JSONArray refuelMoneys = JSONArray.parseArray(balance.getRefuelMoney());
|
JSONArray refuelMoneys = JSONArray.parseArray(balance.getRefuelMoney());
|
||||||
if (cardBalance >= oilAmount) {
|
// if (cardBalance < oilAmount) {
|
||||||
// 添加油品订单信息
|
|
||||||
OilOrder order = new OilOrder();
|
|
||||||
for (int i = 0;i < oilOrders.size();i++) {
|
|
||||||
Double amount = Double.valueOf(oilOrders.get(i).get("amount").toString());
|
|
||||||
Double oilPrice = Double.valueOf(oilOrders.get(i).get("oilPrice").toString());
|
|
||||||
Double oilNum = amount / oilPrice;
|
|
||||||
if (i == 0) {
|
|
||||||
order.setOrderType("主订单");
|
|
||||||
order.setOrderAmount(amount);
|
|
||||||
order.setPayAmount(0.0);
|
|
||||||
order.setOrderNo(orderNo);
|
|
||||||
} else {
|
|
||||||
order.setOrderType("子订单");
|
|
||||||
order.setOrderAmount(amount);
|
|
||||||
order.setPayAmount(0.0);
|
|
||||||
order.setOrderNo(orderNo + "1");
|
|
||||||
}
|
|
||||||
order.setStoreId(accountInfo.getStoreId());
|
|
||||||
order.setUserId(userId);
|
|
||||||
order.setCommissionAmount(Double.valueOf(map.get("commissionAmount")));
|
|
||||||
order.setStaffId(Integer.valueOf(map.get("staffId")));
|
|
||||||
order.setTerminal(map.get("terminal"));
|
|
||||||
order.setOils((String) oilOrders.get(i).get("oilName"));
|
|
||||||
order.setOilGunNum(oilOrders.get(i).get("gunName").toString());
|
|
||||||
order.setOilNum(oilNum);
|
|
||||||
// order.setDiscountAmount(Double.valueOf(map.get("oilDiscount")));
|
|
||||||
order.setPayUser(userVo1.getMobile());
|
|
||||||
order.setPayType(map.get("payType"));
|
|
||||||
order.setInvoicing("未开票");
|
|
||||||
order.setOrderStatus("paid");
|
|
||||||
order.setPayTime(new Date());
|
|
||||||
|
|
||||||
this.addOilTrack(oilOrders.get(i), accountInfo.getStoreId());
|
|
||||||
baseMapper.insert(order);
|
|
||||||
}
|
|
||||||
OilOrder oilOrder = this.selectOilOrderByOrderNo(orderNo);
|
|
||||||
|
|
||||||
// 添加收银台订单信息
|
|
||||||
CashierOrder cashierOrder = new CashierOrder();
|
|
||||||
cashierOrder.setStaffId(Integer.valueOf(map.get("staffId")));
|
|
||||||
cashierOrder.setStoreId(accountInfo.getStoreId());
|
|
||||||
cashierOrder.setPayUser(userVo1.getMobile());
|
|
||||||
cashierOrder.setAmount(oilAmount);
|
|
||||||
cashierOrder.setPayAmount(oilAmount);
|
|
||||||
cashierOrder.setStatus("paid");
|
|
||||||
cashierOrder.setPayTime(new Date());
|
|
||||||
cashierOrder.setOrderNo(orderNo);
|
|
||||||
cashierOrder.setOilOrderAmount(oilAmount);
|
|
||||||
// cashierOrder.setOilDiscountAmount(Double.valueOf(map.get("oilDiscount")));
|
|
||||||
cashierOrder.setTerminal(map.get("terminal"));
|
|
||||||
cashierOrder.setOilOrderId(oilOrder.getId());
|
|
||||||
cashierOrderService.insertCashierOrder(cashierOrder);
|
|
||||||
this.updateGrowthValue1(oilAmount,userId, Integer.valueOf(oilOrder.getOils()),0.0,storeId);
|
|
||||||
this.insertAllOrderInfo(orderNo,accountInfo.getStoreId(),oilAmount,map.get("payType"),userId,"PC","1","paid");
|
|
||||||
|
|
||||||
res.put("success","success");
|
|
||||||
} else {
|
|
||||||
String status = "unpaid";
|
String status = "unpaid";
|
||||||
|
|
||||||
if (ObjectUtil.isNotEmpty(refuelMoneys)){
|
if (ObjectUtil.isNotEmpty(refuelMoneys)){
|
||||||
@ -552,11 +500,11 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
|||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
for (int i = 0;i < oilOrders.size();i++) {
|
for (int i = 0;i < oilOrders.size();i++) {
|
||||||
if (oilOrders.get(i).get("oilName").equals(oilName.getId().toString())){
|
if (oilOrders.get(i).get("oilName").equals(oilName.getId().toString())){
|
||||||
|
Double amount = Double.valueOf(oilOrders.get(i).get("amount").toString());
|
||||||
|
Double oilPrice = Double.valueOf(oilOrders.get(i).get("oilPrice").toString());
|
||||||
if (refuelMoneyLiters>=Double.valueOf(oilOrders.get(i).get("liters").toString())) {
|
if (refuelMoneyLiters>=Double.valueOf(oilOrders.get(i).get("liters").toString())) {
|
||||||
status = "paid";
|
|
||||||
flag = true;
|
flag = true;
|
||||||
Double amount = Double.valueOf(oilOrders.get(i).get("amount").toString());
|
status = "paid";
|
||||||
Double oilPrice = Double.valueOf(oilOrders.get(i).get("oilPrice").toString());
|
|
||||||
Double oilNum = amount / oilPrice;
|
Double oilNum = amount / oilPrice;
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
order.setOrderType("主订单");
|
order.setOrderType("主订单");
|
||||||
@ -588,37 +536,228 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
|||||||
baseMapper.insert(order);
|
baseMapper.insert(order);
|
||||||
|
|
||||||
oilOrder = this.selectOilOrderByOrderNo(orderNo);
|
oilOrder = this.selectOilOrderByOrderNo(orderNo);
|
||||||
cashierOrder.setStaffId(Integer.valueOf(map.get("staffId")));
|
this.updateGrowthValue1(0.0, userId, Integer.valueOf(oilOrder.getOils()), refuelMoneyLiters - Double.valueOf(oilOrders.get(i).get("liters").toString()), storeId,orderNo);
|
||||||
cashierOrder.setStoreId(accountInfo.getStoreId());
|
this.insertOilBalance(userId,storeId,oilName.getId().toString(),oilName.getOilType(),Double.valueOf(oilOrders.get(i).get("liters").toString()),refuelMoneyLiters - Double.valueOf(oilOrders.get(i).get("liters").toString()),orderNo);
|
||||||
cashierOrder.setPayUser(userVo1.getMobile());
|
}else if (refuelMoneyLiters>0 && (Double.valueOf(oilOrders.get(i).get("liters").toString())-refuelMoneyLiters)*oilPrice<=cardBalance){
|
||||||
cashierOrder.setAmount(oilAmount);
|
flag = true;
|
||||||
cashierOrder.setPayAmount(oilAmount);
|
status = "paid";
|
||||||
cashierOrder.setStatus(status);
|
Double oilNum = amount / oilPrice;
|
||||||
cashierOrder.setPayTime(new Date());
|
if (i == 0) {
|
||||||
cashierOrder.setOrderNo(orderNo);
|
order.setOrderType("主订单");
|
||||||
cashierOrder.setOilOrderAmount(oilAmount);
|
order.setOrderAmount(amount);
|
||||||
// cashierOrder.setOilDiscountAmount(Double.valueOf(map.get("oilDiscount")));
|
order.setPayAmount(0.0);
|
||||||
cashierOrder.setTerminal(map.get("terminal"));
|
order.setOrderNo(orderNo);
|
||||||
cashierOrder.setOilOrderId(oilOrder.getId());
|
} else {
|
||||||
this.updateGrowthValue1(0.0, userId, Integer.valueOf(oilOrder.getOils()), refuelMoneyLiters - Double.valueOf(oilOrders.get(i).get("liters").toString()), storeId);
|
order.setOrderType("子订单");
|
||||||
this.insertAllOrderInfo(orderNo, storeId, oilAmount, map.get("payType"), userId, "PC", "1", status);
|
order.setOrderAmount(amount);
|
||||||
|
order.setPayAmount(0.0);
|
||||||
|
order.setOrderNo(orderNo + "1");
|
||||||
|
}
|
||||||
|
order.setStoreId(accountInfo.getStoreId());
|
||||||
|
order.setUserId(userId);
|
||||||
|
order.setCommissionAmount(Double.valueOf(map.get("commissionAmount")));
|
||||||
|
order.setStaffId(Integer.valueOf(map.get("staffId")));
|
||||||
|
order.setTerminal(map.get("terminal"));
|
||||||
|
order.setOils((String) oilOrders.get(i).get("oilName"));
|
||||||
|
order.setOilGunNum(oilOrders.get(i).get("gunName").toString());
|
||||||
|
order.setOilNum(oilNum);
|
||||||
|
// order.setDiscountAmount(Double.valueOf(map.get("oilDiscount")));
|
||||||
|
order.setPayUser(userVo1.getMobile());
|
||||||
|
order.setPayType(map.get("payType"));
|
||||||
|
order.setInvoicing("未开票");
|
||||||
|
order.setOrderStatus(status);
|
||||||
|
order.setPayTime(new Date());
|
||||||
|
|
||||||
|
this.addOilTrack(oilOrders.get(i), accountInfo.getStoreId());
|
||||||
|
baseMapper.insert(order);
|
||||||
|
|
||||||
|
oilOrder = this.selectOilOrderByOrderNo(orderNo);
|
||||||
|
this.updateGrowthValue1((Double.valueOf(oilOrders.get(i).get("liters").toString())-refuelMoneyLiters)*oilPrice, userId, Integer.valueOf(oilOrder.getOils()), 0.0, storeId,orderNo);
|
||||||
|
this.insertOilBalance(userId,storeId,oilName.getId().toString(),oilName.getOilType(),refuelMoneyLiters,0.0,orderNo);
|
||||||
|
} else if (cardBalance >= oilAmount){
|
||||||
|
flag = true;
|
||||||
|
status = "paid";
|
||||||
|
Double oilNum = amount / oilPrice;
|
||||||
|
if (i == 0) {
|
||||||
|
order.setOrderType("主订单");
|
||||||
|
order.setOrderAmount(amount);
|
||||||
|
order.setPayAmount(0.0);
|
||||||
|
order.setOrderNo(orderNo);
|
||||||
|
} else {
|
||||||
|
order.setOrderType("子订单");
|
||||||
|
order.setOrderAmount(amount);
|
||||||
|
order.setPayAmount(0.0);
|
||||||
|
order.setOrderNo(orderNo + "1");
|
||||||
|
}
|
||||||
|
order.setStoreId(accountInfo.getStoreId());
|
||||||
|
order.setUserId(userId);
|
||||||
|
order.setCommissionAmount(Double.valueOf(map.get("commissionAmount")));
|
||||||
|
order.setStaffId(Integer.valueOf(map.get("staffId")));
|
||||||
|
order.setTerminal(map.get("terminal"));
|
||||||
|
order.setOils((String) oilOrders.get(i).get("oilName"));
|
||||||
|
order.setOilGunNum(oilOrders.get(i).get("gunName").toString());
|
||||||
|
order.setOilNum(oilNum);
|
||||||
|
// order.setDiscountAmount(Double.valueOf(map.get("oilDiscount")));
|
||||||
|
order.setPayUser(userVo1.getMobile());
|
||||||
|
order.setPayType(map.get("payType"));
|
||||||
|
order.setInvoicing("未开票");
|
||||||
|
order.setOrderStatus("paid");
|
||||||
|
order.setPayTime(new Date());
|
||||||
|
|
||||||
|
this.addOilTrack(oilOrders.get(i), accountInfo.getStoreId());
|
||||||
|
baseMapper.insert(order);
|
||||||
|
|
||||||
|
oilOrder = this.selectOilOrderByOrderNo(orderNo);
|
||||||
|
this.updateGrowthValue1(oilAmount,userId, Integer.valueOf(oilOrder.getOils()),0.0,storeId,orderNo);
|
||||||
|
// this.insertCardBalance((Double.valueOf(oilOrders.get(i).get("liters").toString())-refuelMoneyLiters)*oilPrice,userId,storeId);
|
||||||
|
|
||||||
|
}else {
|
||||||
|
res.put("error","囤油卡或储值卡余额不足!");
|
||||||
}
|
}
|
||||||
}else {
|
|
||||||
res.put("error","囤油卡余额不足!");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flag){
|
if (flag){
|
||||||
|
|
||||||
|
cashierOrder.setStaffId(Integer.valueOf(map.get("staffId")));
|
||||||
|
cashierOrder.setStoreId(accountInfo.getStoreId());
|
||||||
|
cashierOrder.setPayUser(userVo1.getMobile());
|
||||||
|
cashierOrder.setAmount(oilAmount);
|
||||||
|
cashierOrder.setPayAmount(oilAmount);
|
||||||
|
cashierOrder.setStatus(status);
|
||||||
|
cashierOrder.setPayTime(new Date());
|
||||||
|
cashierOrder.setOrderNo(orderNo);
|
||||||
|
cashierOrder.setOilOrderAmount(oilAmount);
|
||||||
|
// cashierOrder.setOilDiscountAmount(Double.valueOf(map.get("oilDiscount")));
|
||||||
|
cashierOrder.setTerminal(map.get("terminal"));
|
||||||
|
cashierOrder.setOilOrderId(oilOrder.getId());
|
||||||
cashierOrderService.insertCashierOrder(cashierOrder);
|
cashierOrderService.insertCashierOrder(cashierOrder);
|
||||||
|
this.insertAllOrderInfo(orderNo, storeId, oilAmount, map.get("payType"), userId, "PC", "1", status);
|
||||||
res.put("success","success");
|
res.put("success","success");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
res.put("error","储值卡余额不足!");
|
if (cardBalance>=oilAmount){
|
||||||
}
|
// 添加油品订单信息
|
||||||
|
OilOrder order = new OilOrder();
|
||||||
|
for (int i = 0;i < oilOrders.size();i++) {
|
||||||
|
Double amount = Double.valueOf(oilOrders.get(i).get("amount").toString());
|
||||||
|
Double oilPrice = Double.valueOf(oilOrders.get(i).get("oilPrice").toString());
|
||||||
|
Double oilNum = amount / oilPrice;
|
||||||
|
if (i == 0) {
|
||||||
|
order.setOrderType("主订单");
|
||||||
|
order.setOrderAmount(amount);
|
||||||
|
order.setPayAmount(0.0);
|
||||||
|
order.setOrderNo(orderNo);
|
||||||
|
} else {
|
||||||
|
order.setOrderType("子订单");
|
||||||
|
order.setOrderAmount(amount);
|
||||||
|
order.setPayAmount(0.0);
|
||||||
|
order.setOrderNo(orderNo + "1");
|
||||||
|
}
|
||||||
|
order.setStoreId(accountInfo.getStoreId());
|
||||||
|
order.setUserId(userId);
|
||||||
|
order.setCommissionAmount(Double.valueOf(map.get("commissionAmount")));
|
||||||
|
order.setStaffId(Integer.valueOf(map.get("staffId")));
|
||||||
|
order.setTerminal(map.get("terminal"));
|
||||||
|
order.setOils((String) oilOrders.get(i).get("oilName"));
|
||||||
|
order.setOilGunNum(oilOrders.get(i).get("gunName").toString());
|
||||||
|
order.setOilNum(oilNum);
|
||||||
|
// order.setDiscountAmount(Double.valueOf(map.get("oilDiscount")));
|
||||||
|
order.setPayUser(userVo1.getMobile());
|
||||||
|
order.setPayType(map.get("payType"));
|
||||||
|
order.setInvoicing("未开票");
|
||||||
|
order.setOrderStatus("paid");
|
||||||
|
order.setPayTime(new Date());
|
||||||
|
|
||||||
}
|
this.addOilTrack(oilOrders.get(i), accountInfo.getStoreId());
|
||||||
|
baseMapper.insert(order);
|
||||||
|
}
|
||||||
|
OilOrder oilOrder = this.selectOilOrderByOrderNo(orderNo);
|
||||||
|
|
||||||
|
// 添加收银台订单信息
|
||||||
|
CashierOrder cashierOrder = new CashierOrder();
|
||||||
|
cashierOrder.setStaffId(Integer.valueOf(map.get("staffId")));
|
||||||
|
cashierOrder.setStoreId(accountInfo.getStoreId());
|
||||||
|
cashierOrder.setPayUser(userVo1.getMobile());
|
||||||
|
cashierOrder.setAmount(oilAmount);
|
||||||
|
cashierOrder.setPayAmount(oilAmount);
|
||||||
|
cashierOrder.setStatus("paid");
|
||||||
|
cashierOrder.setPayTime(new Date());
|
||||||
|
cashierOrder.setOrderNo(orderNo);
|
||||||
|
cashierOrder.setOilOrderAmount(oilAmount);
|
||||||
|
// cashierOrder.setOilDiscountAmount(Double.valueOf(map.get("oilDiscount")));
|
||||||
|
cashierOrder.setTerminal(map.get("terminal"));
|
||||||
|
cashierOrder.setOilOrderId(oilOrder.getId());
|
||||||
|
cashierOrderService.insertCashierOrder(cashierOrder);
|
||||||
|
this.updateGrowthValue1(oilAmount,userId, Integer.valueOf(oilOrder.getOils()),0.0,storeId,orderNo);
|
||||||
|
this.insertAllOrderInfo(orderNo,accountInfo.getStoreId(),oilAmount,map.get("payType"),userId,"PC","1","paid");
|
||||||
|
|
||||||
|
// this.insertCardBalance(oilAmount,userId,storeId);
|
||||||
|
res.put("success","success");
|
||||||
|
}else {
|
||||||
|
res.put("error","储值卡余额不足!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// } else {
|
||||||
|
//// 添加油品订单信息
|
||||||
|
// OilOrder order = new OilOrder();
|
||||||
|
// for (int i = 0;i < oilOrders.size();i++) {
|
||||||
|
// Double amount = Double.valueOf(oilOrders.get(i).get("amount").toString());
|
||||||
|
// Double oilPrice = Double.valueOf(oilOrders.get(i).get("oilPrice").toString());
|
||||||
|
// Double oilNum = amount / oilPrice;
|
||||||
|
// if (i == 0) {
|
||||||
|
// order.setOrderType("主订单");
|
||||||
|
// order.setOrderAmount(amount);
|
||||||
|
// order.setPayAmount(0.0);
|
||||||
|
// order.setOrderNo(orderNo);
|
||||||
|
// } else {
|
||||||
|
// order.setOrderType("子订单");
|
||||||
|
// order.setOrderAmount(amount);
|
||||||
|
// order.setPayAmount(0.0);
|
||||||
|
// order.setOrderNo(orderNo + "1");
|
||||||
|
// }
|
||||||
|
// order.setStoreId(accountInfo.getStoreId());
|
||||||
|
// order.setUserId(userId);
|
||||||
|
// order.setCommissionAmount(Double.valueOf(map.get("commissionAmount")));
|
||||||
|
// order.setStaffId(Integer.valueOf(map.get("staffId")));
|
||||||
|
// order.setTerminal(map.get("terminal"));
|
||||||
|
// order.setOils((String) oilOrders.get(i).get("oilName"));
|
||||||
|
// order.setOilGunNum(oilOrders.get(i).get("gunName").toString());
|
||||||
|
// order.setOilNum(oilNum);
|
||||||
|
//// order.setDiscountAmount(Double.valueOf(map.get("oilDiscount")));
|
||||||
|
// order.setPayUser(userVo1.getMobile());
|
||||||
|
// order.setPayType(map.get("payType"));
|
||||||
|
// order.setInvoicing("未开票");
|
||||||
|
// order.setOrderStatus("paid");
|
||||||
|
// order.setPayTime(new Date());
|
||||||
|
//
|
||||||
|
// this.addOilTrack(oilOrders.get(i), accountInfo.getStoreId());
|
||||||
|
// baseMapper.insert(order);
|
||||||
|
// }
|
||||||
|
// OilOrder oilOrder = this.selectOilOrderByOrderNo(orderNo);
|
||||||
|
//
|
||||||
|
//// 添加收银台订单信息
|
||||||
|
// CashierOrder cashierOrder = new CashierOrder();
|
||||||
|
// cashierOrder.setStaffId(Integer.valueOf(map.get("staffId")));
|
||||||
|
// cashierOrder.setStoreId(accountInfo.getStoreId());
|
||||||
|
// cashierOrder.setPayUser(userVo1.getMobile());
|
||||||
|
// cashierOrder.setAmount(oilAmount);
|
||||||
|
// cashierOrder.setPayAmount(oilAmount);
|
||||||
|
// cashierOrder.setStatus("paid");
|
||||||
|
// cashierOrder.setPayTime(new Date());
|
||||||
|
// cashierOrder.setOrderNo(orderNo);
|
||||||
|
// cashierOrder.setOilOrderAmount(oilAmount);
|
||||||
|
//// cashierOrder.setOilDiscountAmount(Double.valueOf(map.get("oilDiscount")));
|
||||||
|
// cashierOrder.setTerminal(map.get("terminal"));
|
||||||
|
// cashierOrder.setOilOrderId(oilOrder.getId());
|
||||||
|
// cashierOrderService.insertCashierOrder(cashierOrder);
|
||||||
|
// this.updateGrowthValue1(oilAmount,userId, Integer.valueOf(oilOrder.getOils()),0.0,storeId);
|
||||||
|
// this.insertAllOrderInfo(orderNo,accountInfo.getStoreId(),oilAmount,map.get("payType"),userId,"PC","1","paid");
|
||||||
|
//
|
||||||
|
// res.put("success","success");
|
||||||
|
// }
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@ -640,6 +779,10 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
|||||||
allOrderInfo.setUserId(userId);
|
allOrderInfo.setUserId(userId);
|
||||||
allOrderInfo.setPayChannel(payChannel);
|
allOrderInfo.setPayChannel(payChannel);
|
||||||
allOrderInfo.setStatus(status);
|
allOrderInfo.setStatus(status);
|
||||||
|
if (status.equals("paid")){
|
||||||
|
allOrderInfo.setPayMoney(goodsMoney);
|
||||||
|
allOrderInfo.setPayTime(new Date());
|
||||||
|
}
|
||||||
if (type.equals("1")){
|
if (type.equals("1")){
|
||||||
allOrderInfo.setContent("油品订单");
|
allOrderInfo.setContent("油品订单");
|
||||||
}else {
|
}else {
|
||||||
@ -658,10 +801,9 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
|||||||
* @param oilId 油号id
|
* @param oilId 油号id
|
||||||
* @param refuelMoney 扣除的囤油卡升数
|
* @param refuelMoney 扣除的囤油卡升数
|
||||||
*/
|
*/
|
||||||
private void updateGrowthValue1(Double oilActualPay,Integer userid,Integer oilId,Double refuelMoney,Integer storeId){
|
private void updateGrowthValue1(Double oilActualPay,Integer userid,Integer oilId,Double refuelMoney,Integer storeId,String orderNo){
|
||||||
UserBalance balance = userBalanceService.selectUserBalanceByStorId(userid,storeId);
|
UserBalance balance = userBalanceService.selectUserBalanceByStorId(userid,storeId);
|
||||||
JSONArray refuelMoneys = JSONArray.parseArray(balance.getRefuelMoney());
|
JSONArray refuelMoneys = JSONArray.parseArray(balance.getRefuelMoney());
|
||||||
if (oilActualPay==0.0){
|
|
||||||
if (ObjectUtil.isNotEmpty(refuelMoneys)){
|
if (ObjectUtil.isNotEmpty(refuelMoneys)){
|
||||||
List<RefuelMoney> list = new ArrayList<>();
|
List<RefuelMoney> list = new ArrayList<>();
|
||||||
for (Object money : refuelMoneys) {
|
for (Object money : refuelMoneys) {
|
||||||
@ -679,10 +821,9 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
|||||||
}
|
}
|
||||||
balance.setRefuelMoney(JSONObject.toJSONString(list));
|
balance.setRefuelMoney(JSONObject.toJSONString(list));
|
||||||
}
|
}
|
||||||
}else {
|
// balance.setCardBalance(balance.getCardBalance()-oilActualPay);
|
||||||
balance.setCardBalance(balance.getCardBalance()-oilActualPay);
|
|
||||||
}
|
|
||||||
userBalanceService.updateUserBalance(balance);
|
userBalanceService.updateUserBalance(balance);
|
||||||
|
this.insertCardBalance(oilActualPay,userid,storeId,orderNo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -721,9 +862,6 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
|||||||
return orderNo;
|
return orderNo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private OilNumberService oilNumberService;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> appletPay(Map<String, String> map) {
|
public Map<String, Object> appletPay(Map<String, String> map) {
|
||||||
String orderNo = map.get("orderNo");
|
String orderNo = map.get("orderNo");
|
||||||
@ -813,7 +951,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
|||||||
|
|
||||||
// 判断是否使用储值卡消费
|
// 判断是否使用储值卡消费
|
||||||
if (!balanceAmount.equals("0")){
|
if (!balanceAmount.equals("0")){
|
||||||
this.insertCardBalance(Double.valueOf(balanceAmount),userId,oilOrder.getStoreId());
|
this.insertCardBalance(Double.valueOf(balanceAmount),userId,oilOrder.getStoreId(),orderNo);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 判断是否需要调起支付
|
// 判断是否需要调起支付
|
||||||
@ -1011,7 +1149,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
|||||||
* @param oilActualPay 实付金额
|
* @param oilActualPay 实付金额
|
||||||
* @param userid 用户id
|
* @param userid 用户id
|
||||||
* @param oilId 油号
|
* @param oilId 油号
|
||||||
* @param refuelMoney 加油金信息
|
* @param refuelMoney 消费后的加油金信息
|
||||||
* @param storeId 店铺id
|
* @param storeId 店铺id
|
||||||
*/
|
*/
|
||||||
private void updateGrowthValue(Double oilActualPay,Integer userid,Integer oilId,String refuelMoney,Integer storeId){
|
private void updateGrowthValue(Double oilActualPay,Integer userid,Integer oilId,String refuelMoney,Integer storeId){
|
||||||
@ -1036,6 +1174,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
|||||||
refuelMoney2.setOilType(((JSONObject) object).get("oilType").toString());
|
refuelMoney2.setOilType(((JSONObject) object).get("oilType").toString());
|
||||||
refuelMoney2.setRefuelMoney("0");
|
refuelMoney2.setRefuelMoney("0");
|
||||||
list.add(refuelMoney2);
|
list.add(refuelMoney2);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
balance.setRefuelMoney(JSONObject.toJSONString(list));
|
balance.setRefuelMoney(JSONObject.toJSONString(list));
|
||||||
@ -1101,8 +1240,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
|||||||
* @param userId
|
* @param userId
|
||||||
* @param storeId
|
* @param storeId
|
||||||
*/
|
*/
|
||||||
private void insertCardBalance(Double amount,Integer userId,Integer storeId){
|
private void insertCardBalance(Double amount,Integer userId,Integer storeId,String orderNo){
|
||||||
// AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
CardBalanceChange cardBalanceChange = new CardBalanceChange();
|
||||||
// 根据用户id查询用户余额信息
|
// 根据用户id查询用户余额信息
|
||||||
LJStore store = storeService.selectStoreByStoreId(storeId);
|
LJStore store = storeService.selectStoreByStoreId(storeId);
|
||||||
UserBalance balance = userBalanceService.selectUserBalance(userId,store.getChainStoreId());
|
UserBalance balance = userBalanceService.selectUserBalance(userId,store.getChainStoreId());
|
||||||
@ -1110,6 +1249,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
|||||||
// 修改余额信息
|
// 修改余额信息
|
||||||
Double beforeBalance = balance.getCardBalance();
|
Double beforeBalance = balance.getCardBalance();
|
||||||
Double afterBalance = beforeBalance - amount;
|
Double afterBalance = beforeBalance - amount;
|
||||||
|
cardBalanceChange.setAfterTheChange(afterBalance);
|
||||||
balance.setCardBalance(afterBalance);
|
balance.setCardBalance(afterBalance);
|
||||||
// 修改加油次数
|
// 修改加油次数
|
||||||
Integer consumeNum = balance.getConsumeNum();
|
Integer consumeNum = balance.getConsumeNum();
|
||||||
@ -1118,15 +1258,39 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 添加余额记录信息
|
// 添加余额记录信息
|
||||||
CardBalanceChange cardBalanceChange = new CardBalanceChange();
|
|
||||||
cardBalanceChange.setUserId(userId);
|
cardBalanceChange.setUserId(userId);
|
||||||
cardBalanceChange.setChangeType("0");
|
cardBalanceChange.setChangeType("0");
|
||||||
cardBalanceChange.setFromType("油品订单消费");
|
cardBalanceChange.setFromType("油品订单消费");
|
||||||
cardBalanceChange.setBalance(amount);
|
cardBalanceChange.setBalance(amount);
|
||||||
|
cardBalanceChange.setOrderNo(orderNo);
|
||||||
|
|
||||||
cardBalanceChangeService.insertCardBalance(cardBalanceChange);
|
cardBalanceChangeService.insertCardBalance(cardBalanceChange);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加囤油卡消费记录
|
||||||
|
* @param userId
|
||||||
|
* @param storeId
|
||||||
|
* @param oilType
|
||||||
|
* @param type
|
||||||
|
* @param oilBalance
|
||||||
|
* @param afterOilBalance
|
||||||
|
* @param orderNo
|
||||||
|
*/
|
||||||
|
private void insertOilBalance(Integer userId,Integer storeId,String oilType,String type,Double oilBalance,Double afterOilBalance,String orderNo){
|
||||||
|
LJStore store = storeService.selectStoreByStoreId(storeId);
|
||||||
|
OilBalanceChange oilBalanceChange = new OilBalanceChange();
|
||||||
|
oilBalanceChange.setUserId(userId);
|
||||||
|
oilBalanceChange.setStoreId(storeId);
|
||||||
|
oilBalanceChange.setChainStoreId(store.getChainStoreId());
|
||||||
|
oilBalanceChange.setChangeType("0");
|
||||||
|
oilBalanceChange.setOilType(oilType);
|
||||||
|
oilBalanceChange.setType(type);
|
||||||
|
oilBalanceChange.setFromType("油品订单消费");
|
||||||
|
oilBalanceChange.setOrderNo(orderNo);
|
||||||
|
oilBalanceChangeService.save(oilBalanceChange);
|
||||||
|
}
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
OilOrderMapper oilOrderMapper;
|
OilOrderMapper oilOrderMapper;
|
||||||
@Resource
|
@Resource
|
||||||
|
@ -130,11 +130,21 @@ public class OilInventoryOrderController extends BaseController {
|
|||||||
return getSuccessResult(this.oilInventoryOrderService.audit(id));
|
return getSuccessResult(this.oilInventoryOrderService.audit(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 盘点废除
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@GetMapping("abolition")
|
@GetMapping("abolition")
|
||||||
public ResponseObject abolition(Integer id) {
|
public ResponseObject abolition(Integer id) {
|
||||||
return getSuccessResult(this.oilInventoryOrderService.abolition(id));
|
return getSuccessResult(this.oilInventoryOrderService.abolition(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断入库
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@GetMapping("storage")
|
@GetMapping("storage")
|
||||||
public ResponseObject storage(Integer id) {
|
public ResponseObject storage(Integer id) {
|
||||||
return getSuccessResult(this.oilInventoryOrderService.storage(id));
|
return getSuccessResult(this.oilInventoryOrderService.storage(id));
|
||||||
|
@ -86,7 +86,7 @@ public interface OilTankMapper {
|
|||||||
* @return 影响行数
|
* @return 影响行数
|
||||||
*/
|
*/
|
||||||
int update(OilTank oilTank);
|
int update(OilTank oilTank);
|
||||||
int addStoredQuantityByLock(@Param("tankId") Integer tankId,@Param("changeNum") Double changeNum);
|
int addStoredQuantityByLock(@Param("tankId") Integer tankId,@Param("changeNum") Double changeNum,Double totalAmount,Double discountedPrice);
|
||||||
|
|
||||||
int subtractStoredQuantityByLock(@Param("tankId") Integer tankId,@Param("changeNum") Double changeNum);
|
int subtractStoredQuantityByLock(@Param("tankId") Integer tankId,@Param("changeNum") Double changeNum);
|
||||||
|
|
||||||
|
@ -414,6 +414,12 @@
|
|||||||
<update id="addStoredQuantityByLock">
|
<update id="addStoredQuantityByLock">
|
||||||
update oil_tank set
|
update oil_tank set
|
||||||
stored_quantity = stored_quantity+#{changeNum},
|
stored_quantity = stored_quantity+#{changeNum},
|
||||||
|
<if test="totalAmount != null and totalAmount != ''">
|
||||||
|
total_price = total_price + #{totalAmount},
|
||||||
|
</if>
|
||||||
|
<if test="discountedPrice != null and discountedPrice != ''">
|
||||||
|
discounted_price = #{discountedPrice}
|
||||||
|
</if>
|
||||||
update_time = NOW()
|
update_time = NOW()
|
||||||
where id = #{tankId}
|
where id = #{tankId}
|
||||||
</update>
|
</update>
|
||||||
|
@ -229,11 +229,15 @@ public class OilInventoryOrderServiceImpl implements OilInventoryOrderService {
|
|||||||
String oilIntake = "盘点入库";
|
String oilIntake = "盘点入库";
|
||||||
int audit = iljStaffService.auditPrem(oilIntake);
|
int audit = iljStaffService.auditPrem(oilIntake);
|
||||||
if (audit>0) {
|
if (audit>0) {
|
||||||
// 1.查询所有的数据
|
// 查询所有的数据
|
||||||
OilInventoryOrder oilInventoryOrder = new OilInventoryOrder();
|
OilInventoryOrder oilInventoryOrder = new OilInventoryOrder();
|
||||||
oilInventoryOrder.setInventoryId(id);
|
oilInventoryOrder.setInventoryId(id);
|
||||||
List<OilInventoryOrderVO> allList = oilInventoryOrderDao.getAllList2(oilInventoryOrder);
|
List<OilInventoryOrderVO> allList = oilInventoryOrderDao.getAllList2(oilInventoryOrder);
|
||||||
for (OilInventoryOrderVO oilInventoryOrderVO : allList) {
|
for (OilInventoryOrderVO oilInventoryOrderVO : allList) {
|
||||||
|
|
||||||
|
// 判断盘点的油品是否超过油罐的最大容量
|
||||||
|
|
||||||
|
|
||||||
OilTank oilTank = new OilTank();
|
OilTank oilTank = new OilTank();
|
||||||
oilTank.setId(oilInventoryOrderVO.getTankId());
|
oilTank.setId(oilInventoryOrderVO.getTankId());
|
||||||
oilTank.setStoredQuantity(oilInventoryOrderVO.getInventoryVolume());
|
oilTank.setStoredQuantity(oilInventoryOrderVO.getInventoryVolume());
|
||||||
@ -247,13 +251,7 @@ public class OilInventoryOrderServiceImpl implements OilInventoryOrderService {
|
|||||||
|
|
||||||
|
|
||||||
// 插入到库存跟踪
|
// 插入到库存跟踪
|
||||||
OilTracking oilTracking = new OilTracking();
|
OilTracking oilTracking = getOilTracking(oilInventoryOrderVO, nowAccountInfo, oilIntake);
|
||||||
oilTracking.setStoreId(nowAccountInfo.getStoreId());
|
|
||||||
oilTracking.setCreateBy(nowAccountInfo.getStaffId().toString());
|
|
||||||
oilTracking.setDocument(oilIntake);
|
|
||||||
oilTracking.setQuantityChange(oilInventoryOrderVO.getInventoryVolume());
|
|
||||||
oilTracking.setTankId(oilInventoryOrderVO.getTankId());
|
|
||||||
oilTracking.setOrderNumber(oilInventoryOrderVO.getInventoryNumber());
|
|
||||||
oilTrackingMapper.insert(oilTracking);
|
oilTrackingMapper.insert(oilTracking);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -268,6 +266,17 @@ public class OilInventoryOrderServiceImpl implements OilInventoryOrderService {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static OilTracking getOilTracking(OilInventoryOrderVO oilInventoryOrderVO, AccountInfo nowAccountInfo, String oilIntake) {
|
||||||
|
OilTracking oilTracking = new OilTracking();
|
||||||
|
oilTracking.setStoreId(nowAccountInfo.getStoreId());
|
||||||
|
oilTracking.setCreateBy(nowAccountInfo.getStaffId().toString());
|
||||||
|
oilTracking.setDocument(oilIntake);
|
||||||
|
oilTracking.setQuantityChange(oilInventoryOrderVO.getInventoryVolume());
|
||||||
|
oilTracking.setTankId(oilInventoryOrderVO.getTankId());
|
||||||
|
oilTracking.setOrderNumber(oilInventoryOrderVO.getInventoryNumber());
|
||||||
|
return oilTracking;
|
||||||
|
}
|
||||||
|
|
||||||
// 修改审核人
|
// 修改审核人
|
||||||
public boolean edit(Integer id){
|
public boolean edit(Integer id){
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
@ -213,23 +213,21 @@ public class OilPurchaseOrderServiceImpl implements OilPurchaseOrderService {
|
|||||||
List<OilPurchaseOrderVO> allList = oilPurchaseOrderDao.getAllList(oilPurchase);
|
List<OilPurchaseOrderVO> allList = oilPurchaseOrderDao.getAllList(oilPurchase);
|
||||||
for (OilPurchaseOrderVO oilPurchaseOrderVO : allList) {
|
for (OilPurchaseOrderVO oilPurchaseOrderVO : allList) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
oilTankService.addStoredQuantityByLock(oilPurchaseOrderVO.getTankId(),oilPurchaseOrderVO.getPurchaseVolume(),oilPurchaseOrderVO.getTotalAmount());
|
oilTankService.addStoredQuantityByLock(oilPurchaseOrderVO.getTankId(),oilPurchaseOrderVO.getPurchaseVolume(),oilPurchaseOrderVO.getTotalAmount());
|
||||||
|
//
|
||||||
OilTank oilTank = new OilTank();
|
// OilTank oilTank = new OilTank();
|
||||||
oilTank.setId(oilPurchaseOrderVO.getTankId());
|
// oilTank.setId(oilPurchaseOrderVO.getTankId());
|
||||||
oilTank.setStoredQuantity(oilPurchaseOrderVO.getPurchaseVolume());
|
// oilTank.setStoredQuantity(oilPurchaseOrderVO.getPurchaseVolume());
|
||||||
oilTank.setTotalPrice(oilPurchaseOrderVO.getTotalAmount());
|
// oilTank.setTotalPrice(oilPurchaseOrderVO.getTotalAmount());
|
||||||
// oilTank.setDiscountedPrice(oilPurchaseOrderVO.getDiscountedPrice());
|
//// oilTank.setDiscountedPrice(oilPurchaseOrderVO.getDiscountedPrice());
|
||||||
|
//
|
||||||
// 单价计算
|
// // 单价计算
|
||||||
OilTank oilTankSum = oilTankMapper.queryById(oilPurchaseOrderVO.getTankId());
|
// OilTank oilTankSum = oilTankMapper.queryById(oilPurchaseOrderVO.getTankId());
|
||||||
BigDecimal totalSum= new BigDecimal(oilPurchaseOrderVO.getTotalAmount().toString()).add(new BigDecimal(oilTankSum.getTotalPrice().toString()));
|
// BigDecimal totalSum= new BigDecimal(oilPurchaseOrderVO.getTotalAmount().toString()).add(new BigDecimal(oilTankSum.getTotalPrice().toString()));
|
||||||
BigDecimal volSum= new BigDecimal(oilPurchaseOrderVO.getPurchaseVolume().toString()).add(new BigDecimal(oilTankSum.getStoredQuantity().toString()));
|
// BigDecimal volSum= new BigDecimal(oilPurchaseOrderVO.getPurchaseVolume().toString()).add(new BigDecimal(oilTankSum.getStoredQuantity().toString()));
|
||||||
BigDecimal disPrice = totalSum.divide(volSum, 2, RoundingMode.HALF_UP);
|
// BigDecimal disPrice = totalSum.divide(volSum, 2, RoundingMode.HALF_UP);
|
||||||
oilTank.setDiscountedPrice(disPrice.doubleValue());
|
// oilTank.setDiscountedPrice(disPrice.doubleValue());
|
||||||
oilTankMapper.accumulate(oilTank);
|
// oilTankMapper.accumulate(oilTank);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.fuint.business.petrolStationManagement.service.impl;
|
package com.fuint.business.petrolStationManagement.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.alibaba.excel.EasyExcel;
|
import com.alibaba.excel.EasyExcel;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.fuint.business.petrolStationManagement.entity.OilTank;
|
import com.fuint.business.petrolStationManagement.entity.OilTank;
|
||||||
@ -129,11 +130,11 @@ public class OilTankServiceImpl implements OilTankService {
|
|||||||
public OilTank addStoredQuantityByLock(Integer tankId, Double changeNum, Double totalAmount) {
|
public OilTank addStoredQuantityByLock(Integer tankId, Double changeNum, Double totalAmount) {
|
||||||
// 根据油罐id加锁 同一时间只能
|
// 根据油罐id加锁 同一时间只能
|
||||||
String lockKey = "oilTank-"+tankId;
|
String lockKey = "oilTank-"+tankId;
|
||||||
Boolean isLock = redisLock.tryLock(lockKey,5000,5000, TimeUnit.MILLISECONDS);
|
Boolean isLock = redisLock.tryLock(lockKey,500,5000, TimeUnit.MILLISECONDS);
|
||||||
if (isLock) {
|
if (isLock) {
|
||||||
// 判断存油数量是否足够
|
// 判断存油数量是否足够
|
||||||
OilTank oilTank = oilTankDao.queryById(tankId);
|
OilTank oilTank = oilTankDao.queryById(tankId);
|
||||||
// 计算总数
|
// 计算总升数
|
||||||
BigDecimal changeNumBigDecimal = new BigDecimal(changeNum.toString());
|
BigDecimal changeNumBigDecimal = new BigDecimal(changeNum.toString());
|
||||||
BigDecimal storedQuantityBigDecimal = changeNumBigDecimal.subtract(new BigDecimal(oilTank.getStoredQuantity().toString()));
|
BigDecimal storedQuantityBigDecimal = changeNumBigDecimal.subtract(new BigDecimal(oilTank.getStoredQuantity().toString()));
|
||||||
|
|
||||||
@ -141,8 +142,18 @@ public class OilTankServiceImpl implements OilTankService {
|
|||||||
redisLock.unlock(lockKey);
|
redisLock.unlock(lockKey);
|
||||||
throw new RuntimeException("“"+ oilTank.getTankName() +"”油罐中容量不足,无法进行增加!");
|
throw new RuntimeException("“"+ oilTank.getTankName() +"”油罐中容量不足,无法进行增加!");
|
||||||
}
|
}
|
||||||
// todo 计算单价,和总价格
|
|
||||||
this.oilTankDao.addStoredQuantityByLock(tankId, changeNum);
|
Double discountedPrice = null;
|
||||||
|
if (ObjectUtil.isNotEmpty(totalAmount)) {
|
||||||
|
// 计算总价格
|
||||||
|
BigDecimal totalAmountBigDecimal = new BigDecimal(totalAmount.toString());
|
||||||
|
BigDecimal totalPriceBigDecimal = totalAmountBigDecimal.subtract(new BigDecimal(oilTank.getTotalPrice().toString()));
|
||||||
|
// 计算单价
|
||||||
|
BigDecimal discountedPriceBigDecimal = totalPriceBigDecimal.divide(storedQuantityBigDecimal,2);
|
||||||
|
discountedPrice = Double.valueOf(discountedPriceBigDecimal.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
this.oilTankDao.addStoredQuantityByLock(tankId, changeNum, totalAmount, discountedPrice);
|
||||||
redisLock.unlock(lockKey);
|
redisLock.unlock(lockKey);
|
||||||
}
|
}
|
||||||
return this.queryById(tankId);
|
return this.queryById(tankId);
|
||||||
|
Binary file not shown.
35
fuintCashierWeb/src/api/cashier/balancecardrecord.js
Normal file
35
fuintCashierWeb/src/api/cashier/balancecardrecord.js
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询优惠券信息列表
|
||||||
|
export function listCardBalanceRecord(query) {
|
||||||
|
return request({
|
||||||
|
url: '/business/CardBalanceChange/getStoreOrdersList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询优惠券信息列表
|
||||||
|
export function listCardOilRecord(query) {
|
||||||
|
return request({
|
||||||
|
url: '/business/oilBalanceChange',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询优惠券信息列表
|
||||||
|
export function cardBalanceCount() {
|
||||||
|
return request({
|
||||||
|
url: '/business/CardBalanceChange/getBalanceStoreCount',
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询优惠券信息列表
|
||||||
|
export function cardOilCount() {
|
||||||
|
return request({
|
||||||
|
url: '/business/oilBalanceChange/getOilStoreCount',
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
10
fuintCashierWeb/src/api/cashier/refund.js
Normal file
10
fuintCashierWeb/src/api/cashier/refund.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 退款
|
||||||
|
export function refundApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/business/allOrderInfo/refund',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
@ -616,13 +616,13 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 重置
|
// 重置
|
||||||
reset() {
|
async reset() {
|
||||||
this.shoppingCart=[]
|
this.shoppingCart=[]
|
||||||
this.markPurchasesAll = 0
|
this.markPurchasesAll = 0
|
||||||
this.allPoints=0
|
this.allPoints=0
|
||||||
this.allAmout=0
|
this.allAmout=0
|
||||||
this.allMoneyRatio=0
|
this.allMoneyRatio=0
|
||||||
this.getGift();
|
await this.getGift();
|
||||||
|
|
||||||
// this.paymentType = ''
|
// this.paymentType = ''
|
||||||
this.resetMember()
|
this.resetMember()
|
||||||
@ -914,7 +914,7 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
|
|||||||
this.openConfirm = false
|
this.openConfirm = false
|
||||||
this.openRecharge = false
|
this.openRecharge = false
|
||||||
|
|
||||||
|
this.reset()
|
||||||
this.dialogVisiblej = false
|
this.dialogVisiblej = false
|
||||||
this.authCode = '';
|
this.authCode = '';
|
||||||
},
|
},
|
||||||
|
@ -196,13 +196,13 @@
|
|||||||
<div class="wrap-box" v-for="item in payList"
|
<div class="wrap-box" v-for="item in payList"
|
||||||
:key="item.dictValue"
|
:key="item.dictValue"
|
||||||
:value="item.dictValue"
|
:value="item.dictValue"
|
||||||
:class="{ 'wrap-box2': item.dictValue === map.payType }"
|
:class="{ 'wrap-box2': item.dictValue == typeIdex }"
|
||||||
@click="payMethod(item.dictValue)">
|
@click="payMethod(item.dictValue)">
|
||||||
<span>{{ item.dictLabel }}</span>
|
<span>{{ item.dictLabel }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="wrap-box" value="credit"
|
<div class="wrap-box" value="credit"
|
||||||
:class="{ 'wrap-box2': 'credit' === map.payType }" >
|
:class="{ 'wrap-box2': '798' == typeIdex }" >
|
||||||
<span @click="addCredits">挂账</span>
|
<span @click="addCredits('798')">挂账</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="center-left-bottom">
|
<div class="center-left-bottom">
|
||||||
@ -246,30 +246,9 @@
|
|||||||
<img src="../../../assets/images/jya.png" style="width: 18px;height: 18px;">
|
<img src="../../../assets/images/jya.png" style="width: 18px;height: 18px;">
|
||||||
<span style="font-size: 12px">{{ item.tankName }}</span>
|
<span style="font-size: 12px">{{ item.tankName }}</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div style="display: flex;justify-content: space-between">-->
|
|
||||||
<!-- <span>-->
|
|
||||||
<!-- <svg t="1700561564710" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9686" width="16" height="16"><path d="M661.8 868.4V455.8h27.9c15.3-0.1 27.8 12.3 27.9 27.6V746c-0.1 67.5 54.5 122.3 121.9 122.4S961.9 813.9 962 746.5V241.6c0.1-25.4-10.1-49.8-28.3-67.5l-99.4-98.5c-18-18-47.2-18-65.2 0s-18 47.2 0 65.2l64.3 64.8-47.7 49.5c-15.8 16-15.8 41.6 0 57.6 7.4 7.8 17.6 12.2 28.3 12.1h54v422.1c0 15.4-12.5 27.9-27.9 27.9-15.4 0-27.9-12.5-27.9-27.9V484.1c0.1-67.3-54.3-121.8-121.6-121.9H662.3v-225c-0.1-41.5-33.7-75.1-75.1-75.1H193.4c-41.5 0.1-75.1 33.7-75.1 75.1v731.2h-9.4c-25.8 0-46.8 21-46.8 46.8C62 941 83 962 108.8 962h562.5c25.8 0 46.8-20.9 46.8-46.8 0-25.8-20.9-46.8-46.8-46.8h-9.5zM253.2 155.6h273.6c22.8 0 41.3 18.4 41.4 41.2v199.1c0 22.8-18.4 41.3-41.2 41.4H253.2c-22.8 0-41.3-18.4-41.4-41.2V197c0-22.8 18.4-41.3 41.2-41.4h0.2z" fill="#FFFFFF" p-id="9687"></path></svg>-->
|
|
||||||
<!-- </span>-->
|
|
||||||
<!-- <span>-->
|
|
||||||
<!-- <svg t="1700561410052" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5197" width="16" height="16"><path d="M365.714286 365.714286h109.714285v365.714285H365.714286V365.714286z m182.857143 0H658.285714v365.714285H548.571429V365.714286z m329.142857-36.571429v438.857143A182.857143 182.857143 0 0 1 694.857143 950.857143h-365.714286A182.857143 182.857143 0 0 1 146.285714 768v-438.857143h109.714286v416.256c0 45.129143 47.104 95.744 93.037714 95.744h326.217143c57.563429 0 92.745143-52.370286 92.745143-95.744V329.142857H877.714286zM676.571429 146.285714h182.857142a54.857143 54.857143 0 0 1 54.857143 54.857143v54.857143h-804.571428v-54.857143A54.857143 54.857143 0 0 1 164.571429 146.285714h182.857142l38.4-51.2a54.857143 54.857143 0 0 1 43.885715-21.942857h164.571428a54.857143 54.857143 0 0 1 43.885715 21.942857l38.4 51.2z" fill="#FFFFFF" p-id="5198"></path></svg>-->
|
|
||||||
<!-- </span>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
</div>
|
|
||||||
<!-- 点击之后样式测试-->
|
|
||||||
<!-- <div class="after-box">-->
|
|
||||||
<!-- <div>11</div>-->
|
|
||||||
|
|
||||||
<!-- <div class="of-title" >1号枪</div>-->
|
</div>
|
||||||
<!-- <div style="display: flex;justify-content: space-between">-->
|
|
||||||
<!--<!– <img src="../../../assets/images/jya.png" style="width: 18px;height: 18px;">–>-->
|
|
||||||
<!-- <span>-->
|
|
||||||
<!-- <svg t="1700561564710" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9686" width="16" height="16"><path d="M661.8 868.4V455.8h27.9c15.3-0.1 27.8 12.3 27.9 27.6V746c-0.1 67.5 54.5 122.3 121.9 122.4S961.9 813.9 962 746.5V241.6c0.1-25.4-10.1-49.8-28.3-67.5l-99.4-98.5c-18-18-47.2-18-65.2 0s-18 47.2 0 65.2l64.3 64.8-47.7 49.5c-15.8 16-15.8 41.6 0 57.6 7.4 7.8 17.6 12.2 28.3 12.1h54v422.1c0 15.4-12.5 27.9-27.9 27.9-15.4 0-27.9-12.5-27.9-27.9V484.1c0.1-67.3-54.3-121.8-121.6-121.9H662.3v-225c-0.1-41.5-33.7-75.1-75.1-75.1H193.4c-41.5 0.1-75.1 33.7-75.1 75.1v731.2h-9.4c-25.8 0-46.8 21-46.8 46.8C62 941 83 962 108.8 962h562.5c25.8 0 46.8-20.9 46.8-46.8 0-25.8-20.9-46.8-46.8-46.8h-9.5zM253.2 155.6h273.6c22.8 0 41.3 18.4 41.4 41.2v199.1c0 22.8-18.4 41.3-41.2 41.4H253.2c-22.8 0-41.3-18.4-41.4-41.2V197c0-22.8 18.4-41.3 41.2-41.4h0.2z" fill="#FFFFFF" p-id="9687"></path></svg>-->
|
|
||||||
<!-- </span>-->
|
|
||||||
<!-- <span>-->
|
|
||||||
<!-- <svg t="1700561410052" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5197" width="16" height="16"><path d="M365.714286 365.714286h109.714285v365.714285H365.714286V365.714286z m182.857143 0H658.285714v365.714285H548.571429V365.714286z m329.142857-36.571429v438.857143A182.857143 182.857143 0 0 1 694.857143 950.857143h-365.714286A182.857143 182.857143 0 0 1 146.285714 768v-438.857143h109.714286v416.256c0 45.129143 47.104 95.744 93.037714 95.744h326.217143c57.563429 0 92.745143-52.370286 92.745143-95.744V329.142857H877.714286zM676.571429 146.285714h182.857142a54.857143 54.857143 0 0 1 54.857143 54.857143v54.857143h-804.571428v-54.857143A54.857143 54.857143 0 0 1 164.571429 146.285714h182.857142l38.4-51.2a54.857143 54.857143 0 0 1 43.885715-21.942857h164.571428a54.857143 54.857143 0 0 1 43.885715 21.942857l38.4 51.2z" fill="#FFFFFF" p-id="5198"></path></svg>-->
|
|
||||||
<!-- </span>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -307,21 +286,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-autocomplete>
|
</el-autocomplete>
|
||||||
<!-- <el-select v-model="goods" filterable-->
|
|
||||||
<!-- style="width: 95%;font-size: 20px;"-->
|
|
||||||
<!-- @change="changeGoods"-->
|
|
||||||
<!-- @keydown.enter.native="queryGoods"-->
|
|
||||||
<!-- clearable-->
|
|
||||||
<!-- placeholder="请输入商品名称,商品关键词">-->
|
|
||||||
<!-- <el-option-->
|
|
||||||
<!-- v-for="item in goodsList"-->
|
|
||||||
<!-- :key="item.id"-->
|
|
||||||
<!-- :label="item.name"-->
|
|
||||||
<!-- :value="item.id">-->
|
|
||||||
<!-- <span style="float: left">{{ item.name }}</span>-->
|
|
||||||
<!-- <span style="float: right; color: #8492a6; font-size: 13px">{{ item.retailPrice }}</span>-->
|
|
||||||
<!-- </el-option>-->
|
|
||||||
<!-- </el-select>-->
|
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div class="center-top-data">
|
<div class="center-top-data">
|
||||||
@ -1115,7 +1080,8 @@
|
|||||||
return name;
|
return name;
|
||||||
},
|
},
|
||||||
// 挂账
|
// 挂账
|
||||||
addCredits(){
|
addCredits(type){
|
||||||
|
this.typeIdex = type
|
||||||
this.map.payType = "credit"
|
this.map.payType = "credit"
|
||||||
this.dialogVisibleCredit = true
|
this.dialogVisibleCredit = true
|
||||||
this.form1.amount = this.oilAmount + this.goodsAmount
|
this.form1.amount = this.oilAmount + this.goodsAmount
|
||||||
@ -2599,16 +2565,16 @@
|
|||||||
this.loading = true;
|
this.loading = true;
|
||||||
setTimeout(function (){
|
setTimeout(function (){
|
||||||
_this.loading = false;
|
_this.loading = false;
|
||||||
_this.isPaySuccess = true;
|
|
||||||
_this.isPay = true;
|
_this.isPay = true;
|
||||||
|
_this.isPaySuccess = true;
|
||||||
_this.resetting1();
|
_this.resetting1();
|
||||||
},3000)
|
},3000)
|
||||||
}else {
|
}else {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
setTimeout(function (){
|
setTimeout(function (){
|
||||||
_this.loading = false;
|
_this.loading = false;
|
||||||
_this.isPaySuccess = false;
|
|
||||||
_this.isPay = true;
|
_this.isPay = true;
|
||||||
|
_this.isPaySuccess = false;
|
||||||
_this.resetting1();
|
_this.resetting1();
|
||||||
this.$modal.msgError(resp.data.error)
|
this.$modal.msgError(resp.data.error)
|
||||||
},3000)
|
},3000)
|
||||||
@ -2668,7 +2634,7 @@
|
|||||||
let _this = this;
|
let _this = this;
|
||||||
this.authCode = "";
|
this.authCode = "";
|
||||||
if (_this.isPaySuccess == true){
|
if (_this.isPaySuccess == true){
|
||||||
_this.isPay = false;
|
// _this.isPay = false;
|
||||||
_this.oilAmount = 0;
|
_this.oilAmount = 0;
|
||||||
_this.oilActualPay = 0;
|
_this.oilActualPay = 0;
|
||||||
_this.oilDiscount = 0;
|
_this.oilDiscount = 0;
|
||||||
@ -2723,6 +2689,7 @@
|
|||||||
goodsNum:0,
|
goodsNum:0,
|
||||||
// 会员消费金额(储值卡需要减少的金额)
|
// 会员消费金额(储值卡需要减少的金额)
|
||||||
consumeAmount:0,
|
consumeAmount:0,
|
||||||
|
typeIdex:'',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
updateRefuelMoney(){
|
updateRefuelMoney(){
|
||||||
@ -2777,6 +2744,7 @@
|
|||||||
},
|
},
|
||||||
// 支付方式
|
// 支付方式
|
||||||
payMethod(payType){
|
payMethod(payType){
|
||||||
|
this.typeIdex = payType
|
||||||
this.map.payType = payType;
|
this.map.payType = payType;
|
||||||
this.payType = payType;
|
this.payType = payType;
|
||||||
},
|
},
|
||||||
@ -3099,6 +3067,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
}
|
}
|
||||||
.wrap-box2{
|
.wrap-box2{
|
||||||
|
@ -251,7 +251,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="dialogRefund = false">取 消</el-button>
|
<el-button @click="dialogRefund = false">取 消</el-button>
|
||||||
<el-button type="primary" @click="dialogRefund = false">确 定</el-button>
|
<el-button type="primary" @click="refundConfirmed()">确 定</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
@ -264,6 +264,7 @@ import {oilOrderList, oilOrders} from "@/api/cashier/oilorder";
|
|||||||
import {getOilNameList} from "@/api/cashier/oilnumgun";
|
import {getOilNameList} from "@/api/cashier/oilnumgun";
|
||||||
import {getOrderGoods} from "@/api/cashier/goodsorder";
|
import {getOrderGoods} from "@/api/cashier/goodsorder";
|
||||||
import {exportExcelCashierApi} from "@/api/order/exportExcel";
|
import {exportExcelCashierApi} from "@/api/order/exportExcel";
|
||||||
|
import {refundApi} from "@/api/cashier/refund";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "order_Cashier",
|
name: "order_Cashier",
|
||||||
@ -360,6 +361,21 @@ import {exportExcelCashierApi} from "@/api/order/exportExcel";
|
|||||||
this.cashierOrder = response.data
|
this.cashierOrder = response.data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
refundConfirmed() {
|
||||||
|
this.dialogRefund = false;
|
||||||
|
// 退款确定
|
||||||
|
// cashierOrder
|
||||||
|
console.log("cashierOrder",this.cashierOrder)
|
||||||
|
let map={
|
||||||
|
orderNo: this.cashierOrder.orderNo,
|
||||||
|
storeId: this.cashierOrder.storeId,
|
||||||
|
type: "cashierOrder"
|
||||||
|
}
|
||||||
|
refundApi(map).then(res=>{
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
// 获取油号名称
|
// 获取油号名称
|
||||||
getName(oilNameList,id){
|
getName(oilNameList,id){
|
||||||
let name = ""
|
let name = ""
|
||||||
|
@ -215,7 +215,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="dialogRefund = false">取 消</el-button>
|
<el-button @click="dialogRefund = false">取 消</el-button>
|
||||||
<el-button type="primary" @click="dialogRefund = false">确 定</el-button>
|
<el-button type="primary" @click="refundConfirmed()">确 定</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
@ -225,6 +225,7 @@
|
|||||||
import {cardValueRecordInfo, listCardValueRecord, orderStatisticsApi} from "@/api/cashier/cardvaluerecord";
|
import {cardValueRecordInfo, listCardValueRecord, orderStatisticsApi} from "@/api/cashier/cardvaluerecord";
|
||||||
import {getDicts} from "@/api/dict/data";
|
import {getDicts} from "@/api/dict/data";
|
||||||
import {queryStaffs} from "@/api/cashier/staff";
|
import {queryStaffs} from "@/api/cashier/staff";
|
||||||
|
import {refundApi} from "@/api/cashier/refund";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "order_Cashier",
|
name: "order_Cashier",
|
||||||
@ -296,6 +297,21 @@ export default {
|
|||||||
this.oilOrder = response.data
|
this.oilOrder = response.data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
refundConfirmed() {
|
||||||
|
this.dialogRefund = false;
|
||||||
|
// 退款确定
|
||||||
|
// cashierOrder
|
||||||
|
console.log("oilOrder",this.oilOrder)
|
||||||
|
let map={
|
||||||
|
orderNo: this.oilOrder.paymentNo,
|
||||||
|
storeId: this.oilOrder.storeId,
|
||||||
|
type: "oilOrder"
|
||||||
|
}
|
||||||
|
refundApi(map).then(res=>{
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
getType(list,val){
|
getType(list,val){
|
||||||
let name = "";
|
let name = "";
|
||||||
list.forEach(item => {
|
list.forEach(item => {
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
<div>
|
<div>
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||||
<el-tab-pane label="储值卡记录" name="first"></el-tab-pane>
|
<el-tab-pane label="储值卡记录" name="balanceCard"></el-tab-pane>
|
||||||
<el-tab-pane label="升数卡记录" name="second"></el-tab-pane>
|
<el-tab-pane label="升数卡记录" name="ascendCard"></el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<div style="display: flex;">
|
<div style="display: flex;">
|
||||||
<div class="top-app-sou">
|
<div class="top-app-sou">
|
||||||
@ -19,15 +19,35 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<!-- 储值卡-->
|
<!-- 储值卡-->
|
||||||
<div v-if="activeName == 'first' ">
|
<div v-if="activeName == 'balanceCard' ">
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span>储值卡统计</span>
|
<span>储值卡统计</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="box-gang">
|
<div class="box-gang">
|
||||||
<div class="box" v-for="(item,index) in 7" :key="index">
|
<!-- <div class="box" v-for="(item,index) in 7" :key="index">-->
|
||||||
<div class="size-hui">会员总数</div>
|
<!-- <div class="size-hui">会员总数</div>-->
|
||||||
<div class="size-bole">55</div>
|
<!-- <div class="size-bole">55</div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<div class="box">
|
||||||
|
<div class="size-hui">余额汇总</div>
|
||||||
|
<div class="size-bole">{{ totalBalance }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="box">
|
||||||
|
<div class="size-hui">充值笔数</div>
|
||||||
|
<div class="size-bole">{{ inCount }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="box">
|
||||||
|
<div class="size-hui">充值总额</div>
|
||||||
|
<div class="size-bole">{{ totalRecharge }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="box">
|
||||||
|
<div class="size-hui">消费笔数</div>
|
||||||
|
<div class="size-bole">{{ outCount }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="box">
|
||||||
|
<div class="size-hui">消费总额</div>
|
||||||
|
<div class="size-bole">{{ totalConsumption }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
@ -36,105 +56,48 @@
|
|||||||
<div>列表</div>
|
<div>列表</div>
|
||||||
<div style="display: flex ">
|
<div style="display: flex ">
|
||||||
|
|
||||||
<el-button type="primary" size="mini" icon="el-icon-plus">新增会员</el-button>
|
<!-- <el-button type="primary" size="mini" icon="el-icon-plus">新增会员</el-button>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-box">
|
<div class="table-box">
|
||||||
<el-table
|
<el-table
|
||||||
:data="tableData"
|
:data="cardBalanceList"
|
||||||
style="width: 100%">
|
style="width: 100%">
|
||||||
<el-table-column type="expand">
|
<el-table-column prop="storeId" label="所属油站" align="center">
|
||||||
<template slot-scope="props">
|
|
||||||
<el-form label-position="left" inline class="demo-table-expand">
|
|
||||||
<el-form-item label="名称">
|
|
||||||
<span>{{ props.row.name }}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="date"
|
|
||||||
label="用户信息"
|
|
||||||
width="150">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="余额">
|
|
||||||
<el-table-column
|
|
||||||
prop="name"
|
|
||||||
label="储值卡"
|
|
||||||
width="120">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="name"
|
|
||||||
label="升值卡"
|
|
||||||
width="120">
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="会员等级">
|
|
||||||
<el-table-column
|
|
||||||
prop="province"
|
|
||||||
label="汽油"
|
|
||||||
width="120">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="city"
|
|
||||||
label="柴油"
|
|
||||||
width="120">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="city"
|
|
||||||
label="天然气"
|
|
||||||
width="120">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="统计">
|
|
||||||
<el-table-column
|
|
||||||
prop="province"
|
|
||||||
label="加油金"
|
|
||||||
width="120">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="city"
|
|
||||||
label="积分"
|
|
||||||
width="120">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="city"
|
|
||||||
label="消费次数"
|
|
||||||
width="120">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column
|
|
||||||
prop="zip"
|
|
||||||
label="实体卡号"
|
|
||||||
width="220">
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column
|
|
||||||
prop="zip"
|
|
||||||
label="状态"
|
|
||||||
width="120">
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<span>{{store.name}}</span>
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-edit"
|
|
||||||
>更多操作</el-button>
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="userId" label="用户信息" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.userId ? queryUser(userList,scope.row.userId):"--" }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="orderNo" label="订单号" width="220" align="center"> </el-table-column>
|
||||||
|
<el-table-column prop="changeType" label="类型" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.changeType=='1'"><el-tag type="success">充值</el-tag></span>
|
||||||
|
<span v-if="scope.row.changeType=='0'"><el-tag type="danger">消费</el-tag></span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="详细信息">
|
||||||
|
<el-table-column prop="balance" label="变动金额" align="center"> </el-table-column>
|
||||||
|
<el-table-column prop="afterTheChange" label="变动后余额" align="center" > </el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="fromType" label="消费来源" align="center" > </el-table-column>
|
||||||
|
<el-table-column prop="createTime" label="变动时间" align="center" > </el-table-column>
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="pagination-box">
|
<div class="pagination-box">
|
||||||
<el-pagination
|
<el-pagination
|
||||||
background
|
background
|
||||||
|
v-show="total>0"
|
||||||
layout="prev, pager, next"
|
layout="prev, pager, next"
|
||||||
:total="1000">
|
:total="total"
|
||||||
|
:page.sync="queryParams.page"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@current-change="getCardBalanceList">
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -142,15 +105,31 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
<!-- 升数卡-->
|
<!-- 升数卡-->
|
||||||
<div v-if="activeName == 'second' ">
|
<div v-if="activeName == 'ascendCard' ">
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span>升数卡统计</span>
|
<span>升数卡统计</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="box-gang">
|
<div class="box-gang">
|
||||||
<div class="box" v-for="(item,index) in 7" :key="index">
|
<!-- <div class="box" v-for="(item,index) in 7" :key="index">-->
|
||||||
<div class="size-hui">会员总数</div>
|
<!-- <div class="size-hui">会员总数</div>-->
|
||||||
<div class="size-bole">55</div>
|
<!-- <div class="size-bole">55</div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<div class="box">
|
||||||
|
<div class="size-hui">充值笔数</div>
|
||||||
|
<div class="size-bole">{{ inCount1 }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="box">
|
||||||
|
<div class="size-hui">充值总额</div>
|
||||||
|
<div class="size-bole">{{ totalRecharge1 }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="box">
|
||||||
|
<div class="size-hui">消费笔数</div>
|
||||||
|
<div class="size-bole">{{ outCount1 }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="box">
|
||||||
|
<div class="size-hui">消费总额</div>
|
||||||
|
<div class="size-bole">{{ totalConsumption1 }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
@ -159,109 +138,56 @@
|
|||||||
<div>列表</div>
|
<div>列表</div>
|
||||||
<div style="display: flex ">
|
<div style="display: flex ">
|
||||||
|
|
||||||
<el-button type="primary" size="mini" icon="el-icon-plus">新增会员</el-button>
|
<!-- <el-button type="primary" size="mini" icon="el-icon-plus">新增会员</el-button>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-box">
|
<div class="table-box">
|
||||||
<el-table
|
<el-table
|
||||||
:data="tableData"
|
:data="cardOilList"
|
||||||
style="width: 100%">
|
style="width: 100%">
|
||||||
<el-table-column type="expand">
|
<el-table-column prop="storeId" label="所属油站" align="center">
|
||||||
<template slot-scope="props">
|
|
||||||
<el-form label-position="left" inline class="demo-table-expand">
|
|
||||||
<el-form-item label="名称">
|
|
||||||
<span>{{ props.row.name }}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="date"
|
|
||||||
label="用户信息"
|
|
||||||
width="150">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="余额">
|
|
||||||
<el-table-column
|
|
||||||
prop="name"
|
|
||||||
label="储值卡"
|
|
||||||
width="120">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="name"
|
|
||||||
label="升值卡"
|
|
||||||
width="120">
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="会员等级">
|
|
||||||
<el-table-column
|
|
||||||
prop="province"
|
|
||||||
label="汽油"
|
|
||||||
width="120">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="city"
|
|
||||||
label="柴油"
|
|
||||||
width="120">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="city"
|
|
||||||
label="天然气"
|
|
||||||
width="120">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="统计">
|
|
||||||
<el-table-column
|
|
||||||
prop="province"
|
|
||||||
label="加油金"
|
|
||||||
width="120">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="city"
|
|
||||||
label="积分"
|
|
||||||
width="120">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="city"
|
|
||||||
label="消费次数"
|
|
||||||
width="120">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column
|
|
||||||
prop="zip"
|
|
||||||
label="实体卡号"
|
|
||||||
width="220">
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column
|
|
||||||
prop="zip"
|
|
||||||
label="状态"
|
|
||||||
width="120">
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<span>{{store.name}}</span>
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-edit"
|
|
||||||
>更多操作</el-button>
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="userId" label="用户信息" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.userId ? queryUser(userList,scope.row.userId):"--" }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="oilType" label="油品类型" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{scope.row.type}}{{ getOilName(oilNameList,scope.row.oilType) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="orderNo" label="订单号" width="230" align="center"> </el-table-column>
|
||||||
|
<el-table-column prop="changeType" label="类型" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.changeType=='1'"><el-tag type="success">充值</el-tag></span>
|
||||||
|
<span v-if="scope.row.changeType=='0'"><el-tag type="danger">消费</el-tag></span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="详细信息">
|
||||||
|
<el-table-column prop="oilBalance" label="变动金额" align="center"> </el-table-column>
|
||||||
|
<el-table-column prop="afterOilChange" label="变动后余额" align="center" > </el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="fromType" label="消费来源" align="center" > </el-table-column>
|
||||||
|
<el-table-column prop="createTime" label="变动时间" align="center" > </el-table-column>
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="pagination-box">
|
<div class="pagination-box">
|
||||||
<el-pagination
|
<el-pagination
|
||||||
background
|
background
|
||||||
|
v-show="total1>0"
|
||||||
layout="prev, pager, next"
|
layout="prev, pager, next"
|
||||||
:total="1000">
|
:total="total1"
|
||||||
|
:page.sync="queryParams1.page"
|
||||||
|
:limit.sync="queryParams1.pageSize"
|
||||||
|
@current-change="getCardOilList">
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -270,72 +196,203 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {
|
||||||
|
cardBalanceCount,
|
||||||
|
cardOilCount,
|
||||||
|
listCardBalanceRecord,
|
||||||
|
listCardOilRecord
|
||||||
|
} from "@/api/cashier/balancecardrecord";
|
||||||
|
import {ljStoreInfo} from "@/api/cashier/user/store";
|
||||||
|
import {queryUsers} from "@/api/cashier/user/user";
|
||||||
|
import {oilNumbers} from "@/api/cashier/oilnumber";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "balanceList",
|
name: "balanceList",
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
activeName: 'first',
|
activeName: 'balanceCard',
|
||||||
labelPosition: 'right',
|
labelPosition: 'right',
|
||||||
formLabelAlign: {
|
formLabelAlign: {
|
||||||
name: '',
|
name: '',
|
||||||
},
|
},
|
||||||
|
store:{},
|
||||||
|
|
||||||
tableData: [{
|
queryParams:{
|
||||||
date: '2016-05-03',
|
page:1,
|
||||||
name: '王小狼',
|
pageSize:10,
|
||||||
province: '上海',
|
},
|
||||||
city: '普陀区',
|
cardBalanceList:[],
|
||||||
address: '上海市普陀区金沙江路 1518 弄',
|
total:0,
|
||||||
zip: 200333
|
inCount:0,
|
||||||
}, {
|
outCount:0,
|
||||||
date: '2016-05-02',
|
totalBalance:0,
|
||||||
name: '王小虎',
|
totalConsumption:0,
|
||||||
province: '上海',
|
totalRecharge:0,
|
||||||
city: '普陀区',
|
|
||||||
address: '上海市普陀区金沙江路 1518 弄',
|
queryParams1:{
|
||||||
zip: 200333
|
page:1,
|
||||||
}, {
|
pageSize:10,
|
||||||
date: '2016-05-04',
|
},
|
||||||
name: '王小虎',
|
cardOilList:[],
|
||||||
province: '上海',
|
total1:0,
|
||||||
city: '普陀区',
|
inCount1:0,
|
||||||
address: '上海市普陀区金沙江路 1518 弄',
|
outCount1:0,
|
||||||
zip: 200333
|
totalConsumption1:0,
|
||||||
}, {
|
totalRecharge1:0,
|
||||||
date: '2016-05-01',
|
|
||||||
name: '王小虎',
|
// 用户列表
|
||||||
province: '上海',
|
userList:[],
|
||||||
city: '普陀区',
|
oilNameList:[],
|
||||||
address: '上海市普陀区金沙江路 1518 弄',
|
|
||||||
zip: 200333
|
// tableData: [{
|
||||||
}, {
|
// date: '2016-05-03',
|
||||||
date: '2016-05-08',
|
// name: '王小狼',
|
||||||
name: '王小虎',
|
// province: '上海',
|
||||||
province: '上海',
|
// city: '普陀区',
|
||||||
city: '普陀区',
|
// address: '上海市普陀区金沙江路 1518 弄',
|
||||||
address: '上海市普陀区金沙江路 1518 弄',
|
// zip: 200333
|
||||||
zip: 200333
|
// }, {
|
||||||
}, {
|
// date: '2016-05-02',
|
||||||
date: '2016-05-06',
|
// name: '王小虎',
|
||||||
name: '王小虎',
|
// province: '上海',
|
||||||
province: '上海',
|
// city: '普陀区',
|
||||||
city: '普陀区',
|
// address: '上海市普陀区金沙江路 1518 弄',
|
||||||
address: '上海市普陀区金沙江路 1518 弄',
|
// zip: 200333
|
||||||
zip: 200333
|
// }, {
|
||||||
}, {
|
// date: '2016-05-04',
|
||||||
date: '2016-05-07',
|
// name: '王小虎',
|
||||||
name: '王小虎',
|
// province: '上海',
|
||||||
province: '上海',
|
// city: '普陀区',
|
||||||
city: '普陀区',
|
// address: '上海市普陀区金沙江路 1518 弄',
|
||||||
address: '上海市普陀区金沙江路 1518 弄',
|
// zip: 200333
|
||||||
zip: 200333
|
// }, {
|
||||||
}]
|
// date: '2016-05-01',
|
||||||
|
// name: '王小虎',
|
||||||
|
// province: '上海',
|
||||||
|
// city: '普陀区',
|
||||||
|
// address: '上海市普陀区金沙江路 1518 弄',
|
||||||
|
// zip: 200333
|
||||||
|
// }, {
|
||||||
|
// date: '2016-05-08',
|
||||||
|
// name: '王小虎',
|
||||||
|
// province: '上海',
|
||||||
|
// city: '普陀区',
|
||||||
|
// address: '上海市普陀区金沙江路 1518 弄',
|
||||||
|
// zip: 200333
|
||||||
|
// }, {
|
||||||
|
// date: '2016-05-06',
|
||||||
|
// name: '王小虎',
|
||||||
|
// province: '上海',
|
||||||
|
// city: '普陀区',
|
||||||
|
// address: '上海市普陀区金沙江路 1518 弄',
|
||||||
|
// zip: 200333
|
||||||
|
// }, {
|
||||||
|
// date: '2016-05-07',
|
||||||
|
// name: '王小虎',
|
||||||
|
// province: '上海',
|
||||||
|
// city: '普陀区',
|
||||||
|
// address: '上海市普陀区金沙江路 1518 弄',
|
||||||
|
// zip: 200333
|
||||||
|
// }]
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.getCardBalanceList();
|
||||||
|
// this.getCardBalanceCount();
|
||||||
|
// this.getCardOilList();
|
||||||
|
// this.getCardOilCount();
|
||||||
|
this.getStoreInfo();
|
||||||
|
this.getUserList();
|
||||||
|
this.getOilNameList();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getOilName(list,id){
|
||||||
|
let name = ""
|
||||||
|
list.forEach(item => {
|
||||||
|
if (item.oilName = id){
|
||||||
|
name = item.oilNames;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return name;
|
||||||
|
},
|
||||||
|
getOilNameList(){
|
||||||
|
oilNumbers().then(response => {
|
||||||
|
this.oilNameList = response.data;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getUserList(){
|
||||||
|
queryUsers().then(res => {
|
||||||
|
this.userList = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
queryUser(list,id){
|
||||||
|
let name = ""
|
||||||
|
list.forEach(item => {
|
||||||
|
if (item.id == id){
|
||||||
|
name = item.name + " | " + item.mobile
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return name;
|
||||||
|
},
|
||||||
|
// 获取店铺信息
|
||||||
|
getStoreInfo(){
|
||||||
|
ljStoreInfo().then(res => {
|
||||||
|
this.store = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getCardBalanceList(val){
|
||||||
|
if (val!=undefined){
|
||||||
|
this.queryParams.page = val
|
||||||
|
}
|
||||||
|
listCardBalanceRecord(this.queryParams).then(res => {
|
||||||
|
this.cardBalanceList = res.data.records
|
||||||
|
this.total = res.data.total
|
||||||
|
})
|
||||||
|
this.getCardBalanceCount(val)
|
||||||
|
},
|
||||||
|
getCardBalanceCount(val){
|
||||||
|
if (val!=undefined){
|
||||||
|
this.queryParams.page = val
|
||||||
|
}
|
||||||
|
cardBalanceCount(this.queryParams).then(res => {
|
||||||
|
this.inCount = res.data.inCount
|
||||||
|
this.outCount = res.data.outCount
|
||||||
|
this.totalBalance = res.data.totalBalance
|
||||||
|
this.totalRecharge = res.data.totalRecharge
|
||||||
|
this.totalConsumption = res.data.totalConsumption
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getCardOilList(val){
|
||||||
|
if (val!=undefined){
|
||||||
|
this.queryParams1.page = val
|
||||||
|
}
|
||||||
|
listCardOilRecord(this.queryParams1).then(res => {
|
||||||
|
this.cardOilList = res.data.records
|
||||||
|
this.total1 = res.data.total
|
||||||
|
})
|
||||||
|
this.getCardOilCount(val)
|
||||||
|
},
|
||||||
|
getCardOilCount(val){
|
||||||
|
if (val!=undefined){
|
||||||
|
this.queryParams1.page = val
|
||||||
|
}
|
||||||
|
cardOilCount().then(res => {
|
||||||
|
this.inCount1 = res.data.inCount
|
||||||
|
this.outCount1 = res.data.outCount
|
||||||
|
this.totalConsumption1 = res.data.totalConsumption
|
||||||
|
this.totalRecharge1 = res.data.totalRecharge
|
||||||
|
console.log(res)
|
||||||
|
})
|
||||||
|
},
|
||||||
handleClick(tab, event) {
|
handleClick(tab, event) {
|
||||||
console.log(tab, event);
|
console.log(tab, event);
|
||||||
|
if (this.activeName == 'ascendCard'){
|
||||||
|
this.getCardOilList();
|
||||||
|
}
|
||||||
|
if (this.activeName == 'balanceCard'){
|
||||||
|
this.getCardBalanceList();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,11 +3,13 @@ module.exports = {
|
|||||||
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
|
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
|
||||||
// baseUrl: 'http://192.168.0.196:8081/',
|
// baseUrl: 'http://192.168.0.196:8081/',
|
||||||
// baseUrl: 'http://192.168.1.4:8080/',
|
// baseUrl: 'http://192.168.1.4:8080/',
|
||||||
|
<<<<<<< HEAD
|
||||||
|
baseUrl: 'http://192.168.0.178:8008/',
|
||||||
|
|
||||||
|
=======
|
||||||
baseUrl: 'http://192.168.0.138:8008/',
|
baseUrl: 'http://192.168.0.138:8008/',
|
||||||
|
>>>>>>> 0ec2ff3c9193e4196b86613616f090a7bfc9f75a
|
||||||
// baseUrl: 'http://192.168.1.5:8002/cdJdc',
|
// baseUrl: 'http://192.168.1.5:8002/cdJdc',
|
||||||
|
|
||||||
|
|
||||||
imagesUrl: 'http://www.nuoyunr.com/lananRsc',
|
imagesUrl: 'http://www.nuoyunr.com/lananRsc',
|
||||||
// 应用信息
|
// 应用信息
|
||||||
appInfo: {
|
appInfo: {
|
||||||
@ -30,4 +32,4 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -176,13 +176,12 @@
|
|||||||
console.log(res)
|
console.log(res)
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.cardsList = res.data.records
|
this.cardsList = res.data.records
|
||||||
|
|
||||||
|
|
||||||
console.log(this.toil);
|
console.log(this.toil);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getUserBalance() {
|
getUserBalance() {
|
||||||
|
this.cardsList = []
|
||||||
request({
|
request({
|
||||||
url: '/business/userManager/user/getUserBalanceApplet',
|
url: '/business/userManager/user/getUserBalanceApplet',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
@ -35,8 +35,9 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="box-gang" @click="show = true">
|
<view class="box-gang" @click="show = true">
|
||||||
<view class="">推荐员工</view>
|
<view class="">推荐员工</view>
|
||||||
<view class=""></view>
|
|
||||||
<view class="">
|
<view style="display: flex;align-items: center;">
|
||||||
|
<view class="">{{yname}}</view>
|
||||||
<uni-icons type="right" size="14"></uni-icons>
|
<uni-icons type="right" size="14"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -152,6 +153,7 @@
|
|||||||
query: {
|
query: {
|
||||||
storeId: ''
|
storeId: ''
|
||||||
},
|
},
|
||||||
|
yname: '',
|
||||||
chainStoreId: '',
|
chainStoreId: '',
|
||||||
cardRecordId: '',
|
cardRecordId: '',
|
||||||
cardFavorableId: '',
|
cardFavorableId: '',
|
||||||
@ -368,6 +370,7 @@
|
|||||||
confirm(e) {
|
confirm(e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
this.staffId = e.value[0].id
|
this.staffId = e.value[0].id
|
||||||
|
this.yname = e.value[0].realName
|
||||||
this.show = false
|
this.show = false
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
|
@ -18,14 +18,17 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="card-box" v-for="(item,index) in cardsList" :key="index">
|
<view class="card-box" v-for="(item,index) in cardsList" :key="index">
|
||||||
<view class="left-img">
|
<view class="left-img">
|
||||||
<view class="huiz">¥{{item.couponAmount}}</view>
|
<view class="huiz" v-if="item.couponType == '优惠券'">¥{{item.couponAmount}}</view>
|
||||||
|
<view class="hui-icon" v-if="item.couponType != '优惠券'">
|
||||||
|
<image src="../../static/imgs/iconcar.png" mode=""></image>
|
||||||
|
</view>
|
||||||
<view class="cbai">{{item.couponType}}</view>
|
<view class="cbai">{{item.couponType}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right-box">
|
<view class="right-box">
|
||||||
<view class="title">{{item.couponName}}</view>
|
<view class="title">{{item.couponName}}</view>
|
||||||
<view class="hui-size">{{item.couponContent}}</view>
|
<view class="hui-size">{{item.couponContent}}</view>
|
||||||
<view class="dis-bt">
|
<view class="dis-bt">
|
||||||
<view class="hui-size">有效期:2023-11-30</view>
|
<view class="hui-size">有效期:{{item.endTime || ''}}</view>
|
||||||
<view class="anniu" v-if="item.couponType == '优惠券'"
|
<view class="anniu" v-if="item.couponType == '优惠券'"
|
||||||
@click="goRecharge(item.id,item.cardRecordId)">
|
@click="goRecharge(item.id,item.cardRecordId)">
|
||||||
<text>立即使用</text>
|
<text>立即使用</text>
|
||||||
@ -224,6 +227,8 @@
|
|||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.cardsList = res.data.records
|
this.cardsList = res.data.records
|
||||||
}
|
}
|
||||||
|
console.log(res.data.records);
|
||||||
|
console.log(this.cardsList);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -331,6 +336,16 @@
|
|||||||
color: #8F5624;
|
color: #8F5624;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hui-icon {
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 34px;
|
||||||
|
height: 26px;
|
||||||
|
margin: 6px 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.cbai {
|
.cbai {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
|
BIN
gasStation-uni/static/imgs/iconcar.png
Normal file
BIN
gasStation-uni/static/imgs/iconcar.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.4 KiB |
Loading…
Reference in New Issue
Block a user