Merge remote-tracking branch 'origin/master'

This commit is contained in:
@QQNZX 2024-01-04 09:06:45 +08:00
commit 0ecf231fd5
50 changed files with 1202 additions and 553 deletions

View File

@ -9,6 +9,14 @@ export function listFixingLevel(query) {
})
}
// 根据id查询所有固定等级信息
export function allFixingLevel() {
return request({
url: '/business/userManager/fixingLevel/allFixingLevel',
method: 'get',
})
}
// 查询固定等级详细
export function getFixingLevel(id) {
return request({

View File

@ -14,9 +14,9 @@
<el-select v-model="queryParams.oilType" clearable placeholder="请选择">
<el-option
v-for="dict in oilList"
:key="dict.oilName"
:key="dict.id"
:label="dict.oilName"
:value="dict.oilName">
:value="dict.id">
</el-option>
</el-select>
<el-select v-model="queryParams.activeStatus" placeholder="请选择" style="margin:0px 20px">
@ -167,10 +167,8 @@
<el-select v-model="ruleForm.oilType" placeholder="请选择" >
<el-option
v-for="dict in oilList"
:key="dict.id.toString()"
:label="dict.oilName"
:value="dict.id.toString()">
</el-option>
</el-select>

View File

@ -268,16 +268,31 @@
<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-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%"
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>
@ -316,7 +331,7 @@
import {cvsGoodsTree, selectTree} from "@/api/convenienceStore/goods";
import {listSupplier} from "@/api/convenienceStore/supplier";
import {addSupplier, listSupplier} from "@/api/convenienceStore/supplier";
import {
addLJGoods,
createGoodsNo,
@ -338,6 +353,8 @@ export default {
dicts: ['zhzt','yes_or_no'],
data(){
return {
//
supplier:"",
// id
cvsGoodId:"",
cvsGoodOptions:[],
@ -424,15 +441,47 @@ export default {
created() {
this.getList();
this.getQueryList();
this.getSuppilers();
this.getType();
this.getTree();
},
computed:{
},
methods:{
//
querySearch(queryString, cb) {
let _this = this;
let results = _this.supplierList;
if (queryString != ""){
results = [];
let falg = false;
_this.supplierList.forEach(item => {
if(item.name.includes(queryString)){
results.push(item)
falg = true
}
})
if (!falg){
}
}
cb(results);
},
//
selectSupplier(data){
console.log(data)
this.supplier = data.name;
this.form.supplierId = data.id
console.log(data,this.form)
},
addSupplier(val){
// console.log(val,222)
addSupplier({name:val,remark:"添加商品自动添加"}).then(res => {
// console.log(res)
if (res.data==1){
this.$modal.msgSuccess("已为您自动添加此供应商")
this.getSuppilers(val)
}
})
},
//
getTree(){
@ -520,8 +569,17 @@ export default {
selectTree().then(response => {
this.cvsGoodList = response.data.records
});
},
getSuppilers(val){
listSupplier().then(response => {
this.supplierList = response.data.records
if (val){
this.supplierList.forEach(item => {
if (item.name = val){
this.form.supplierId = item.id
}
})
}
})
},
//
@ -582,10 +640,14 @@ export default {
},
//
handleAdd() {
this.reset();
this.open = true;
this.isAdd = false;
this.title = "新增商品";
if (this.cvsGoodList.length>0){
this.reset();
this.open = true;
this.isAdd = false;
this.title = "新增商品";
}else {
this.$modal.msgError("请先添加商品分类")
}
},
//
handleUpdate(row) {

View File

@ -256,17 +256,15 @@ export default {
this.getList();
});
} else {
querySupplier({name:this.form.name}).then( response => {
if(response.data!=null){
this.$modal.msgError("供应商名称已存在");
addSupplier(this.form).then(response => {
if (response.data==1){
this.$modal.msgSuccess("供应商新增成功");
this.open = false;
this.getList();
}else {
addSupplier(this.form).then(response => {
this.$modal.msgSuccess("供应商新增成功");
this.open = false;
this.getList();
});
this.$modal.msgError("供应商名称已存在");
}
})
});
}
}
});

File diff suppressed because one or more lines are too long

View File

@ -167,7 +167,7 @@
<el-table-column label="会员ID" prop="id" align="center" width="60"/>
<el-table-column label="头像" align="center" width="70">
<template slot-scope="scope">
<img v-if="scope.row.avatar" class="list-avatar" :src="scope.row.avatar">
<img v-if="scope.row.avatar" class="list-avatar" :src="baseUrl + scope.row.avatar">
<img v-else class="list-avatar" src="@/assets/images/avatar.png">
</template>
</el-table-column>
@ -464,6 +464,7 @@ export default {
dicts: ['official','zhzt'],
data() {
return {
baseUrl:process.env.VUE_APP_BASE_API,
result:{},
//
isUpload:false,

View File

@ -49,7 +49,9 @@
</el-descriptions-item>
<el-descriptions-item label="固定等级">
<span style="color: #00afff" @click="level">
<dict-tag :options="dict.type.zcrzdj" :value="form.fixingLevel"/></span>
{{form.fixingLevel ? fixingLevelinfo(fixingLevelList,form.fixingLevel) : "--"}}
<!-- <dict-tag :options="dict.type.zcrzdj" :value="form.fixingLevel"/>-->
</span>
</el-descriptions-item>
<el-descriptions-item label="备注信息">{{ form.description ? form.description : "--" }}</el-descriptions-item>
</el-descriptions>
@ -651,11 +653,17 @@
style="width: 240px"
>
<el-option
v-for="dict in dict.type.zcrzdj"
:key="dict.value"
:label="dict.label"
:value="dict.value"
v-for="item in fixingLevelList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
<!-- <el-option-->
<!-- v-for="dict in dict.type.zcrzdj"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
</el-select>
</el-form-item>
</el-col>
@ -687,6 +695,7 @@ import pointsRecord from "@/views/member/userInfoOrder/pointsRecord.vue";
import couponList from "@/views/member/userInfoOrder/couponList.vue";
import growthValueRecord from "@/views/member/userInfoOrder/growthValueRecord.vue";
import refuelMoneyRecord from "@/views/member/userInfoOrder/refuelMoneyRecord.vue";
import {allFixingLevel, getFixingLevel} from "@/api/staff/user/fixinglevel";
export default {
components: {
@ -708,7 +717,7 @@ export default {
data(){
return{
flag:null,
fixingLevelList:[],
//
cardValueList:[],
cardValueForm: {
@ -843,8 +852,27 @@ export default {
this.id = this.$route.query.id;
this.getUserInfo();
this.getInformation();
this.getFixingLevelList();
},
methods: {
fixingLevelinfo(list,id){
let name = "";
list.forEach(item => {
if(item.id = id){
name = item.name;
}
})
return name;
},
//
getFixingLevelList(){
allFixingLevel().then(res => {
if (res.code == 200){
this.fixingLevelList = res.data
console.log(res.data)
}
})
},
//
chooseStaff(){
this.openStaff = true
@ -917,7 +945,7 @@ export default {
}else {
this.cardValueForm.amount = data
}
this.cardValueForm.points = ''
this.cardValueForm.bidBalance =''
@ -1203,7 +1231,7 @@ export default {
this.$message.error('请先扫码');
return
}
if (this.flag === 1) {
// id
this.cardValueForm.mtUserId = userForm.id

View File

@ -104,8 +104,8 @@
<div class="hsize">:规则按照顺序进行处理并自动更换支付通道新增或变更规则后需要发布当前规则才生效,发布生效后的规则将从序号1的配置生效</div>
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%">
<el-form :model="form1" ref="form1" >
<el-form-item label="支付通道" :label-width="formLabelWidth" width="300px">
<el-form :model="form1" ref="form1" :rules="rules" >
<el-form-item label="支付通道" :label-width="formLabelWidth" prop="merchantName" width="300px">
<el-select
v-model="form1.merchantName"
placeholder="全部"
@ -120,10 +120,10 @@
/>
</el-select>
</el-form-item>
<el-form-item label="商户号" :label-width="formLabelWidth">
<el-form-item label="商户号" :label-width="formLabelWidth" prop="mchntCd" >
<el-input v-model="form1.mchntCd" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="备注" :label-width="formLabelWidth">
<el-form-item label="备注" :label-width="formLabelWidth" prop="remark" >
<el-input v-model="form1.remark" autocomplete="off"></el-input>
</el-form-item>
</el-form>
@ -242,7 +242,7 @@ export default {
desc: ''
},
form1:{},
formLabelWidth: '70px',
formLabelWidth: '80px',
dialogFormVisible:false,
dialogVisible:false,
show:false,
@ -252,7 +252,12 @@ export default {
title:"",
merchantConfig:{},
rules:{
merchantName: [
{ required: true, message: '请选择支付通道', trigger: 'blur' },
],
mchntCd: [
{ required: true, message: '请填写商户号', trigger: 'blur' },
],
}
}
},

View File

@ -61,17 +61,17 @@
<el-table-column label="ID" align="center" prop="id" width="80" />
<el-table-column label="姓名" align="center" prop="realName" />
<el-table-column label="手机号" align="center" prop="mobile" width="110"/>
<el-table-column label="核销权限" align="center" prop="writeOff">
</el-table-column>
<el-table-column label="特殊权限" align="center" prop="specialPrem">
</el-table-column>
<el-table-column label="退款权限" align="center" prop="refund">
<template slot-scope="scope">
<dict-tag :options="dict.type.ywqx" :value="scope.row.refund"/>
</template>
</el-table-column>
<!-- <el-table-column label="核销权限" align="center" prop="writeOff"/>-->
<!-- <el-table-column label="特殊权限" align="center" prop="specialPrem">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{scope.row.specialPrem ? scope.row.specialPrem : "&#45;&#45;"}}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="退款权限" align="center" prop="refund">-->
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :options="dict.type.ywqx" :value="scope.row.refund"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="核销码" align="center" prop="writeOffCode">-->
<!-- <template slot-scope="scope">-->
<!-- <span @click="getQRcode(scope.row.writeOffCode,'woc')">-->
@ -92,11 +92,14 @@
<el-tag type="info" v-if="scope.row.status=='jy'">禁用</el-tag>
</template>
</el-table-column>
<el-table-column label="公众号" align="center" prop="official">
<template slot-scope="scope">
<dict-tag :options="dict.type.official" :value="scope.row.official"/>
</template>
</el-table-column>
<!-- <el-table-column label="公众号" align="center" prop="official">-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="scope.row.official">-->
<!-- <dict-tag :options="dict.type.official" :value="scope.row.official"/>-->
<!-- </span>-->
<!-- <span v-else>&#45;&#45;</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="一键加油" align="center" prop="isRefuel">
<template slot-scope="scope">
<dict-tag :options="dict.type.display" :value="scope.row.isRefuel"/>
@ -145,7 +148,7 @@
</el-card>
<!-- 添加或修改对话框 -->
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="60%" append-to-body>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="50%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<el-col :span="8">
@ -158,6 +161,8 @@
<el-input v-model="form.mobile" placeholder="请输入联系人电话" maxlength="30"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="角色组" prop="roleId">
<el-select v-model="form.roleId" placeholder="请选择角色">
@ -167,30 +172,36 @@
<!-- :label="item.dutyName"-->
<!-- :value="item.dutyId"-->
<!-- ></el-option>-->
<el-option value="普通员工">普通员工</el-option>
<el-option value="收银员">收银员</el-option>
<el-option
v-for="dict in dict.type.staff_role"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
<!-- <el-option value="普通员工">普通员工</el-option>-->
<!-- <el-option value="收银员">收银员</el-option>-->
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<!-- </el-row>-->
<!-- <el-row>-->
<el-col :span="8">
<el-form-item label="登录密码" prop="password">
<el-input v-model="form.password" type="password" placeholder="请输入登录密码" maxlength="30"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="退款权限" prop="refund">
<el-select v-model="form.refund" placeholder="请选择权限">
<el-option
v-for="dict in dict.type.ywqx"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="8">-->
<!-- <el-form-item label="退款权限" prop="refund">-->
<!-- <el-select v-model="form.refund" placeholder="请选择权限">-->
<!-- <el-option-->
<!-- v-for="dict in dict.type.ywqx"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="退款密码" prop="refundPassword">-->
<!-- <el-input v-model="form.refundPassword" type="password" placeholder="请输入退款密码" maxlength="30"/>-->
@ -198,30 +209,30 @@
<!-- </el-col>-->
</el-row>
<el-row>
<el-col :span="8" style="display: flex;margin-bottom: 20px">
<template>
<span style="margin-right: 10px">核销权限</span>
<el-checkbox-group v-model="writeOff" ref="" @change="getCheckbox">
<el-checkbox
v-for="dict in dict.type.write_off"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-checkbox>
</el-checkbox-group>
</template>
</el-col>
<el-col :span="16" style="display: flex">
<span style="margin-right: 10px">特殊权限</span>
<el-checkbox-group v-model="specialPrem" @change="getCheckbox">
<el-checkbox
v-for="dict in dict.type.special_prem"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-checkbox>
</el-checkbox-group>
</el-col>
<!-- <el-col :span="8" style="display: flex;margin-bottom: 20px">-->
<!-- <template>-->
<!-- <span style="margin-right: 10px">核销权限</span>-->
<!-- <el-checkbox-group v-model="writeOff" ref="" @change="getCheckbox">-->
<!-- <el-checkbox-->
<!-- v-for="dict in dict.type.write_off"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- ></el-checkbox>-->
<!-- </el-checkbox-group>-->
<!-- </template>-->
<!-- </el-col>-->
<!-- <el-col :span="16" style="display: flex">-->
<!-- <span style="margin-right: 10px">特殊权限</span>-->
<!-- <el-checkbox-group v-model="specialPrem" @change="getCheckbox">-->
<!-- <el-checkbox-->
<!-- v-for="dict in dict.type.special_prem"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- ></el-checkbox>-->
<!-- </el-checkbox-group>-->
<!-- </el-col>-->
</el-row>
<el-row>
<el-col :span="24" style="display: flex;margin-bottom: 10px">
@ -257,48 +268,48 @@
</el-tooltip>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="POS加油员" prop="pos">
<el-select v-model="form.pos">
<el-option
v-for="dict in dict.type.zhzt"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
<br/>
<el-tooltip
class="item"
effect="dark"
placement="bottom">
<div slot="content"> 启用后,当前账户登录POS端后油品收银必选加油员才可进行<br/>下步操作(需系统开启加油选择加油员功能) </div>
<span>启用后,当前账户登录...</span>
</el-tooltip>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="交易统计" prop="transaction">
<el-select v-model="form.transaction">
<el-option
v-for="dict in dict.type.transaction"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
<br/>
<el-tooltip
class="item"
effect="dark"
placement="bottom">
<div slot="content"> 交易订单显示信息终端支持:(PC<br/>POS小程序) </div>
<span>交易订单显示信息...</span>
</el-tooltip>
</el-form-item>
</el-col>
</el-row>
<el-row>
<!-- <el-col :span="8">-->
<!-- <el-form-item label="POS加油员" prop="pos">-->
<!-- <el-select v-model="form.pos">-->
<!-- <el-option-->
<!-- v-for="dict in dict.type.zhzt"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- <br/>-->
<!-- <el-tooltip-->
<!-- class="item"-->
<!-- effect="dark"-->
<!-- placement="bottom">-->
<!-- <div slot="content"> 启用后,当前账户登录POS端后油品收银必选加油员才可进行<br/>下步操作(需系统开启加油选择加油员功能) </div>-->
<!-- <span>启用后,当前账户登录...</span>-->
<!-- </el-tooltip>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="交易统计" prop="transaction">-->
<!-- <el-select v-model="form.transaction">-->
<!-- <el-option-->
<!-- v-for="dict in dict.type.transaction"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- <br/>-->
<!-- <el-tooltip-->
<!-- class="item"-->
<!-- effect="dark"-->
<!-- placement="bottom">-->
<!-- <div slot="content"> 交易订单显示信息终端支持:(PC<br/>POS小程序) </div>-->
<!-- <span>交易订单显示信息...</span>-->
<!-- </el-tooltip>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <el-row>-->
<el-col :span="8">
<el-form-item label="收款通知" prop="notice">
<el-select v-model="form.notice">
@ -319,206 +330,206 @@
</el-tooltip>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="指定油枪" prop="oilGunId" v-show="form.notice == 'zdyx'">
<el-select v-model="form.oilGunId">
<el-option
v-for="dict in dict.type.notice"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
<br/>
<el-tooltip
class="item"
effect="dark"
placement="bottom">
<div slot="content">多选,已选油枪号的交易将发送<br/>模板消息)</div>
<span>多选,已选油枪号...</span>
</el-tooltip>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="时间范围" prop="timeFrame">
<el-select v-model="form.timeFrame">
<el-option
v-for="dict in dict.type.time_frame"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
<br/>
<el-tooltip
class="item"
effect="dark"
placement="bottom">
<div slot="content">当前账户下可查看交易的时间范围(PC<br/>POS端)</div>
<span>当前账户下可查看...</span>
</el-tooltip>
</el-form-item>
</el-col>
<!-- <el-col :span="8">-->
<!-- <el-form-item label="指定油枪" prop="oilGunId" v-show="form.notice == 'zdyx'">-->
<!-- <el-select v-model="form.oilGunId">-->
<!-- <el-option-->
<!-- v-for="dict in dict.type.notice"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- <br/>-->
<!-- <el-tooltip-->
<!-- class="item"-->
<!-- effect="dark"-->
<!-- placement="bottom">-->
<!-- <div slot="content">多选,已选油枪号的交易将发送<br/>模板消息)</div>-->
<!-- <span>多选,已选油枪号...</span>-->
<!-- </el-tooltip>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="时间范围" prop="timeFrame">-->
<!-- <el-select v-model="form.timeFrame">-->
<!-- <el-option-->
<!-- v-for="dict in dict.type.time_frame"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- <br/>-->
<!-- <el-tooltip-->
<!-- class="item"-->
<!-- effect="dark"-->
<!-- placement="bottom">-->
<!-- <div slot="content">当前账户下可查看交易的时间范围(PC<br/>POS端)</div>-->
<!-- <span>当前账户下可查看...</span>-->
<!-- </el-tooltip>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
<!-- <el-row>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="交班模式" prop="handoverMode">-->
<!-- <el-select v-model="form.handoverMode">-->
<!-- <el-option-->
<!-- v-for="dict in dict.type.handover"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- <br/>-->
<!-- <span> 根据需求自行选择模式 </span>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="交班权限" prop="handoverPrem">-->
<!-- <el-select v-model="form.handoverPrem" placeholder="请选择所属店铺">-->
<!-- <el-option-->
<!-- v-for="dict in dict.type.ywqx"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- <br/>-->
<!-- <el-tooltip-->
<!-- class="item"-->
<!-- effect="dark"-->
<!-- placement="bottom">-->
<!-- <div slot="content"> 若无权限,则无法查看交班统计信息和<br/>进行交班操作 </div>-->
<!-- <span>若无权限,则无法查看...</span>-->
<!-- </el-tooltip>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="交班退出" prop="handoverOut">-->
<!-- <el-select v-model="form.handoverOut">-->
<!-- <el-option-->
<!-- v-for="dict in dict.type.handover_quit"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- <br/>-->
<!-- <el-tooltip-->
<!-- class="item"-->
<!-- effect="dark"-->
<!-- placement="bottom">-->
<!-- <div slot="content"> 进行交班处理后是否退出当前账户 </div>-->
<!-- <span>进行交班处理后是否...</span>-->
<!-- </el-tooltip>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <el-row>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="交班记录" prop="record">-->
<!-- <el-select v-model="form.record">-->
<!-- <el-option-->
<!-- v-for="dict in dict.type.jbjl"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- <br/>-->
<!-- <el-tooltip-->
<!-- class="item"-->
<!-- effect="dark"-->
<!-- placement="bottom">-->
<!-- <div slot="content"> 全部记录:查看所有员工交班记录,名下<br/>记录:员工自己名下记录(需有交班权限才可查看),<br/>禁用权限:无权限查看交班记录,记录为空 </div>-->
<!-- <span>全部记录:查看所有...</span>-->
<!-- </el-tooltip>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="交班商户号" prop="merchantStatus">-->
<!-- <el-select v-model="form.merchantStatus">-->
<!-- <el-option-->
<!-- v-for="dict in dict.type.zhzt"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- <br/>-->
<!-- <el-tooltip-->
<!-- class="item"-->
<!-- effect="dark"-->
<!-- placement="bottom">-->
<!-- <div slot="content"> 交班信息是否显示商户号统计信息,<br/>用后当前员工则无商户号统计信息 </div>-->
<!-- <span>交班信息是否显示商...</span>-->
<!-- </el-tooltip>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="员工筛选" prop="screen">-->
<!-- <el-select v-model="form.screen">-->
<!-- <el-option-->
<!-- v-for="dict in dict.type.zhzt"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- <br/>-->
<!-- <el-tooltip-->
<!-- class="item"-->
<!-- effect="dark"-->
<!-- placement="bottom">-->
<!-- <div slot="content"> 交易信息是否可以筛选员工进行查<br/>,启用后可筛选则反之 </div>-->
<!-- <span>交易信息是否可以...</span>-->
<!-- </el-tooltip>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row>
<el-col :span="8">
<el-form-item label="交班模式" prop="handoverMode">
<el-select v-model="form.handoverMode">
<el-option
v-for="dict in dict.type.handover"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
<br/>
<span> 根据需求自行选择模式 </span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="交班权限" prop="handoverPrem">
<el-select v-model="form.handoverPrem" placeholder="请选择所属店铺">
<el-option
v-for="dict in dict.type.ywqx"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
<br/>
<el-tooltip
class="item"
effect="dark"
placement="bottom">
<div slot="content"> 若无权限,则无法查看交班统计信息和<br/>进行交班操作 </div>
<span>若无权限,则无法查看...</span>
</el-tooltip>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="交班退出" prop="handoverOut">
<el-select v-model="form.handoverOut">
<el-option
v-for="dict in dict.type.handover_quit"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
<br/>
<el-tooltip
class="item"
effect="dark"
placement="bottom">
<div slot="content"> 进行交班处理后是否退出当前账户 </div>
<span>进行交班处理后是否...</span>
</el-tooltip>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="交班记录" prop="record">
<el-select v-model="form.record">
<el-option
v-for="dict in dict.type.jbjl"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
<br/>
<el-tooltip
class="item"
effect="dark"
placement="bottom">
<div slot="content"> 全部记录:查看所有员工交班记录,名下<br/>记录:员工自己名下记录(需有交班权限才可查看),<br/>禁用权限:无权限查看交班记录,记录为空 </div>
<span>全部记录:查看所有...</span>
</el-tooltip>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="交班商户号" prop="merchantStatus">
<el-select v-model="form.merchantStatus">
<el-option
v-for="dict in dict.type.zhzt"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
<br/>
<el-tooltip
class="item"
effect="dark"
placement="bottom">
<div slot="content"> 交班信息是否显示商户号统计信息,<br/>用后当前员工则无商户号统计信息 </div>
<span>交班信息是否显示商...</span>
</el-tooltip>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="员工筛选" prop="screen">
<el-select v-model="form.screen">
<el-option
v-for="dict in dict.type.zhzt"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
<br/>
<el-tooltip
class="item"
effect="dark"
placement="bottom">
<div slot="content"> 交易信息是否可以筛选员工进行查<br/>,启用后可筛选则反之 </div>
<span>交易信息是否可以...</span>
</el-tooltip>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="POS权限" prop="posPrem">
<div class="block">
<el-cascader
v-model="posPrem"
:options="posOptions"
:props="props"
@change="handleNodeClick1"
clearable></el-cascader>
<br/>
<el-tooltip
class="item"
effect="dark"
placement="bottom">
<div slot="content"> POS手持机中功能对应操作权限 </div>
<span>POS手持机中...</span>
</el-tooltip>
</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="小程序权限" prop="appletPrem">
<div class="block">
<el-cascader
v-model="appletPrem"
:options="appletOptions"
:props="props"
@change="handleNodeClick2"
clearable></el-cascader>
<br/>
<el-tooltip
class="item"
effect="dark"
placement="bottom">
<div slot="content"> 小程序管理端功能对应操作权限 </div>
<span>小程序管理端功能...</span>
</el-tooltip>
</div>
</el-form-item>
</el-col>
<!-- <el-col :span="8">-->
<!-- <el-form-item label="POS权限" prop="posPrem">-->
<!-- <div class="block">-->
<!-- <el-cascader-->
<!-- v-model="posPrem"-->
<!-- :options="posOptions"-->
<!-- :props="props"-->
<!-- @change="handleNodeClick1"-->
<!-- clearable></el-cascader>-->
<!-- <br/>-->
<!-- <el-tooltip-->
<!-- class="item"-->
<!-- effect="dark"-->
<!-- placement="bottom">-->
<!-- <div slot="content"> POS手持机中功能对应操作权限 </div>-->
<!-- <span>POS手持机中...</span>-->
<!-- </el-tooltip>-->
<!-- </div>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="小程序权限" prop="appletPrem">-->
<!-- <div class="block">-->
<!-- <el-cascader-->
<!-- v-model="appletPrem"-->
<!-- :options="appletOptions"-->
<!-- :props="props"-->
<!-- @change="handleNodeClick2"-->
<!-- clearable></el-cascader>-->
<!-- <br/>-->
<!-- <el-tooltip-->
<!-- class="item"-->
<!-- effect="dark"-->
<!-- placement="bottom">-->
<!-- <div slot="content"> 小程序管理端功能对应操作权限 </div>-->
<!-- <span>小程序管理端功能...</span>-->
<!-- </el-tooltip>-->
<!-- </div>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="8">
<el-form-item label="账户状态" prop="status">
<el-select v-model="form.status">
@ -560,11 +571,11 @@
style="margin-top: 100px"
width="20%">
<div style="text-align: center">
<img :id="type" class="qrcode" :src="imgUrl" />
<img id="qrCodeImg" class="qrcode" :src="baseUrl+imgUrl" />
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="handleDownloadqrCode(type)">保存图片到电脑</el-button>
<el-button type="primary" @click="handleDownloadqrCode('qrCodeImg')">保存图片到电脑</el-button>
</span>
</el-dialog>
</div>
@ -575,11 +586,12 @@ import QRCode from 'qrcode'
import {getName} from "../../utils/fuint";
import {addStaff, createStaffQrCode, delStaff, getStaff, listStaff, queryStaff, updateStaff} from "@/api/staff/staff";
import {getDuty, listDuty} from "@/api/staff/duty";
import html2canvas from "html2canvas";
export default {
name: "StaffList",
dicts: ['ywqx','write_off','display','zhzt','transaction','time_frame','handover','handover_quit',
'jbjl','official','notice','special_prem','role','shqx'],
'jbjl','official','notice','special_prem','role','shqx','staff_role'],
data() {
return {
//
@ -590,6 +602,7 @@ export default {
roleList:[],
drawer: false,
dialogVisible: false,
baseUrl:process.env.VUE_APP_BASE_API,
//
title: "",
//
@ -732,9 +745,12 @@ export default {
methods: {
//
getStaffQRcode(id){
console.log(id)
createStaffQrCode(id).then(res => {
console.log(res)
if (res.code==200){
this.title = "员工二维码"
this.dialogVisible = true
this.imgUrl = res.data
}
})
},
// url
@ -772,14 +788,12 @@ export default {
let imgUrl = canvas.toDataURL("image/png"); // canvas base64
let a = document.createElement('a')
a.href = imgUrl;
if (id=='woc'){
a.download = "核销二维码"; //
}else {
a.download = "员工二维码"; //
}
a.download = "员工二维码"; //
document.body.appendChild(a);
a.click(); //
document.body.removeChild(a); //
}).catch(err => {
console.log(err)
});
},
showDesc(){
@ -973,8 +987,8 @@ export default {
margin-bottom: 20px;
}
.qrcode{
width: 180px;
height: 180px;
width: 200px;
height: 300px;
margin-top: 15px;
}
</style>

View File

@ -25,7 +25,7 @@
<el-table-column label="方案名称" prop="name" align="center"/>
<el-table-column label="员工角色" prop="staffRoleGroup" align="center">
<template slot-scope="scope">
<dict-tag :options="dict.type.role" :value="scope.row.staffRoleGroup"/>
<dict-tag :options="dict.type.staff_role" :value="scope.row.staffRoleGroup"/>
</template>
</el-table-column>
<el-table-column label="提成来源" prop="commissionSource" align="center" />
@ -57,9 +57,9 @@
<!-- <dict-tag :options="dict.type.zhzt" :value="scope.row.status"/>-->
</template>
</el-table-column>
<el-table-column label="更新时间" align="center" width="160" prop="updateTime">
<el-table-column label="创建时间" align="center" width="160" prop="updateTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime) }}</span>
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="120" fixed='right'>
@ -122,11 +122,11 @@
<el-form-item label="角色组" prop="staffRoleGroup">
<el-select v-model="form.staffRoleGroup" placeholder="请选择所属角色">
<el-option
v-for="dict in dict.type.role"
v-for="dict in dict.type.staff_role"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
/>
</el-select>
</el-form-item>
</el-col>
@ -218,7 +218,7 @@ import {
} from "@/api/staffCommission/staffcommission";
export default {
dicts: ['source','role','zhzt','comissionType'],
dicts: ['source','role','zhzt','comissionType','staff_role'],
data(){
return {
changeCom:false,

View File

@ -113,9 +113,9 @@
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="优惠类型" align="center" prop="preferential" >
<template slot-scope="scope">
<dict-tag :options="dict.type.yhlx" :value="scope.row.preferential"/>
</template>
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :options="dict.type.yhlx" :value="scope.row.preferential"/>-->
<!-- </template>-->
</el-table-column>
<el-table-column label="特权信息">
<template slot-scope="scope">
@ -285,11 +285,14 @@
<el-col :span="24">
<el-form-item label="优惠类型" prop="preferential">
<el-radio-group v-model="form.preferential">
<!-- <el-radio-->
<!-- v-for="dict in dict.type.yhlx"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"></el-radio>-->
<el-radio
v-for="dict in dict.type.yhlx"
:key="dict.value"
:label="dict.label"
:value="dict.value"></el-radio>
label="自定义优惠"
value="自定义优惠"></el-radio>
</el-radio-group>
<div>
<div style="color: grey;font-size: 12px;height: 18px">

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询首页轮播图信息
export function listIndexBanner(query) {
return request({
url: '/business/indexBanner/lists',
method: 'get',
params: query
})
}
// 根据id查询首页轮播图信息
export function indexBannerInfo(id) {
return request({
url: '/business/indexBanner/'+id,
method: 'get',
})
}
// 添加首页轮播图信息
export function addIndexBanner(data) {
return request({
url: '/business/indexBanner',
method: 'post',
data: data
})
}
// 修改首页轮播图信息
export function updateIndexBanner(data) {
return request({
url: '/business/indexBanner/lists',
method: 'put',
data: data
})
}
// 删除首页轮播图信息
export function deleteIndexBanner(id) {
return request({
url: '/business/indexBanner/'+id,
method: 'delete',
})
}

View File

@ -0,0 +1,9 @@
import request from '@/utils/request'
// 查询所有店铺信息
export function ljStoreList() {
return request({
url: '/business/storeInformation/store/list',
method: 'get',
})
}

View File

@ -0,0 +1,169 @@
<template>
<div>
<el-card class="card">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
<el-form-item label="店铺" prop="name">
<el-input
v-model="queryParams.realName"
placeholder="请输入姓名"
clearable
style="width: 240px;"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="路由" prop="mobile">
<el-input
v-model="queryParams.mobile"
placeholder="请输入手机号"
clearable
style="width: 240px;"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<!-- <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>-->
</el-form-item>
</el-form>
</el-card>
<el-card class="card">
<div>
<el-button
type="primary"
icon="el-icon-plus"
@click="handleAdd"
>新增配置</el-button>
</div>
<el-table ref="tables" v-loading="loading" :data="list">
<el-table-column label="ID" align="center" prop="id" width="80" />
<el-table-column label="店铺" align="center" prop="storeId" >
<template slot-scope="scope">
<span>{{scope.row.storeId ? storeName(storeList,scope.row.storeId) : "--"}}</span>
</template>
</el-table-column>
<el-table-column label="轮播图" align="center" prop="bannerUrl" />
<el-table-column label="路由地址" align="center" prop="routeUrl" />
<el-table-column label="备注" align="center" prop="remark" >
<template slot-scope="scope">
<span>{{scope.row.remark ? scope.row.remark : "--"}}</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="handleDelete(scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-card>
<el-dialog
:title="title"
:visible.sync="dialogVisible">
<span>这是一段信息</span>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="dialogVisible = false"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {listIndexBanner} from "@/api/indexBanner/indexBanner";
import {ljStoreList} from "@/api/indexBanner/ljstore";
export default {
data(){
return{
queryParams:{
page:1,
pageSize:10,
},
list:[],
loading:false,
dialogVisible:false,
title:'',
total:0,
storeList:[],
}
},
created() {
this.getList()
this.getStoreList()
},
methods:{
storeName(list,id){
let name = ""
list.forEach(item => {
if (item.id == id){
name = item.name
}
})
return name;
},
//
getStoreList(){
ljStoreList().then(res => {
if (res.data){
this.storeList = res.data
}
})
},
//
getList(){
listIndexBanner(this.queryParams).then(res => {
console.log(res)
if (res.data){
this.list = res.data.records;
this.total = res.data.total;
}
})
},
//
handleAdd(){
this.title = "新增配置"
this.dialogVisible = true;
},
//
handleUpdate(id){
},
//
handleDelete(id){
},
//
handleQuery() {
this.queryParams.page = 1;
this.getList();
},
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -189,7 +189,11 @@
<artifactId>core</artifactId>
<version>3.3.3</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>5.2.9.RELEASE</version>
</dependency>
</dependencies>

View File

@ -118,17 +118,20 @@ public class MerchantConfigServiceImpl extends ServiceImpl<MerchantConfigMapper,
public int insertMerch(MerchantConfig merchantConfig) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
merchantConfig.setStoreId(nowAccountInfo.getStoreId());
int row = 0;
if (merchantConfig.getMerchantName().equals("富友")){
merchantConfig.setInsCd(FuYouPublicMerchant.insCd);
merchantConfig.setPublicKey(FuYouPublicMerchant.publicKey);
merchantConfig.setPrivateKey(FuYouPublicMerchant.privateKey);
}else {
row = 0;
}
merchantConfig.setAppid(FuYouPublicMerchant.appid);
merchantConfig.setAlipayAppid(FuYouPublicMerchant.alipayAppid);
merchantConfig.setIsUse("0");
merchantConfig.setIsOpenRule("0");
merchantConfig.setAmount(0.0);
int row = baseMapper.insert(merchantConfig);
row = baseMapper.insert(merchantConfig);
return row;
}
}

View File

@ -1,5 +1,6 @@
package com.fuint.business.convenienceSore.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -72,10 +73,13 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
*/
@Override
public int insertSupplier(Supplier supplier) {
int row = 0;
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Integer storeId = nowAccountInfo.getStoreId();
supplier.setStoreId(storeId);
int row = baseMapper.insert(supplier);
Supplier supplier1 = this.selectSupplierByName(supplier.getName());
if (ObjectUtil.isEmpty(supplier1)){
supplier.setStoreId(nowAccountInfo.getStoreId());
row = baseMapper.insert(supplier);
}
return row;
}

View File

@ -1,13 +1,12 @@
package com.fuint.business.indexBanner.controller;
import com.fuint.business.indexBanner.entity.IndexBanner;
import com.fuint.business.indexBanner.service.IndexBannerService;
import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/business/indexBanner")
@ -15,8 +14,69 @@ public class IndexBannerController extends BaseController {
@Autowired
private IndexBannerService indexBannerService;
/**
* 根据店铺id查询首页轮播图列表
* @param storeId
* @return
*/
@GetMapping("/list/{storeId}")
public ResponseObject list(@PathVariable Integer storeId){
return getSuccessResult(indexBannerService.selectIndexBannerList(storeId));
}
/**
* 根据条件分页查询首页轮播图
* @param indexBanner
* @param pageNo
* @param pageSize
* @return
*/
@GetMapping("/lists")
public ResponseObject lists(IndexBanner indexBanner,
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
Page page =new Page(pageNo,pageSize);
return getSuccessResult(indexBannerService.selectIndexBanners(page,indexBanner));
}
/**
* 根据id查询首页轮播图信息
* @param id
* @return
*/
@GetMapping("/{id}")
public ResponseObject indexBannerInfo(@PathVariable Integer id){
return getSuccessResult(indexBannerService.selectIndexBannerById(id));
}
/**
* 添加首页轮播图信息
* @param indexBanner
* @return
*/
@PostMapping
public ResponseObject add(@RequestBody IndexBanner indexBanner){
return getSuccessResult(indexBannerService.insertIndexBanner(indexBanner));
}
/**
* 修改首页轮播图信息
* @param indexBanner
* @return
*/
@PutMapping
public ResponseObject edit(@RequestBody IndexBanner indexBanner){
return getSuccessResult(indexBannerService.updateIndexBanner(indexBanner));
}
/**
* 删除首页轮播图信息
* @param id
* @return
*/
@DeleteMapping("/{id}")
public ResponseObject delete(@PathVariable Integer id){
indexBannerService.deleteIndexBanner(id);
return getSuccessResult("OK");
}
}

View File

@ -38,86 +38,8 @@ public class IndexBanner extends BaseEntity implements Serializable {
*/
private String routeUrl;
/**
* 创建时间
* 备注
*/
private Date createTime;
/**
* 创建人
*/
private String createBy;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getStoreId() {
return storeId;
}
public void setStoreId(Integer storeId) {
this.storeId = storeId;
}
public String getBannerUrl() {
return bannerUrl;
}
public void setBannerUrl(String bannerUrl) {
this.bannerUrl = bannerUrl;
}
public String getRouteUrl() {
return routeUrl;
}
public void setRouteUrl(String routeUrl) {
this.routeUrl = routeUrl;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
private String remark;
}

View File

@ -1,7 +1,17 @@
package com.fuint.business.indexBanner.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.indexBanner.entity.IndexBanner;
import org.apache.ibatis.annotations.Param;
public interface IndexBannerMapper extends BaseMapper<IndexBanner> {
/**
* 根据条件分页查询首页轮播图信息
* @param page
* @param indexBanner
* @return
*/
IPage<IndexBanner> selectIndexBanners(Page page, @Param("indexBanner") IndexBanner indexBanner);
}

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fuint.business.indexBanner.mapper.IndexBannerMapper">
<sql id="selectIndexBanners">
select * from index_banner
</sql>
<select id="selectIndexBanners" resultType="com.fuint.business.indexBanner.entity.IndexBanner">
<include refid="selectIndexBanners"></include>
<where>
<if test="indexBanner.storeId != null and indexBanner.storeId != ''">
and store_id like concat('%', #{indexBanner.storeId}, '%')
</if>
<if test="indexBanner.bannerUrl != null and indexBanner.bannerUrl != ''">
and banner_url like concat('%', #{indexBanner.bannerUrl}, '%')
</if>
<if test="indexBanner.routeUrl != null and indexBanner.routeUrl != ''">
and route_url like concat('%', #{indexBanner.routeUrl}, '%')
</if>
</where>
</select>
</mapper>

View File

@ -1,10 +1,20 @@
package com.fuint.business.indexBanner.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.indexBanner.entity.IndexBanner;
import java.util.List;
public interface IndexBannerService {
/**
* 根据条件分页查询首页轮播图信息
* @param page
* @param indexBanner
* @return
*/
IPage<IndexBanner> selectIndexBanners(Page page,IndexBanner indexBanner);
/**
* 根据店铺id查询首页banner图
* @return
@ -16,7 +26,14 @@ public interface IndexBannerService {
* @param routeUrl
* @return
*/
IndexBanner selectIndexBannerByRouteUrl(String routeUrl);
IndexBanner selectIndexBannerByRouteUrl(String routeUrl,Integer storeId);
/**
* 根据id查询首页轮播图信息
* @param id
* @return
*/
IndexBanner selectIndexBannerById(int id);
/**
* 添加首页banner图
@ -31,4 +48,10 @@ public interface IndexBannerService {
* @return
*/
int updateIndexBanner(IndexBanner indexBanner);
/**
* 删除首页轮播图信息
* @param id
*/
void deleteIndexBanner(int id);
}

View File

@ -2,6 +2,8 @@ package com.fuint.business.indexBanner.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.indexBanner.entity.IndexBanner;
import com.fuint.business.indexBanner.mapper.IndexBannerMapper;
@ -14,6 +16,11 @@ import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class IndexBannerServiceImpl extends ServiceImpl<IndexBannerMapper, IndexBanner> implements IndexBannerService {
@Override
public IPage<IndexBanner> selectIndexBanners(Page page, IndexBanner indexBanner) {
return baseMapper.selectIndexBanners(page,indexBanner);
}
@Override
public List<IndexBanner> selectIndexBannerList(int storeId) {
// AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
@ -23,12 +30,18 @@ public class IndexBannerServiceImpl extends ServiceImpl<IndexBannerMapper, Index
}
@Override
public IndexBanner selectIndexBannerByRouteUrl(String routeUrl) {
public IndexBanner selectIndexBannerByRouteUrl(String routeUrl,Integer storeId) {
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("route_url",routeUrl);
queryWrapper.eq("store_id",storeId);
return baseMapper.selectOne(queryWrapper);
}
@Override
public IndexBanner selectIndexBannerById(int id) {
return baseMapper.selectById(id);
}
@Override
public int insertIndexBanner(IndexBanner indexBanner) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
@ -39,7 +52,7 @@ public class IndexBannerServiceImpl extends ServiceImpl<IndexBannerMapper, Index
indexBanner.setRouteUrl("/pagesHome/Activity/index");
row = baseMapper.insert(indexBanner);
}else {
IndexBanner indexBanner1 = this.selectIndexBannerByRouteUrl(indexBanner.getRouteUrl());
IndexBanner indexBanner1 = this.selectIndexBannerByRouteUrl(indexBanner.getRouteUrl(),nowAccountInfo.getStoreId());
if (ObjectUtil.isNotEmpty(indexBanner1)){
row = 0;
}else {
@ -53,4 +66,9 @@ public class IndexBannerServiceImpl extends ServiceImpl<IndexBannerMapper, Index
public int updateIndexBanner(IndexBanner indexBanner) {
return 0;
}
@Override
public void deleteIndexBanner(int id) {
baseMapper.deleteById(id);
}
}

View File

@ -50,6 +50,21 @@ public class CardFuelDieselController extends BaseController {
return getSuccessResult(this.cardFuelDieselService.select(page, cardFuelDiesel));
}
/**
* 分页查询所有数据(小程序端)
* @param pageNo
* @param pageSize
* @param cardFuelDiesel
* @return
*/
@GetMapping("selectAllApplet")
public ResponseObject selectAllApplet(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
@Param("cardFuelDiesel") CardFuelDiesel cardFuelDiesel) {
Page page = new Page(pageNo, pageSize);
return getSuccessResult(this.cardFuelDieselService.selectAllApplet(page, cardFuelDiesel));
}
/**
* 通过主键查询单条数据
*

View File

@ -165,7 +165,5 @@ public class CardFuelRecordController extends BaseController {
return getSuccessResult(iPageList);
}
}

View File

@ -11,5 +11,9 @@ public class CardFuelRecordDTO extends CardFuelRecord {
private Double realyPayBills;
//付款类型 1.微信 2.支付宝
private String payType;
//优惠券id
private Integer cardFavorableId;
//卡券领取记录id
private Integer cardRecordId;
}

View File

@ -24,5 +24,7 @@ public interface CardFuelDieselService extends IService<CardFuelDiesel> {
* @return
*/
IPage select(Page page, CardFuelDiesel cardFuelDiesel);
IPage selectAllApplet(Page page, CardFuelDiesel cardFuelDiesel);
}

View File

@ -80,5 +80,49 @@ public class CardFuelDieselServiceImpl extends ServiceImpl<CardFuelDieselMapper,
}
return page1;
}
/**
* 分页查询所有数据(小程序端)
* @param page
* @param cardFuelDiesel
* @return
*/
@Override
public IPage selectAllApplet(Page page, CardFuelDiesel cardFuelDiesel) {
//构建查询条件
LambdaQueryWrapper<CardFuelDiesel> queryWrapper = new LambdaQueryWrapper<>();
if(ObjectUtils.isNotEmpty(cardFuelDiesel.getOilType())){
queryWrapper.eq(CardFuelDiesel::getOilType,cardFuelDiesel.getOilType());
}
queryWrapper.eq(CardFuelDiesel::getStoreId,cardFuelDiesel.getStoreId());
if (ObjectUtils.isNotEmpty(cardFuelDiesel.getActiveStatus())){
queryWrapper.eq(CardFuelDiesel::getActiveStatus,cardFuelDiesel.getActiveStatus());
}
if(ObjectUtils.isNotEmpty(cardFuelDiesel.getType())) {
queryWrapper.eq(CardFuelDiesel::getType,cardFuelDiesel.getType());
}
queryWrapper.orderByDesc(CardFuelDiesel::getCreateTime);
IPage page1 = page(page, queryWrapper);
List<CardFuelDiesel> records = page1.getRecords();
//返回囤油卡状态
for (CardFuelDiesel record : records) {
record.setOilType(oilNameService.selectOilNameById(Integer.parseInt(record.getOilType())).getOilName());
record.setStatus(record.getStatus().equals("1") ? "true" : "false");
if(ObjectUtils.isNotEmpty(record.getActiveTime()) && "1".equals(record.getActiveTime())){
record.setActivityProgress("1");
}
//活动进度状态
if (ObjectUtils.isNotEmpty(record.getStartTime()) &&
ObjectUtils.isNotEmpty(record.getEndTime()) &&
record.getActiveTime().equals("2")){
record.setActivityProgress(record.getStartTime().getTime() > new Date().getTime() ? "0" : "");
if(ObjectUtils.isEmpty(record.getActivityProgress())){
record.setActivityProgress(record.getEndTime().getTime() > new Date().getTime() ? "1" : "2");
}
}
}
return page1;
}
}

View File

@ -370,6 +370,7 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
* @return
*/
@Override
@Transactional
public ReturnParameter addFuleCarRecords(CardFuelRecordDTO cardFuelRecordDTO) throws Exception {
Double cardFavorableValue = 0.0;
Map<String,Object> map = new HashMap<>();
@ -399,7 +400,7 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
//付款类型
cardFuleOrders.setPayType(cardFuelRecordDTO.getPayType());
//用户信息
cardFuleOrders.setStoreId(ljUserVo.getStoreId());
cardFuleOrders.setStoreId(cardFuelRecordDTO.getStoreId());
cardFuleOrders.setMtUserId(ljUserVo.getId());
cardFuleOrders.setName(ljUserVo.getName());
cardFuleOrders.setMobile(ljUserVo.getMobile());
@ -426,7 +427,7 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
//封装支付参数
receiveParameter.setOrderNo(orderNo);
receiveParameter.setType("5");
receiveParameter.setStoreId(nowAccountInfo.getStoreId());
receiveParameter.setStoreId(cardFuelRecordDTO.getStoreId());
receiveParameter.setGoodsMoney(cardFuleOrders.getPayAmount());
receiveParameter.setPayType(cardFuleOrders.getPayType());
receiveParameter.setUserId(nowAccountInfo.getId());
@ -457,7 +458,6 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
*/
@Transactional
public void fuleRechargeFinallDeal(String orderNo) throws JsonProcessingException {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
UserBalance userBalance1 = new UserBalance();
CardFuelRecord cardFuelRecord = new CardFuelRecord();
OilBalanceChange oilBalanceChange = new OilBalanceChange();
@ -469,7 +469,7 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
cardFuleOrders.setPayTime(new Date());
cardFuleOrdersService.updateById(cardFuleOrders);
//用户余额
UserBalance userBalance = userBalanceService.selectUserBalance(cardFuleOrders.getMtUserId());
UserBalance userBalance = userBalanceService.selectUserBalanceByStorId(cardFuleOrders.getMtUserId(),cardFuleOrders.getStoreId());
//用户 (新用户新建 老用户叠加)
if (ObjectUtils.isNotEmpty(userBalance)){
//积分
@ -477,45 +477,61 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
userBalance.setPoints(userBalance.getPoints() + cardFuleOrders.getPoints());
}
//屯油卡余油
if (ObjectUtils.isNotEmpty(userBalance.getRefuelMoney()) && ObjectUtils.isNotEmpty(cardFuleOrders.getIncomeLitres())
if (ObjectUtils.isNotEmpty(cardFuleOrders.getIncomeLitres())
&& ObjectUtils.isNotEmpty(cardFuleOrders.getType()) && ObjectUtils.isNotEmpty(cardFuleOrders.getOilType())){
String refuelMoney = userBalance.getRefuelMoney();
List<JSONObject> jsonObjectList = JSONArray.parseArray(refuelMoney, JSONObject.class);
for (JSONObject jsonObject : jsonObjectList) {
if (cardFuleOrders.getOilType().equals(jsonObject.getString("oilType"))){
double refuelMoney1 = jsonObject.getDouble("refuelMoney");
refuelMoney1 = (cardFuleOrders.getIncomeLitres() + refuelMoney1);
jsonObject.put("refuelMoney", refuelMoney1).toString();
}else {
if (ObjectUtils.isNotEmpty(refuelMoney)){
List<JSONObject> jsonObjectList = JSONArray.parseArray(refuelMoney, JSONObject.class);
ArrayList<String> oilTypeList= new ArrayList<>();
for (JSONObject jsonObject : jsonObjectList) {
String oilType = jsonObject.getString("oilType");
if (ObjectUtils.isNotEmpty(oilType)){
oilTypeList.add(oilType);
}
}
//如果油品类型包括所加的油品,叠加不包括新增
if (oilTypeList.contains(cardFuleOrders.getOilType())){
for (JSONObject jsonObject : jsonObjectList) {
if (cardFuleOrders.getOilType().equals(jsonObject.getString("oilType"))){
double incomeLitres = jsonObject.getDouble("incomeLitres");
incomeLitres = (cardFuleOrders.getIncomeLitres() + incomeLitres);
jsonObject.put("incomeLitres", incomeLitres);
String userBnlancce = jsonObjectList.toString();
userBalance.setRefuelMoney(userBnlancce);
break;
}
}
}else {
JSONObject jsonObject1 = new JSONObject();
jsonObject1.put("type",cardFuleOrders.getType());
jsonObject1.put("oilType",cardFuleOrders.getOilType());
jsonObject1.put("incomeLitres",cardFuleOrders.getIncomeLitres());
jsonObjectList.add(jsonObject1);
String userBnlancce = jsonObjectList.toString();
userBalance.setRefuelMoney(userBnlancce);
}
}
}else {
ArrayList<JSONObject> jsonObjects = new ArrayList<>();
JSONObject jsonObject = new JSONObject();
jsonObject.put("type",cardFuleOrders.getType());
jsonObject.put("oilType",cardFuleOrders.getOilType());
jsonObject.put("incomeLitres",cardFuleOrders.getIncomeLitres());
jsonObjects.add(jsonObject);
userBalance.setRefuelMoney(jsonObjects.toString());
}
String userBnlancce = jsonObjectList.toString();
userBalance.setRefuelMoney(userBnlancce);
}
userBalanceService.updateUserBalance(userBalance);
}else {
userBalance1.setMtUserId(cardFuleOrders.getMtUserId());
userBalance1.setStoreId(cardFuleOrders.getStoreId());
userBalance1.setChainStoreId(nowAccountInfo.getChainStoreId());
//积分
if (ObjectUtils.isNotEmpty(cardFuleOrders.getPoints())){
userBalance1.setPoints(cardFuleOrders.getPoints());
}
//油量
/*if (ObjectUtils.isNotEmpty(userBalance.getRefuelMoney()) && ObjectUtils.isNotEmpty(cardValueOrders.getAmount())){
userBalance.setCardBalance(userBalance.getCardBalance() + cardValueOrders.getAmount());
}*/
userBalanceService.save(userBalance1);
}
//用户余变化记录
//用户余油变化记录
oilBalanceChange.setUserId(cardFuleOrders.getMtUserId());
oilBalanceChange.setChainStoreId(nowAccountInfo.getChainStoreId());
oilBalanceChange.setStoreId(cardFuleOrders.getStoreId());
oilBalanceChange.setChangeType("1");
oilBalanceChange.setFromType("囤油卡充值");
@ -541,7 +557,6 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
cardFuelRecord.setPayStatus("paid");
cardFuelRecord.setStoreId(cardFuleOrders.getStoreId());
cardFuelRecord.setPaymentNo(cardFuleOrders.getOrderNo());
cardFuelRecord.setChainStoreId(nowAccountInfo.getChainStoreId());
cardFuelRecord.setType(cardFuleOrders.getType());
cardFuelRecord.setOilType(cardFuleOrders.getOilType());
cardFuelRecordMapper.insert(cardFuelRecord);

View File

@ -72,9 +72,14 @@ public class LJStaffController extends BaseController {
}
@GetMapping("/qrCode/{id}")
public ResponseObject createStaffQrCode(HttpServletRequest request, @PathVariable Integer id){
mtStaffService.createStaffQrCode(id,request);
return getSuccessResult("ok");
public ResponseObject createStaffQrCode(HttpServletRequest request, @PathVariable Integer id) {
String staffQrCode = "";
try {
staffQrCode = mtStaffService.createStaffQrCode(id, request);
}catch (Exception e){
e.printStackTrace();
}
return getSuccessResult(staffQrCode);
}
/**

View File

@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.member.entity.LJStaff;
import javax.servlet.http.HttpServletRequest;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.List;
/**
@ -65,7 +67,7 @@ public interface ILJStaffService extends IService<LJStaff> {
*/
public int updateStaff(LJStaff staff);
public void createStaffQrCode(int id, HttpServletRequest request);
public String createStaffQrCode(int id, HttpServletRequest request) throws Exception;
/**
* 设定安全的密码生成随机的salt并经过1024次 sha-1 hash

View File

@ -12,6 +12,7 @@ import com.fuint.business.storeInformation.entity.LJStore;
import com.fuint.business.storeInformation.service.ILJStoreService;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.service.AccountService;
import com.fuint.common.service.SettingService;
import com.fuint.common.util.StringUtils;
import com.fuint.common.util.TokenUtil;
import com.fuint.framework.web.ResponseObject;
@ -21,12 +22,15 @@ import com.fuint.utils.Digests;
import com.fuint.utils.Encodes;
import jdk.nashorn.internal.parser.Token;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mock.web.MockMultipartFile;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
@ -148,11 +152,12 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
account.setAccountName(staff.getMobile());
account.setAccountStatus(1);
account.setRealName(staff.getRealName());
account.setRoleIds(String.valueOf(staff.getRoleId()));
account.setRoleIds("0");
account.setStaffId(staff1.getId());
account.setCreateTime(new Date());
account.setUpdateTime(new Date());
account.setStoreId(storeId);
account.setPassword(staff.getPassword());
if (StringUtils.isNotEmpty(staff.getRefundPassword())){
account.setPassword(staff.getPassword());
}else {
@ -171,16 +176,28 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
@Override
public int updateStaff(LJStaff staff) {
int row = baseMapper.updateById(staff);
if (StringUtils.isNotEmpty(staff.getPassword())){
TAccount tAccount = accountService.selectAccountByUserName(staff.getMobile());
tAccount.setPassword(staff.getPassword());
accountService.entryptPassword(tAccount);
try {
accountService.editAccount(tAccount,null);
}catch (Exception e){
e.printStackTrace();
}
}
return row;
}
@Autowired
private ILJStoreService storeService;
@Autowired
private SettingService settingService;
@Autowired
private BackendFileController backendFileController;
@Override
public void createStaffQrCode(int id, HttpServletRequest request) {
public String createStaffQrCode(int id, HttpServletRequest request) throws Exception {
// 根据id查询员工信息和店铺信息
LJStaff staff = this.selectStaffById(id);
LJStore store = storeService.selectStoreByStoreId(staff.getStoreId());
@ -193,10 +210,12 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
//背景图片路径 loge图片 二维码 输出地址
createLogoCodePicture(backgroundImage, logoImage, url, finalPath, area,store.getAddress());
File file =new File(finalPath);
FileInputStream fileInputStream =new FileInputStream(file);
MultipartFile resFile = new MockMultipartFile("file", file.getName(), null, fileInputStream);
// 返回图片路径
ResponseObject responseObject = backendFileController.uploadFileLocal(request);
System.out.println(responseObject.getData());
// staff.setStaffCode("/statics"+url1.split("/statics")[1]);
String saveFile = backendFileController.saveFile(resFile);
return saveFile;
}
@Override

View File

@ -47,9 +47,9 @@ public class QrCodeUtils {
//设置颜色
g.setColor(Color.BLACK);
// 店铺名称位置文字绘制到指定位置
g.drawString(storeName, 290, 880);
g.drawString(storeName, 200, 880);
// // 将码牌编号文字绘制到指定位置
g.drawString(storeNumber, 290, 800);
// g.drawString(storeNumber, 200, 800);
g.dispose();
// 输出图片

View File

@ -401,6 +401,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
@Override
public Map<String,String> scanAppletQrCode(Map<String, String> map) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Map<String,String> res = new HashMap<>();
String authCode = map.get("authCode");
// 油品订单金额
@ -415,14 +416,14 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
String[] split = authCode.split("19");
// 获取用户id
Integer userId = Integer.valueOf(split[1]);
res = this.updateUserBalanceAndInsetOrder(userId,map,oilAmount,oilOrders);
res = this.updateUserBalanceAndInsetOrder(userId,map,oilAmount,oilOrders,nowAccountInfo.getStoreId());
}
// 二维码支付
if (authCode.contains("9E")) {
String[] split = authCode.split("9E");
// 获取用户id
Integer userId = Integer.valueOf(split[1]);
res = this.updateUserBalanceAndInsetOrder(userId,map,oilAmount,oilOrders);
res = this.updateUserBalanceAndInsetOrder(userId,map,oilAmount,oilOrders,nowAccountInfo.getStoreId());
}
}
return res;
@ -438,10 +439,10 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
* @param oilOrders 油品订单
* @return 是否成功
*/
private Map<String,String> updateUserBalanceAndInsetOrder(int userId,Map<String, String> map,Double oilAmount,List<JSONObject> oilOrders){
private Map<String,String> updateUserBalanceAndInsetOrder(int userId,Map<String, String> map,Double oilAmount,List<JSONObject> oilOrders,Integer storeId){
Map<String,String> res = new HashMap<>();
// 根据userId查询用户储值卡信息
UserBalance balance = userBalanceService.selectUserBalance(userId);
UserBalance balance = userBalanceService.selectUserBalanceByStorId(userId,storeId);
// 根据用户id查询用户信息
LJUserVo userVo1 = userService.selectUserById(userId);
@ -507,7 +508,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
cashierOrder.setTerminal(map.get("terminal"));
cashierOrder.setOilOrderId(oilOrder.getId());
cashierOrderService.insertCashierOrder(cashierOrder);
this.updateGrowthValue1(oilAmount,userId, Integer.valueOf(oilOrder.getOils()),0.0);
this.updateGrowthValue1(oilAmount,userId, Integer.valueOf(oilOrder.getOils()),0.0,storeId);
this.insertAllOrderInfo(orderNo,accountInfo.getStoreId(),oilAmount,map.get("payType"),userId,"applet");
res.put("success","success");
@ -573,7 +574,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
// cashierOrder.setOilDiscountAmount(Double.valueOf(map.get("oilDiscount")));
cashierOrder.setTerminal(map.get("terminal"));
cashierOrder.setOilOrderId(oilOrder.getId());
this.updateGrowthValue1(0.0,userId, Integer.valueOf(oilOrder.getOils()),refuelMoneyLiters-Double.valueOf(oilOrders.get(i).get("liters").toString()));
this.updateGrowthValue1(0.0,userId, Integer.valueOf(oilOrder.getOils()),refuelMoneyLiters-Double.valueOf(oilOrders.get(i).get("liters").toString()),storeId);
}
}else {
@ -623,8 +624,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
* @param oilId 油号id
* @param refuelMoney 扣除的囤油卡升数
*/
private void updateGrowthValue1(Double oilActualPay,Integer userid,Integer oilId,Double refuelMoney){
UserBalance balance = userBalanceService.selectUserBalance(userid);
private void updateGrowthValue1(Double oilActualPay,Integer userid,Integer oilId,Double refuelMoney,Integer storeId){
UserBalance balance = userBalanceService.selectUserBalanceByStorId(userid,storeId);
JSONArray refuelMoneys = JSONArray.parseArray(balance.getRefuelMoney());
if (oilActualPay==0.0){
if (ObjectUtil.isNotEmpty(refuelMoneys)){
@ -884,7 +885,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
Integer dieselGrowthValue = null;
Integer naturalGrowthValue = null;
LJStore store = storeService.selectStoreByStoreId(storeId);
UserBalance balance = userBalanceService.selectUserBalance(userid);
UserBalance balance = userBalanceService.selectUserBalanceByStorId(userid,storeId);
int growth = balance.getGrowthValue();
balance.setRefuelMoney(refuelMoney);
// 查询会员等级列表信息
@ -943,7 +944,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
// 根据用户id查询用户余额信息
LJStore store = storeService.selectStoreByStoreId(storeId);
UserBalance balance = userBalanceService.selectUserBalance(userId);
UserBalance balance = userBalanceService.selectUserBalanceByStorId(userId,storeId);
// 修改余额信息
Double beforeBalance = balance.getCardBalance();
Double afterBalance = beforeBalance - amount;

View File

@ -108,7 +108,7 @@ public class ExportController extends BaseController{
LJUserVo ljUser = new LJUserVo();
ljUser.setUserNo("51246214");
ljUser.setName("会员");
ljUser.setName("张三");
ljUser.setOpenId("15245698512");
ljUser.setMobile("15245698512");
ljUser.setIdcard("845126542514568542");

View File

@ -37,6 +37,15 @@ public class FixingLevelController extends BaseController {
return getSuccessResult(list);
}
/**
* 根据店铺id查询所有固定等级信息
* @return
*/
@GetMapping("/allFixingLevel")
public ResponseObject allFixingLevel(){
return getSuccessResult(fixingLevelService.selectFixingLevels());
}
/**
* 根据id查询固定等级信息
* @param id

View File

@ -125,7 +125,7 @@ public class LJUserController extends BaseController {
*/
@GetMapping("/userBalanceByUserId")
public ResponseObject getUserBalanceByUserId(){
return getSuccessResult(userBalanceService.selectUserBalanceByUserId());
return getSuccessResult(userBalanceService.getUserBalance());
}
/**

View File

@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.userManager.entity.FixingLevel;
import java.util.List;
/**
* 固定等级 业务层
*/
@ -16,6 +18,12 @@ public interface FixingLevelService extends IService<FixingLevel> {
*/
public IPage<FixingLevel> selectFixingLevelList(Page page, FixingLevel fixingLevel);
/**
* 根据当前店铺id查询所有固定等级信息
* @return
*/
public List<FixingLevel> selectFixingLevels();
/**
* 根据id查询固定等级信息
* @param id

View File

@ -92,6 +92,8 @@ public class ChainStoreConfigServiceImpl extends ServiceImpl<ChainStoreConfigMap
@Override
public ChainStoreConfig selectChainStoreByStoreId(int storeId) {
LJStore store = storeService.selectStoreByStoreId(storeId);
return baseMapper.selectById(store.getChainStoreId());
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("chain_store_id",store.getChainStoreId());
return baseMapper.selectOne(queryWrapper);
}
}

View File

@ -17,6 +17,8 @@ import com.fuint.common.util.TokenUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 固定等级信息 业务层
*/
@ -50,6 +52,14 @@ public class FixingLevelServiceImpl extends ServiceImpl<FixingLevelMapper, Fixin
return fixingLevelIPage;
}
@Override
public List<FixingLevel> selectFixingLevels() {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("store_id",nowAccountInfo.getStoreId());
return baseMapper.selectList(queryWrapper);
}
/**
* 根据id查询固定等级信息
* @param id

View File

@ -45,9 +45,9 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
*/
@Override
public IPage<LJUserVo> selectUserList(Page page, LJUserVo user) {
// AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
// Integer storeId = nowAccountInfo.getStoreId();
// user.setStoreId(storeId);
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
LJStore store = storeService.selectStoreByStoreId(nowAccountInfo.getStoreId());
user.setChainStoreId(store.getChainStoreId());
IPage<LJUserVo> ljUserIPage = baseMapper.selectUserList(page, user);
return ljUserIPage;
}
@ -319,7 +319,7 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
certifiedMemberMapper.update(certifiedMember,queryWrapper);
// 修改余额会员等级信息
UserBalance balance = balanceService.selectUserBalance(userVo.getId());
UserBalance balance = balanceService.selectUserBalanceByStorId(userVo.getId(),userVo.getStoreId());
if (!ObjectUtil.isEmpty(balance)){
balance.setGradeId(userVo.getGradeId());
balance.setFixingLevel(userVo.getFixingLevel());
@ -337,7 +337,7 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
public void clearRule() {
List<LJUserVo> list = this.selectUsersList();
for (LJUserVo userVo : list) {
UserBalance balance = balanceService.selectUserBalance(userVo.getId());
UserBalance balance = balanceService.selectUserBalanceByStorId(userVo.getId(),userVo.getStoreId());
LJUserGrade ljUserGrade = userGradeService.selectUserGradeById(userVo.getGradeId());
if (!ObjectUtil.isEmpty(ljUserGrade) && !ObjectUtil.isEmpty(balance)){
// 修改账户成长值信息

View File

@ -54,6 +54,13 @@ public interface AccountService extends IService<TAccount> {
* */
TAccount createAccountInfo(TAccount accountInfo, List<TDuty> duties);
/**
* 根据登录名查询员工账户信息
* @param accountName
* @return
*/
TAccount selectAccountByUserName(String accountName);
/**
* 获取账号角色ID
*

View File

@ -2,6 +2,7 @@ package com.fuint.common.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -226,6 +227,13 @@ public class AccountServiceImpl extends ServiceImpl<TAccountMapper, TAccount> im
}
}
@Override
public TAccount selectAccountByUserName(String accountName) {
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("account_name",accountName);
return baseMapper.selectOne(queryWrapper);
}
/**
* 获取账号角色ID
*

View File

@ -291,12 +291,12 @@
method: 'get',
params: this.query
}).then(res => {
if (res.code == 200) {
if (res.data) {
this.cardBalance = res.data.cardBalance,
/* if (res.data.refuelMoney!=null && res.data.refuelMoney!=""){
this.refuelMoney = JSON.parse(res.data.refuelMoney);
} */
this.refuelMoney = JSON.parse(res.data.refuelMoney);
this.refuelMoney = JSON.parse(res.data.refuelMoney);
}
})
},

View File

@ -6,7 +6,7 @@
</view>
<view class="top">
<view class="top-box">
<view class="dis">
<view class="dis" style="width: 78%;">
<view class="top-img">
<image v-if="store.logo==''||store.logo==null||store.logo==undefined" src="../../static/logo.png" mode=""></image>
<image v-else :src="baseUrl+store.logo" mode=""></image>
@ -15,10 +15,10 @@
<view class="top-title">{{store.name}}{{store.description ? "("+store.description+")" : ""}}
</view><!--九州加油站总站-->
<view class="top-hui">{{store.address}}</view><!--平安大道东200米-->
<view class="top-hong">{{oilPrice}}/{{oilUnit}}</view>
<view class="top-hong">{{oilPrice}}/{{oilUnit ? oilUnit : "L"}}</view>
</view>
</view>
<view class="" @click="goRefuel" style="width: 80px;font-size: 14px;">
<view class="" @click="goRefuel" style="width: 22%;font-size: 14px;">
<view class="bulu">切换站点 <uni-icons type="right" color="#304fff" size="16"></uni-icons> </view>
</view>

View File

@ -64,7 +64,7 @@
<view class="boxback" v-if="actinput == 1">
<view class="box-cz">
<view class="box-jg" :class="{ 'actbox' : actindex == index }" v-for="(item,index) in cardFuleList"
:key="index" @click="fuleindex(index,item.rechargeBalance,item.points)">
:key="index" @click="fuleindex(index,item.rechargeBalance,item.points,item.id)">
<view class="s-title" :class="{ 'actsize' : actindex == index }">油品:{{item.type}}
</view>
<view class="s-title" :class="{ 'actsize' : actindex == index }">油号:{{item.oilType}}
@ -93,7 +93,7 @@
<!-- 底部 -->
<view class="bottom-box">
<view class="anniu" @click="addValueCarRecords()">
<view class="anniu" @click="addFuleCarRecords()">
<text>立即充值</text>
</view>
<view class="dibu" @click="goRechargeRecords()">
@ -154,6 +154,7 @@
storeId: '',
staffId: '',
carValueId: '',
cardFuleId: '',
shows: false,
money: '',
message: '',
@ -194,9 +195,7 @@
actinput: 0,
}
},
components: {
},
components: {},
onLoad(option) {
this.storeId = uni.getStorageSync("storeId")
this.actinput = option.id
@ -209,12 +208,67 @@
if (option.id == 1) {
console.log("囤油");
this.getFuelCars();
}
this.getStaffList()
},
methods: {
//
addFuleCarRecords() {
if (this.staffId == '') {
uni.showToast({
title: "员工为必填项",
icon: Error
})
return
}
console.log("2222222222", this.carValueId)
if (this.carValueId == '') {
uni.showToast({
title: "囤油卡为必填项",
icon: Error
})
return
}
request({
url: 'business/marketingActivity/cardFuelRecord/addFuleCarRecords',
method: 'post',
data: {
payType: 'WECHAT',
mtStaffId: this.staffId,
id: this.carValueId,
storeId: this.storeId,
cardFavorableId: this.cardFavorableId,
cardRecordId: this.cardRecordId
},
}).then(res => {
if (res.code === 200) {
let _this = this
console.log(res)
let payProvider = "wxpay"
_this.orderInfo = JSON.parse(res.data.reservedPayInfo);
uni.requestPayment({
// provider: 'wxpay' 'alipay'
provider: payProvider,
timeStamp: _this.orderInfo.timeStamp,
nonceStr: _this.orderInfo.nonceStr,
package: _this.orderInfo.package,
signType: 'MD5',
paySign: _this.orderInfo.paySign,
success: function(res) {
console.log('success:', res);
uni.reLaunch({
url: '/pagesRefuel/orderSuccess/index'
})
},
fail: function(err) {}
});
}
})
},
//
addValueCarRecords() {
if (this.staffId == '') {
@ -321,8 +375,10 @@
}
this.actindex = index
},
fuleindex(index, text, points, ) {
this.shuomingFList = []
fuleindex(index, text, points, id) {
this.shuomingFList = [];
this.carValueId = id;
console.log("1111111111", this.carValueId)
console.log(this.shuomingFList);
if (text) {
this.text = text
@ -368,17 +424,18 @@
//
getFuelCars() {
request({
url: 'business/marketingActivity/cardFuelDiesel',
url: 'business/marketingActivity/cardFuelDiesel/selectAllApplet',
method: 'get',
data: {
activeStatus: '1'
activeStatus: '1',
storeId: this.storeId,
},
}).then(res => {
this.cardValueList = []
if (res.code == 200) {
this.cardFuleList = res.data.records
this.fuleindex(0, res.data.records[0].rechargeBalance, res.data.records[0].points)
this.fuleindex(0, res.data.records[0].rechargeBalance, res.data.records[0].points, res.data
.records[0].id)
}
})
},

View File

@ -1,6 +1,6 @@
<template>
<view class="content">
<view class="container">
<view class="container" v-if="isExist">
<view class="my-header">
<view class="my-icons" @click="goBack"> <uni-icons type="left" size="16"></uni-icons> </view>
<view class="my-text">会员</view>
@ -136,6 +136,14 @@
<!-- </scroll-view> -->
</view>
</view>
<view class="container" v-else>
<view class="my-header">
<view class="my-icons" @click="goBack"> <uni-icons type="left" size="16"></uni-icons> </view>
<view class="my-text">会员</view>
<view class="my-icons"></view>
</view>
<view style="width:100%;height: 90vh;background-color: white;text-align: center;">当前店铺不存在会员等级信息</view>
</view>
</view>
</template>
@ -186,6 +194,8 @@
naturalGasRule:[],
//
chainStoreConfig: {},
//
isExist:false,
}
},
onLoad() {
@ -221,12 +231,17 @@
url: "business/userManager/userGrade/getGradeList/"+storeId,
method: 'get',
}).then((res) => {
this.userGradeList = res.data
this.userGrade = res.data[0]
if (res.data[0].preferential == '自定义优惠'){
this.gasolineRule = JSON.parse(res.data[0].gasolineRule)
this.dieselRule = JSON.parse(res.data[0].dieselRule)
this.naturalGasRule = JSON.parse(res.data[0].naturalGasRule)
if (res.data){
this.isExist = true
this.userGradeList = res.data
this.userGrade = res.data[0]
if (res.data[0].preferential == '自定义优惠'){
this.gasolineRule = JSON.parse(res.data[0].gasolineRule)
this.dieselRule = JSON.parse(res.data[0].dieselRule)
this.naturalGasRule = JSON.parse(res.data[0].naturalGasRule)
}
}else{
this.isExist = false
}
})
},

View File

@ -30,7 +30,10 @@
<view class="box-order" v-for="(item,index) in list" :key="index">
<view class="or-box-top">
<view class="">{{getStoreName(storeList,item.storeId)}}</view>
<view class="chengg">{{getPayName(payList,item.orderStatus)}}</view>
<!-- <view class="chengg">{{getPayName(payList,item.orderStatus)}}</view> -->
<view class="chengg" v-if="item.orderStatus=='paid'">已支付</view>
<view class="chengg" v-else-if="item.orderStatus=='payFail'">支付失败</view>
<view class="chengg" v-else>未支付</view>
</view>
<!-- <view class="but-box">
@ -160,7 +163,7 @@
this.getTapIndex(option.id)
// this.getMyOrder()
this.getStores()
this.getPayList()
// this.getPayList()
},
components: {
@ -245,6 +248,7 @@
url: "system/dict/data/type/pay_status",
method: 'get',
}).then((res) => {
console.log(res);
_this.payList = res.data
})
},

View File

@ -225,14 +225,14 @@
method: 'post',
data: map,
}).then(res => {
// console.log(res,_this.appltType)
console.log(res,_this.appltType)
let payProvider = "wxpay"
if (_this.appltType== "WECHAT"){
payProvider = "wxpay"
}else{
payProvider = "alipay"
}
if (res.data.data.reservedPayInfo!=null && res.data.data.reservedPayInfo!=""){
if (res.data.data.reservedPayInfo){
_this.orderInfo = JSON.parse(res.data.data.reservedPayInfo);
uni.requestPayment({
// provider: 'wxpay' 'alipay'

View File

@ -17,7 +17,7 @@
谢谢您对来个油惠的支持
</view>
<view @click="goBack" style="border: solid 1px #30a1ff;border-radius: 50px;margin: 20px auto;width: 150px;
height: 40px;line-height: 40px;color: #30a1ff;">返回首页</view>
height: 40px;line-height: 40px;color: #30a1ff;">{{timestamp}}s后返回首页</view>
</view>
</view>
</view>
@ -27,10 +27,27 @@
export default {
data() {
return {
timestamp:5,
}
},
onLoad() {
this.countdown()
},
methods: {
//
countdown(){
let _this = this
let timer = setInterval(() => {
// countdown1
_this.timestamp--;
// 0
if(_this.timestamp === 0) {
_this.goBack()
clearInterval(timer)
_this.timestamp = 5
}
}, 1000);
},
goBack() {
uni.reLaunch({
url: '/pages/index/index'