update - 班组用户维护

master
yinq 11 months ago
parent 02d2c6d255
commit 685618e961

@ -9,6 +9,24 @@ export function listTeamMembers(query) {
})
}
// 查询班组用户信息列表
export function teamUserList(query) {
return request({
url: '/base/teamMembers/teamUserList',
method: 'get',
params: query
})
}
// 查询班组下拉框列表
export function getTeamMemberList(query) {
return request({
url: '/base/teamMembers/getTeamMemberList',
method: 'get',
params: query
})
}
// 查询班组信息详细
export function getTeamMembers(objId) {
return request({

@ -1,10 +1,10 @@
<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="orderCode">
<el-form-item label="SAP计划编号" prop="orderCode">
<el-input
v-model="queryParams.orderCode"
placeholder="请输入工单编号"
placeholder="请输入SAP计划编号"
clearable
@keyup.enter.native="handleQuery"
/>
@ -84,7 +84,7 @@
<el-table v-loading="loading" :data="orderInfoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
<el-table-column label="工单编号" align="center" prop="orderCode" v-if="columns[1].visible"/>
<el-table-column label="SAP计划编号" align="center" prop="orderCode" v-if="columns[1].visible"/>
<el-table-column label="销售订单编号" align="center" prop="saleOrderCode" v-if="columns[2].visible"/>
<el-table-column label="销售订单行号" align="center" prop="saleOrderLineNumber" v-if="columns[3].visible"/>
<el-table-column label="物料编码" align="center" prop="materialCode" v-if="columns[4].visible"/>
@ -102,7 +102,7 @@
<dict-tag :options="dict.type.order_status" :value="scope.row.orderStatus"/>
</template>
</el-table-column>
<el-table-column label="是否已下达计划" align="center" prop="isRelease" v-if="columns[20].visible">
<el-table-column label="是否已下达生产计划" align="center" prop="isRelease" v-if="columns[20].visible">
<template slot-scope="scope">
<dict-tag :options="dict.type.is_release" :value="scope.row.isRelease"/>
</template>
@ -177,8 +177,8 @@
<!-- 添加或修改工单信息对话框 -->
<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="orderCode">
<el-input v-model="form.orderCode" placeholder="请输入工单编号" />
<el-form-item label="SAP计划编号" prop="orderCode">
<el-input v-model="form.orderCode" placeholder="请输入SAP计划编号" />
</el-form-item>
<el-form-item label="销售订单编号" prop="saleOrderCode">
<el-input v-model="form.saleOrderCode" placeholder="请输入销售订单编号" />
@ -331,7 +331,7 @@ export default {
},
columns: [
{ key: 0, label: `主键标识`, visible: false },
{ key: 1, label: `工单编号`, visible: true },
{ key: 1, label: `SAP计划编号`, visible: true },
{ key: 2, label: `销售订单编号`, visible: true },
{ key: 3, label: `销售订单行号`, visible: true },
{ key: 4, label: `物料编码`, visible: true },
@ -350,7 +350,7 @@ export default {
{ key: 17, label: `更新人`, visible: false },
{ key: 18, label: `更新时间`, visible: false },
{ key: 19, label: `完成日期`, visible: true },
{ key: 20, label: `是否已下达计划`, visible: true },
{ key: 20, label: `是否已下达生产计划`, visible: true },
]
};
},
@ -437,7 +437,7 @@ export default {
this.$modal.msgWarning("该工单已下达计划!");
return;
}
this.$modal.confirm('是否下达工单编号为:"' + row.orderCode + '"的工单计划?').then(function() {
this.$modal.confirm('是否下达SAP计划编号为:"' + row.orderCode + '"的计划?').then(function() {
return releaseOrderPlan(row);
}).then(() => {
this.getList();

@ -72,6 +72,8 @@
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="所属工厂" align="center" prop="plantName" v-if="columns[4].visible"/>
<el-table-column label="工作中心编号" align="center" prop="workCenterCode" v-if="columns[4].visible"/>
<el-table-column label="工作中心描述" align="center" prop="workCenterName" v-if="columns[4].visible"/>
<el-table-column label="启用标识" align="center" prop="isFlag" v-if="columns[5].visible" >
<template slot-scope="scope">
<dict-tag :options="dict.type.is_flag" :value="scope.row.isFlag"/>
@ -131,7 +133,7 @@
<!-- 添加或修改产线信息对话框 -->
<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="productLineCode">
<el-input v-model="form.productLineCode" placeholder="请输入产线编号" />
</el-form-item>
@ -158,6 +160,12 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="工作中心编号" prop="workCenterCode">
<el-input v-model="form.workCenterCode" placeholder="请输入工作中心编号" />
</el-form-item>
<el-form-item label="工作中心描述" prop="workCenterName">
<el-input v-model="form.workCenterName" placeholder="请输入工作中心描述" />
</el-form-item>
<el-form-item label="启用标识" prop="isFlag">
<el-radio-group v-model="form.isFlag">
<el-radio
@ -215,7 +223,9 @@ export default {
createdBy: null,
createdTime: null,
updatedBy: null,
updatedTime: null
updatedTime: null,
workCenterCode: null,
workCenterName: null
},
//
form: {},
@ -271,7 +281,9 @@ export default {
createdBy: null,
createdTime: null,
updatedBy: null,
updatedTime: null
updatedTime: null,
workCenterName: null,
workCenterCode: null
};
this.resetForm("form");
},

@ -98,6 +98,24 @@
v-hasPermi="['base:qualityInspectionItem:export']"
>导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-download"
size="mini"
@click="handleCategories"
>缺陷大类维护</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-download"
size="mini"
@click="handleSubCategories"
>缺陷小类维护</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
@ -329,6 +347,14 @@ export default {
};
this.resetForm("form");
},
handleCategories() {
const obj = { path: "/system/dict-data/index/144" };
this.$tab.closeOpenPage(obj);
},
handleSubCategories() {
const obj = { path: "/system/dict-data/index/145" };
this.$tab.closeOpenPage(obj);
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;

@ -9,6 +9,16 @@
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="班次" prop="classes">
<el-select v-model="queryParams.classes" placeholder="请选择班次">
<el-option
v-for="dict in dict.type.classes"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="班组名称" prop="teamName">
<el-input
v-model="queryParams.teamName"
@ -25,7 +35,6 @@
<!-- @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>
@ -41,39 +50,52 @@
size="mini"
@click="handleAdd"
v-hasPermi="['base:teamMembers:add']"
>新增</el-button>
>新增
</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="['base:teamMembers: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="['base:teamMembers: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="['base:teamMembers:export']"-->
<!-- >导出-->
<!-- </el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
icon="el-icon-search"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['base:teamMembers: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="['base:teamMembers: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="['base:teamMembers:export']"
>导出</el-button>
@click="handleTeamUser"
>查看班组用户</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
@ -83,8 +105,16 @@
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
<el-table-column label="班组编号" align="center" prop="teamCode" v-if="columns[1].visible"/>
<el-table-column label="班组名称" align="center" prop="teamName" v-if="columns[2].visible"/>
<el-table-column label="班次" align="center" prop="classes" v-if="columns[13].visible">
<template slot-scope="scope">
<dict-tag :options="dict.type.classes" :value="scope.row.classes"/>
</template>
</el-table-column>
<el-table-column label="班组负责人" align="center" prop="teamHead" v-if="columns[3].visible"/>
<el-table-column label="所属产线/工位" align="center" prop="productLineName" v-if="columns[4].visible"/>
<el-table-column label="开始时间" align="center" prop="startTime" v-if="columns[10].visible"/>
<el-table-column label="结束时间" align="center" prop="endTime" v-if="columns[11].visible"/>
<el-table-column label="休息时间" align="center" prop="dineTime" v-if="columns[12].visible"/>
<el-table-column label="启用标识" align="center" prop="isFlag" v-if="columns[5].visible">
<template slot-scope="scope">
<dict-tag :options="dict.type.is_flag" :value="scope.row.isFlag"/>
@ -110,14 +140,16 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['base:teamMembers:edit']"
>修改</el-button>
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['base:teamMembers:remove']"
>删除</el-button>
>删除
</el-button>
</template>
</el-table-column>
</el-table>
@ -152,13 +184,40 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="班次" prop="classes">
<el-radio-group v-model="form.classes">
<el-radio
v-for="dict in dict.type.classes"
:key="dict.value"
:label="parseInt(dict.value)"
>{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="开始时间" prop="startTime">
<el-time-select
v-model="form.startTime"
:picker-options="{ start: '00:00', step: '00:10', end: '23:50'}"
placeholder="请选择开始时间"
>
</el-time-select>
</el-form-item>
<el-form-item label="结束时间" prop="endTime">
<el-time-select
v-model="form.endTime"
:picker-options="{ start: '00:00', step: '00:10', end: '23:50'}"
placeholder="请选择结束时间"
>
</el-time-select>
</el-form-item>
<el-form-item label="启用标识" prop="isFlag">
<el-radio-group v-model="form.isFlag">
<el-radio
v-for="dict in dict.type.is_flag"
:key="dict.value"
:label="parseInt(dict.value)"
>{{dict.label}}</el-radio>
>{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
@ -171,12 +230,19 @@
</template>
<script>
import { listTeamMembers, getTeamMembers, delTeamMembers, addTeamMembers, updateTeamMembers } from "@/api/base/teamMembers";
import {findProductLineList} from "@//api/base/productLine";
import {
listTeamMembers,
getTeamMembers,
delTeamMembers,
addTeamMembers,
updateTeamMembers
} from '@/api/base/teamMembers'
import { findProductLineList } from '@//api/base/productLine'
export default {
name: "TeamMembers",
dicts: ['is_flag'],
name: 'TeamMembers',
dicts: ['is_flag','classes'],
data() {
return {
//
@ -194,7 +260,7 @@ export default {
//
teamMembersList: [],
//
title: "",
title: '',
//
open: false,
//
@ -209,13 +275,16 @@ export default {
createdBy: null,
createdTime: null,
updatedBy: null,
updatedTime: null
updatedTime: null,
startTime: null,
endTime: null,
dineTime: null,
classes: null
},
//
form: {},
//
rules: {
},
rules: {},
columns: [
{ key: 0, label: `主键标识`, visible: false },
{ key: 1, label: `班组编号`, visible: true },
@ -227,31 +296,36 @@ export default {
{ key: 7, label: `创建时间`, visible: false },
{ key: 8, label: `更新人`, visible: false },
{ key: 9, label: `更新时间`, visible: false },
{ key: 10, label: `开始时间`, visible: true },
{ key: 11, label: `结束时间`, visible: true },
{ key: 12, label: `休息时间`, visible: false },
{ key: 13, label: `班次`, visible: true }
],
// 线
productLineList: [],
};
productLineList: []
}
},
created() {
this.getList();
this.getList()
findProductLineList().then(response => {
this.productLineList = response.data;
});
this.productLineList = response.data
})
},
methods: {
/** 查询班组信息列表 */
getList() {
this.loading = true;
this.loading = true
listTeamMembers(this.queryParams).then(response => {
this.teamMembersList = response.rows;
this.total = response.total;
this.loading = false;
});
this.teamMembersList = response.rows
this.total = response.total
this.loading = false
})
},
//
cancel() {
this.open = false;
this.reset();
this.open = false
this.reset()
},
//
reset() {
@ -265,19 +339,27 @@ export default {
createdBy: null,
createdTime: null,
updatedBy: null,
updatedTime: null
};
this.resetForm("form");
updatedTime: null,
startTime: null,
endTime: null,
dineTime: null,
classes: 1
}
this.resetForm('form')
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
this.resetForm('queryForm')
this.handleQuery()
},
handleTeamUser() {
// const obj = { path: "/base/teamMembers/teamUser" };
this.$tab.openPage("班组用户信息","/base/teamMembers/teamUser" ,null);
},
//
handleSelectionChange(selection) {
@ -287,49 +369,50 @@ export default {
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加班组信息";
this.reset()
this.open = true
this.title = '添加班组信息'
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
this.reset()
const objId = row.objId || this.ids
getTeamMembers(objId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改班组信息";
});
this.form = response.data
this.open = true
this.title = '修改班组信息'
})
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.objId != null) {
updateTeamMembers(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
this.$modal.msgSuccess('修改成功')
this.open = false
this.getList()
})
} else {
addTeamMembers(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
this.$modal.msgSuccess('新增成功')
this.open = false
this.getList()
})
}
}
});
})
},
/** 删除按钮操作 */
handleDelete(row) {
const objIds = row.objId || this.ids;
const objIds = row.objId || this.ids
this.$modal.confirm('是否确认删除班组信息编号为"' + objIds + '"的数据项?').then(function() {
return delTeamMembers(objIds);
return delTeamMembers(objIds)
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
this.getList()
this.$modal.msgSuccess('删除成功')
}).catch(() => {
})
},
/** 导出按钮操作 */
handleExport() {
@ -338,5 +421,5 @@ export default {
}, `teamMembers_${new Date().getTime()}.xlsx`)
}
}
};
}
</script>

