gaoluyang
2026-05-16 c85acf29485748eb97fbca1ace79ee4d3635002d
src/views/productionManagement/workOrder/index.vue
@@ -936,8 +936,9 @@
    }
    proxy.$modal.msgSuccess("排产已保存");
    scheduleDialogVisible.value = false;
    resetCreateScheduleRows();
    getList();
    await getList();
  } catch (error) {
    console.error("保存排产失败", error);
    ElMessage.error("保存排产失败,请重试");
@@ -961,18 +962,25 @@
    label: "生产订单号",
    prop: "productOrderNpsNo",
    width: "140",
    formatData: val => (val && val.length > 4 ? val.slice(0, -4) : val || ""),
  },
  {
    label: "产品名称",
    label: "成品名称",
    prop: "finalProductModel",
    minWidth: 200,
    overHidden: false
  },
  {
    label: "加工品名称",
    prop: "productName",
    width: "140",
  },
  {
    label: "规格",
    label: "加工品规格",
    prop: "model",
  },
  {
    label: "单位",
    label: "加工品单位",
    prop: "unit",
  },
  {
@@ -1048,7 +1056,7 @@
        },
        // 用户当前id
        disabled: row => row.completeQuantity >= row.planQuantity ||
            !isCurrentUserInUserIds(row)
            !isCurrentUserInUserIds(row) || row.hasUnreportedMachine
      },
      {
        name: "生产排产",
@@ -1124,7 +1132,10 @@
  teamList: [],
  deviceId: null,
});
function removeLastFour(str) {
  if (!str) return ''; // 空值保护
  return str.toString().slice(0, -4); // 核心:截取 0 到 倒数第4位
}
// 本次生产数量验证规则
const validateQuantity = (rule, value, callback) => {
  if (value === null || value === undefined || value === "") {
@@ -1196,7 +1207,7 @@
    await Promise.all(updates);
    ElMessage.success("审核成功");
    auditDialogVisible.value = false;
    getList();
    await getList();
  } finally {
    auditLoading.value = false;
  }
@@ -1314,7 +1325,7 @@
/** 搜索按钮操作 */
const handleQuery = () => {
  page.current = 1;
  getList();
   getList();
};
const pagination = obj => {
  page.current = obj.page;
@@ -1790,4 +1801,8 @@
    height: 140px !important;
  }
}
.el-table .cell {
  white-space: normal !important;
  word-break: break-all;
}
</style>