|
@@ -502,9 +502,28 @@
|
|
|
code: 'default_executor'
|
|
code: 'default_executor'
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
this.isDefaultExecutor = res.value == '1' ? true : false;
|
|
this.isDefaultExecutor = res.value == '1' ? true : false;
|
|
|
|
|
+
|
|
|
|
|
+ if (this.isDefaultExecutor) {
|
|
|
|
|
+ // this.setDefaultIdList();
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
+ setDefaultIdList() {
|
|
|
|
|
+ if (this.teamList.length != 0) {
|
|
|
|
|
+ this.teamId = this.teamList[0].id;
|
|
|
|
|
+ const index = this.teamList.findIndex(
|
|
|
|
|
+ (item) => item.id == this.teamId
|
|
|
|
|
+ );
|
|
|
|
|
+ this.teamUserList = this.teamAllList[index];
|
|
|
|
|
+ const res = this.teamUserList.find(
|
|
|
|
|
+ (it) => it.id == this.$store.state.user.info.userId
|
|
|
|
|
+ );
|
|
|
|
|
+
|
|
|
|
|
+ this.executorIdList.push(res.id);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
checkTeamList(id) {
|
|
checkTeamList(id) {
|
|
|
this.executorIdList = [];
|
|
this.executorIdList = [];
|
|
|
const index = this.teamList.findIndex((item) => item.id == id);
|
|
const index = this.teamList.findIndex((item) => item.id == id);
|
|
@@ -515,44 +534,18 @@
|
|
|
const ids = id.split(',');
|
|
const ids = id.split(',');
|
|
|
this.teamList = [];
|
|
this.teamList = [];
|
|
|
this.teamUserList = [];
|
|
this.teamUserList = [];
|
|
|
- await ids.forEach((item) => {
|
|
|
|
|
- getTeam(item).then((res) => {
|
|
|
|
|
- this.teamList.push({
|
|
|
|
|
- name: res.name,
|
|
|
|
|
- id: res.id
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ const list = ids.map((item) => getTeam(item));
|
|
|
|
|
|
|
|
- this.teamAllList.push(res.userVOList);
|
|
|
|
|
|
|
+ const dataList = await Promise.all(list);
|
|
|
|
|
+
|
|
|
|
|
+ dataList.forEach((item) => {
|
|
|
|
|
+ this.teamList.push({
|
|
|
|
|
+ name: item.name,
|
|
|
|
|
+ id: item.id
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+ this.teamAllList.push(item.userVOList);
|
|
|
});
|
|
});
|
|
|
- // const ids = id.split(',');
|
|
|
|
|
- // this.teamList = [];
|
|
|
|
|
- // this.teamUserList = [];
|
|
|
|
|
- // const list = ids.map((item) => getTeam(item));
|
|
|
|
|
-
|
|
|
|
|
- // const dataList = await Promise.all(list);
|
|
|
|
|
-
|
|
|
|
|
- // dataList.forEach((item) => {
|
|
|
|
|
- // this.teamList.push({
|
|
|
|
|
- // name: item.name,
|
|
|
|
|
- // id: item.id
|
|
|
|
|
- // });
|
|
|
|
|
-
|
|
|
|
|
- // this.teamAllList.push(item.userVOList);
|
|
|
|
|
- // });
|
|
|
|
|
-
|
|
|
|
|
- // if (this.isDefaultExecutor) {
|
|
|
|
|
- // if (this.teamList.length != 0) {
|
|
|
|
|
- // this.teamId = this.teamList[0].id;
|
|
|
|
|
- // const index = this.teamList.findIndex((item) => item.id == id);
|
|
|
|
|
- // this.teamUserList = this.teamAllList[index];
|
|
|
|
|
- // console.log(
|
|
|
|
|
- // this.teamAllList,
|
|
|
|
|
- // this.$store.state.user.info,
|
|
|
|
|
- // '22323232323'
|
|
|
|
|
- // );
|
|
|
|
|
- // }
|
|
|
|
|
- // }
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
outboundOrder(id, item) {
|
|
outboundOrder(id, item) {
|