Merge branch 'master' of https://gitee.com/nny_1/oilSystem
# Conflicts: # fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralSettingsServiceImpl.java # fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java
This commit is contained in:
commit
873cf444e8
@ -20,7 +20,7 @@
|
||||
<style >
|
||||
.app-container{
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
//height: 100vh;
|
||||
background: #f6f8f9;
|
||||
}
|
||||
</style>
|
||||
|
@ -78,7 +78,22 @@ export function updateActiveConsumption(data) {
|
||||
// 删除消费有礼活动
|
||||
export function delActiveConsumption(id) {
|
||||
return request({
|
||||
url: '/business/marketingActivity/activeConsumption/' + id,
|
||||
url: 'business/marketingActivity/activeConsumption/delById/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
//查看详情
|
||||
export function looklook(data) {
|
||||
return request({
|
||||
url: 'business/marketingActivity/activeConsumption/detailRecord',
|
||||
method: 'get',
|
||||
params:data
|
||||
})
|
||||
}
|
||||
export function looklooklook(id) {
|
||||
return request({
|
||||
url: 'business/marketingActivity/activeConsumption/detailCount/'+id,
|
||||
method: 'get',
|
||||
|
||||
})
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ export function updateActiveDiscount(data) {
|
||||
// 删除折扣营销
|
||||
export function delActiveDiscount(id) {
|
||||
return request({
|
||||
url: '/business/marketingActivity/activeDiscount/' + id,
|
||||
url: '/business/marketingActivity/activeDiscount/delById/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ export function updateActiveFullminus(data) {
|
||||
// 删除满减营销
|
||||
export function delActiveFullminus(id) {
|
||||
return request({
|
||||
url: '/business/marketingActivity/activeFullminus/' + id,
|
||||
url: '/business/marketingActivity/activeFullminus/delById/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
@ -3,11 +3,20 @@ import request from '@/utils/request'
|
||||
// 查询新人有礼活动列表
|
||||
export function listActiveNewlyweds(query) {
|
||||
return request({
|
||||
url: '/business/marketingActivity/activeNewlyweds',
|
||||
url: 'business/marketingActivity/activeNewlyweds',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 回显
|
||||
export function huiActiveNewlyweds(id) {
|
||||
return request({
|
||||
url: 'business/marketingActivity/activeNewlyweds/'+id,
|
||||
method: 'get',
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
export function getoilName(query) {
|
||||
return request({
|
||||
url: 'business/petrolStationManagement/oilNumber/getOilName',
|
||||
|
@ -9,6 +9,15 @@ export function listSupplier(query) {
|
||||
})
|
||||
}
|
||||
|
||||
// 查询供应商列表
|
||||
export function listSuppliers(query) {
|
||||
return request({
|
||||
url: '/business/convenience/supplier/lists',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询供应商详细
|
||||
export function getSupplier(id) {
|
||||
return request({
|
||||
|
@ -1,11 +1,11 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询会员等级列表
|
||||
export function listUserGrade(query) {
|
||||
export function listUserGrade() {
|
||||
return request({
|
||||
url: '/business/userManager/userGrade/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -52,23 +52,50 @@
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="活动名称" align="center" prop="name" />
|
||||
<el-table-column label="适用油品" align="center" prop="adaptOil" >
|
||||
<template slot-scope="scope">
|
||||
<span v-for="item in scope.row.adaptOil">{{ item }}, </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="满足金额" align="center" prop="participationConditionMoney" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.participationConditionMoney }} 元</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="适用会员类型" align="center" prop="adaptUserType" >
|
||||
<el-table-column label="适用用户" align="center" prop="adaptUserType" >
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.adaptUserType == 0">全部用户</span>
|
||||
<span v-if="scope.row.adaptUserType == 1">全部会员</span>
|
||||
<span v-if="scope.row.adaptUserType == 2">等级会员</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="会员等级" align="center" prop="dieselUserLevel" >
|
||||
<template slot-scope="scope">
|
||||
<span v-for="(item,index) in scope.row.dieselUserLevel "> {{item}} </span>
|
||||
</template>
|
||||
<el-table-column label="赠券数量" align="center" prop="adaptUserType" >
|
||||
<template slot-scope="scope">
|
||||
<div>优惠券:{{scope.row.youhuiTotal || 0}}</div>
|
||||
<div>兑换券:{{scope.row.duihuanTotal || 0}}</div>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="核销统计" align="center" prop="adaptUserType" >
|
||||
<template slot-scope="scope">
|
||||
<div>优惠券:{{scope.row.youhuiTotaled || 0}}</div>
|
||||
<div>兑换券:{{scope.row.duihuanTotaled || 0}}</div>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="活动时间" align="center" prop="adaptUserType" >
|
||||
<template slot-scope="scope">
|
||||
<div>{{scope.row.activeStartTime || 0}}</div>
|
||||
<div>{{scope.row.activeEndTime || 0}}</div>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="会员等级" align="center" prop="dieselUserLevel" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span v-for="(item,index) in scope.row.dieselUserLevel "> {{item}} </span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="活动状态" align="center" prop="status" >
|
||||
<template slot-scope="scope">
|
||||
|
||||
@ -77,16 +104,37 @@
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="活动时间" align="center" prop="adaptUserType" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span >{{scope.row.activeStartTime || 0}}-{{scope.row.activeEndTime || 0}}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="活动更新时间" align="center" prop="updateTime" >
|
||||
<template slot-scope="scope">
|
||||
<span >{{scope.row.updateTime || '暂无更新'}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作员" align="center" prop="updateTime" >
|
||||
<template slot-scope="scope">
|
||||
<span >{{scope.row.createBy || ''}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="lookDetail(scope.row)"
|
||||
>详情</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@ -94,7 +142,15 @@
|
||||
@click="handleDeletexia(scope.row)"
|
||||
v-if="scope.row.isonline == 0"
|
||||
>下线</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="Deleteshan(scope.row)"
|
||||
v-if="scope.row.isonline == 1"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@ -113,6 +169,18 @@
|
||||
<el-form-item label="活动名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入活动名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="满足金额" prop="moneyType">
|
||||
|
||||
<el-select v-model="form.moneyType" placeholder="请选择满足金额" >
|
||||
<el-option
|
||||
v-for="dict in moneyList"
|
||||
:key="dict.id.toString()"
|
||||
:label="dict.name"
|
||||
:value="dict.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="满足金额" prop="participationConditionMoney">
|
||||
<el-input-number :min="0.01" v-model="form.participationConditionMoney" placeholder="请输入满足金额" />
|
||||
</el-form-item>
|
||||
@ -339,12 +407,7 @@
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<!-- <el-form-item label="参与条件" prop="participationCondition">
|
||||
<el-select v-model="form.participationCondition" clearable placeholder="请选择天参与条件">
|
||||
<el-option label="不限制" value="0"></el-option>
|
||||
<el-option label="优惠订单不参与" value="1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>-->
|
||||
|
||||
<el-form-item label="参与次数类别" prop="participationAcount">
|
||||
<el-select v-model="form.participationAcount" clearable placeholder="请选择参与次数类别">
|
||||
<el-option label="不限制" value="0"></el-option>
|
||||
@ -364,6 +427,52 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog title="详情统计" :visible.sync="opendetails" width="45%" append-to-body>
|
||||
<div style="display: flex;justify-content: space-between;width: 100%;">
|
||||
<div class="x-box">
|
||||
<div>优惠券数量统计</div>
|
||||
<div>总数量: {{statisticsyou.count ||0}}</div>
|
||||
<div>已使用数量: {{statisticsyou.countEd ||0}}</div>
|
||||
<div>未使用数量: {{statisticsyou.countLd ||0}}</div>
|
||||
</div>
|
||||
<div class="x-box">
|
||||
<div>兑换券数量统计</div>
|
||||
<div>总数量: {{statisticsyou.counts ||0}}</div>
|
||||
<div>已使用数量: {{statisticsyou.countEds ||0}}</div>
|
||||
<div>未使用数量: {{statisticsyou.countLds ||0}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
:data="looklist"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="昵称"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="mobile"
|
||||
label="联系方式"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
label="领取日期"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="exchangeFrom"
|
||||
label="获取方式"
|
||||
>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
</el-table>
|
||||
|
||||
|
||||
</el-dialog>
|
||||
<!-- 详情列表-->
|
||||
|
||||
<el-dialog title="优惠券列表" :visible.sync="dialogTableVisible">
|
||||
<div style="display: flex;align-items: center; margin-bottom: 20px ">
|
||||
<el-input v-model="youhuiquan.name" placeholder="优惠券名称"></el-input>
|
||||
@ -504,7 +613,6 @@
|
||||
|
||||
</el-form-item>
|
||||
<el-button
|
||||
|
||||
type="primary"
|
||||
@click="shwdata()"
|
||||
>确定</el-button>
|
||||
@ -516,13 +624,20 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getoiltype,getoilName, listActiveConsumption,listExchange,listLJGoods, getActiveConsumption, delActiveConsumption, addActiveConsumption, updateActiveConsumption,listFavorable } from "@/api/EventMarketing/activeConsumption";
|
||||
import { getoiltype,getoilName, listActiveConsumption,listExchange,listLJGoods, getActiveConsumption, delActiveConsumption, addActiveConsumption, updateActiveConsumption,listFavorable,looklook,looklooklook } from "@/api/EventMarketing/activeConsumption";
|
||||
import {listUserGrade} from "@/api/staff/user/usergrade";
|
||||
|
||||
export default {
|
||||
name: "ActiveConsumption",
|
||||
data() {
|
||||
return {
|
||||
opendetails:false,
|
||||
looklist:[],
|
||||
statisticsyou:{},
|
||||
moneyList:[
|
||||
{name:'订单金额',id:'1'},
|
||||
{name:'实付金额',id:'2'}
|
||||
],
|
||||
labelPosition:'left',
|
||||
userGradeList:[],
|
||||
pdidlist:[],//判断优惠券id
|
||||
@ -625,6 +740,9 @@ export default {
|
||||
adaptOil: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
],
|
||||
moneyType:[
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
],
|
||||
@ -691,6 +809,28 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
//
|
||||
lookDetail(row){
|
||||
this.opendetails = true
|
||||
let data = {
|
||||
id:row.id
|
||||
}
|
||||
looklook(data).then(res=>{
|
||||
if(res.data){
|
||||
this.looklist = res.data
|
||||
}
|
||||
|
||||
|
||||
console.log('详情',res)
|
||||
})
|
||||
looklooklook(row.id).then(resp=>{
|
||||
if( resp.data){
|
||||
this.statisticsyou = resp.data
|
||||
}
|
||||
|
||||
console.log('优惠券详情统计',resp)
|
||||
})
|
||||
},
|
||||
listUserGrade(){
|
||||
listUserGrade().then(res=>{
|
||||
if(res.code == 200){
|
||||
@ -966,9 +1106,13 @@ export default {
|
||||
const id = row.id || this.ids
|
||||
getActiveConsumption(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.form.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '1')
|
||||
this.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '2')
|
||||
this.form.shiwudata = response.data.activeConsumptionChildList.filter(item => item.activeGift == '4')
|
||||
if(response.data.activeConsumptionChildList&&response.data.activeConsumptionChildList.length >1){
|
||||
this.form.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '1')
|
||||
this.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '2')
|
||||
this.form.shiwudata = response.data.activeConsumptionChildList.filter(item => item.activeGift == '4')
|
||||
}
|
||||
|
||||
|
||||
this.open = true;
|
||||
this.title = "修改消费有礼活动";
|
||||
});
|
||||
@ -1044,16 +1188,19 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除消费有礼活动编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delActiveConsumption(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
Deleteshan(row){
|
||||
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除消费有礼活动编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delActiveConsumption(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('business/marketingActivity/activeConsumption/export', {
|
||||
@ -1071,4 +1218,11 @@ export default {
|
||||
align-items: center;
|
||||
font-size: 18px;
|
||||
}
|
||||
.x-box{
|
||||
background: #f9f9f9;
|
||||
border-radius: 6px;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
width: 45%;
|
||||
}
|
||||
</style>
|
||||
|
@ -51,20 +51,56 @@
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="活动编号" align="center" prop="id" />-->
|
||||
<el-table-column label="活动名称" align="center" prop="name" />
|
||||
<el-table-column label="会员等级" align="center" prop="dieselUserLevel" >
|
||||
<el-table-column label="适用油品" align="center" prop="adaptOil" >
|
||||
<template slot-scope="scope">
|
||||
<span > {{ scope.row.adaptOilss}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="适用用户" align="center" prop="adaptOil" >
|
||||
<template slot-scope="scope">
|
||||
<span v-for="(item,index) in scope.row.dieselUserLevel "> {{item}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="满足金额(元)" align="center" prop="adaptOil" >
|
||||
<template slot-scope="scope">
|
||||
<span> {{scope.row.activeDiscountChildList[0].amount}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="折扣金额(元)" align="center" prop="adaptOil" >
|
||||
<template slot-scope="scope">
|
||||
<span> {{scope.row.activeDiscountChildList[0].discount}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column label="会员等级" align="center" prop="dieselUserLevel" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span v-for="(item,index) in scope.row.dieselUserLevel "> {{item}} </span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
|
||||
<el-table-column label="活动状态 " align="center" prop="status" >
|
||||
<template slot-scope="scope">
|
||||
<span style="cursor: pointer;" @click="qiyong(scope.row)" v-if="scope.row.status == 0"> <el-tag>启用</el-tag > </span>
|
||||
<span style="cursor: pointer;" @click="jinyong(scope.row)" v-if="scope.row.status == 1"> <el-tag type="danger">禁用</el-tag> </span>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="活动时间" align="center" prop="adaptUserType" >
|
||||
<template slot-scope="scope">
|
||||
<span >{{scope.row.activeStartTime || 0}}-{{scope.row.activeEndTime || 0}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="活动更新时间" align="center" prop="updateTime" >
|
||||
<template slot-scope="scope">
|
||||
<span >{{scope.row.updateTime || '暂无更新'}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作员" align="center" prop="updateTime" >
|
||||
<template slot-scope="scope">
|
||||
<span >{{scope.row.createBy || ''}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@ -73,6 +109,12 @@
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="lookDetail(scope.row)"
|
||||
>详情</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@ -80,6 +122,13 @@
|
||||
@click="handleDeletexia(scope.row)"
|
||||
v-if="scope.row.isonline == 0"
|
||||
>下线</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="Deleteshan(scope.row)"
|
||||
v-if="scope.row.isonline == 1"
|
||||
>删除</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -93,6 +142,50 @@
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-card>
|
||||
<el-dialog title="详情统计" :visible.sync="opendetails" width="45%" append-to-body>
|
||||
<div style="display: flex;justify-content: space-between;width: 100%;">
|
||||
<div class="x-box">
|
||||
<div>优惠券数量统计</div>
|
||||
<div>总数量: {{statisticsyou.count ||0}}</div>
|
||||
<div>已使用数量: {{statisticsyou.countEd ||0}}</div>
|
||||
<div>未使用数量: {{statisticsyou.countLd ||0}}</div>
|
||||
</div>
|
||||
<div class="x-box">
|
||||
<div>兑换券数量统计</div>
|
||||
<div>总数量: {{statisticsyou.counts ||0}}</div>
|
||||
<div>已使用数量: {{statisticsyou.countEds ||0}}</div>
|
||||
<div>未使用数量: {{statisticsyou.countLds ||0}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
:data="looklist"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="昵称"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="mobile"
|
||||
label="联系方式"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
label="领取日期"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="exchangeFrom"
|
||||
label="获取方式"
|
||||
>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
</el-table>
|
||||
|
||||
|
||||
</el-dialog>
|
||||
<!-- 添加或修改折扣营销对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="45%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" :label-position="labelPosition" label-width="120px">
|
||||
@ -100,23 +193,21 @@
|
||||
<el-input v-model="form.name" placeholder="请输入活动名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="满减规则" prop="activeDiscountChildList">
|
||||
<div v-for="(item,index) in form.activeDiscountChildList" :key="index" style="width: 100%; display: flex;align-items: center; margin-bottom: 10px ">
|
||||
<div style="width: 100%; display: flex;align-items: center; margin-bottom: 10px ">
|
||||
<div style="width: 25%;display: flex; align-items: center;margin-right: 20px " >
|
||||
<span>满</span> <el-input-number v-model="item.amount" :min="0" :max="99999" label="0"></el-input-number> <span>元</span>
|
||||
<span>满</span> <el-input-number v-model="activeDiscountChildList[0].amount" :min="0" :max="99999" label="0"></el-input-number> <span>元</span>
|
||||
</div>
|
||||
<div style="width: 25%;display: flex; align-items: center;">
|
||||
<span>打</span> <el-input-number v-model="item.discount" :min="0" :max="9.9" placeholder="1 ~ 9.9" label=""></el-input-number> <span>折</span>
|
||||
<span>打</span> <el-input-number v-model="activeDiscountChildList[0].discount" :min="0" :max="9.9" placeholder="1 ~ 9.9" label=""></el-input-number> <span>折</span>
|
||||
|
||||
</div>
|
||||
<div @click="deleteactiveDiscountChildList(index)">
|
||||
<el-button type="danger" icon="el-icon-delete" circle style="margin-left: 8px" ></el-button>
|
||||
</div>
|
||||
|
||||
<!-- <div @click="deleteactiveDiscountChildList(index)">-->
|
||||
<!-- <el-button type="danger" icon="el-icon-delete" circle style="margin-left: 8px" ></el-button>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div >
|
||||
<el-button type="primary" icon="el-icon-plus" @click="addactiveDiscountChildList">新增</el-button>
|
||||
</div>
|
||||
|
||||
<!-- <div >-->
|
||||
<!-- <el-button type="primary" icon="el-icon-plus" @click="addactiveDiscountChildList">新增</el-button>-->
|
||||
<!-- </div>-->
|
||||
</el-form-item>
|
||||
|
||||
<el-row :gutter="20">
|
||||
@ -192,16 +283,28 @@
|
||||
|
||||
<script>
|
||||
import { listActiveDiscount, getActiveDiscount, delActiveDiscount, addActiveDiscount, updateActiveDiscount } from "@/api/EventMarketing/activeDiscount";
|
||||
import {getActiveConsumption, getoilName, updateActiveConsumption} from "@/api/EventMarketing/activeConsumption";
|
||||
import {
|
||||
delActiveConsumption,
|
||||
getActiveConsumption,
|
||||
getoilName, looklook, looklooklook,
|
||||
updateActiveConsumption
|
||||
} from "@/api/EventMarketing/activeConsumption";
|
||||
import {listUserGrade} from "@/api/staff/user/usergrade";
|
||||
|
||||
export default {
|
||||
name: "ActiveDiscount",
|
||||
data() {
|
||||
return {
|
||||
opendetails:false,
|
||||
looklist:[],
|
||||
statisticsyou:{},
|
||||
labelPosition:'left',
|
||||
discount:'',
|
||||
amount:'',
|
||||
activeDiscountChildList:[
|
||||
{amount:'',discount:''},
|
||||
|
||||
],
|
||||
userGradeList:[],
|
||||
oillist:['92#','95#','98#','0#','-10#','LNG','CNG','京92#','京95#','京0#'],
|
||||
// 遮罩层
|
||||
@ -245,7 +348,11 @@ export default {
|
||||
isonline: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
form: {
|
||||
|
||||
|
||||
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
name: [
|
||||
@ -285,9 +392,16 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
console.log('dsbuaidhbiasuigbduaibduui')
|
||||
listUserGrade().then(res=>{
|
||||
console.log('1233333333333333333333' ,res)
|
||||
this.userGradeList = res.data.records
|
||||
|
||||
})
|
||||
//
|
||||
this.getList();
|
||||
this.getoilName();
|
||||
this.listUserGrade()
|
||||
|
||||
},
|
||||
methods: {
|
||||
/** 查询折扣营销列表 */
|
||||
@ -309,12 +423,7 @@ export default {
|
||||
|
||||
},
|
||||
listUserGrade(){
|
||||
listUserGrade().then(res=>{
|
||||
if(res.code == 200){
|
||||
this.userGradeList = res.data.records
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
// 新增
|
||||
addactiveDiscountChildList(){
|
||||
@ -445,6 +554,7 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.form.activeDiscountChildList = this.activeDiscountChildList
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
@ -463,6 +573,32 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
lookDetail(row){
|
||||
this.opendetails = true
|
||||
let data = {
|
||||
id:row.id
|
||||
}
|
||||
looklook(data).then(res=>{
|
||||
this.looklist = res.data
|
||||
|
||||
console.log('详情',res)
|
||||
})
|
||||
looklooklook(row.id).then(resp=>{
|
||||
this.statisticsyou = resp.data
|
||||
console.log('优惠券详情统计',resp)
|
||||
})
|
||||
},
|
||||
Deleteshan(row){
|
||||
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除消费有礼活动编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delActiveDiscount(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
@ -482,3 +618,19 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.box-bt{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 18px;
|
||||
}
|
||||
.x-box{
|
||||
background: #f9f9f9;
|
||||
border-radius: 6px;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
width: 45%;
|
||||
}
|
||||
</style>
|
||||
|
@ -51,19 +51,47 @@
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="活动编号" align="center" prop="id" />-->
|
||||
<el-table-column label="活动名称" align="center" prop="name" />
|
||||
<el-table-column label="会员等级" align="center" prop="dieselUserLevel" >
|
||||
<el-table-column label="适用油品" align="center" prop="adaptOil" >
|
||||
<template slot-scope="scope">
|
||||
<span > {{ scope.row.adaptOilss}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="适用用户" align="center" prop="adaptOil" >
|
||||
<template slot-scope="scope">
|
||||
<span v-for="(item,index) in scope.row.dieselUserLevel "> {{item}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="满足金额(元)" align="center" prop="adaptOil" >
|
||||
<template slot-scope="scope">
|
||||
<span> {{scope.row.activeDiscountChildList[0].amount}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="减去金额(元)" align="center" prop="adaptOil" >
|
||||
<template slot-scope="scope">
|
||||
<span> {{scope.row.activeDiscountChildList[0].deductionAmount}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="活动状态 " align="center" prop="status" >
|
||||
<template slot-scope="scope">
|
||||
<span style="cursor: pointer;" @click="qiyong(scope.row)" v-if="scope.row.status == 0"> <el-tag>启用</el-tag > </span>
|
||||
<span style="cursor: pointer;" @click="jinyong(scope.row)" v-if="scope.row.status == 1"> <el-tag type="danger">禁用</el-tag> </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="活动时间" align="center" prop="adaptUserType" >
|
||||
<template slot-scope="scope">
|
||||
<span >{{scope.row.activeStartTime || 0}}-{{scope.row.activeEndTime || 0}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="活动更新时间" align="center" prop="updateTime" >
|
||||
<template slot-scope="scope">
|
||||
<span >{{scope.row.updateTime || '暂无更新'}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作员" align="center" prop="updateTime" >
|
||||
<template slot-scope="scope">
|
||||
<span >{{scope.row.createBy || ''}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@ -71,8 +99,13 @@
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="lookDetail(scope.row)"
|
||||
>详情</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@ -80,17 +113,16 @@
|
||||
@click="handleDeletexia(scope.row)"
|
||||
v-if="scope.row.isonline == 0"
|
||||
>下线</el-button>
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- icon="el-icon-delete"-->
|
||||
<!-- @click="handleDelete(scope.row)"-->
|
||||
<!-- -->
|
||||
<!-- >下线</el-button>-->
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="Deleteshan(scope.row)"
|
||||
v-if="scope.row.isonline == 1"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
@ -100,30 +132,69 @@
|
||||
/>
|
||||
</el-card>
|
||||
|
||||
<el-dialog title="详情统计" :visible.sync="opendetails" width="45%" append-to-body>
|
||||
<div style="display: flex;justify-content: space-between;width: 100%;">
|
||||
<div class="x-box">
|
||||
<div>优惠券数量统计</div>
|
||||
<div>总数量: {{statisticsyou.count ||0}}</div>
|
||||
<div>已使用数量: {{statisticsyou.countEd ||0}}</div>
|
||||
<div>未使用数量: {{statisticsyou.countLd ||0}}</div>
|
||||
</div>
|
||||
<div class="x-box">
|
||||
<div>兑换券数量统计</div>
|
||||
<div>总数量: {{statisticsyou.counts ||0}}</div>
|
||||
<div>已使用数量: {{statisticsyou.countEds ||0}}</div>
|
||||
<div>未使用数量: {{statisticsyou.countLds ||0}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
:data="looklist"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="昵称"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="mobile"
|
||||
label="联系方式"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
label="领取日期"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="exchangeFrom"
|
||||
label="获取方式"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 添加或修改满减营销对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="45%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" :label-position="labelPosition" label-width="110px">
|
||||
<el-form-item label="活动名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入活动名称" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="满减规则" prop="activeDiscountChildList">
|
||||
<div v-for="(item,index) in form.activeDiscountChildList" :key="index" style="width: 100%; display: flex;align-items: center; margin-bottom: 10px ">
|
||||
<div style="width: 100%; display: flex;align-items: center; margin-bottom: 10px ">
|
||||
<div style="width: 25%;display: flex; align-items: center;margin-right: 20px " >
|
||||
<span>满</span> <el-input-number v-model="item.amount" :min="0" :max="9999" label="0"></el-input-number> <span>元</span>
|
||||
<span>满</span> <el-input-number v-model="activeDiscountChildList[0].amount" :min="0" :max="99999" label="0"></el-input-number> <span>元</span>
|
||||
</div>
|
||||
<div style="width: 25%;display: flex; align-items: center;">
|
||||
<span>减</span> <el-input-number v-model="item.deductionAmount" :min="0" :max="9999" label="0"></el-input-number> <span>元</span>
|
||||
|
||||
<span>减</span> <el-input-number v-model="activeDiscountChildList[0].deductionAmount" :min="0" :max="9.9" placeholder="1 ~ 9.9" label=""></el-input-number> <span>元</span>
|
||||
</div>
|
||||
<div @click="deleteactiveDiscountChildList(index)">
|
||||
<el-button type="danger" icon="el-icon-delete" circle style="margin-left: 8px" ></el-button>
|
||||
</div>
|
||||
|
||||
<!-- <div @click="deleteactiveDiscountChildList(index)">-->
|
||||
<!-- <el-button type="danger" icon="el-icon-delete" circle style="margin-left: 8px" ></el-button>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="addactiveDiscountChildList">新增</el-button>
|
||||
</div>
|
||||
|
||||
<!-- <div >-->
|
||||
<!-- <el-button type="primary" icon="el-icon-plus" @click="addactiveDiscountChildList">新增</el-button>-->
|
||||
<!-- </div>-->
|
||||
</el-form-item>
|
||||
|
||||
<el-row :gutter="20">
|
||||
@ -149,10 +220,6 @@
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
|
||||
|
||||
|
||||
<el-form-item label="可用油品" prop="adaptOil" >
|
||||
<el-checkbox-group v-model="form.adaptOil">
|
||||
<el-checkbox v-for="(item,index) in oillist" :label="item.id" :key="index">{{item.oilType}}{{item.oilName}}</el-checkbox>
|
||||
@ -196,14 +263,21 @@
|
||||
|
||||
<script>
|
||||
import { listActiveFullminus, getActiveFullminus, delActiveFullminus, addActiveFullminus, updateActiveFullminus } from "@/api/EventMarketing/activeFullminus";
|
||||
import {getActiveDiscount, updateActiveDiscount} from "@/api/EventMarketing/activeDiscount";
|
||||
import {getoilName} from "@/api/EventMarketing/activeConsumption";
|
||||
import {delActiveDiscount, getActiveDiscount, updateActiveDiscount} from "@/api/EventMarketing/activeDiscount";
|
||||
import {getoilName, looklook, looklooklook} from "@/api/EventMarketing/activeConsumption";
|
||||
import {listUserGrade} from "@/api/staff/user/usergrade";
|
||||
|
||||
export default {
|
||||
name: "ActiveFullminus",
|
||||
data() {
|
||||
return {
|
||||
opendetails:false,
|
||||
looklist:[],
|
||||
statisticsyou:{},
|
||||
activeDiscountChildList:[
|
||||
{amount:'',deductionAmount:''},
|
||||
|
||||
],
|
||||
labelPosition:'left',
|
||||
oillist:['92#','95#','98#','0#','-10#','LNG','CNG','京92#','京95#','京0#'],
|
||||
userGradeList: [],
|
||||
@ -444,6 +518,7 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.form.activeDiscountChildList = this.activeDiscountChildList
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
@ -462,16 +537,33 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
lookDetail(row){
|
||||
this.opendetails = true
|
||||
let data = {
|
||||
id:row.id
|
||||
}
|
||||
looklook(data).then(res=>{
|
||||
this.looklist = res.data
|
||||
|
||||
console.log('详情',res)
|
||||
})
|
||||
looklooklook(row.id).then(resp=>{
|
||||
this.statisticsyou = resp.data
|
||||
console.log('优惠券详情统计',resp)
|
||||
})
|
||||
},
|
||||
Deleteshan(row){
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除满减营销编号为"' + ids + '"的数据项?').then(function() {
|
||||
this.$modal.confirm('是否确认删除消费有礼活动编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delActiveFullminus(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('business/marketingActivity/activeFullminus/export', {
|
||||
@ -481,3 +573,19 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.box-bt{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 18px;
|
||||
}
|
||||
.x-box{
|
||||
background: #f9f9f9;
|
||||
border-radius: 6px;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
width: 45%;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,6 +1,46 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form-item label="活动名称" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入活动名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-select v-model="queryParams.status" clearable placeholder="请选择活动状态">
|
||||
<el-option label="启用" value="0"></el-option>
|
||||
<el-option label="禁用" value="1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否在线" prop="isonline">
|
||||
<el-select v-model="queryParams.isonline" clearable placeholder="请选择是否在线">
|
||||
<el-option label="在线" value="0"></el-option>
|
||||
<el-option label="下线" value="1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="open = true"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :title="title" :visible.sync="open" width="65%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" :label-position="labelPosition" label-width="110px">
|
||||
<el-form-item label="活动名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入活动名称" />
|
||||
@ -44,12 +84,12 @@
|
||||
<el-table-column
|
||||
prop="giftCardName"
|
||||
label="卡券名称"
|
||||
>
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="giftCardType"
|
||||
label="券类型"
|
||||
>
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.giftCardType == 0" >油品券</span>
|
||||
<span v-if="scope.row.giftCardType == 1" >商品券</span>
|
||||
@ -59,7 +99,7 @@
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="券详情"
|
||||
>
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.giftCardDetail}}</span>
|
||||
</template>
|
||||
@ -67,17 +107,17 @@
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="有效期(天)"
|
||||
>
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.timeType == 0" > <el-input-number v-model="scope.row.validityZero" controls-position="right" :min="0" :max="9999"></el-input-number>天 </span>
|
||||
<span v-if="scope.row.timeType == 1" > <el-input-number v-model="scope.row.validityOne" controls-position="right" :min="0" :max="9999"></el-input-number>天 </span>
|
||||
<span v-if="scope.row.timeType == 2" > <el-input-number v-model="scope.row.validityTwo" controls-position="right" :min="0" :max="9999"></el-input-number>天 </span>
|
||||
<span v-if="scope.row.timeType == 0" > <el-input-number v-model="scope.row.validityZero" size="small" controls-position="right" :min="0" :max="9999"></el-input-number>天 </span>
|
||||
<span v-if="scope.row.timeType == 1" > <el-input-number v-model="scope.row.validityOne" size="small" controls-position="right" :min="0" :max="9999"></el-input-number>天 </span>
|
||||
<span v-if="scope.row.timeType == 2" > <el-input-number v-model="scope.row.validityTwo" size="small" controls-position="right" :min="0" :max="9999"></el-input-number>天 </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="数量"
|
||||
>
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.giftCardTotal" controls-position="right" :min="1" :max="9999"></el-input-number>
|
||||
</template>
|
||||
@ -108,12 +148,12 @@
|
||||
<el-table-column
|
||||
prop="giftCardName"
|
||||
label="卡券名称"
|
||||
>
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="券类型"
|
||||
>
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.giftCardType == 0" >油品券</span>
|
||||
<span v-if="scope.row.giftCardType == 1" >商品券</span>
|
||||
@ -123,7 +163,7 @@
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="券详情"
|
||||
>
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.giftCardDetail}}</span>
|
||||
</template>
|
||||
@ -131,17 +171,17 @@
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="有效期(天)"
|
||||
>
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span > <el-input-number v-model="scope.row.giftCardTime" controls-position="right" :min="1" :max="9999"></el-input-number>天 </span>
|
||||
<span > <el-input-number v-model="scope.row.giftCardTime" size="small" controls-position="right" :min="1" :max="9999"></el-input-number>天 </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="数量"
|
||||
>
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.giftCardTotal" controls-position="right" :min="1" :max="9999"></el-input-number>
|
||||
<el-input-number v-model="scope.row.giftCardTotal" size="small" controls-position="right" :min="1" :max="9999"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@ -169,281 +209,101 @@
|
||||
<el-form-item label="自定义规则" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入自定义规则" />
|
||||
</el-form-item>
|
||||
<!-- <div slot="footer" class="dialog-footer">-->
|
||||
<!-- <el-button type="primary" @click="submitForm">确 定</el-button>-->
|
||||
<!-- <el-button @click="cancel">取 消</el-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div slot="footer" class="dialog-footer">-->
|
||||
<!-- <el-button type="primary" @click="submitForm">确 定</el-button>-->
|
||||
<!-- <el-button @click="cancel">取 消</el-button>-->
|
||||
<!-- </div>-->
|
||||
</el-form>
|
||||
<div>
|
||||
<el-button type="primary" @click="submitForm">保存</el-button>
|
||||
<div>
|
||||
<el-button type="primary" @click="submitForm">保存</el-button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-card>
|
||||
<el-table v-loading="loading" :data="activeFullminusList" @selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
type="index"
|
||||
align="center"
|
||||
label="序号"
|
||||
>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="活动编号" align="center" prop="id" />-->
|
||||
<el-table-column label="活动名称" align="center" prop="name" />
|
||||
<el-table-column label="活动时间" align="center" prop="adaptUserType" >
|
||||
<template slot-scope="scope">
|
||||
<span >{{scope.row.activeStartTime || 0}}-{{scope.row.activeEndTime || 0}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
|
||||
|
||||
<el-table-column label="活动状态 " align="center" prop="status" >
|
||||
<template slot-scope="scope">
|
||||
<span style="cursor: pointer;" @click="qiyong(scope.row)" v-if="scope.row.status == 0"> <el-tag>启用</el-tag > </span>
|
||||
<span style="cursor: pointer;" @click="jinyong(scope.row)" v-if="scope.row.status == 1"> <el-tag type="danger">禁用</el-tag> </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="赠送积分" align="center" prop="adaptUserType" >
|
||||
<template slot-scope="scope">
|
||||
<span >{{scope.row.points || 0}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="赠送成长值" align="center" prop="adaptUserType" >
|
||||
<template slot-scope="scope">
|
||||
<span >{{scope.row.growthValue || 0}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="活动更新时间" align="center" prop="updateTime" >
|
||||
<template slot-scope="scope">
|
||||
<span >{{scope.row.updateTime || '暂无更新'}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="lookDetail(scope.row)"
|
||||
>详情</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDeletexia(scope.row)"
|
||||
v-if="scope.row.isonline == 0"
|
||||
>下线</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="Deleteshan(scope.row)"
|
||||
v-if="scope.row.isonline == 1"
|
||||
>删除</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="ztotal>0"
|
||||
:total="ztotal"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
</el-card>
|
||||
|
||||
<!-- <el-card style="margin-bottom: 20px">-->
|
||||
<!-- <el-row :gutter="10" class="mb8">-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="primary"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-plus"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @click="handleAdd"-->
|
||||
|
||||
<!-- >新增</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
|
||||
<!-- <el-table v-loading="loading" :data="activeNewlywedsList" :label-position="labelPosition" @selection-change="handleSelectionChange">-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- type="index"-->
|
||||
<!-- align="center"-->
|
||||
<!-- label="排序"-->
|
||||
<!-- >-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="活动编号" align="center" prop="id" />-->
|
||||
<!-- <el-table-column label="活动名称" align="center" prop="name" />-->
|
||||
<!-- <el-table-column label="活动开始时间" align="center" prop="activeStartTime" width="180">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{scope.row.activeStartTime}}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="活动结束时间" align="center" prop="activeEndTime" width="180">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{scope.row.activeEndTime}}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="有礼奖励" align="center" prop="courtesyReward" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <div v-for="(item,index) in scope.row.courtesyReward ">-->
|
||||
<!-- <div v-if="item == 0" >优惠券</div>-->
|
||||
<!-- <div v-if="item == 1">兑换券</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="活动码" align="center" prop="activeCode" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <div style="cursor: pointer" @click="qrcodelook(scope.row.activeCode)">-->
|
||||
<!-- <i class="el-icon-picture" ></i>-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="活动状态" align="center" prop="status" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span v-if="scope.row.status == 0"> <el-tag>进行中</el-tag> </span>-->
|
||||
<!-- <span v-if="scope.row.status == 1"> <el-tag type="success">待生效</el-tag> </span>-->
|
||||
<!-- <span v-if="scope.row.status == 2"> <el-tag type="danger">已结束</el-tag> </span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- icon="el-icon-edit"-->
|
||||
<!-- @click="handleUpdate(scope.row)"-->
|
||||
<!-- >修改</el-button>-->
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- icon="el-icon-delete"-->
|
||||
<!-- @click="handleDeletexia(scope.row)"-->
|
||||
<!-- v-if="scope.row.isonline == 0"-->
|
||||
<!-- >下线</el-button>-->
|
||||
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- </el-table>-->
|
||||
|
||||
<!-- <pagination-->
|
||||
<!-- v-show="total>0"-->
|
||||
<!-- :total="total"-->
|
||||
<!-- :page.sync="queryParams.pageNum"-->
|
||||
<!-- :limit.sync="queryParams.pageSize"-->
|
||||
<!-- @pagination="getList"-->
|
||||
<!-- />-->
|
||||
<!-- </el-card>-->
|
||||
|
||||
<!-- 添加或修改新人有礼活动对话框 -->
|
||||
<!-- <el-dialog :title="title" :visible.sync="open" width="45%" append-to-body>-->
|
||||
<!-- <el-form ref="form" :model="form" :rules="rules" :label-position="labelPosition" label-width="110px">-->
|
||||
<!-- <el-form-item label="活动名称" prop="name">-->
|
||||
<!-- <el-input v-model="form.name" placeholder="请输入活动名称" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-row :gutter="20">-->
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="活动开始时间" prop="activeStartTime">-->
|
||||
<!-- <el-date-picker clearable-->
|
||||
<!-- v-model="form.activeStartTime"-->
|
||||
<!-- type="datetime"-->
|
||||
<!-- value-format="yyyy-MM-dd HH:mm:ss"-->
|
||||
<!-- placeholder="请选择活动开始时间">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="活动结束时间" prop="activeEndTime">-->
|
||||
<!-- <el-date-picker clearable-->
|
||||
<!-- v-model="form.activeEndTime"-->
|
||||
<!-- type="datetime"-->
|
||||
<!-- value-format="yyyy-MM-dd HH:mm:ss"-->
|
||||
<!-- placeholder="请选择活动结束时间">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<!-- <el-form-item label="有礼奖励" prop="courtesyReward" >-->
|
||||
<!-- <el-checkbox-group v-model="form.courtesyReward">-->
|
||||
|
||||
<!-- <el-checkbox label="1" >赠送优惠券</el-checkbox>-->
|
||||
<!-- <el-checkbox label="2" >赠送兑换券</el-checkbox>-->
|
||||
|
||||
<!-- </el-checkbox-group>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <!– 选择优惠券–>-->
|
||||
<!-- <div class="xh-box" v-if="form.courtesyReward && form.courtesyReward.indexOf('1')>-1 " >-->
|
||||
<!-- <div class="box-bt"> <div >赠送卡券</div> <el-button type="primary" icon="el-icon-plus" @click="getlistFavorable()" >新增</el-button> </div>-->
|
||||
<!-- <div style="margin: 10px 0px">-->
|
||||
<!-- <el-table-->
|
||||
<!-- :data="form.tableDatas"-->
|
||||
<!-- border-->
|
||||
<!-- style="width: 100%">-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="giftCardName"-->
|
||||
<!-- label="卡券名称"-->
|
||||
<!-- width="0">-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="giftCardType"-->
|
||||
<!-- label="券类型"-->
|
||||
<!-- width="80">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span v-if="scope.row.giftCardType == 0" >油品券</span>-->
|
||||
<!-- <span v-if="scope.row.giftCardType == 1" >商品券</span>-->
|
||||
<!-- <span v-if="scope.row.giftCardType == 2" >通用券</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="date"-->
|
||||
<!-- label="券详情"-->
|
||||
<!-- width="80">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{scope.row.giftCardDetail}}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="date"-->
|
||||
<!-- label="有效期(天)"-->
|
||||
<!-- width="240">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span v-if="scope.row.timeType == 0" > <el-input-number v-model="scope.row.validityZero" controls-position="right" :min="1" :max="9999"></el-input-number>天 </span>-->
|
||||
<!-- <span v-if="scope.row.timeType == 1" > <el-input-number v-model="scope.row.validityOne" controls-position="right" :min="1" :max="9999"></el-input-number>天 </span>-->
|
||||
<!-- <span v-if="scope.row.timeType == 2" > <el-input-number v-model="scope.row.validityTwo" controls-position="right" :min="1" :max="9999"></el-input-number>天 </span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="date"-->
|
||||
<!-- label="数量"-->
|
||||
<!-- width="240">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-input-number v-model="scope.row.giftCardTotal" controls-position="right" :min="1" :max="9999"></el-input-number>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="address"-->
|
||||
<!-- label="操作">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- @click="deletedata(scope.row)"-->
|
||||
<!-- >删除</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- </el-table>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <!– 选择兑换券–>-->
|
||||
<!-- <div class="xh-box" v-if="form.courtesyReward && form.courtesyReward.indexOf('2')>-1 " >-->
|
||||
<!-- <div class="box-bt"> <div >选择兑换券</div> <el-button type="primary" icon="el-icon-plus" @click="getlistExchange()" >新增</el-button> </div>-->
|
||||
<!-- <div style="margin: 10px 0px">-->
|
||||
|
||||
<!-- <el-table-->
|
||||
<!-- :data="tableDatas"-->
|
||||
<!-- border-->
|
||||
<!-- style="width: 100%">-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="giftCardName"-->
|
||||
<!-- label="卡券名称"-->
|
||||
<!-- width="80">-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="date"-->
|
||||
<!-- label="券类型"-->
|
||||
<!-- width="80">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span v-if="scope.row.giftCardType == 0" >油品券</span>-->
|
||||
<!-- <span v-if="scope.row.giftCardType == 1" >商品券</span>-->
|
||||
<!-- <span v-if="scope.row.giftCardType == 2" >通用券</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="date"-->
|
||||
<!-- label="券详情"-->
|
||||
<!-- width="80">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{scope.row.giftCardDetail}}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="date"-->
|
||||
<!-- label="有效期(天)"-->
|
||||
<!-- width="240">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span > <el-input-number v-model="scope.row.giftCardTime" controls-position="right" :min="1" :max="9999"></el-input-number>天 </span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="date"-->
|
||||
<!-- label="数量"-->
|
||||
<!-- width="240">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-input-number v-model="scope.row.giftCardTotal" controls-position="right" :min="1" :max="9999"></el-input-number>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="address"-->
|
||||
<!-- label="操作"-->
|
||||
<!-- >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- @click="deletedhdata(scope.row)"-->
|
||||
<!-- >删除</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- </el-table>-->
|
||||
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <el-form-item label="赠送积分" prop="points">-->
|
||||
<!-- <el-input-number v-model="form.points" controls-position="right" :min="1" :max="99999"></el-input-number>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="赠送成长值" prop="growthValue">-->
|
||||
<!-- <el-input-number v-model="form.growthValue" controls-position="right" :min="1" :max="9999999"></el-input-number>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="自定义规则" prop="remark">-->
|
||||
<!-- <el-input v-model="form.remark" placeholder="请输入自定义规则" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
|
||||
<!-- <div slot="footer" class="dialog-footer">-->
|
||||
<!-- <el-button type="primary" @click="">确 定</el-button>-->
|
||||
<!-- <el-button @click="cancel">取 消</el-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-dialog>-->
|
||||
|
||||
|
||||
<!-- 优惠券列表-->
|
||||
@ -572,6 +432,46 @@
|
||||
@pagination="getlistExchange"
|
||||
/></div>
|
||||
</el-dialog>
|
||||
<el-dialog title="详情统计" :visible.sync="opendetails" width="45%" append-to-body>
|
||||
<div style="display: flex;justify-content: space-between;width: 100%;">
|
||||
<div class="x-box">
|
||||
<div>优惠券数量统计</div>
|
||||
<div>总数量: {{statisticsyou.count ||0}}</div>
|
||||
<div>已使用数量: {{statisticsyou.countEd ||0}}</div>
|
||||
<div>未使用数量: {{statisticsyou.countLd ||0}}</div>
|
||||
</div>
|
||||
<div class="x-box">
|
||||
<div>兑换券数量统计</div>
|
||||
<div>总数量: {{statisticsyou.counts ||0}}</div>
|
||||
<div>已使用数量: {{statisticsyou.countEds ||0}}</div>
|
||||
<div>未使用数量: {{statisticsyou.countLds ||0}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
:data="looklist"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="昵称"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="mobile"
|
||||
label="联系方式"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
label="领取日期"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="exchangeFrom"
|
||||
label="获取方式"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
title="二维码"
|
||||
v-loading="loadingdialog"
|
||||
@ -592,15 +492,18 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listActiveNewlyweds, getActiveNewlyweds, delActiveNewlyweds, addActiveNewlyweds, updateActiveNewlyweds } from "@/api/EventMarketing/activeNewlyweds";
|
||||
import {getoilName, listExchange, listFavorable} from "@/api/EventMarketing/activeConsumption";
|
||||
import { listActiveNewlyweds, getActiveNewlyweds, delActiveNewlyweds, addActiveNewlyweds, updateActiveNewlyweds,huiActiveNewlyweds } from "@/api/EventMarketing/activeNewlyweds";
|
||||
import {getoilName, listExchange, listFavorable, looklook, looklooklook} from "@/api/EventMarketing/activeConsumption";
|
||||
import QRCode from "qrcodejs2";
|
||||
import {getActiveFullminus, updateActiveFullminus} from "@/api/EventMarketing/activeFullminus";
|
||||
import {delActiveFullminus, getActiveFullminus, updateActiveFullminus} from "@/api/EventMarketing/activeFullminus";
|
||||
|
||||
export default {
|
||||
name: "ActiveNewlyweds",
|
||||
data() {
|
||||
return {
|
||||
opendetails:false,
|
||||
looklist:[],
|
||||
statisticsyou:{},
|
||||
labelPosition:'left',
|
||||
loadingdialog:false,
|
||||
centerDialogVisible:false,
|
||||
@ -637,7 +540,7 @@ export default {
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
ztotal: 0,
|
||||
// 新人有礼活动表格数据
|
||||
activeNewlywedsList: [],
|
||||
// 弹出层标题
|
||||
@ -661,6 +564,7 @@ export default {
|
||||
points: null,
|
||||
growthValue: null,
|
||||
},
|
||||
activeFullminusList: [],
|
||||
// 表单参数
|
||||
form: {
|
||||
id:1,
|
||||
@ -695,11 +599,19 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.handleUpdate();
|
||||
this.getList()
|
||||
|
||||
},
|
||||
methods: {
|
||||
/** 查询新人有礼活动列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listActiveNewlyweds(this.queryParams).then(res=>{
|
||||
this.activeFullminusList = res.data.records
|
||||
this.ztotal = res.data.total;
|
||||
console.log('wwwwwc',res)
|
||||
this.loading = false;
|
||||
})
|
||||
// this.loading = true;
|
||||
// listActiveNewlyweds(this.queryParams).then(response => {
|
||||
// this.activeNewlywedsList = response.data.records;
|
||||
@ -889,6 +801,31 @@ export default {
|
||||
|
||||
}
|
||||
},
|
||||
lookDetail(row){
|
||||
this.opendetails = true
|
||||
let data = {
|
||||
id:row.id
|
||||
}
|
||||
looklook(data).then(res=>{
|
||||
this.looklist = res.data
|
||||
|
||||
console.log('详情',res)
|
||||
})
|
||||
looklooklook(row.id).then(resp=>{
|
||||
this.statisticsyou = resp.data
|
||||
console.log('优惠券详情统计',resp)
|
||||
})
|
||||
},
|
||||
Deleteshan(row){
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除消费有礼活动编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delActiveFullminus(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
@ -912,14 +849,16 @@ export default {
|
||||
this.title = "添加新人有礼活动";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate() {
|
||||
handleUpdate(row){
|
||||
this.reset()
|
||||
getActiveNewlyweds(1).then(response => {
|
||||
getActiveNewlyweds(row.id).then(response => {
|
||||
this.form = response.data;
|
||||
this.form.tableDatas = response.data.activeNewlywedsChildList.filter(item => item.activeGift == '1')
|
||||
this.tableDatas = response.data.activeNewlywedsChildList.filter(item => item.activeGift == '2')
|
||||
if(response.data.activeNewlywedsChildList){
|
||||
this.form.tableDatas = response.data.activeNewlywedsChildList.filter(item => item.activeGift == '1')
|
||||
this.tableDatas = response.data.activeNewlywedsChildList.filter(item => item.activeGift == '2')
|
||||
}
|
||||
this.open = true;
|
||||
this.title = "修改新人有礼活动";
|
||||
this.title = "编辑";
|
||||
});
|
||||
},
|
||||
handleDeletexia(row){
|
||||
@ -940,12 +879,23 @@ export default {
|
||||
this.form.activeNewlywedsChildList = this.form.tableDatas.concat(this.tableDatas);
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
addActiveNewlyweds(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.handleUpdate();
|
||||
});
|
||||
if (this.form.id != null) {
|
||||
|
||||
updateActiveNewlyweds(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}else {
|
||||
addActiveNewlyweds(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
@ -997,4 +947,11 @@ export default {
|
||||
justify-content: space-between;
|
||||
font-size: 18px;
|
||||
}
|
||||
.x-box{
|
||||
background: #f9f9f9;
|
||||
border-radius: 6px;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
width: 45%;
|
||||
}
|
||||
</style>
|
||||
|
@ -100,6 +100,7 @@
|
||||
type="primary"
|
||||
@click="batchGrounding('jy')"
|
||||
>商品下架</el-button>
|
||||
<div style="font-size: 12px;color: red;margin: 5px 0">注:库存为0或未设置零售价和会员价的商品不可上架</div>
|
||||
</div>
|
||||
|
||||
<el-table ref="tables" v-loading="loading" :data="list"
|
||||
@ -205,7 +206,6 @@
|
||||
v-model="form.cvsGoodId"
|
||||
placeholder="全部"
|
||||
clearable
|
||||
disabled
|
||||
style="width: 300px"
|
||||
>
|
||||
<el-option v-for="item in cvsGoodList" :key="item.id" :label="item.name" :value="item.id"/>
|
||||
@ -282,32 +282,30 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="供应商" prop="supplierId">
|
||||
<!-- <el-select-->
|
||||
<!-- v-model="form.supplierId"-->
|
||||
<!-- filterable-->
|
||||
<!-- placeholder="全部"-->
|
||||
<!-- clearable-->
|
||||
<!-- style="width: 300px"-->
|
||||
<!-- @change="selectSupplier"-->
|
||||
<!-- >-->
|
||||
<!-- <el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id"/>-->
|
||||
<!-- </el-select>-->
|
||||
<el-autocomplete
|
||||
popper-class="my-autocomplete"
|
||||
style="width: 94%"
|
||||
disabled
|
||||
v-model="supplier"
|
||||
:fetch-suggestions="querySearch"
|
||||
placeholder="供应商名称,如果是未添加的供应商,输完名称点回车即可自动添加"
|
||||
@change="addSupplier"
|
||||
@select="selectSupplier">
|
||||
<template slot-scope="{ item }">
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<span class="name">{{ item.name }}</span>
|
||||
<!-- <span class="addr">{{ item.memberPrice }}</span>-->
|
||||
</div>
|
||||
</template>
|
||||
</el-autocomplete>
|
||||
<el-select
|
||||
v-model="form.supplierId"
|
||||
filterable
|
||||
placeholder="请选择供应商"
|
||||
@visible-change="changeSupplier"
|
||||
clearable
|
||||
style="width: 94%">
|
||||
<el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id"/>
|
||||
</el-select>
|
||||
<!-- <el-autocomplete-->
|
||||
<!-- popper-class="my-autocomplete"-->
|
||||
<!-- style="width: 94%"-->
|
||||
<!-- v-model="supplier"-->
|
||||
<!-- :fetch-suggestions="querySearch"-->
|
||||
<!-- placeholder="供应商名称,如果是未添加的供应商,输完名称点回车即可自动添加"-->
|
||||
<!-- @change="addSupplier"-->
|
||||
<!-- @select="selectSupplier">-->
|
||||
<!-- <template slot-scope="{ item }">-->
|
||||
<!-- <div style="display: flex;justify-content: space-between">-->
|
||||
<!-- <span class="name">{{ item.name }}</span>-->
|
||||
<!--<!– <span class="addr">{{ item.memberPrice }}</span>–>-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-autocomplete>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -348,7 +346,7 @@
|
||||
|
||||
|
||||
import {cvsGoodsAll, cvsGoodsTree, selectTree} from "@/api/convenienceStore/goods";
|
||||
import {addSupplier, getSupplier, listSupplier} from "@/api/convenienceStore/supplier";
|
||||
import {addSupplier, listSuppliers} from "@/api/convenienceStore/supplier";
|
||||
import {
|
||||
addLJGoods,
|
||||
createGoodsNo,
|
||||
@ -466,6 +464,16 @@ export default {
|
||||
computed:{
|
||||
},
|
||||
methods:{
|
||||
// 修改供应商
|
||||
changeSupplier(val){
|
||||
if (val){
|
||||
listSuppliers({ifDelete:'0'}).then(response => {
|
||||
this.supplierList = response.data
|
||||
})
|
||||
}else {
|
||||
this.getSuppilers();
|
||||
}
|
||||
},
|
||||
// 模糊查询商品信息
|
||||
querySearch(queryString, cb) {
|
||||
let _this = this;
|
||||
@ -493,7 +501,7 @@ export default {
|
||||
},
|
||||
addSupplier(val){
|
||||
// console.log(val,222)
|
||||
addSupplier({name:val,remark:"添加商品自动添加"}).then(res => {
|
||||
addSupplier({name:val,remark:"添加商品自动添加",ifDelete:'0'}).then(res => {
|
||||
// console.log(res)
|
||||
if (res.data==1){
|
||||
this.$modal.msgSuccess("已为您自动添加此供应商")
|
||||
@ -590,8 +598,8 @@ export default {
|
||||
});
|
||||
},
|
||||
getSuppilers(val){
|
||||
listSupplier().then(response => {
|
||||
this.supplierList = response.data.records
|
||||
listSuppliers().then(response => {
|
||||
this.supplierList = response.data
|
||||
if (val){
|
||||
this.supplierList.forEach(item => {
|
||||
if (item.name = val){
|
||||
@ -689,6 +697,7 @@ export default {
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
console.log(this.supplierList)
|
||||
this.supplierList.forEach(item => {
|
||||
if (item.id == response.data.supplierId){
|
||||
this.supplier = item.name
|
||||
|
@ -215,21 +215,30 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="供应商" prop="supplierId">
|
||||
<el-autocomplete
|
||||
popper-class="my-autocomplete"
|
||||
style="width: 94%"
|
||||
v-model="supplier"
|
||||
:fetch-suggestions="querySearch"
|
||||
placeholder="供应商名称,如果是未添加的供应商,输完名称点回车即可自动添加"
|
||||
@change="addSupplier"
|
||||
@select="selectSupplier">
|
||||
<template slot-scope="{ item }">
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<span class="name">{{ item.name }}</span>
|
||||
<!-- <span class="addr">{{ item.memberPrice }}</span>-->
|
||||
</div>
|
||||
</template>
|
||||
</el-autocomplete>
|
||||
<el-select
|
||||
v-model="form1.supplierId"
|
||||
filterable
|
||||
placeholder="请选择供应商"
|
||||
clearable
|
||||
style="width: 80%">
|
||||
<el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id"/>
|
||||
</el-select>
|
||||
<el-button type="info" plain @click="handleAdd1">添加供应商</el-button>
|
||||
<!-- <el-autocomplete-->
|
||||
<!-- popper-class="my-autocomplete"-->
|
||||
<!-- style="width: 94%"-->
|
||||
<!-- v-model="supplier"-->
|
||||
<!-- :fetch-suggestions="querySearch"-->
|
||||
<!-- placeholder="供应商名称,如果是未添加的供应商,输完名称点回车即可自动添加"-->
|
||||
<!-- @change="addSupplier"-->
|
||||
<!-- @select="selectSupplier">-->
|
||||
<!-- <template slot-scope="{ item }">-->
|
||||
<!-- <div style="display: flex;justify-content: space-between">-->
|
||||
<!-- <span class="name">{{ item.name }}</span>-->
|
||||
<!-- <!– <span class="addr">{{ item.memberPrice }}</span>–>-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-autocomplete>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -264,6 +273,44 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :close-on-click-modal="false" :title="title" width="600px" style="margin-top: 5%" :visible.sync="open2" append-to-body>
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-width="90px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="供应商" prop="name" style="width: 420px">
|
||||
<el-input v-model="form2.name" placeholder="请输入供应商名称" maxlength="30" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系人" prop="contacts">
|
||||
<el-input v-model="form2.contacts" placeholder="供应商联系人" maxlength="30"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系电话" prop="mobile">
|
||||
<el-input v-model="form2.mobile" placeholder="供应商联系电话" maxlength="30"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="联系地址" prop="address">
|
||||
<el-input v-model="form2.address" placeholder="供应商联系地址" maxlength="30" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form2.remark" type="textarea" placeholder="请输入内容"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm2">确 定</el-button>
|
||||
<el-button @click="open2 = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -280,7 +327,7 @@ import {getAccount} from "@/api/system/account";
|
||||
import {addLJGoods, createGoodsNo, queryGoodsVoList, queryLJGoods, scanCode} from "@/api/convenienceStore/ljgoods";
|
||||
import pinyin from "js-pinyin";
|
||||
import {getSysConfig} from "@/api/staff/user/sysconfig";
|
||||
import {addSupplier, listSupplier} from "@/api/convenienceStore/supplier";
|
||||
import {addSupplier, listSuppliers, updateSupplier} from "@/api/convenienceStore/supplier";
|
||||
export default {
|
||||
dicts:['zhzt','yes_or_no'],
|
||||
data() {
|
||||
@ -290,6 +337,7 @@ export default {
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
open2: false,
|
||||
openGoods: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -340,6 +388,7 @@ export default {
|
||||
sort:0,
|
||||
buyingPrice:0,retailPrice:0,memberPrice:0
|
||||
},
|
||||
form2:{},
|
||||
tableData: [{
|
||||
id: '',
|
||||
pid:'',
|
||||
@ -392,6 +441,12 @@ export default {
|
||||
],
|
||||
},
|
||||
|
||||
// 表单校验
|
||||
rules2: {
|
||||
name: [
|
||||
{ required: true, message: "供应商名称不能为空", trigger: "blur" },
|
||||
],
|
||||
}
|
||||
|
||||
};
|
||||
},
|
||||
@ -402,13 +457,42 @@ export default {
|
||||
this.getSuppilers();
|
||||
},
|
||||
methods: {
|
||||
// 提交按钮
|
||||
submitForm2: function() {
|
||||
this.$refs["form2"].validate(valid => {
|
||||
if (valid) {
|
||||
if (!this.form2.id) {
|
||||
addSupplier(this.form2).then(response => {
|
||||
if (response.data==1){
|
||||
this.$modal.msgSuccess("供应商新增成功");
|
||||
this.open2 = false;
|
||||
this.getSuppilers();
|
||||
}else {
|
||||
this.$modal.msgError("供应商名称已存在");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 新增按钮操作
|
||||
handleAdd1() {
|
||||
this.reset2();
|
||||
this.open2 = true;
|
||||
this.title = "新增供应商";
|
||||
},
|
||||
// 表单重置
|
||||
reset2() {
|
||||
this.resetForm("form2");
|
||||
this.form2= {}
|
||||
},
|
||||
getSuppilers(val){
|
||||
listSupplier().then(response => {
|
||||
this.supplierList = response.data.records
|
||||
listSuppliers({ifDelete:'0'}).then(response => {
|
||||
this.supplierList = response.data
|
||||
if (val){
|
||||
this.supplierList.forEach(item => {
|
||||
if (item.name = val){
|
||||
this.form.supplierId = item.id
|
||||
if (item.name == val){
|
||||
this.form1.supplierId = item.id
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -469,19 +553,18 @@ export default {
|
||||
selectSupplier(data){
|
||||
this.supplier = data.name;
|
||||
this.form1.supplierId = data.id
|
||||
this.$forceUpdate()
|
||||
this.$set(this.form1,'supplierId',data.id)
|
||||
// this.$forceUpdate()
|
||||
},
|
||||
addSupplier(val){
|
||||
// console.log(val,222)
|
||||
if (!val){
|
||||
return;
|
||||
}
|
||||
addSupplier({name:val,remark:"添加商品自动添加"}).then(res => {
|
||||
// console.log(res)
|
||||
if (res.data==1){
|
||||
addSupplier({name:val,remark:"添加商品自动添加",ifDelete:'0'}).then(async res => {
|
||||
if (res.data == 1) {
|
||||
this.supplier = val;
|
||||
this.$modal.msgSuccess("已为您自动添加此供应商")
|
||||
this.getSuppilers(val)
|
||||
await this.getSuppilers(val)
|
||||
}
|
||||
})
|
||||
},
|
||||
@ -669,7 +752,8 @@ export default {
|
||||
// 添加商品信息
|
||||
addGoods(data){
|
||||
this.openGoods = true
|
||||
this.form1.cvsGoodId = data.id
|
||||
this.form1 = {status:'jy', canUsePoint:'no', stock:0, sort:0, buyingPrice:0, retailPrice:0, memberPrice:0, cvsGoodId:data.id}
|
||||
// this.form1.cvsGoodId = data.id
|
||||
this.supplier = ""
|
||||
this.title = "添加商品信息"
|
||||
},
|
||||
|
@ -419,7 +419,13 @@ export default {
|
||||
let unitPrice = new BigNumber( data.unitPrice);
|
||||
let subtotalAmount = new BigNumber(data.subtotalAmount);
|
||||
|
||||
data.subtotalAmount = quantityPurchased.times(unitPrice)
|
||||
if (flag == 1) {
|
||||
data.subtotalAmount = quantityPurchased.times(unitPrice)
|
||||
}
|
||||
|
||||
if (flag == 2) {
|
||||
data.subtotalAmount = quantityPurchased.times(unitPrice)
|
||||
}
|
||||
|
||||
if (flag == 3) {
|
||||
data.unitPrice = subtotalAmount.dividedBy(quantityPurchased);
|
||||
|
@ -412,7 +412,13 @@ export default {
|
||||
let returnPrice = new BigNumber( data.returnPrice);
|
||||
let subtotalAmount = new BigNumber(data.subtotalAmount);
|
||||
|
||||
data.subtotalAmount = returnQuantity.times(returnPrice)
|
||||
if (flag == 1) {
|
||||
data.subtotalAmount = returnQuantity.times(returnPrice)
|
||||
}
|
||||
|
||||
if (flag == 2) {
|
||||
data.subtotalAmount = returnQuantity.times(returnPrice)
|
||||
}
|
||||
|
||||
if (flag == 3) {
|
||||
data.returnPrice = subtotalAmount.dividedBy(returnQuantity);
|
||||
|
@ -207,6 +207,7 @@ export default {
|
||||
methods: {
|
||||
// 导出信息
|
||||
exportSale(){
|
||||
this.dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||
@ -221,6 +222,7 @@ export default {
|
||||
detail(data){
|
||||
this.table = true;
|
||||
this.queryParam.saleId = data.id;
|
||||
this.dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||
@ -234,6 +236,7 @@ export default {
|
||||
// 获取销售统计列表
|
||||
getList(){
|
||||
this.loading = true;
|
||||
this.dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||
|
@ -4,18 +4,18 @@
|
||||
<el-card >
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="商品分类" prop="cvsGoodId">
|
||||
<el-cascader v-model="cvsGoodId"
|
||||
:options="cvsGoodOptions"
|
||||
:props="{ checkStrictly: true }"
|
||||
clearable></el-cascader>
|
||||
<!-- <el-select-->
|
||||
<!-- v-model="queryParams.cvsGoodId"-->
|
||||
<!-- placeholder="全部"-->
|
||||
<!-- clearable-->
|
||||
<!-- style="width: 300px"-->
|
||||
<!-- >-->
|
||||
<!-- <el-option v-for="item in cvsGoodList" :key="item.id" :label="item.name" :value="item.id"/>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- <el-cascader v-model="cvsGoodId"-->
|
||||
<!-- :options="cvsGoodOptions"-->
|
||||
<!-- :props="{ checkStrictly: true }"-->
|
||||
<!-- clearable></el-cascader>-->
|
||||
<el-select
|
||||
v-model="queryParams.cvsGoodId"
|
||||
placeholder="全部"
|
||||
clearable
|
||||
style="width: 300px"
|
||||
>
|
||||
<el-option v-for="item in cvsGoodList" :key="item.id" :label="item.name" :value="item.id"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商" prop="supplierId">
|
||||
<el-select
|
||||
@ -63,19 +63,21 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="等级状态" prop="status">
|
||||
<el-form-item label="上架状态" prop="status">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
placeholder="全部"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.zhzt"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in dict.type.zhzt"-->
|
||||
<!-- :key="dict.value"-->
|
||||
<!-- :label="dict.label"-->
|
||||
<!-- :value="dict.value"-->
|
||||
<!-- />-->
|
||||
<el-option label="上架" value="qy"/>
|
||||
<el-option label="下架" value="jy"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@ -227,8 +229,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {cvsGoodsTree, selectTree} from "@/api/convenienceStore/goods";
|
||||
import {listSupplier} from "@/api/convenienceStore/supplier";
|
||||
import {cvsGoodsTree, list, selectTree} from "@/api/convenienceStore/goods";
|
||||
import {listSupplier, listSuppliers} from "@/api/convenienceStore/supplier";
|
||||
import {exportStocks, getStock, listStock} from "@/api/convenienceStore/stockstatistic";
|
||||
import {listTrack} from "@/api/convenienceStore/stocktrack";
|
||||
|
||||
@ -290,6 +292,7 @@ export default {
|
||||
methods: {
|
||||
getName(list,id){
|
||||
let name = ""
|
||||
console.log(list)
|
||||
list.forEach(item => {
|
||||
if (item.id==id){
|
||||
name = item.name;
|
||||
@ -341,20 +344,20 @@ export default {
|
||||
// 搜索按钮操作
|
||||
handleQuery() {
|
||||
this.queryParams.page = 1;
|
||||
if (this.cvsGoodId.length==1){
|
||||
this.queryParams.cvsGoodId = this.cvsGoodId[0]
|
||||
}else {
|
||||
this.queryParams.cvsGoodId = this.cvsGoodId[1]
|
||||
}
|
||||
// if (this.cvsGoodId.length==1){
|
||||
// this.queryParams.cvsGoodId = this.cvsGoodId[0]
|
||||
// }else {
|
||||
// this.queryParams.cvsGoodId = this.cvsGoodId[1]
|
||||
// }
|
||||
this.getList();
|
||||
},
|
||||
// 查询搜索列表信息
|
||||
getQueryList(){
|
||||
selectTree().then(response => {
|
||||
this.cvsGoodList = response.data.records
|
||||
list().then(response => {
|
||||
this.cvsGoodList = response.data
|
||||
});
|
||||
listSupplier().then(response => {
|
||||
this.supplierList = response.data.records
|
||||
listSuppliers().then(response => {
|
||||
this.supplierList = response.data
|
||||
})
|
||||
},
|
||||
// 重置按钮操作
|
||||
|
@ -29,17 +29,30 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="交班时间">
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="dateRange"-->
|
||||
<!-- style="width: 240px"-->
|
||||
<!-- size="medium"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- type="daterange"-->
|
||||
<!-- range-separator="-"-->
|
||||
<!-- clearable-->
|
||||
<!-- start-placeholder="开始日期"-->
|
||||
<!-- end-placeholder="结束日期"-->
|
||||
<!-- ></el-date-picker>-->
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
size="medium"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
clearable
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
v-model="beginTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="开始日期">
|
||||
</el-date-picker>
|
||||
至
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
@ -133,6 +146,8 @@ export default {
|
||||
},
|
||||
loading: false,
|
||||
dateRange: [new Date(),new Date()],
|
||||
beginTime:new Date(),
|
||||
endTime:new Date(),
|
||||
defaultSort: {prop: 'createTime', order: 'descending'},
|
||||
|
||||
total: 0,
|
||||
@ -153,6 +168,11 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getList(){
|
||||
this.dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
getHandoverListApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
this.dataList = res.data.records
|
||||
this.total = res.data.total
|
||||
@ -201,6 +221,8 @@ export default {
|
||||
pageSize:10
|
||||
},
|
||||
this.dateRange = []
|
||||
this.beginTime = "";
|
||||
this.endTime = ""
|
||||
this.getList();
|
||||
},
|
||||
printLocally(data) {
|
||||
|
@ -28,17 +28,30 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
size="medium"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
clearable
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="dateRange"-->
|
||||
<!-- style="width: 240px"-->
|
||||
<!-- size="medium"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- type="daterange"-->
|
||||
<!-- range-separator="-"-->
|
||||
<!-- clearable-->
|
||||
<!-- start-placeholder="开始日期"-->
|
||||
<!-- end-placeholder="结束日期"-->
|
||||
<!-- ></el-date-picker>-->
|
||||
<el-date-picker
|
||||
v-model="beginTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="开始日期">
|
||||
</el-date-picker>
|
||||
至
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
@ -166,6 +179,8 @@ export default {
|
||||
},
|
||||
loading: false,
|
||||
dateRange: [],
|
||||
beginTime:new Date(),
|
||||
endTime:new Date(),
|
||||
defaultSort: {prop: 'createTime', order: 'descending'},
|
||||
|
||||
total: 0,
|
||||
@ -187,6 +202,11 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async getList(){
|
||||
this.dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
await getOrderApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
this.dataList = res.data.records
|
||||
this.total = res.data.total
|
||||
@ -197,6 +217,11 @@ export default {
|
||||
this.$forceUpdate()
|
||||
},
|
||||
getStatistics() {
|
||||
this.dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
getStatisticsApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
this.statisticsForm = res.data
|
||||
})
|
||||
@ -218,6 +243,8 @@ export default {
|
||||
pageSize:10
|
||||
},
|
||||
this.dateRange = []
|
||||
this.beginTime = ""
|
||||
this.endTime = ""
|
||||
this.getList()
|
||||
this.getStatistics();
|
||||
|
||||
|
@ -34,17 +34,30 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="注册时间">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
size="medium"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
clearable
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="dateRange"-->
|
||||
<!-- style="width: 240px"-->
|
||||
<!-- size="medium"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- type="daterange"-->
|
||||
<!-- range-separator="-"-->
|
||||
<!-- clearable-->
|
||||
<!-- start-placeholder="开始日期"-->
|
||||
<!-- end-placeholder="结束日期"-->
|
||||
<!-- ></el-date-picker>-->
|
||||
<el-date-picker
|
||||
v-model="beginTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="开始日期">
|
||||
</el-date-picker>
|
||||
至
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
@ -214,6 +227,8 @@ export default {
|
||||
openOutcome: false, // 订单详情
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
beginTime:"",
|
||||
endTime:"",
|
||||
defaultSort: {prop: 'createTime', order: 'descending'},
|
||||
|
||||
statisticsForm: {
|
||||
@ -240,6 +255,11 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async getList(){
|
||||
this.dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
await getOrderApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
this.dataList = res.data.records
|
||||
this.total = res.data.total
|
||||
@ -282,6 +302,8 @@ export default {
|
||||
pageSize:10
|
||||
},
|
||||
this.dateRange = []
|
||||
this.beginTime = ""
|
||||
this.endTime = ""
|
||||
this.getList()
|
||||
|
||||
},
|
||||
|
@ -254,12 +254,11 @@ export default {
|
||||
})
|
||||
},
|
||||
changeCreditAmount(){
|
||||
if (this.title = "新增挂账单位") {
|
||||
if (!this.form1.id) {
|
||||
this.form1.usedCreditLimit = 0
|
||||
this.form1.residueCreditLimit = this.form1.creditLimit
|
||||
}
|
||||
if (this.title = "修改挂账单位") {
|
||||
this.form1.usedCreditLimit = this.form1.creditLimit - this.form1.residueCreditLimit
|
||||
}else {
|
||||
this.form1.residueCreditLimit = this.form1.creditLimit - this.form1.usedCreditLimit
|
||||
}
|
||||
},
|
||||
getList(){
|
||||
@ -298,8 +297,8 @@ export default {
|
||||
this.$refs["formName"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form1.id){
|
||||
if (this.form1.creditLimit < this.form1.residueCreditLimit){
|
||||
this.$modal.msgError("请确保预设挂账额度大于剩余挂账额度");
|
||||
if (this.form1.creditLimit < this.form1.usedCreditLimit || this.form1.residueCreditLimit < 0){
|
||||
this.$modal.msgError("请确保预设挂账额度大于已使用挂账额度");
|
||||
return ;
|
||||
}
|
||||
editCreditUnit(this.form1).then(res => {
|
||||
|
@ -96,7 +96,7 @@
|
||||
|
||||
<!-- <img src="file://D:/certifiedPhoto/static/uploadImages/20231025/8c3dbcf4924f40ebb479c17abd573ffb.jpg">-->
|
||||
|
||||
<el-card>
|
||||
<el-card style="margin-top: 20px">
|
||||
<div v-if="activeName=='member'">
|
||||
<el-button
|
||||
type="primary"
|
||||
@ -210,7 +210,7 @@
|
||||
<el-tooltip placement="top"
|
||||
v-if="scope.row.gasolineDiscount=='无优惠'">
|
||||
<div slot="content">无优惠</div>
|
||||
<el-tag type="warning">{{ scope.row.dieselDiscount }}</el-tag>>
|
||||
<el-tag type="warning">{{ scope.row.gasolineDiscount }}</el-tag>>
|
||||
</el-tooltip>
|
||||
<span v-if="scope.row.gasolineRule!=null && scope.row.gasolineRule!=''">
|
||||
<el-tooltip placement="top"
|
||||
@ -1070,6 +1070,15 @@ export default {
|
||||
],
|
||||
this.resetForm("form");
|
||||
},
|
||||
// 删除图片
|
||||
handleDelete1(file){
|
||||
// const findex = this.fileList.map(f => f.name).indexOf(file.name);
|
||||
// if (findex > -1) {
|
||||
// this.fileList.splice(findex, 1);
|
||||
// this.$emit("input", this.listToString(this.fileList));
|
||||
// }
|
||||
console.log(111)
|
||||
},
|
||||
// 表单重置
|
||||
reset1() {
|
||||
this.form1 = {
|
||||
@ -1095,6 +1104,10 @@ export default {
|
||||
},
|
||||
// 新增按钮操作
|
||||
handleAddMember() {
|
||||
if (this.fixingLevelList.length==0){
|
||||
this.$message.error("请先设置企业会员等级")
|
||||
return;
|
||||
}
|
||||
this.openMember = true;
|
||||
this.title = "新增用户认证";
|
||||
},
|
||||
|
@ -230,6 +230,7 @@
|
||||
<span v-else-if="cashierOrder.payType == 'UNIONPAY'">银联二维码</span>
|
||||
<span v-else-if="cashierOrder.payType == 'oilCard'">囤油卡</span>
|
||||
<span v-else-if="cashierOrder.payType == 'balance'">储值卡</span>
|
||||
<span v-else-if="cashierOrder.payType == 'credit'">挂账</span>
|
||||
<span v-else>小程序码</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="付款状态">
|
||||
|
@ -150,7 +150,17 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="实付金额" align="center" prop="payAmount"/>
|
||||
<el-table-column label="付款用户" align="center" prop="payUser"/>
|
||||
<el-table-column label="付款类型" align="center" prop="payType">
|
||||
<el-table-column label="付款方式" align="center" prop="payType">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.payType=='credit'">挂账</span>
|
||||
<span v-else-if="scope.row.payType == 'CASH'">现金</span>
|
||||
<span v-else-if="scope.row.payType == 'WECHAT'">微信</span>
|
||||
<span v-else-if="scope.row.payType == 'ALIPAY'">支付宝</span>
|
||||
<span v-else-if="scope.row.payType == 'UNIONPAY'">银联二维码</span>
|
||||
<span v-else-if="scope.row.payType == '0'">兑换券核销</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="付款状态" align="center" prop="payType">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.status == 'unpaid'">未支付</el-tag>
|
||||
<el-tag type="success" v-else-if="scope.row.status == 'paid'">已支付</el-tag>
|
||||
|
@ -205,6 +205,7 @@
|
||||
<span>{{getType(payList,scope.row.payType)}}</span>
|
||||
<span v-if="scope.row.payType=='oilCard'">囤油卡</span>
|
||||
<span v-if="scope.row.payType=='balance'">储值卡</span>
|
||||
<span v-if="scope.row.payType=='credit'">挂账</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="orderStatus" label="付款状态" align="center" width="120">
|
||||
|
@ -31,7 +31,8 @@
|
||||
<!-- </el-card>-->
|
||||
<el-card class="box-card" shadow="hover" v-for="item in merchantList" :key="item.id">
|
||||
<div slot="header" class="clearfix">
|
||||
<span @click="getMerchantList(item.id)"><dict-tag :options="dict.type.payment_channel" :value="item.merchantName"/></span>
|
||||
<!-- <span @click="getMerchantList(item.id)"><dict-tag :options="dict.type.payment_channel" :value="item.merchantName"/></span>-->
|
||||
<span><dict-tag :options="dict.type.payment_channel" :value="item.merchantName"/></span>
|
||||
<el-button v-if="item.isUse=='0'"
|
||||
@click="editStatus(item,1)"
|
||||
style="float: right; padding: 3px 0" type="text">切换为当前通道</el-button>
|
||||
|
@ -54,7 +54,7 @@
|
||||
@click="handleAdd"
|
||||
>新增员工</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
|
||||
</el-row>
|
||||
|
||||
<el-table ref="tables" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
|
||||
|
@ -340,31 +340,31 @@
|
||||
<el-form-item label="订单号">
|
||||
<el-input v-model="queryParams2.orderNo" placeholder="请输入订单号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间">
|
||||
<!-- <el-form-item label="创建时间">-->
|
||||
<!--<!– <el-date-picker–>-->
|
||||
<!--<!– v-model="dateRange"–>-->
|
||||
<!--<!– style="width: 240px"–>-->
|
||||
<!--<!– size="medium"–>-->
|
||||
<!--<!– value-format="yyyy-MM-dd"–>-->
|
||||
<!--<!– type="daterange"–>-->
|
||||
<!--<!– range-separator="-"–>-->
|
||||
<!--<!– start-placeholder="开始日期"–>-->
|
||||
<!--<!– end-placeholder="结束日期"–>-->
|
||||
<!--<!– ></el-date-picker>–>-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="dateRange"-->
|
||||
<!-- style="width: 240px"-->
|
||||
<!-- size="medium"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- type="daterange"-->
|
||||
<!-- range-separator="-"-->
|
||||
<!-- start-placeholder="开始日期"-->
|
||||
<!-- end-placeholder="结束日期"-->
|
||||
<!-- ></el-date-picker>-->
|
||||
<el-date-picker
|
||||
v-model="beginTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="开始日期">
|
||||
</el-date-picker>
|
||||
至
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- v-model="beginTime"-->
|
||||
<!-- style="width: 160px"-->
|
||||
<!-- type="date"-->
|
||||
<!-- placeholder="开始日期">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- 至-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="endTime"-->
|
||||
<!-- style="width: 160px"-->
|
||||
<!-- type="date"-->
|
||||
<!-- placeholder="结束日期">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery1">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery1">重置</el-button>
|
||||
@ -526,6 +526,7 @@ export default {
|
||||
methods:{
|
||||
getStaffCommissionList(){
|
||||
this.loading = true
|
||||
this.dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||
@ -618,6 +619,7 @@ export default {
|
||||
// 查询员工提成记录信息
|
||||
getCommissionList(){
|
||||
this.loading = true;
|
||||
this.dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||
|
@ -48,7 +48,7 @@ Vue.prototype.getName = getName
|
||||
Vue.prototype.download = download
|
||||
Vue.prototype.handleTree = handleTree
|
||||
// Vue.prototype.pcUrl = 'http://192.168.0.121:82/'
|
||||
Vue.prototype.pcUrl = 'http://192.168.0.178:81/'
|
||||
Vue.prototype.pcUrl = 'http://192.168.0.121:82/'
|
||||
// Vue.prototype.pcUrl = 'http://47.95.206.185:85/'
|
||||
|
||||
// 全局组件挂载
|
||||
|
@ -49,8 +49,8 @@ public class Const {
|
||||
public static String NOTIFY_PUBLIC_KEYS="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCbBAl3xSB7YeUnze4yYZmnTeT7OtXZr0sP10TsDVRH2SY/VEjgS9KPmHMmVeKZT3+6xKsUvulgVyie46GGtZPrnoh+glF1gzsYAXJ7dvR/R5nYO5VvfwK/ChPFTiKhbTtO4OKtchgBZuqCbsemG+gFIiVJo37dY0Kg0zISmFHdOQIDAQAB";
|
||||
|
||||
//异步通知(回调地址)
|
||||
public static String notify_url = "https://www.tuofeng.cc/oilAdmin/api/fyPay/notify";
|
||||
// public static String notify_url = "https://8q4f124343.yicp.fun/api/fyPay/notify";
|
||||
// public static String notify_url = "https://www.tuofeng.cc/oilAdmin/api/fyPay/notify";
|
||||
public static String notify_url = "https://8q4f124343.yicp.fun/api/fyPay/notify";
|
||||
|
||||
//下单
|
||||
public static String fuiou_21_url = "https://fundwx.fuiou.com/preCreate";
|
||||
|
@ -13,6 +13,7 @@ import com.fuint.api.fuyou.util.Utils;
|
||||
import com.fuint.business.commission.service.StaffCommissionService;
|
||||
import com.fuint.business.integral.entity.IntegralOrders;
|
||||
import com.fuint.business.integral.service.IntegralOrdersService;
|
||||
import com.fuint.business.integral.service.IntegralSettingsService;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService;
|
||||
import com.fuint.business.marketingActivity.cardFule.entity.CardFuelRecord;
|
||||
@ -51,6 +52,8 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
private StaffCommissionService staffCommissionService;
|
||||
@Autowired
|
||||
private MerchantConfigRecordService merchantConfigRecordService;
|
||||
@Resource
|
||||
private IntegralSettingsService integralSettingsService;
|
||||
|
||||
/**
|
||||
* 条码支付
|
||||
@ -194,14 +197,16 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
oilOrder.setTankId(tankId);
|
||||
oilOrderService.addOilTracks(oilOrder, oilOrder.getStoreId());
|
||||
}
|
||||
|
||||
if (ObjectUtil.isNotEmpty(oilOrder.getUserId())) integralSettingsService.refuelPoints(oilOrder);
|
||||
// 修改优惠券使用状态
|
||||
if (oilOrder.getCouponId()!=null){
|
||||
CardFavorableRecord byId = cardFavorableRecordService.getById(oilOrder.getCouponId());
|
||||
if (!ObjectUtil.isEmpty(byId)){
|
||||
byId.setStatus("1");
|
||||
cardFavorableRecordService.updateById(byId);
|
||||
}
|
||||
}
|
||||
// if (oilOrder.getCouponId()!=null){
|
||||
// CardFavorableRecord byId = cardFavorableRecordService.getById(oilOrder.getCouponId());
|
||||
// if (!ObjectUtil.isEmpty(byId)){
|
||||
// byId.setStatus("1");
|
||||
// cardFavorableRecordService.updateById(byId);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(goodsOrder)){
|
||||
// 商品订单
|
||||
@ -434,6 +439,11 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
try {
|
||||
// 查询商户配置信息
|
||||
MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(receiveParameter.getStoreId());
|
||||
if (ObjectUtil.isEmpty(merchantConfig)){
|
||||
res.put("code","error");
|
||||
res.put("msg","暂未配置商户信息");
|
||||
return res;
|
||||
}
|
||||
// MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(16);
|
||||
// 查询用户信息
|
||||
LJUserVo userVo = userService.selectUserById(receiveParameter.getUserId(), receiveParameter.getStoreId());
|
||||
|
@ -37,6 +37,16 @@ public class SupplierController extends BaseController {
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据条件查询当前店铺所有供应商信息
|
||||
* @param supplier
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/lists")
|
||||
public ResponseObject lists(Supplier supplier){
|
||||
return getSuccessResult(supplierService.selectSuppliers(supplier));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询供应商信息
|
||||
* @param id
|
||||
|
@ -54,5 +54,10 @@ public class Supplier extends BaseEntity implements Serializable {
|
||||
*/
|
||||
@ApiModelProperty("商铺id")
|
||||
private Integer storeId;
|
||||
/**
|
||||
* 是否删除 0未删除 1删除
|
||||
*/
|
||||
@ApiModelProperty("是否删除 0未删除 1删除")
|
||||
private String ifDelete;
|
||||
}
|
||||
|
||||
|
@ -53,13 +53,13 @@
|
||||
<where>
|
||||
mg.store_id = #{goods.storeId} and mg.if_delete = '0'
|
||||
<if test="goods.cvsGoodId != null and goods.cvsGoodId != ''">
|
||||
and cvs_good_id = #{goods.cvsGoodId}
|
||||
and mg.cvs_good_id = #{goods.cvsGoodId}
|
||||
</if>
|
||||
<if test="goods.supplierId != null and goods.supplierId != ''">
|
||||
and supplier_id = #{goods.supplierId}
|
||||
and mg.supplier_id = #{goods.supplierId}
|
||||
</if>
|
||||
</where>
|
||||
order by sort
|
||||
order by mg.sort
|
||||
</select>
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fuint.business.convenienceSore.mapper.StockStatisticMapper">
|
||||
<sql id="selectStock">
|
||||
select st.id, st.supplier_id, st.cvs_good_id, st.goods_id, st.store_id, st.cost_amount, mg.status,
|
||||
select st.id, mg.supplier_id, mg.cvs_good_id, st.goods_id, st.store_id, st.cost_amount, mg.status,
|
||||
mg.name,mg.goods_no,mg.pinyin_code,mg.shelf_number,
|
||||
mg.retail_price,mg.unit,mg.stock,mg.buying_price,mg.update_time
|
||||
from stock_statistic st inner join mt_goods mg on st.goods_id = mg.id
|
||||
@ -13,10 +13,10 @@
|
||||
<where>
|
||||
st.store_id = #{stock.storeId} and mg.if_delete = '0'
|
||||
<if test="stock.cvsGoodId != null and stock.cvsGoodId != ''">
|
||||
and st.cvs_good_id = #{stock.cvsGoodId}
|
||||
and mg.cvs_good_id = #{stock.cvsGoodId}
|
||||
</if>
|
||||
<if test="stock.supplierId != null and stock.supplierId != ''">
|
||||
and st.supplier_id = #{stock.supplierId}
|
||||
and mg.supplier_id = #{stock.supplierId}
|
||||
</if>
|
||||
<if test="stock.name != null and stock.name != ''">
|
||||
and mg.name like concat('%', #{stock.name}, '%')
|
||||
|
@ -8,7 +8,7 @@
|
||||
<select id="selectSupplierList" resultType="com.fuint.business.convenienceSore.entity.Supplier">
|
||||
<include refid="selectSupplier"></include>
|
||||
<where>
|
||||
store_id = #{supplier.storeId}
|
||||
store_id = #{supplier.storeId} and if_delete = '0'
|
||||
<if test="supplier.name != null and supplier.name != ''">
|
||||
and name like concat('%', #{supplier.name}, '%')
|
||||
</if>
|
||||
|
@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.business.convenienceSore.entity.Supplier;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 供应商信息 业务层
|
||||
*/
|
||||
@ -16,6 +18,12 @@ public interface SupplierService extends IService<Supplier> {
|
||||
*/
|
||||
public IPage<Supplier> selectSupplierList(Page page, Supplier supplier);
|
||||
|
||||
/**
|
||||
* 根据条件查询当前店铺所有供应商信息
|
||||
* @return
|
||||
*/
|
||||
List<Supplier> selectSuppliers(Supplier supplier);
|
||||
|
||||
/**
|
||||
* 根据id查询供应商信息
|
||||
* @param id
|
||||
|
@ -217,7 +217,8 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
|
||||
for (String s : split) {
|
||||
LJGoods ljGoods = this.selectLJGoodsById(Integer.parseInt(s));
|
||||
if (ObjectUtil.isNotEmpty(ljGoods)){
|
||||
if (status.equals("qy") && ljGoods.getStock()==0){
|
||||
if (status.equals("qy") && ljGoods.getStock()==0 ||
|
||||
status.equals("qy") && ljGoods.getRetailPrice()==0 && ljGoods.getMemberPrice()==0){
|
||||
ljGoods.setStatus("jy");
|
||||
}else {
|
||||
ljGoods.setStatus(status);
|
||||
|
@ -12,6 +12,8 @@ import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 供应商 业务层
|
||||
*/
|
||||
@ -31,6 +33,16 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
|
||||
return supplierIPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Supplier> selectSuppliers(Supplier supplier) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("store_id",nowAccountInfo.getStoreId());
|
||||
if (ObjectUtil.isNotEmpty(supplier) && ObjectUtil.isNotEmpty(supplier.getIfDelete()))
|
||||
queryWrapper.eq("if_delete",supplier.getIfDelete());
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询供应商信息
|
||||
* @param id
|
||||
@ -38,7 +50,10 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
|
||||
*/
|
||||
@Override
|
||||
public Supplier selectSupplierById(int id) {
|
||||
return baseMapper.selectById(id);
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("if_delete","0");
|
||||
queryWrapper.eq("id",id);
|
||||
return baseMapper.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -53,6 +68,7 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("name",name);
|
||||
queryWrapper.eq("store_id",storeId);
|
||||
queryWrapper.eq("if_delete","0");
|
||||
Supplier supplier = baseMapper.selectOne(queryWrapper);
|
||||
return supplier;
|
||||
}
|
||||
@ -63,7 +79,11 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
|
||||
*/
|
||||
@Override
|
||||
public void deleteSupplierById(Integer id) {
|
||||
baseMapper.deleteById(id);
|
||||
Supplier supplier = baseMapper.selectById(id);
|
||||
if (ObjectUtil.isNotEmpty(supplier)){
|
||||
supplier.setIfDelete("1");
|
||||
this.updateSupplier(supplier);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.integral.entity.IntegralGift;
|
||||
import com.fuint.business.integral.entity.IntegralSettings;
|
||||
import com.fuint.business.order.entity.OilOrder;
|
||||
import io.lettuce.core.dynamic.annotation.Param;
|
||||
|
||||
|
||||
@ -69,4 +70,9 @@ public interface IntegralSettingsService {
|
||||
|
||||
IntegralSettings signInFunction(IntegralSettings integralSettings);
|
||||
|
||||
/**
|
||||
* 加油赠送积分
|
||||
* @param order
|
||||
*/
|
||||
void refuelPoints(OilOrder order);
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ import com.fuint.business.integral.mapper.IntegralDetailMapper;
|
||||
import com.fuint.business.integral.mapper.IntegralSettingsMapper;
|
||||
import com.fuint.business.integral.service.IntegralDetailService;
|
||||
import com.fuint.business.integral.service.IntegralSettingsService;
|
||||
import com.fuint.business.order.entity.OilOrder;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilNumber;
|
||||
import com.fuint.business.petrolStationManagement.mapper.OilNumberMapper;
|
||||
import com.fuint.business.storeInformation.entity.LJStore;
|
||||
@ -108,7 +109,6 @@ public class IntegralSettingsServiceImpl implements IntegralSettingsService {
|
||||
refuelConsumptionAmountMap.put("amount", 0);
|
||||
refuelConsumptionAmountMap.put("integral", 0);
|
||||
refuelConsumptionAmountMap.put("oilNameId",oilNumber.getId());
|
||||
|
||||
refuelConsumptionAmountList.add(refuelConsumptionAmountMap);
|
||||
}
|
||||
String refuelConsumptionAmount = JSON.toJSONString(refuelConsumptionAmountList);
|
||||
@ -301,6 +301,69 @@ public class IntegralSettingsServiceImpl implements IntegralSettingsService {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refuelPoints(OilOrder order) {
|
||||
IntegralSettings integralSettings = integralSettingsMapper.getByStoreId(order.getStoreId());
|
||||
if (ObjectUtil.isNotEmpty(integralSettings) && integralSettings.getRefuelPointsRules()==0
|
||||
&& integralSettings.getRefuelPointsFunction() ==0){
|
||||
if (integralSettings.getRefuelSceneType()==0){
|
||||
// 按金额
|
||||
if (integralSettings.getRefuelAmountType()==0){
|
||||
// 按订单金额
|
||||
countPoints(integralSettings,order.getOils(),order.getOrderAmount(),order.getUserId());
|
||||
}else {
|
||||
// 按实付金额
|
||||
if (integralSettings.getRefuelValueParticipation()==0){
|
||||
// 储值金额不参与
|
||||
countPoints(integralSettings,order.getOils(),order.getPayAmount(),order.getUserId());
|
||||
}else {
|
||||
// 储值金额参与
|
||||
countPoints(integralSettings,order.getOils(),order.getPayAmount()+order.getBalanceAmount(),order.getUserId());
|
||||
}
|
||||
}
|
||||
}else if (integralSettings.getRefuelSceneType()==1){
|
||||
// 按实付金额
|
||||
countPoints(integralSettings,order.getOils(),order.getPayAmount()+order.getBalanceAmount(),order.getUserId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算赠送积分
|
||||
* @param integralSettings
|
||||
* @param oilId 油品id
|
||||
* @param amount 消费金额
|
||||
* @param userId 用户id
|
||||
*/
|
||||
private void countPoints(IntegralSettings integralSettings,String oilId,Double amount,Integer userId){
|
||||
LJStore store = iljStoreService.selectStoreByStoreId(integralSettings.getStoreId());
|
||||
UserBalance balance = userBalanceService.selectUserBalance(userId, store.getChainStoreId());
|
||||
if (ObjectUtil.isNotEmpty(balance)) {
|
||||
if (integralSettings.getRefuelSceneRules()==0) {
|
||||
// 通用规则
|
||||
if (integralSettings.getRefuelFuelAmount() <= amount) {
|
||||
Integer points = balance.getPoints();
|
||||
balance.setPoints(points+integralSettings.getRefuelPoints());
|
||||
}
|
||||
} else {
|
||||
// 油品区分
|
||||
JSONArray jsonArray = JSONArray.parseArray(integralSettings.getRefuelConsumptionAmount());
|
||||
for (int i = 0;i<jsonArray.size();i++){
|
||||
Double amount1 = Double.valueOf(jsonArray.getJSONObject(i).get("amount").toString());
|
||||
Integer integral = Integer.valueOf(jsonArray.getJSONObject(i).get("integral").toString());
|
||||
String oilNameId = jsonArray.getJSONObject(i).get("oilNameId").toString();
|
||||
if (oilNameId.equals(oilId)){
|
||||
if (amount1<=amount){
|
||||
Integer points = balance.getPoints();
|
||||
balance.setPoints(points+integral);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
userBalanceService.updateUserBalance(balance);
|
||||
}
|
||||
}
|
||||
|
||||
private void extracted(LJUserVo ljUserVos, JSONArray jsonArray, int dayInt) {
|
||||
IntegralDetail integralDetail = new IntegralDetail();
|
||||
integralDetail.setStoreId(ljUserVos.getStoreId());
|
||||
|
@ -111,20 +111,30 @@ public class ActiveConsumptionController extends BaseController {
|
||||
return getSuccessResult(this.activeConsumptionService.removeByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping("delById/{ids}")
|
||||
public ResponseObject delete(@PathVariable Long ids) {
|
||||
return getSuccessResult(this.activeConsumptionService.removeById(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping("del")
|
||||
public ResponseObject del(@RequestParam("ids") List<Long> ids) {
|
||||
return getSuccessResult(activeConsumptionChildService.removeByIds(ids));
|
||||
public ResponseObject del(@RequestParam("ids") Long ids) {
|
||||
return getSuccessResult(activeConsumptionChildService.removeById(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 优惠券、兑换券使用详情
|
||||
*
|
||||
* @param id 主键
|
||||
* @param activeConsumption 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("/detailRecord")
|
||||
|
@ -6,6 +6,8 @@ import com.fuint.business.marketingActivity.activeConsumption.entity.ActiveConsu
|
||||
import com.fuint.business.marketingActivity.activeConsumption.entity.ActiveConsumptionChild;
|
||||
import com.fuint.business.marketingActivity.activeConsumption.mapper.ActiveConsumptionChildMapper;
|
||||
import com.fuint.business.marketingActivity.activeConsumption.service.ActiveConsumptionChildService;
|
||||
import com.fuint.business.marketingActivity.cardExchange.entity.CardExchangeRecord;
|
||||
import com.fuint.business.marketingActivity.cardExchange.service.CardExchangeRecordService;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableCountVO;
|
||||
@ -31,6 +33,8 @@ public class ActiveConsumptionChildServiceImpl extends ServiceImpl<ActiveConsump
|
||||
private ActiveConsumptionChildMapper activeConsumptionChildMapper;
|
||||
@Resource
|
||||
private CardFavorableRecordService cardFavorableRecordService;
|
||||
@Resource
|
||||
private CardExchangeRecordService cardExchangeRecordService;
|
||||
@Override
|
||||
public List<ActiveConsumptionChild> selectList(Serializable id) {
|
||||
return activeConsumptionChildMapper.selectConsumptionChilds(id);
|
||||
@ -72,6 +76,24 @@ public class ActiveConsumptionChildServiceImpl extends ServiceImpl<ActiveConsump
|
||||
cardFavorableCountVO.setCount(favorableRecords.size());
|
||||
cardFavorableCountVO.setCountEd(b);
|
||||
cardFavorableCountVO.setCountLd(a);
|
||||
|
||||
// 查询兑换券领取记录
|
||||
int as = 0;
|
||||
int bs = 0;
|
||||
LambdaQueryWrapper<CardExchangeRecord> queryWrappers = new LambdaQueryWrapper<>();
|
||||
queryWrappers.eq(CardExchangeRecord::getActiveId, id);
|
||||
queryWrappers.eq(CardExchangeRecord::getStoreId, nowAccountInfo.getStoreId());
|
||||
List<CardExchangeRecord> list = cardExchangeRecordService.list(queryWrappers);
|
||||
for (CardExchangeRecord cardExchangeRecord : list) {
|
||||
if (cardExchangeRecord.getStatus().equals("0")){
|
||||
as+=1;
|
||||
}else {
|
||||
bs+=1;
|
||||
}
|
||||
}
|
||||
cardFavorableCountVO.setCounts(favorableRecords.size());
|
||||
cardFavorableCountVO.setCountEds(b);
|
||||
cardFavorableCountVO.setCountLds(a);
|
||||
return cardFavorableCountVO;
|
||||
}
|
||||
}
|
||||
|
@ -197,9 +197,9 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
|
||||
queryWrapper.eq(ActiveConsumptionChild::getActiveConsumptionId,id);
|
||||
queryWrapper.orderByDesc(ActiveConsumptionChild::getCreateTime);
|
||||
List<ActiveConsumptionChild> activeConsumptionChildList = activeConsumptionChildService.list(queryWrapper);
|
||||
BeanUtils.copyProperties(consumption,activeConsumptionVO);
|
||||
if (CollectionUtils.isNotEmpty(activeConsumptionChildList)){
|
||||
//封装VO返回
|
||||
BeanUtils.copyProperties(consumption,activeConsumptionVO);
|
||||
activeConsumptionVO.setParticipationConditionMoney(consumption.getParticipationConditionMoney().toString());
|
||||
activeConsumptionVO.setDieselUserLevel(consumption.getDieselUserLevel().split(","));
|
||||
activeConsumptionVO.setGasolineUserLevel(consumption.getGasolineUserLevel().split(","));
|
||||
|
@ -102,6 +102,16 @@ public class ActiveDiscountController extends BaseController {
|
||||
return getSuccessResult(this.activeDiscountService.removeByIds(idList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping("delById/{ids}")
|
||||
public ResponseObject delete(@PathVariable Long ids) {
|
||||
return getSuccessResult(this.activeDiscountService.removeById(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
|
@ -17,6 +17,7 @@ import com.fuint.business.marketingActivity.activeDiscount.service.ActiveDiscoun
|
||||
import com.fuint.business.marketingActivity.activeDiscount.vo.ActiveDiscountAppletVO;
|
||||
import com.fuint.business.marketingActivity.activeDiscount.vo.ActiveDiscountPayVO;
|
||||
import com.fuint.business.marketingActivity.activeDiscount.vo.ActiveDiscountVO;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilName;
|
||||
import com.fuint.business.petrolStationManagement.service.OilNameService;
|
||||
import com.fuint.business.store.service.StoreService;
|
||||
import com.fuint.business.userManager.service.LJUserGradeService;
|
||||
@ -134,6 +135,16 @@ public class ActiveDiscountServiceImpl extends ServiceImpl<ActiveDiscountMapper,
|
||||
activeDiscountVO.setAdaptOil(Arrays.stream(s.getAdaptOil().split(","))
|
||||
.map(Integer::valueOf)
|
||||
.toArray(Integer[]::new));
|
||||
String oilName = "";
|
||||
for (Integer integer : activeDiscountVO.getAdaptOil()) {
|
||||
OilName oilNames = oilNameService.selectOilNameById(integer);
|
||||
oilName += oilNames.getOilType() + "-"+oilNames.getOilName() + ",";
|
||||
}
|
||||
|
||||
if (oilName.endsWith(",")) { // 判断字符串是否以逗号结尾
|
||||
oilName = oilName.substring(0, oilName.length() - 1); // 截取去除最后一个字符之前的子串
|
||||
}
|
||||
activeDiscountVO.setAdaptOilss(oilName);
|
||||
//获取会员等级
|
||||
String str = "";
|
||||
if (ObjectUtils.isNotEmpty(s.getDieselUserLevel())){
|
||||
|
@ -4,11 +4,13 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscountChild;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ActiveDiscountVO implements Serializable{
|
||||
//主键id
|
||||
@TableId(type = IdType.AUTO)
|
||||
@ -27,6 +29,7 @@ public class ActiveDiscountVO implements Serializable{
|
||||
private Date activeEndTime;
|
||||
//适用油品0:92# 1: 95# 2:98# 3:0# 4:-10# 5: LNG 6;CNG 7:京92# 8:京95# 9:京0#
|
||||
private String[] adaptOils;
|
||||
private String adaptOilss;
|
||||
private Integer[] adaptOil;
|
||||
//适用会员类型 0:全部用户 1:全部会员 2:等级会员
|
||||
private String adaptUserType;
|
||||
|
@ -102,7 +102,15 @@ public class ActiveFullminusController extends BaseController {
|
||||
public ResponseObject delete(@RequestParam("idList") List<Long> idList) {
|
||||
return getSuccessResult(this.activeFullminusService.removeByIds(idList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping("delById/{ids}")
|
||||
public ResponseObject delete(@PathVariable Long ids) {
|
||||
return getSuccessResult(this.activeFullminusService.removeById(ids));
|
||||
}
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
|
@ -16,6 +16,7 @@ import com.fuint.business.marketingActivity.activeFullminus.entity.ActiveFullmin
|
||||
import com.fuint.business.marketingActivity.activeFullminus.service.ActiveFullminusService;
|
||||
import com.fuint.business.marketingActivity.activeFullminus.vo.ActiveFullminusAppletVO;
|
||||
import com.fuint.business.marketingActivity.activeFullminus.vo.ActiveFullminusVO;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilName;
|
||||
import com.fuint.business.petrolStationManagement.service.OilNameService;
|
||||
import com.fuint.business.store.service.StoreService;
|
||||
import com.fuint.business.userManager.service.LJUserGradeService;
|
||||
@ -129,6 +130,16 @@ public class ActiveFullminusServiceImpl extends ServiceImpl<ActiveFullminusMappe
|
||||
activeFullminusVO.setAdaptOil(Arrays.stream(s.getAdaptOil().split(","))
|
||||
.map(Integer::valueOf)
|
||||
.toArray(Integer[]::new));
|
||||
String oilName = "";
|
||||
for (Integer integer : activeFullminusVO.getAdaptOil()) {
|
||||
OilName oilNames = oilNameService.selectOilNameById(integer);
|
||||
oilName += oilNames.getOilType() + "-"+oilNames.getOilName() + ",";
|
||||
}
|
||||
|
||||
if (oilName.endsWith(",")) { // 判断字符串是否以逗号结尾
|
||||
oilName = oilName.substring(0, oilName.length() - 1); // 截取去除最后一个字符之前的子串
|
||||
}
|
||||
activeFullminusVO.setAdaptOilss(oilName);
|
||||
//获取会员等级
|
||||
String str = "";
|
||||
if (ObjectUtils.isNotEmpty(s.getDieselUserLevel())){
|
||||
|
@ -4,11 +4,13 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscountChild;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ActiveFullminusVO implements Serializable {
|
||||
//主键id
|
||||
@TableId(type = IdType.AUTO)
|
||||
@ -27,6 +29,7 @@ public class ActiveFullminusVO implements Serializable {
|
||||
private Date activeEndTime;
|
||||
//适用油品0:92# 1: 95# 2:98# 3:0# 4:-10# 5: LNG 6;CNG 7:京92# 8:京95# 9:京0#
|
||||
private String[] adaptOils;
|
||||
private String adaptOilss;
|
||||
private Integer[] adaptOil;
|
||||
//适用会员类型 0:全部用户 1:全部会员 2:等级会员
|
||||
private String adaptUserType;
|
||||
|
@ -102,6 +102,16 @@ public class ActiveNewlywedsController extends BaseController {
|
||||
return getSuccessResult(this.activeNewlywedsService.removeByIds(idList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping("delById/{ids}")
|
||||
public ResponseObject delete(@PathVariable Long ids) {
|
||||
return getSuccessResult(this.activeNewlywedsService.removeById(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除卡券
|
||||
*
|
||||
|
@ -105,6 +105,15 @@ public class ActiveRecommendController extends BaseController {
|
||||
public ResponseObject delete(@RequestParam("idList") List<Long> idList) {
|
||||
return getSuccessResult(this.activeRecommendService.removeByIds(idList));
|
||||
}
|
||||
/**
|
||||
* 删除数据
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping("delById/{ids}")
|
||||
public ResponseObject delete(@PathVariable Long ids) {
|
||||
return getSuccessResult(this.activeRecommendService.removeById(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除卡券
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.fuint.business.marketingActivity.cardExchange.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.convenienceSore.service.StockStatisticService;
|
||||
import com.fuint.business.marketingActivity.cardExchange.dto.CardExchangeRecordDTO;
|
||||
import com.fuint.business.marketingActivity.cardExchange.entity.CardExchange;
|
||||
import com.fuint.business.marketingActivity.cardExchange.entity.CardExchangeRecord;
|
||||
@ -15,6 +16,7 @@ import com.fuint.common.util.TokenUtil;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -42,6 +44,8 @@ public class CardExchangeRecordController extends BaseController {
|
||||
private CardExchangeService cardExchangeService;
|
||||
@Resource
|
||||
private LJOrderService ljOrderService;
|
||||
@Resource
|
||||
private StockStatisticService stockStatisticService;
|
||||
|
||||
/**
|
||||
* 分页查询所有数据
|
||||
@ -123,20 +127,22 @@ public class CardExchangeRecordController extends BaseController {
|
||||
LJStaff ljStaff = iljStaffService.selectStaffById(nowAccountInfo.getStaffId());
|
||||
cardExchangeRecord.setRealName(ljStaff.getRealName());
|
||||
cardExchangeRecord.setStaffMobile(ljStaff.getMobile());
|
||||
Integer cardExchangeId = cardExchangeRecord.getCardExchangeId();
|
||||
CardExchangeRecord byId = cardExchangeRecordService.getById(cardExchangeRecord.getId());
|
||||
Integer cardExchangeId = byId.getCardExchangeId();
|
||||
CardExchange cardExchange = cardExchangeService.getById(cardExchangeId);
|
||||
Integer giftId = cardExchange.getGiftId();
|
||||
LJOrder ljOrder = new LJOrder();
|
||||
ljOrder.setTerminal("pc");
|
||||
ljOrder.setPayUser(cardExchangeRecord.getMobile());
|
||||
ljOrder.setPayUser(byId.getMobile());
|
||||
ljOrder.setStoreId(nowAccountInfo.getStoreId());
|
||||
ljOrder.setUserId(cardExchangeRecord.getMtUserId());
|
||||
ljOrder.setUserId(byId.getMtUserId());
|
||||
ljOrder.setGoodsNum(1);
|
||||
ljOrder.setPayType("0");
|
||||
ljOrder.setStatus("paid");
|
||||
ljOrder.setPayTime(new Date());
|
||||
ljOrder.setStaffId(nowAccountInfo.getStaffId());
|
||||
ljOrderService.addGoodOrder(ljOrder,giftId);
|
||||
stockStatisticService.insertStockStatisticTrack(giftId,0.0,"核销兑换!",1);
|
||||
return getSuccessResult(this.cardExchangeRecordService.updateById(cardExchangeRecord));
|
||||
}
|
||||
|
||||
|
@ -108,6 +108,15 @@ public class CardFavorableRecordController extends BaseController {
|
||||
return getSuccessResult(this.cardFavorableRecordService.issueCardFavorable(cardFavorableAdnUserDTO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询一键发券会员数接口
|
||||
*
|
||||
*/
|
||||
@GetMapping("getAdaptUserList")
|
||||
public ResponseObject getAdaptUserList(@Param("cardFavorableAdnUserDTO") CardFavorableAdnUserDTO cardFavorableAdnUserDTO) {
|
||||
return getSuccessResult(this.cardFavorableRecordService.getAdaptUserList(cardFavorableAdnUserDTO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询一键发券接口
|
||||
*
|
||||
|
@ -8,6 +8,8 @@ import com.fuint.business.marketingActivity.cardFavorable.dto.CardFavorableAdnUs
|
||||
import com.fuint.business.marketingActivity.cardFavorable.dto.IdListDTO;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableRecordVO;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.vo.LJUserVos;
|
||||
import com.fuint.business.userManager.vo.LJUserVo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
@ -76,5 +78,12 @@ public interface CardFavorableRecordService extends IService<CardFavorableRecord
|
||||
CardFavorableAdnUserDTO getInfoById(Integer id);
|
||||
|
||||
int updateStatus(Integer id);
|
||||
|
||||
/**
|
||||
* 查询一键发券会员数接口
|
||||
* @param cardFavorableAdnUserDTO
|
||||
* @return
|
||||
*/
|
||||
List<LJUserVos> getAdaptUserList(CardFavorableAdnUserDTO cardFavorableAdnUserDTO);
|
||||
}
|
||||
|
||||
|
@ -22,6 +22,7 @@ import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRe
|
||||
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableService;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableRecordVO;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.vo.LJUserVos;
|
||||
import com.fuint.business.petrolStationManagement.service.OilNameService;
|
||||
import com.fuint.business.userManager.entity.LJUser;
|
||||
import com.fuint.business.userManager.service.LJUserService;
|
||||
@ -366,5 +367,30 @@ public class CardFavorableRecordServiceImpl extends ServiceImpl<CardFavorableRec
|
||||
public int updateStatus(Integer id) {
|
||||
return cardFavorableRecordMapper.updateStatus(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LJUserVos> getAdaptUserList(CardFavorableAdnUserDTO cardFavorableAdnUserDTO) {
|
||||
ArrayList<LJUserVos> ljUserVosList = new ArrayList<>();
|
||||
List<Integer> gradeIds = cardFavorableAdnUserDTO.getGradeIds();
|
||||
for (Integer gradeId : gradeIds) {
|
||||
LJUserVo ljUserVo = new LJUserVo();
|
||||
LJUserVos ljUserVos = new LJUserVos();
|
||||
ljUserVo.setGradeId(gradeId);
|
||||
List<LJUserVo> userLists = userService.getUserCountList(ljUserVo);
|
||||
if (CollectionUtils.isNotEmpty(userLists)){
|
||||
ljUserVos.setGradeName(userLists.get(0).getGradeName());
|
||||
ljUserVos.setCountAll(userLists.size());
|
||||
}
|
||||
ljUserVo.setDays(cardFavorableAdnUserDTO.getDays());
|
||||
List<LJUserVo> userListss = userService.getUserLists(ljUserVo);
|
||||
ljUserVos.setCount(userListss.size());
|
||||
|
||||
if (ObjectUtils.isNotEmpty(ljUserVos.getCountAll()) && ObjectUtils.isNotEmpty(ljUserVos.getCount()) && ljUserVos.getCountAll()!=0){
|
||||
ljUserVos.setRate(ljUserVos.getCount()/ljUserVos.getCountAll() + "%");
|
||||
}
|
||||
ljUserVosList.add(ljUserVos);
|
||||
}
|
||||
return ljUserVosList;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13,4 +13,11 @@ public class CardFavorableCountVO implements Serializable {
|
||||
private Integer count;
|
||||
private Integer countEd;
|
||||
private Integer countLd;
|
||||
|
||||
/**
|
||||
* 兑换券数量
|
||||
*/
|
||||
private Integer counts;
|
||||
private Integer countEds;
|
||||
private Integer countLds;
|
||||
}
|
||||
|
@ -0,0 +1,13 @@
|
||||
package com.fuint.business.marketingActivity.cardFavorable.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class LJUserVos implements Serializable {
|
||||
private String gradeName;
|
||||
private Integer countAll;
|
||||
private Integer count;
|
||||
private String rate;
|
||||
}
|
@ -90,6 +90,8 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
|
||||
private OilNameService oilNameService;
|
||||
@Autowired
|
||||
private ILJStoreService storeService;
|
||||
@Resource
|
||||
private StaffCommissionService staffCommissionService;
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
@ -630,6 +632,8 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
|
||||
oilBalanceChange.setOrderNo(cardFuleOrders.getOrderNo());
|
||||
oilBalanceChange.setOilType(cardFuleOrders.getOilType());
|
||||
oilBalanceChangeService.save(oilBalanceChange);
|
||||
//员工提成
|
||||
staffCommissionService.countStaffCommission(cardFuleOrders.getStaffId(),cardFuleOrders.getStoreId(),cardFuleOrders.getAmount(),cardFuleOrders.getPayAmount(),"4",cardFuleOrders.getOrderNo());
|
||||
//生成充值记录
|
||||
cardFuelRecord.setMtUserId(cardFuleOrders.getMtUserId());
|
||||
cardFuelRecord.setName(cardFuleOrders.getName());
|
||||
|
@ -103,11 +103,11 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
|
||||
@Autowired
|
||||
private FyPayService fyPayService;
|
||||
@Resource
|
||||
CardBalanceChangeService cardBalanceChangeService;
|
||||
private CardBalanceChangeService cardBalanceChangeService;
|
||||
@Resource
|
||||
IntegralDetailService integralDetailService;
|
||||
private IntegralDetailService integralDetailService;
|
||||
@Resource
|
||||
CommissionRecordService commissionRecordService;
|
||||
private CommissionRecordService commissionRecordService;
|
||||
@Resource
|
||||
StaffCommissionService staffCommissionService;
|
||||
@Resource
|
||||
@ -131,8 +131,6 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
|
||||
@Autowired
|
||||
private ILJStoreService storeService;
|
||||
@Resource
|
||||
private CommissionRecordMapper commissionRecordMapper;
|
||||
@Resource
|
||||
private MtUserGradeChildService userGradeChildService;
|
||||
|
||||
/**
|
||||
@ -231,6 +229,7 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
|
||||
cardValueOrders.setAmountCommission(multiply.doubleValue());
|
||||
}
|
||||
}
|
||||
|
||||
if (ObjectUtils.isNotEmpty(cardValue.getAmountCommission())){
|
||||
cardValueOrders.setAmountCommission(cardValue.getAmountCommission());
|
||||
}
|
||||
@ -698,6 +697,7 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
|
||||
cardValueRecord.setId(id);
|
||||
cardValueRecord.setPayStatus(payStatus);
|
||||
int i = baseMapper.updateById(cardValueRecord);
|
||||
// staffCommissionService.countStaffCommission(cardValueOrders.getStaffId(),cardValueOrders.getStoreId(),cardValueOrders.getAmount(),cardValueOrders.getPayAmount(),"3",cardValueOrders.getOrderNo());
|
||||
return i>0;
|
||||
}
|
||||
|
||||
@ -858,6 +858,7 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
|
||||
commissionRecord.setType("3");
|
||||
commissionRecord.setOrderNo(cardValueOrders.getOrderNo());
|
||||
}
|
||||
staffCommissionService.countStaffCommission(cardValueOrders.getStaffId(),cardValueOrders.getStoreId(),cardValueOrders.getAmount(),cardValueOrders.getPayAmount(),"3",cardValueOrders.getOrderNo());
|
||||
//用户余额变化记录
|
||||
cardBalanceChange.setUserId(cardValueOrders.getMtUserId());
|
||||
cardBalanceChange.setStoreId(cardValueOrders.getStoreId());
|
||||
|
@ -178,8 +178,8 @@ public class QrCodeUtils {
|
||||
*/
|
||||
private BufferedImage createQrCode(InputStream logoStream, String url, int width, int height) throws IOException {
|
||||
QrConfig config = new QrConfig(width, height);
|
||||
Image image = ImageIO.read(logoStream);
|
||||
config.setImg(image);
|
||||
// Image image = ImageIO.read(logoStream);
|
||||
// config.setImg(image);
|
||||
config.setMargin(1);
|
||||
config.setErrorCorrection(ErrorCorrectionLevel.H);
|
||||
return QrCodeUtil.generate(url, config);
|
||||
|
@ -87,6 +87,10 @@ public class CashierOrder extends BaseEntity implements Serializable {
|
||||
* 订单金额
|
||||
*/
|
||||
private Double amount;
|
||||
/**
|
||||
* 优惠后应付金额
|
||||
*/
|
||||
private Double afterDiscountAmount;
|
||||
/**
|
||||
* 实付金额
|
||||
*/
|
||||
|
@ -72,12 +72,13 @@
|
||||
<if test="order.orderStatus != null and order.orderStatus != ''">
|
||||
and order_status = #{order.orderStatus}
|
||||
</if>
|
||||
<if test="order.remark != null and order.remark != ''">
|
||||
and order_status = 'paid' and remark is null or remark = '' and order_status = 'paid'
|
||||
</if>
|
||||
<if test="order.payType != null and order.payType != ''">
|
||||
and pay_type = #{order.payType}
|
||||
</if>
|
||||
<if test="order.remark != null and order.remark != ''">
|
||||
and order_status = 'paid' and remark is null and store_id = #{order.storeId}
|
||||
or remark = '' and order_status = 'paid' and store_id = #{order.storeId}
|
||||
</if>
|
||||
order by create_time desc
|
||||
</where>
|
||||
</select>
|
||||
|
@ -18,6 +18,7 @@ import com.fuint.business.convenienceSore.entity.LJGoods;
|
||||
import com.fuint.business.convenienceSore.entity.SaleDetail;
|
||||
import com.fuint.business.convenienceSore.service.LJGoodsService;
|
||||
import com.fuint.business.convenienceSore.service.SaleDetailService;
|
||||
import com.fuint.business.integral.service.IntegralSettingsService;
|
||||
import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscountChild;
|
||||
import com.fuint.business.marketingActivity.activeDiscount.service.ActiveDiscountService;
|
||||
import com.fuint.business.marketingActivity.activeDiscount.vo.ActiveDiscountVO;
|
||||
@ -27,6 +28,7 @@ import com.fuint.business.marketingActivity.activeFullminus.vo.ActiveFullminusVO
|
||||
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableService;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableVO;
|
||||
import com.fuint.business.marketingActivity.cardFule.entity.CardFuelChange;
|
||||
import com.fuint.business.marketingActivity.cardFule.entity.CardFuelRecord;
|
||||
import com.fuint.business.marketingActivity.cardFule.mapper.CardFuelRecordMapper;
|
||||
import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
|
||||
@ -114,6 +116,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
private ActiveFullminusService activeFullminusService;
|
||||
@Resource
|
||||
private ActiveDiscountService activeDiscountService;
|
||||
@Resource
|
||||
private IntegralSettingsService integralSettingsService;
|
||||
|
||||
@Override
|
||||
public IPage<OilOrder> selectOilOrderList(Page page, OilOrder order) {
|
||||
@ -318,7 +322,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
|
||||
// 支付状态
|
||||
String payStatus = "unpaid";
|
||||
if (payType.equals("CASH") || map.get("allAmount").equals("0")){
|
||||
if (payType.equals("CASH") || payType.equals("credit") || map.get("allAmount").equals("0")){
|
||||
payStatus = "paid";
|
||||
}else {
|
||||
payStatus = "unpaid";
|
||||
@ -332,7 +336,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
// 根据店铺id查询商户配置信息
|
||||
MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(storeId);
|
||||
|
||||
if (ObjectUtil.isEmpty(merchantConfig)){
|
||||
if (ObjectUtil.isEmpty(merchantConfig) && !payType.equals("CASH") && !payType.equals("credit") &&
|
||||
!map.get("allAmount").equals("0")){
|
||||
orders.put("error","请先配置支付通道");
|
||||
return orders;
|
||||
}
|
||||
@ -374,7 +379,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
|
||||
// 查询商品订单号
|
||||
LJOrder ljOrder2 = orderService.selectGoodsOrder(orderNo);
|
||||
if (payType.equals("CASH")) {
|
||||
if (payType.equals("CASH") || payType.equals("credit")) {
|
||||
// 添加商品订单记录表
|
||||
OrderGoods orderGoods = new OrderGoods();
|
||||
for (JSONObject good : goods) {
|
||||
@ -445,7 +450,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
if (ObjectUtil.isNotEmpty(jsonObjects.get(i).get("type"))){
|
||||
order.setActiveType(jsonObjects.get(i).get("type").toString());
|
||||
}
|
||||
if (payType.equals("CASH")){
|
||||
if (payType.equals("CASH") || payType.equals("credit")){
|
||||
order.setPayTime(new Date());
|
||||
this.addOilTrack(jsonObjects.get(i),storeId);
|
||||
this.updateCardAndActiveById(storeId,userId,order.getActiveId(),order.getCouponId(),order.getActiveType(),order.getOrderAmount(), Integer.valueOf(order.getOils()));
|
||||
@ -468,7 +473,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
cashierOrder.setStatus(payStatus);
|
||||
cashierOrder.setOilPayAmount(oilActualPay);
|
||||
cashierOrder.setGoodsPayAmount(goodsActualPay);
|
||||
if (payType.equals("CASH")){
|
||||
if (payType.equals("CASH") || payType.equals("credit")){
|
||||
if (StringUtils.isNotEmpty(map.get("authCode"))){
|
||||
cashierOrder.setPayAmount(Double.valueOf(map.get("authCode")));
|
||||
}else {
|
||||
@ -487,9 +492,10 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
cashierOrder.setOilDiscountAmount(oilDiscount);
|
||||
cashierOrder.setTerminal(terminal);
|
||||
cashierOrder.setPayType(payType);
|
||||
cashierOrder.setAfterDiscountAmount(oilAmount+goodsAmount-oilDiscount-goodsDiscount);
|
||||
|
||||
// 如果金额不等于0调用第三方支付接口
|
||||
if (!map.get("allAmount").equals("0") && !map.get("payType").equals("CASH")){
|
||||
if (!map.get("allAmount").equals("0") && !map.get("payType").equals("CASH") && !payType.equals("credit")){
|
||||
Integer allAmount = (int) (Double.valueOf(map.get("allAmount"))*100);
|
||||
// 判断是否开启支付规则
|
||||
List<MerchantConfig> list = merchantConfigService.selectMeChByIsOpen(storeId);
|
||||
@ -521,7 +527,6 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
// throw new RuntimeException("支付失败");
|
||||
}
|
||||
}else {
|
||||
cashierOrder.setPayAmount(oilAmount+goodsAmount-oilDiscount-goodsDiscount);
|
||||
this.insertAllOrderInfo(orderNo,storeId,oilAmount+goodsAmount,Double.valueOf(map.get("allAmount")),payType,userId,"PC","6","paid");
|
||||
}
|
||||
|
||||
@ -531,6 +536,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
orders.put("oilOrder",oilOrder2);
|
||||
if (oilOrder2.getOrderStatus().equals("paid")){
|
||||
cashierOrder.setPayTime(new Date());
|
||||
if (ObjectUtil.isNotEmpty(oilOrder2.getUserId())) integralSettingsService.refuelPoints(oilOrder2);
|
||||
}
|
||||
cashierOrder.setOilOrderId(oilOrder2.getId());
|
||||
}
|
||||
@ -1221,6 +1227,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
}
|
||||
this.updateOilOrder(oilOrder);
|
||||
if (oilOrder.getOrderStatus().equals("paid")) {
|
||||
if (ObjectUtil.isNotEmpty(oilOrder.getUserId())) integralSettingsService.refuelPoints(oilOrder);
|
||||
this.updateCardAndActiveById(oilOrder.getStoreId(), oilOrder.getUserId(), oilOrder.getActiveId(), oilOrder.getCouponId(), oilOrder.getActiveType(), oilOrder.getOrderAmount(), Integer.valueOf(oilOrder.getOils()));
|
||||
}
|
||||
|
||||
@ -1268,6 +1275,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
// oilOrder.setPayAmount(oilOrder.getOrderAmount()-oilOrder.getDiscountAmount());
|
||||
oilOrder.setOrderStatus(status);
|
||||
if (status.equals("paid")){
|
||||
if (ObjectUtil.isNotEmpty(oilOrder.getUserId())) integralSettingsService.refuelPoints(oilOrder);
|
||||
oilOrder.setPayTime(new Date());
|
||||
CardValueChildOrder cardValueChildOrder = cardValueChildOrderService.selectCardValueChildOrderByOrderNo(orderNo);
|
||||
if (ObjectUtil.isNotEmpty(cardValueChildOrder)){
|
||||
@ -1386,31 +1394,44 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
LJStore store = storeService.selectStoreByStoreId(storeId);
|
||||
UserBalance balance = userBalanceService.selectUserBalance(userid,store.getChainStoreId());
|
||||
int growth = balance.getGrowthValue();
|
||||
if (refuelMoney==null){
|
||||
// if (refuelMoney==null){
|
||||
// String refuelMoney1 = balance.getRefuelMoney();
|
||||
// if (ObjectUtil.isNotEmpty(refuelMoney1) && ObjectUtil.isNotEmpty(refuelMoney)){
|
||||
// JSONArray objects = JSONArray.parseArray(refuelMoney);
|
||||
// JSONArray objects1 = JSONArray.parseArray(refuelMoney1);
|
||||
// List<RefuelMoney> list = new ArrayList<>();
|
||||
// for (int i = 0;i<objects.size();i++){
|
||||
// if (((JSONObject)objects.get(i)).get("oilType").toString().equals(oilId)){
|
||||
// RefuelMoney refuelMoney2 = new RefuelMoney();
|
||||
// refuelMoney2.setType(((JSONObject) objects.get(i)).get("type").toString());
|
||||
// refuelMoney2.setOilType(((JSONObject) objects.get(i)).get("oilType").toString());
|
||||
// refuelMoney2.setRefuelMoney(((JSONObject) objects.get(i)).get("refuelMoney").toString());
|
||||
// list.add(refuelMoney2);
|
||||
// Double oilBalance = 0.0;
|
||||
// Double afterOilBalance = 0.0;
|
||||
// if (!refuelMoney1.equals(refuelMoney)){
|
||||
// oilBalance = Double.valueOf(((JSONObject) objects1.get(i)).get("refuelMoney").toString()) - Double.valueOf(((JSONObject) objects.get(i)).get("refuelMoney").toString());
|
||||
// afterOilBalance = Double.valueOf(((JSONObject) objects.get(i)).get("refuelMoney").toString());
|
||||
// this.insertOilBalance(userid,storeId,oilName.getId().toString(),oilName.getOilType(),oilBalance,afterOilBalance,orderNo);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// balance.setRefuelMoney(JSONObject.toJSONString(list));
|
||||
// }
|
||||
// }else {
|
||||
// balance.setRefuelMoney(refuelMoney);
|
||||
// }
|
||||
if (ObjectUtil.isNotEmpty(refuelMoney)){
|
||||
String refuelMoney1 = balance.getRefuelMoney();
|
||||
if (StringUtils.isNotEmpty(refuelMoney1) && !"null".equals(refuelMoney1) && StringUtils.isNotEmpty(refuelMoney)){
|
||||
JSONArray objects = JSONArray.parseArray(refuelMoney);
|
||||
JSONArray objects1 = JSONArray.parseArray(refuelMoney1);
|
||||
List<RefuelMoney> list = new ArrayList<>();
|
||||
for (int i = 0;i<objects.size();i++){
|
||||
if (((JSONObject)objects.get(i)).get("oilType").toString().equals(oilId)){
|
||||
RefuelMoney refuelMoney2 = new RefuelMoney();
|
||||
refuelMoney2.setType(((JSONObject) objects.get(i)).get("type").toString());
|
||||
refuelMoney2.setOilType(((JSONObject) objects.get(i)).get("oilType").toString());
|
||||
refuelMoney2.setRefuelMoney(((JSONObject) objects.get(i)).get("refuelMoney").toString());
|
||||
list.add(refuelMoney2);
|
||||
Double oilBalance = 0.0;
|
||||
Double afterOilBalance = 0.0;
|
||||
if (!refuelMoney1.equals(refuelMoney)){
|
||||
oilBalance = Double.valueOf(((JSONObject) objects1.get(i)).get("refuelMoney").toString()) - Double.valueOf(((JSONObject) objects.get(i)).get("refuelMoney").toString());
|
||||
afterOilBalance = Double.valueOf(((JSONObject) objects.get(i)).get("refuelMoney").toString());
|
||||
this.insertOilBalance(userid,storeId,oilName.getId().toString(),oilName.getOilType(),oilBalance,afterOilBalance,orderNo);
|
||||
}
|
||||
}
|
||||
JSONArray objects = JSONArray.parseArray(refuelMoney);
|
||||
JSONArray objects1 = JSONArray.parseArray(refuelMoney1);
|
||||
for (int i = 0;i<objects1.size();i++){
|
||||
if (!((JSONObject)objects1.get(i)).get("refuelMoney").toString().equals(((JSONObject)objects.get(i)).get("refuelMoney").toString())){
|
||||
Double oilBalance = Double.valueOf(((JSONObject) objects1.get(i)).get("refuelMoney").toString()) - Double.valueOf(((JSONObject) objects.get(i)).get("refuelMoney").toString());
|
||||
Double afterOilBalance = Double.valueOf(((JSONObject) objects.get(i)).get("refuelMoney").toString());
|
||||
this.insertOilBalance(userid,storeId,oilName.getId().toString(),oilName.getOilType(),oilBalance,afterOilBalance,orderNo);
|
||||
}
|
||||
balance.setRefuelMoney(JSONObject.toJSONString(list));
|
||||
}
|
||||
}else {
|
||||
balance.setRefuelMoney(refuelMoney);
|
||||
}
|
||||
// 查询会员等级列表信息
|
||||
|
@ -91,8 +91,8 @@ public class ChainStoreInfoServiceImpl extends ServiceImpl<ChainStoreInfoMapper,
|
||||
public boolean theJudgmentIsTheSame(Integer chainStoreId) {
|
||||
if (ObjectUtil.isEmpty(chainStoreId)) return false;
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
if (ObjectUtil.isEmpty(nowAccountInfo)) return true;
|
||||
if (ObjectUtil.isEmpty(nowAccountInfo.getChainStoreId())) return true;
|
||||
if (ObjectUtil.isEmpty(nowAccountInfo)) return false;
|
||||
if (ObjectUtil.isEmpty(nowAccountInfo.getChainStoreId())) return false;
|
||||
|
||||
System.out.println("nowAccount"+nowAccountInfo.toString());
|
||||
if (nowAccountInfo.getChainStoreId().equals(chainStoreId)) {
|
||||
|
@ -93,4 +93,5 @@ public interface LJUserMapper extends BaseMapper<LJUser> {
|
||||
Integer userNum(Integer storeId);
|
||||
|
||||
|
||||
List<LJUserVo> getUserCountList(LJUserVo user);
|
||||
}
|
||||
|
@ -86,7 +86,9 @@
|
||||
LEFT JOIN mt_user_balance mub ON mu.id = mub.mt_user_id
|
||||
left join oil_order oo on mu.id = oo.user_id
|
||||
<where>
|
||||
oo.create_time <= DATE_SUB(NOW(), INTERVAL ${user.days} DAY)
|
||||
<if test="user.days != null and user.days != ''">
|
||||
oo.create_time <= DATE_SUB(NOW(), INTERVAL ${user.days} DAY)
|
||||
</if>
|
||||
<if test="user.chainStoreId != null and user.chainStoreId != ''">
|
||||
and mub.chain_store_id = #{user.chainStoreId}
|
||||
</if>
|
||||
@ -286,6 +288,14 @@
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="getUserCountList" resultType="com.fuint.business.userManager.vo.LJUserVo">
|
||||
select mug.`name` gradeName,mug.id gradeId
|
||||
from mt_user_balance mub
|
||||
left join mt_user_grade mug on mub.grade_id = mug.id
|
||||
where mug.id = #{gradeId}
|
||||
and mub.store_id = #{storeId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectUserById" resultType="com.fuint.business.userManager.vo.LJUserVo"
|
||||
parameterType="java.lang.Integer">
|
||||
|
@ -20,6 +20,7 @@ public interface LJUserService extends IService<LJUser> {
|
||||
public IPage<LJUserVo> selectUserList(Page page, LJUserVo user);
|
||||
public IPage<LJUserVo> getUserList(Page page, LJUserVo user);
|
||||
public List<LJUserVo> getUserLists(LJUserVo user);
|
||||
public List<LJUserVo> getUserCountList(LJUserVo user);
|
||||
|
||||
Integer userNum(Integer storeId);
|
||||
|
||||
|
@ -171,7 +171,7 @@ public class CertifiedMemberServiceImpl extends ServiceImpl<CertifiedMemberMappe
|
||||
queryWrapper.eq("mobile",certifiedMember.getMobile());
|
||||
queryWrapper.eq("store_id",nowAccountInfo.getStoreId());
|
||||
CertifiedMember member = baseMapper.selectOne(queryWrapper);
|
||||
if (ObjectUtil.isNotEmpty(member)){
|
||||
if (member.getId()!=certifiedMember.getId()){
|
||||
row = 0;
|
||||
return row;
|
||||
}
|
||||
|
@ -38,6 +38,8 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
||||
private UserBalanceMapper userBalanceMapper;
|
||||
@Autowired
|
||||
private ILJStoreService storeService;
|
||||
@Resource
|
||||
private LJUserMapper ljUserMapper;
|
||||
|
||||
/**
|
||||
* 根据条件分页查询会员信息
|
||||
@ -84,6 +86,15 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
||||
return userLists;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LJUserVo> getUserCountList(LJUserVo user) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
Integer storeId = nowAccountInfo.getStoreId();
|
||||
user.setStoreId(storeId);
|
||||
List<LJUserVo> userCountList = ljUserMapper.getUserCountList(user);
|
||||
return userCountList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer userNum(Integer storeId) {
|
||||
// 构建查询条件
|
||||
|
@ -46,7 +46,7 @@ public class MtUserGradeChildServiceImpl extends ServiceImpl<MtUserGradeChildMap
|
||||
@Override
|
||||
public List<MtUserGradeChild> selectListByUserId(Integer userId,Integer storeId) {
|
||||
LJUserVo userVo = userService.queryUserById(userId, storeId);
|
||||
LJStore store = storeService.selectStoreById();
|
||||
LJStore store = storeService.selectStoreByStoreId(storeId);
|
||||
ChainStoreConfig chainStoreConfig = chainStoreConfigService.selectChainStoreById(store.getChainStoreId());
|
||||
String isEnableLevel = chainStoreConfig.getIsEnableLevel();
|
||||
if (isEnableLevel.equals("yes")){
|
||||
|
@ -81,6 +81,8 @@ public class LJUserVo extends BaseEntity {
|
||||
// 等级ID
|
||||
private Integer gradeId;
|
||||
|
||||
private String gradeName;
|
||||
|
||||
// 储值卡
|
||||
@ExcelProperty(value = "储值卡余额")
|
||||
private Double cardBalance;
|
||||
|
@ -156,7 +156,7 @@ public class AlipayController extends BaseController {
|
||||
// 获取支付宝userid
|
||||
AlipaySystemOauthTokenResponse alipayProfile = alipayService.getAlipayProfile(authCode);
|
||||
if (ObjectUtil.isEmpty(alipayProfile)) {
|
||||
return getSuccessResult("false");
|
||||
return getSuccessResult(false);
|
||||
}
|
||||
|
||||
// 判断是否为未登录状态下支付
|
||||
@ -178,7 +178,7 @@ public class AlipayController extends BaseController {
|
||||
return getSuccessResult(true);
|
||||
}
|
||||
|
||||
if (ObjectUtil.isEmpty(alipayProfile.getUserId())) return getSuccessResult("false");
|
||||
if (ObjectUtil.isEmpty(alipayProfile.getUserId())) return getSuccessResult(false);
|
||||
|
||||
String userId = alipayProfile.getUserId();
|
||||
|
||||
@ -190,15 +190,15 @@ public class AlipayController extends BaseController {
|
||||
if (ObjectUtil.isNotEmpty(ljUser) && ObjectUtil.isNotEmpty(ljUser.getUserId())){
|
||||
|
||||
if (ljUser.getUserId().equals(userId)) {
|
||||
return getSuccessResult("true");
|
||||
return getSuccessResult(true);
|
||||
|
||||
}
|
||||
|
||||
}else {
|
||||
return getSuccessResult("false");
|
||||
return getSuccessResult(false);
|
||||
}
|
||||
|
||||
return getSuccessResult("false");
|
||||
return getSuccessResult(false);
|
||||
}
|
||||
|
||||
|
||||
|
@ -30,17 +30,30 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="交班时间">
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="dateRange"-->
|
||||
<!-- style="width: 240px"-->
|
||||
<!-- size="medium"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- type="daterange"-->
|
||||
<!-- range-separator="-"-->
|
||||
<!-- clearable-->
|
||||
<!-- start-placeholder="开始日期"-->
|
||||
<!-- end-placeholder="结束日期"-->
|
||||
<!-- ></el-date-picker>-->
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
size="medium"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
clearable
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
v-model="beginTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="开始日期">
|
||||
</el-date-picker>
|
||||
至
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
@ -133,6 +146,8 @@ export default {
|
||||
},
|
||||
loading: false,
|
||||
dateRange: [new Date(),new Date()],
|
||||
beginTime:new Date(),
|
||||
endTime:new Date(),
|
||||
defaultSort: {prop: 'createTime', order: 'descending'},
|
||||
|
||||
total: 0,
|
||||
@ -153,6 +168,11 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getList(){
|
||||
this.dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
getHandoverListApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
this.dataList = res.data.records
|
||||
this.total = res.data.total
|
||||
@ -201,6 +221,8 @@ export default {
|
||||
pageSize:10
|
||||
},
|
||||
this.dateRange = []
|
||||
this.beginTime = ""
|
||||
this.endTime = ""
|
||||
this.getList();
|
||||
},
|
||||
printLocally(data) {
|
||||
|
@ -1243,12 +1243,11 @@ import {getLodop} from "@/api/LodopFuncs";
|
||||
this.handleQuery1();
|
||||
},
|
||||
changeCreditAmount(){
|
||||
if (this.title = "新增挂账单位") {
|
||||
if (!this.form1.id) {
|
||||
this.form1.usedCreditLimit = 0
|
||||
this.form1.residueCreditLimit = this.form1.creditLimit
|
||||
}
|
||||
if (this.title = "修改挂账单位") {
|
||||
this.form1.usedCreditLimit = this.form1.creditLimit - this.form1.residueCreditLimit
|
||||
}else {
|
||||
this.form1.residueCreditLimit = this.form1.creditLimit - this.form1.usedCreditLimit
|
||||
}
|
||||
},
|
||||
addUnit(){
|
||||
@ -1639,8 +1638,8 @@ import {getLodop} from "@/api/LodopFuncs";
|
||||
this.$refs["formName"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form1.id){
|
||||
if (this.form1.creditLimit < this.form1.residueCreditLimit){
|
||||
this.$modal.msgError("请确保预设挂账额度大于剩余挂账额度");
|
||||
if (this.form1.creditLimit < this.form1.usedCreditLimit || this.form1.residueCreditLimit < 0){
|
||||
this.$modal.msgError("请确保预设挂账额度大于已使用挂账额度");
|
||||
return ;
|
||||
}
|
||||
editCreditUnit(this.form1).then(res => {
|
||||
|
@ -53,130 +53,131 @@
|
||||
<div class="hj-box" style="border-left: 1px solid #d1d1d4; border-right: 1px solid #d1d1d4;">商品:¥{{ goodsAmount.toFixed(2) }}</div>
|
||||
<div class="hj-box" style="justify-content: flex-end">合计: ¥{{ (oilAmount + goodsAmount).toFixed(2) }}</div>
|
||||
</div>
|
||||
<div class="center-left-hj">
|
||||
<div>
|
||||
<el-popover
|
||||
placement="bottom-start"
|
||||
width="400"
|
||||
trigger="click">
|
||||
<div>
|
||||
<div v-if="fullReduceDiscount.length>0">
|
||||
<el-checkbox-group v-model="checkedCities1" @change="handleCheckedCitiesChange1">
|
||||
<el-checkbox v-for="(item,index) in fullReduceDiscount" :label="item.gunName" :key="index">
|
||||
<div style="display: flex;justify-content: space-between;height: 40px;line-height: 40px;">
|
||||
<div style="width: 200px">{{ getName(oilNameList,item.oilName) }}_{{getName1(gunList,item.gunName)}}</div>
|
||||
<div style="line-height: 20px;width:150px;font-size: 12px;text-align: right">
|
||||
<div style="color: red">-¥{{ item.discount }}</div>
|
||||
<div style="color: grey" v-if="item.type!=1">满减优惠</div>
|
||||
<div style="color: grey" v-if="item.type!=2">折扣优惠</div>
|
||||
<div style="overflow-y: scroll;height: 42vh">
|
||||
<div class="center-left-hj">
|
||||
<div>
|
||||
<el-popover
|
||||
placement="bottom-start"
|
||||
width="400"
|
||||
trigger="click">
|
||||
<div>
|
||||
<div v-if="fullReduceDiscount.length>0">
|
||||
<el-checkbox-group v-model="checkedCities1" @change="handleCheckedCitiesChange1">
|
||||
<el-checkbox v-for="(item,index) in fullReduceDiscount" :label="item.gunName" :key="index">
|
||||
<div style="display: flex;justify-content: space-between;height: 40px;line-height: 40px;">
|
||||
<div style="width: 200px">{{ getName(oilNameList,item.oilName) }}_{{getName1(gunList,item.gunName)}}</div>
|
||||
<div style="line-height: 20px;width:150px;font-size: 12px;text-align: right">
|
||||
<div style="color: red">-¥{{ item.discount }}</div>
|
||||
<div style="color: grey" v-if="item.type!=1">满减优惠</div>
|
||||
<div style="color: grey" v-if="item.type!=2">折扣优惠</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
<div v-else>
|
||||
暂无满减油品信息
|
||||
</div>
|
||||
</div>
|
||||
<div slot="reference">
|
||||
<el-checkbox :disabled="fullReduceDiscount.length==0"
|
||||
style="color: black;font-size: 16px"
|
||||
v-model="checkAll1" @change="handleCheckAllChange1">
|
||||
</el-checkbox><!--:indeterminate="isIndeterminate1"-->
|
||||
活动优惠
|
||||
</div>
|
||||
</el-popover>
|
||||
</div>
|
||||
<div>-¥{{ fullReduction.toFixed(2) }}</div>
|
||||
</div>
|
||||
<div class="center-left-hj" v-show="isMember">
|
||||
<div>
|
||||
<el-popover
|
||||
placement="bottom-start"
|
||||
width="400"
|
||||
trigger="click">
|
||||
<div>
|
||||
<el-checkbox-group v-model="checkedCities2" @change="handleCheckedCitiesChange2">
|
||||
<el-checkbox v-for="(item,index) in gradeDiscount" :label="item.gunName" :key="index">
|
||||
<div style="display: flex;justify-content: space-between;height: 40px;line-height: 40px;">
|
||||
<div style="width: 200px">{{ getName(oilNameList,item.oilName) }}_{{getName1(gunList,item.gunName)}}</div>
|
||||
<div style="line-height: 20px;width:150px;font-size: 12px;text-align: right">
|
||||
<div style="color: red">-¥{{ item.discount }}</div>
|
||||
<!-- <div v-if="item.type=='满减优惠'" style="color: grey">消费满{{ item.full }}元,立减{{ item.reduce }}元</div>-->
|
||||
<!-- <div v-else style="color: grey">消费满{{ item.full }}元,每升优惠{{ item.liters }}元</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
<div v-else>
|
||||
暂无满减油品信息
|
||||
<div slot="reference">
|
||||
<el-checkbox
|
||||
style="color: black;font-size: 16px"
|
||||
v-model="checkAll2" @change="handleCheckAllChange2">
|
||||
</el-checkbox><!-- :indeterminate="isIndeterminate2"-->
|
||||
等级优惠
|
||||
</div>
|
||||
</div>
|
||||
<div slot="reference">
|
||||
<el-checkbox :disabled="fullReduceDiscount.length==0"
|
||||
style="color: black;font-size: 16px"
|
||||
v-model="checkAll1" @change="handleCheckAllChange1">
|
||||
</el-checkbox><!--:indeterminate="isIndeterminate1"-->
|
||||
活动优惠
|
||||
</div>
|
||||
</el-popover>
|
||||
</div>
|
||||
<div>-¥{{ fullReduction.toFixed(2) }}</div>
|
||||
</div>
|
||||
<div class="center-left-hj" v-show="isMember && gradeDiscount.length>0">
|
||||
<div>
|
||||
<el-popover
|
||||
placement="bottom-start"
|
||||
width="400"
|
||||
trigger="click">
|
||||
<div>
|
||||
<el-checkbox-group v-model="checkedCities2" @change="handleCheckedCitiesChange2">
|
||||
<el-checkbox v-for="(item,index) in gradeDiscount" :label="item.gunName" :key="index">
|
||||
<div style="display: flex;justify-content: space-between;height: 40px;line-height: 40px;">
|
||||
<div style="width: 200px">{{ getName(oilNameList,item.oilName) }}_{{getName1(gunList,item.gunName)}}</div>
|
||||
<div style="line-height: 20px;width:150px;font-size: 12px;text-align: right">
|
||||
<div style="color: red">-¥{{ item.discount }}</div>
|
||||
<!-- <div v-if="item.type=='满减优惠'" style="color: grey">消费满{{ item.full }}元,立减{{ item.reduce }}元</div>-->
|
||||
<!-- <div v-else style="color: grey">消费满{{ item.full }}元,每升优惠{{ item.liters }}元</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
<div slot="reference">
|
||||
<el-checkbox
|
||||
style="color: black;font-size: 16px"
|
||||
v-model="checkAll2" @change="handleCheckAllChange2">
|
||||
</el-checkbox><!-- :indeterminate="isIndeterminate2"-->
|
||||
等级优惠
|
||||
</div>
|
||||
</el-popover>
|
||||
</div>
|
||||
<div>-¥{{ oilDiscount.toFixed(2) }}</div>
|
||||
</div>
|
||||
<div class="center-left-hj" v-show="isMember && refuelMoney1.length>0">
|
||||
<div>
|
||||
<el-checkbox
|
||||
style="color: black;font-size: 16px"
|
||||
v-model="checkAll3" @change="handleCheckAllChange3">
|
||||
</el-checkbox><!--:indeterminate="isIndeterminate3"-->
|
||||
囤油卡
|
||||
<div style="margin: 5px 0" v-for="(item,index) in refuelMoney1" :key="index">
|
||||
({{ item.type }}卡
|
||||
<!-- <span style="color: #00afff">{{ item.oilType }}</span>-->
|
||||
余额:{{ item.refuelMoney }}L)
|
||||
</el-popover>
|
||||
</div>
|
||||
<div>-¥{{ oilDiscount.toFixed(2) }}</div>
|
||||
</div>
|
||||
<div>- {{ consumeRefuelMoney.toFixed(2) }}L</div>
|
||||
</div>
|
||||
<div class="center-left-hj" v-show="isMember">
|
||||
<div>
|
||||
<el-checkbox style="color: black;font-size: 16px" :disabled="balance==0"
|
||||
v-model="checkAll4" @change="handleCheckAllChange4">
|
||||
</el-checkbox>
|
||||
储值卡
|
||||
<span>(账户余额:{{ balance }}元)</span>
|
||||
</div>
|
||||
<div>-¥{{ consumeAmount.toFixed(2) }}</div>
|
||||
</div>
|
||||
<div class="center-left-hj" v-show="isMember && couponDiscount.length>0">
|
||||
<div>
|
||||
<el-popover
|
||||
placement="bottom-start"
|
||||
width="400"
|
||||
trigger="click">
|
||||
<!-- <div>-->
|
||||
<!-- <el-radio-group v-model="checkedCities5" @input="handleCheckedCitiesChange5">-->
|
||||
<!-- <el-radio v-for="(item,index) in couponDiscount"-->
|
||||
<!-- :label="item.gunName" :key="index" style="display: flex;">-->
|
||||
<!-- <div style="display: flex;justify-content: space-between;height: 40px;line-height: 40px;">-->
|
||||
<!-- <div style="width: 200px">{{ getName(oilNameList,item.oilName) }}_{{getName1(gunList,item.gunName)}}</div>-->
|
||||
<!-- <div style="line-height: 20px;width:150px;font-size: 12px;text-align: right">-->
|
||||
<!-- <div style="color: red">-¥{{ item.discount }}</div>-->
|
||||
<!--<!– <div style="color: grey">满{{ item.full }}元,减{{ item.reduce }}元</div>–>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-radio>-->
|
||||
<!-- </el-radio-group>-->
|
||||
<!-- </div>-->
|
||||
<div slot="reference">
|
||||
<el-checkbox
|
||||
style="color: black;font-size: 16px"
|
||||
v-model="checkAll5" @change="handleCheckAllChange5">
|
||||
</el-checkbox><!-- :indeterminate="isIndeterminate5"-->
|
||||
优惠券
|
||||
<div class="center-left-hj" v-show="isMember && refuelMoney && refuelMoney.length>0">
|
||||
<div>
|
||||
<el-checkbox
|
||||
style="color: black;font-size: 16px"
|
||||
v-model="checkAll3" @change="handleCheckAllChange3">
|
||||
</el-checkbox><!--:indeterminate="isIndeterminate3"-->
|
||||
囤油卡
|
||||
<div style="margin: 5px 0" v-for="(item,index) in refuelMoney" :key="index">
|
||||
({{ item.type }}卡
|
||||
<!-- <span style="color: #00afff">{{ item.oilType }}</span>-->
|
||||
余额:{{ item.refuelMoney ? item.refuelMoney : 0.00 }}L)
|
||||
</div>
|
||||
</el-popover>
|
||||
</div>
|
||||
<div>- {{ consumeRefuelMoney.toFixed(2) }}L</div>
|
||||
</div>
|
||||
<div>-¥{{ couponAmount.toFixed(2) }}</div>
|
||||
</div>
|
||||
<div class="center-left-th">
|
||||
<div class="center-left-hj" v-show="isMember">
|
||||
<div>
|
||||
<el-checkbox style="color: black;font-size: 16px" :disabled="balance==0"
|
||||
v-model="checkAll4" @change="handleCheckAllChange4">
|
||||
</el-checkbox>
|
||||
储值卡
|
||||
<span>(账户余额:{{ balance }}元)</span>
|
||||
</div>
|
||||
<div>-¥{{ consumeAmount.toFixed(2) }}</div>
|
||||
</div>
|
||||
<div class="center-left-hj" v-show="isMember && couponDiscount.length>0">
|
||||
<div>
|
||||
<el-popover
|
||||
placement="bottom-start"
|
||||
width="400"
|
||||
trigger="click">
|
||||
<!-- <div>-->
|
||||
<!-- <el-radio-group v-model="checkedCities5" @input="handleCheckedCitiesChange5">-->
|
||||
<!-- <el-radio v-for="(item,index) in couponDiscount"-->
|
||||
<!-- :label="item.gunName" :key="index" style="display: flex;">-->
|
||||
<!-- <div style="display: flex;justify-content: space-between;height: 40px;line-height: 40px;">-->
|
||||
<!-- <div style="width: 200px">{{ getName(oilNameList,item.oilName) }}_{{getName1(gunList,item.gunName)}}</div>-->
|
||||
<!-- <div style="line-height: 20px;width:150px;font-size: 12px;text-align: right">-->
|
||||
<!-- <div style="color: red">-¥{{ item.discount }}</div>-->
|
||||
<!--<!– <div style="color: grey">满{{ item.full }}元,减{{ item.reduce }}元</div>–>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-radio>-->
|
||||
<!-- </el-radio-group>-->
|
||||
<!-- </div>-->
|
||||
<div slot="reference">
|
||||
<el-checkbox
|
||||
style="color: black;font-size: 16px"
|
||||
v-model="checkAll5" @change="handleCheckAllChange5">
|
||||
</el-checkbox><!-- :indeterminate="isIndeterminate5"-->
|
||||
优惠券
|
||||
</div>
|
||||
</el-popover>
|
||||
</div>
|
||||
<div>-¥{{ couponAmount.toFixed(2) }}</div>
|
||||
</div>
|
||||
<div class="center-left-th">
|
||||
<div class="th-box">
|
||||
<div>扫码支付</div>
|
||||
<div class="bule">{{ ((+oilActualPay) + (+goodsActualPay)).toFixed(2) }}</div>
|
||||
@ -190,6 +191,7 @@
|
||||
<div style="cursor: pointer;color: crimson" @click="getStaffList" >{{ staff.realName }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-posi">
|
||||
<div class="center-left-wrap">
|
||||
@ -247,7 +249,7 @@
|
||||
@click="refuel(item)">
|
||||
<div>{{ getName(oilNameList,getOilNames(oilNumberList,item.numberId)) }}</div>
|
||||
<!-- <div>{{ getOilNames(oilNumberList,item.numberId) }}</div>-->
|
||||
<!-- <div>{{ item.oilNumber }}</div>-->
|
||||
<!-- <div>{{ item.oilNumber }</div>-->
|
||||
|
||||
<div class="of-title" >{{item.gunName}}</div>
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
@ -569,11 +571,11 @@
|
||||
<span style="font-weight: bold">¥{{member.cardBalance ? member.cardBalance : "0"}}</span>
|
||||
</template>
|
||||
<el-descriptions-item label="账户余额">{{member.cardBalance ? member.cardBalance : 0}}元</el-descriptions-item>
|
||||
<el-descriptions-item label="囤油卡余额">
|
||||
<el-descriptions-item label="囤油卡余额" v-if="refuelMoney">
|
||||
<div style="margin: 5px 0" v-for="(item,index) in refuelMoney" :key="index">
|
||||
{{ item.type }}卡
|
||||
<!-- <span style="color: #00afff">{{ item.oilType }}</span>-->
|
||||
余额:{{ item.refuelMoney }}L;
|
||||
余额:{{ item.refuelMoney ? item.refuelMoney : 0.00 }}L;
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
@ -918,11 +920,7 @@
|
||||
</el-dialog>
|
||||
|
||||
<!-- 加油枪加油金额-->
|
||||
<el-dialog
|
||||
title="加油金额"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="dialogVisibleamount"
|
||||
width="30%">
|
||||
<el-dialog title="加油金额" :close-on-click-modal="false" :visible.sync="dialogVisibleamount" width="30%">
|
||||
<div class="amount">
|
||||
<span>已选油品</span>
|
||||
<span class="amountBlue">{{ getName(oilNameList,form.oilName) }}</span>
|
||||
@ -1427,7 +1425,7 @@
|
||||
{value:"¥300"},
|
||||
],
|
||||
// 会员信息
|
||||
member:{},
|
||||
member:{id:""},
|
||||
// 会员等级信息
|
||||
grade:{},
|
||||
// 会员列表信息
|
||||
@ -1631,7 +1629,7 @@
|
||||
this.getStaff();
|
||||
this.getList();
|
||||
this.getCouponList();
|
||||
this.getUnitList();
|
||||
// this.getUnitList();
|
||||
},
|
||||
directives: {
|
||||
// 注册一个局部的自定义指令 v-focus
|
||||
@ -1673,7 +1671,6 @@
|
||||
// realName: data.realName,
|
||||
// staffMobile: data.staffMobile,
|
||||
// },
|
||||
// console.log('Received data in parent:', data);
|
||||
|
||||
this.cardFuelDieselForm.mtStaffId = data.mtStaffId
|
||||
this.cardFuelDieselForm.realName = data.realName
|
||||
@ -1706,9 +1703,7 @@
|
||||
await getCardValueListApi(quy).then(res => {
|
||||
this.cardValueList = res.data.records;
|
||||
this.cardValueList.sort((a, b) => a.rechargeBalance - b.rechargeBalance);
|
||||
// console.log("this.grade.name",this.grade)
|
||||
})
|
||||
// console.log("this.cardValueList", this.grade)
|
||||
|
||||
if (this.cardValueList.length > 0) {
|
||||
// 过滤
|
||||
@ -1761,7 +1756,6 @@
|
||||
},
|
||||
selectOilType(status, oilType) {
|
||||
this.tabOilType = oilType;
|
||||
// console.log("453",oilType)
|
||||
this.tabOilTypeClick(oilType);
|
||||
},
|
||||
// 会员充值
|
||||
@ -1788,7 +1782,6 @@
|
||||
// this.cardValueForm.amount = null
|
||||
this.$set(this.cardValueForm, 'amount', data);
|
||||
|
||||
// console.log("data17.16", this.cardValueForm.amount)
|
||||
if (!data) {
|
||||
this.cardValueForm.amount = ''
|
||||
|
||||
@ -1936,7 +1929,6 @@
|
||||
this_.isPay = false;
|
||||
this_.isPaySuccess = false;
|
||||
this_.isAwait = true;
|
||||
console.log("t3")
|
||||
}, 15000)
|
||||
|
||||
} else if (this.flag === 2) {
|
||||
@ -1955,7 +1947,6 @@
|
||||
actualPayment = this.authCode
|
||||
makeChange = this.seekZero
|
||||
}
|
||||
// console.log("cardFuelDieselForm",this.cardFuelDieselForm)
|
||||
this.cardFuelDieselForm.mtUserId = userForm.id
|
||||
this.cardFuelDieselForm.name = userForm.name
|
||||
this.cardFuelDieselForm.mobile = userForm.mobile
|
||||
@ -1963,7 +1954,6 @@
|
||||
this.cardFuelDieselForm.actualPayment = actualPayment
|
||||
this.cardFuelDieselForm.makeChange = makeChange
|
||||
|
||||
// console.log("this.cardFuelDieselForm",this.cardFuelDieselForm)
|
||||
|
||||
|
||||
let id;
|
||||
@ -2027,7 +2017,6 @@
|
||||
},
|
||||
// 选择余额充值金额
|
||||
rechargeCard(index, item) {
|
||||
// console.log("index", index)
|
||||
// this.cardValueForm.amount = null,
|
||||
this.cardValueForm.rechargeType = 0
|
||||
|
||||
@ -2061,7 +2050,6 @@
|
||||
this.cardValueForm.percentageCommissions = file.percentageCommissions
|
||||
this.cardValueForm.amountCommission = file.amountCommission
|
||||
|
||||
// console.log("file.royaltyType ", file.royaltyType )
|
||||
|
||||
// 计算员工提成金额
|
||||
if (file.royaltyType === "3") {
|
||||
@ -2077,7 +2065,6 @@
|
||||
},
|
||||
// 根据油品过滤查询存油卡
|
||||
async tabOilTypeClick(data) {
|
||||
// console.log("aaaaaaaaaaaaaa",data)
|
||||
await this.getCardFuelDieselList()
|
||||
|
||||
this.cardFuelDieselList = this.sourceCardFuelDieselList.filter(item => {
|
||||
@ -2145,7 +2132,6 @@
|
||||
let file = {}
|
||||
// 拿到金额
|
||||
file = this.cardFuelDieselList[index]
|
||||
// console.log("file",file)
|
||||
this.cardFuelDieselForm.points = file.points
|
||||
this.cardFuelDieselForm.rechargeBalance = file.rechargeBalance
|
||||
this.cardFuelDieselForm.oilType = file.oilType
|
||||
@ -2276,7 +2262,6 @@
|
||||
|
||||
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||
// let preview = LODOP.PREVIEW();
|
||||
// console.log("preview",preview);
|
||||
LODOP.PRINT();
|
||||
}
|
||||
}catch (e){
|
||||
@ -2290,7 +2275,6 @@
|
||||
}
|
||||
//初始化打印函数
|
||||
let LODOP = getLodop(); // 初始化打印
|
||||
console.log(LODOP)
|
||||
if (LODOP) {
|
||||
LODOP.PRINT_INIT();
|
||||
var bodyStyle = `<style>
|
||||
@ -2370,7 +2354,6 @@
|
||||
|
||||
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||
// let preview = LODOP.PREVIEW();
|
||||
// console.log("preview",preview);
|
||||
LODOP.PRINT();
|
||||
}
|
||||
|
||||
@ -2535,16 +2518,18 @@
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
addHangBill(this.form1).then( async response => {
|
||||
if (response.data==0){
|
||||
this.$modal.msgError("挂账单位可用额度不足,无法进行挂账");
|
||||
}else {
|
||||
if (response.data==1){
|
||||
await this.addOrder();
|
||||
this.$modal.msgSuccess("挂账记录添加成功");
|
||||
this.dialogVisibleCredit = false;
|
||||
this.printLocally()
|
||||
this.form1.unitName = ""
|
||||
this.payType = "WECHAT"
|
||||
this.resetMember();
|
||||
this.resetting();
|
||||
this.empty();
|
||||
}else {
|
||||
this.$modal.msgError("挂账单位可用额度不足,无法进行挂账");
|
||||
}
|
||||
})
|
||||
}else {
|
||||
@ -2552,6 +2537,34 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
// 添加挂账订单信息
|
||||
async addOrder() {
|
||||
this.map.seekZero = this.seekZero;
|
||||
this.map.oilAmount = this.oilAmount;
|
||||
this.map.payType = this.payType;
|
||||
this.map.goodsAmount = this.goodsAmount;
|
||||
this.map.oilActualPay = this.oilActualPay;
|
||||
this.map.goodsActualPay = this.goodsActualPay;
|
||||
this.map.oilDiscount = 0.0;
|
||||
this.map.goodsDiscount = 0.0;
|
||||
this.map.goodsNum = this.goodsTotal;
|
||||
this.map.balanceAmount = 0.0;
|
||||
this.map.oilCardAmount = 0.0;
|
||||
this.map.oilOrder = JSON.stringify(this.oilOrder);
|
||||
this.map.goodsOrder = JSON.stringify(this.goodsOrder);
|
||||
this.map.authCode = this.authCode;
|
||||
this.map.allAmount = +this.oilActualPay + +this.goodsActualPay
|
||||
this.map.consumeAmount = 0.0;
|
||||
this.map.refuelMoney = JSON.stringify(this.refuelMoney)
|
||||
this.map.couponId = this.useCouponIds
|
||||
this.map.staffId = this.staff.id
|
||||
this.map.cardFavorableId = this.cardFavorableId
|
||||
this.map.recordId = this.recordId
|
||||
this.map.userId = this.member.id
|
||||
await addLJGoods(this.map).then(response => {
|
||||
|
||||
})
|
||||
},
|
||||
// 选择挂账单位
|
||||
changeUnit(val){
|
||||
this.form1.creditUnitId = val.id;
|
||||
@ -2559,11 +2572,12 @@
|
||||
this.form1.residueCreditLimit = val.residueCreditLimit
|
||||
return val.id
|
||||
},
|
||||
querySearch1(queryString, cb) {
|
||||
async querySearch1(queryString, cb) {
|
||||
await this.getUnitList();
|
||||
let _this = this;
|
||||
let obj = {};
|
||||
let results = _this.unitList
|
||||
if (queryString != "" && queryString!=undefined){
|
||||
if (queryString){
|
||||
results = [];
|
||||
_this.unitList.forEach(item => {
|
||||
if (item.unitName.includes(queryString)){
|
||||
@ -2702,6 +2716,8 @@
|
||||
if (this.goodsOrder.length==0) {
|
||||
this.payType = "balance"
|
||||
}
|
||||
}else {
|
||||
this.payType = "WECHAT"
|
||||
}
|
||||
}else {
|
||||
this.checkAll4 = false
|
||||
@ -2859,18 +2875,19 @@
|
||||
this.oilPreferentialData = []
|
||||
},
|
||||
// 根据会员等级信息获取等级优惠信息
|
||||
getGrade(userId,gradeId){
|
||||
async getGrade(userId,gradeId){
|
||||
this.isFixingLevel = false
|
||||
let _this = this;
|
||||
this.oilDiscount = 0;
|
||||
this.gradeDiscount = [];
|
||||
userGradeInfo({userId:userId,gradeId:gradeId,storeId:""}).then(response => {
|
||||
await userGradeInfo({userId:userId,gradeId:gradeId,storeId:""}).then(response => {
|
||||
let gasolineDiscount = 0;
|
||||
let dieselDiscount = 0;
|
||||
let naturalGasDiscount = 0;
|
||||
_this.gradeDiscount = [];
|
||||
if (response.data) {
|
||||
_this.oilOrder.forEach(item => {
|
||||
|
||||
let discount = {type:"",discount:0,oilName:item.oilName,gunName:item.gunName}
|
||||
if (item.type == "汽油") {
|
||||
if (response.data.fixingLevel){
|
||||
@ -3071,21 +3088,12 @@
|
||||
this.map.payUser = data.mobile;
|
||||
this.map.userId = data.id;
|
||||
this.balance = this.member.cardBalance;
|
||||
await this.getGrade(this.member.id,this.member.gradeId)
|
||||
if (data.refuelMoney){
|
||||
// 使用囤油卡
|
||||
this.refuelMoney = JSON.parse(data.refuelMoney)
|
||||
await this.changeRefuelMoney();
|
||||
}
|
||||
// await this.getGrade(data.id,data.gradeId)
|
||||
// if (!this.isFixingLevel){
|
||||
// this.preferentialData.storeId = this.storeId;
|
||||
// this.preferentialData.userId = data.id;
|
||||
// this.preferentialData.gradeId = data.gradeId;
|
||||
// if (this.oilOrder.length>0){
|
||||
// this.preferential();
|
||||
// this.getCoupon();
|
||||
// }
|
||||
// }
|
||||
if (this.balance>0 && this.oilAmount>0 && !this.isOilStorageCard){
|
||||
this.checkAll4 = true
|
||||
if (this.goodsOrder.length==0){
|
||||
@ -3093,7 +3101,6 @@
|
||||
}
|
||||
this.countAmountFull()
|
||||
}
|
||||
await this.getGrade(this.member.id,this.member.gradeId)
|
||||
if (!this.isFixingLevel && !this.isOilStorageCard){
|
||||
await this.getOilCoupon()
|
||||
}
|
||||
@ -3287,15 +3294,16 @@
|
||||
this.checkAll4 = true
|
||||
if (this.balance!=0 && this.balance >= this.hoardAmount){
|
||||
this.oilActualPay = 0
|
||||
this.consumeAmount = this.hoardAmount
|
||||
this.consumeAmount = 0
|
||||
}else {
|
||||
this.oilActualPay = (this.hoardAmount -this.balance).toFixed(2)
|
||||
this.oilActualPay = (this.hoardAmount - this.balance).toFixed(2)
|
||||
this.consumeAmount = this.balance
|
||||
}
|
||||
}else {
|
||||
this.oilActualPay = 0
|
||||
this.consumeAmount = 0
|
||||
}
|
||||
console.log("使用囤油卡",this.hoardAmount)
|
||||
},
|
||||
// 不使用囤油卡
|
||||
countAmountFull(){
|
||||
@ -3348,7 +3356,9 @@
|
||||
isDefaultUseCard(){
|
||||
if (this.isOilStorageCard){
|
||||
this.checkAll3 = true;
|
||||
this.payType = "oilCard"
|
||||
if (this.goodsOrder.length==0){
|
||||
this.payType = "oilCard"
|
||||
}
|
||||
this.checkAll1 = false;
|
||||
this.fullReduction = 0;
|
||||
this.checkAll2 = false;
|
||||
@ -3443,6 +3453,7 @@
|
||||
this.goodsAmount = 0;
|
||||
this.goodsActualPay = 0;
|
||||
this.goodsDiscount = 0;
|
||||
|
||||
},
|
||||
// 获取当前账户信息
|
||||
getStaff(){
|
||||
@ -3468,7 +3479,7 @@
|
||||
let result = true;
|
||||
let goods = this.goodsOrder;
|
||||
let _this = this;
|
||||
this.goodsDiscount = 0
|
||||
// this.goodsDiscount = 0
|
||||
if (this.goodsOrder.length > 0) {
|
||||
let amount = 0;
|
||||
for (let i = 0; i < goods.length; i++) {
|
||||
@ -3479,6 +3490,8 @@
|
||||
break;
|
||||
}
|
||||
goods[i].num = goods[i].num + 1;
|
||||
goods[i].retailPrice = val.retailPrice;
|
||||
goods[i].memberPrice = val.memberPrice;
|
||||
val.num = goods[i].num + 1;
|
||||
this.goodsTotal += 1;
|
||||
if (_this.isMember) {
|
||||
@ -3489,7 +3502,6 @@
|
||||
break;
|
||||
} else {
|
||||
result = true;
|
||||
console.log(265)
|
||||
}
|
||||
}
|
||||
// this.goodsAmount = amount;
|
||||
@ -3506,7 +3518,6 @@
|
||||
if (_this.isMember) {
|
||||
this.goodsDiscount += (val.retailPrice - val.memberPrice)
|
||||
}
|
||||
console.log(this.goodsAmount,847)
|
||||
this.goodsAmount += +val.retailPrice
|
||||
this.goodsActualPay = this.goodsAmount - this.goodsDiscount;
|
||||
this.goodsOrder.push(val);
|
||||
@ -3594,7 +3605,7 @@
|
||||
async getOilOrder(){
|
||||
this.dialogVisibleamount = false
|
||||
this.form.oilType = this.oilNameID;
|
||||
// this.form.type = this.type;
|
||||
this.form.type = this.type;
|
||||
let amount = this.form.amount || 0;
|
||||
// 计算油的升数
|
||||
if (this.select == "元"){
|
||||
@ -3605,6 +3616,7 @@
|
||||
this.form.amount = (this.form.oilPrice * amount).toFixed(2)
|
||||
}
|
||||
|
||||
if (this.form.tankId)
|
||||
// 校验油罐内油是否足够
|
||||
await getOilTank(this.form.tankId).then(async res => {
|
||||
if (res.data.storedQuantity-this.form.liters<0){
|
||||
@ -3630,13 +3642,8 @@
|
||||
this.oilTotal = this.oilOrder.length;
|
||||
this.select = "元";
|
||||
if (this.isMember){
|
||||
// this.getGrade(this.member.id,this.member.gradeId)
|
||||
// this.changeRefuelMoney();
|
||||
// if (this.oilOrder.length>0){
|
||||
// this.preferential();
|
||||
// this.getCoupon();
|
||||
// }
|
||||
|
||||
await this.getGrade(this.member.id,this.member.gradeId)
|
||||
if (this.refuelMoney){
|
||||
// 使用囤油卡
|
||||
await this.changeRefuelMoney();
|
||||
@ -3648,7 +3655,6 @@
|
||||
}
|
||||
this.countAmountFull()
|
||||
}
|
||||
await this.getGrade(this.member.id,this.member.gradeId)
|
||||
if (!this.isFixingLevel && !this.isOilStorageCard){
|
||||
await this.getOilCoupon()
|
||||
}
|
||||
@ -3666,15 +3672,19 @@
|
||||
_this.oilActualPay = 0;
|
||||
_this.hoardAmount = 0;
|
||||
_this.oilAmount = 0;
|
||||
_this.refuelMoney1 = []
|
||||
let hoardAmount1 = 0;
|
||||
_this.oilOrder.forEach(item => {
|
||||
let conRefMon = 0;
|
||||
let hoardAmount = 0;
|
||||
let amount = 0;
|
||||
let amount1 = 0;
|
||||
let id = ""
|
||||
if (_this.refuelMoney){
|
||||
for (let i = 0;i < _this.refuelMoney.length;i++){
|
||||
// 囤油卡升数变化
|
||||
if (_this.refuelMoney[i].oilType==item.oilName && _this.refuelMoney[i].refuelMoney>0){
|
||||
this.refuelMoney1.push(item)
|
||||
_this.refuelMoney1.push(item)
|
||||
id = item.id
|
||||
_this.isOilStorageCard = true
|
||||
if (_this.refuelMoney[i].refuelMoney >= item.liters){
|
||||
@ -3685,10 +3695,16 @@
|
||||
hoardAmount = item.amount - (_this.refuelMoney[i].refuelMoney * item.oilPrice).toFixed(2)
|
||||
}
|
||||
}
|
||||
if (_this.refuelMoney[i].oilType!=item.oilName){
|
||||
amount = item.amount
|
||||
}
|
||||
}
|
||||
}
|
||||
_this.consumeRefuelMoney += +conRefMon
|
||||
_this.hoardAmount += +hoardAmount
|
||||
console.log(hoardAmount,1254)
|
||||
hoardAmount1 += +hoardAmount
|
||||
amount1 += +amount
|
||||
_this.hoardAmount = hoardAmount1
|
||||
_this.oilAmount += +item.amount
|
||||
// _this.changeBalance(_this.hoardAmount,id)
|
||||
// if (_this.consumeRefuelMoney!=0){
|
||||
@ -3696,8 +3712,8 @@
|
||||
// _this.checkAll3 = true;
|
||||
// _this.consumeAmount = 0;
|
||||
// }
|
||||
_this.isDefaultUseCard();
|
||||
})
|
||||
_this.isDefaultUseCard();
|
||||
},
|
||||
changeBalance(hoardAmount,id){
|
||||
if (this.balance>0 && id != ""){
|
||||
@ -3765,6 +3781,10 @@
|
||||
// 根据手机号查询会员信息
|
||||
getUser(){
|
||||
if(this.select1=="会员手机号"){
|
||||
if (!this.userNo) {
|
||||
this.$message.error("请先输入手机号")
|
||||
return;
|
||||
}
|
||||
getUserInfoMobile({mobile:this.userNo}).then( response => {
|
||||
if (response.data!=null){
|
||||
this.member = response.data
|
||||
@ -3810,6 +3830,7 @@
|
||||
this.oilOrder.forEach(item => {
|
||||
if (item.id==data.id){
|
||||
this.amount = item.amount
|
||||
this.form = item
|
||||
result = true
|
||||
this.isExistOilOrder = true;
|
||||
}
|
||||
@ -4020,7 +4041,7 @@
|
||||
if (i.oilType==item.oilType){
|
||||
if ((i.refuelMoney-item.liters)>=0){
|
||||
let refuelMoney = i.refuelMoney;
|
||||
i.refuelMoney = refuelMoney-item.liters
|
||||
i.refuelMoney = (refuelMoney-item.liters).toFixed(2)
|
||||
}else {
|
||||
i.refuelMoney = 0
|
||||
}
|
||||
@ -4176,6 +4197,7 @@
|
||||
this.$message.error("商品不可使用囤油卡付款")
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.refuelMoney1.length>0){
|
||||
this.checkAll3 = true
|
||||
this.handleCheckAllChange3(true)
|
||||
@ -4206,6 +4228,12 @@
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (payType == 'APPLET_CODE'){
|
||||
if (this.goodsOrder.length>0){
|
||||
this.$message.error("商品不可使用储值卡付款")
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.typeIdex = payType
|
||||
this.map.payType = payType;
|
||||
this.payType = payType;
|
||||
|
@ -121,6 +121,7 @@
|
||||
<el-table-column type="index" width="50" align="center" label="序号"/>
|
||||
<el-table-column prop="orderNo" align="center" label="订单号" width="220"> </el-table-column>
|
||||
<el-table-column prop="amount" align="center" label="订单金额"> </el-table-column>
|
||||
<el-table-column prop="afterDiscountAmount" align="center" label="优惠后应付金额"> </el-table-column>
|
||||
<el-table-column prop="payAmount" align="center" label="实付金额"> </el-table-column>
|
||||
<el-table-column prop="seekZero" align="center" label="找零金额"> </el-table-column>
|
||||
<el-table-column align="center" label="订单金额组成">
|
||||
@ -240,6 +241,7 @@
|
||||
<span v-else-if="cashierOrder.payType == 'UNIONPAY'">银联二维码</span>
|
||||
<span v-else-if="cashierOrder.payType == 'oilCard'">囤油卡</span>
|
||||
<span v-else-if="cashierOrder.payType == 'balance'">储值卡</span>
|
||||
<span v-else-if="cashierOrder.payType == 'credit'">挂账</span>
|
||||
<span v-else>小程序码</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="付款状态">
|
||||
|
@ -150,7 +150,17 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="实付金额" align="center" prop="payAmount"/>
|
||||
<el-table-column label="付款用户" align="center" prop="payUser"/>
|
||||
<el-table-column label="付款类型" align="center" prop="payType">
|
||||
<el-table-column label="付款方式" align="center" prop="payType">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.payType=='credit'">挂账</span>
|
||||
<span v-else-if="scope.row.payType == 'CASH'">现金</span>
|
||||
<span v-else-if="scope.row.payType == 'WECHAT'">微信</span>
|
||||
<span v-else-if="scope.row.payType == 'ALIPAY'">支付宝</span>
|
||||
<span v-else-if="scope.row.payType == 'UNIONPAY'">银联二维码</span>
|
||||
<span v-else-if="scope.row.payType == '0'">兑换券核销</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="付款状态" align="center" prop="payType">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.status == 'unpaid'">未支付</el-tag>
|
||||
<el-tag type="success" v-else-if="scope.row.status == 'paid'">已支付</el-tag>
|
||||
|
@ -206,6 +206,7 @@
|
||||
<span>{{getType(payList,scope.row.payType)}}</span>
|
||||
<span v-if="scope.row.payType=='oilCard'">囤油卡</span>
|
||||
<span v-if="scope.row.payType=='balance'">储值卡</span>
|
||||
<span v-if="scope.row.payType=='credit'">挂账</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="orderStatus" label="付款状态" align="center" width="120">
|
||||
|
@ -86,9 +86,9 @@
|
||||
|
||||
<view class="station-title" style="display: flex;justify-content: space-between;">
|
||||
{{store.name}}{{store.description ? "("+store.description+")" : ""}}
|
||||
<!-- <view class="" @click="goChooseAddress" style="width: 22%;font-size: 14px;font-weight: 400;">
|
||||
<view class="" @click="goChooseAddress" style="width: 22%;font-size: 14px;font-weight: 400;">
|
||||
<view>切换位置 <uni-icons type="right" color="#304fff" size="16"></uni-icons> </view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view><!--顺通石化加油站(工业南路站)-->
|
||||
<view style="display: flex;">
|
||||
<view class="bule-icon" v-if="welfare.length!=0" v-for="(item,index) in welfare" :key="index">
|
||||
|
@ -547,17 +547,17 @@
|
||||
// if (!this.AppToken) {
|
||||
// return;
|
||||
// }
|
||||
// await request({
|
||||
// url: 'chainStoreInfo/theJudgmentIsTheSame',
|
||||
// method: 'get',
|
||||
// data: {
|
||||
// "chainStoreId": uni.getStorageSync("chainStoreId")
|
||||
// }
|
||||
// }).then(res => {
|
||||
// if (!res.data) {
|
||||
// uni.removeStorageSync("App-Token");
|
||||
// }
|
||||
// })
|
||||
await request({
|
||||
url: 'chainStoreInfo/theJudgmentIsTheSame',
|
||||
method: 'get',
|
||||
data: {
|
||||
"chainStoreId": uni.getStorageSync("chainStoreId")
|
||||
}
|
||||
}).then(res => {
|
||||
if (!res.data) {
|
||||
uni.removeStorageSync("App-Token");
|
||||
}
|
||||
})
|
||||
|
||||
if (uni.getStorageSync("appltType")== "WECHAT") {
|
||||
// 判断当前登录的code是否相同
|
||||
@ -573,8 +573,8 @@
|
||||
code: res.code,
|
||||
isRefuel: true,
|
||||
}
|
||||
}).then(res => {
|
||||
if (!res.data) {
|
||||
}).then(resp => {
|
||||
if (!resp.data) {
|
||||
uni.removeStorageSync("App-Token");
|
||||
}
|
||||
})
|
||||
@ -600,7 +600,7 @@
|
||||
isRefuel: true,
|
||||
},
|
||||
}).then((resp) => {
|
||||
if (!res.data) {
|
||||
if (!resp.data) {
|
||||
uni.removeStorageSync("App-Token");
|
||||
}
|
||||
})
|
||||
|
@ -55,14 +55,14 @@
|
||||
},
|
||||
// 获取支付宝userid
|
||||
getUserLogin(e) {
|
||||
// if (this.qindex == false) {
|
||||
// uni.showToast({
|
||||
// icon: "none",
|
||||
// title: "请阅读并勾选用户协议",
|
||||
// duration: 2000
|
||||
// })
|
||||
// return;
|
||||
// }
|
||||
if (this.qindex == false) {
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "请先阅读并勾选用户协议",
|
||||
duration: 2000
|
||||
})
|
||||
return;
|
||||
}
|
||||
console.log(e)
|
||||
|
||||
let _this = this;
|
||||
@ -124,14 +124,14 @@
|
||||
wxlogin() {},
|
||||
getPhone(e) {
|
||||
let that = this
|
||||
// if (this.privacyPolicyChecked == false) {
|
||||
// uni.showToast({
|
||||
// icon: "none",
|
||||
// title: "请阅读并勾选用户协议",
|
||||
// duration: 2000
|
||||
// })
|
||||
// return;
|
||||
// }
|
||||
if (this.privacyPolicyChecked == false) {
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "请先阅读并勾选用户协议",
|
||||
duration: 2000
|
||||
})
|
||||
return;
|
||||
}
|
||||
console.log(e)
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
|
@ -11,42 +11,44 @@
|
||||
:dots-styles="dotsStyles" field="content">
|
||||
<swiper class="swiper-box" @change="change" :current="swiperDotIndex">
|
||||
<swiper-item v-for="(item, index) in userGradeList" :key="index">
|
||||
<view class="top-box">
|
||||
<view>
|
||||
<view class="top-box">
|
||||
|
||||
<view class="b-top">
|
||||
<view style="width: 70%;">
|
||||
<view class="title-size">
|
||||
{{item.name}}
|
||||
<span v-if="member.gradeId==item.id">(当前等级)</span>
|
||||
<view class="b-top">
|
||||
<view style="width: 70%;">
|
||||
<view class="title-size">
|
||||
{{item.name}}
|
||||
<span v-if="member.gradeId==item.id">(当前等级)</span>
|
||||
</view>
|
||||
<view class="min-size" style="margin-bottom: 20px;">升级会员享更多特权</view>
|
||||
<!-- <view class="min-size" style="margin-bottom: 10px;" v-if="userBalance.gradeId == item.id && index < (userGradeList.length-1)">
|
||||
在获得{{item.growthValue - userBalance.growthValue}}可升级至{{userGradeList[index+1].name}}
|
||||
</view>
|
||||
<view class="min-size" style="margin-bottom: 10px;" v-else-if="userBalance.gradeId == item.id && index == (userGradeList.length-1)">
|
||||
已达到最高等级
|
||||
</view> -->
|
||||
<view class="min-size" style="margin-bottom: 10px;" >
|
||||
达到当前等级所需成长值为{{item.growthValue}}
|
||||
</view>
|
||||
<u-line-progress :percentage="percentage" activeColor="#2F72F7"></u-line-progress>
|
||||
</view>
|
||||
<view class="min-size" style="margin-bottom: 20px;">升级会员享更多特权</view>
|
||||
<!-- <view class="min-size" style="margin-bottom: 10px;" v-if="userBalance.gradeId == item.id && index < (userGradeList.length-1)">
|
||||
在获得{{item.growthValue - userBalance.growthValue}}可升级至{{userGradeList[index+1].name}}
|
||||
<view class="right-img">
|
||||
<image src="../../static/imgs/vipxz.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="min-size" style="margin-bottom: 10px;" v-else-if="userBalance.gradeId == item.id && index == (userGradeList.length-1)">
|
||||
已达到最高等级
|
||||
</view> -->
|
||||
<view class="min-size" style="margin-bottom: 10px;" >
|
||||
达到当前等级所需成长值为{{item.growthValue}}
|
||||
</view>
|
||||
<u-line-progress :percentage="percentage" activeColor="#2F72F7"></u-line-progress>
|
||||
</view>
|
||||
<view class="right-img">
|
||||
<image src="../../static/imgs/vipxz.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- qy -->
|
||||
<view class="c-box">
|
||||
<!-- <view class="title-bai">会员权益</view> -->
|
||||
<view class="wrap-box">
|
||||
<!-- qy -->
|
||||
<view class="c-box">
|
||||
<!-- <view class="title-bai">会员权益</view> -->
|
||||
<view class="wrap-box">
|
||||
|
||||
|
||||
<view class="box-ba" v-for="(item,index) in oilNameList" :key="index">
|
||||
<view class="min-box">
|
||||
<image :src="item.imgurl" mode="aspectFit"></image>
|
||||
<view class="box-ba" v-for="(item,index) in oilNameList" :key="index">
|
||||
<view class="min-box">
|
||||
<image :src="item.imgurl" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="mu_">{{item.name}}</view>
|
||||
</view>
|
||||
<view class="mu_">{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -316,7 +318,7 @@
|
||||
}
|
||||
|
||||
.swiper-box {
|
||||
height: 500px;
|
||||
height: 50vh;
|
||||
}
|
||||
|
||||
.content {
|
||||
|
@ -345,6 +345,19 @@
|
||||
// _this.goBack()
|
||||
return;
|
||||
}
|
||||
if(res.data.code=="error"){
|
||||
request({
|
||||
url: "/business/allOrderInfo/orderStatus",
|
||||
method: 'post',
|
||||
data: {"orderNo":_this.orderNo,"status":"payFail"},
|
||||
}).then((ress)=>{})
|
||||
uni.showToast({
|
||||
title:res.data.msg,
|
||||
icon:"none"
|
||||
})
|
||||
// _this.goBack()
|
||||
return;
|
||||
}
|
||||
if(res.data.success == "ok"){
|
||||
// _this.preferentialData.storeId = _this.oilOrder.storeId
|
||||
// _this.preferentialData.orderAmount = _this.oilOrder.orderAmount
|
||||
|
Loading…
Reference in New Issue
Block a user