Преглед на файлове

feat: 优化打开对话框时的任务列表加载逻辑,增加工作中心ID参数

xieyong преди 1 седмица
родител
ревизия
e773524d90
променени са 1 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. 3 2
      src/views/productionPlan/components/planDotLine.vue

+ 3 - 2
src/views/productionPlan/components/planDotLine.vue

@@ -411,10 +411,10 @@
       async open(data) {
         this.currentPlan = data || null;
         this.planRoutingPayload = null;
+        await this.loadTaskList()
         await Promise.all([
           this.loadTeamOptions(),
           this.loadFactoryList(),
-          this.loadTaskList()
         ]);
         this.visible = true;
         this.dialogVisible = true;
@@ -586,7 +586,8 @@
       async loadTeamOptions() {
         try {
           const factoryId = this.$store.state.user.info.factoryId;
-          const res = await teamPage({ pageNum: 1, size: -1, factoryId });
+          const workCenterIds = this.planRoutingPayload.detailList[0].workCenterIds.join(',');
+          const res = await teamPage({ pageNum: 1, size: -1, factoryId, workCenterIds });
           this.teamOptions = (res?.list || []).map(
             ({ id, name, leaderUserName, leaderUserId }) => ({
               id,