From 14817696a26eb142ccae03fa7c43050840e057f5 Mon Sep 17 00:00:00 2001
From: hsy <1029150275@qq.com>
Date: 星期一, 17 八月 2026 09:35:03 +0800
Subject: [PATCH] feat(mes): 优化生产订单与排产任务列表显示,新增启停工及校验逻辑 1. 生产订单列表展示优化 (WorkOrder) - 新增「生产状态」列,全局注册 `ORDER_PRODUCTION_STATUS` 常量并绑定系统动态字典。 - 彻底重构「工序生产进度」单元格显示:弃用臃肿的 Steps 组件,改为极简横向布局(彩色状态圆点 + 进度百分比),解决表格行高被强行撑开及内容截断问题,支持横向滚动。 - 优化「完成进度」列宽及展示样式,将百分比数值外置同行显示,更加直观。 2. 排产任务列表改造 (Task) - 顶部表头重构,由单一标题重构为「全部 / 未完成 / 已完成」的 Tabs 标签页切换结构。 - 重写数据过滤逻辑,剥离写死的 status 查询,改为使用 `scheduleStatus` 字段动态响应 Tabs 切换 (0: 未完成, 1: 已完成)。 3. 工单业务逻辑增强与状态流转 - 落实「工单查询逻辑设计方案」,优化底层的工单条件检索逻辑。 - 实现「添加工单启停功能」与「停工状态」,支持工单在执行过程中的暂停与恢复业务流转。 - 强化容错与防呆设计:操作「完成订单」时增加前置校验 `handleCheckFinish`,若生产状态为未完成,强制弹出二次确认 Modal,避免误操作。 # 相关讨论/参考方案 # - 添加工单启停功能 # - 停工状态功能设计方案 # - 工单查询逻辑设计方案 # - 工单完成进度显示优化
---
src/views/srm/tender/data.ts | 81 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 81 insertions(+), 0 deletions(-)
diff --git a/src/views/srm/tender/data.ts b/src/views/srm/tender/data.ts
index d0bb157..a3b1005 100644
--- a/src/views/srm/tender/data.ts
+++ b/src/views/srm/tender/data.ts
@@ -2,6 +2,8 @@
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import {
+ BIDDING_MODE_MAP,
+ BIDDING_MODE_OPTIONS,
TENDER_STATUS_CELLTAG,
TENDER_STATUS_OPTIONS,
TENDER_TYPE_CELLTAG,
@@ -20,11 +22,23 @@
},
},
{
+ component: 'Input',
+ fieldName: '_partial',
+ dependencies: {
+ triggerFields: [''],
+ show: () => false,
+ },
+ },
+ {
fieldName: 'tenderNo',
label: '鎷涙爣缂栧彿',
component: 'Input',
rules: 'required',
componentProps: { placeholder: '璇疯緭鍏ユ嫑鏍囩紪鍙�' },
+ dependencies: {
+ triggerFields: ['_partial'],
+ show: (values) => !values._partial,
+ },
},
{
fieldName: 'tenderName',
@@ -32,6 +46,10 @@
component: 'Input',
rules: 'required',
componentProps: { placeholder: '璇疯緭鍏ユ嫑鏍囬」鐩悕绉�' },
+ dependencies: {
+ triggerFields: ['_partial'],
+ show: (values) => !values._partial,
+ },
},
{
fieldName: 'tenderType',
@@ -42,18 +60,30 @@
placeholder: '璇烽�夋嫨鎷涙爣绫诲瀷',
options: TENDER_TYPE_OPTIONS,
},
+ dependencies: {
+ triggerFields: ['_partial'],
+ show: (values) => !values._partial,
+ },
},
{
fieldName: 'purchaseOrg',
label: '閲囪喘缁勭粐',
component: 'Input',
componentProps: { placeholder: '璇疯緭鍏ラ噰璐粍缁�' },
+ dependencies: {
+ triggerFields: ['_partial'],
+ show: (values) => !values._partial,
+ },
},
{
fieldName: 'projectLeaderName',
label: '椤圭洰璐熻矗浜�',
component: 'Input',
componentProps: { placeholder: '璇疯緭鍏ラ」鐩礋璐d汉' },
+ dependencies: {
+ triggerFields: ['_partial'],
+ show: (values) => !values._partial,
+ },
},
{
fieldName: 'budgetAmount',
@@ -63,6 +93,10 @@
class: '!w-full',
min: 0,
placeholder: '璇疯緭鍏ラ绠楅噾棰�',
+ },
+ dependencies: {
+ triggerFields: ['_partial'],
+ show: (values) => !values._partial,
},
},
{
@@ -76,6 +110,10 @@
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
+ dependencies: {
+ triggerFields: ['_partial'],
+ show: (values) => !values._partial,
+ },
},
{
fieldName: 'endTime',
@@ -88,6 +126,10 @@
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
+ dependencies: {
+ triggerFields: ['_partial'],
+ show: (values) => !values._partial,
+ },
},
{
fieldName: 'bidOpenTime',
@@ -99,6 +141,29 @@
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
+ },
+ dependencies: {
+ triggerFields: ['_partial'],
+ show: (values) => !values._partial,
+ },
+ },
+ {
+ fieldName: 'biddingMode',
+ label: '鎷涙姇鏍囨ā寮�',
+ component: 'Select',
+ rules: 'required',
+ componentProps: {
+ placeholder: '璇烽�夋嫨鎷涙姇鏍囨ā寮�',
+ options: BIDDING_MODE_OPTIONS,
+ },
+ dependencies: {
+ triggerFields: ['_partial', 'id'],
+ show: (values) => !values._partial,
+ componentProps: (values) => ({
+ disabled: !!values.id,
+ placeholder: '璇烽�夋嫨鎷涙姇鏍囨ā寮�',
+ options: BIDDING_MODE_OPTIONS,
+ }),
},
},
{
@@ -153,6 +218,16 @@
options: TENDER_STATUS_OPTIONS,
},
},
+ {
+ fieldName: 'biddingMode',
+ label: '鎷涙姇鏍囨ā寮�',
+ component: 'Select',
+ componentProps: {
+ placeholder: '璇烽�夋嫨鎷涙姇鏍囨ā寮�',
+ allowClear: true,
+ options: BIDDING_MODE_OPTIONS,
+ },
+ },
];
}
@@ -173,6 +248,12 @@
minWidth: 100,
cellRender: { name: 'CellTag', props: TENDER_STATUS_CELLTAG },
},
+ {
+ field: 'biddingMode',
+ title: '鎷涙爣妯″紡',
+ minWidth: 100,
+ formatter: ({ cellValue }) => BIDDING_MODE_MAP[cellValue] || cellValue,
+ },
{ field: 'budgetAmount', title: '棰勭畻閲戦', minWidth: 120 },
{ field: 'purchaseOrg', title: '閲囪喘缁勭粐', minWidth: 100 },
{ field: 'startTime', title: '寮�濮嬫椂闂�', minWidth: 160 },
--
Gitblit v1.9.3