|
@@ -1,24 +1,7 @@
|
|
|
-<template>
|
|
|
+<template slot="header" slot-scope="scope">
|
|
|
<div class="app-container">
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
- <el-form-item label="姓名" prop="personnelName">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.personnelName"
|
|
|
- placeholder="请输入姓名"
|
|
|
- clearable
|
|
|
- size="small"
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="负责枪号" prop="gunNo">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.gunNo"
|
|
|
- placeholder="请输入负责枪号"
|
|
|
- clearable
|
|
|
- size="small"
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
+
|
|
|
<el-form-item label="油站名称" prop="stationId" >
|
|
|
<el-select
|
|
|
v-model="queryParams.stationId"
|
|
@@ -34,97 +17,33 @@
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="二维码" prop="qrCode">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.qrCode"
|
|
|
- placeholder="请输入二维码"
|
|
|
- clearable
|
|
|
- size="small"
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="手机号" prop="personnelPhone">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.personnelPhone"
|
|
|
- placeholder="请输入手机号"
|
|
|
- clearable
|
|
|
- size="small"
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
+ <el-button icon="el-icon-plus" size="mini" @click="handleAdd">添加</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
-
|
|
|
- <el-row :gutter="10" class="mb8">
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- icon="el-icon-plus"
|
|
|
- size="mini"
|
|
|
- @click="handleAdd"
|
|
|
- v-hasPermi="['station:personnel:add']"
|
|
|
- >新增</el-button>
|
|
|
- </el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="success"
|
|
|
- icon="el-icon-edit"
|
|
|
- size="mini"
|
|
|
- :disabled="single"
|
|
|
- @click="handleUpdate"
|
|
|
- v-hasPermi="['station:personnel:edit']"
|
|
|
- >修改</el-button>
|
|
|
- </el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="danger"
|
|
|
- icon="el-icon-delete"
|
|
|
- size="mini"
|
|
|
- :disabled="multiple"
|
|
|
- @click="handleDelete"
|
|
|
- v-hasPermi="['station:personnel:remove']"
|
|
|
- >删除</el-button>
|
|
|
- </el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="warning"
|
|
|
- icon="el-icon-download"
|
|
|
- size="mini"
|
|
|
- @click="handleExport"
|
|
|
- v-hasPermi="['station:personnel:export']"
|
|
|
- >导出</el-button>
|
|
|
- </el-col>
|
|
|
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
- </el-row>
|
|
|
-
|
|
|
<el-table v-loading="loading" :data="personnelList" @selection-change="handleSelectionChange">
|
|
|
- <el-table-column type="selection" width="55" align="center" />
|
|
|
<el-table-column label="油站员工主键id" v-if="false" align="center" prop="personnelId" />
|
|
|
- <el-table-column label="姓名" align="center" prop="personnelName" />
|
|
|
+ <el-table-column label="员工姓名" align="center" prop="personnelName" />
|
|
|
<el-table-column label="负责枪号" align="center" prop="gunNo" />
|
|
|
<el-table-column label="加油站id" v-if="false" align="center" prop="stationId" />
|
|
|
<el-table-column label="加油站名称" align="center" prop="stationName" />
|
|
|
<el-table-column label="二维码" align="center" prop="qrCode" />
|
|
|
- <el-table-column label="手机号" align="center" prop="personnelPhone" />
|
|
|
<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-plus"
|
|
|
+ >微信绑定</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
icon="el-icon-edit"
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
v-hasPermi="['station:personnel:edit']"
|
|
|
>修改</el-button>
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-delete"
|
|
|
- @click="handleDelete(scope.row)"
|
|
|
- v-hasPermi="['station:personnel:remove']"
|
|
|
- >删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -144,7 +63,17 @@
|
|
|
<el-input v-model="form.personnelName" placeholder="请输入员工姓名" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="负责枪号" prop="gunNo">
|
|
|
- <el-input v-model="form.gunNo" placeholder="请输入员工负责枪号" />
|
|
|
+<!-- <el-input v-model="form.gunNo" placeholder="请输入员工负责枪号" />-->
|
|
|
+ <el-checkbox-group v-model="gunNoList">
|
|
|
+ <el-checkbox
|
|
|
+ v-for = "item in checkList"
|
|
|
+ :key=item.oilGunId
|
|
|
+ :label="item.oilGunNo"
|
|
|
+ :value="item.oilGunNo"
|
|
|
+ >
|
|
|
+ {{item.oilGunNo+"号枪/"+item.oilName}}
|
|
|
+ </el-checkbox>
|
|
|
+ </el-checkbox-group>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="油站名称" prop="stationId" >
|
|
|
<el-select
|
|
@@ -162,9 +91,9 @@
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="二维码" prop="qrCode">
|
|
|
+<!-- <el-form-item label="二维码" prop="qrCode">
|
|
|
<el-input v-model="form.qrCode" placeholder="请输入二维码" />
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item>-->
|
|
|
<el-form-item label="手机号" prop="personnelPhone">
|
|
|
<el-input v-model="form.personnelPhone" placeholder="请输入员工手机号" />
|
|
|
</el-form-item>
|
|
@@ -179,7 +108,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { listPersonnel, getPersonnel, delPersonnel, addPersonnel, updatePersonnel, exportPersonnel } from "@/api/station/personnel";
|
|
|
-import {stationinfo} from "@/api/station/gun";
|
|
|
+import {stationinfo,selectGun} from "@/api/station/gun";
|
|
|
|
|
|
export default {
|
|
|
name: "Personnel",
|
|
@@ -200,6 +129,8 @@ export default {
|
|
|
// 油站员工信息表格数据
|
|
|
personnelList: [],
|
|
|
stationOptions:[],
|
|
|
+ checkList:[],
|
|
|
+ gunNoList:[],
|
|
|
// 弹出层标题
|
|
|
title: "",
|
|
|
// 是否显示弹出层
|
|
@@ -227,6 +158,10 @@ export default {
|
|
|
stationinfo().then(response => {
|
|
|
this.stationOptions = response.rows;
|
|
|
});
|
|
|
+ //获取油枪
|
|
|
+ selectGun().then(response => {
|
|
|
+ this.checkList = response.rows;
|
|
|
+ });
|
|
|
},
|
|
|
methods: {
|
|
|
/** 查询油站员工信息列表 */
|
|
@@ -262,6 +197,7 @@ export default {
|
|
|
personnelPhone: null
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
+ this.gunNoList.length=0;
|
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
@@ -291,6 +227,10 @@ export default {
|
|
|
const personnelId = row.personnelId || this.ids
|
|
|
getPersonnel(personnelId).then(response => {
|
|
|
this.form = response.data;
|
|
|
+ // this.gunNoList=this.form.gunNo.split(",").map(Number);
|
|
|
+ if(this.form.gunNo!=null &&this.form.gunNo!="" ){
|
|
|
+ this.gunNoList=this.form.gunNo.split(",");
|
|
|
+ }
|
|
|
this.open = true;
|
|
|
this.title = "修改油站员工信息";
|
|
|
});
|
|
@@ -299,6 +239,9 @@ export default {
|
|
|
submitForm() {
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
+ if(this.gunNoList !=null && this.gunNoList.length>0){
|
|
|
+ this.form.gunNo=this.gunNoList.toString();
|
|
|
+ }
|
|
|
if (this.form.personnelId != null) {
|
|
|
updatePersonnel(this.form).then(response => {
|
|
|
this.msgSuccess("修改成功");
|