Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
bb824c6daa
@ -67,3 +67,27 @@ export function createStaffQrCode(id) {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 查询油站已绑定码牌列表
|
||||||
|
export function tagCodeRecord() {
|
||||||
|
return request({
|
||||||
|
url: '/business/tag/tagCodeRecord?storeId=',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function tagCodeRecordStaff(data) {
|
||||||
|
return request({
|
||||||
|
url: '/business/tag/tagCodeRecord/staff',
|
||||||
|
method: 'post',
|
||||||
|
data:data
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function puttagCodeRecord(data) {
|
||||||
|
return request({
|
||||||
|
url: '/business/tag/tagCodeRecord',
|
||||||
|
method: 'put',
|
||||||
|
data:data
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -110,6 +110,20 @@
|
|||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
>修改</el-button>
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="binding(scope.row)"
|
||||||
|
|
||||||
|
>一键绑定</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="nobinding(scope.row)"
|
||||||
|
|
||||||
|
>解绑</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
@ -170,23 +184,6 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- <el-row :span="24">-->
|
|
||||||
<!-- <el-col :span="2" style="display: flex;margin-bottom: 10px">-->
|
|
||||||
<!-- <span style="margin-right: 10px;width: 70px">审核权限</span>-->
|
|
||||||
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col :span="22" style="display: flex;margin-bottom: 10px">-->
|
|
||||||
<!-- <el-checkbox-group v-model="auditPrem" @change="getCheckbox">-->
|
|
||||||
<!-- <el-checkbox-->
|
|
||||||
<!-- v-for="dict in dict.type.shqx"-->
|
|
||||||
<!-- :key="dict.value"-->
|
|
||||||
<!-- :label="dict.label"-->
|
|
||||||
<!-- :value="dict.value"-->
|
|
||||||
<!-- ></el-checkbox>-->
|
|
||||||
<!-- </el-checkbox-group>-->
|
|
||||||
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- </el-row>-->
|
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@ -316,13 +313,44 @@
|
|||||||
<el-button type="primary" @click="handleDownloadqrCode('qrCodeImg')">保存图片到电脑</el-button>
|
<el-button type="primary" @click="handleDownloadqrCode('qrCodeImg')">保存图片到电脑</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<el-dialog title="码牌列表" :visible.sync="openShow" width="800px" append-to-body>
|
||||||
|
|
||||||
|
<div class="wrap-box">
|
||||||
|
<div class="gang-box" :class="{'oilid' :oilid == item.id }" v-for="(item,index) in arrList" :key="index">
|
||||||
|
<div>
|
||||||
|
{{item.companyName}}
|
||||||
|
</div>
|
||||||
|
<div style="color: #00afff;cursor: pointer;margin-right: 15px" v-if="oilid != item.id" @click="getoil(item.id)">
|
||||||
|
选择
|
||||||
|
</div>
|
||||||
|
<div style="color: #adadad;cursor: pointer;margin-right: 15px" v-if="oilid == item.id">
|
||||||
|
已选择
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="yesyesyes">确定绑定</el-button>
|
||||||
|
<el-button @click="openShow=false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import QRCode from 'qrcode'
|
import QRCode from 'qrcode'
|
||||||
import {getName} from "../../utils/fuint";
|
import {getName} from "../../utils/fuint";
|
||||||
import {addStaff, createStaffQrCode, delStaff, getStaff, listStaff, queryStaff, updateStaff} from "@/api/staff/staff";
|
import {
|
||||||
|
addStaff,
|
||||||
|
createStaffQrCode,
|
||||||
|
delStaff,
|
||||||
|
getStaff,
|
||||||
|
listStaff, puttagCodeRecord,
|
||||||
|
queryStaff,
|
||||||
|
tagCodeRecord, tagCodeRecordStaff,
|
||||||
|
updateStaff
|
||||||
|
} from "@/api/staff/staff";
|
||||||
import {getDuty, listDuty} from "@/api/staff/duty";
|
import {getDuty, listDuty} from "@/api/staff/duty";
|
||||||
import html2canvas from "html2canvas";
|
import html2canvas from "html2canvas";
|
||||||
import {getDicts} from "@/api/order/data";
|
import {getDicts} from "@/api/order/data";
|
||||||
@ -337,6 +365,10 @@ export default {
|
|||||||
// 二维码类型
|
// 二维码类型
|
||||||
type:"",
|
type:"",
|
||||||
checked:false,
|
checked:false,
|
||||||
|
openShow:false,
|
||||||
|
arrList:[],
|
||||||
|
oilid:null,
|
||||||
|
staffId:null,
|
||||||
// 二维码图片url
|
// 二维码图片url
|
||||||
imgUrl:"",
|
imgUrl:"",
|
||||||
// 角色列表
|
// 角色列表
|
||||||
@ -482,10 +514,49 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.gettagCodeRecord()
|
||||||
// this.getDuty();
|
// this.getDuty();
|
||||||
// this.getStoreList();
|
// this.getStoreList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
binding(row){
|
||||||
|
this.staffId = row.id
|
||||||
|
this.openShow = true
|
||||||
|
},
|
||||||
|
nobinding(row){
|
||||||
|
let data = {
|
||||||
|
staffId:row.id
|
||||||
|
}
|
||||||
|
puttagCodeRecord(data).then(res=>{
|
||||||
|
|
||||||
|
this.$modal.msgSuccess(res.data);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
yesyesyes() {
|
||||||
|
let data = {
|
||||||
|
oilTagId: this.oilid,
|
||||||
|
staffId:this.staffId
|
||||||
|
}
|
||||||
|
tagCodeRecordStaff(data).then(res=>{
|
||||||
|
if(res.code == 200){
|
||||||
|
this.oilid = null
|
||||||
|
this.staffId = null
|
||||||
|
this.openShow = false
|
||||||
|
this.$modal.msgSuccess("绑定成功");
|
||||||
|
}
|
||||||
|
console.log(res)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getoil(id){
|
||||||
|
this.oilid = id
|
||||||
|
},
|
||||||
|
gettagCodeRecord(){
|
||||||
|
tagCodeRecord().then(res=>{
|
||||||
|
|
||||||
|
this.arrList = res.data.records
|
||||||
|
})
|
||||||
|
},
|
||||||
selectAll(val){
|
selectAll(val){
|
||||||
this.auditPrem = []
|
this.auditPrem = []
|
||||||
if (val) {
|
if (val) {
|
||||||
@ -803,4 +874,23 @@ export default {
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
}
|
}
|
||||||
|
.wrap-box{
|
||||||
|
|
||||||
|
width: 100%;
|
||||||
|
height: 300px;
|
||||||
|
overflow: auto;
|
||||||
|
margin: 10px auto;
|
||||||
|
}
|
||||||
|
.gang-box{
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 10px 0px;
|
||||||
|
border-bottom: 1px solid #dcdfe6;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.oilid{
|
||||||
|
background: #f6f8f9 !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ Vue.prototype.handleTree = handleTree
|
|||||||
// Vue.prototype.pcUrl = 'http://192.168.0.121:82/'
|
// Vue.prototype.pcUrl = 'http://192.168.0.121:82/'
|
||||||
// Vue.prototype.pcUrl = 'http://192.168.31.96:82/'
|
// Vue.prototype.pcUrl = 'http://192.168.31.96:82/'
|
||||||
// Vue.prototype.pcUrl = 'http://47.95.206.185:85/'
|
// Vue.prototype.pcUrl = 'http://47.95.206.185:85/'
|
||||||
Vue.prototype.pcUrl = 'https://www.youkerr.com/'
|
Vue.prototype.pcUrl = 'http://192.168.31.55:8081'
|
||||||
|
|
||||||
// 全局组件挂载
|
// 全局组件挂载
|
||||||
Vue.component('DictTag', DictTag)
|
Vue.component('DictTag', DictTag)
|
||||||
|
@ -3,7 +3,7 @@ import request from '@/utils/request'
|
|||||||
// 查询码牌配置列表
|
// 查询码牌配置列表
|
||||||
export function listTag(query) {
|
export function listTag(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/tag/list',
|
url: '/business/tag/oilTag',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
@ -12,7 +12,7 @@ export function listTag(query) {
|
|||||||
// 查询码牌配置详细
|
// 查询码牌配置详细
|
||||||
export function getTag(id) {
|
export function getTag(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/tag/' + id,
|
url: '/business/tag/oilTag/' + id,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -20,7 +20,7 @@ export function getTag(id) {
|
|||||||
// 新增码牌配置
|
// 新增码牌配置
|
||||||
export function addTag(data) {
|
export function addTag(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/tag',
|
url: '/business/tag/oilTag',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
@ -29,7 +29,7 @@ export function addTag(data) {
|
|||||||
// 修改码牌配置
|
// 修改码牌配置
|
||||||
export function updateTag(data) {
|
export function updateTag(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/tag',
|
url: '/business/tag/oilTag',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
@ -38,7 +38,22 @@ export function updateTag(data) {
|
|||||||
// 删除码牌配置
|
// 删除码牌配置
|
||||||
export function delTag(id) {
|
export function delTag(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/tag/' + id,
|
url: '/business/tag/oilTag/' + id,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function storeName(text) {
|
||||||
|
return request({
|
||||||
|
url: '/backendApi/store/getByStroeName?name='+text,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function tagCodeRecord(data) {
|
||||||
|
return request({
|
||||||
|
url: '/business/tag/tagCodeRecord',
|
||||||
|
method: 'post',
|
||||||
|
data:data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||||
<el-form-item label="厂家名字" prop="companyName">
|
<el-form-item label="厂家名字" prop="companyName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.companyName"
|
v-model="queryParams.companyName"
|
||||||
@ -47,7 +47,7 @@
|
|||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['system:tag:add']"
|
|
||||||
>新增</el-button>
|
>新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@ -86,14 +86,26 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="tagList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="tagList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column label="序号" type="index" 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="厂家名字" align="center" prop="companyName" />
|
||||||
<el-table-column label="二维码id" align="center" prop="tagCodeId" />
|
<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="tagCodeSn" />
|
||||||
<el-table-column label="码牌SN号" align="center" prop="snCode" />
|
<el-table-column label="码牌SN号" align="center" prop="snCode" />
|
||||||
<el-table-column label="是否已绑定油站 0:未绑定 1:已绑定" align="center" prop="status" />
|
<el-table-column label="是否已绑定油站" align="center" prop="status" >
|
||||||
<el-table-column label="是否已绑定员工 0:未绑定 1:已绑定" align="center" prop="mtStatus" />
|
<template slot-scope="scope">
|
||||||
|
<el-tag type="success" v-if="scope.row.status == 1">已绑</el-tag>
|
||||||
|
|
||||||
|
<el-tag v-if="scope.row.status == 0">未绑</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="是否已绑定员工" align="center" prop="mtStatus" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag type="success" v-if="scope.row.mtStatus == 1">已绑</el-tag>
|
||||||
|
|
||||||
|
<el-tag v-if="scope.row.mtStatus == 0">未绑</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@ -101,14 +113,21 @@
|
|||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['system:tag:edit']"
|
|
||||||
>修改</el-button>
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="oilUpdate(scope.row)"
|
||||||
|
|
||||||
|
>一键绑定</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['system:tag:remove']"
|
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -124,13 +143,11 @@
|
|||||||
|
|
||||||
<!-- 添加或修改码牌配置对话框 -->
|
<!-- 添加或修改码牌配置对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<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 ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
<el-form-item label="厂家名字" prop="companyName">
|
<el-form-item label="厂家名字" prop="companyName">
|
||||||
<el-input v-model="form.companyName" placeholder="请输入厂家名字" />
|
<el-input v-model="form.companyName" placeholder="请输入厂家名字" />
|
||||||
</el-form-item>
|
</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-form-item label="二维码SN号" prop="tagCodeSn">
|
||||||
<el-input v-model="form.tagCodeSn" placeholder="请输入二维码SN号" />
|
<el-input v-model="form.tagCodeSn" placeholder="请输入二维码SN号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -143,16 +160,55 @@
|
|||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<el-dialog title="一键绑定" :visible.sync="openShow" width="800px" append-to-body>
|
||||||
|
<!-- <div style="margin-bottom: 10px;font-weight: bold"> 油站名称: </div>-->
|
||||||
|
<div style="display: flex;">
|
||||||
|
<el-input v-model="filterText" placeholder="请输入油站名称" @input="getfilterText()"></el-input>
|
||||||
|
<div style="width: 10px ; height: 10px;"></div>
|
||||||
|
<el-button type="primary" @click="getfilterText()">查询</el-button>
|
||||||
|
</div>
|
||||||
|
<div class="wrap-box">
|
||||||
|
<div class="gang-box" :class="{'oilid' :oilid == item.id }" v-for="(item,index) in arrList" :key="index">
|
||||||
|
<div>
|
||||||
|
{{item.name}}
|
||||||
|
</div>
|
||||||
|
<div style="color: #00afff;cursor: pointer;margin-right: 15px" v-if="oilid != item.id" @click="getoil(item.id)">
|
||||||
|
选择
|
||||||
|
</div>
|
||||||
|
<div style="color: #adadad;cursor: pointer;margin-right: 15px" v-if="oilid == item.id">
|
||||||
|
已选择
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="yesyesyes">确定绑定</el-button>
|
||||||
|
<el-button @click="openShow=false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listTag, getTag, delTag, addTag, updateTag } from "@/api/system/tag";
|
import {listTag, getTag, delTag, addTag, updateTag, storeName, tagCodeRecord} from "./api/tag";
|
||||||
|
import {deptTreeSelect} from "@/api/system/Site/site";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Tag",
|
name: "Tag",
|
||||||
|
dicts: ['node_type'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
oilTagList:[],
|
||||||
|
oilid:null,
|
||||||
|
arrList:[],
|
||||||
|
filterText:"",
|
||||||
|
defaultProps: {
|
||||||
|
checkStrictly : 'true',
|
||||||
|
children: "childrens",
|
||||||
|
label: "label",
|
||||||
|
value:"id"
|
||||||
|
},
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
@ -171,6 +227,7 @@ export default {
|
|||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
|
openShow:false,
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@ -191,14 +248,55 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
yesyesyes(){
|
||||||
|
let data = {
|
||||||
|
oilTagList :this.oilTagList,
|
||||||
|
storeId:this.oilid,
|
||||||
|
status:1
|
||||||
|
}
|
||||||
|
tagCodeRecord(data).then(res=>{
|
||||||
|
if(res.code == 200){
|
||||||
|
this.$modal.msgSuccess("绑定成功");
|
||||||
|
this.openShow = false
|
||||||
|
this.oilTagList = []
|
||||||
|
this.storeId = null
|
||||||
|
this.filterText = ""
|
||||||
|
this.arrList = []
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getoil(id){
|
||||||
|
this.oilid = id
|
||||||
|
},
|
||||||
|
getfilterText(){
|
||||||
|
|
||||||
|
storeName(this.filterText).then(res=>{
|
||||||
|
console.log(res)
|
||||||
|
this.arrList = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
activecilck(data){
|
||||||
|
console.log(data)
|
||||||
|
},
|
||||||
|
handleSelect(item) {
|
||||||
|
console.log('进')
|
||||||
|
console.log(item);
|
||||||
|
},
|
||||||
|
// 修改树
|
||||||
|
handleChange(value) {
|
||||||
|
console.log(value);
|
||||||
|
},
|
||||||
|
|
||||||
/** 查询码牌配置列表 */
|
/** 查询码牌配置列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listTag(this.queryParams).then(response => {
|
listTag(this.queryParams).then(response => {
|
||||||
this.tagList = response.rows;
|
this.tagList = response.data.records;
|
||||||
this.total = response.total;
|
this.total = response.data.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -256,6 +354,11 @@ export default {
|
|||||||
this.title = "修改码牌配置";
|
this.title = "修改码牌配置";
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
oilUpdate(row){
|
||||||
|
console.log(row)
|
||||||
|
this.oilTagList.push(row.id)
|
||||||
|
this.openShow = true
|
||||||
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
@ -295,3 +398,23 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style >
|
||||||
|
.wrap-box{
|
||||||
|
|
||||||
|
width: 100%;
|
||||||
|
height: 300px;
|
||||||
|
overflow: auto;
|
||||||
|
margin: 10px auto;
|
||||||
|
}
|
||||||
|
.gang-box{
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 10px 0px;
|
||||||
|
border-bottom: 1px solid #dcdfe6;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.oilid{
|
||||||
|
background: #f6f8f9 !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -3,8 +3,8 @@ import request from '@/utils/request'
|
|||||||
// 查询码牌二维码列表
|
// 查询码牌二维码列表
|
||||||
export function listCode(query) {
|
export function listCode(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/code/list',
|
url: '/business/tag/tagCode',
|
||||||
method: 'get',
|
method: 'GET',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -20,8 +20,9 @@ export function getCode(id) {
|
|||||||
// 新增码牌二维码
|
// 新增码牌二维码
|
||||||
export function addCode(data) {
|
export function addCode(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/code',
|
url: '/business/tag/tagCode',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
responseType: 'blob', // 表明返回服务器返回的数据类型
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -1,26 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||||
<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-form-item label="二维码SN号" prop="tagCodeSn">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.tagCodeSn"
|
v-model="queryParams.tagCodeSn"
|
||||||
placeholder="请输入二维码SN号"
|
placeholder="二维码SN号"
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="图片地址" prop="imageUrl">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.imageUrl"
|
|
||||||
placeholder="请输入图片地址"
|
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
@ -30,7 +14,6 @@
|
|||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
@ -39,7 +22,6 @@
|
|||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['system:code:add']"
|
|
||||||
>新增</el-button>
|
>新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@ -76,33 +58,18 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="codeList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="codeList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="index" >
|
||||||
<el-table-column label="主键id" align="center" prop="id" />
|
</el-table-column>
|
||||||
<el-table-column label="码牌二维码:域名+字符串" align="center" prop="collection" />
|
<el-table-column label="码牌二维码:域名+字符串" align="center" prop="tagCodeSn" />
|
||||||
<el-table-column label="二维码SN号" align="center" prop="tagCodeSn" />
|
<el-table-column label="二维码SN号" align="center" prop="tagCodeSn" />
|
||||||
<el-table-column label="图片地址" align="center" prop="imageUrl" />
|
<el-table-column label="图片地址" align="center" prop="imageUrl" >
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<img :src="imgUrl + scope.row.imageUrl" alt="">
|
||||||
size="mini"
|
<div>{{scope.row.imageUrl}}</div>
|
||||||
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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total>0"
|
v-show="total>0"
|
||||||
:total="total"
|
:total="total"
|
||||||
@ -113,15 +80,9 @@
|
|||||||
|
|
||||||
<!-- 添加或修改码牌二维码对话框 -->
|
<!-- 添加或修改码牌二维码对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<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 ref="form" :model="form" :rules="rules" label-width="110px">
|
||||||
<el-form-item label="码牌二维码:域名+字符串" prop="collection">
|
<el-form-item label="请输入生产数量" prop="collection">
|
||||||
<el-input v-model="form.collection" placeholder="请输入码牌二维码:域名+字符串" />
|
<el-input v-model="form.total" 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-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
@ -133,12 +94,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listCode, getCode, delCode, addCode, updateCode } from "@/api/system/code";
|
import { listCode, getCode, delCode, addCode, updateCode } from "./api/code";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Code",
|
name: "Code",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
imgUrl:this.pcUrl,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
@ -180,8 +142,8 @@ export default {
|
|||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listCode(this.queryParams).then(response => {
|
listCode(this.queryParams).then(response => {
|
||||||
this.codeList = response.rows;
|
this.codeList = response.data.records;
|
||||||
this.total = response.total;
|
this.total = response.data.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -248,6 +210,18 @@ export default {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addCode(this.form).then(response => {
|
addCode(this.form).then(response => {
|
||||||
|
|
||||||
|
const blob = new Blob([response], { type: 'application/zip' });
|
||||||
|
const url = window.URL.createObjectURL(blob);
|
||||||
|
|
||||||
|
const link = document.createElement('a');
|
||||||
|
link.href = url;
|
||||||
|
|
||||||
|
// 设置下载文件的名称
|
||||||
|
link.setAttribute('download', '1');
|
||||||
|
|
||||||
|
// 模拟点击链接进行下载
|
||||||
|
link.click();
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
@ -169,7 +169,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listRecord, getRecord, delRecord, addRecord, updateRecord } from "@/api/system/record";
|
import { listRecord, getRecord, delRecord, addRecord, updateRecord } from "./api/record";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Record",
|
name: "Record",
|
||||||
|
Loading…
Reference in New Issue
Block a user