@ -0,0 +1,412 @@
<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="teamCode">-->
<!-- <el-input-->
<!-- v-model="queryParams.teamCode"-->
<!-- placeholder="请输入班组编号"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="班次" prop="classes">
<el-select v-model="queryParams.classes" placeholder="请选择班次">
<el-option
v-for="dict in dict.type.classes"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="班组名称" prop="teamName">
<el-input
v-model="queryParams.teamName"
placeholder="请输入班组名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="所属产线" prop="productLineCode">-->
<!-- <el-input-->
<!-- v-model="queryParams.productLineCode"-->
<!-- 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="['base:teamMembers: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="['base:teamMembers: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="['base:teamMembers: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="['base:teamMembers:export']"-->
<!-- >导出-->
<!-- </el-button>-->
<!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="teamMembersList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
<el-table-column label="班组编号" align="center" prop="teamCode" v-if="columns[1].visible"/>
<el-table-column label="班组名称" align="center" prop="teamName" v-if="columns[2].visible"/>
<el-table-column label="班次" align="center" prop="classes" v-if="columns[13].visible">
<template slot-scope="scope">
<dict-tag :options="dict.type.classes" :value="scope.row.classes"/>
</template>
</el-table-column>
<el-table-column label="班组负责人" align="center" prop="teamHead" v-if="columns[3].visible"/>
<el-table-column label="用户名称" align="center" prop="nickName" v-if="columns[2].visible"/>
<el-table-column label="所属产线/工位" align="center" prop="productLineName" v-if="columns[4].visible"/>
<el-table-column label="开始时间" align="center" prop="startTime" v-if="columns[10].visible"/>
<el-table-column label="结束时间" align="center" prop="endTime" v-if="columns[11].visible"/>
<el-table-column label="休息时间" align="center" prop="dineTime" v-if="columns[12].visible"/>
<el-table-column label="启用标识" align="center" prop="isFlag" v-if="columns[5].visible">
<template slot-scope="scope">
<dict-tag :options="dict.type.is_flag" :value="scope.row.isFlag"/>
</template>
</el-table-column>
<el-table-column label="创建人" align="center" prop="createdBy" v-if="columns[6].visible"/>
<el-table-column label="创建时间" align="center" prop="createdTime" width="180" v-if="columns[7].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createdTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="更新人" align="center" prop="updatedBy" v-if="columns[8].visible"/>
<el-table-column label="更新时间" align="center" prop="updatedTime" width="180" v-if="columns[9].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updatedTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<!-- <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="['base:teamMembers:edit']"-->
<!-- >修改-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['base:teamMembers: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="100px">
<el-form-item label="班组编号" prop="teamCode">
<el-input v-model="form.teamCode" placeholder="请输入班组编号"/>
</el-form-item>
<el-form-item label="班组名称" prop="teamName">
<el-input v-model="form.teamName" placeholder="请输入班组名称"/>
</el-form-item>
<el-form-item label="班组负责人" prop="teamHead">
<el-input v-model="form.teamHead" placeholder="请输入班组负责人"/>
</el-form-item>
<el-form-item label="所属产线/工位">
<el-select v-model="form.productLineCode" placeholder="请选择所属产线/工位">
<el-option
v-for="item in productLineList"
:key="item.productLineCode"
:label="item.productLineName"
:value="item.productLineCode"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="班次" prop="classes">
<el-radio-group v-model="form.classes">
<el-radio
v-for="dict in dict.type.classes"
:key="dict.value"
:label="parseInt(dict.value)"
>{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="开始时间" prop="startTime">
<el-time-select
v-model="form.startTime"
:picker-options="{ start: '00:00', step: '00:10', end: '23:50'}"
placeholder="请选择开始时间"
>
</el-time-select>
</el-form-item>
<el-form-item label="结束时间" prop="endTime">
<el-time-select
v-model="form.endTime"
:picker-options="{ start: '00:00', step: '00:10', end: '23:50'}"
placeholder="请选择结束时间"
>
</el-time-select>
</el-form-item>
<el-form-item label="启用标识" prop="isFlag">
<el-radio-group v-model="form.isFlag">
<el-radio
v-for="dict in dict.type.is_flag"
:key="dict.value"
:label="parseInt(dict.value)"
>{{ dict.label }}
</el-radio>
</el-radio-group>
</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 {
teamUserList,
getTeamMembers,
delTeamMembers,
addTeamMembers,
updateTeamMembers
} from '@/api/base/teamMembers'
import { findProductLineList } from '@//api/base/productLine'
export default {
name: 'TeamMembers',
dicts: ['is_flag','classes'],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
teamMembersList: [],
//
title: '',
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
teamCode: null,
teamName: null,
teamHead: null,
productLineCode: null,
isFlag: null,
createdBy: null,
createdTime: null,
updatedBy: null,
updatedTime: null,
startTime: null,
endTime: null,
dineTime: null,
classes: null
},
//
form: {},
//
rules: {},
columns: [
{ key: 0, label: `主键标识`, visible: false },
{ key: 1, label: `班组编号`, visible: true },
{ key: 2, label: `班组名称`, visible: true },
{ key: 3, label: `班组负责人`, visible: false },
{ key: 4, label: `所属产线/工位`, visible: true },
{ key: 5, label: `启用标识`, visible: false },
{ key: 6, label: `创建人`, visible: false },
{ key: 7, label: `创建时间`, visible: false },
{ key: 8, label: `更新人`, visible: false },
{ key: 9, label: `更新时间`, visible: false },
{ key: 10, label: `开始时间`, visible: false },
{ key: 11, label: `结束时间`, visible: false },
{ key: 12, label: `休息时间`, visible: false },
{ key: 13, label: `班次`, visible: true }
],
// 线
productLineList: []
}
},
created() {
this.getList()
findProductLineList().then(response => {
this.productLineList = response.data
})
},
methods: {
/** 查询班组信息列表 */
getList() {
this.loading = true
teamUserList(this.queryParams).then(response => {
this.teamMembersList = response.rows
this.total = response.total
this.loading = false
})
},
//
cancel() {
this.open = false
this.reset()
},
//
reset() {
this.form = {
objId: null,
teamCode: null,
teamName: null,
teamHead: null,
productLineCode: null,
isFlag: 0,
createdBy: null,
createdTime: null,
updatedBy: null,
updatedTime: null,
startTime: null,
endTime: null,
dineTime: null,
classes: 1
}
this.resetForm('form')
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm('queryForm')
this.handleQuery()
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.objId)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = '添加班组信息'
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
const objId = row.objId || this.ids
getTeamMembers(objId).then(response => {
this.form = response.data
this.open = true
this.title = '修改班组信息'
})
},
/** 提交按钮 */
submitForm() {
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.objId != null) {
updateTeamMembers(this.form).then(response => {
this.$modal.msgSuccess('修改成功')
this.open = false
this.getList()
})
} else {
addTeamMembers(this.form).then(response => {
this.$modal.msgSuccess('新增成功')
this.open = false
this.getList()
})
}
}
})
},
/** 删除按钮操作 */
handleDelete(row) {
const objIds = row.objId || this.ids
this.$modal.confirm('是否确认删除班组信息编号为"' + objIds + '"的数据项?').then(function() {
return delTeamMembers(objIds)
}).then(() => {
this.getList()
this.$modal.msgSuccess('删除成功')
}).catch(() => {
})
},
/** 导出按钮操作 */
handleExport() {
this.download('base/teamMembers/export', {
...this.queryParams
}, `teamMembers_${new Date().getTime()}.xlsx`)
}
}
}
</script>

