This commit is contained in:
齐天大圣 2024-03-22 09:33:41 +08:00
parent fac80c5b77
commit d22e6ade77
7 changed files with 1026 additions and 1 deletions

View File

@ -589,7 +589,7 @@ import {
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import BigNumber from 'bignumber.js';
import node from "../../../../gasStation-uni/uni_modules/uview-ui/components/u-parse/node/node.vue";

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询码牌配置列表
export function listTag(query) {
return request({
url: '/system/tag/list',
method: 'get',
params: query
})
}
// 查询码牌配置详细
export function getTag(id) {
return request({
url: '/system/tag/' + id,
method: 'get'
})
}
// 新增码牌配置
export function addTag(data) {
return request({
url: '/system/tag',
method: 'post',
data: data
})
}
// 修改码牌配置
export function updateTag(data) {
return request({
url: '/system/tag',
method: 'put',
data: data
})
}
// 删除码牌配置
export function delTag(id) {
return request({
url: '/system/tag/' + id,
method: 'delete'
})
}

View File

@ -0,0 +1,297 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="厂家名字" prop="companyName">
<el-input
v-model="queryParams.companyName"
placeholder="请输入厂家名字"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="二维码id" prop="tagCodeId">
<el-input
v-model="queryParams.tagCodeId"
placeholder="请输入二维码id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="二维码SN号" prop="tagCodeSn">
<el-input
v-model="queryParams.tagCodeSn"
placeholder="请输入二维码SN号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="码牌SN号" prop="snCode">
<el-input
v-model="queryParams.snCode"
placeholder="请输入码牌SN号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:tag:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:tag:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:tag:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:tag:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="tagList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="主键id" align="center" prop="id" />
<el-table-column label="厂家名字" align="center" prop="companyName" />
<el-table-column label="二维码id" align="center" prop="tagCodeId" />
<el-table-column label="二维码SN号" align="center" prop="tagCodeSn" />
<el-table-column label="码牌SN号" align="center" prop="snCode" />
<el-table-column label="是否已绑定油站 0未绑定 1已绑定" align="center" prop="status" />
<el-table-column label="是否已绑定员工 0未绑定 1已绑定" align="center" prop="mtStatus" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:tag:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:tag:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改码牌配置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="厂家名字" prop="companyName">
<el-input v-model="form.companyName" placeholder="请输入厂家名字" />
</el-form-item>
<el-form-item label="二维码id" prop="tagCodeId">
<el-input v-model="form.tagCodeId" placeholder="请输入二维码id" />
</el-form-item>
<el-form-item label="二维码SN号" prop="tagCodeSn">
<el-input v-model="form.tagCodeSn" placeholder="请输入二维码SN号" />
</el-form-item>
<el-form-item label="码牌SN号" prop="snCode">
<el-input v-model="form.snCode" placeholder="请输入码牌SN号" />
</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 { listTag, getTag, delTag, addTag, updateTag } from "@/api/system/tag";
export default {
name: "Tag",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
tagList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
companyName: null,
tagCodeId: null,
tagCodeSn: null,
snCode: null,
status: null,
mtStatus: null,
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询码牌配置列表 */
getList() {
this.loading = true;
listTag(this.queryParams).then(response => {
this.tagList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
companyName: null,
tagCodeId: null,
tagCodeSn: null,
snCode: null,
status: null,
mtStatus: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加码牌配置";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getTag(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改码牌配置";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateTag(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addTag(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除码牌配置编号为"' + ids + '"的数据项?').then(function() {
return delTag(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/tag/export', {
...this.queryParams
}, `tag_${new Date().getTime()}.xlsx`)
}
}
};
</script>

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询码牌二维码列表
export function listCode(query) {
return request({
url: '/system/code/list',
method: 'get',
params: query
})
}
// 查询码牌二维码详细
export function getCode(id) {
return request({
url: '/system/code/' + id,
method: 'get'
})
}
// 新增码牌二维码
export function addCode(data) {
return request({
url: '/system/code',
method: 'post',
data: data
})
}
// 修改码牌二维码
export function updateCode(data) {
return request({
url: '/system/code',
method: 'put',
data: data
})
}
// 删除码牌二维码
export function delCode(id) {
return request({
url: '/system/code/' + id,
method: 'delete'
})
}

View File

@ -0,0 +1,277 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="码牌二维码:域名+字符串" prop="collection">
<el-input
v-model="queryParams.collection"
placeholder="请输入码牌二维码:域名+字符串"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="二维码SN号" prop="tagCodeSn">
<el-input
v-model="queryParams.tagCodeSn"
placeholder="请输入二维码SN号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="图片地址" prop="imageUrl">
<el-input
v-model="queryParams.imageUrl"
placeholder="请输入图片地址"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:code:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:code:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:code:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:code:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="codeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="主键id" align="center" prop="id" />
<el-table-column label="码牌二维码:域名+字符串" align="center" prop="collection" />
<el-table-column label="二维码SN号" align="center" prop="tagCodeSn" />
<el-table-column label="图片地址" align="center" prop="imageUrl" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:code:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:code:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改码牌二维码对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="码牌二维码:域名+字符串" prop="collection">
<el-input v-model="form.collection" placeholder="请输入码牌二维码:域名+字符串" />
</el-form-item>
<el-form-item label="二维码SN号" prop="tagCodeSn">
<el-input v-model="form.tagCodeSn" placeholder="请输入二维码SN号" />
</el-form-item>
<el-form-item label="图片地址" prop="imageUrl">
<el-input v-model="form.imageUrl" placeholder="请输入图片地址" />
</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 { listCode, getCode, delCode, addCode, updateCode } from "@/api/system/code";
export default {
name: "Code",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
codeList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
collection: null,
tagCodeSn: null,
imageUrl: null,
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询码牌二维码列表 */
getList() {
this.loading = true;
listCode(this.queryParams).then(response => {
this.codeList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
collection: null,
tagCodeSn: null,
imageUrl: null,
createTime: null,
updateTime: null,
createBy: null,
updateBy: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加码牌二维码";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getCode(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改码牌二维码";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateCode(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addCode(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除码牌二维码编号为"' + ids + '"的数据项?').then(function() {
return delCode(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/code/export', {
...this.queryParams
}, `code_${new Date().getTime()}.xlsx`)
}
}
};
</script>

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询码牌绑定记录列表
export function listRecord(query) {
return request({
url: '/system/record/list',
method: 'get',
params: query
})
}
// 查询码牌绑定记录详细
export function getRecord(id) {
return request({
url: '/system/record/' + id,
method: 'get'
})
}
// 新增码牌绑定记录
export function addRecord(data) {
return request({
url: '/system/record',
method: 'post',
data: data
})
}
// 修改码牌绑定记录
export function updateRecord(data) {
return request({
url: '/system/record',
method: 'put',
data: data
})
}
// 删除码牌绑定记录
export function delRecord(id) {
return request({
url: '/system/record/' + id,
method: 'delete'
})
}

View File

@ -0,0 +1,319 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="所属连锁店id" prop="chainStorId">
<el-input
v-model="queryParams.chainStorId"
placeholder="请输入所属连锁店id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="店铺id" prop="storeId">
<el-input
v-model="queryParams.storeId"
placeholder="请输入店铺id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="油站名称" prop="storeName">
<el-input
v-model="queryParams.storeName"
placeholder="请输入油站名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="码牌id" prop="oilTagId">
<el-input
v-model="queryParams.oilTagId"
placeholder="请输入码牌id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="员工id" prop="staffId">
<el-input
v-model="queryParams.staffId"
placeholder="请输入员工id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="员工名字" prop="staffName">
<el-input
v-model="queryParams.staffName"
placeholder="请输入员工名字"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:record:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:record:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:record:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:record:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="recordList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="主键id" align="center" prop="id" />
<el-table-column label="所属连锁店id" align="center" prop="chainStorId" />
<el-table-column label="店铺id" align="center" prop="storeId" />
<el-table-column label="油站名称" align="center" prop="storeName" />
<el-table-column label="码牌id" align="center" prop="oilTagId" />
<el-table-column label="员工id" align="center" prop="staffId" />
<el-table-column label="员工名字" align="center" prop="staffName" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:record:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:record:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改码牌绑定记录对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="所属连锁店id" prop="chainStorId">
<el-input v-model="form.chainStorId" placeholder="请输入所属连锁店id" />
</el-form-item>
<el-form-item label="店铺id" prop="storeId">
<el-input v-model="form.storeId" placeholder="请输入店铺id" />
</el-form-item>
<el-form-item label="油站名称" prop="storeName">
<el-input v-model="form.storeName" placeholder="请输入油站名称" />
</el-form-item>
<el-form-item label="码牌id" prop="oilTagId">
<el-input v-model="form.oilTagId" placeholder="请输入码牌id" />
</el-form-item>
<el-form-item label="员工id" prop="staffId">
<el-input v-model="form.staffId" placeholder="请输入员工id" />
</el-form-item>
<el-form-item label="员工名字" prop="staffName">
<el-input v-model="form.staffName" placeholder="请输入员工名字" />
</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 { listRecord, getRecord, delRecord, addRecord, updateRecord } from "@/api/system/record";
export default {
name: "Record",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
recordList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
chainStorId: null,
storeId: null,
storeName: null,
oilTagId: null,
staffId: null,
staffName: null,
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询码牌绑定记录列表 */
getList() {
this.loading = true;
listRecord(this.queryParams).then(response => {
this.recordList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
chainStorId: null,
storeId: null,
storeName: null,
oilTagId: null,
staffId: null,
staffName: null,
createTime: null,
updateTime: null,
createBy: null,
updateBy: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加码牌绑定记录";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getRecord(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改码牌绑定记录";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateRecord(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addRecord(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除码牌绑定记录编号为"' + ids + '"的数据项?').then(function() {
return delRecord(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/record/export', {
...this.queryParams
}, `record_${new Date().getTime()}.xlsx`)
}
}
};
</script>