张诺
10 小时以前 278cfc7b1d36ce98ad62749ec816d60aa09173ea
src/views/productionManagement/workOrder/index.vue
@@ -337,10 +337,8 @@
            </el-button>
          </el-col>
        </el-row>
        <el-table :data="scheduleRows" border style="width: 100%" v-loading="scheduleLoading">
          <el-table-column type="index" label="序号" width="70" align="center" />
          <el-table-column type="index" label="序号" width="70" align="center" :index="indexMethod" />
          <el-table-column label="本次上机机台" min-width="220">
            <template #default="{ row }">
              <el-select
@@ -673,8 +671,7 @@
      return;
    }
    const rows = buildScheduleRowsFromRecords(records);
    const rows = records.map(record => mapMachineRecordToScheduleRow(record));
    scheduleRows.value = rows.length > 0 ? rows : [createScheduleRow({})];
  } catch (error) {
    console.error("获取排产记录失败", error);
@@ -815,6 +812,10 @@
  }
  return payload;
};
const indexMethod = (index) => {
  return (schedulePage.current - 1) * schedulePage.size + index + 1;
};
const mapMachineRecordToScheduleRow = (record) => {
@@ -1009,7 +1010,7 @@
          showReportDialog(row);
        },
        // 用户当前id
        disabled: row => row.completeQuantity === row.planQuantity ||
        disabled: row => row.completeQuantity !==0 ||
            !isCurrentUserInUserIds(row)
      },
      {
@@ -1021,7 +1022,7 @@
          }
          openScheduleDialog(row);
        },
        disabled: row => !row.canSchedule
        disabled: row => !row.canSchedule || row.completeQuantity >= row.planQuantity
      }
      // {
      //   name:"审核",
@@ -1181,6 +1182,12 @@
  }
  const num = Number(value);
  if (isNaN(num)) {
    return;
  }
  // 如果超过待生产数量
  if (num > reportForm.planQuantity) {
    proxy.$modal.msgWarning("本次生产数量不能大于待生产数量");
    reportForm.quantity = reportForm.planQuantity;
    return;
  }
  // 如果小于1,清除
@@ -1377,13 +1384,15 @@
};
const showReportDialog = row => {
  currentReportRowData.value = row;
  reportForm.planQuantity = row.planQuantity - row.completeQuantity;
  reportForm.quantity = row.quantity !== undefined && row.quantity !== null ? row.quantity : null;
  reportForm.quantity = row.planQuantity !== undefined && row.planQuantity !== null ? row.planQuantity : null;
  reportForm.productProcessRouteItemId = row.productProcessRouteItemId;
  reportForm.workOrderId = row.id;
  reportForm.reportWork = row.reportWork;
  reportForm.productMainId = row.productMainId;
  reportForm.planQuantity = row.planQuantity;
  reportForm.startTime = "";
  reportForm.endTime = "";
  reportForm.replenishQty = 0;