@ -142,7 +142,8 @@
<el-table-column label="用户名称" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
<el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
<el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
<el-table-column label="所属工位" align="center" key="stationName" prop="stationName" v-if="columns[5].visible" :show-overflow-tooltip="true" />
<el-table-column label="所属工位" align="center" key="stationName" prop="stationName" v-if="columns[5].visible" />
<el-table-column label="班组名称" align="center" key="teamName" prop="teamName" v-if="columns[5].visible" />
<el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="120" />
<el-table-column label="状态" align="center" key="status" v-if="columns[5].visible">
<template slot-scope="scope">
@ -306,6 +307,18 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="班组">
<el-select v-model="form.teamCode" placeholder="请输入班组">
<el-option
v-for="item in teamMemberList"
:key="item.teamCode"
:label="item.teamName"
:value="item.teamCode"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
@ -359,6 +372,7 @@ import { getToken } from "@/utils/auth";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { findProductLineList } from '@//api/base/productLine'
import { getTeamMemberList } from '@//api/base/teamMembers'
export default {
name: "User",
@ -428,13 +442,15 @@ export default {
},
//
findStationList: [],
//
teamMemberList: [],
//
columns: [
{ key: 0, label: `用户编号`, visible: true },
{ key: 1, label: `用户名称`, visible: true },
{ key: 2, label: `用户昵称`, visible: true },
{ key: 3, label: `部门`, visible: true },
{ key: 4, label: `手机号码`, visible: true },
{ key: 4, label: `手机号码`, visible: false },
{ key: 5, label: `状态`, visible: true },
{ key: 6, label: `创建时间`, visible: true }
],
@ -494,6 +510,9 @@ export default {
findProductLineList({productLineType: 2}).then(response => {
this.findStationList = response.data;
});
getTeamMemberList(null).then(response => {
this.teamMemberList = response.data
})
},
//this
/** 查询部门下拉树结构 */
@ -534,6 +553,7 @@ export default {
userId: undefined,
deptId: undefined,
stationCode: undefined,
teamCode: undefined,
userName: undefined,
nickName: undefined,
password: undefined,

Loading…
Cancel
Save