Merge remote-tracking branch 'origin/master'

This commit is contained in:
齐天大圣 2024-03-04 13:37:46 +08:00
commit 2acc8efe2c
29 changed files with 811 additions and 351 deletions

View File

@ -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'
})
}

View File

@ -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',

View File

@ -816,12 +816,18 @@ export default {
id:row.id
}
looklook(data).then(res=>{
this.looklist = res.data
if(res.data){
this.looklist = res.data
}
console.log('详情',res)
})
looklooklook(row.id).then(resp=>{
this.statisticsyou = resp.data
if( resp.data){
this.statisticsyou = resp.data
}
console.log('优惠券详情统计',resp)
})
},

View File

@ -71,8 +71,6 @@
<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>
@ -101,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"
@ -110,11 +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="Deleteshan(scope.row)"
v-if="scope.row.isonline == 1"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
@ -124,6 +132,47 @@
/>
</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">
@ -138,7 +187,6 @@
</div>
<div style="width: 25%;display: flex; align-items: center;">
<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>-->
@ -172,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>
@ -219,14 +263,17 @@
<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:''},
@ -490,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', {
@ -509,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>

View File

@ -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,17 +209,16 @@
<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>
</el-card>
</div>
</el-dialog>
<el-card>
<el-table v-loading="loading" :data="activeFullminusList" @selection-change="handleSelectionChange">
<el-table-column
@ -230,6 +269,12 @@
@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"
@ -237,10 +282,24 @@
@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>
@ -373,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"
@ -393,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,
@ -438,7 +540,7 @@ export default {
//
showSearch: true,
//
total: 0,
ztotal: 0,
//
activeNewlywedsList: [],
//
@ -498,16 +600,16 @@ export default {
},
created() {
this.getList()
// this.handleUpdate();
},
methods: {
/** 查询新人有礼活动列表 */
getList() {
this.loading = true;
getActiveNewlyweds(1).then(res=>{
this.activeFullminusList = res.data;
this.total = res.data.total;
console.log(res)
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;
@ -699,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;
@ -722,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){
@ -750,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();
});
}
}
});
},
/** 提交按钮 */
@ -807,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>

View File

@ -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"

View File

