|
|
@@ -173,7 +173,7 @@
|
|
|
header="员工配置"
|
|
|
body-style="padding: 22px 22px 0 22px;"
|
|
|
>
|
|
|
- <userTable ref="userTable"></userTable>
|
|
|
+ <userTable ref="userTable" @deleteIds="deleteIds"></userTable>
|
|
|
</el-card>
|
|
|
</el-form>
|
|
|
<template v-slot:footer>
|
|
|
@@ -222,6 +222,7 @@
|
|
|
defaultForm,
|
|
|
factoryList: [],
|
|
|
|
|
|
+ deleteUserIds: [],
|
|
|
|
|
|
|
|
|
statusList: [
|
|
|
@@ -287,6 +288,8 @@
|
|
|
async open(type, row) {
|
|
|
this.type = type;
|
|
|
this.visible = true;
|
|
|
+ this.deleteUserIds = []
|
|
|
+
|
|
|
if (type == 'edit') {
|
|
|
for (const key of Object.keys(this.form)) {
|
|
|
if (row[key]) {
|
|
|
@@ -307,11 +310,16 @@
|
|
|
|
|
|
// 获取下拉列表
|
|
|
await this.getlistWorkshopByParentId();
|
|
|
+ await this.getlistCf()
|
|
|
await this.getlistFactoryLineByParentId();
|
|
|
+ await this.getlistByProductionLineId();
|
|
|
}
|
|
|
this.getVersionList();
|
|
|
|
|
|
},
|
|
|
+ deleteIds(ids) {
|
|
|
+ this.deleteUserIds = ids || [];
|
|
|
+ },
|
|
|
/* 保存编辑 */
|
|
|
save() {
|
|
|
this.$refs.form.validate((valid) => {
|
|
|
@@ -320,6 +328,7 @@
|
|
|
}
|
|
|
this.loading = true;
|
|
|
let userIds = this.$refs.userTable.datasource.map((n) => n.id);
|
|
|
+
|
|
|
if (userIds.length <= 0) {
|
|
|
this.$message.error('请选择员工');
|
|
|
this.loading = false;
|
|
|
@@ -328,6 +337,7 @@
|
|
|
|
|
|
let par = this.form;
|
|
|
par.userIds = userIds;
|
|
|
+ par.deleteUserIds = this.deleteUserIds;
|
|
|
par.leaderUserId = this.$refs.userTable.getTwi();
|
|
|
par.userNumber = par.userIds.length;
|
|
|
if (this.type == 'add') {
|
|
|
@@ -381,6 +391,14 @@
|
|
|
this.form.productionLineId = '';
|
|
|
this.options.productionLineId = [];
|
|
|
|
|
|
+ this.getlistCf()
|
|
|
+ this.form.workCenterIds = ''
|
|
|
+ this.options.workCenterIds = [];
|
|
|
+
|
|
|
+ this.getlistWorkshopPlanId();
|
|
|
+ },
|
|
|
+
|
|
|
+ getlistCf() {
|
|
|
let par = {
|
|
|
type: 2,
|
|
|
parentId: this.form.factoryId,
|
|
|
@@ -390,10 +408,6 @@
|
|
|
this.workshopPlanList = res.list;
|
|
|
});
|
|
|
|
|
|
- this.form.workCenterIds = ''
|
|
|
- this.options.workCenterIds = [];
|
|
|
-
|
|
|
- this.getlistByProductionLineId();
|
|
|
},
|
|
|
|
|
|
// 获取车间
|