Merge branch 'master' of http://192.168.31.244:3000/byx/oilSystem
This commit is contained in:
commit
a63ec4f751
45
fuintAdmin/src/api/fleet/fleetinfo.js
Normal file
45
fuintAdmin/src/api/fleet/fleetinfo.js
Normal file
@ -0,0 +1,45 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 分页查询所有的订单信息
|
||||
export function getFleetInfoList(query) {
|
||||
return request({
|
||||
url: 'fleetInfo',
|
||||
method: 'get',
|
||||
params: query
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
// 分页查询所有的订单信息
|
||||
export function getFleetInfo(id) {
|
||||
return request({
|
||||
url: 'fleetInfo/'+id,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 分页查询所有的订单信息
|
||||
export function addFleetInfo(data) {
|
||||
return request({
|
||||
url: 'fleetInfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 分页查询所有的订单信息
|
||||
export function editFleetInfo(data) {
|
||||
return request({
|
||||
url: 'fleetInfo',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 分页查询所有的订单信息
|
||||
export function deleteFleetInfo(id) {
|
||||
return request({
|
||||
url: 'fleetInfo/'+id,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
45
fuintAdmin/src/api/fleet/fleetmember.js
Normal file
45
fuintAdmin/src/api/fleet/fleetmember.js
Normal file
@ -0,0 +1,45 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 分页查询所有的订单信息
|
||||
export function getFleetMemberList(query) {
|
||||
return request({
|
||||
url: 'fleetMember',
|
||||
method: 'get',
|
||||
params: query
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
// 分页查询所有的订单信息
|
||||
export function getFleetMember(id) {
|
||||
return request({
|
||||
url: 'fleetMember/'+id,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 分页查询所有的订单信息
|
||||
export function addFleetMember(data) {
|
||||
return request({
|
||||
url: 'fleetMember',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 分页查询所有的订单信息
|
||||
export function editFleetMember(data) {
|
||||
return request({
|
||||
url: 'fleetMember',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 分页查询所有的订单信息
|
||||
export function deleteFleetMember(id) {
|
||||
return request({
|
||||
url: 'fleetMember/'+id,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
40
fuintAdmin/src/api/staff/user/userlabel.js
Normal file
40
fuintAdmin/src/api/staff/user/userlabel.js
Normal file
@ -0,0 +1,40 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询会员标签列表
|
||||
export function listUserLabel(query) {
|
||||
return request({
|
||||
url: '/userLabel',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 根据id查询会员标签
|
||||
export function getUserLabel(id) {
|
||||
return request({
|
||||
url: '/userLabel/'+id,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
// 添加会员标签
|
||||
export function addUserLabel(data) {
|
||||
return request({
|
||||
url: '/userLabel',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 修改会员标签
|
||||
export function editUserLabel(data) {
|
||||
return request({
|
||||
url: '/userLabel',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 删除会员标签
|
||||
export function deleteUserLabel(id) {
|
||||
return request({
|
||||
url: '/userLabel/'+id,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
@ -282,7 +282,7 @@ export default {
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 3px 6px 1px rgba(0,0,0,0.1);
|
||||
//box-shadow: 0px 3px 6px 1px rgba(0,0,0,0.1);
|
||||
box-sizing: border-box;
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
|
100
fuintAdmin/src/views/fleet/index.vue
Normal file
100
fuintAdmin/src/views/fleet/index.vue
Normal file
@ -0,0 +1,100 @@
|
||||
<template>
|
||||
<div class="app-center">
|
||||
<div class="app-top">
|
||||
<el-card :body-style="{ padding: '0px' }">
|
||||
<div class="box">
|
||||
<div class="nbox" :class="pointerClass" @click="updateRedio('车队信息')">
|
||||
<div class="fount-box" :style="{ color: radio1 === '车队信息' ? '#FF770F' : '#999999' }">车队信息</div>
|
||||
<div class="heng-box" v-if="radio1 == '车队信息'"></div>
|
||||
<div class="heng-box" style="background-color: #FFFFFF" v-else></div>
|
||||
|
||||
</div>
|
||||
<div class="nbox" :class="pointerClass" @click="updateRedio('车队成员')">
|
||||
<div class="fount-box" :style="{ color: radio1 === '车队成员' ? '#FF770F' : '#999999' }">车队成员</div>
|
||||
<div class="heng-box" v-if="radio1 == '车队成员'"></div>
|
||||
<div class="heng-box" style="background-color: #FFFFFF" v-else></div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<fleetInfo v-if="radio1 === '车队信息'"></fleetInfo>
|
||||
<fleetMember v-if="radio1 === '车队成员'"></fleetMember>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import fleetInfo from "@/views/fleet/tab/fleetInfo.vue";
|
||||
import fleetMember from "@/views/fleet/tab/fleetMember.vue";
|
||||
export default {
|
||||
data(){
|
||||
return{
|
||||
radio1:'车队信息',
|
||||
pointerClass() {
|
||||
return 'pointer-cursor';
|
||||
}
|
||||
}
|
||||
},
|
||||
components:{
|
||||
fleetInfo,
|
||||
fleetMember
|
||||
},
|
||||
methods: {
|
||||
handleClick(tab, event) {
|
||||
console.log(tab, event);
|
||||
},
|
||||
updateRedio(data) {
|
||||
console.log(this.radio1)
|
||||
this.radio1 = data
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.app-center{
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
//padding: 10px;
|
||||
background: #f6f8f9;
|
||||
}
|
||||
.app-top{
|
||||
width: 100%;
|
||||
//margin-bottom: 20px;
|
||||
height: 50px;
|
||||
box-sizing: border-box;
|
||||
padding: 0px;
|
||||
}
|
||||
.el-card__body, .el-main {
|
||||
padding: 0px;
|
||||
}
|
||||
.box{
|
||||
cursor: pointer;
|
||||
margin-top: 10px ;
|
||||
margin-left: 50px;
|
||||
//height: 40px;
|
||||
display: flex;
|
||||
background-color: #FFFFFF;
|
||||
align-items: center;
|
||||
//border: 1px solid #EBEEF5;
|
||||
}
|
||||
.nbox{
|
||||
margin-right: 30px;
|
||||
}
|
||||
.fount-box{
|
||||
font-size: 14px;
|
||||
color: #999999
|
||||
}
|
||||
.fount-box2{
|
||||
font-size: 14px;
|
||||
color: #999999
|
||||
}
|
||||
.heng-box{
|
||||
background-color: #FF770F;
|
||||
width: 100%;
|
||||
height: 2px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
490
fuintAdmin/src/views/fleet/tab/fleetInfo.vue
Normal file
490
fuintAdmin/src/views/fleet/tab/fleetInfo.vue
Normal file
@ -0,0 +1,490 @@
|
||||
<!-- 收银台订单-->
|
||||
<template>
|
||||
<div style="padding-top: 15px;padding-bottom: 10px; padding-right: 40px; background: #f6f8f9;">
|
||||
<el-card class="box-card" shadow="never">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="120px">
|
||||
|
||||
<el-form-item label="" prop="deptId" style="width: 180px">
|
||||
<el-input
|
||||
v-model="queryParams.realName"
|
||||
placeholder="请输入车队名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="deptId" style="width: 180px">
|
||||
<el-select
|
||||
v-model="queryParams.deptId"
|
||||
clearable
|
||||
placeholder="请选择车队等级"
|
||||
>
|
||||
<el-option v-for="item in deptList" :key="item.id" :label="item.deptName" :value="item.deptId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="status" style="width: 180px">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
placeholder="请选择状态"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.zhzt"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="">
|
||||
<el-date-picker
|
||||
v-model="beginTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="开始日期">
|
||||
</el-date-picker>
|
||||
至
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item style="float: right">
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" @click="handleAdd">新增车队</el-button>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
|
||||
|
||||
<!-- </el-card>-->
|
||||
<!-- <el-card class="box-card" style="min-height: 500px;" shadow="never">-->
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
:data="orderList"
|
||||
style="width: 100%">
|
||||
<el-table-column type="index" width="50" align="center" label="序号"/>
|
||||
<el-table-column prop="storeName" align="center" label="车队名称"></el-table-column>
|
||||
<el-table-column prop="parentName" align="center" label="卡名称"></el-table-column>
|
||||
<el-table-column prop="payMoney" align="center" label="车队负责人"></el-table-column>
|
||||
<el-table-column prop="count" align="center" label="手机号"></el-table-column>
|
||||
<el-table-column prop="refMoney" align="center" label="会员等级"></el-table-column>
|
||||
<el-table-column prop="refCount" align="center" label="油站负责人"></el-table-column>
|
||||
<el-table-column align="center" prop="date" label="总余额"></el-table-column>
|
||||
<el-table-column align="center" prop="date" label="充值本金"></el-table-column>
|
||||
<el-table-column align="center" prop="date" label="赠送金额"></el-table-column>
|
||||
<el-table-column align="center" prop="date" label="公司名称"></el-table-column>
|
||||
<el-table-column align="center" prop="date" label="状态">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.status"
|
||||
active-value="qy"
|
||||
inactive-value="jy"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="date" label="备注"></el-table-column>
|
||||
<el-table-column align="center" prop="date" label="创建人"></el-table-column>
|
||||
<el-table-column align="center" prop="date" label="创建时间"></el-table-column>
|
||||
<el-table-column align="center" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleRecharge(scope.row)"
|
||||
>车队充值</el-button>
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- @click="handleDelete(scope.row)"-->
|
||||
<!-- >删除</el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<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="open" width="30%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
|
||||
<el-form-item label="车队名称" prop="realName">
|
||||
<el-input v-model="form.realName" placeholder="请输入车队名称" maxlength="30" style="width: 270px"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="卡类型" prop="gongneng">
|
||||
<!-- <el-checkbox-group v-model="form.gongneng">-->
|
||||
<el-checkbox v-model="form.gongneng" label="储值卡"></el-checkbox>
|
||||
<el-checkbox v-model="form.gongneng" label="囤油卡"></el-checkbox>
|
||||
<!-- </el-checkbox-group>-->
|
||||
</el-form-item>
|
||||
<el-form-item label="车队负责人" prop="pinpai">
|
||||
<el-input v-model="form.pinpai" placeholder="请输入车队负责人姓名" maxlength="30" style="width: 270px"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="手机号" prop="zhongduan">
|
||||
<el-input v-model="form.zhongduan" placeholder="请输入手机号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="会员等级" prop="miyao">
|
||||
<el-select v-model="form1.zhongduan" placeholder="请选择会员等级">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="油站负责人" prop="miyao">
|
||||
<el-select v-model="form1.zhongduan" placeholder="请选择油站负责人">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员标签" prop="miyao">
|
||||
<el-select v-model="form1.zhongduan" placeholder="请选择会员标签">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="关联员工" prop="staffId">
|
||||
<el-input v-model="form.staffId" placeholder="请输入关联员工" />
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="用户状态" prop="status">
|
||||
<el-switch
|
||||
v-model="form.status"
|
||||
active-value="qy"
|
||||
inactive-value="jy"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备注" >
|
||||
<el-input v-model="form.desc" placeholder="请输入备注" type="textarea"/>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 添加或修改对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open1" width="30%" append-to-body>
|
||||
<el-form ref="form1" :model="form1" :rules="rules" label-width="120px">
|
||||
|
||||
<el-form-item label="车队名称" prop="realName">
|
||||
<el-input v-model="form1.realName" placeholder="请输入车队名称" maxlength="30" style="width: 270px"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="充值金额" prop="pinpai">
|
||||
<el-input v-model="form1.pinpai" placeholder="请输入充值金额" maxlength="30" style="width: 270px">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="赠送金额" prop="zhongduan">
|
||||
<el-input v-model="form1.zhongduan" placeholder="请输入赠送金额" >
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="支付方式" prop="miyao">
|
||||
<el-select v-model="form1.zhongduan" placeholder="请选择支付方式">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备注" >
|
||||
<el-input v-model="form1.desc" placeholder="请输入备注" type="textarea"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作密码" prop="miyao">
|
||||
<el-input v-model="form1.miyao" placeholder="请输入操作密码" type="password" />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm1">确 定</el-button>
|
||||
<el-button @click="cancel1">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {delStaff} from "@/api/staff/staff";
|
||||
|
||||
export default {
|
||||
dicts: ['zhzt'],
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
open:false,
|
||||
open1:false,
|
||||
title:'',
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
beginTime: "",
|
||||
endTime: "",
|
||||
// 收银台订单列表
|
||||
orderList: [],
|
||||
deptList: [],
|
||||
form:{},
|
||||
form1:{},
|
||||
options: [{
|
||||
value: '选项1',
|
||||
label: '黄金糕'
|
||||
}, {
|
||||
value: '选项2',
|
||||
label: '双皮奶'
|
||||
}, {
|
||||
value: '选项3',
|
||||
label: '蚵仔煎'
|
||||
}, {
|
||||
value: '选项4',
|
||||
label: '龙须面'
|
||||
}, {
|
||||
value: '选项5',
|
||||
label: '北京烤鸭'
|
||||
}],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
total: 0,
|
||||
// 表单校验
|
||||
rules: {
|
||||
realName: [
|
||||
{required: true, message: "设备名称不能为空", trigger: "blur"},
|
||||
],
|
||||
pinpai: [
|
||||
{required: true, message: "品牌不能为空", trigger: "blur"},
|
||||
],
|
||||
gongneng: [
|
||||
{required: true, message: "设备功能不能为空", trigger: "blur"}
|
||||
],
|
||||
zhongduan: [
|
||||
{required: true, message: "设备终端号不能为空", trigger: "blur"}
|
||||
],
|
||||
miyao: [
|
||||
{required: true, message: "密钥不能为空", trigger: "blur"}
|
||||
],
|
||||
staffId: [
|
||||
{required: true, message: "关联员工不能为空", trigger: "blur"}
|
||||
],
|
||||
status: [
|
||||
{required: true, message: "状态不能为空", trigger: "blur"}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
|
||||
},
|
||||
methods: {
|
||||
getDeptList() {
|
||||
// getRunningWaterByTissueApi(this.addDateRange(this.queryParams)).then(response => {
|
||||
// this.deptList = response.data.records;
|
||||
// })
|
||||
},
|
||||
// 获取列表信息
|
||||
getList() {
|
||||
let dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 提交按钮
|
||||
submitForm: function () {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (!this.form.id) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel1() {
|
||||
this.open1 = false;
|
||||
this.reset();
|
||||
},
|
||||
// 提交按钮
|
||||
submitForm1: function () {
|
||||
this.$refs["form1"].validate(valid => {
|
||||
if (valid) {
|
||||
if (!this.form1.id) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 新增按钮操作
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "新增员工";
|
||||
},
|
||||
// 搜索按钮操作
|
||||
handleQuery() {
|
||||
this.queryParams.page = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 重置按钮操作
|
||||
resetQuery() {
|
||||
this.dateRange = [];
|
||||
this.queryParams = {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
this.handleQuery();
|
||||
},
|
||||
// 修改按钮操作
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
},
|
||||
// 修改按钮操作
|
||||
handleRecharge(row) {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.resetForm("form");
|
||||
},
|
||||
// 删除按钮操作
|
||||
handleDelete(row) {
|
||||
const name = row.realName || this.id;
|
||||
this.$modal.confirm('是否确认删除"' + name + '"的员工信息?').then(function() {
|
||||
return delStaff(row.id);
|
||||
}).then(() => {
|
||||
this.queryParams.page = 1
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.box-card {
|
||||
width: 100%;
|
||||
margin: 0px 20px 20px 20px;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.el-form--inline .el-form-item {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.table-box {
|
||||
width: 100%;
|
||||
height: 73vh;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.wrap-boxs {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.k_ {
|
||||
width: 250px;
|
||||
height: 75px;
|
||||
margin-right: 20px;
|
||||
box-sizing: border-box;
|
||||
padding: 15px 10px;
|
||||
padding-top: 5px;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.size_ {
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.title_ {
|
||||
font-weight: 600;
|
||||
font-size: 24px;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.d-s {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.anniu-h {
|
||||
width: 80px;
|
||||
height: 26px;
|
||||
background: #FAFAFA;
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
border: 1px solid #DDDDDD;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #777777;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.anniu-act {
|
||||
background: #FF9655 !important;
|
||||
border: 1px solid #FF9655 !important;
|
||||
color: #fff;
|
||||
|
||||
}
|
||||
|
||||
</style>
|
703
fuintAdmin/src/views/fleet/tab/fleetMember.vue
Normal file
703
fuintAdmin/src/views/fleet/tab/fleetMember.vue
Normal file
@ -0,0 +1,703 @@
|
||||
<!-- 收银台订单-->
|
||||
<template>
|
||||
<div style="padding-top: 15px;padding-bottom: 10px; padding-right: 40px; background: #f6f8f9;">
|
||||
<el-card class="box-card" shadow="never">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="120px">
|
||||
|
||||
<el-form-item label="" prop="deptId" style="width: 180px">
|
||||
<el-input
|
||||
v-model="queryParams.realName"
|
||||
placeholder="请输入车队名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="deptId" style="width: 180px">
|
||||
<el-select
|
||||
v-model="queryParams.deptId"
|
||||
clearable
|
||||
placeholder="请选择副卡类型"
|
||||
>
|
||||
<el-option v-for="item in deptList" :key="item.id" :label="item.deptName" :value="item.deptId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="status" style="width: 180px">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
placeholder="请选择状态"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.zhzt"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="">
|
||||
<el-date-picker
|
||||
v-model="beginTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="开始日期">
|
||||
</el-date-picker>
|
||||
至
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item style="float: right">
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" @click="handleAdd">新增成员</el-button>
|
||||
<el-button type="primary" @click="batchAdd">批量增加</el-button>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
|
||||
|
||||
<!-- </el-card>-->
|
||||
<!-- <el-card class="box-card" style="min-height: 500px;" shadow="never">-->
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
:data="orderList"
|
||||
style="width: 100%">
|
||||
<el-table-column type="index" width="50" align="center" label="序号"/>
|
||||
<el-table-column prop="storeName" align="center" label="车队名称"></el-table-column>
|
||||
<el-table-column prop="parentName" align="center" label="姓名"></el-table-column>
|
||||
<el-table-column prop="payMoney" align="center" label="手机号"></el-table-column>
|
||||
<el-table-column prop="count" align="center" label="会员卡号"></el-table-column>
|
||||
<el-table-column prop="refMoney" align="center" label="副卡类型"></el-table-column>
|
||||
<el-table-column prop="refCount" align="center" label="车牌号"></el-table-column>
|
||||
<el-table-column align="center" prop="date" label="可用余额"></el-table-column>
|
||||
<el-table-column align="center" prop="date" label="备注"></el-table-column>
|
||||
<el-table-column align="center" prop="date" label="状态">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.status"
|
||||
active-value="qy"
|
||||
inactive-value="jy"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="date" label="创建人"></el-table-column>
|
||||
<el-table-column align="center" prop="date" label="创建时间"></el-table-column>
|
||||
<el-table-column align="center" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleRecharge(scope.row)"
|
||||
>额度管理</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleRecharge(scope.row)"
|
||||
>注销副卡</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleRecharge(scope.row)"
|
||||
>消费记录</el-button>
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- @click="handleDelete(scope.row)"-->
|
||||
<!-- >删除</el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<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="open" width="30%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
|
||||
<el-form-item label="车队名称" prop="realName">
|
||||
<el-select v-model="form1.zhongduan" placeholder="请选择车队名称">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="姓名" prop="pinpai">
|
||||
<el-input v-model="form.pinpai" placeholder="请输入成员姓名" maxlength="30" style="width: 270px"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="手机号码" prop="zhongduan">
|
||||
<el-input v-model="form.zhongduan" placeholder="请输入手机号码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="会员卡号" prop="zhongduan">
|
||||
<el-input v-model="form.zhongduan" placeholder="请输入会员卡号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="副卡类型" prop="miyao">
|
||||
<el-select v-model="form1.zhongduan" placeholder="请选择副卡类型">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="油站负责人" prop="miyao">
|
||||
<el-select v-model="form1.zhongduan" placeholder="请选择油站负责人">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌号" prop="staffId">
|
||||
<el-input v-model="form.staffId" placeholder="请输入车牌号码" />
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="用户状态" prop="status">
|
||||
<el-switch
|
||||
v-model="form.status"
|
||||
active-value="qy"
|
||||
inactive-value="jy"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备注" >
|
||||
<el-input v-model="form.desc" placeholder="请输入备注" type="textarea"/>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 添加或修改对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open1" width="30%" append-to-body>
|
||||
<el-form ref="form1" :model="form1" :rules="rules" label-width="120px">
|
||||
|
||||
<el-form-item label="副卡额度" prop="realName">
|
||||
<el-input v-model="form1.realName" placeholder="0.0" maxlength="30" style="width: 270px">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="已用额度" prop="pinpai">
|
||||
<el-input v-model="form1.pinpai" placeholder="0.0" maxlength="30" style="width: 270px">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="剩余额度" prop="zhongduan">
|
||||
<el-input v-model="form1.zhongduan" placeholder="0.0" >
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="调整类型" prop="gongneng">
|
||||
<!-- <el-checkbox-group v-model="form.gongneng">-->
|
||||
<el-checkbox v-model="form.gongneng" label="增加" value="0"></el-checkbox>
|
||||
<el-checkbox v-model="form.gongneng" label="扣除" value="1"></el-checkbox>
|
||||
<!-- </el-checkbox-group>-->
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="调整额度" prop="zhongduan">
|
||||
<el-input v-model="form1.zhongduan" placeholder="0.0" >
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备注" >
|
||||
<el-input v-model="form1.desc" placeholder="请输入备注" type="textarea"/>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 添加或修改对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open1" width="30%" append-to-body>
|
||||
<el-form ref="form1" :model="form1" :rules="rules" label-width="120px">
|
||||
|
||||
<el-form-item label="副卡额度" prop="realName">
|
||||
<el-input v-model="form1.realName" placeholder="0.0" maxlength="30" style="width: 270px">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="已用额度" prop="pinpai">
|
||||
<el-input v-model="form1.pinpai" placeholder="0.0" maxlength="30" style="width: 270px">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="剩余额度" prop="zhongduan">
|
||||
<el-input v-model="form1.zhongduan" placeholder="0.0" >
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作密码" prop="miyao">
|
||||
<el-input v-model="form1.miyao" placeholder="请输入操作密码" type="password" />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 批量添加用户认证信息 -->
|
||||
<el-dialog :title="title" :visible.sync="open2" width="30%"
|
||||
:close-on-click-modal="false" append-to-body>
|
||||
<el-form ref="form2" :model="form2" :rules="rules">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="车队名称" prop="fixingLevelId">
|
||||
<el-select
|
||||
v-model="form2.fixingLevelId"
|
||||
placeholder="请选择车队名称"
|
||||
clearable
|
||||
>
|
||||
<el-option v-for="item in options" :key="item.id+''" :label="item.name" :value="item.id"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="margin: 50px 0;display: flex">
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
v-loading="uploading"
|
||||
action="/fuint-application/business/userManager/certifiedMember/import"
|
||||
:headers="headers"
|
||||
:limit="1"
|
||||
:on-change="handleChange"
|
||||
style="margin-left: 50px"
|
||||
:file-list="fileList">
|
||||
<div style="display: flex;margin-left: 20px">
|
||||
<div style="position: relative" >
|
||||
<img src="@/assets/images/scimg.png" style="width: 167px;height: 144px;">
|
||||
<div style=" width: 100%; position: absolute;left: 50%;transform: translate(-50%,50%);bottom: 36px"> <span style="color: #FF9655">点击导入</span> 文件</div>
|
||||
</div>
|
||||
<div style="margin-top: 120px">
|
||||
<a style="margin-left: 50px;color: #FF9655;"
|
||||
href="/fuint-application/business/userManager/certifiedMember/export"> 导入模板下载.xlsx </a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <el-button size="small" type="success" icon="el-icon-upload">点击上传</el-button>-->
|
||||
<div slot="tip" style="margin-top: 20px;color: grey;font-size: 12px;line-height: 20px">
|
||||
只能上传xls/xlsx文件,批量导入会员手机号,单次最大支持5000个会员手机号认证,请确保用户手机号已注册为油站会员(在会员列表已显示),否则无法添加成员信息
|
||||
</div>
|
||||
</el-upload>
|
||||
|
||||
</div>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitFormMembers">导 入</el-button>
|
||||
<el-button @click="cancelMembers">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-drawer
|
||||
title="提成记录"
|
||||
:visible.sync="drawer"
|
||||
direction="rtl"
|
||||
size="60%"
|
||||
:before-close="handleClose">
|
||||
<div style="display: grid; place-items: center;">
|
||||
<el-card class="box-card">
|
||||
<el-form :model="queryParams2" ref="queryForm" size="small" :inline="true" label-width="68px">
|
||||
<el-form-item label="订单类型">
|
||||
<el-select
|
||||
v-model="queryParams2.type"
|
||||
clearable
|
||||
placeholder="全部"
|
||||
>
|
||||
<el-option label="油品订单提成" :value="1"></el-option>
|
||||
<el-option label="商品订单提成" :value="2"></el-option>
|
||||
<el-option label="储值卡充值提成" :value="3"></el-option>
|
||||
<el-option label="囤油卡充值提成" :value="4"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单号">
|
||||
<el-input v-model="queryParams2.orderNo" placeholder="请输入订单号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery1">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery1">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="box-card" style="margin-top: 15px">
|
||||
<div style="margin-top: 20px" v-if="activeName=='staffCommission'">
|
||||
<el-table ref="tables" v-loading="loading" :data="commissionList">
|
||||
<el-table-column type="index" width="80" align="center" label="序号"/>
|
||||
<el-table-column label="类型" prop="type" align="center" >
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.type==1">油品订单提成</span>
|
||||
<span v-if="scope.row.type==2">商品订单提成</span>
|
||||
<span v-if="scope.row.type==3">储值卡充值提成</span>
|
||||
<span v-if="scope.row.type==4">囤油卡充值提成</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="提成金额(元)" prop="amount" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.amount || 0 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="关联订单号" prop="orderNo" align="center" width="260"/>
|
||||
<el-table-column label="描述" prop="description" align="center"/>
|
||||
<el-table-column label="创建时间" prop="createTime" align="center" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total2>0"
|
||||
:total="total2"
|
||||
:page.sync="queryParams2.page"
|
||||
:limit.sync="queryParams2.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {delStaff} from "@/api/staff/staff";
|
||||
import {getToken} from "@/utils/auth";
|
||||
import {addCertifiedMembers} from "@/api/staff/user/certifiedmember";
|
||||
|
||||
export default {
|
||||
dicts: ['zhzt'],
|
||||
data() {
|
||||
return {
|
||||
headers: {
|
||||
'Access-Token': getToken(),
|
||||
},
|
||||
uploading: false,
|
||||
// 文件上传信息
|
||||
fileList: [],
|
||||
loading: false,
|
||||
open:false,
|
||||
open1:false,
|
||||
open2:false,
|
||||
title:'',
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
beginTime: "",
|
||||
endTime: "",
|
||||
// 收银台订单列表
|
||||
orderList: [],
|
||||
deptList: [],
|
||||
form:{},
|
||||
form1:{},
|
||||
form2:{},
|
||||
options: [{
|
||||
value: '选项1',
|
||||
label: '黄金糕'
|
||||
}, {
|
||||
value: '选项2',
|
||||
label: '双皮奶'
|
||||
}, {
|
||||
value: '选项3',
|
||||
label: '蚵仔煎'
|
||||
}, {
|
||||
value: '选项4',
|
||||
label: '龙须面'
|
||||
}, {
|
||||
value: '选项5',
|
||||
label: '北京烤鸭'
|
||||
}],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
queryParams2: {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
// 弹出层
|
||||
drawer: false,
|
||||
total: 0,
|
||||
total2: 0,
|
||||
// 表单校验
|
||||
rules: {
|
||||
realName: [
|
||||
{required: true, message: "设备名称不能为空", trigger: "blur"},
|
||||
],
|
||||
pinpai: [
|
||||
{required: true, message: "品牌不能为空", trigger: "blur"},
|
||||
],
|
||||
gongneng: [
|
||||
{required: true, message: "设备功能不能为空", trigger: "blur"}
|
||||
],
|
||||
zhongduan: [
|
||||
{required: true, message: "设备终端号不能为空", trigger: "blur"}
|
||||
],
|
||||
miyao: [
|
||||
{required: true, message: "密钥不能为空", trigger: "blur"}
|
||||
],
|
||||
staffId: [
|
||||
{required: true, message: "关联员工不能为空", trigger: "blur"}
|
||||
],
|
||||
status: [
|
||||
{required: true, message: "状态不能为空", trigger: "blur"}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 重置按钮操作
|
||||
resetQuery1() {
|
||||
this.dateRange = [];
|
||||
this.queryParams2 = {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
// this.resetForm("queryForm");
|
||||
this.handleQuery1();
|
||||
},
|
||||
// 搜索按钮操作
|
||||
handleQuery1() {
|
||||
this.queryParams2.page = 1;
|
||||
},
|
||||
// 是否关闭弹框
|
||||
handleClose(done) {
|
||||
done();
|
||||
},
|
||||
// 批量导入
|
||||
handleChange(file, fileList) {
|
||||
this.uploading = true;
|
||||
if(file.status === 'success'){
|
||||
this.uploading = false;
|
||||
this.fileList.splice(0,1)
|
||||
this.openMembers = false;
|
||||
this.openResult = true;
|
||||
this.title = "会员认证结果";
|
||||
this.result = file.response.data;
|
||||
this.reset2();
|
||||
this.getListMember();
|
||||
}
|
||||
},
|
||||
// 提交按钮 批量认证会员信息
|
||||
submitFormMembers: function() {
|
||||
this.$refs["form2"].validate(valid => {
|
||||
if (valid) {
|
||||
addCertifiedMembers(this.form2).then(response => {
|
||||
this.openMembers = false;
|
||||
this.openResult = true;
|
||||
this.title = "会员认证结果";
|
||||
this.result = response.data;
|
||||
this.reset2();
|
||||
this.getListMember();
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancelMembers() {
|
||||
this.openMembers = false;
|
||||
this.reset2();
|
||||
},
|
||||
getDeptList() {
|
||||
// getRunningWaterByTissueApi(this.addDateRange(this.queryParams)).then(response => {
|
||||
// this.deptList = response.data.records;
|
||||
// })
|
||||
},
|
||||
// 获取列表信息
|
||||
getList() {
|
||||
let dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 提交按钮
|
||||
submitForm: function () {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (!this.form.id) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 新增按钮操作
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "新增员工";
|
||||
},
|
||||
// 新增按钮操作
|
||||
batchAdd() {
|
||||
this.reset();
|
||||
this.open2 = true;
|
||||
this.title = "批量新增成员";
|
||||
},
|
||||
// 搜索按钮操作
|
||||
handleQuery() {
|
||||
this.queryParams.page = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 重置按钮操作
|
||||
resetQuery() {
|
||||
this.dateRange = [];
|
||||
this.queryParams = {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
this.handleQuery();
|
||||
},
|
||||
// 修改按钮操作
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
},
|
||||
// 修改按钮操作
|
||||
handleRecharge(row) {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.resetForm("form");
|
||||
},
|
||||
// 删除按钮操作
|
||||
handleDelete(row) {
|
||||
const name = row.realName || this.id;
|
||||
this.$modal.confirm('是否确认删除"' + name + '"的员工信息?').then(function() {
|
||||
return delStaff(row.id);
|
||||
}).then(() => {
|
||||
this.queryParams.page = 1
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.box-card {
|
||||
width: 100%;
|
||||
margin: 0px 20px 20px 20px;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.el-form--inline .el-form-item {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.table-box {
|
||||
width: 100%;
|
||||
height: 73vh;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.wrap-boxs {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.k_ {
|
||||
width: 250px;
|
||||
height: 75px;
|
||||
margin-right: 20px;
|
||||
box-sizing: border-box;
|
||||
padding: 15px 10px;
|
||||
padding-top: 5px;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.size_ {
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.title_ {
|
||||
font-weight: 600;
|
||||
font-size: 24px;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.d-s {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.anniu-h {
|
||||
width: 80px;
|
||||
height: 26px;
|
||||
background: #FAFAFA;
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
border: 1px solid #DDDDDD;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #777777;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.anniu-act {
|
||||
background: #FF9655 !important;
|
||||
border: 1px solid #FF9655 !important;
|
||||
color: #fff;
|
||||
|
||||
}
|
||||
|
||||
</style>
|
328
fuintAdmin/src/views/member/userLabel.vue
Normal file
328
fuintAdmin/src/views/member/userLabel.vue
Normal file
@ -0,0 +1,328 @@
|
||||
<!-- 收银台订单-->
|
||||
<template>
|
||||
<div style="padding-top: 15px;padding-bottom: 5px; padding-right: 40px; background: #f6f8f9;">
|
||||
<el-card class="box-card" shadow="never">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="120px">
|
||||
|
||||
<el-form-item label="" prop="deptId" style="width: 180px">
|
||||
<el-input
|
||||
v-model="queryParams.realName"
|
||||
placeholder="请输入标签名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="">
|
||||
<el-date-picker
|
||||
v-model="beginTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="开始日期">
|
||||
</el-date-picker>
|
||||
至
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item style="float: right">
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" @click="handleAdd">新增标签</el-button>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
|
||||
|
||||
<!-- </el-card>-->
|
||||
<!-- <el-card class="box-card" style="min-height: 500px;" shadow="never">-->
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
:data="orderList"
|
||||
style="width: 100%">
|
||||
<el-table-column type="index" width="50" align="center" label="序号"/>
|
||||
<el-table-column prop="storeName" align="center" label="标签名称"></el-table-column>
|
||||
<el-table-column prop="storeName" align="center" label="备注"></el-table-column>
|
||||
<el-table-column prop="payMoney" align="center" label="会员数量"></el-table-column>
|
||||
<el-table-column prop="payMoney" align="center" label="会员占比"></el-table-column>
|
||||
<el-table-column prop="payMoney" align="center" label="标签状态">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.status"
|
||||
active-value="qy"
|
||||
inactive-value="jy"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="count" align="center" label="创建人"></el-table-column>
|
||||
<el-table-column prop="refMoney" align="center" label="创建时间"></el-table-column>
|
||||
<el-table-column align="center" label="操作">
|
||||
<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>
|
||||
</div>
|
||||
<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="open" width="30%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
|
||||
<el-form-item label="标签名称" prop="realName">
|
||||
<el-input v-model="form.realName" placeholder="请输入设备名称" maxlength="30" style="width: 270px"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="标签状态" prop="status">
|
||||
<el-switch
|
||||
v-model="form.status"
|
||||
active-value="qy"
|
||||
inactive-value="jy"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备注" >
|
||||
<el-input v-model="form.desc" placeholder="请输入备注" type="textarea"/>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {delStaff} from "@/api/staff/staff";
|
||||
import {listUserLabel} from "@/api/staff/user/userlabel";
|
||||
|
||||
export default {
|
||||
dicts: ['zhzt'],
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
open:false,
|
||||
title:'',
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
beginTime: "",
|
||||
endTime: "",
|
||||
// 收银台订单列表
|
||||
orderList: [],
|
||||
deptList: [],
|
||||
form:{},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
total: 0,
|
||||
// 表单校验
|
||||
rules: {
|
||||
realName: [
|
||||
{required: true, message: "设备名称不能为空", trigger: "blur"},
|
||||
],
|
||||
pinpai: [
|
||||
{required: true, message: "品牌不能为空", trigger: "blur"},
|
||||
],
|
||||
gongneng: [
|
||||
{required: true, message: "设备功能不能为空", trigger: "blur"}
|
||||
],
|
||||
zhongduan: [
|
||||
{required: true, message: "设备终端号不能为空", trigger: "blur"}
|
||||
],
|
||||
miyao: [
|
||||
{required: true, message: "密钥不能为空", trigger: "blur"}
|
||||
],
|
||||
staffId: [
|
||||
{required: true, message: "关联员工不能为空", trigger: "blur"}
|
||||
],
|
||||
status: [
|
||||
{required: true, message: "状态不能为空", trigger: "blur"}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
|
||||
},
|
||||
methods: {
|
||||
getDeptList() {
|
||||
// getRunningWaterByTissueApi(this.addDateRange(this.queryParams)).then(response => {
|
||||
// this.deptList = response.data.records;
|
||||
// })
|
||||
},
|
||||
// 获取列表信息
|
||||
getList() {
|
||||
let dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
dateRange.push(this.beginTime.toLocaleDateString())
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
listUserLabel(this.addDateRange(this.queryParams, dateRange)).then(res => {
|
||||
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 提交按钮
|
||||
submitForm: function () {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (!this.form.id) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 新增按钮操作
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "新增员工";
|
||||
},
|
||||
// 搜索按钮操作
|
||||
handleQuery() {
|
||||
this.queryParams.page = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 重置按钮操作
|
||||
resetQuery() {
|
||||
this.dateRange = [];
|
||||
this.queryParams = {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
this.handleQuery();
|
||||
},
|
||||
// 修改按钮操作
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.resetForm("form");
|
||||
},
|
||||
// 删除按钮操作
|
||||
handleDelete(row) {
|
||||
const name = row.realName || this.id;
|
||||
this.$modal.confirm('是否确认删除"' + name + '"的员工信息?').then(function() {
|
||||
return delStaff(row.id);
|
||||
}).then(() => {
|
||||
this.queryParams.page = 1
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.box-card {
|
||||
width: 100%;
|
||||
margin: 0px 20px 20px 20px;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.el-form--inline .el-form-item {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.table-box {
|
||||
width: 100%;
|
||||
height: 79vh;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.wrap-boxs {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.k_ {
|
||||
width: 250px;
|
||||
height: 75px;
|
||||
margin-right: 20px;
|
||||
box-sizing: border-box;
|
||||
padding: 15px 10px;
|
||||
padding-top: 5px;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.size_ {
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.title_ {
|
||||
font-weight: 600;
|
||||
font-size: 24px;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.d-s {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.anniu-h {
|
||||
width: 80px;
|
||||
height: 26px;
|
||||
background: #FAFAFA;
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
border: 1px solid #DDDDDD;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #777777;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.anniu-act {
|
||||
background: #FF9655 !important;
|
||||
border: 1px solid #FF9655 !important;
|
||||
color: #fff;
|
||||
|
||||
}
|
||||
|
||||
</style>
|
106
fuintAdmin/src/views/staff/device/index.vue
Normal file
106
fuintAdmin/src/views/staff/device/index.vue
Normal file
@ -0,0 +1,106 @@
|
||||
<template>
|
||||
<div class="app-center">
|
||||
<div class="app-top">
|
||||
<el-card :body-style="{ padding: '0px' }">
|
||||
<div class="box">
|
||||
<div class="nbox" :class="pointerClass" @click="updateRedio('打印机配置')">
|
||||
<div class="fount-box" :style="{ color: radio1 === '打印机配置' ? '#FF770F' : '#999999' }">打印机配置</div>
|
||||
<div class="heng-box" v-if="radio1 == '打印机配置'"></div>
|
||||
<div class="heng-box" style="background-color: #FFFFFF" v-else></div>
|
||||
|
||||
</div>
|
||||
<div class="nbox" :class="pointerClass" @click="updateRedio('油机汽机配置')">
|
||||
<div class="fount-box" :style="{ color: radio1 === '油机汽机配置' ? '#FF770F' : '#999999' }">油机汽机配置</div>
|
||||
<div class="heng-box" v-if="radio1 == '油机汽机配置'"></div>
|
||||
<div class="heng-box" style="background-color: #FFFFFF" v-else></div>
|
||||
</div>
|
||||
<div class="nbox" :class="pointerClass" @click="updateRedio('参数配置')">
|
||||
<div class="fount-box" :style="{ color: radio1 === '参数配置' ? '#FF770F' : '#999999' }">参数配置</div>
|
||||
<div class="heng-box" v-if="radio1 == '参数配置'"></div>
|
||||
<div class="heng-box" style="background-color: #FFFFFF" v-else></div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
<printList v-if="radio1 === '打印机配置'"></printList>
|
||||
<oilEngineList v-if="radio1 === '油机汽机配置'"></oilEngineList>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import printList from "@/views/staff/device/tab/printList.vue";
|
||||
import oilEngineList from "@/views/staff/device/tab/oilEngineList.vue";
|
||||
export default {
|
||||
data(){
|
||||
return{
|
||||
radio1:'打印机配置',
|
||||
pointerClass() {
|
||||
return 'pointer-cursor';
|
||||
}
|
||||
}
|
||||
},
|
||||
components:{
|
||||
printList,
|
||||
oilEngineList,
|
||||
},
|
||||
methods: {
|
||||
handleClick(tab, event) {
|
||||
console.log(tab, event);
|
||||
},
|
||||
updateRedio(data) {
|
||||
console.log(this.radio1)
|
||||
this.radio1 = data
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.app-center{
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
box-sizing: border-box;
|
||||
//padding: 10px;
|
||||
background: #f6f8f9;
|
||||
}
|
||||
.app-top{
|
||||
width: 100%;
|
||||
//margin-bottom: 20px;
|
||||
height: 50px;
|
||||
box-sizing: border-box;
|
||||
padding: 0px;
|
||||
}
|
||||
.el-card__body, .el-main {
|
||||
padding: 0px;
|
||||
}
|
||||
.box{
|
||||
cursor: pointer;
|
||||
margin-top: 10px ;
|
||||
margin-left: 50px;
|
||||
//height: 40px;
|
||||
display: flex;
|
||||
background-color: #FFFFFF;
|
||||
align-items: center;
|
||||
//border: 1px solid #EBEEF5;
|
||||
}
|
||||
.nbox{
|
||||
margin-right: 30px;
|
||||
}
|
||||
.fount-box{
|
||||
font-size: 14px;
|
||||
color: #999999
|
||||
}
|
||||
.fount-box2{
|
||||
font-size: 14px;
|
||||
color: #999999
|
||||
}
|
||||
.heng-box{
|
||||
background-color: #FF770F;
|
||||
width: 100%;
|
||||
height: 2px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
339
fuintAdmin/src/views/staff/device/tab/oilEngineList.vue
Normal file
339
fuintAdmin/src/views/staff/device/tab/oilEngineList.vue
Normal file
@ -0,0 +1,339 @@
|
||||
<!-- 收银台订单-->
|
||||
<template>
|
||||
<div style="padding-top: 15px; padding-right: 40px; background: #f6f8f9;">
|
||||
<el-card class="box-card" shadow="never">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="120px">
|
||||
|
||||
<el-form-item label="" prop="deptId" style="width: 180px">
|
||||
<el-input
|
||||
v-model="queryParams.realName"
|
||||
placeholder="请选择设备类型"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="deptId" style="width: 180px">
|
||||
<el-select
|
||||
v-model="queryParams.deptId"
|
||||
clearable
|
||||
placeholder="请输入设备名称"
|
||||
>
|
||||
<el-option v-for="item in deptList" :key="item.id" :label="item.deptName" :value="item.deptId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="status" style="width: 180px">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
placeholder="请选择设备状态"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.zhzt"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item style="float: right">
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" @click="handleAdd">新增设备</el-button>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
|
||||
|
||||
<!-- </el-card>-->
|
||||
<!-- <el-card class="box-card" style="min-height: 500px;" shadow="never">-->
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
:data="orderList"
|
||||
style="width: 100%">
|
||||
<el-table-column type="index" width="50" align="center" label="序号"/>
|
||||
<el-table-column prop="storeName" align="center" label="设备类型"></el-table-column>
|
||||
<el-table-column prop="storeName" align="center" label="设备名称"></el-table-column>
|
||||
<el-table-column prop="payMoney" align="center" label="设备ID"></el-table-column>
|
||||
<el-table-column prop="count" align="center" label="创建人"></el-table-column>
|
||||
<el-table-column prop="refMoney" align="center" label="创建时间"></el-table-column>
|
||||
<el-table-column align="center" label="操作">
|
||||
<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>
|
||||
</div>
|
||||
<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="open" width="30%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
|
||||
<el-form-item label="设备名称" prop="realName">
|
||||
<el-input v-model="form.realName" placeholder="请输入设备名称" maxlength="30" style="width: 270px"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="品牌" prop="pinpai">
|
||||
<el-input v-model="form.pinpai" placeholder="请输入品牌名称" maxlength="30" style="width: 270px"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="设备功能" prop="gongneng">
|
||||
<!-- <el-checkbox-group v-model="form.gongneng">-->
|
||||
<el-checkbox v-model="form.gongneng" label="打印小票"></el-checkbox>
|
||||
<el-checkbox v-model="form.gongneng" label="语音播报"></el-checkbox>
|
||||
<!-- </el-checkbox-group>-->
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="设备终端号" prop="zhongduan">
|
||||
<el-input v-model="form.zhongduan" placeholder="请输入设备终端号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="密钥" prop="miyao">
|
||||
<el-input v-model="form.miyao" placeholder="请输入密钥" />
|
||||
</el-form-item>
|
||||
<el-form-item label="关联员工" prop="staffId">
|
||||
<el-input v-model="form.staffId" placeholder="请输入关联员工" />
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="用户状态" prop="status">
|
||||
<el-switch
|
||||
v-model="form.status"
|
||||
active-value="qy"
|
||||
inactive-value="jy"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备注" >
|
||||
<el-input v-model="form.desc" placeholder="请输入备注" type="textarea"/>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {delStaff} from "@/api/staff/staff";
|
||||
|
||||
export default {
|
||||
dicts: ['zhzt'],
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
open:false,
|
||||
title:'',
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
beginTime: "",
|
||||
endTime: "",
|
||||
// 收银台订单列表
|
||||
orderList: [],
|
||||
deptList: [],
|
||||
form:{},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
total: 0,
|
||||
// 表单校验
|
||||
rules: {
|
||||
realName: [
|
||||
{required: true, message: "设备名称不能为空", trigger: "blur"},
|
||||
],
|
||||
pinpai: [
|
||||
{required: true, message: "品牌不能为空", trigger: "blur"},
|
||||
],
|
||||
gongneng: [
|
||||
{required: true, message: "设备功能不能为空", trigger: "blur"}
|
||||
],
|
||||
zhongduan: [
|
||||
{required: true, message: "设备终端号不能为空", trigger: "blur"}
|
||||
],
|
||||
miyao: [
|
||||
{required: true, message: "密钥不能为空", trigger: "blur"}
|
||||
],
|
||||
staffId: [
|
||||
{required: true, message: "关联员工不能为空", trigger: "blur"}
|
||||
],
|
||||
status: [
|
||||
{required: true, message: "状态不能为空", trigger: "blur"}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
|
||||
},
|
||||
methods: {
|
||||
getDeptList() {
|
||||
// getRunningWaterByTissueApi(this.addDateRange(this.queryParams)).then(response => {
|
||||
// this.deptList = response.data.records;
|
||||
// })
|
||||
},
|
||||
// 获取列表信息
|
||||
getList() {
|
||||
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 提交按钮
|
||||
submitForm: function () {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (!this.form.id) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 新增按钮操作
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "新增员工";
|
||||
},
|
||||
// 搜索按钮操作
|
||||
handleQuery() {
|
||||
this.queryParams.page = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 重置按钮操作
|
||||
resetQuery() {
|
||||
this.dateRange = [];
|
||||
this.queryParams = {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
this.handleQuery();
|
||||
},
|
||||
// 修改按钮操作
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.resetForm("form");
|
||||
},
|
||||
// 删除按钮操作
|
||||
handleDelete(row) {
|
||||
const name = row.realName || this.id;
|
||||
this.$modal.confirm('是否确认删除"' + name + '"的员工信息?').then(function() {
|
||||
return delStaff(row.id);
|
||||
}).then(() => {
|
||||
this.queryParams.page = 1
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.box-card {
|
||||
width: 100%;
|
||||
margin: 0px 20px 20px 20px;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.el-form--inline .el-form-item {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.table-box {
|
||||
width: 100%;
|
||||
height: 46vh;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.wrap-boxs {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.k_ {
|
||||
width: 250px;
|
||||
height: 75px;
|
||||
margin-right: 20px;
|
||||
box-sizing: border-box;
|
||||
padding: 15px 10px;
|
||||
padding-top: 5px;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.size_ {
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.title_ {
|
||||
font-weight: 600;
|
||||
font-size: 24px;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.d-s {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.anniu-h {
|
||||
width: 80px;
|
||||
height: 26px;
|
||||
background: #FAFAFA;
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
border: 1px solid #DDDDDD;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #777777;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.anniu-act {
|
||||
background: #FF9655 !important;
|
||||
border: 1px solid #FF9655 !important;
|
||||
color: #fff;
|
||||
|
||||
}
|
||||
|
||||
</style>
|
364
fuintAdmin/src/views/staff/device/tab/printList.vue
Normal file
364
fuintAdmin/src/views/staff/device/tab/printList.vue
Normal file
@ -0,0 +1,364 @@
|
||||
<!-- 收银台订单-->
|
||||
<template>
|
||||
<div style="padding-top: 15px; padding-right: 40px; background: #f6f8f9;">
|
||||
<el-card class="box-card" shadow="never">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="120px">
|
||||
|
||||
<el-form-item label="" prop="deptId" style="width: 180px">
|
||||
<el-input
|
||||
v-model="queryParams.realName"
|
||||
placeholder="请输入配置名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="deptId" style="width: 180px">
|
||||
<el-select
|
||||
v-model="queryParams.deptId"
|
||||
clearable
|
||||
placeholder="请选择设备功能"
|
||||
>
|
||||
<el-option v-for="item in deptList" :key="item.id" :label="item.deptName" :value="item.deptId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="deptId" style="width: 180px">
|
||||
<el-select
|
||||
v-model="queryParams.deptId"
|
||||
clearable
|
||||
placeholder="请选择关联员工"
|
||||
>
|
||||
<el-option v-for="item in deptList" :key="item.id" :label="item.deptName" :value="item.deptId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="status" style="width: 180px">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
placeholder="请选择设备状态"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.zhzt"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item style="float: right">
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" @click="handleAdd">新增设备</el-button>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
|
||||
|
||||
<!-- </el-card>-->
|
||||
<!-- <el-card class="box-card" style="min-height: 500px;" shadow="never">-->
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
:data="orderList"
|
||||
style="width: 100%">
|
||||
<el-table-column type="index" width="50" align="center" label="序号"/>
|
||||
<el-table-column prop="storeName" align="center" label="设备名称"></el-table-column>
|
||||
<el-table-column prop="parentName" align="center" label="品牌"></el-table-column>
|
||||
<el-table-column prop="payMoney" align="center" label="设备功能"></el-table-column>
|
||||
<el-table-column prop="count" align="center" label="所属机构"></el-table-column>
|
||||
<el-table-column prop="refMoney" align="center" label="关联员工"></el-table-column>
|
||||
<el-table-column prop="refCount" align="center" label="设备编号"></el-table-column>
|
||||
<el-table-column align="center" prop="date" label="密钥"></el-table-column>
|
||||
<el-table-column align="center" prop="date" label="设备状态">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.status"
|
||||
active-value="qy"
|
||||
inactive-value="jy"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="date" label="备注"></el-table-column>
|
||||
<el-table-column align="center" prop="date" label="创建时间"></el-table-column>
|
||||
<el-table-column align="center" label="操作">
|
||||
<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>
|
||||
</div>
|
||||
<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="open" width="30%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
|
||||
<el-form-item label="设备名称" prop="realName">
|
||||
<el-input v-model="form.realName" placeholder="请输入设备名称" maxlength="30" style="width: 270px"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="品牌" prop="pinpai">
|
||||
<el-input v-model="form.pinpai" placeholder="请输入品牌名称" maxlength="30" style="width: 270px"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="设备功能" prop="gongneng">
|
||||
<!-- <el-checkbox-group v-model="form.gongneng">-->
|
||||
<el-checkbox v-model="form.gongneng" label="打印小票"></el-checkbox>
|
||||
<el-checkbox v-model="form.gongneng" label="语音播报"></el-checkbox>
|
||||
<!-- </el-checkbox-group>-->
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="设备终端号" prop="zhongduan">
|
||||
<el-input v-model="form.zhongduan" placeholder="请输入设备终端号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="密钥" prop="miyao">
|
||||
<el-input v-model="form.miyao" placeholder="请输入密钥" />
|
||||
</el-form-item>
|
||||
<el-form-item label="关联员工" prop="staffId">
|
||||
<el-input v-model="form.staffId" placeholder="请输入关联员工" />
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="用户状态" prop="status">
|
||||
<el-switch
|
||||
v-model="form.status"
|
||||
active-value="qy"
|
||||
inactive-value="jy"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备注" >
|
||||
<el-input v-model="form.desc" placeholder="请输入备注" type="textarea"/>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {delStaff} from "@/api/staff/staff";
|
||||
|
||||
export default {
|
||||
dicts: ['zhzt'],
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
open:false,
|
||||
title:'',
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
beginTime: "",
|
||||
endTime: "",
|
||||
// 收银台订单列表
|
||||
orderList: [],
|
||||
deptList: [],
|
||||
form:{},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
total: 0,
|
||||
// 表单校验
|
||||
rules: {
|
||||
realName: [
|
||||
{required: true, message: "设备名称不能为空", trigger: "blur"},
|
||||
],
|
||||
pinpai: [
|
||||
{required: true, message: "品牌不能为空", trigger: "blur"},
|
||||
],
|
||||
gongneng: [
|
||||
{required: true, message: "设备功能不能为空", trigger: "blur"}
|
||||
],
|
||||
zhongduan: [
|
||||
{required: true, message: "设备终端号不能为空", trigger: "blur"}
|
||||
],
|
||||
miyao: [
|
||||
{required: true, message: "密钥不能为空", trigger: "blur"}
|
||||
],
|
||||
staffId: [
|
||||
{required: true, message: "关联员工不能为空", trigger: "blur"}
|
||||
],
|
||||
status: [
|
||||
{required: true, message: "状态不能为空", trigger: "blur"}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
|
||||
},
|
||||
methods: {
|
||||
getDeptList() {
|
||||
// getRunningWaterByTissueApi(this.addDateRange(this.queryParams)).then(response => {
|
||||
// this.deptList = response.data.records;
|
||||
// })
|
||||
},
|
||||
// 获取列表信息
|
||||
getList() {
|
||||
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 提交按钮
|
||||
submitForm: function () {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (!this.form.id) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 新增按钮操作
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "新增员工";
|
||||
},
|
||||
// 搜索按钮操作
|
||||
handleQuery() {
|
||||
this.queryParams.page = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 重置按钮操作
|
||||
resetQuery() {
|
||||
this.dateRange = [];
|
||||
this.queryParams = {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
this.handleQuery();
|
||||
},
|
||||
// 修改按钮操作
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.resetForm("form");
|
||||
},
|
||||
// 删除按钮操作
|
||||
handleDelete(row) {
|
||||
const name = row.realName || this.id;
|
||||
this.$modal.confirm('是否确认删除"' + name + '"的员工信息?').then(function() {
|
||||
return delStaff(row.id);
|
||||
}).then(() => {
|
||||
this.queryParams.page = 1
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.box-card {
|
||||
width: 100%;
|
||||
margin: 0px 20px 20px 20px;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.el-form--inline .el-form-item {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.table-box {
|
||||
width: 100%;
|
||||
height: 46vh;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.wrap-boxs {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.k_ {
|
||||
width: 250px;
|
||||
height: 75px;
|
||||
margin-right: 20px;
|
||||
box-sizing: border-box;
|
||||
padding: 15px 10px;
|
||||
padding-top: 5px;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.size_ {
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.title_ {
|
||||
font-weight: 600;
|
||||
font-size: 24px;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.d-s {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.anniu-h {
|
||||
width: 80px;
|
||||
height: 26px;
|
||||
background: #FAFAFA;
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
border: 1px solid #DDDDDD;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #777777;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.anniu-act {
|
||||
background: #FF9655 !important;
|
||||
border: 1px solid #FF9655 !important;
|
||||
color: #fff;
|
||||
|
||||
}
|
||||
|
||||
</style>
|
@ -12,10 +12,16 @@
|
||||
|
||||
|
||||
<!-- 上传图片-->
|
||||
<div style="display: flex">
|
||||
<div style="display: flex">
|
||||
<span style="margin-right: 10px">店铺logo:</span>
|
||||
<imgUpload1 v-if="flag" :imgUrl="store.logo" :limit="1" @input="getImgUrl"></imgUpload1>
|
||||
</div>
|
||||
<div style="display: flex">
|
||||
<span style="margin-right: 10px">营业执照:</span>
|
||||
<imgUpload1 v-if="flag" :imgUrl="store.license" :limit="1" @input="getLicenseUrl"></imgUpload1>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 上传图片-->
|
||||
<div style="display: flex; margin-top: 20px ">
|
||||
<span style="margin-right: 20px">门头照:</span>
|
||||
@ -164,6 +170,11 @@ export default {
|
||||
this.store.logo = "/static" + list[list.length - 1]
|
||||
},
|
||||
// 获取图片url地址
|
||||
getLicenseUrl(val) {
|
||||
let list = val.split("/static")
|
||||
this.store.license = "/static" + list[list.length - 1]
|
||||
},
|
||||
// 获取图片url地址
|
||||
getDoorImgUrl(val) {
|
||||
let list = val.split(",")
|
||||
let doorUrl = []
|
||||
|
@ -71,6 +71,10 @@ export default {
|
||||
});
|
||||
},
|
||||
submitForm(formName) {
|
||||
if (this.ruleForm.checkedKeys.length==0 && this.ruleForm.roleCode != '2' && this.ruleForm.roleCode != '3') {
|
||||
this.$message.error("请先选择菜单")
|
||||
return;
|
||||
}
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.ruleForm.dutyId) {
|
||||
@ -111,7 +115,7 @@ export default {
|
||||
this.ruleForm.roleType = response.data.roleInfo.type;
|
||||
this.ruleForm.storeId = response.data.roleInfo.storeId;
|
||||
this.ruleForm.description = response.data.roleInfo.description;
|
||||
let checkedKeys = response.data.checkedKeys
|
||||
let checkedKeys = response.data.checkedKeys || []
|
||||
this.ruleForm.checkedKeys = checkedKeys
|
||||
this.ruleForm.menuIds = checkedKeys
|
||||
this.merchantId = response.data.roleInfo.type
|
||||
@ -120,7 +124,7 @@ export default {
|
||||
}else {
|
||||
this.isCashier = false
|
||||
}
|
||||
if (this.checkedKeys.length==this.ruleForm.checkedKeys.length && this.isCashier){
|
||||
if (this.ruleForm.checkedKeys.length >0 && this.checkedKeys.length==this.ruleForm.checkedKeys.length && this.isCashier){
|
||||
this.checked = true
|
||||
}else {
|
||||
this.checked = false
|
||||
@ -356,7 +360,7 @@ export default {
|
||||
<!-- <el-radio :label="3">全部</el-radio>-->
|
||||
<!-- </el-radio-group>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="菜单功能权限" prop="checkedKeys">
|
||||
<el-form-item label="菜单功能权限">
|
||||
<el-checkbox v-model="checked" @change="chooseAllOrNo">全选</el-checkbox>
|
||||
<el-checkbox v-model="isOpen" @change="openTable">展开</el-checkbox>
|
||||
</el-form-item>
|
||||
|
@ -96,7 +96,6 @@ export default {
|
||||
<style scoped>
|
||||
.app-center{
|
||||
width: 100%;
|
||||
|
||||
box-sizing: border-box;
|
||||
//padding: 10px;
|
||||
}
|
||||
|
@ -311,7 +311,8 @@ export default {
|
||||
let queryParams = {
|
||||
pageNo:1,
|
||||
pageSize:10,
|
||||
system_position:"系统首页"
|
||||
system_position:"系统首页",
|
||||
bannerStatus:true
|
||||
}
|
||||
getBannerListApi(queryParams).then(res=>{
|
||||
this.bannerList = res.data.records
|
||||
|
@ -323,7 +323,8 @@ export default {
|
||||
let queryParams = {
|
||||
pageNo:1,
|
||||
pageSize:10,
|
||||
system_position:"系统首页"
|
||||
system_position:"系统首页",
|
||||
bannerStatus:true
|
||||
}
|
||||
getBannerListApi(queryParams).then(res=>{
|
||||
this.bannerList = res.data.records
|
||||
|
@ -274,7 +274,8 @@ export default {
|
||||
let queryParams = {
|
||||
pageNo:1,
|
||||
pageSize:10,
|
||||
system_position:"系统首页"
|
||||
system_position:"系统首页",
|
||||
bannerStatus:true
|
||||
}
|
||||
getBannerListApi(queryParams).then(res=>{
|
||||
this.bannerList = res.data.records
|
||||
|
@ -0,0 +1,80 @@
|
||||
package com.fuint.business.deviceManage.controller;
|
||||
|
||||
import com.fuint.business.deviceManage.entity.OilParameterConfig;
|
||||
import com.fuint.business.deviceManage.service.OilParameterConfigService;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 油机汽机配置(OilParameterConfig)表控制层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-31 14:59:04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("oilParameterConfig")
|
||||
public class OilParameterConfigController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private OilParameterConfigService oilParameterConfigService;
|
||||
|
||||
/**
|
||||
* 根据店铺id查询油站参数配置信息
|
||||
* @return
|
||||
*/
|
||||
@GetMapping
|
||||
private ResponseObject selectInfo(){
|
||||
return getSuccessResult(oilParameterConfigService.selectOneByStoreId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public ResponseObject queryById(@PathVariable("id") Integer id) {
|
||||
return getSuccessResult(oilParameterConfigService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param oilParameterConfig 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
public ResponseObject add(@RequestBody OilParameterConfig oilParameterConfig) {
|
||||
return getSuccessResult(oilParameterConfigService.insert(oilParameterConfig));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
*
|
||||
* @param oilParameterConfig 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@PutMapping
|
||||
public ResponseObject edit(@RequestBody OilParameterConfig oilParameterConfig) {
|
||||
return getSuccessResult(oilParameterConfigService.update(oilParameterConfig));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@DeleteMapping("{id}")
|
||||
public ResponseObject deleteById(@PathVariable Integer id) {
|
||||
return getSuccessResult(oilParameterConfigService.deleteById(id));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,65 @@
|
||||
package com.fuint.business.deviceManage.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fuint.framework.entity.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 油站参数配置(OilParameterConfig)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-01 09:02:35
|
||||
*/
|
||||
@Data
|
||||
@TableName("oil_parameter_config")
|
||||
@ApiModel(value = "OilParameterConfig", description = "油站参数配置")
|
||||
public class OilParameterConfig extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("自增ID")
|
||||
@TableId(value = "ID", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 所属连锁店id
|
||||
*/
|
||||
private Integer chainStoreId;
|
||||
/**
|
||||
* 所属店铺id
|
||||
*/
|
||||
private Integer storeId;
|
||||
/**
|
||||
* 加油数量保留两位小数,后面余数部分规则;数据字典
|
||||
*/
|
||||
private String refuelRule;
|
||||
/**
|
||||
* 金额保留两位小数,后面余数部分规则;数据字典
|
||||
*/
|
||||
private String amountRule;
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String createBy;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private String updateBy;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,7 @@
|
||||
package com.fuint.business.deviceManage.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.fuint.business.deviceManage.entity.OilParameterConfig;
|
||||
|
||||
public interface OilParameterConfigMapper extends BaseMapper<OilParameterConfig> {
|
||||
}
|
@ -4,7 +4,21 @@
|
||||
|
||||
<select id="queryPage" resultType="com.fuint.business.deviceManage.entity.OilEngineConfig">
|
||||
SELECT * FROM oil_engine_config
|
||||
ORDER BY create_time DESC
|
||||
<where>
|
||||
<if test="entity.deviceType != null and entity.deviceType != ''">
|
||||
and device_type = #{entity.deviceType}
|
||||
</if>
|
||||
<if test="entity.deviceName != null and entity.deviceName != ''">
|
||||
and device_name like concat('%', #{entity.deviceName}, '%')
|
||||
</if>
|
||||
<if test="entity.params.beginTime != null and entity.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') >= date_format(#{entity.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="entity.params.endTime != null and entity.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') <= date_format(#{entity.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
@ -0,0 +1,6 @@
|
||||
<?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.deviceManage.mapper.OilParameterConfigMapper">
|
||||
|
||||
</mapper>
|
||||
|
@ -3,7 +3,6 @@ package com.fuint.business.deviceManage.service;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.deviceManage.entity.OilEngineConfig;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
|
||||
/**
|
||||
* 油机汽机配置(OilEngineConfig)表服务接口
|
||||
|
@ -0,0 +1,53 @@
|
||||
package com.fuint.business.deviceManage.service;
|
||||
|
||||
import com.fuint.business.deviceManage.entity.OilParameterConfig;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
|
||||
/**
|
||||
* 油站参数配置(OilParameterConfig)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-01 09:02:35
|
||||
*/
|
||||
public interface OilParameterConfigService {
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
OilParameterConfig queryById(Integer id);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param oilParameterConfig 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
int insert(OilParameterConfig oilParameterConfig);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param oilParameterConfig 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
int update(OilParameterConfig oilParameterConfig);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
int deleteById(Integer id);
|
||||
|
||||
/**
|
||||
* 根据店铺id查询油站参数配置信息
|
||||
* @return
|
||||
*/
|
||||
OilParameterConfig selectOneByStoreId();
|
||||
|
||||
}
|
@ -7,10 +7,6 @@ import com.fuint.business.deviceManage.entity.OilEngineConfig;
|
||||
import com.fuint.business.deviceManage.mapper.OilEngineConfigMapper;
|
||||
import com.fuint.business.deviceManage.service.OilEngineConfigService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.data.domain.PageImpl;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 油机汽机配置(OilEngineConfig)表服务实现类
|
||||
|
@ -0,0 +1,81 @@
|
||||
package com.fuint.business.deviceManage.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.deviceManage.entity.OilParameterConfig;
|
||||
import com.fuint.business.deviceManage.mapper.OilParameterConfigMapper;
|
||||
import com.fuint.business.deviceManage.service.OilParameterConfigService;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 油站参数配置(OilParameterConfig)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-01 09:02:35
|
||||
*/
|
||||
@Service("oilParameterConfigService")
|
||||
public class OilParameterConfigServiceImpl extends ServiceImpl<OilParameterConfigMapper,OilParameterConfig> implements OilParameterConfigService {
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public OilParameterConfig queryById(Integer id) {
|
||||
return baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param oilParameterConfig 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public int insert(OilParameterConfig oilParameterConfig) {
|
||||
return baseMapper.insert(oilParameterConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param oilParameterConfig 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public int update(OilParameterConfig oilParameterConfig) {
|
||||
return baseMapper.updateById(oilParameterConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public int deleteById(Integer id) {
|
||||
return baseMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OilParameterConfig selectOneByStoreId() {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("store_id",nowAccountInfo.getStoreId());
|
||||
OilParameterConfig oilParameterConfig = baseMapper.selectOne(queryWrapper);
|
||||
if (ObjectUtil.isEmpty(oilParameterConfig)){
|
||||
OilParameterConfig oilParameterConfig1 = new OilParameterConfig();
|
||||
oilParameterConfig1.setStoreId(nowAccountInfo.getStoreId());
|
||||
oilParameterConfig1.setChainStoreId(nowAccountInfo.getChainStoreId());
|
||||
baseMapper.insert(oilParameterConfig);
|
||||
oilParameterConfig = baseMapper.selectOne(queryWrapper);
|
||||
}
|
||||
return oilParameterConfig;
|
||||
}
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
package com.fuint.business.fleet.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.fleet.entity.FleetInfo;
|
||||
import com.fuint.business.fleet.service.FleetInfoService;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 油机汽机配置(FleetInfo)表控制层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-31 14:59:04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("fleetInfo")
|
||||
public class FleetInfoController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private FleetInfoService fleetInfoService;
|
||||
|
||||
/**
|
||||
* 根据条件分页查询首页轮播图
|
||||
* @param fleetInfo
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @return
|
||||
*/
|
||||
@GetMapping
|
||||
public ResponseObject lists(FleetInfo fleetInfo,
|
||||
@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
return getSuccessResult(fleetInfoService.queryPage(page,fleetInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public ResponseObject queryById(@PathVariable("id") Integer id) {
|
||||
return getSuccessResult(fleetInfoService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param fleetInfo 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
public ResponseObject add(@RequestBody FleetInfo fleetInfo) {
|
||||
return getSuccessResult(fleetInfoService.insert(fleetInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
*
|
||||
* @param fleetInfo 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@PutMapping
|
||||
public ResponseObject edit(@RequestBody FleetInfo fleetInfo) {
|
||||
return getSuccessResult(fleetInfoService.update(fleetInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@DeleteMapping("{id}")
|
||||
public ResponseObject deleteById(@PathVariable Integer id) {
|
||||
return getSuccessResult(fleetInfoService.deleteById(id));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,87 @@
|
||||
package com.fuint.business.fleet.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.fleet.entity.FleetMember;
|
||||
import com.fuint.business.fleet.service.FleetMemberService;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 油机汽机配置(FleetMember)表控制层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-31 14:59:04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("fleetMember")
|
||||
public class FleetMemberController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private FleetMemberService fleetMemberService;
|
||||
|
||||
/**
|
||||
* 根据条件分页查询首页轮播图
|
||||
* @param fleetMember
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @return
|
||||
*/
|
||||
@GetMapping
|
||||
public ResponseObject lists(FleetMember fleetMember,
|
||||
@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
return getSuccessResult(fleetMemberService.queryPage(page,fleetMember));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public ResponseObject queryById(@PathVariable("id") Integer id) {
|
||||
return getSuccessResult(fleetMemberService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param fleetMember 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
public ResponseObject add(@RequestBody FleetMember fleetMember) {
|
||||
return getSuccessResult(fleetMemberService.insert(fleetMember));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
*
|
||||
* @param fleetMember 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@PutMapping
|
||||
public ResponseObject edit(@RequestBody FleetMember fleetMember) {
|
||||
return getSuccessResult(fleetMemberService.update(fleetMember));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@DeleteMapping("{id}")
|
||||
public ResponseObject deleteById(@PathVariable Integer id) {
|
||||
return getSuccessResult(fleetMemberService.deleteById(id));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,117 @@
|
||||
package com.fuint.business.fleet.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fuint.framework.entity.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 车队信息(FleetInfo)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-02 10:32:53
|
||||
*/
|
||||
@Data
|
||||
@TableName("fleet_info")
|
||||
@ApiModel(value = "FleetInfo", description = "车队信息")
|
||||
public class FleetInfo extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("自增ID")
|
||||
@TableId(value = "ID", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 所属连锁店id
|
||||
*/
|
||||
private Integer chainStoreId;
|
||||
/**
|
||||
* 所属店铺id
|
||||
*/
|
||||
private Integer storeId;
|
||||
/**
|
||||
* 车队名称
|
||||
*/
|
||||
private String fleetName;
|
||||
/**
|
||||
* 卡类型:储值卡、囤油卡
|
||||
*/
|
||||
private String cardType;
|
||||
/**
|
||||
* 车队负责人
|
||||
*/
|
||||
private String fleetLeader;
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
private String mobile;
|
||||
/**
|
||||
* 会员等级id
|
||||
*/
|
||||
private Integer gradeId;
|
||||
/**
|
||||
* 员工id
|
||||
*/
|
||||
private Integer staffId;
|
||||
/**
|
||||
* 会员标签id
|
||||
*/
|
||||
private Integer userLabelId;
|
||||
/**
|
||||
* 会员状态
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 总余额
|
||||
*/
|
||||
private String totalBalance;
|
||||
/**
|
||||
* 充值金额
|
||||
*/
|
||||
private Double rechargeAmount;
|
||||
/**
|
||||
* 赠送金额
|
||||
*/
|
||||
private Double giveAmount;
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
private String corporateName;
|
||||
/**
|
||||
* 支付方式
|
||||
*/
|
||||
private String paymentType;
|
||||
/**
|
||||
* 操作密码
|
||||
*/
|
||||
private String password;
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String createBy;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private String updateBy;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,281 @@
|
||||
package com.fuint.business.fleet.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 车队成员(FleetMember)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-02 10:33:13
|
||||
*/
|
||||
public class FleetMember implements Serializable {
|
||||
private static final long serialVersionUID = 988159363763061454L;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 所属连锁店id
|
||||
*/
|
||||
private Integer chainStoreId;
|
||||
/**
|
||||
* 所属店铺id
|
||||
*/
|
||||
private Integer storeId;
|
||||
/**
|
||||
* 车队id
|
||||
*/
|
||||
private Integer fleetId;
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
private String mobile;
|
||||
/**
|
||||
* 会员卡号;关联会员表
|
||||
*/
|
||||
private String userCardNum;
|
||||
/**
|
||||
* 副卡类型:选项为共享副卡-不限额、共享副卡限额、独立副卡
|
||||
*/
|
||||
private String secondaryCardType;
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
private String carNum;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 副卡额度
|
||||
*/
|
||||
private Double secondaryCardLimit;
|
||||
/**
|
||||
* 已用额度
|
||||
*/
|
||||
private Double usedCreditLimit;
|
||||
/**
|
||||
* 剩余额度
|
||||
*/
|
||||
private Double remainingCreditLimit;
|
||||
/**
|
||||
* 调整类型:0增加、1扣除
|
||||
*/
|
||||
private String adjustType;
|
||||
/**
|
||||
* 调整额度
|
||||
*/
|
||||
private Double adjustLimit;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
private String password;
|
||||
/**
|
||||
* 是否注销:0未注销、1已注销
|
||||
*/
|
||||
private String ifLogOff;
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String createBy;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private String updateBy;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getChainStoreId() {
|
||||
return chainStoreId;
|
||||
}
|
||||
|
||||
public void setChainStoreId(Integer chainStoreId) {
|
||||
this.chainStoreId = chainStoreId;
|
||||
}
|
||||
|
||||
public Integer getStoreId() {
|
||||
return storeId;
|
||||
}
|
||||
|
||||
public void setStoreId(Integer storeId) {
|
||||
this.storeId = storeId;
|
||||
}
|
||||
|
||||
public Integer getFleetId() {
|
||||
return fleetId;
|
||||
}
|
||||
|
||||
public void setFleetId(Integer fleetId) {
|
||||
this.fleetId = fleetId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getMobile() {
|
||||
return mobile;
|
||||
}
|
||||
|
||||
public void setMobile(String mobile) {
|
||||
this.mobile = mobile;
|
||||
}
|
||||
|
||||
public String getUserCardNum() {
|
||||
return userCardNum;
|
||||
}
|
||||
|
||||
public void setUserCardNum(String userCardNum) {
|
||||
this.userCardNum = userCardNum;
|
||||
}
|
||||
|
||||
public String getSecondaryCardType() {
|
||||
return secondaryCardType;
|
||||
}
|
||||
|
||||
public void setSecondaryCardType(String secondaryCardType) {
|
||||
this.secondaryCardType = secondaryCardType;
|
||||
}
|
||||
|
||||
public String getCarNum() {
|
||||
return carNum;
|
||||
}
|
||||
|
||||
public void setCarNum(String carNum) {
|
||||
this.carNum = carNum;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Double getSecondaryCardLimit() {
|
||||
return secondaryCardLimit;
|
||||
}
|
||||
|
||||
public void setSecondaryCardLimit(Double secondaryCardLimit) {
|
||||
this.secondaryCardLimit = secondaryCardLimit;
|
||||
}
|
||||
|
||||
public Double getUsedCreditLimit() {
|
||||
return usedCreditLimit;
|
||||
}
|
||||
|
||||
public void setUsedCreditLimit(Double usedCreditLimit) {
|
||||
this.usedCreditLimit = usedCreditLimit;
|
||||
}
|
||||
|
||||
public Double getRemainingCreditLimit() {
|
||||
return remainingCreditLimit;
|
||||
}
|
||||
|
||||
public void setRemainingCreditLimit(Double remainingCreditLimit) {
|
||||
this.remainingCreditLimit = remainingCreditLimit;
|
||||
}
|
||||
|
||||
public String getAdjustType() {
|
||||
return adjustType;
|
||||
}
|
||||
|
||||
public void setAdjustType(String adjustType) {
|
||||
this.adjustType = adjustType;
|
||||
}
|
||||
|
||||
public Double getAdjustLimit() {
|
||||
return adjustLimit;
|
||||
}
|
||||
|
||||
public void setAdjustLimit(Double adjustLimit) {
|
||||
this.adjustLimit = adjustLimit;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getIfLogOff() {
|
||||
return ifLogOff;
|
||||
}
|
||||
|
||||
public void setIfLogOff(String ifLogOff) {
|
||||
this.ifLogOff = ifLogOff;
|
||||
}
|
||||
|
||||
public String getCreateBy() {
|
||||
return createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getUpdateBy() {
|
||||
return updateBy;
|
||||
}
|
||||
|
||||
public void setUpdateBy(String updateBy) {
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,11 @@
|
||||
package com.fuint.business.fleet.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.fleet.entity.FleetInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface FleetInfoMapper extends BaseMapper<FleetInfo> {
|
||||
IPage<FleetInfo> queryPage(Page page,@Param("entity") FleetInfo fleetInfo);
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.fuint.business.fleet.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.fleet.entity.FleetMember;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface FleetMemberMapper extends BaseMapper<FleetMember> {
|
||||
IPage<FleetMember> queryPage(Page page, @Param("entity") FleetMember fleetMember);
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
<?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.fleet.mapper.FleetInfoMapper">
|
||||
|
||||
<select id="queryPage" resultType="com.fuint.business.fleet.entity.FleetInfo">
|
||||
SELECT * FROM fleet_info
|
||||
<where>
|
||||
<if test="entity.storeId != null and entity.storeId != ''">
|
||||
and store_id = #{entity.storeId}
|
||||
</if>
|
||||
<if test="entity.status != null and entity.status != ''">
|
||||
and status = #{entity.status}
|
||||
</if>
|
||||
<if test="entity.gradeId != null and entity.gradeId != ''">
|
||||
and grade_id = #{entity.gradeId}
|
||||
</if>
|
||||
<if test="entity.fleetName != null and entity.fleetName != ''">
|
||||
and fleet_name like concat('%', #{entity.fleetName}, '%')
|
||||
</if>
|
||||
<if test="entity.params.beginTime != null and entity.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') >= date_format(#{entity.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="entity.params.endTime != null and entity.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') <= date_format(#{entity.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -0,0 +1,30 @@
|
||||
<?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.fleet.mapper.FleetMemberMapper">
|
||||
|
||||
<select id="queryPage" resultType="com.fuint.business.fleet.entity.FleetMember">
|
||||
SELECT * FROM fleet_member
|
||||
<where>
|
||||
<if test="entity.storeId != null and entity.storeId != ''">
|
||||
and store_id = #{entity.storeId}
|
||||
</if>
|
||||
<if test="entity.status != null and entity.status != ''">
|
||||
and status = #{entity.status}
|
||||
</if>
|
||||
<if test="entity.secondaryCardType != null and entity.secondaryCardType != ''">
|
||||
and secondary_card_type = #{entity.secondaryCardType}
|
||||
</if>
|
||||
<if test="entity.fleetName != null and entity.fleetName != ''">
|
||||
and fleet_name like concat('%', #{entity.fleetName}, '%')
|
||||
</if>
|
||||
<if test="entity.params.beginTime != null and entity.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') >= date_format(#{entity.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="entity.params.endTime != null and entity.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') <= date_format(#{entity.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -0,0 +1,54 @@
|
||||
package com.fuint.business.fleet.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.fleet.entity.FleetInfo;
|
||||
|
||||
/**
|
||||
* 车队信息(FleetInfo)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-02 10:32:54
|
||||
*/
|
||||
public interface FleetInfoService {
|
||||
/**
|
||||
* 分页查询订单信息
|
||||
* @param page
|
||||
* @param fleetInfo
|
||||
* @return
|
||||
*/
|
||||
IPage<FleetInfo> queryPage(Page page, FleetInfo fleetInfo);
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
FleetInfo queryById(Integer id);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param fleetInfo 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
int insert(FleetInfo fleetInfo);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param fleetInfo 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
int update(FleetInfo fleetInfo);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
int deleteById(Integer id);
|
||||
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package com.fuint.business.fleet.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.fleet.entity.FleetMember;
|
||||
|
||||
/**
|
||||
* 车队成员(FleetMember)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-02 10:33:13
|
||||
*/
|
||||
public interface FleetMemberService {
|
||||
/**
|
||||
* 根据条件分页查询
|
||||
* @param page
|
||||
* @param fleetMember
|
||||
* @return
|
||||
*/
|
||||
IPage<FleetMember> queryPage(Page page, FleetMember fleetMember);
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
FleetMember queryById(Integer id);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param fleetMember 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
int insert(FleetMember fleetMember);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param fleetMember 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
int update(FleetMember fleetMember);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
int deleteById(Integer id);
|
||||
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.fuint.business.fleet.service.impl;
|
||||
|
||||
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.fleet.entity.FleetInfo;
|
||||
import com.fuint.business.fleet.mapper.FleetInfoMapper;
|
||||
import com.fuint.business.fleet.service.FleetInfoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
/**
|
||||
* 车队信息(FleetInfo)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-02 10:32:54
|
||||
*/
|
||||
@Service("fleetInfoService")
|
||||
public class FleetInfoServiceImpl extends ServiceImpl<FleetInfoMapper,FleetInfo> implements FleetInfoService {
|
||||
|
||||
@Override
|
||||
public IPage<FleetInfo> queryPage(Page page, FleetInfo fleetInfo) {
|
||||
return baseMapper.queryPage(page,fleetInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public FleetInfo queryById(Integer id) {
|
||||
return baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param fleetInfo 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public int insert(FleetInfo fleetInfo) {
|
||||
return baseMapper.insert(fleetInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param fleetInfo 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public int update(FleetInfo fleetInfo) {
|
||||
return baseMapper.updateById(fleetInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public int deleteById(Integer id) {
|
||||
return baseMapper.deleteById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
package com.fuint.business.fleet.service.impl;
|
||||
|
||||
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.fleet.entity.FleetMember;
|
||||
import com.fuint.business.fleet.mapper.FleetMemberMapper;
|
||||
import com.fuint.business.fleet.service.FleetMemberService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 车队成员(FleetMember)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-02 10:33:13
|
||||
*/
|
||||
@Service("fleetMemberService")
|
||||
public class FleetMemberServiceImpl extends ServiceImpl<FleetMemberMapper,FleetMember> implements FleetMemberService {
|
||||
|
||||
@Override
|
||||
public IPage<FleetMember> queryPage(Page page, FleetMember fleetMember) {
|
||||
return baseMapper.queryPage(page,fleetMember);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public FleetMember queryById(Integer id) {
|
||||
return baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param fleetMember 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public int insert(FleetMember fleetMember) {
|
||||
return baseMapper.insert(fleetMember);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param fleetMember 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public int update(FleetMember fleetMember) {
|
||||
return baseMapper.updateById(fleetMember);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public int deleteById(Integer id) {
|
||||
return baseMapper.deleteById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
package com.fuint.business.userManager.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.userManager.entity.UserLabel;
|
||||
import com.fuint.business.userManager.service.UserLabelService;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 油机汽机配置(UserLabel)表控制层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-31 14:59:04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("userLabel")
|
||||
public class UserLabelController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private UserLabelService userLabelService;
|
||||
|
||||
/**
|
||||
* 根据条件分页查询首页轮播图
|
||||
* @param userLabel
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @return
|
||||
*/
|
||||
@GetMapping
|
||||
public ResponseObject lists(UserLabel userLabel,
|
||||
@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
return getSuccessResult(userLabelService.queryPage(page,userLabel));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public ResponseObject queryById(@PathVariable("id") Integer id) {
|
||||
return getSuccessResult(userLabelService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param userLabel 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
public ResponseObject add(@RequestBody UserLabel userLabel) {
|
||||
return getSuccessResult(userLabelService.insert(userLabel));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
*
|
||||
* @param userLabel 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@PutMapping
|
||||
public ResponseObject edit(@RequestBody UserLabel userLabel) {
|
||||
return getSuccessResult(userLabelService.update(userLabel));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@DeleteMapping("{id}")
|
||||
public ResponseObject deleteById(@PathVariable Integer id) {
|
||||
return getSuccessResult(userLabelService.deleteById(id));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,70 @@
|
||||
package com.fuint.business.userManager.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fuint.framework.entity.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 会员标签表(UserLabel)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-02 10:32:21
|
||||
*/
|
||||
@Data
|
||||
@TableName("user_label")
|
||||
@ApiModel(value = "UserLabel对象", description = "会员标签表")
|
||||
public class UserLabel extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("ID")
|
||||
@TableId(value = "ID", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 所属连锁店id
|
||||
*/
|
||||
private Integer chainStoreId;
|
||||
/**
|
||||
* 所属店铺id
|
||||
*/
|
||||
private Integer storeId;
|
||||
/**
|
||||
* 标签名称
|
||||
*/
|
||||
private String labelName;
|
||||
/**
|
||||
* 标签状态
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String createBy;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private String updateBy;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,11 @@
|
||||
package com.fuint.business.userManager.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.userManager.entity.UserLabel;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface UserLabelMapper extends BaseMapper<UserLabel> {
|
||||
IPage<UserLabel> queryPage(Page page, @Param("entity") UserLabel userLabel);
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
<?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.userManager.mapper.UserLabelMapper">
|
||||
|
||||
<select id="queryPage" resultType="com.fuint.business.userManager.entity.UserLabel">
|
||||
SELECT * FROM user_label
|
||||
<where>
|
||||
<if test="entity.storeId != null and entity.storeId != ''">
|
||||
and store_id = #{entity.storeId}
|
||||
</if>
|
||||
<if test="entity.labelName != null and entity.labelName != ''">
|
||||
and label_name like concat('%', #{entity.labelName}, '%')
|
||||
</if>
|
||||
<if test="entity.params.beginTime != null and entity.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') >= date_format(#{entity.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="entity.params.endTime != null and entity.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') <= date_format(#{entity.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -0,0 +1,55 @@
|
||||
package com.fuint.business.userManager.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.userManager.entity.UserLabel;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
|
||||
/**
|
||||
* 会员标签表(UserLabel)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-02 10:32:21
|
||||
*/
|
||||
public interface UserLabelService {
|
||||
/**
|
||||
* 根据条件分页查询数据
|
||||
* @param page
|
||||
* @param userLabel
|
||||
* @return
|
||||
*/
|
||||
IPage<UserLabel> queryPage(Page page, UserLabel userLabel);
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
UserLabel queryById(Integer id);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param userLabel 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
int insert(UserLabel userLabel);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param userLabel 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
int update(UserLabel userLabel);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
int deleteById(Integer id);
|
||||
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
package com.fuint.business.userManager.service.impl;
|
||||
|
||||
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.userManager.entity.UserLabel;
|
||||
import com.fuint.business.userManager.mapper.UserLabelMapper;
|
||||
import com.fuint.business.userManager.service.UserLabelService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 会员标签表(UserLabel)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-02 10:32:21
|
||||
*/
|
||||
@Service("userLabelService")
|
||||
public class UserLabelServiceImpl extends ServiceImpl<UserLabelMapper,UserLabel> implements UserLabelService {
|
||||
|
||||
@Override
|
||||
public IPage<UserLabel> queryPage(Page page, UserLabel userLabel) {
|
||||
return baseMapper.queryPage(page,userLabel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public UserLabel queryById(Integer id) {
|
||||
return baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param userLabel 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public int insert(UserLabel userLabel) {
|
||||
return baseMapper.insert(userLabel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param userLabel 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public int update(UserLabel userLabel) {
|
||||
return baseMapper.updateById(userLabel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public int deleteById(Integer id) {
|
||||
return baseMapper.deleteById(id);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user