@ -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>-->
<!-- &lt;!&ndash; <span class="addr">{{ item.memberPrice }}</span>&ndash;&gt;-->
<!-- </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, listSuppliers} 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:'',
@ -385,13 +434,19 @@ export default {
{ required: true, message: "请选择是否能使用积分抵扣", trigger: "blur" },
],
supplierId: [
{ required: true, message: "请选择供应商", trigger: "blur" },
{ required: true, message: "请选择供应商", trigger: "change" },
],
status: [
{ required: true, message: "请选择商品状态", trigger: "blur" },
],
},
//
rules2: {
name: [
{ required: true, message: "供应商名称不能为空", trigger: "blur" },
],
}
};
},
@ -402,6 +457,35 @@ 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){
listSuppliers({ifDelete:'0'}).then(response => {
this.supplierList = response.data
@ -469,15 +553,14 @@ export default {
selectSupplier(data){
this.supplier = data.name;
this.form1.supplierId = data.id
this.$set(this.form1,'supplierId',data.id)
// this.$forceUpdate()
},
addSupplier(val){
// console.log(val,222)
if (!val){
return;
}
addSupplier({name:val,remark:"添加商品自动添加",ifDelete:'0'}).then(async res => {
// console.log(res)
if (res.data == 1) {
this.supplier = val;
this.$modal.msgSuccess("已为您自动添加此供应商")
@ -487,7 +570,6 @@ export default {
},
//
submitForm1: function() {
console.log(this.form1.supplierId,8274)
this.$refs["form1"].validate(valid => {
if (valid) {
if (this.form1) {

View File

@ -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);

View File

@ -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);

View File

@ -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())

View File

@ -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();

View File

@ -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()
},

View File

@ -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 = {

View File

@ -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="创建时间">-->
<!--&lt;!&ndash; <el-date-picker&ndash;&gt;-->
<!--&lt;!&ndash; v-model="dateRange"&ndash;&gt;-->
<!--&lt;!&ndash; style="width: 240px"&ndash;&gt;-->
<!--&lt;!&ndash; size="medium"&ndash;&gt;-->
<!--&lt;!&ndash; value-format="yyyy-MM-dd"&ndash;&gt;-->
<!--&lt;!&ndash; type="daterange"&ndash;&gt;-->
<!--&lt;!&ndash; range-separator="-"&ndash;&gt;-->
<!--&lt;!&ndash; start-placeholder="开始日期"&ndash;&gt;-->
<!--&lt;!&ndash; end-placeholder="结束日期"&ndash;&gt;-->
<!--&lt;!&ndash; ></el-date-picker>&ndash;&gt;-->
<!-- <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())

View File

@ -439,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());

View File

@ -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>

View File

@ -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);

View File

@ -108,7 +108,7 @@ public class IntegralSettingsServiceImpl implements IntegralSettingsService {
refuelConsumptionAmountMap.put("oilName", oilNumber.getOilName() + oilNumber.getOilType());
refuelConsumptionAmountMap.put("amount", 0);
refuelConsumptionAmountMap.put("integral", 0);
refuelConsumptionAmountMap.put("oilNameId", oilNumber.getId());
refuelConsumptionAmountMap.put("oilNameId",oilNumber.getId());
refuelConsumptionAmountList.add(refuelConsumptionAmountMap);
}
String refuelConsumptionAmount = JSON.toJSONString(refuelConsumptionAmountList);

View File

@ -123,7 +123,7 @@ public class CardFuelRecord extends BaseEntity {
/**
* 支付编号
*/
private String paymentNo;
private String paymentNo;
/**
* 油卡类型 0汽油卡 1柴油卡 2天然气
*/

View File

@ -277,6 +277,8 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
@Autowired
private RedisLock redisLock;
@Autowired
private StaffCommissionService staffCommissionService;
private static String beforeLitres = new String("0");
/**
* 查询支付状态 修改相关关联表
@ -311,8 +313,10 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
// 积分表变动
if (!ObjectUtil.isEmpty(cardFuelRecord.getPoints()) && cardFuelRecord.getPoints() != 0) {
IntegralDetail integralDetail = changesInPoints(cardFuelRecord,ljUserVos);
integralDetailService.insert2(integralDetail);
integralDetailService.insert2(integralDetail);
}
// 员工提成
staffCommissionService.countStaffCommission(cardFuelRecord.getMtStaffId(),cardFuelRecord.getStoreId(),cardFuelRecord.getRechargeBalance(),cardFuelRecord.getRechargeBalance(),"4",cardFuelRecord.getPaymentNo());
CardFuelRecord editCardFuelRecord = new CardFuelRecord();
editCardFuelRecord.setId(id);

View File

@ -109,7 +109,11 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
@Resource
private CommissionRecordService commissionRecordService;
@Resource
private CardValueRecordMapper cardValueRecordMapper;
StaffCommissionService staffCommissionService;
@Resource
CardValueRecordMapper cardValueRecordMapper;
@Resource
RocketUtil rocketUtil;
@Resource
private MtStaffMapper mtStaffMapper;
@Resource
@ -128,8 +132,6 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
private ILJStoreService storeService;
@Resource
private MtUserGradeChildService userGradeChildService;
@Resource
private StaffCommissionService staffCommissionService;
/**
* 储值卡充值新增
@ -469,7 +471,9 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
CardValueRecord cardValueRecord = baseMapper.selectById(id);
if (ObjectUtil.isEmpty(cardValueRecord.getMtStaffId())) {
cardValueRecord.setMtStaffId(nowAccountInfo.getStaffId());
}
String lockKey = "CardValueRecord"+nowAccountInfo.getStoreId()+id;
Boolean isLock = redisLock.tryLock(lockKey, 5000, TimeUnit.MILLISECONDS);
// 支付成功之后
@ -526,10 +530,12 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
growthValueChangeService.insertGrowthValueChange(growthValueChange);
}
// 员工提成
if (ObjectUtil.isNotEmpty(cardValueRecord.getMtStaffId()) && !ObjectUtil.isEmpty(cardValueRecord.getRoyaltyType()) && !"1".equals(cardValueRecord.getRoyaltyType())) {
CommissionRecord commissionRecord = employeeCommissions(cardValueRecord);
commissionRecordService.insert2(commissionRecord);
}
// if (ObjectUtil.isNotEmpty(cardValueRecord.getMtStaffId()) && !ObjectUtil.isEmpty(cardValueRecord.getRoyaltyType()) && !"1".equals(cardValueRecord.getRoyaltyType())) {
// if (ObjectUtil.isNotEmpty(cardValueRecord.getMtStaffId())) {
// CommissionRecord commissionRecord = employeeCommissions(cardValueRecord);
// commissionRecordService.insert2(commissionRecord);
staffCommissionService.countStaffCommission(cardValueRecord.getMtStaffId(),cardValueRecord.getStoreId(),cardValueRecord.getBidBalance(),cardValueRecord.getRechargeBalance(),"3",cardValueRecord.getPaymentNo());
// }
//员工信息
LJStaff ljStaff = mtStaffService.selectStaffById(cardValueRecord.getMtStaffId());
// 处理赠送兑换券或者其他

View File

@ -28,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;
@ -335,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;
}
@ -493,7 +495,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
cashierOrder.setAfterDiscountAmount(oilAmount+goodsAmount-oilDiscount-goodsDiscount);
// 如果金额不等于0调用第三方支付接口
if (!map.get("allAmount").equals("0") && !map.get("payType").equals("CASH") || !payType.equals("credit")){
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);
@ -1392,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);
}
// 查询会员等级列表信息

View File

@ -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)) {

View File

@ -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;
}

View File

@ -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) {

View File

@ -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 && 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
</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>-->
<!--&lt;!&ndash; <div style="color: grey">{{ item.full }}{{ item.reduce }}</div>&ndash;&gt;-->
<!-- </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>-->
<!--&lt;!&ndash; <div style="color: grey">{{ item.full }}{{ item.reduce }}</div>&ndash;&gt;-->
<!-- </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">
@ -2873,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){
@ -3085,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){
@ -3107,7 +3101,6 @@
}
this.countAmountFull()
}
await this.getGrade(this.member.id,this.member.gradeId)
if (!this.isFixingLevel && !this.isOilStorageCard){
await this.getOilCoupon()
}
@ -3301,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(){
@ -3611,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 == "元"){
@ -3622,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){
@ -3647,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();
@ -3665,7 +3655,6 @@
}
this.countAmountFull()
}
await this.getGrade(this.member.id,this.member.gradeId)
if (!this.isFixingLevel && !this.isOilStorageCard){
await this.getOilCoupon()
}
@ -3684,10 +3673,10 @@
_this.hoardAmount = 0;
_this.oilAmount = 0;
_this.refuelMoney1 = []
let hoardAmount1 = 0;
_this.oilOrder.forEach(item => {
let conRefMon = 0;
let hoardAmount = 0;
let hoardAmount1 = 0;
let amount = 0;
let amount1 = 0;
let id = ""
@ -3712,9 +3701,10 @@
}
}
_this.consumeRefuelMoney += +conRefMon
console.log(hoardAmount,1254)
hoardAmount1 += +hoardAmount
amount1 += +amount
_this.hoardAmount = hoardAmount1 + amount1
_this.hoardAmount = hoardAmount1
_this.oilAmount += +item.amount
// _this.changeBalance(_this.hoardAmount,id)
// if (_this.consumeRefuelMoney!=0){
@ -3722,8 +3712,8 @@
// _this.checkAll3 = true;
// _this.consumeAmount = 0;
// }
_this.isDefaultUseCard();
})
_this.isDefaultUseCard();
},
changeBalance(hoardAmount,id){
if (this.balance>0 && id != ""){
@ -3791,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

View File

@ -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

View File

@ -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',

View File

@ -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