Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
a9b86ff520
@ -11,6 +11,6 @@ VUE_APP_BASE_API = '/dev-api'
|
||||
VUE_APP_PUBLIC_PATH = '/'
|
||||
|
||||
# 后端接口地址
|
||||
VUE_APP_SERVER_URL = 'http://192.168.0.178:8008/'
|
||||
VUE_APP_SERVER_URL = 'http://192.168.0.138:8080/'
|
||||
|
||||
# http://192.168.1.6:8008/
|
||||
|
@ -8,6 +8,15 @@ export function listMerchant() {
|
||||
})
|
||||
}
|
||||
|
||||
// 添加商户使用状态
|
||||
export function addMerchant(data) {
|
||||
return request({
|
||||
url: '/api/merchantConfig',
|
||||
method: 'post',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
// 修改商户使用状态
|
||||
export function editMerchant(data) {
|
||||
return request({
|
||||
@ -16,3 +25,20 @@ export function editMerchant(data) {
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
// 修改商户备注信息
|
||||
export function editMerchantRemark(data) {
|
||||
return request({
|
||||
url: '/api/merchantConfig/edit',
|
||||
method: 'post',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
// 根据id查询商户配置信息
|
||||
export function merchantInfo(id) {
|
||||
return request({
|
||||
url: '/api/merchantConfig/'+id,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
@ -59,3 +59,11 @@ export function delStaff(id) {
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 生成员工码
|
||||
export function createStaffQrCode(id) {
|
||||
return request({
|
||||
url: '/business/member/staff/qrCode/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
@ -447,6 +447,7 @@ import {
|
||||
oilNumber:{
|
||||
oilType: '汽油',
|
||||
oilName: '',
|
||||
numberId: '',
|
||||
oilPrice: '',
|
||||
gbPrice: '',
|
||||
receivingUnits: '元',
|
||||
@ -636,7 +637,7 @@ import {
|
||||
console.error(error);
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
// 选择油品类型之后触发
|
||||
oilTypeClick(data) {
|
||||
@ -646,12 +647,12 @@ import {
|
||||
// this.oilNumber.oilNameT = ''
|
||||
|
||||
const selectedValue = this.oilNumber.oilType;
|
||||
this.$forceUpdate();
|
||||
// this.getOilTypeList(selectedValue)
|
||||
this.getOilName(selectedValue)
|
||||
},
|
||||
|
||||
oilTypeClick2() {
|
||||
console.log("hellooooooooooooooooooo")
|
||||
this.oilNumber.oilName = ''
|
||||
this.oilNumber.oilNameT = ''
|
||||
},
|
||||
@ -699,6 +700,7 @@ import {
|
||||
|
||||
// 修改
|
||||
async updateOilNumberin(){
|
||||
console.log
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
var this_ = this
|
||||
@ -828,7 +830,7 @@ import {
|
||||
changeOilName() {
|
||||
this.oilNumber.oilName = this.oilNumber.oilNameT
|
||||
},
|
||||
|
||||
|
||||
getSecondName(){
|
||||
this.$forceUpdate();
|
||||
}
|
||||
|
@ -20,6 +20,7 @@
|
||||
</el-switch>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 20px"><el-button type="primary" icon="el-icon-plus" @click="addMerchant">添加商户信息</el-button></div>
|
||||
<div class="content-box">
|
||||
<!-- <el-card class="box-card" shadow="hover" v-for="(item,index) in 10" :key="index">-->
|
||||
<!-- <div slot="header" class="clearfix">-->
|
||||
@ -30,13 +31,14 @@
|
||||
<!-- </el-card>-->
|
||||
<el-card class="box-card" shadow="hover" v-for="item in merchantList" :key="item.id">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>{{ item.merchantName }}</span>
|
||||
<span><dict-tag :options="dict.type.payment_channel" :value="item.merchantName"/></span>
|
||||
<el-button v-if="item.isUse=='0'"
|
||||
@click="editStatus(item,1)"
|
||||
style="float: right; padding: 3px 0" type="text">切换为当前通道</el-button>
|
||||
<el-tag v-else effect="dark" type="success" style="float: right">当前使用中</el-tag>
|
||||
</div>
|
||||
<div>商户编号:{{ item.mchntCd }}</div>
|
||||
<div>商户编号: {{ item.mchntCd }}</div>
|
||||
<div>备注: <span style="color: #00afff;margin-left: 3px" @click="editRemark(item.id)">{{ item.remark ? item.remark : "--" }}</span></div>
|
||||
</el-card>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
@ -101,18 +103,67 @@
|
||||
<!-- </div>-->
|
||||
<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-select
|
||||
v-model="form1.merchantName"
|
||||
placeholder="全部"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.payment_channel"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商户号" :label-width="formLabelWidth">
|
||||
<el-input v-model="form1.mchntCd" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" :label-width="formLabelWidth">
|
||||
<el-input v-model="form1.remark" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitMerchant">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="title" :visible.sync="show" width="25%" style="margin-top: 200px">
|
||||
<span>请输入备注信息</span>
|
||||
<el-input placeholder="请输入备注信息" style="margin-top: 20px"
|
||||
v-model="merchantConfig.remark"
|
||||
clearable>
|
||||
</el-input>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="show = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitRemark">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 编辑通道规则-->
|
||||
<el-dialog title="编辑通道规则" :visible.sync="dialogFormVisible"
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible"
|
||||
width="30%">
|
||||
<el-form :model="form" ref="form">
|
||||
|
||||
<el-form-item label="支付通道" :label-width="formLabelWidth" width="300px">
|
||||
<el-select v-model="form.merchConfigId"
|
||||
@change="changeMerch"
|
||||
:disabled="isDis" placeholder="请选择商户信息">
|
||||
<el-option v-for="item in merchantList" :key="item.id"
|
||||
:label="item.merchantName"
|
||||
:value="item.id"></el-option>
|
||||
:disabled="isDis" placeholder="请选择商户信息" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in merchantList" :key="item.id"
|
||||
:label="item.merchantName"
|
||||
:value="item.id">
|
||||
<span style="float: left">
|
||||
<dict-tag :options="dict.type.payment_channel" :value="item.merchantName"/>
|
||||
</span>
|
||||
<span style="color: #00ff80">(111({{ item.remark ? item.remark : "--" }}))</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.mchntCd }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商户号" :label-width="formLabelWidth">
|
||||
@ -149,7 +200,13 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {editMerchant, listMerchant} from "@/api/payConfig/merchantconfig";
|
||||
import {
|
||||
addMerchant,
|
||||
editMerchant,
|
||||
editMerchantRemark,
|
||||
listMerchant,
|
||||
merchantInfo
|
||||
} from "@/api/payConfig/merchantconfig";
|
||||
import {
|
||||
addOilConfig,
|
||||
delOilConfig,
|
||||
@ -161,6 +218,7 @@ import {
|
||||
import {addUser, getUserMobile, updateUser} from "@/api/staff/user/user";
|
||||
|
||||
export default {
|
||||
dicts: ['payment_channel'],
|
||||
name: 'peizhi',
|
||||
data(){
|
||||
return{
|
||||
@ -183,17 +241,62 @@ export default {
|
||||
resource: '',
|
||||
desc: ''
|
||||
},
|
||||
form1:{},
|
||||
formLabelWidth: '70px',
|
||||
dialogFormVisible:false,
|
||||
dialogVisible:false,
|
||||
show:false,
|
||||
value:false,
|
||||
value1:true,
|
||||
labelPosition: 'singleDay',
|
||||
title:"",
|
||||
merchantConfig:{},
|
||||
rules:{
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods:{
|
||||
// 修改商户备注信息
|
||||
submitRemark(){
|
||||
editMerchantRemark(this.merchantConfig).then(res => {
|
||||
if (res.data===1){
|
||||
this.$modal.msgSuccess("修改成功")
|
||||
this.getList()
|
||||
this.show = false
|
||||
}
|
||||
})
|
||||
},
|
||||
// 打开修改商户备注信息对话框
|
||||
editRemark(id){
|
||||
this.title = "备注"
|
||||
this.show = true
|
||||
merchantInfo(id).then(res => {
|
||||
this.merchantConfig = res.data
|
||||
})
|
||||
},
|
||||
submitMerchant(){
|
||||
this.$refs["form1"].validate(valid => {
|
||||
if (valid) {
|
||||
addMerchant(this.form1).then(res => {
|
||||
if (res.data == 1){
|
||||
this.$modal.msgSuccess("添加成功");
|
||||
this.getList()
|
||||
this.dialogVisible = false
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 添加商户号信息
|
||||
addMerchant(){
|
||||
this.title = "添加商户信息"
|
||||
this.dialogVisible = true
|
||||
this.form1 = {}
|
||||
},
|
||||
// 删除支付配置信息
|
||||
deleteOilConfig(id){
|
||||
this.$confirm('确认删除此通道规则吗?', '提示', {
|
||||
@ -214,6 +317,7 @@ export default {
|
||||
},
|
||||
// 添加商户信息
|
||||
addOil(){
|
||||
this.title = "添加商户规则"
|
||||
this.dialogFormVisible = true;
|
||||
this.form = {
|
||||
name: '',
|
||||
@ -241,7 +345,7 @@ export default {
|
||||
if (valid) {
|
||||
if (this.form.id) {
|
||||
editOilConfig(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改会员成功");
|
||||
this.$modal.msgSuccess("修改通道成功");
|
||||
this.getList();
|
||||
this.dialogFormVisible = false;
|
||||
this.isDis = false;
|
||||
@ -251,7 +355,7 @@ export default {
|
||||
if (response.data==0){
|
||||
this.$modal.msgError("已存在当前通道商户号的规则");
|
||||
}else {
|
||||
this.$modal.msgSuccess("新增会员成功");
|
||||
this.$modal.msgSuccess("新增通道成功");
|
||||
this.getList();
|
||||
this.dialogFormVisible = false;
|
||||
this.isDis = false;
|
||||
@ -268,6 +372,7 @@ export default {
|
||||
},
|
||||
// 修改支付配置信息
|
||||
editOilConfig(id){
|
||||
this.title = "修改商户规则"
|
||||
this.isDis = true;
|
||||
this.dialogFormVisible = true;
|
||||
oilConfigInfo(id).then( response => {
|
||||
|
@ -72,16 +72,16 @@
|
||||
<dict-tag :options="dict.type.ywqx" :value="scope.row.refund"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="核销码" align="center" prop="writeOffCode">
|
||||
<template slot-scope="scope">
|
||||
<span @click="getQRcode(scope.row.writeOffCode,'woc')">
|
||||
<svg t="1701161298120" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4306" width="16" height="16"><path d="M384 64l-249.6 0c-51.2 0-89.6 41.6-89.6 89.6l0 227.2c0 51.2 41.6 89.6 89.6 89.6l249.6 0c51.2 0 89.6-41.6 89.6-89.6l0-227.2C473.6 105.6 435.2 64 384 64zM428.8 380.8c0 25.6-19.2 44.8-44.8 44.8l-249.6 0c-25.6 0-44.8-19.2-44.8-44.8l0-227.2c0-25.6 19.2-44.8 44.8-44.8l249.6 0c25.6 0 44.8 19.2 44.8 44.8L428.8 380.8z" p-id="4307"></path><path d="M192 192l134.4 0 0 134.4-134.4 0 0-134.4Z" p-id="4308"></path><path d="M377.6 544l-243.2 0c-48 0-86.4 38.4-86.4 89.6l0 220.8c0 48 38.4 89.6 86.4 89.6l243.2 0c48 0 86.4-38.4 86.4-89.6l0-220.8C467.2 582.4 425.6 544 377.6 544zM422.4 851.2c0 25.6-19.2 44.8-44.8 44.8l-243.2 0c-25.6 0-44.8-19.2-44.8-44.8l0-220.8c0-25.6 19.2-44.8 44.8-44.8l243.2 0c25.6 0 44.8 19.2 44.8 44.8L422.4 851.2z" p-id="4309"></path><path d="M192 668.8l131.2 0 0 131.2-131.2 0 0-131.2Z" p-id="4310"></path><path d="M633.6 470.4l249.6 0c51.2 0 89.6-41.6 89.6-89.6l0-227.2c0-51.2-41.6-89.6-89.6-89.6l-249.6 0c-51.2 0-89.6 41.6-89.6 89.6l0 227.2C544 432 585.6 470.4 633.6 470.4zM588.8 153.6c0-25.6 19.2-44.8 44.8-44.8l249.6 0c25.6 0 44.8 19.2 44.8 44.8l0 227.2c0 25.6-19.2 44.8-44.8 44.8l-249.6 0c-25.6 0-44.8-19.2-44.8-44.8L588.8 153.6z" p-id="4311"></path><path d="M700.8 192l134.4 0 0 134.4-134.4 0 0-134.4Z" p-id="4312"></path><path d="M572.8 716.8l137.6 0c12.8 0 22.4-9.6 22.4-22.4l0-137.6c0-12.8-9.6-22.4-22.4-22.4l-137.6 0c-12.8 0-22.4 9.6-22.4 22.4l0 137.6C550.4 707.2 560 716.8 572.8 716.8z" p-id="4313"></path><path d="M886.4 563.2l0 38.4c0 12.8 12.8 25.6 25.6 25.6l38.4 0c12.8 0 25.6-12.8 25.6-25.6l0-38.4c0-12.8-12.8-25.6-25.6-25.6l-38.4 0C899.2 537.6 886.4 547.2 886.4 563.2z" p-id="4314"></path><path d="M582.4 944l48 0c12.8 0 22.4-9.6 22.4-22.4l0-48c0-12.8-9.6-22.4-22.4-22.4l-48 0c-12.8 0-22.4 9.6-22.4 22.4l0 48C560 934.4 569.6 944 582.4 944z" p-id="4315"></path><path d="M944 704l-99.2 0c-16 0-28.8 12.8-28.8 28.8l0 44.8-48 0c-19.2 0-32 12.8-32 32l0 99.2c0 16 12.8 28.8 28.8 28.8l179.2 3.2c16 0 28.8-12.8 28.8-28.8l0-179.2C972.8 716.8 960 704 944 704z" p-id="4316"></path></svg>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="核销码" align="center" prop="writeOffCode">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span @click="getQRcode(scope.row.writeOffCode,'woc')">-->
|
||||
<!-- <svg t="1701161298120" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4306" width="16" height="16"><path d="M384 64l-249.6 0c-51.2 0-89.6 41.6-89.6 89.6l0 227.2c0 51.2 41.6 89.6 89.6 89.6l249.6 0c51.2 0 89.6-41.6 89.6-89.6l0-227.2C473.6 105.6 435.2 64 384 64zM428.8 380.8c0 25.6-19.2 44.8-44.8 44.8l-249.6 0c-25.6 0-44.8-19.2-44.8-44.8l0-227.2c0-25.6 19.2-44.8 44.8-44.8l249.6 0c25.6 0 44.8 19.2 44.8 44.8L428.8 380.8z" p-id="4307"></path><path d="M192 192l134.4 0 0 134.4-134.4 0 0-134.4Z" p-id="4308"></path><path d="M377.6 544l-243.2 0c-48 0-86.4 38.4-86.4 89.6l0 220.8c0 48 38.4 89.6 86.4 89.6l243.2 0c48 0 86.4-38.4 86.4-89.6l0-220.8C467.2 582.4 425.6 544 377.6 544zM422.4 851.2c0 25.6-19.2 44.8-44.8 44.8l-243.2 0c-25.6 0-44.8-19.2-44.8-44.8l0-220.8c0-25.6 19.2-44.8 44.8-44.8l243.2 0c25.6 0 44.8 19.2 44.8 44.8L422.4 851.2z" p-id="4309"></path><path d="M192 668.8l131.2 0 0 131.2-131.2 0 0-131.2Z" p-id="4310"></path><path d="M633.6 470.4l249.6 0c51.2 0 89.6-41.6 89.6-89.6l0-227.2c0-51.2-41.6-89.6-89.6-89.6l-249.6 0c-51.2 0-89.6 41.6-89.6 89.6l0 227.2C544 432 585.6 470.4 633.6 470.4zM588.8 153.6c0-25.6 19.2-44.8 44.8-44.8l249.6 0c25.6 0 44.8 19.2 44.8 44.8l0 227.2c0 25.6-19.2 44.8-44.8 44.8l-249.6 0c-25.6 0-44.8-19.2-44.8-44.8L588.8 153.6z" p-id="4311"></path><path d="M700.8 192l134.4 0 0 134.4-134.4 0 0-134.4Z" p-id="4312"></path><path d="M572.8 716.8l137.6 0c12.8 0 22.4-9.6 22.4-22.4l0-137.6c0-12.8-9.6-22.4-22.4-22.4l-137.6 0c-12.8 0-22.4 9.6-22.4 22.4l0 137.6C550.4 707.2 560 716.8 572.8 716.8z" p-id="4313"></path><path d="M886.4 563.2l0 38.4c0 12.8 12.8 25.6 25.6 25.6l38.4 0c12.8 0 25.6-12.8 25.6-25.6l0-38.4c0-12.8-12.8-25.6-25.6-25.6l-38.4 0C899.2 537.6 886.4 547.2 886.4 563.2z" p-id="4314"></path><path d="M582.4 944l48 0c12.8 0 22.4-9.6 22.4-22.4l0-48c0-12.8-9.6-22.4-22.4-22.4l-48 0c-12.8 0-22.4 9.6-22.4 22.4l0 48C560 934.4 569.6 944 582.4 944z" p-id="4315"></path><path d="M944 704l-99.2 0c-16 0-28.8 12.8-28.8 28.8l0 44.8-48 0c-19.2 0-32 12.8-32 32l0 99.2c0 16 12.8 28.8 28.8 28.8l179.2 3.2c16 0 28.8-12.8 28.8-28.8l0-179.2C972.8 716.8 960 704 944 704z" p-id="4316"></path></svg>-->
|
||||
<!-- </span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="员工码" align="center" prop="staffCode">
|
||||
<template slot-scope="scope">
|
||||
<span @click="getQRcode(scope.row.writeOffCode,'staffCode')">
|
||||
<span @click="getStaffQRcode(scope.row.id)">
|
||||
<svg t="1701161298120" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4306" width="16" height="16"><path d="M384 64l-249.6 0c-51.2 0-89.6 41.6-89.6 89.6l0 227.2c0 51.2 41.6 89.6 89.6 89.6l249.6 0c51.2 0 89.6-41.6 89.6-89.6l0-227.2C473.6 105.6 435.2 64 384 64zM428.8 380.8c0 25.6-19.2 44.8-44.8 44.8l-249.6 0c-25.6 0-44.8-19.2-44.8-44.8l0-227.2c0-25.6 19.2-44.8 44.8-44.8l249.6 0c25.6 0 44.8 19.2 44.8 44.8L428.8 380.8z" p-id="4307"></path><path d="M192 192l134.4 0 0 134.4-134.4 0 0-134.4Z" p-id="4308"></path><path d="M377.6 544l-243.2 0c-48 0-86.4 38.4-86.4 89.6l0 220.8c0 48 38.4 89.6 86.4 89.6l243.2 0c48 0 86.4-38.4 86.4-89.6l0-220.8C467.2 582.4 425.6 544 377.6 544zM422.4 851.2c0 25.6-19.2 44.8-44.8 44.8l-243.2 0c-25.6 0-44.8-19.2-44.8-44.8l0-220.8c0-25.6 19.2-44.8 44.8-44.8l243.2 0c25.6 0 44.8 19.2 44.8 44.8L422.4 851.2z" p-id="4309"></path><path d="M192 668.8l131.2 0 0 131.2-131.2 0 0-131.2Z" p-id="4310"></path><path d="M633.6 470.4l249.6 0c51.2 0 89.6-41.6 89.6-89.6l0-227.2c0-51.2-41.6-89.6-89.6-89.6l-249.6 0c-51.2 0-89.6 41.6-89.6 89.6l0 227.2C544 432 585.6 470.4 633.6 470.4zM588.8 153.6c0-25.6 19.2-44.8 44.8-44.8l249.6 0c25.6 0 44.8 19.2 44.8 44.8l0 227.2c0 25.6-19.2 44.8-44.8 44.8l-249.6 0c-25.6 0-44.8-19.2-44.8-44.8L588.8 153.6z" p-id="4311"></path><path d="M700.8 192l134.4 0 0 134.4-134.4 0 0-134.4Z" p-id="4312"></path><path d="M572.8 716.8l137.6 0c12.8 0 22.4-9.6 22.4-22.4l0-137.6c0-12.8-9.6-22.4-22.4-22.4l-137.6 0c-12.8 0-22.4 9.6-22.4 22.4l0 137.6C550.4 707.2 560 716.8 572.8 716.8z" p-id="4313"></path><path d="M886.4 563.2l0 38.4c0 12.8 12.8 25.6 25.6 25.6l38.4 0c12.8 0 25.6-12.8 25.6-25.6l0-38.4c0-12.8-12.8-25.6-25.6-25.6l-38.4 0C899.2 537.6 886.4 547.2 886.4 563.2z" p-id="4314"></path><path d="M582.4 944l48 0c12.8 0 22.4-9.6 22.4-22.4l0-48c0-12.8-9.6-22.4-22.4-22.4l-48 0c-12.8 0-22.4 9.6-22.4 22.4l0 48C560 934.4 569.6 944 582.4 944z" p-id="4315"></path><path d="M944 704l-99.2 0c-16 0-28.8 12.8-28.8 28.8l0 44.8-48 0c-19.2 0-32 12.8-32 32l0 99.2c0 16 12.8 28.8 28.8 28.8l179.2 3.2c16 0 28.8-12.8 28.8-28.8l0-179.2C972.8 716.8 960 704 944 704z" p-id="4316"></path></svg>
|
||||
</span>
|
||||
</template>
|
||||
@ -112,11 +112,11 @@
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="更新时间" align="center" prop="updateTime" width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.updateTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="更新时间" align="center" prop="updateTime" width="150">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{ parseTime(scope.row.updateTime) }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@ -161,12 +161,14 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="角色组" prop="roleId">
|
||||
<el-select v-model="form.roleId" placeholder="请选择角色">
|
||||
<el-option
|
||||
v-for="item in roleList"
|
||||
:key="item.dutyId"
|
||||
:label="item.dutyName"
|
||||
:value="item.dutyId"
|
||||
></el-option>
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in roleList"-->
|
||||
<!-- :key="item.dutyId"-->
|
||||
<!-- :label="item.dutyName"-->
|
||||
<!-- :value="item.dutyId"-->
|
||||
<!-- ></el-option>-->
|
||||
<el-option value="普通员工">普通员工</el-option>
|
||||
<el-option value="收银员">收银员</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -571,7 +573,7 @@
|
||||
<script>
|
||||
import QRCode from 'qrcode'
|
||||
import {getName} from "../../utils/fuint";
|
||||
import {addStaff, delStaff, getStaff, listStaff, queryStaff, updateStaff} from "@/api/staff/staff";
|
||||
import {addStaff, createStaffQrCode, delStaff, getStaff, listStaff, queryStaff, updateStaff} from "@/api/staff/staff";
|
||||
import {getDuty, listDuty} from "@/api/staff/duty";
|
||||
|
||||
export default {
|
||||
@ -728,6 +730,13 @@ export default {
|
||||
// this.getStoreList();
|
||||
},
|
||||
methods: {
|
||||
// 获取员工码
|
||||
getStaffQRcode(id){
|
||||
console.log(id)
|
||||
createStaffQrCode(id).then(res => {
|
||||
console.log(res)
|
||||
})
|
||||
},
|
||||
// 根据字符串获取二维码图片url地址
|
||||
getQRcode(code,name){
|
||||
this.type = name;
|
||||
|
@ -152,7 +152,7 @@ export default {
|
||||
getStore() {
|
||||
ljStoreInfo().then(response => {
|
||||
this.store = response.data
|
||||
console.log(response.data)
|
||||
// console.log(response.data)
|
||||
this.$emit("getUrl",this.store)
|
||||
this.form.lat = this.store.latitude;
|
||||
this.form.lng = this.store.longitude;
|
||||
|
@ -357,7 +357,7 @@ export default {
|
||||
getAccountList(this.queryParams).then(response => {
|
||||
console.log(response);
|
||||
this.userList = response.data.records;
|
||||
this.total = response.data.total;
|
||||
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
|
@ -11,7 +11,5 @@ VUE_APP_BASE_API = '/dev-api'
|
||||
VUE_APP_PUBLIC_PATH = '/'
|
||||
|
||||
# 后端接口地址
|
||||
VUE_APP_SERVER_URL = 'http://192.168.0.178:8008'
|
||||
VUE_APP_SERVER_URL = 'http://192.168.0.138:8080/'
|
||||
|
||||
# # cp端地址
|
||||
# VUE_PC_SERVER_URL = 'http://192.168.1.6:82/'
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-col :span="7">
|
||||
<el-card style="margin-right: 20px">
|
||||
<div class="left-box">
|
||||
<div class="title-h">组织架构</div>
|
||||
@ -27,7 +27,7 @@
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="19">
|
||||
<el-col :span="17">
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="用户信息" name="list">
|
||||
@ -116,19 +116,20 @@
|
||||
width="160"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<!-- v-hasPermi="['system:account:edit']" -->
|
||||
<!-- v-hasPermi="['system:account:delete']" -->
|
||||
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-hasPermi="['system:account:edit']"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
v-hasPermi="['system:account:delete']"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:account:resetPwd', 'system:account:edit']">
|
||||
|
@ -275,7 +275,8 @@
|
||||
return{
|
||||
dataForm:{coverImage:''},
|
||||
// 上传地址
|
||||
uploadAction: 'http://192.168.0.178:8008/backendApi/file/upload',
|
||||
// uploadAction: 'http://192.168.0.178:8008/backendApi/file/upload',
|
||||
uploadAction: process.env.VUE_APP_SERVER_URL+'/backendApi/file/upload',
|
||||
uploadHeader: { 'Access-Token' : getToken() },
|
||||
// 隐藏上传
|
||||
hideUpload: false,
|
||||
|
@ -160,7 +160,7 @@ export default {
|
||||
loginForm: {
|
||||
tel:null,
|
||||
telcode:null,
|
||||
username: "oil_admin",
|
||||
username: "admin_pt01",
|
||||
password: "123456",
|
||||
rememberMe: false,
|
||||
captchaCode: "",
|
||||
|
@ -355,8 +355,8 @@ export default {
|
||||
getList() {
|
||||
this.loading = true;
|
||||
getAccountList(this.queryParams).then(response => {
|
||||
this.userList = response.data.content;
|
||||
this.total = response.data.totalElements;
|
||||
this.userList = response.data.records;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
|
@ -183,7 +183,12 @@
|
||||
<artifactId>aliyun-java-sdk-dysmsapi</artifactId>
|
||||
<version>2.1.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 二维码所需依赖-->
|
||||
<dependency>
|
||||
<groupId>com.google.zxing</groupId>
|
||||
<artifactId>core</artifactId>
|
||||
<version>3.3.3</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
@ -9,6 +9,7 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 商户配置信息 controller层
|
||||
@ -45,4 +46,33 @@ public class MerchantConfigController extends BaseController {
|
||||
int row = merchantConfigService.updateMerchStatus(merchantConfig);
|
||||
return getSuccessResult(row);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加商户配置信息
|
||||
* @param merchantConfig
|
||||
* @return
|
||||
*/
|
||||
@PostMapping
|
||||
public ResponseObject add(@RequestBody MerchantConfig merchantConfig){
|
||||
return getSuccessResult(merchantConfigService.insertMerch(merchantConfig));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商户备注信息
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
public ResponseObject selectMerchant(@PathVariable Integer id){
|
||||
return getSuccessResult(merchantConfigService.selectMerchById(id));
|
||||
}
|
||||
/**
|
||||
* 修改商户备注信息
|
||||
* @param merchantConfig
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/edit")
|
||||
public ResponseObject editMerchantRemark(@RequestBody MerchantConfig merchantConfig){
|
||||
return getSuccessResult(merchantConfigService.updateMerchRemark(merchantConfig));
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,30 @@
|
||||
package com.fuint.api.fuyou.entity;
|
||||
|
||||
/**
|
||||
* 公共商户信息
|
||||
*/
|
||||
public class FuYouPublicMerchant {
|
||||
// 机构号
|
||||
public static String insCd = "08K0069065";
|
||||
// 公钥
|
||||
public static String publicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCmQr0jkE9LmCFm/o7Gv2FMXbCyQunOEDgMSxcr\n" +
|
||||
"QavrvZW4qAL3mHwo8qkJnv4N4cVZcbwQmDziLYTncs60wwpWEN4w63gHxr7BMDPzESBF/q9smVSb\n" +
|
||||
"SKL+rWzIBEqEvtNuRje64VJivII5RaTdm7OTvt10yt+G/7xkSAlFCBJ85wIDAQAB";
|
||||
// 私钥
|
||||
public static String privateKey = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAKZCvSOQT0uYIWb+jsa/YUxdsLJC\n" +
|
||||
"6c4QOAxLFytBq+u9lbioAveYfCjyqQme/g3hxVlxvBCYPOIthOdyzrTDClYQ3jDreAfGvsEwM/MR\n" +
|
||||
"IEX+r2yZVJtIov6tbMgESoS+025GN7rhUmK8gjlFpN2bs5O+3XTK34b/vGRICUUIEnznAgMBAAEC\n" +
|
||||
"gYBtriVcKr1E301ZxqCl2Gb1m/EPCDl5aRWwdnEIZkBmOiFlOeELOZre4IZHBI4Q1ln8kZ1BTU0M\n" +
|
||||
"4H6GuSRH90r/PJ/PDsdEnMkPAu3YuakfEqUtypNxTAYZ4kHo1ZL3LfCJxtENV8BYkRHEL9VKD7rA\n" +
|
||||
"W5tFk1Ww1Q6/zJVs0zGhMQJBAPCdZqG8BwoDcQyZFcrqk1aeXFsGqVQL/9cbrl1TNeVTUZLykbuZ\n" +
|
||||
"SsOiluDm15EABUP1Exb6cTuoizK57naYf0MCQQCw5D4g0QboKQL5JPZP8fpaQn3Y8uN/tSWnpYfu\n" +
|
||||
"0+T1zkZFeR/z6kkfQ9yyWXgjeJ2i7QRVJalOvoR46QKl/zeNAkBJfMlLvFGqDUMJxfeR8fLuEY/D\n" +
|
||||
"fVVaBhAtcpbeift7/uZ7Kvq3gSoEdjP+nIJaFteE2eTqr7LFtcRNydu6/PhhAkAt01NNCRmy9zzv\n" +
|
||||
"8mVlHJjw3RzhITtSkEkq/zUR6A7+puuJf/GJLP64fMol4gu/lLWxyZk/vbv4zF5hPGwVOOLZAkEA\n" +
|
||||
"iPtSRaIgYkbP2JOWFaoKbwBa3Jo261yQlpPpprLEcUyxCok4bjlbY6cAWmx1hkJ21OmLSbyhb+zi\n" +
|
||||
"vJOlcnXvVw==";
|
||||
// 微信appid
|
||||
public static String appid = "wxd8014eaf9bd72e93";
|
||||
// 支付宝appid
|
||||
public static String alipayAppid = "2021004130635045";
|
||||
}
|
@ -70,5 +70,9 @@ public class MerchantConfig extends BaseEntity implements Serializable {
|
||||
* 支付宝小程序appid
|
||||
*/
|
||||
private String alipayAppid;
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
private String remark;
|
||||
}
|
||||
|
||||
|
@ -69,4 +69,18 @@ public interface MerchantConfigService extends IService<MerchantConfig> {
|
||||
* @return
|
||||
*/
|
||||
public int updateMerchIsOpen(String isOpenRule);
|
||||
|
||||
/**
|
||||
* 根据id修改用户备注信息
|
||||
* @param merchantConfig
|
||||
* @return
|
||||
*/
|
||||
public int updateMerchRemark(MerchantConfig merchantConfig);
|
||||
|
||||
/**
|
||||
* 添加商户配置信息
|
||||
* @param merchantConfig
|
||||
* @return
|
||||
*/
|
||||
public int insertMerch(MerchantConfig merchantConfig);
|
||||
}
|
||||
|
@ -332,8 +332,8 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
Map<String, Object> res = new HashMap<>();
|
||||
try {
|
||||
// 查询商户配置信息
|
||||
// MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(receiveParameter.getStoreId());
|
||||
MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(16);
|
||||
MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(receiveParameter.getStoreId());
|
||||
// MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(16);
|
||||
// 查询用户信息
|
||||
LJUserVo userVo = userService.selectUserById(receiveParameter.getUserId());
|
||||
|
||||
|
@ -2,6 +2,7 @@ package com.fuint.api.fuyou.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.api.fuyou.entity.FuYouPublicMerchant;
|
||||
import com.fuint.api.fuyou.entity.MerchantConfig;
|
||||
import com.fuint.api.fuyou.mapper.MerchantConfigMapper;
|
||||
import com.fuint.api.fuyou.service.MerchantConfigService;
|
||||
@ -107,4 +108,27 @@ public class MerchantConfigServiceImpl extends ServiceImpl<MerchantConfigMapper,
|
||||
}
|
||||
return row;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateMerchRemark(MerchantConfig merchantConfig) {
|
||||
return baseMapper.updateById(merchantConfig);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertMerch(MerchantConfig merchantConfig) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
merchantConfig.setStoreId(nowAccountInfo.getStoreId());
|
||||
if (merchantConfig.getMerchantName().equals("富友")){
|
||||
merchantConfig.setInsCd(FuYouPublicMerchant.insCd);
|
||||
merchantConfig.setPublicKey(FuYouPublicMerchant.publicKey);
|
||||
merchantConfig.setPrivateKey(FuYouPublicMerchant.privateKey);
|
||||
}
|
||||
merchantConfig.setAppid(FuYouPublicMerchant.appid);
|
||||
merchantConfig.setAlipayAppid(FuYouPublicMerchant.alipayAppid);
|
||||
merchantConfig.setIsUse("0");
|
||||
merchantConfig.setIsOpenRule("0");
|
||||
merchantConfig.setAmount(0.0);
|
||||
int row = baseMapper.insert(merchantConfig);
|
||||
return row;
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,10 @@ public class OilConfigServiceImpl extends ServiceImpl<OilConfigMapper, OilConfig
|
||||
|
||||
@Override
|
||||
public void oilRule() {
|
||||
List<OilConfig> list = baseMapper.selectList(null);
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("store_id",nowAccountInfo.getStoreId());
|
||||
List<OilConfig> list = baseMapper.selectList(queryWrapper);
|
||||
Double amountAll = 0.0;
|
||||
// 百分占比
|
||||
List<Double> proList = new ArrayList<>();
|
||||
@ -62,7 +65,10 @@ public class OilConfigServiceImpl extends ServiceImpl<OilConfigMapper, OilConfig
|
||||
public int judgmentProportion() {
|
||||
int result = 0;
|
||||
int percentage = 0;
|
||||
List<OilConfig> list = baseMapper.selectList(null);
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("store_id",nowAccountInfo.getStoreId());
|
||||
List<OilConfig> list = baseMapper.selectList(queryWrapper);
|
||||
for (OilConfig config : list) {
|
||||
percentage += config.getProportion();
|
||||
}
|
||||
|
@ -10,4 +10,25 @@ public interface IndexBannerService {
|
||||
* @return
|
||||
*/
|
||||
List<IndexBanner> selectIndexBannerList(int storeId);
|
||||
|
||||
/**
|
||||
* 根据路由地址查询首页banner图是否存在
|
||||
* @param routeUrl
|
||||
* @return
|
||||
*/
|
||||
IndexBanner selectIndexBannerByRouteUrl(String routeUrl);
|
||||
|
||||
/**
|
||||
* 添加首页banner图
|
||||
* @param indexBanner
|
||||
* @return
|
||||
*/
|
||||
int insertIndexBanner(IndexBanner indexBanner);
|
||||
|
||||
/**
|
||||
* 修改首页banner图
|
||||
* @param indexBanner
|
||||
* @return
|
||||
*/
|
||||
int updateIndexBanner(IndexBanner indexBanner);
|
||||
}
|
||||
|
@ -1,11 +1,13 @@
|
||||
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.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.indexBanner.entity.IndexBanner;
|
||||
import com.fuint.business.indexBanner.mapper.IndexBannerMapper;
|
||||
import com.fuint.business.indexBanner.service.IndexBannerService;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.StringUtils;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -19,4 +21,36 @@ public class IndexBannerServiceImpl extends ServiceImpl<IndexBannerMapper, Index
|
||||
queryWrapper.eq("store_id",storeId);
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IndexBanner selectIndexBannerByRouteUrl(String routeUrl) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("route_url",routeUrl);
|
||||
return baseMapper.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertIndexBanner(IndexBanner indexBanner) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
indexBanner.setStoreId(nowAccountInfo.getStoreId());
|
||||
int row = 0;
|
||||
if (StringUtils.isEmpty(indexBanner.getRouteUrl())){
|
||||
indexBanner.setBannerUrl("http://47.95.206.185:83/topbj.png");
|
||||
indexBanner.setRouteUrl("/pagesHome/Activity/index");
|
||||
row = baseMapper.insert(indexBanner);
|
||||
}else {
|
||||
IndexBanner indexBanner1 = this.selectIndexBannerByRouteUrl(indexBanner.getRouteUrl());
|
||||
if (ObjectUtil.isNotEmpty(indexBanner1)){
|
||||
row = 0;
|
||||
}else {
|
||||
row = baseMapper.insert(indexBanner);
|
||||
}
|
||||
}
|
||||
return row;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateIndexBanner(IndexBanner indexBanner) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -85,6 +85,7 @@
|
||||
left join integral_gift ig ON io.gift_id = ig.id
|
||||
left join mt_user_express_address ea ON io.address_id = ea.id
|
||||
<where>
|
||||
io.store_id = #{integralOrders.storeId}
|
||||
|
||||
<if test="integralOrders.giftName != null">
|
||||
and ig.gift_name like CONCAT ('%',#{integralOrders.giftName},'%')
|
||||
|
@ -344,6 +344,7 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
|
||||
|
||||
integralOrders.setOrderNumber(orderNo);
|
||||
integralOrders.setStatus(status);
|
||||
integralOrders.setUserId(nowAccountInfo.getId());
|
||||
}
|
||||
integralOrdersDao.insertBatch(integralOrdersList.getIntegralOrdersList());
|
||||
|
||||
|
@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -70,6 +71,12 @@ public class LJStaffController extends BaseController {
|
||||
return getSuccessResult(staff);
|
||||
}
|
||||
|
||||
@GetMapping("/qrCode/{id}")
|
||||
public ResponseObject createStaffQrCode(HttpServletRequest request, @PathVariable Integer id){
|
||||
mtStaffService.createStaffQrCode(id,request);
|
||||
return getSuccessResult("ok");
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询员工信息
|
||||
* @param map
|
||||
|
@ -107,7 +107,7 @@ public class LJStaff extends BaseEntity implements Serializable {
|
||||
private String pos;
|
||||
|
||||
@ApiModelProperty("角色id")
|
||||
private Integer roleId;
|
||||
private String roleId;
|
||||
|
||||
@ApiModelProperty("登入密码")
|
||||
@TableField(exist = false)
|
||||
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.business.member.entity.LJStaff;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -64,6 +65,8 @@ public interface ILJStaffService extends IService<LJStaff> {
|
||||
*/
|
||||
public int updateStaff(LJStaff staff);
|
||||
|
||||
public void createStaffQrCode(int id, HttpServletRequest request);
|
||||
|
||||
/**
|
||||
* 设定安全的密码,生成随机的salt并经过1024次 sha-1 hash
|
||||
*/
|
||||
|
@ -8,22 +8,32 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.member.entity.LJStaff;
|
||||
import com.fuint.business.member.mapper.LJStaffMapper;
|
||||
import com.fuint.business.member.service.ILJStaffService;
|
||||
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.util.StringUtils;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import com.fuint.module.backendApi.controller.BackendFileController;
|
||||
import com.fuint.repository.model.TAccount;
|
||||
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.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import static com.fuint.business.member.utils.QrCodeUtils.createLogoCodePicture;
|
||||
|
||||
/**
|
||||
* 员工管理 业务层
|
||||
*/
|
||||
@ -125,6 +135,10 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
|
||||
}
|
||||
int row = baseMapper.insert(staff);
|
||||
LJStaff staff1 = this.selectStaffByMobile(staff.getMobile());
|
||||
// 添加员工码
|
||||
staff1.setStaffCode("https://www.tuofeng.cc/oilRefuel?storeId="+storeId+"&staffId="+staff1.getId());
|
||||
this.updateStaff(staff1);
|
||||
|
||||
// 添加账户信息
|
||||
TAccount account = new TAccount();
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||
@ -160,6 +174,31 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
|
||||
return row;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private ILJStoreService storeService;
|
||||
@Autowired
|
||||
private BackendFileController backendFileController;
|
||||
|
||||
@Override
|
||||
public void createStaffQrCode(int id, HttpServletRequest request) {
|
||||
// 根据id查询员工信息和店铺信息
|
||||
LJStaff staff = this.selectStaffById(id);
|
||||
LJStore store = storeService.selectStoreByStoreId(staff.getStoreId());
|
||||
//在图片上生成二维码
|
||||
String backgroundImage = "D:/ruoyi/qrCode/cailibao_bg.jpg";
|
||||
String logoImage = "D:/ruoyi/qrCode/logo.png";
|
||||
String url = staff.getStaffCode();
|
||||
String area = store.getName();
|
||||
String finalPath="D:/ruoyi/qrCode/" + area + ".jpg";
|
||||
//背景图片路径 loge图片 二维码 输出地址
|
||||
createLogoCodePicture(backgroundImage, logoImage, url, finalPath, area,store.getAddress());
|
||||
|
||||
// 返回图片路径
|
||||
ResponseObject responseObject = backendFileController.uploadFileLocal(request);
|
||||
System.out.println(responseObject.getData());
|
||||
// staff.setStaffCode("/statics"+url1.split("/statics")[1]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void entryptPassword(LJStaff staff) {
|
||||
byte[] salt = Digests.generateSalt(8);
|
||||
|
@ -0,0 +1,95 @@
|
||||
package com.fuint.business.member.utils;
|
||||
|
||||
import cn.hutool.extra.qrcode.QrCodeUtil;
|
||||
import cn.hutool.extra.qrcode.QrConfig;
|
||||
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
|
||||
import org.springframework.util.ResourceUtils;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.*;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* @Description: QrCodeUtils
|
||||
* @Author xiaoyafeng
|
||||
* @Date 2023/1/12 0012 13:38
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class QrCodeUtils {
|
||||
/***
|
||||
* 在一张背景图上添加二维码
|
||||
*/
|
||||
public static void createLogoCodePicture(String roundImage, String logoImage, String url, String outImgPath, String storeName, String storeNumber) {
|
||||
try {
|
||||
// 读取原图片信息
|
||||
//得到文件
|
||||
File file = ResourceUtils.getFile(roundImage);
|
||||
//文件转化为图片
|
||||
Image srcImg = ImageIO.read(file);
|
||||
//获取图片的宽
|
||||
int srcImgWidth = srcImg.getWidth(null);
|
||||
//获取图片的高
|
||||
int srcImgHeight = srcImg.getHeight(null);
|
||||
// 加水印
|
||||
BufferedImage bufImg = new BufferedImage(srcImgWidth, srcImgHeight, BufferedImage.TYPE_INT_RGB);
|
||||
Graphics2D g = bufImg.createGraphics();
|
||||
g.drawImage(srcImg, 0, 0, srcImgWidth, srcImgHeight, null);
|
||||
//使用工具类生成二维码
|
||||
Image image = createQrCode(logoImage, url, 360, 360);
|
||||
//将小图片绘到大图片上,500,300 .表示你的小图片在大图片上的位置。
|
||||
g.drawImage(image, 260, 320, null);
|
||||
// 设置字体,样式,字体大小
|
||||
g.setFont(new Font("TimesRoman", Font.BOLD, 50));
|
||||
//设置颜色。
|
||||
g.setColor(Color.BLACK);
|
||||
// 店铺名称位置文字绘制到指定位置
|
||||
g.drawString(storeName, 290, 880);
|
||||
// // 将码牌编号文字绘制到指定位置
|
||||
g.drawString(storeNumber, 290, 800);
|
||||
g.dispose();
|
||||
// 输出图片
|
||||
|
||||
FileOutputStream outImgStream = new FileOutputStream(outImgPath);
|
||||
ImageIO.write(bufImg, "jpg", outImgStream);
|
||||
outImgStream.flush();
|
||||
outImgStream.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 将字符串转为二维码
|
||||
*
|
||||
* @param roundImage
|
||||
* @param url
|
||||
* @param width
|
||||
* @param height
|
||||
* @return
|
||||
* @throws IOException
|
||||
*/
|
||||
private static BufferedImage createQrCode(String roundImage, String url, int width, int height) throws IOException {
|
||||
QrConfig config = new QrConfig(width, height);
|
||||
Image image = ImageIO.read(new FileInputStream(roundImage));
|
||||
config.setImg(image);
|
||||
config.setMargin(1);
|
||||
config.setErrorCorrection(ErrorCorrectionLevel.H);
|
||||
return QrCodeUtil.generate(url, config);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
//在图片上生成二维码
|
||||
String backgroundImage = "D:/ruoyi/qrCode/laigeyouhui_bg.jpg";
|
||||
String logoImage = "D:/ruoyi/qrCode/logo.png";
|
||||
String url = "https://www.baidu.com";
|
||||
String area = "来个油慧测试店铺";
|
||||
String room = "lgyh15487";
|
||||
String outImgPath = "D:/ruoyi/qrCode/" + area + ".jpg";
|
||||
//背景图片路径 loge图片 二维码 输出地址 病区 病房号 床号
|
||||
createLogoCodePicture(backgroundImage, logoImage, url, outImgPath, area, room);
|
||||
}
|
||||
}
|
@ -52,6 +52,16 @@ public class QRCodeController extends BaseController {
|
||||
return getSuccessResult(qrCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加门店二维码信息
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public ResponseObject addQrCode(){
|
||||
QRCode qrCode = new QRCode();
|
||||
return getSuccessResult(iqrCodeService.insertQRCode(qrCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除二维码信息
|
||||
* @return
|
||||
|
@ -1,14 +1,20 @@
|
||||
package com.fuint.business.storeInformation.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.service.IndexBannerService;
|
||||
import com.fuint.business.storeInformation.entity.LJStore;
|
||||
import com.fuint.business.storeInformation.entity.QRCode;
|
||||
import com.fuint.business.storeInformation.mapper.QRCodeMapper;
|
||||
import com.fuint.business.storeInformation.service.ILJStoreService;
|
||||
import com.fuint.business.storeInformation.service.IQRCodeService;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
@ -58,6 +64,11 @@ public class QRCodeServiceImpl extends ServiceImpl<QRCodeMapper, QRCode> impleme
|
||||
baseMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private ILJStoreService storeService;
|
||||
@Autowired
|
||||
private IndexBannerService indexBannerService;
|
||||
|
||||
/**
|
||||
* 增加二维码信息
|
||||
* @param qrCode
|
||||
@ -65,10 +76,24 @@ public class QRCodeServiceImpl extends ServiceImpl<QRCodeMapper, QRCode> impleme
|
||||
*/
|
||||
@Override
|
||||
public int insertQRCode(QRCode qrCode) {
|
||||
// 查询是否存在当前门店二维码信息
|
||||
QRCode qrCode1 = this.selectQRCode();
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
Integer storeId = nowAccountInfo.getStoreId();
|
||||
qrCode.setStoreId(storeId);
|
||||
int row = baseMapper.insert(qrCode);
|
||||
LJStore store = storeService.selectStoreByStoreId(nowAccountInfo.getStoreId());
|
||||
int row = 0;
|
||||
if (ObjectUtil.isEmpty(qrCode1)){
|
||||
qrCode.setStoreId(store.getId());
|
||||
qrCode.setChainStoreId(store.getChainStoreId());
|
||||
// 带有店铺id 跳转首页
|
||||
qrCode.setCollection("https://www.tuofeng.cc/oilIndex?storeId="+store.getChainStoreId());
|
||||
// 带有店铺id 跳转一键加油页面
|
||||
qrCode.setPayment("https://www.tuofeng.cc/oilRefuel?storeId="+store.getChainStoreId());
|
||||
row = baseMapper.insert(qrCode);
|
||||
IndexBanner indexBanner = new IndexBanner();
|
||||
indexBannerService.insertIndexBanner(indexBanner);
|
||||
}else {
|
||||
row = 0;
|
||||
}
|
||||
return row;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.fuint.system.dept.controller;
|
||||
|
||||
|
||||
import com.fuint.business.storeInformation.entity.QRCode;
|
||||
import com.fuint.business.storeInformation.service.IQRCodeService;
|
||||
import com.fuint.common.constant.UserConstants;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.StringUtils;
|
||||
@ -59,6 +61,9 @@ public class SysDeptController extends BaseController
|
||||
return getSuccessResult(deptService.selectDeptById(deptId));
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private IQRCodeService iqrCodeService;
|
||||
|
||||
/**
|
||||
* 新增部门
|
||||
*/
|
||||
@ -68,6 +73,8 @@ public class SysDeptController extends BaseController
|
||||
{
|
||||
return getFailureResult("新增部门'" + dept.getDeptName() + "'失败,部门名称已存在");
|
||||
}
|
||||
QRCode qrCode = new QRCode();
|
||||
iqrCodeService.insertQRCode(qrCode);
|
||||
return getSuccessResult(deptService.insertDept(dept));
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectDictDataByType" resultMap="SysDictDataResult">
|
||||
<include refid="selectDictDataVo"/>
|
||||
where status = '0' and dict_type = #{dictType} order by dict_sort asc
|
||||
where status = 'qy' and dict_type = #{dictType} order by dict_sort asc
|
||||
</select>
|
||||
|
||||
<select id="selectDictLabel" resultType="String">
|
||||
|
@ -186,7 +186,7 @@
|
||||
let str = q.split("?")[1];
|
||||
let arr = str.split("&");
|
||||
|
||||
let storeId = "12";
|
||||
let storeId = "19";
|
||||
|
||||
let staffId = "";
|
||||
arr.forEach(item => {
|
||||
@ -201,12 +201,12 @@
|
||||
this.storeId = uni.getStorageSync("storeId")
|
||||
this.staffId = uni.getStorageSync("inviteStaffId")
|
||||
} else {
|
||||
|
||||
let storeId = "12";
|
||||
|
||||
uni.setStorageSync("storeId", storeId)
|
||||
this.storeId = uni.getStorageSync("storeId")
|
||||
|
||||
if (uni.getStorageSync("storeId")){
|
||||
this.storeId = uni.getStorageSync("storeId")
|
||||
}else{
|
||||
let storeId = "19";
|
||||
uni.setStorageSync("storeId", storeId)
|
||||
}
|
||||
}
|
||||
// this.isExistStoreId();
|
||||
|
||||
|
@ -115,7 +115,7 @@
|
||||
<script>
|
||||
import config from '@/config'
|
||||
import request from '../../utils/request'
|
||||
|
||||
import BigNumber from 'bignumber.js'
|
||||
export default {
|
||||
|
||||
|
||||
@ -247,7 +247,7 @@
|
||||
fail: function(err) {
|
||||
request({
|
||||
url: "business/integral/integralOrders/editPayStatus",
|
||||
method: 'post',
|
||||
method: 'get',
|
||||
data: {
|
||||
"orderNo": res.data.data.orderNo,
|
||||
"status": "payFail",
|
||||
@ -340,6 +340,7 @@
|
||||
},
|
||||
// 金额计算
|
||||
allData() {
|
||||
|
||||
this.allPoints = 0
|
||||
this.allAmout = 0
|
||||
let allPoints = new BigNumber(0)
|
||||
@ -370,24 +371,22 @@
|
||||
// let markPurchases = new BigNumber(data.markPurchases);
|
||||
// let exchangePoints = allPoints.multipliedBy(new BigNumber(data.exchangePoints));
|
||||
// 拿到总的积分
|
||||
this.myPoints = this.myPoints ? this.member.points : 0
|
||||
this.myPoints = this.myPoints ? this.myPoints : 0
|
||||
let points = this.myPoints - allPoints; // 使用 toNumber() 获取 BigNumber 的数值
|
||||
|
||||
console.log("myPoints", this.myPoints)
|
||||
console.log("points", points)
|
||||
// 以及分等一多少
|
||||
if (points < 0) {
|
||||
if (points <= 0) {
|
||||
|
||||
// 计算需要的金额
|
||||
points = Math.abs(points);
|
||||
|
||||
|
||||
this.allAmout = points * this.goodsInfo.moneyRatio.toFixed(2); // 直接使用 JavaScript 中的乘法
|
||||
// this.allAmout = allAmout.toFixed(2);
|
||||
// this.allAmout = Number(allAmout).toFixed(2);
|
||||
|
||||
this.allPoints = this.myPoints;
|
||||
} else {
|
||||
|
||||
this.allAmout = 0
|
||||
this.allPoints = exchangePoints.toNumber();
|
||||
this.allPoints = allPoints;
|
||||
}
|
||||
return
|
||||
}
|
||||
@ -426,6 +425,7 @@
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.myPoints = res.data.points
|
||||
this.allData()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -62,7 +62,7 @@
|
||||
if (res.code==200){
|
||||
uni.showToast({
|
||||
title:"反馈成功!",
|
||||
icon:none,
|
||||
icon:"none",
|
||||
})
|
||||
this.reset()
|
||||
}
|
||||
|
@ -72,7 +72,6 @@
|
||||
let _this = this;
|
||||
let tempFilePath = e.detail.avatarUrl //上传的图片地址
|
||||
let maxSizeInBytes = 1024*1024 //限制大小
|
||||
console.log(111)
|
||||
uni.getFileInfo({
|
||||
filePath:tempFilePath,
|
||||
success(res) {
|
||||
@ -94,7 +93,7 @@
|
||||
_this.user.avatar = res.data.fileName
|
||||
_this.editUser()
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
// 修改用户信息
|
||||
@ -127,7 +126,9 @@
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
uni.navigateBack()
|
||||
uni.navigateTo({
|
||||
url:"/pages/my/my"
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user