|
|
@@ -3,6 +3,7 @@
|
|
|
:title="title"
|
|
|
:visible.sync="visible"
|
|
|
:close-on-click-modal="false"
|
|
|
+ destroy-on-close
|
|
|
@close="handleClose"
|
|
|
resizable
|
|
|
maxable
|
|
|
@@ -343,7 +344,7 @@
|
|
|
import toolModal from '@/views/batchRecord/components/toolModal.vue';
|
|
|
import { producetaskrulerecordSaveOrUpdateAndSubmit } from '@/api/recordRules/index.js';
|
|
|
import deptSelect from '@/components/CommomSelect/dept-select.vue';
|
|
|
- import { getUserPage } from '@/api/system/organization';
|
|
|
+ import { getUserPage, getUserByGroupIds } from '@/api/system/organization';
|
|
|
import { getteampage } from '@/api/workforceManagement/team';
|
|
|
|
|
|
export default {
|
|
|
@@ -432,6 +433,7 @@
|
|
|
type: 'add',
|
|
|
title: '报工',
|
|
|
formBaseData,
|
|
|
+ defaultExecuteUsers: [],
|
|
|
addForm: JSON.parse(JSON.stringify(formBaseData)),
|
|
|
rules: {
|
|
|
checkStartTime: [
|
|
|
@@ -613,6 +615,12 @@
|
|
|
this.getAllTeamList();
|
|
|
},
|
|
|
methods: {
|
|
|
+ getDefaultExecuteUsers() {
|
|
|
+ let data = { pageNum: 1, size: -1 };
|
|
|
+ getUserPage(data).then(res => {
|
|
|
+ this.defaultExecuteUsers = res.list;
|
|
|
+ });
|
|
|
+ },
|
|
|
// 外部调用,打开弹窗
|
|
|
open(type = 'add', data) {
|
|
|
this.type = type;
|
|
|
@@ -680,7 +688,7 @@
|
|
|
this.addForm.groupId = '1';
|
|
|
} else {
|
|
|
this.addForm.groupId =
|
|
|
- this.addForm.executeUsers[0]?.groupId + '' || '1';
|
|
|
+ this.addForm.executeUsers?.map((i) => i.groupId).join(',') || '1';
|
|
|
}
|
|
|
|
|
|
if (this.addForm.groupId) {
|
|
|
@@ -954,11 +962,11 @@
|
|
|
if (params) {
|
|
|
data = Object.assign(data, params);
|
|
|
}
|
|
|
- const res = await getUserPage(data);
|
|
|
+ const res = await getUserByGroupIds([params.groupId]);
|
|
|
if (params) {
|
|
|
- this.executorList = res.list;
|
|
|
+ this.executorList = res;
|
|
|
} else {
|
|
|
- this.uerList = res.list;
|
|
|
+ this.uerList = res;
|
|
|
}
|
|
|
} catch (error) {}
|
|
|
},
|
|
|
@@ -976,7 +984,7 @@
|
|
|
executeIdListChange() {
|
|
|
this.addForm.executeUsers = this.addForm.executeUsersIds
|
|
|
.map((userId) => {
|
|
|
- const user = this.executorList.find((u) => u.id === userId);
|
|
|
+ const user = this.defaultExecuteUsers.find((u) => u.id === userId);
|
|
|
if (!user) return null;
|
|
|
return {
|
|
|
userId: user.id,
|