bug
This commit is contained in:
parent
c8e8b026d6
commit
330eeafe43
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',
|
||||
})
|
||||
}
|
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>
|
Loading…
Reference in New Issue
Block a user