From 2540d86f0dbd77f654f558c3bf9d5ddbe7422f16 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期五, 03 七月 2026 17:22:09 +0800
Subject: [PATCH] fix: 完成设计项目和归档台账接口对接,功能联调
---
src/views/mes/pd/project/modules/document-audit-list.vue | 94 +
src/views/mes/pro/card/components/select.vue | 4
src/api/mes/pd/document-audit/index.ts | 69 +
src/views/mes/home/modules/work-order-chart.vue | 6
src/api/mes/wm/batch/index.ts | 8
src/api/mes/pro/task/issue/index.ts | 6
src/api/mes/pro/workorder/bom/index.ts | 20
src/views/mes/qc/ipqc/data.ts | 16
src/views/mes/pd/project/index.vue | 129 +-
src/views/mes/pd/project/modules/document-form.vue | 37
src/views/mes/pro/feedback/modules/form.vue | 16
src/api/mes/pd/archive/index.ts | 128 ++
src/api/mes/qc/ipqc/index.ts | 8
src/views/mes/pro/workorder/components/select.vue | 14
src/api/mes/pd/bom/index.ts | 15
src/views/mes/pd/project/detail/index.vue | 158 +-
src/views/mes/pd/project/modules/task-draft-banner.vue | 2
src/api/mes/pd/project/index.ts | 89 -
src/views/mes/pro/workorder/modules/bom-list.vue | 12
src/views/mes/wm/batch/data.ts | 10
src/views/mes/pro/task/modules/schedule-form.vue | 12
src/api/mes/qc/pendinginspect/index.ts | 6
src/views/mes/md/item/modules/item-batch-config-form.vue | 4
src/api/mes/wm/productissue/index.ts | 6
src/views/mes/dv/repair/modules/form.vue | 12
src/views/mes/pd/archive/modules/detail.vue | 160 +-
src/views/mes/home/chart-options.ts | 4
src/views/mes/pd/project/detail/data.ts | 17
src/views/mes/home/data.ts | 4
src/views/mes/dv/repair/index.vue | 18
src/api/mes/pd/version-change/index.ts | 21
src/views/mes/wm/productreceipt/data.ts | 6
src/api/mes/wm/packages/line/index.ts | 6
src/views/mes/qc/batchtrace/data.ts | 6
src/api/mes/wm/productreceipt/index.ts | 6
src/api/mes/pd/drawing-review/index.ts | 15
src/views/mes/wm/packages/data.ts | 8
src/views/mes/home/index.vue | 4
src/api/mes/wm/returnissue/index.ts | 6
src/views/mes/pro/workorder/data.ts | 84
src/views/mes/pd/project/modules/document-audit-form.vue | 65 +
src/api/mes/md/item/batchConfig/index.ts | 4
src/views/mes/pro/workorder/components/select-dialog.vue | 20
src/api/mes/dv/repair/line/index.ts | 16
src/views/mes/pro/task/index.vue | 6
src/api/mes/pd/workflow/index.ts | 6
src/api/mes/wm/outsourceissue/index.ts | 8
src/views/mes/pd/project/modules/document-list.vue | 44
src/views/mes/pro/feedback/data.ts | 26
src/views/mes/pro/workorder/index.vue | 28
src/views/mes/pro/task/components/select-dialog.vue | 6
src/packages/constants/src/dict-enum.ts | 1
src/api/mes/dv/repair/index.ts | 24
src/views/mes/pd/project/modules/form.vue | 16
src/views/mes/pd/archive/data.ts | 84
src/views/mes/pro/task/components/gantt-chart.vue | 12
src/views/mes/pro/task/data.ts | 40
src/api/mes/pd/task/index.ts | 24
src/api/mes/pro/task/index.ts | 10
src/views/mes/pd/project/data.ts | 614 +++++------
src/views/mes/pd/project/modules/user-select.vue | 61 +
src/views/mes/wm/productissue/data.ts | 6
src/api/mes/pro/card/index.ts | 8
src/views/mes/home/modules/kpi-cards.vue | 4
src/views/mes/pro/card/data.ts | 20
src/views/mes/dv/repair/data.ts | 4
src/views/mes/pd/project/modules/create-form.vue | 29
src/views/mes/pro/workorder/modules/bom-form.vue | 4
src/api/mes/wm/outsourcereceipt/index.ts | 6
src/views/mes/wm/outsourcereceipt/data.ts | 12
src/api/mes/pro/feedback/index.ts | 10
src/views/mes/home/modules/shortcuts.vue | 6
src/views/mes/wm/returnissue/data.ts | 10
src/views/mes/pro/task/modules/task-form.vue | 4
src/views/mes/pro/andon/record/data.ts | 12
src/api/mes/home/index.ts | 18
src/views/mes/pd/project/modules/version-change/data.ts | 13
src/views/mes/wm/barcode/data.ts | 4
src/packages/constants/src/biz-mes-enum.ts | 29
src/views/mes/pd/archive/index.vue | 10
/dev/null | 126 --
src/api/mes/wm/sn/index.ts | 8
src/api/mes/pro/workorder/index.ts | 36
src/api/mes/pd/document/index.ts | 53
src/views/mes/pro/workorder/modules/form.vue | 36
src/views/mes/wm/outsourceissue/data.ts | 8
src/api/mes/pro/andon/record/index.ts | 6
src/views/mes/pd/project/modules/workflow-timeline.vue | 52
src/views/mes/home/modules/alert-panel.vue | 8
89 files changed, 1,505 insertions(+), 1,398 deletions(-)
diff --git a/src/api/mes/dv/repair/index.ts b/src/api/mes/dv/repair/index.ts
index de48a37..6540254 100644
--- a/src/api/mes/dv/repair/index.ts
+++ b/src/api/mes/dv/repair/index.ts
@@ -1,13 +1,13 @@
-import type { PageParam, PageResult } from '../../../../packages/effects/request/src';
+锘縤mport type { PageParam, PageResult } from '../../../../packages/effects/request/src';
import { requestClient } from '#/api/request';
export namespace MesDvRepairApi {
- /** MES 缁翠慨宸ュ崟 */
+ /** MES 缁翠慨璁㈠崟 */
export interface Repair {
- id?: number; // 宸ュ崟缂栧彿
- code?: string; // 缁翠慨宸ュ崟缂栫爜
- name?: string; // 缁翠慨宸ュ崟鍚嶇О
+ id?: number; // 璁㈠崟缂栧彿
+ code?: string; // 缁翠慨璁㈠崟缂栫爜
+ name?: string; // 缁翠慨璁㈠崟鍚嶇О
machineryId?: number; // 璁惧缂栧彿
machineryCode?: string; // 璁惧缂栫爜
machineryName?: string; // 璁惧鍚嶇О
@@ -30,7 +30,7 @@
}
}
-/** 鏌ヨ缁翠慨宸ュ崟鍒嗛〉 */
+/** 鏌ヨ缁翠慨璁㈠崟鍒嗛〉 */
export function getRepairPage(params: PageParam) {
return requestClient.get<PageResult<MesDvRepairApi.Repair>>(
'/mes/dv/repair/page',
@@ -38,34 +38,34 @@
);
}
-/** 鏌ヨ缁翠慨宸ュ崟璇︽儏 */
+/** 鏌ヨ缁翠慨璁㈠崟璇︽儏 */
export function getRepair(id: number) {
return requestClient.get<MesDvRepairApi.Repair>(
`/mes/dv/repair/get?id=${id}`,
);
}
-/** 鏂板缁翠慨宸ュ崟 */
+/** 鏂板缁翠慨璁㈠崟 */
export function createRepair(data: MesDvRepairApi.Repair) {
return requestClient.post<number>('/mes/dv/repair/create', data);
}
-/** 淇敼缁翠慨宸ュ崟 */
+/** 淇敼缁翠慨璁㈠崟 */
export function updateRepair(data: MesDvRepairApi.Repair) {
return requestClient.put('/mes/dv/repair/update', data);
}
-/** 鍒犻櫎缁翠慨宸ュ崟 */
+/** 鍒犻櫎缁翠慨璁㈠崟 */
export function deleteRepair(id: number) {
return requestClient.delete(`/mes/dv/repair/delete?id=${id}`);
}
-/** 瀵煎嚭缁翠慨宸ュ崟 */
+/** 瀵煎嚭缁翠慨璁㈠崟 */
export function exportRepair(params: any) {
return requestClient.download('/mes/dv/repair/export-excel', { params });
}
-/** 鎻愪氦缁翠慨宸ュ崟 */
+/** 鎻愪氦缁翠慨璁㈠崟 */
export function submitRepair(id: number) {
return requestClient.put(`/mes/dv/repair/submit?id=${id}`);
}
diff --git a/src/api/mes/dv/repair/line/index.ts b/src/api/mes/dv/repair/line/index.ts
index 67a5082..ef4aba2 100644
--- a/src/api/mes/dv/repair/line/index.ts
+++ b/src/api/mes/dv/repair/line/index.ts
@@ -1,12 +1,12 @@
-import type { PageParam, PageResult } from '../../../../../packages/effects/request/src';
+锘縤mport type { PageParam, PageResult } from '../../../../../packages/effects/request/src';
import { requestClient } from '#/api/request';
export namespace MesDvRepairLineApi {
- /** MES 缁翠慨宸ュ崟琛� */
+ /** MES 缁翠慨璁㈠崟琛� */
export interface RepairLine {
id?: number; // 鏄庣粏缂栧彿
- repairId?: number; // 缁翠慨宸ュ崟缂栧彿
+ repairId?: number; // 缁翠慨璁㈠崟缂栧彿
subjectId?: number; // 椤圭洰缂栧彿
subjectName?: string; // 椤圭洰鍚嶇О
subjectContent?: string; // 椤圭洰鍐呭
@@ -18,7 +18,7 @@
}
}
-/** 鏌ヨ缁翠慨宸ュ崟琛屽垎椤� */
+/** 鏌ヨ缁翠慨璁㈠崟琛屽垎椤� */
export function getRepairLinePage(params: PageParam) {
return requestClient.get<PageResult<MesDvRepairLineApi.RepairLine>>(
'/mes/dv/repair-line/page',
@@ -26,24 +26,24 @@
);
}
-/** 鏌ヨ缁翠慨宸ュ崟琛岃鎯� */
+/** 鏌ヨ缁翠慨璁㈠崟琛岃鎯� */
export function getRepairLine(id: number) {
return requestClient.get<MesDvRepairLineApi.RepairLine>(
`/mes/dv/repair-line/get?id=${id}`,
);
}
-/** 鏂板缁翠慨宸ュ崟琛� */
+/** 鏂板缁翠慨璁㈠崟琛� */
export function createRepairLine(data: MesDvRepairLineApi.RepairLine) {
return requestClient.post('/mes/dv/repair-line/create', data);
}
-/** 淇敼缁翠慨宸ュ崟琛� */
+/** 淇敼缁翠慨璁㈠崟琛� */
export function updateRepairLine(data: MesDvRepairLineApi.RepairLine) {
return requestClient.put('/mes/dv/repair-line/update', data);
}
-/** 鍒犻櫎缁翠慨宸ュ崟琛� */
+/** 鍒犻櫎缁翠慨璁㈠崟琛� */
export function deleteRepairLine(id: number) {
return requestClient.delete(`/mes/dv/repair-line/delete?id=${id}`);
}
diff --git a/src/api/mes/home/index.ts b/src/api/mes/home/index.ts
index cf1aa99..1cce28e 100644
--- a/src/api/mes/home/index.ts
+++ b/src/api/mes/home/index.ts
@@ -1,11 +1,11 @@
-import { requestClient } from '#/api/request';
+锘縤mport { requestClient } from '#/api/request';
export namespace MesHomeApi {
/** MES 棣栭〉姹囨�荤粺璁� */
export interface Summary {
- workOrderActiveCount: number; // 杩涜涓伐鍗曟暟
- workOrderPrepareCount: number; // 寰呮帓浜у伐鍗曟暟
- workOrderFinishedCount: number; // 宸插畬鎴愬伐鍗曟暟
+ workOrderActiveCount: number; // 杩涜涓鍗曟暟
+ workOrderPrepareCount: number; // 寰呮帓浜ц鍗曟暟
+ workOrderFinishedCount: number; // 宸插畬鎴愯鍗曟暟
todayOutput: number; // 浠婃棩浜ч噺
yesterdayOutput: number; // 鏄ㄦ棩浜ч噺
todayQualifiedQuantity: number; // 浠婃棩鍚堟牸鍝佹暟
@@ -15,13 +15,13 @@
machineryStop: number; // 鍋滄満璁惧鏁�
machineryMaintenance: number; // 缁存姢涓澶囨暟
andonActiveCount: number; // 鏈缃畨鐏懠鍙暟
- repairActiveCount: number; // 寰呭鐞嗙淮淇伐鍗曟暟
+ repairActiveCount: number; // 寰呭鐞嗙淮淇鍗曟暟
}
- /** MES 宸ュ崟鐘舵�佸垎甯� */
+ /** MES 璁㈠崟鐘舵�佸垎甯� */
export interface WorkOrderStatus {
- status: number; // 宸ュ崟鐘舵��
- statusName: string; // 宸ュ崟鐘舵�佸悕绉�
+ status: number; // 璁㈠崟鐘舵��
+ statusName: string; // 璁㈠崟鐘舵�佸悕绉�
count: number; // 鏁伴噺
}
@@ -39,7 +39,7 @@
return requestClient.get<MesHomeApi.Summary>('/mes/home-statistics/summary');
}
-/** 鑾峰緱宸ュ崟鐘舵�佸垎甯� */
+/** 鑾峰緱璁㈠崟鐘舵�佸垎甯� */
export function getWorkOrderStatusDistribution() {
return requestClient.get<MesHomeApi.WorkOrderStatus[]>(
'/mes/home-statistics/work-order-status',
diff --git a/src/api/mes/md/item/batchConfig/index.ts b/src/api/mes/md/item/batchConfig/index.ts
index 676f02f..ac97d8d 100644
--- a/src/api/mes/md/item/batchConfig/index.ts
+++ b/src/api/mes/md/item/batchConfig/index.ts
@@ -1,4 +1,4 @@
-import { requestClient } from '#/api/request';
+锘縤mport { requestClient } from '#/api/request';
export namespace MesMdItemBatchConfigApi {
/** MES 鐗╂枡鎵规灞炴�ч厤缃� */
@@ -12,7 +12,7 @@
clientFlag?: boolean; // 鎵规灞炴��-瀹㈡埛
salesOrderCodeFlag?: boolean; // 鎵规灞炴��-閿�鍞鍗曠紪鍙�
purchaseOrderCodeFlag?: boolean; // 鎵规灞炴��-閲囪喘璁㈠崟缂栧彿
- workorderFlag?: boolean; // 鎵规灞炴��-鐢熶骇宸ュ崟
+ workorderFlag?: boolean; // 鎵规灞炴��-鐢熶骇璁㈠崟
taskFlag?: boolean; // 鎵规灞炴��-鐢熶骇浠诲姟
workstationFlag?: boolean; // 鎵规灞炴��-宸ヤ綔绔�
toolFlag?: boolean; // 鎵规灞炴��-宸ュ叿
diff --git a/src/api/mes/pd/archive/index.ts b/src/api/mes/pd/archive/index.ts
index 33c6efb..16a0da7 100644
--- a/src/api/mes/pd/archive/index.ts
+++ b/src/api/mes/pd/archive/index.ts
@@ -2,61 +2,135 @@
import { requestClient } from '#/api/request';
-import { isPdMockEnabled } from '../mock/enabled';
-import { pdMockStore } from '../mock/store';
-
export namespace MesPdArchiveApi {
- /** 鏁板瓧鍖栬璁″綊妗e彴璐� */
+ /** 褰掓。鍙拌处锛堝垎椤佃仛鍚堬級 */
export interface Archive {
id?: number;
- code?: string;
+ /** 鏈�鏂板綊妗g紪鍙� */
+ archiveCode?: string;
+ /** 璁捐椤圭洰ID */
projectId?: number;
- projectCode?: string;
- projectName?: string;
+ /** 浠诲姟缂栫爜 */
+ taskCode?: string;
+ /** 浠诲姟鍚嶇О */
+ taskName?: string;
+ /** 浜у搧缂栫爜 */
+ productCode?: string;
+ /** 浜у搧鍚嶇О */
+ productName?: string;
+ /** 璇ラ」鐩笅褰掓。璁板綍鎬绘暟 */
+ archiveCount?: number;
+ /** 褰掓。浜篒D */
+ archiver?: number;
+ /** 褰掓。浜哄悕绉� */
+ archiverNickname?: string;
+ /** 褰掓。鐘舵�侊紙瀛楀吀 mes_pd_archive_status锛� */
+ archiveStatus?: number;
+ /** 褰掓。鏃堕棿 */
+ archiveTime?: number;
+ /** 澶囨敞 */
+ remark?: string;
+ /** 鍒涘缓鏃堕棿 */
+ createTime?: number;
+ /** 鏇存柊浜篒D */
+ updater?: string;
+ /** 鏇存柊浜哄悕绉� */
+ updaterNickname?: string;
+ /** 鏇存柊鏃堕棿 */
+ updateTime?: number;
+ }
+
+ export interface PageParams extends PageParam {
+ archiveCode?: string;
+ projectId?: number;
+ archiveStatus?: number;
+ productCode?: string;
+ productName?: string;
+ }
+
+ /** 璇︽儏 - 椤圭洰淇℃伅 */
+ export interface ProjectInfo {
+ id?: number;
+ taskCode?: string;
+ taskName?: string;
productCode?: string;
productName?: string;
version?: string;
- archiveStatus?: number;
- archiveTime?: number;
- archiverId?: number;
- archiverName?: string;
- documentCount?: number;
- bomCount?: number;
- storagePath?: string;
+ status?: number;
+ chiefDesigner?: number;
+ chiefDesignerNickname?: string;
+ reviewer?: number;
+ reviewerNickname?: string;
+ planFinishTime?: number;
remark?: string;
createTime?: number;
}
- export interface PageParams extends PageParam {
- code?: string;
- projectCode?: string;
- productCode?: string;
+ /** 璇︽儏 - 褰掓。璁板綍 */
+ export interface ArchiveInfo {
+ id?: number;
+ archiveCode?: string;
+ archiver?: number;
+ archiverNickname?: string;
archiveStatus?: number;
+ archiveTime?: number;
+ remark?: string;
+ createTime?: number;
+ }
+
+ /** 璇︽儏 - 璁捐璧勬枡 */
+ export interface DocumentInfo {
+ id?: number;
+ documentType?: string;
+ documentName?: string;
+ documentVersion?: string;
+ fileName?: string;
+ fileUrl?: string;
+ uploadUserId?: number;
+ uploadUserNickname?: string;
+ uploadTime?: number;
+ remark?: string;
+ createTime?: number;
+ }
+
+ /** 璇︽儏锛堟寜浜у搧鏌ヨ锛� */
+ export interface DetailItem {
+ project: ProjectInfo;
+ archives: ArchiveInfo[];
+ documents: DocumentInfo[];
}
}
+/** 褰掓。鍙拌处鍒嗛〉锛堟寜椤圭洰/浜у搧鑱氬悎锛� */
export function getPdArchivePage(params: MesPdArchiveApi.PageParams) {
- if (isPdMockEnabled()) {
- return pdMockStore.getArchivePage(params);
- }
return requestClient.get<PageResult<MesPdArchiveApi.Archive>>(
'/mes/pd/archive/page',
{ params },
);
}
+/** 褰掓。鍙拌处璇︽儏锛堟寜浜у搧缂栫爜鏌ヨ锛� */
+export function getPdArchiveDetailByProduct(productCode: string) {
+ return requestClient.get<MesPdArchiveApi.DetailItem[]>(
+ '/mes/pd/archive/detail-by-product',
+ { params: { productCode } },
+ );
+}
+
export function getPdArchive(id: number) {
- if (isPdMockEnabled()) {
- return pdMockStore.getArchive(id);
- }
return requestClient.get<MesPdArchiveApi.Archive>(
`/mes/pd/archive/get?id=${id}`,
);
}
+export function updatePdArchive(data: MesPdArchiveApi.Archive) {
+ return requestClient.put('/mes/pd/archive/update', data);
+}
+
+export function deletePdArchive(id: number) {
+ return requestClient.delete(`/mes/pd/archive/delete?id=${id}`);
+}
+
export function exportPdArchive(params: MesPdArchiveApi.PageParams) {
- if (isPdMockEnabled()) {
- return Promise.resolve(new Blob());
- }
return requestClient.download('/mes/pd/archive/export-excel', { params });
}
diff --git a/src/api/mes/pd/bom/index.ts b/src/api/mes/pd/bom/index.ts
index 9e4ad3f..f3de70d 100644
--- a/src/api/mes/pd/bom/index.ts
+++ b/src/api/mes/pd/bom/index.ts
@@ -2,9 +2,6 @@
import { requestClient } from '#/api/request';
-import { isPdMockEnabled } from '../mock/enabled';
-import { pdMockStore } from '../mock/store';
-
export namespace MesPdBomApi {
/** 璁捐 BOM 琛� */
export interface BomLine {
@@ -28,9 +25,6 @@
}
export function getPdBomPage(params: MesPdBomApi.PageParams) {
- if (isPdMockEnabled()) {
- return pdMockStore.getBomPage(params);
- }
return requestClient.get<PageResult<MesPdBomApi.BomLine>>(
'/mes/pd/bom/page',
{ params },
@@ -38,22 +32,13 @@
}
export function createPdBomLine(data: MesPdBomApi.BomLine) {
- if (isPdMockEnabled()) {
- return pdMockStore.createBomLine(data);
- }
return requestClient.post<number>('/mes/pd/bom/create', data);
}
export function updatePdBomLine(data: MesPdBomApi.BomLine) {
- if (isPdMockEnabled()) {
- return pdMockStore.updateBomLine(data);
- }
return requestClient.put('/mes/pd/bom/update', data);
}
export function deletePdBomLine(id: number) {
- if (isPdMockEnabled()) {
- return pdMockStore.deleteBomLine(id);
- }
return requestClient.delete(`/mes/pd/bom/delete?id=${id}`);
}
diff --git a/src/api/mes/pd/document-audit/index.ts b/src/api/mes/pd/document-audit/index.ts
new file mode 100644
index 0000000..ed0db38
--- /dev/null
+++ b/src/api/mes/pd/document-audit/index.ts
@@ -0,0 +1,69 @@
+import type { PageParam, PageResult } from '#/packages/effects/request/src';
+
+import { requestClient } from '#/api/request';
+
+export namespace MesPdDocumentAuditApi {
+ /** 璧勬枡瀹℃牳 */
+ export interface DocumentAudit {
+ id?: number;
+ /** 瀹℃牳鍗曞彿 */
+ auditNo?: string;
+ /** 璧勬枡ID */
+ documentId?: number;
+ /** 璧勬枡鍚嶇О锛堝啑浣欙級 */
+ documentName?: string;
+ /** 璧勬枡鐗堟湰锛堝啑浣欙級 */
+ documentVersion?: string;
+ /** 瀹℃牳浜猴紙鐢ㄦ埛ID锛� */
+ reviewer?: number;
+ /** 瀹℃牳浜哄悕绉� */
+ reviewerNickname?: string;
+ /** 瀹℃牳鐘舵�侊紙瀛楀吀 mes_pd_document_audit_status锛� */
+ auditStatus?: number;
+ /** 瀹℃牳鏃堕棿 */
+ auditTime?: number;
+ /** 澶囨敞 */
+ remark?: string;
+ /** 鍒涘缓鏃堕棿 */
+ createTime?: number;
+ }
+
+ export interface PageParams extends PageParam {
+ auditNo?: string;
+ documentId?: number;
+ documentName?: string;
+ auditStatus?: number;
+ }
+}
+
+/** 鑾峰彇璧勬枡瀹℃牳鍒嗛〉锛堜笂浼犺祫鏂欐椂鍚庣鑷姩鍒涘缓锛屽墠绔棤闇�璋冪敤 create锛� */
+export function getPdDocumentAuditPage(
+ params: MesPdDocumentAuditApi.PageParams,
+) {
+ return requestClient.get<PageResult<MesPdDocumentAuditApi.DocumentAudit>>(
+ '/mes/pd/document-audit/page',
+ { params },
+ );
+}
+
+export function getPdDocumentAudit(id: number) {
+ return requestClient.get<MesPdDocumentAuditApi.DocumentAudit>(
+ `/mes/pd/document-audit/get?id=${id}`,
+ );
+}
+
+export function updatePdDocumentAudit(data: MesPdDocumentAuditApi.DocumentAudit) {
+ return requestClient.put('/mes/pd/document-audit/update', data);
+}
+
+export function deletePdDocumentAudit(id: number) {
+ return requestClient.delete(`/mes/pd/document-audit/delete?id=${id}`);
+}
+
+export function exportPdDocumentAudit(
+ params: MesPdDocumentAuditApi.PageParams,
+) {
+ return requestClient.download('/mes/pd/document-audit/export-excel', {
+ params,
+ });
+}
diff --git a/src/api/mes/pd/document/index.ts b/src/api/mes/pd/document/index.ts
index 3a637e9..c326c12 100644
--- a/src/api/mes/pd/document/index.ts
+++ b/src/api/mes/pd/document/index.ts
@@ -2,38 +2,43 @@
import { requestClient } from '#/api/request';
-import { isPdMockEnabled } from '../mock/enabled';
-import { pdMockStore } from '../mock/store';
-
export namespace MesPdDocumentApi {
/** 璁捐璧勬枡 */
export interface Document {
id?: number;
+ /** 璁捐椤圭洰ID */
projectId?: number;
- documentType?: number;
- name?: string;
- version?: string;
- fileUrl?: string;
+ /** 璧勬枡绫诲瀷锛堝瓧鍏� mes_pd_document_type锛� */
+ documentType?: string;
+ /** 璧勬枡鍚嶇О */
+ documentName?: string;
+ /** 鐗堟湰 */
+ documentVersion?: string;
+ /** 鏂囦欢鍚� */
fileName?: string;
- fileSize?: number;
- uploaderId?: number;
- uploaderName?: string;
+ /** 涓婁紶浜猴紙鐢ㄦ埛ID锛� */
+ uploadUserId?: number;
+ /** 涓婁紶浜哄悕绉� */
+ uploadUserNickname?: string;
+ /** 涓婁紶鏃堕棿 */
+ uploadTime?: number;
+ /** 鏂囦欢URL */
+ fileUrl?: string;
+ /** 澶囨敞 */
remark?: string;
+ /** 鍒涘缓鏃堕棿 */
createTime?: number;
}
export interface PageParams extends PageParam {
projectId: number;
- documentType?: number;
- name?: string;
- version?: string;
+ documentType?: string;
+ documentName?: string;
+ documentVersion?: string;
}
}
export function getPdDocumentPage(params: MesPdDocumentApi.PageParams) {
- if (isPdMockEnabled()) {
- return pdMockStore.getDocumentPage(params);
- }
return requestClient.get<PageResult<MesPdDocumentApi.Document>>(
'/mes/pd/document/page',
{ params },
@@ -41,31 +46,23 @@
}
export function getPdDocument(id: number) {
- if (isPdMockEnabled()) {
- return pdMockStore.getDocument(id);
- }
return requestClient.get<MesPdDocumentApi.Document>(
`/mes/pd/document/get?id=${id}`,
);
}
export function createPdDocument(data: MesPdDocumentApi.Document) {
- if (isPdMockEnabled()) {
- return pdMockStore.createDocument(data);
- }
return requestClient.post<number>('/mes/pd/document/create', data);
}
export function updatePdDocument(data: MesPdDocumentApi.Document) {
- if (isPdMockEnabled()) {
- return pdMockStore.updateDocument(data);
- }
return requestClient.put('/mes/pd/document/update', data);
}
export function deletePdDocument(id: number) {
- if (isPdMockEnabled()) {
- return pdMockStore.deleteDocument(id);
- }
return requestClient.delete(`/mes/pd/document/delete?id=${id}`);
}
+
+export function exportPdDocument(params: MesPdDocumentApi.PageParams) {
+ return requestClient.download('/mes/pd/document/export-excel', { params });
+}
diff --git a/src/api/mes/pd/drawing-review/index.ts b/src/api/mes/pd/drawing-review/index.ts
index 3aa08c3..bb1a47f 100644
--- a/src/api/mes/pd/drawing-review/index.ts
+++ b/src/api/mes/pd/drawing-review/index.ts
@@ -2,9 +2,6 @@
import { requestClient } from '#/api/request';
-import { isPdMockEnabled } from '../mock/enabled';
-import { pdMockStore } from '../mock/store';
-
export namespace MesPdDrawingReviewApi {
/** 鍥剧焊瀹℃牳 */
export interface DrawingReview {
@@ -41,9 +38,6 @@
export function getPdDrawingReviewPage(
params: MesPdDrawingReviewApi.PageParams,
) {
- if (isPdMockEnabled()) {
- return pdMockStore.getDrawingReviewPage(params);
- }
return requestClient.get<PageResult<MesPdDrawingReviewApi.DrawingReview>>(
'/mes/pd/drawing-review/page',
{ params },
@@ -51,24 +45,15 @@
}
export function getPdDrawingReview(id: number) {
- if (isPdMockEnabled()) {
- return pdMockStore.getDrawingReview(id);
- }
return requestClient.get<MesPdDrawingReviewApi.DrawingReview>(
`/mes/pd/drawing-review/get?id=${id}`,
);
}
export function createPdDrawingReview(data: MesPdDrawingReviewApi.DrawingReview) {
- if (isPdMockEnabled()) {
- return Promise.resolve(1);
- }
return requestClient.post<number>('/mes/pd/drawing-review/create', data);
}
export function reviewPdDrawing(data: MesPdDrawingReviewApi.ReviewParams) {
- if (isPdMockEnabled()) {
- return pdMockStore.reviewDrawing(data);
- }
return requestClient.put('/mes/pd/drawing-review/review', data);
}
diff --git a/src/api/mes/pd/mock/enabled.ts b/src/api/mes/pd/mock/enabled.ts
deleted file mode 100644
index d22db56..0000000
--- a/src/api/mes/pd/mock/enabled.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-/** 鏄惁鍚敤浜у搧璁捐锛圥D锛夋ā鍧楁湰鍦� Mock */
-export function isPdMockEnabled(): boolean {
- return import.meta.env.VITE_PD_MOCK === 'true';
-}
diff --git a/src/api/mes/pd/mock/seed.ts b/src/api/mes/pd/mock/seed.ts
deleted file mode 100644
index f011b92..0000000
--- a/src/api/mes/pd/mock/seed.ts
+++ /dev/null
@@ -1,386 +0,0 @@
-import type { MesPdArchiveApi } from '#/api/mes/pd/archive';
-import type { MesPdBomApi } from '#/api/mes/pd/bom';
-import type { MesPdDocumentApi } from '#/api/mes/pd/document';
-import type { MesPdDrawingReviewApi } from '#/api/mes/pd/drawing-review';
-import type { MesPdProjectApi } from '#/api/mes/pd/project';
-import type { MesPdVersionChangeApi } from '#/api/mes/pd/version-change';
-import type { MesPdWorkflowApi } from '#/api/mes/pd/workflow';
-
-import {
- MesPdDocumentTypeEnum,
- MesPdDrawingReviewStatusEnum,
- MesPdProjectStatusEnum,
- MesPdVersionChangeTypeEnum,
-} from '#/packages/constants/src';
-
-const DAY = 86_400_000;
-const now = Date.now();
-
-function ts(daysAgo = 0): number {
- return now - daysAgo * DAY;
-}
-
-/** 璁捐浠诲姟锛氬悓涓�浜у搧鍙娆″彂璧凤紝姣忔瀵瑰簲涓�涓増鏈� */
-export const pdMockProjects: MesPdProjectApi.Project[] = [
- {
- id: 1,
- code: 'DT-2026-0001',
- name: '鏅鸿兘娓╂帶妯$粍 V1.0 璁捐',
- productCode: 'PRD-TC-100',
- productName: '鏅鸿兘娓╂帶妯$粍',
- version: 'V1.0',
- status: MesPdProjectStatusEnum.DESIGNING,
- designerName: '寮犲伐',
- reviewerName: '鏉庝富绠�',
- planStartDate: ts(30),
- planEndDate: ts(-15),
- remark: '棣栨璁捐锛屼富鎺ф澘 + 浼犳劅鍣ㄤ竴浣撳寲',
- createTime: ts(35),
- },
- {
- id: 2,
- code: 'DT-2026-0002',
- name: '宸ヤ笟缃戝叧 V2.1 璁捐',
- productCode: 'PRD-GW-200',
- productName: '宸ヤ笟鐗╄仈缃戠綉鍏�',
- version: 'V2.1',
- status: MesPdProjectStatusEnum.REVIEWING,
- designerName: '鐜嬪伐',
- reviewerName: '璧电粡鐞�',
- planStartDate: ts(20),
- planEndDate: ts(-5),
- remark: '閫氫俊鍗忚鍗囩骇锛屽澹崇粨鏋勮皟鏁�',
- createTime: ts(25),
- },
- {
- id: 3,
- code: 'DT-2025-0012',
- name: '澶氶�氶亾閲囬泦鏉� V1.2 璁捐',
- productCode: 'PRD-SC-050',
- productName: '澶氶�氶亾閲囬泦鏉�',
- version: 'V1.2',
- status: MesPdProjectStatusEnum.ARCHIVED,
- designerName: '闄堝伐',
- reviewerName: '鏉庝富绠�',
- planStartDate: ts(90),
- planEndDate: ts(45),
- actualFinishDate: ts(40),
- remark: '宸查噺浜у綊妗�',
- createTime: ts(95),
- },
- {
- id: 4,
- code: 'DT-2026-0004',
- name: '浼烘湇鐢垫満椹卞姩鍣� V0.9 璁捐',
- productCode: 'PRD-MD-300',
- productName: '浼烘湇鐢垫満椹卞姩鍣�',
- version: 'V0.9',
- status: MesPdProjectStatusEnum.DRAFT,
- designerName: '鍒樺伐',
- reviewerName: '璧电粡鐞�',
- planStartDate: ts(5),
- planEndDate: ts(-30),
- createTime: ts(3),
- },
- {
- id: 5,
- code: 'DT-2024-0008',
- name: '澶氶�氶亾閲囬泦鏉� V1.0 璁捐',
- productCode: 'PRD-SC-050',
- productName: '澶氶�氶亾閲囬泦鏉�',
- version: 'V1.0',
- status: MesPdProjectStatusEnum.ARCHIVED,
- designerName: '闄堝伐',
- reviewerName: '鏉庝富绠�',
- planStartDate: ts(200),
- planEndDate: ts(170),
- actualFinishDate: ts(165),
- remark: '鍒濅唬鐗堟湰褰掓。',
- createTime: ts(205),
- },
- {
- id: 6,
- code: 'DT-2026-0006',
- name: '鏅鸿兘娓╂帶妯$粍 V1.1 璁捐',
- productCode: 'PRD-TC-100',
- productName: '鏅鸿兘娓╂帶妯$粍',
- version: 'V1.1',
- status: MesPdProjectStatusEnum.APPROVED,
- designerName: '寮犲伐',
- reviewerName: '鏉庝富绠�',
- planStartDate: ts(10),
- planEndDate: ts(-20),
- remark: '鏁g儹浼樺寲鏀圭増锛屽緟褰掓。',
- createTime: ts(12),
- },
-];
-
-export const pdMockArchives: MesPdArchiveApi.Archive[] = [
- {
- id: 1,
- code: 'AR-2025-0012',
- projectId: 3,
- projectCode: 'DT-2025-0012',
- projectName: '澶氶�氶亾閲囬泦鏉� V1.2 璁捐',
- productCode: 'PRD-SC-050',
- productName: '澶氶�氶亾閲囬泦鏉�',
- version: 'V1.2',
- archiveStatus: 1,
- archiveTime: ts(38),
- archiverName: '闄堝伐',
- documentCount: 3,
- bomCount: 1,
- storagePath: '/archive/2026/PRD-SC-050/V1.2',
- remark: 'V1.2 閲忎骇鐗堟湰瀹屾暣褰掓。',
- createTime: ts(38),
- },
- {
- id: 2,
- code: 'AR-2024-0008',
- projectId: 5,
- projectCode: 'DT-2024-0008',
- projectName: '澶氶�氶亾閲囬泦鏉� V1.0 璁捐',
- productCode: 'PRD-SC-050',
- productName: '澶氶�氶亾閲囬泦鏉�',
- version: 'V1.0',
- archiveStatus: 1,
- archiveTime: ts(165),
- archiverName: '闄堝伐',
- documentCount: 4,
- bomCount: 8,
- storagePath: '/archive/2024/PRD-SC-050/V1.0',
- remark: '鍒濅唬鐗堟湰褰掓。',
- createTime: ts(165),
- },
-];
-
-export const pdMockDocuments: MesPdDocumentApi.Document[] = [
- {
- id: 1,
- projectId: 1,
- documentType: MesPdDocumentTypeEnum.SCHEME,
- name: '娓╂帶鏂规璇存槑',
- version: 'V1.0',
- fileName: 'scheme-v1.pdf',
- fileUrl: 'https://example.com/scheme-v1.pdf',
- uploaderName: '寮犲伐',
- createTime: ts(25),
- },
- {
- id: 2,
- projectId: 1,
- documentType: MesPdDocumentTypeEnum.DRAWING,
- name: '涓绘帶鏉垮師鐞嗗浘',
- version: 'V1.0',
- fileName: 'main-sch.pdf',
- fileUrl: 'https://example.com/main-sch.pdf',
- uploaderName: '寮犲伐',
- createTime: ts(22),
- },
- {
- id: 3,
- projectId: 2,
- documentType: MesPdDocumentTypeEnum.DRAWING,
- name: '缃戝叧澶栧3宸ョ▼鍥�',
- version: 'V2.1',
- fileName: 'gw-enclosure.dwg',
- fileUrl: 'https://example.com/gw-enclosure.dwg',
- uploaderName: '鐜嬪伐',
- createTime: ts(12),
- },
- {
- id: 4,
- projectId: 3,
- documentType: MesPdDocumentTypeEnum.OTHER,
- name: '褰掓。妫�鏌ユ竻鍗�',
- version: 'V1.2',
- fileName: 'archive-checklist.xlsx',
- uploaderName: '闄堝伐',
- createTime: ts(39),
- },
- {
- id: 5,
- projectId: 6,
- documentType: MesPdDocumentTypeEnum.DRAWING,
- name: '鏁g儹浼樺寲 PCB 鍥�',
- version: 'V1.1',
- fileName: 'thermal-pcb-v1.1.pdf',
- fileUrl: 'https://example.com/thermal-pcb.pdf',
- uploaderName: '寮犲伐',
- createTime: ts(8),
- },
- {
- id: 6,
- projectId: 1,
- documentType: MesPdDocumentTypeEnum.BOM,
- name: 'BOM 娓呭崟',
- version: 'V1.0',
- fileName: 'bom-v1.0.xlsx',
- fileUrl: 'https://example.com/bom-v1.0.xlsx',
- uploaderName: '寮犲伐',
- createTime: ts(20),
- },
- {
- id: 7,
- projectId: 3,
- documentType: MesPdDocumentTypeEnum.BOM,
- name: 'BOM 娓呭崟',
- version: 'V1.2',
- fileName: 'bom-v1.2.xlsx',
- fileUrl: 'https://example.com/bom-v1.2.xlsx',
- uploaderName: '闄堝伐',
- createTime: ts(48),
- },
-];
-
-export const pdMockBomLines: MesPdBomApi.BomLine[] = [
- {
- id: 1,
- projectId: 1,
- itemCode: 'MAT-001',
- itemName: 'STM32 涓绘帶鑺墖',
- specification: 'LQFP-64',
- unitMeasureName: 'PCS',
- quantity: 1,
- createTime: ts(20),
- },
- {
- id: 2,
- projectId: 1,
- itemCode: 'MAT-018',
- itemName: 'NTC 鐑晱鐢甸樆',
- specification: '10K B3950',
- unitMeasureName: 'PCS',
- quantity: 2,
- createTime: ts(20),
- },
- {
- id: 3,
- projectId: 3,
- itemCode: 'MAT-102',
- itemName: '杩愮畻鏀惧ぇ鍣�',
- specification: 'SOP-8',
- unitMeasureName: 'PCS',
- quantity: 4,
- createTime: ts(50),
- },
-];
-
-export const pdMockDrawingReviews: MesPdDrawingReviewApi.DrawingReview[] = [
- {
- id: 1,
- code: 'DR-2026-0001',
- projectId: 2,
- projectCode: 'DT-2026-0002',
- projectName: '宸ヤ笟缃戝叧 V2.1 璁捐',
- documentId: 3,
- documentName: '缃戝叧澶栧3宸ョ▼鍥�',
- documentVersion: 'V2.1',
- reviewerName: '璧电粡鐞�',
- status: MesPdDrawingReviewStatusEnum.PENDING,
- createTime: ts(10),
- },
- {
- id: 2,
- code: 'DR-2026-0002',
- projectId: 6,
- projectCode: 'DT-2026-0006',
- projectName: '鏅鸿兘娓╂帶妯$粍 V1.1 璁捐',
- documentId: 5,
- documentName: '鏁g儹浼樺寲 PCB 鍥�',
- documentVersion: 'V1.1',
- reviewerName: '鏉庝富绠�',
- status: MesPdDrawingReviewStatusEnum.APPROVED,
- reviewTime: ts(6),
- createTime: ts(7),
- },
-];
-
-export const pdMockVersionChanges: MesPdVersionChangeApi.VersionChange[] = [
- {
- id: 1,
- code: 'VC-2025-0001',
- projectId: 3,
- projectCode: 'DT-2025-0012',
- projectName: '澶氶�氶亾閲囬泦鏉� V1.2 璁捐',
- changeType: MesPdVersionChangeTypeEnum.MINOR,
- fromVersion: 'V1.0',
- toVersion: 'V1.2',
- applicantName: '闄堝伐',
- changeReason: '閫氶亾鏁版墿灞曚笌绮惧害鎻愬崌',
- changeContent: '鐢� 4 閫氶亾鍗囩骇涓� 8 閫氶亾锛屾洿鎹㈤珮绮惧害 ADC',
- createTime: ts(92),
- },
- {
- id: 2,
- code: 'VC-2026-0001',
- projectId: 6,
- projectCode: 'DT-2026-0006',
- projectName: '鏅鸿兘娓╂帶妯$粍 V1.1 璁捐',
- changeType: MesPdVersionChangeTypeEnum.PATCH,
- fromVersion: 'V1.0',
- toVersion: 'V1.1',
- applicantName: '寮犲伐',
- changeReason: '浼樺寲鏁g儹甯冨眬',
- changeContent: '璋冩暣 NTC 鎽嗘斁浣嶇疆锛屾洿鏂� PCB 涓濆嵃',
- createTime: ts(8),
- },
-];
-
-export const pdMockWorkflows: Record<number, MesPdWorkflowApi.WorkflowNode[]> = {
- 1: [
- { id: 11, projectId: 1, nodeName: '鍙戣捣浠诲姟', operatorName: '寮犲伐', status: 1, operateTime: ts(35) },
- { id: 12, projectId: 1, nodeName: '鍙戝竷浠诲姟', operatorName: '寮犲伐', status: 1, operateTime: ts(34) },
- { id: 13, projectId: 1, nodeName: '涓婁紶璧勬枡', operatorName: '寮犲伐', status: 2, remark: '杩涜涓�' },
- { id: 14, projectId: 1, nodeName: '璧勬枡瀹℃牳', status: 0 },
- { id: 15, projectId: 1, nodeName: '褰掓。', status: 0 },
- ],
- 2: [
- { id: 21, projectId: 2, nodeName: '鍙戣捣浠诲姟', operatorName: '鐜嬪伐', status: 1, operateTime: ts(25) },
- { id: 22, projectId: 2, nodeName: '鍙戝竷浠诲姟', operatorName: '鐜嬪伐', status: 1, operateTime: ts(24) },
- { id: 23, projectId: 2, nodeName: '涓婁紶璧勬枡', operatorName: '鐜嬪伐', status: 1, operateTime: ts(12) },
- { id: 24, projectId: 2, nodeName: '璧勬枡瀹℃牳', operatorName: '璧电粡鐞�', status: 2, remark: '寰呭鏍�' },
- { id: 25, projectId: 2, nodeName: '褰掓。', status: 0 },
- ],
- 3: [
- { id: 31, projectId: 3, nodeName: '鍙戣捣浠诲姟', operatorName: '闄堝伐', status: 1, operateTime: ts(95) },
- { id: 32, projectId: 3, nodeName: '鍙戝竷浠诲姟', operatorName: '闄堝伐', status: 1, operateTime: ts(94) },
- { id: 33, projectId: 3, nodeName: '涓婁紶璧勬枡', operatorName: '闄堝伐', status: 1, operateTime: ts(50) },
- { id: 34, projectId: 3, nodeName: '璧勬枡瀹℃牳', operatorName: '鏉庝富绠�', status: 1, operateTime: ts(42) },
- { id: 35, projectId: 3, nodeName: '褰掓。', operatorName: '闄堝伐', status: 1, operateTime: ts(38) },
- ],
- 4: [
- { id: 41, projectId: 4, nodeName: '鍙戣捣浠诲姟', operatorName: '鍒樺伐', status: 1, operateTime: ts(3) },
- { id: 42, projectId: 4, nodeName: '鍙戝竷浠诲姟', status: 0 },
- { id: 43, projectId: 4, nodeName: '涓婁紶璧勬枡', status: 0 },
- { id: 44, projectId: 4, nodeName: '璧勬枡瀹℃牳', status: 0 },
- { id: 45, projectId: 4, nodeName: '褰掓。', status: 0 },
- ],
- 5: [
- { id: 51, projectId: 5, nodeName: '鍙戣捣浠诲姟', operatorName: '闄堝伐', status: 1, operateTime: ts(205) },
- { id: 52, projectId: 5, nodeName: '鍙戝竷浠诲姟', operatorName: '闄堝伐', status: 1, operateTime: ts(200) },
- { id: 53, projectId: 5, nodeName: '涓婁紶璧勬枡', operatorName: '闄堝伐', status: 1, operateTime: ts(170) },
- { id: 54, projectId: 5, nodeName: '璧勬枡瀹℃牳', operatorName: '鏉庝富绠�', status: 1, operateTime: ts(168) },
- { id: 55, projectId: 5, nodeName: '褰掓。', operatorName: '闄堝伐', status: 1, operateTime: ts(165) },
- ],
- 6: [
- { id: 61, projectId: 6, nodeName: '鍙戣捣浠诲姟', operatorName: '寮犲伐', status: 1, operateTime: ts(12) },
- { id: 62, projectId: 6, nodeName: '鍙戝竷浠诲姟', operatorName: '寮犲伐', status: 1, operateTime: ts(11) },
- { id: 63, projectId: 6, nodeName: '涓婁紶璧勬枡', operatorName: '寮犲伐', status: 1, operateTime: ts(8) },
- { id: 64, projectId: 6, nodeName: '璧勬枡瀹℃牳', operatorName: '鏉庝富绠�', status: 1, operateTime: ts(6) },
- { id: 65, projectId: 6, nodeName: '褰掓。', status: 2, remark: '寰呭綊妗�' },
- ],
-};
-
-export const pdMockSeq = {
- project: 7,
- archive: 3,
- task: 4,
- document: 8,
- bom: 4,
- drawingReview: 3,
- versionChange: 3,
-};
-
-/** @deprecated 璁捐浠诲姟鍗抽」鐩紝瀛愪换鍔″垎鍙戝凡搴熷純 */
-export const pdMockTasks = [];
diff --git a/src/api/mes/pd/mock/store.ts b/src/api/mes/pd/mock/store.ts
deleted file mode 100644
index 0519016..0000000
--- a/src/api/mes/pd/mock/store.ts
+++ /dev/null
@@ -1,554 +0,0 @@
-import type { MesPdArchiveApi } from '#/api/mes/pd/archive';
-import type { MesPdBomApi } from '#/api/mes/pd/bom';
-import type { MesPdDocumentApi } from '#/api/mes/pd/document';
-import type { MesPdDrawingReviewApi } from '#/api/mes/pd/drawing-review';
-import type { MesPdProjectApi } from '#/api/mes/pd/project';
-import type { MesPdTaskApi } from '#/api/mes/pd/task';
-import type { MesPdVersionChangeApi } from '#/api/mes/pd/version-change';
-import type { MesPdWorkflowApi } from '#/api/mes/pd/workflow';
-
-import { MesPdDrawingReviewStatusEnum, MesPdDocumentTypeEnum, MesPdProjectStatusEnum } from '#/packages/constants/src';
-
-import {
- pdMockArchives,
- pdMockBomLines,
- pdMockDocuments,
- pdMockDrawingReviews,
- pdMockProjects,
- pdMockSeq,
- pdMockTasks,
- pdMockVersionChanges,
- pdMockWorkflows,
-} from './seed';
-import { mockDelay, mockNextCode, mockPage } from './utils';
-
-function matchLike(value: unknown, keyword?: string): boolean {
- if (!keyword) {
- return true;
- }
- return String(value ?? '')
- .toLowerCase()
- .includes(String(keyword).toLowerCase());
-}
-
-function syncProjectRef(project: MesPdProjectApi.Project) {
- const ref = {
- projectCode: project.code,
- projectName: project.name,
- productCode: project.productCode,
- productName: project.productName,
- version: project.version,
- };
- pdMockTasks.forEach((task) => {
- if (task.projectId === project.id) {
- Object.assign(task, ref);
- }
- });
- pdMockDrawingReviews.forEach((item) => {
- if (item.projectId === project.id) {
- Object.assign(item, ref);
- }
- });
- pdMockVersionChanges.forEach((item) => {
- if (item.projectId === project.id) {
- Object.assign(item, ref);
- }
- });
-}
-
-const WORKFLOW_STEPS = [
- '鍙戣捣浠诲姟',
- '鍙戝竷浠诲姟',
- '涓婁紶璧勬枡',
- '璧勬枡瀹℃牳',
- '褰掓。',
-] as const;
-
-function initWorkflow(projectId: number, designerName?: string) {
- pdMockWorkflows[projectId] = WORKFLOW_STEPS.map((nodeName, index) => ({
- id: projectId * 10 + index,
- projectId,
- nodeName,
- operatorName: index === 0 ? designerName : undefined,
- status: index === 0 ? 1 : 0,
- operateTime: index === 0 ? Date.now() : undefined,
- }));
-}
-
-function advanceWorkflow(projectId: number, completedStep: string, operatorName?: string) {
- const nodes = pdMockWorkflows[projectId];
- if (!nodes) {
- return;
- }
- const completedIndex = nodes.findIndex((n) => n.nodeName === completedStep);
- if (completedIndex >= 0) {
- nodes[completedIndex]!.status = 1;
- nodes[completedIndex]!.operateTime = Date.now();
- if (operatorName) {
- nodes[completedIndex]!.operatorName = operatorName;
- }
- }
- const next = nodes[completedIndex + 1];
- if (next) {
- next.status = 2;
- if (operatorName) {
- next.operatorName = operatorName;
- }
- }
-}
-
-function createDocumentReviews(projectId: number, project: MesPdProjectApi.Project) {
- const docs = pdMockDocuments.filter((d) => d.projectId === projectId);
- for (const doc of docs) {
- const exists = pdMockDrawingReviews.some((r) => r.documentId === doc.id);
- if (exists) {
- continue;
- }
- const reviewId = pdMockSeq.drawingReview++;
- pdMockDrawingReviews.push({
- id: reviewId,
- code: mockNextCode('DR-2026', reviewId),
- projectId,
- projectCode: project.code,
- projectName: project.name,
- documentId: doc.id,
- documentName: doc.name,
- documentVersion: doc.version,
- reviewerName: project.reviewerName,
- status: MesPdDrawingReviewStatusEnum.PENDING,
- createTime: Date.now(),
- });
- }
-}
-
-export const pdMockStore = {
- // ---------- 璁捐椤圭洰 ----------
- getProjectPage(params: MesPdProjectApi.PageParams) {
- return mockDelay(
- mockPage(pdMockProjects, params, (item) => {
- return (
- matchLike(item.code, params.code) &&
- matchLike(item.name, params.name) &&
- matchLike(item.productCode, params.productCode) &&
- (params.status === undefined || item.status === params.status)
- );
- }),
- );
- },
-
- getProject(id: number) {
- const project = pdMockProjects.find((item) => item.id === id);
- if (!project) {
- return Promise.reject(new Error('璁捐浠诲姟涓嶅瓨鍦�'));
- }
- return mockDelay({ ...project });
- },
-
- createProject(data: MesPdProjectApi.Project) {
- const id = pdMockSeq.project++;
- const project: MesPdProjectApi.Project = {
- ...data,
- id,
- code: data.code || mockNextCode('DT-2026', id),
- status: MesPdProjectStatusEnum.DRAFT,
- createTime: Date.now(),
- };
- pdMockProjects.unshift(project);
- initWorkflow(id, project.designerName);
- return mockDelay(id);
- },
-
- updateProject(data: MesPdProjectApi.Project) {
- const index = pdMockProjects.findIndex((item) => item.id === data.id);
- if (index < 0) {
- return Promise.reject(new Error('璁捐浠诲姟涓嶅瓨鍦�'));
- }
- pdMockProjects[index] = { ...pdMockProjects[index], ...data };
- syncProjectRef(pdMockProjects[index]!);
- return mockDelay(undefined);
- },
-
- deleteProject(id: number) {
- const index = pdMockProjects.findIndex((item) => item.id === id);
- if (index >= 0) {
- pdMockProjects.splice(index, 1);
- }
- return mockDelay(undefined);
- },
-
- publishProject(id: number) {
- const project = pdMockProjects.find((item) => item.id === id);
- if (!project || project.status !== MesPdProjectStatusEnum.DRAFT) {
- return Promise.reject(new Error('浠呰崏绋跨姸鎬佸彲鍙戝竷'));
- }
- project.status = MesPdProjectStatusEnum.DESIGNING;
- advanceWorkflow(id, '鍙戣捣浠诲姟', project.designerName);
- advanceWorkflow(id, '鍙戝竷浠诲姟', project.designerName);
- return mockDelay(undefined);
- },
-
- submitProjectReview(id: number) {
- const project = pdMockProjects.find((item) => item.id === id);
- if (!project || project.status !== MesPdProjectStatusEnum.DESIGNING) {
- return Promise.reject(new Error('璇峰厛鍙戝竷浠诲姟骞朵笂浼犺祫鏂�'));
- }
- const docCount = pdMockDocuments.filter((d) => d.projectId === id).length;
- if (docCount === 0) {
- return Promise.reject(new Error('璇峰厛涓婁紶璁捐璧勬枡'));
- }
- project.status = MesPdProjectStatusEnum.REVIEWING;
- createDocumentReviews(id, project);
- advanceWorkflow(id, '涓婁紶璧勬枡', project.designerName);
- advanceWorkflow(id, '璧勬枡瀹℃牳', project.reviewerName);
- return mockDelay(undefined);
- },
-
- approveProject(id: number) {
- const project = pdMockProjects.find((item) => item.id === id);
- if (!project || project.status !== MesPdProjectStatusEnum.REVIEWING) {
- return Promise.reject(new Error('褰撳墠鐘舵�佷笉鍙鏍搁�氳繃'));
- }
- const pending = pdMockDrawingReviews.filter(
- (r) =>
- r.projectId === id &&
- r.status === MesPdDrawingReviewStatusEnum.PENDING,
- );
- if (pending.length > 0) {
- return Promise.reject(new Error('灏氭湁璧勬枡鏈畬鎴愬鏍�'));
- }
- project.status = MesPdProjectStatusEnum.APPROVED;
- const nodes = pdMockWorkflows[id];
- const reviewNode = nodes?.find((n) => n.nodeName === '璧勬枡瀹℃牳');
- if (reviewNode) {
- reviewNode.status = 1;
- reviewNode.operateTime = Date.now();
- }
- const archiveNode = nodes?.find((n) => n.nodeName === '褰掓。');
- if (archiveNode) {
- archiveNode.status = 2;
- }
- return mockDelay(undefined);
- },
-
- archiveProject(id: number) {
- const project = pdMockProjects.find((item) => item.id === id);
- if (!project) {
- return Promise.reject(new Error('璁捐浠诲姟涓嶅瓨鍦�'));
- }
- if (project.status !== MesPdProjectStatusEnum.APPROVED) {
- return Promise.reject(new Error('浠呭鏍搁�氳繃鐨勪换鍔″彲褰掓。'));
- }
- project.status = MesPdProjectStatusEnum.ARCHIVED;
- project.actualFinishDate = Date.now();
- const archiveId = pdMockSeq.archive++;
- pdMockArchives.unshift({
- id: archiveId,
- code: mockNextCode('AR-2026', archiveId),
- projectId: project.id,
- projectCode: project.code,
- projectName: project.name,
- productCode: project.productCode,
- productName: project.productName,
- version: project.version,
- archiveStatus: 1,
- archiveTime: Date.now(),
- archiverName: project.designerName,
- documentCount: pdMockDocuments.filter((d) => d.projectId === id).length,
- bomCount: pdMockDocuments.filter(
- (d) =>
- d.projectId === id &&
- d.documentType === MesPdDocumentTypeEnum.BOM,
- ).length,
- storagePath: `/archive/2026/${project.productCode}/${project.version}`,
- createTime: Date.now(),
- });
- advanceWorkflow(id, '褰掓。', project.designerName);
- const archiveNode = pdMockWorkflows[id]?.find((n) => n.nodeName === '褰掓。');
- if (archiveNode) {
- archiveNode.status = 1;
- archiveNode.operateTime = Date.now();
- }
- return mockDelay(undefined);
- },
-
- // ---------- 褰掓。鍙拌处 ----------
- getArchivePage(params: MesPdArchiveApi.PageParams) {
- return mockDelay(
- mockPage(pdMockArchives, params, (item) => {
- return (
- matchLike(item.code, params.code) &&
- matchLike(item.projectCode, params.projectCode) &&
- matchLike(item.productCode, params.productCode) &&
- (params.archiveStatus === undefined ||
- item.archiveStatus === params.archiveStatus)
- );
- }),
- );
- },
-
- getArchive(id: number) {
- const archive = pdMockArchives.find((item) => item.id === id);
- if (!archive) {
- return Promise.reject(new Error('褰掓。璁板綍涓嶅瓨鍦�'));
- }
- return mockDelay({ ...archive });
- },
-
- // ---------- 浠诲姟 ----------
- getTaskPage(params: MesPdTaskApi.PageParams) {
- return mockDelay(
- mockPage(pdMockTasks, params, (item) => {
- return (
- item.projectId === params.projectId &&
- matchLike(item.code, params.code) &&
- matchLike(item.taskName, params.taskName) &&
- (params.status === undefined || item.status === params.status)
- );
- }),
- );
- },
-
- getTask(id: number) {
- const task = pdMockTasks.find((item) => item.id === id);
- if (!task) {
- return Promise.reject(new Error('璁捐浠诲姟涓嶅瓨鍦�'));
- }
- return mockDelay({ ...task });
- },
-
- createTask(data: MesPdTaskApi.Task) {
- const id = pdMockSeq.task++;
- const project = pdMockProjects.find((p) => p.id === data.projectId);
- const task: MesPdTaskApi.Task = {
- ...data,
- id,
- code: data.code || mockNextCode('TK-2026', id),
- projectCode: project?.code,
- projectName: project?.name,
- status: data.status ?? 0,
- createTime: Date.now(),
- };
- pdMockTasks.unshift(task);
- return mockDelay(id);
- },
-
- updateTask(data: MesPdTaskApi.Task) {
- const index = pdMockTasks.findIndex((item) => item.id === data.id);
- if (index < 0) {
- return Promise.reject(new Error('璁捐浠诲姟涓嶅瓨鍦�'));
- }
- pdMockTasks[index] = { ...pdMockTasks[index], ...data };
- return mockDelay(undefined);
- },
-
- deleteTask(id: number) {
- const index = pdMockTasks.findIndex((item) => item.id === id);
- if (index >= 0) {
- pdMockTasks.splice(index, 1);
- }
- return mockDelay(undefined);
- },
-
- dispatchTask(data: MesPdTaskApi.DispatchParams) {
- const task = pdMockTasks.find((item) => item.id === data.id);
- if (task) {
- task.status = 1;
- task.planFinishDate = data.planFinishDate;
- task.remark = data.remark;
- }
- return mockDelay(undefined);
- },
-
- completeTask(id: number) {
- const task = pdMockTasks.find((item) => item.id === id);
- if (task) {
- task.status = 3;
- task.actualFinishDate = Date.now();
- }
- return mockDelay(undefined);
- },
-
- // ---------- 璧勬枡 ----------
- getDocumentPage(params: MesPdDocumentApi.PageParams) {
- return mockDelay(
- mockPage(pdMockDocuments, params, (item) => {
- return (
- item.projectId === params.projectId &&
- (params.documentType === undefined ||
- item.documentType === params.documentType) &&
- (params.version === undefined || item.version === params.version) &&
- matchLike(item.name, params.name)
- );
- }),
- );
- },
-
- getDocument(id: number) {
- const doc = pdMockDocuments.find((item) => item.id === id);
- if (!doc) {
- return Promise.reject(new Error('璁捐璧勬枡涓嶅瓨鍦�'));
- }
- return mockDelay({ ...doc });
- },
-
- createDocument(data: MesPdDocumentApi.Document) {
- const id = pdMockSeq.document++;
- pdMockDocuments.unshift({
- ...data,
- id,
- uploaderName: data.uploaderName ?? '褰撳墠鐢ㄦ埛',
- createTime: Date.now(),
- });
- return mockDelay(id);
- },
-
- updateDocument(data: MesPdDocumentApi.Document) {
- const index = pdMockDocuments.findIndex((item) => item.id === data.id);
- if (index < 0) {
- return Promise.reject(new Error('璁捐璧勬枡涓嶅瓨鍦�'));
- }
- pdMockDocuments[index] = { ...pdMockDocuments[index], ...data };
- return mockDelay(undefined);
- },
-
- deleteDocument(id: number) {
- const index = pdMockDocuments.findIndex((item) => item.id === id);
- if (index >= 0) {
- pdMockDocuments.splice(index, 1);
- }
- return mockDelay(undefined);
- },
-
- // ---------- BOM ----------
- getBomPage(params: MesPdBomApi.PageParams) {
- return mockDelay(
- mockPage(pdMockBomLines, params, (item) => {
- return (
- item.projectId === params.projectId &&
- matchLike(item.itemCode, params.itemCode) &&
- matchLike(item.itemName, params.itemName)
- );
- }),
- );
- },
-
- createBomLine(data: MesPdBomApi.BomLine) {
- const id = pdMockSeq.bom++;
- pdMockBomLines.unshift({ ...data, id, createTime: Date.now() });
- return mockDelay(id);
- },
-
- updateBomLine(data: MesPdBomApi.BomLine) {
- const index = pdMockBomLines.findIndex((item) => item.id === data.id);
- if (index < 0) {
- return Promise.reject(new Error('BOM 琛屼笉瀛樺湪'));
- }
- pdMockBomLines[index] = { ...pdMockBomLines[index], ...data };
- return mockDelay(undefined);
- },
-
- deleteBomLine(id: number) {
- const index = pdMockBomLines.findIndex((item) => item.id === id);
- if (index >= 0) {
- pdMockBomLines.splice(index, 1);
- }
- return mockDelay(undefined);
- },
-
- // ---------- 鍥剧焊瀹℃牳 ----------
- getDrawingReviewPage(params: MesPdDrawingReviewApi.PageParams) {
- return mockDelay(
- mockPage(pdMockDrawingReviews, params, (item) => {
- return (
- item.projectId === params.projectId &&
- matchLike(item.code, params.code) &&
- (params.status === undefined || item.status === params.status)
- );
- }),
- );
- },
-
- getDrawingReview(id: number) {
- const row = pdMockDrawingReviews.find((item) => item.id === id);
- if (!row) {
- return Promise.reject(new Error('鍥剧焊瀹℃牳鍗曚笉瀛樺湪'));
- }
- return mockDelay({ ...row });
- },
-
- reviewDrawing(data: MesPdDrawingReviewApi.ReviewParams) {
- const row = pdMockDrawingReviews.find((item) => item.id === data.id);
- if (row) {
- row.status = data.status;
- row.reviewComment = data.reviewComment;
- row.reviewTime = Date.now();
- }
- return mockDelay(undefined);
- },
- getVersionChangePage(params: MesPdVersionChangeApi.PageParams) {
- return mockDelay(
- mockPage(pdMockVersionChanges, params, (item) => {
- return (
- item.projectId === params.projectId &&
- matchLike(item.code, params.code) &&
- (params.changeType === undefined ||
- item.changeType === params.changeType)
- );
- }),
- );
- },
-
- getVersionChange(id: number) {
- const row = pdMockVersionChanges.find((item) => item.id === id);
- if (!row) {
- return Promise.reject(new Error('鐗堟湰鍙樻洿鍗曚笉瀛樺湪'));
- }
- return mockDelay({ ...row });
- },
-
- createVersionChange(data: MesPdVersionChangeApi.VersionChange) {
- const id = pdMockSeq.versionChange++;
- const project = pdMockProjects.find((p) => p.id === data.projectId);
- pdMockVersionChanges.unshift({
- ...data,
- id,
- code: data.code || mockNextCode('VC-2026', id),
- projectCode: project?.code,
- projectName: project?.name,
- applicantName: data.applicantName ?? '褰撳墠鐢ㄦ埛',
- createTime: Date.now(),
- });
- return mockDelay(id);
- },
-
- updateVersionChange(data: MesPdVersionChangeApi.VersionChange) {
- const index = pdMockVersionChanges.findIndex((item) => item.id === data.id);
- if (index < 0) {
- return Promise.reject(new Error('鐗堟湰鍙樻洿鍗曚笉瀛樺湪'));
- }
- pdMockVersionChanges[index] = { ...pdMockVersionChanges[index], ...data };
- return mockDelay(undefined);
- },
-
- deleteVersionChange(id: number) {
- const index = pdMockVersionChanges.findIndex((item) => item.id === id);
- if (index >= 0) {
- pdMockVersionChanges.splice(index, 1);
- }
- return mockDelay(undefined);
- },
-
- approveVersionChange(id: number) {
- const row = pdMockVersionChanges.find((item) => item.id === id);
- const project = pdMockProjects.find((p) => p.id === row?.projectId);
- if (row && project && row.toVersion) {
- project.version = row.toVersion;
- }
- return mockDelay(undefined);
- },
-
- // ---------- 娴佺▼ ----------
- getWorkflowList(projectId: number) {
- return mockDelay(pdMockWorkflows[projectId] ?? []);
- },
-};
diff --git a/src/api/mes/pd/mock/utils.ts b/src/api/mes/pd/mock/utils.ts
deleted file mode 100644
index 70e85c5..0000000
--- a/src/api/mes/pd/mock/utils.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import type { PageParam, PageResult } from '#/packages/effects/request/src';
-
-/** 妯℃嫙鎺ュ彛寤惰繜 */
-export function mockDelay<T>(data: T, ms = 120): Promise<T> {
- return new Promise((resolve) => {
- setTimeout(() => resolve(data), ms);
- });
-}
-
-/** 鍒嗛〉涓庣畝鍗曞瓧娈佃繃婊� */
-export function mockPage<T extends Record<string, unknown>>(
- list: T[],
- params: PageParam & Record<string, unknown>,
- filter?: (item: T) => boolean,
-): PageResult<T> {
- const filtered = filter ? list.filter(filter) : [...list];
- const pageNo = params.pageNo ?? 1;
- const pageSize = params.pageSize ?? 10;
- const start = (pageNo - 1) * pageSize;
- return {
- list: filtered.slice(start, start + pageSize),
- total: filtered.length,
- };
-}
-
-export function mockNextCode(prefix: string, seq: number): string {
- return `${prefix}-${String(seq).padStart(4, '0')}`;
-}
diff --git a/src/api/mes/pd/project/index.ts b/src/api/mes/pd/project/index.ts
index a637d27..40e34ab 100644
--- a/src/api/mes/pd/project/index.ts
+++ b/src/api/mes/pd/project/index.ts
@@ -2,43 +2,49 @@
import { requestClient } from '#/api/request';
-import { isPdMockEnabled } from '../mock/enabled';
-import { pdMockStore } from '../mock/store';
-
export namespace MesPdProjectApi {
/** 浜у搧璁捐椤圭洰 */
export interface Project {
id?: number;
- code?: string;
- name?: string;
+ /** 浠诲姟缂栫爜 */
+ taskCode?: string;
+ /** 浠诲姟鍚嶇О */
+ taskName?: string;
+ /** 浜у搧缂栫爜 */
productCode?: string;
+ /** 浜у搧鍚嶇О */
productName?: string;
+ /** 鐗堟湰鍙� */
version?: string;
+ /** 鐘舵�� */
status?: number;
- designerId?: number;
- designerName?: string;
- reviewerId?: number;
- reviewerName?: string;
- planStartDate?: number;
- planEndDate?: number;
- actualFinishDate?: number;
+ /** 涓昏璁″笀锛堢敤鎴稩D锛� */
+ chiefDesigner?: number;
+ /** 涓昏璁″笀鍚嶇О */
+ chiefDesignerNickname?: string;
+ /** 瀹℃牳浜猴紙鐢ㄦ埛ID锛� */
+ reviewer?: number;
+ /** 瀹℃牳浜哄悕绉� */
+ reviewerNickname?: string;
+ /** 璁″垝瀹屾垚鏃堕棿 */
+ planFinishTime?: number;
+ /** 澶囨敞 */
remark?: string;
+ /** 鍒涘缓鏃堕棿 */
createTime?: number;
}
export interface PageParams extends PageParam {
- code?: string;
- name?: string;
+ taskCode?: string;
+ taskName?: string;
productCode?: string;
+ productName?: string;
status?: number;
- designerId?: number;
+ planFinishTime?: number[];
}
}
export function getPdProjectPage(params: MesPdProjectApi.PageParams) {
- if (isPdMockEnabled()) {
- return pdMockStore.getProjectPage(params);
- }
return requestClient.get<PageResult<MesPdProjectApi.Project>>(
'/mes/pd/project/page',
{ params },
@@ -46,73 +52,50 @@
}
export function getPdProject(id: number) {
- if (isPdMockEnabled()) {
- return pdMockStore.getProject(id);
- }
return requestClient.get<MesPdProjectApi.Project>(
`/mes/pd/project/get?id=${id}`,
);
}
export function createPdProject(data: MesPdProjectApi.Project) {
- if (isPdMockEnabled()) {
- return pdMockStore.createProject(data);
- }
return requestClient.post<number>('/mes/pd/project/create', data);
}
export function updatePdProject(data: MesPdProjectApi.Project) {
- if (isPdMockEnabled()) {
- return pdMockStore.updateProject(data);
- }
return requestClient.put('/mes/pd/project/update', data);
}
export function deletePdProject(id: number) {
- if (isPdMockEnabled()) {
- return pdMockStore.deleteProject(id);
- }
return requestClient.delete(`/mes/pd/project/delete?id=${id}`);
}
export function exportPdProject(params: MesPdProjectApi.PageParams) {
- if (isPdMockEnabled()) {
- return Promise.resolve(new Blob());
- }
return requestClient.download('/mes/pd/project/export-excel', { params });
}
-export function submitPdProjectReview(id: number) {
- if (isPdMockEnabled()) {
- return pdMockStore.submitProjectReview(id);
- }
- return requestClient.put('/mes/pd/project/submit-review', undefined, {
- params: { id },
- });
-}
-
+/** 鍙戝竷锛堝緟鍙戝竷鈫掑緟涓婁紶锛� */
export function publishPdProject(id: number) {
- if (isPdMockEnabled()) {
- return pdMockStore.publishProject(id);
- }
return requestClient.put('/mes/pd/project/publish', undefined, {
params: { id },
});
}
-export function approvePdProject(id: number) {
- if (isPdMockEnabled()) {
- return pdMockStore.approveProject(id);
- }
- return requestClient.put('/mes/pd/project/approve', undefined, {
+/** 涓婁紶璧勬枡锛堝緟涓婁紶鈫掑緟瀹℃牳锛夛紝鍚庣鑷姩鍒涘缓璧勬枡瀹℃牳璁板綍 */
+export function uploadPdProject(id: number) {
+ return requestClient.put('/mes/pd/project/upload', undefined, {
params: { id },
});
}
+/** 瀹℃牳锛堝緟瀹℃牳鈫掑緟褰掓。锛� */
+export function auditPdProject(id: number) {
+ return requestClient.put('/mes/pd/project/audit', undefined, {
+ params: { id },
+ });
+}
+
+/** 褰掓。锛堝緟褰掓。鈫掑凡褰掓。锛夛紝鍚庣鑷姩鍒涘缓褰掓。鍙拌处璁板綍 */
export function archivePdProject(id: number) {
- if (isPdMockEnabled()) {
- return pdMockStore.archiveProject(id);
- }
return requestClient.put('/mes/pd/project/archive', undefined, {
params: { id },
});
diff --git a/src/api/mes/pd/task/index.ts b/src/api/mes/pd/task/index.ts
index ebd7c8c..ca9eac8 100644
--- a/src/api/mes/pd/task/index.ts
+++ b/src/api/mes/pd/task/index.ts
@@ -2,9 +2,6 @@
import { requestClient } from '#/api/request';
-import { isPdMockEnabled } from '../mock/enabled';
-import { pdMockStore } from '../mock/store';
-
export namespace MesPdTaskApi {
/** 浜у搧璁捐浠诲姟 */
export interface Task {
@@ -44,9 +41,6 @@
}
export function getPdTaskPage(params: MesPdTaskApi.PageParams) {
- if (isPdMockEnabled()) {
- return pdMockStore.getTaskPage(params);
- }
return requestClient.get<PageResult<MesPdTaskApi.Task>>(
'/mes/pd/task/page',
{ params },
@@ -54,44 +48,26 @@
}
export function getPdTask(id: number) {
- if (isPdMockEnabled()) {
- return pdMockStore.getTask(id);
- }
return requestClient.get<MesPdTaskApi.Task>(`/mes/pd/task/get?id=${id}`);
}
export function createPdTask(data: MesPdTaskApi.Task) {
- if (isPdMockEnabled()) {
- return pdMockStore.createTask(data);
- }
return requestClient.post<number>('/mes/pd/task/create', data);
}
export function updatePdTask(data: MesPdTaskApi.Task) {
- if (isPdMockEnabled()) {
- return pdMockStore.updateTask(data);
- }
return requestClient.put('/mes/pd/task/update', data);
}
export function deletePdTask(id: number) {
- if (isPdMockEnabled()) {
- return pdMockStore.deleteTask(id);
- }
return requestClient.delete(`/mes/pd/task/delete?id=${id}`);
}
export function dispatchPdTask(data: MesPdTaskApi.DispatchParams) {
- if (isPdMockEnabled()) {
- return pdMockStore.dispatchTask(data);
- }
return requestClient.put('/mes/pd/task/dispatch', data);
}
export function completePdTask(id: number) {
- if (isPdMockEnabled()) {
- return pdMockStore.completeTask(id);
- }
return requestClient.put('/mes/pd/task/complete', undefined, {
params: { id },
});
diff --git a/src/api/mes/pd/version-change/index.ts b/src/api/mes/pd/version-change/index.ts
index 7e521fb..2ab806c 100644
--- a/src/api/mes/pd/version-change/index.ts
+++ b/src/api/mes/pd/version-change/index.ts
@@ -2,9 +2,6 @@
import { requestClient } from '#/api/request';
-import { isPdMockEnabled } from '../mock/enabled';
-import { pdMockStore } from '../mock/store';
-
export namespace MesPdVersionChangeApi {
/** 鐗堟湰鍙樻洿 */
export interface VersionChange {
@@ -34,9 +31,6 @@
export function getPdVersionChangePage(
params: MesPdVersionChangeApi.PageParams,
) {
- if (isPdMockEnabled()) {
- return pdMockStore.getVersionChangePage(params);
- }
return requestClient.get<PageResult<MesPdVersionChangeApi.VersionChange>>(
'/mes/pd/version-change/page',
{ params },
@@ -44,39 +38,24 @@
}
export function getPdVersionChange(id: number) {
- if (isPdMockEnabled()) {
- return pdMockStore.getVersionChange(id);
- }
return requestClient.get<MesPdVersionChangeApi.VersionChange>(
`/mes/pd/version-change/get?id=${id}`,
);
}
export function createPdVersionChange(data: MesPdVersionChangeApi.VersionChange) {
- if (isPdMockEnabled()) {
- return pdMockStore.createVersionChange(data);
- }
return requestClient.post<number>('/mes/pd/version-change/create', data);
}
export function updatePdVersionChange(data: MesPdVersionChangeApi.VersionChange) {
- if (isPdMockEnabled()) {
- return pdMockStore.updateVersionChange(data);
- }
return requestClient.put('/mes/pd/version-change/update', data);
}
export function deletePdVersionChange(id: number) {
- if (isPdMockEnabled()) {
- return pdMockStore.deleteVersionChange(id);
- }
return requestClient.delete(`/mes/pd/version-change/delete?id=${id}`);
}
export function approvePdVersionChange(id: number) {
- if (isPdMockEnabled()) {
- return pdMockStore.approveVersionChange(id);
- }
return requestClient.put('/mes/pd/version-change/approve', undefined, {
params: { id },
});
diff --git a/src/api/mes/pd/workflow/index.ts b/src/api/mes/pd/workflow/index.ts
index bb22e8b..c15d1d5 100644
--- a/src/api/mes/pd/workflow/index.ts
+++ b/src/api/mes/pd/workflow/index.ts
@@ -1,8 +1,5 @@
import { requestClient } from '#/api/request';
-import { isPdMockEnabled } from '../mock/enabled';
-import { pdMockStore } from '../mock/store';
-
export namespace MesPdWorkflowApi {
/** 璁捐娴佺▼鑺傜偣 */
export interface WorkflowNode {
@@ -18,9 +15,6 @@
}
export function getPdWorkflowList(projectId: number) {
- if (isPdMockEnabled()) {
- return pdMockStore.getWorkflowList(projectId);
- }
return requestClient.get<MesPdWorkflowApi.WorkflowNode[]>(
'/mes/pd/workflow/list',
{ params: { projectId } },
diff --git a/src/api/mes/pro/andon/record/index.ts b/src/api/mes/pro/andon/record/index.ts
index d693e64..96f0156 100644
--- a/src/api/mes/pro/andon/record/index.ts
+++ b/src/api/mes/pro/andon/record/index.ts
@@ -1,4 +1,4 @@
-import type { PageParam, PageResult } from '../../../../../packages/effects/request/src';
+锘縤mport type { PageParam, PageResult } from '../../../../../packages/effects/request/src';
import { requestClient } from '#/api/request';
@@ -10,8 +10,8 @@
workstationId?: number; // 宸ヤ綔绔欑紪鍙�
workstationCode?: string; // 宸ヤ綔绔欑紪鐮�
workstationName?: string; // 宸ヤ綔绔欏悕绉�
- workOrderId?: number; // 鐢熶骇宸ュ崟缂栧彿
- workOrderCode?: string; // 宸ュ崟缂栫爜
+ workOrderId?: number; // 鐢熶骇璁㈠崟缂栧彿
+ workOrderCode?: string; // 璁㈠崟缂栫爜
processId?: number; // 宸ュ簭缂栧彿
processName?: string; // 宸ュ簭鍚嶇О
userId?: number; // 鍙戣捣鐢ㄦ埛缂栧彿
diff --git a/src/api/mes/pro/card/index.ts b/src/api/mes/pro/card/index.ts
index 6e8aaff..35f8d8b 100644
--- a/src/api/mes/pro/card/index.ts
+++ b/src/api/mes/pro/card/index.ts
@@ -1,4 +1,4 @@
-import type { PageParam, PageResult } from '../../../../packages/effects/request/src';
+锘縤mport type { PageParam, PageResult } from '../../../../packages/effects/request/src';
import { requestClient } from '#/api/request';
@@ -7,9 +7,9 @@
export interface Card {
id?: number; // 缂栧彿
code?: string; // 娴佽浆鍗$紪鐮�
- workOrderId?: number; // 鐢熶骇宸ュ崟缂栧彿
- workOrderCode?: string; // 宸ュ崟缂栫爜
- workOrderName?: string; // 宸ュ崟鍚嶇О
+ workOrderId?: number; // 鐢熶骇璁㈠崟缂栧彿
+ workOrderCode?: string; // 璁㈠崟缂栫爜
+ workOrderName?: string; // 璁㈠崟鍚嶇О
batchCode?: string; // 鎵规鍙�
itemId?: number; // 浜у搧鐗╂枡缂栧彿
itemCode?: string; // 浜у搧缂栫爜
diff --git a/src/api/mes/pro/feedback/index.ts b/src/api/mes/pro/feedback/index.ts
index 439c122..c79b9f6 100644
--- a/src/api/mes/pro/feedback/index.ts
+++ b/src/api/mes/pro/feedback/index.ts
@@ -1,4 +1,4 @@
-import type { PageParam, PageResult } from '../../../../packages/effects/request/src';
+锘縤mport type { PageParam, PageResult } from '../../../../packages/effects/request/src';
import { requestClient } from '#/api/request';
@@ -6,7 +6,7 @@
/** MES 鐢熶骇鎶ュ伐 */
export interface Feedback {
id?: number;
- code?: string; // 鎶ュ伐鍗曠紪鍙�
+ code?: string; // 鎶ヨ鍗曠紪鍙�
type?: number; // 鎶ュ伐绫诲瀷
channel?: string; // 鎶ュ伐閫斿緞
feedbackTime?: number; // 鎶ュ伐鏃堕棿
@@ -19,9 +19,9 @@
processCode?: string; // 宸ュ簭缂栫爜
processName?: string; // 宸ュ簭鍚嶇О
checkFlag?: boolean; // 鏄惁闇�瑕佹楠�
- workOrderId?: number; // 鐢熶骇宸ュ崟缂栧彿
- workOrderCode?: string; // 宸ュ崟缂栫爜
- workOrderName?: string; // 宸ュ崟鍚嶇О
+ workOrderId?: number; // 鐢熶骇璁㈠崟缂栧彿
+ workOrderCode?: string; // 璁㈠崟缂栫爜
+ workOrderName?: string; // 璁㈠崟鍚嶇О
taskId?: number; // 鐢熶骇浠诲姟缂栧彿
taskCode?: string; // 浠诲姟缂栫爜
itemId?: number; // 浜у搧鐗╂枡缂栧彿
diff --git a/src/api/mes/pro/task/index.ts b/src/api/mes/pro/task/index.ts
index 174990b..9af8921 100644
--- a/src/api/mes/pro/task/index.ts
+++ b/src/api/mes/pro/task/index.ts
@@ -1,4 +1,4 @@
-import type { PageParam, PageResult } from '../../../../packages/effects/request/src';
+锘縤mport type { PageParam, PageResult } from '../../../../packages/effects/request/src';
import { requestClient } from '#/api/request';
@@ -8,9 +8,9 @@
id?: number;
code?: string; // 浠诲姟缂栫爜
name?: string; // 浠诲姟鍚嶇О
- workOrderId?: number; // 鐢熶骇宸ュ崟缂栧彿
- workOrderCode?: string; // 宸ュ崟缂栫爜
- workOrderName?: string; // 宸ュ崟鍚嶇О
+ workOrderId?: number; // 鐢熶骇璁㈠崟缂栧彿
+ workOrderCode?: string; // 璁㈠崟缂栫爜
+ workOrderName?: string; // 璁㈠崟鍚嶇О
workstationId?: number; // 宸ヤ綔绔欑紪鍙�
workstationCode?: string; // 宸ヤ綔绔欑紪鐮�
workstationName?: string; // 宸ヤ綔绔欏悕绉�
@@ -33,7 +33,7 @@
startTime?: number; // 寮�濮嬬敓浜ф椂闂�
endTime?: number; // 缁撴潫鐢熶骇鏃堕棿
duration?: number; // 鐢熶骇鏃堕暱锛堝伐浣滄棩锛�1=8灏忔椂锛�
- requestDate?: number; // 闇�姹傛棩鏈燂紙浠庡伐鍗曟煡锛�
+ requestDate?: number; // 闇�姹傛棩鏈燂紙浠庤鍗曟煡锛�
finishDate?: number; // 瀹屾垚鏃ユ湡
cancelDate?: number; // 鍙栨秷鏃ユ湡
colorCode?: string; // 鐢樼壒鍥炬樉绀洪鑹�
diff --git a/src/api/mes/pro/task/issue/index.ts b/src/api/mes/pro/task/issue/index.ts
index 8b85ef4..e2f8556 100644
--- a/src/api/mes/pro/task/issue/index.ts
+++ b/src/api/mes/pro/task/issue/index.ts
@@ -1,4 +1,4 @@
-import type { PageParam, PageResult } from '../../../../../packages/effects/request/src';
+锘縤mport type { PageParam, PageResult } from '../../../../../packages/effects/request/src';
import { requestClient } from '#/api/request';
@@ -7,7 +7,7 @@
export interface TaskIssue {
id?: number; // 缂栧彿
taskId?: number; // 鐢熶骇浠诲姟缂栧彿
- workOrderId?: number; // 鐢熶骇宸ュ崟缂栧彿
+ workOrderId?: number; // 鐢熶骇璁㈠崟缂栧彿
workstationId?: number; // 宸ヤ綔绔欑紪鍙�
sourceDocType?: string; // 鏉ユ簮鍗曟嵁绫诲瀷
sourceDocId?: number; // 鏉ユ簮鍗曟嵁缂栧彿
@@ -29,7 +29,7 @@
/** MES 鐢熶骇浠诲姟鎶曟枡鍒嗛〉鏌ヨ鍙傛暟 */
export interface PageParams extends PageParam {
taskId?: number; // 鐢熶骇浠诲姟缂栧彿
- workOrderId?: number; // 鐢熶骇宸ュ崟缂栧彿
+ workOrderId?: number; // 鐢熶骇璁㈠崟缂栧彿
workstationId?: number; // 宸ヤ綔绔欑紪鍙�
itemId?: number; // 浜у搧鐗╂枡缂栧彿
}
diff --git a/src/api/mes/pro/workorder/bom/index.ts b/src/api/mes/pro/workorder/bom/index.ts
index 43785e0..b3d0b52 100644
--- a/src/api/mes/pro/workorder/bom/index.ts
+++ b/src/api/mes/pro/workorder/bom/index.ts
@@ -1,12 +1,12 @@
-import type { PageParam, PageResult } from '../../../../../packages/effects/request/src';
+锘縤mport type { PageParam, PageResult } from '../../../../../packages/effects/request/src';
import { requestClient } from '#/api/request';
export namespace MesProWorkOrderBomApi {
- /** MES 鐢熶骇宸ュ崟 BOM */
+ /** MES 鐢熶骇璁㈠崟 BOM */
export interface WorkOrderBom {
id?: number; // 缂栧彿
- workOrderId?: number; // 鐢熶骇宸ュ崟缂栧彿
+ workOrderId?: number; // 鐢熶骇璁㈠崟缂栧彿
itemId?: number; // BOM 鐗╂枡缂栧彿
itemName?: string; // 鐗╂枡鍚嶇О
itemCode?: string; // 鐗╂枡缂栫爜
@@ -18,13 +18,13 @@
itemOrProduct?: string; // 鐗╂枡浜у搧鏍囪瘑
}
- /** MES 鐢熶骇宸ュ崟 BOM 鍒嗛〉鏌ヨ鍙傛暟 */
+ /** MES 鐢熶骇璁㈠崟 BOM 鍒嗛〉鏌ヨ鍙傛暟 */
export interface PageParams extends PageParam {
workOrderId?: number;
}
}
-/** 鏌ヨ宸ュ崟 BOM 鍒嗛〉 */
+/** 鏌ヨ璁㈠崟 BOM 鍒嗛〉 */
export function getWorkOrderBomPage(params: MesProWorkOrderBomApi.PageParams) {
return requestClient.get<PageResult<MesProWorkOrderBomApi.WorkOrderBom>>(
'/mes/pro/work-order-bom/page',
@@ -32,29 +32,29 @@
);
}
-/** 鏌ヨ宸ュ崟 BOM 璇︽儏 */
+/** 鏌ヨ璁㈠崟 BOM 璇︽儏 */
export function getWorkOrderBom(id: number) {
return requestClient.get<MesProWorkOrderBomApi.WorkOrderBom>(
`/mes/pro/work-order-bom/get?id=${id}`,
);
}
-/** 鏂板宸ュ崟 BOM */
+/** 鏂板璁㈠崟 BOM */
export function createWorkOrderBom(data: MesProWorkOrderBomApi.WorkOrderBom) {
return requestClient.post('/mes/pro/work-order-bom/create', data);
}
-/** 淇敼宸ュ崟 BOM */
+/** 淇敼璁㈠崟 BOM */
export function updateWorkOrderBom(data: MesProWorkOrderBomApi.WorkOrderBom) {
return requestClient.put('/mes/pro/work-order-bom/update', data);
}
-/** 鍒犻櫎宸ュ崟 BOM */
+/** 鍒犻櫎璁㈠崟 BOM */
export function deleteWorkOrderBom(id: number) {
return requestClient.delete(`/mes/pro/work-order-bom/delete?id=${id}`);
}
-/** 鏌ヨ宸ュ崟鐗╂枡闇�姹傚垪琛� */
+/** 鏌ヨ璁㈠崟鐗╂枡闇�姹傚垪琛� */
export function getWorkOrderBomItemListByWorkOrderId(workOrderId: number) {
return requestClient.get<MesProWorkOrderBomApi.WorkOrderBom[]>(
`/mes/pro/work-order-bom/item-list-by-work-order-id?workOrderId=${workOrderId}`,
diff --git a/src/api/mes/pro/workorder/index.ts b/src/api/mes/pro/workorder/index.ts
index aefe8db..64a6b60 100644
--- a/src/api/mes/pro/workorder/index.ts
+++ b/src/api/mes/pro/workorder/index.ts
@@ -1,14 +1,14 @@
-import type { PageParam, PageResult } from '../../../../packages/effects/request/src';
+锘縤mport type { PageParam, PageResult } from '../../../../packages/effects/request/src';
import { requestClient } from '#/api/request';
export namespace MesProWorkOrderApi {
- /** MES 鐢熶骇宸ュ崟 */
+ /** MES 鐢熶骇璁㈠崟 */
export interface WorkOrder {
id?: number; // 缂栧彿
- code?: string; // 宸ュ崟缂栫爜
- name?: string; // 宸ュ崟鍚嶇О
- type?: number; // 宸ュ崟绫诲瀷
+ code?: string; // 璁㈠崟缂栫爜
+ name?: string; // 璁㈠崟鍚嶇О
+ type?: number; // 璁㈠崟绫诲瀷
orderSourceType?: number; // 鏉ユ簮绫诲瀷
orderSourceCode?: string; // 鏉ユ簮鍗曟嵁缂栧彿
productId?: number; // 浜у搧缂栧彿
@@ -28,16 +28,16 @@
vendorCode?: string; // 渚涘簲鍟嗙紪鐮�
batchCode?: string; // 鎵规鍙�
requestDate?: number; // 闇�姹傛棩鏈�
- parentId?: number; // 鐖跺伐鍗曠紪鍙�
- parentCode?: string; // 鐖跺伐鍗曠紪鐮�
+ parentId?: number; // 鐖惰鍗曠紪鍙�
+ parentCode?: string; // 鐖惰鍗曠紪鐮�
finishDate?: number; // 瀹屾垚鏃堕棿
cancelDate?: number; // 鍙栨秷鏃堕棿
- status?: number; // 宸ュ崟鐘舵��
+ status?: number; // 璁㈠崟鐘舵��
remark?: string; // 澶囨敞
createTime?: number; // 鍒涘缓鏃堕棿
}
- /** MES 鐢熶骇宸ュ崟鍒嗛〉鏌ヨ鍙傛暟 */
+ /** MES 鐢熶骇璁㈠崟鍒嗛〉鏌ヨ鍙傛暟 */
export interface PageParams extends PageParam {
code?: string;
name?: string;
@@ -50,7 +50,7 @@
}
}
-/** 鏌ヨ鐢熶骇宸ュ崟鍒嗛〉 */
+/** 鏌ヨ鐢熶骇璁㈠崟鍒嗛〉 */
export function getWorkOrderPage(params: MesProWorkOrderApi.PageParams) {
return requestClient.get<PageResult<MesProWorkOrderApi.WorkOrder>>(
'/mes/pro/work-order/page',
@@ -58,44 +58,44 @@
);
}
-/** 鏌ヨ鐢熶骇宸ュ崟璇︽儏 */
+/** 鏌ヨ鐢熶骇璁㈠崟璇︽儏 */
export function getWorkOrder(id: number) {
return requestClient.get<MesProWorkOrderApi.WorkOrder>(
`/mes/pro/work-order/get?id=${id}`,
);
}
-/** 鏂板鐢熶骇宸ュ崟 */
+/** 鏂板鐢熶骇璁㈠崟 */
export function createWorkOrder(data: MesProWorkOrderApi.WorkOrder) {
return requestClient.post<number>('/mes/pro/work-order/create', data);
}
-/** 淇敼鐢熶骇宸ュ崟 */
+/** 淇敼鐢熶骇璁㈠崟 */
export function updateWorkOrder(data: MesProWorkOrderApi.WorkOrder) {
return requestClient.put('/mes/pro/work-order/update', data);
}
-/** 鍒犻櫎鐢熶骇宸ュ崟 */
+/** 鍒犻櫎鐢熶骇璁㈠崟 */
export function deleteWorkOrder(id: number) {
return requestClient.delete(`/mes/pro/work-order/delete?id=${id}`);
}
-/** 瀵煎嚭鐢熶骇宸ュ崟 */
+/** 瀵煎嚭鐢熶骇璁㈠崟 */
export function exportWorkOrder(params: any) {
return requestClient.download('/mes/pro/work-order/export-excel', { params });
}
-/** 瀹屾垚宸ュ崟 */
+/** 瀹屾垚璁㈠崟 */
export function finishWorkOrder(id: number) {
return requestClient.put(`/mes/pro/work-order/finish?id=${id}`);
}
-/** 鍙栨秷宸ュ崟 */
+/** 鍙栨秷璁㈠崟 */
export function cancelWorkOrder(id: number) {
return requestClient.put(`/mes/pro/work-order/cancel?id=${id}`);
}
-/** 纭宸ュ崟 */
+/** 纭璁㈠崟 */
export function confirmWorkOrder(id: number) {
return requestClient.put(`/mes/pro/work-order/confirm?id=${id}`);
}
diff --git a/src/api/mes/qc/ipqc/index.ts b/src/api/mes/qc/ipqc/index.ts
index 2fefa9d..3f0c610 100644
--- a/src/api/mes/qc/ipqc/index.ts
+++ b/src/api/mes/qc/ipqc/index.ts
@@ -1,4 +1,4 @@
-import type { PageParam, PageResult } from '../../../../packages/effects/request/src';
+锘縤mport type { PageParam, PageResult } from '../../../../packages/effects/request/src';
import { requestClient } from '#/api/request';
@@ -14,9 +14,9 @@
sourceDocId?: number; // 鏉ユ簮鍗曟嵁 ID
sourceLineId?: number; // 鏉ユ簮鍗曟嵁琛� ID
sourceDocCode?: string; // 鏉ユ簮鍗曟嵁缂栧彿锛堝叧鑱旀煡璇級
- workOrderId?: number; // 鐢熶骇宸ュ崟 ID
- workOrderCode?: string; // 宸ュ崟缂栧彿锛堝叧鑱旀煡璇級
- workOrderName?: string; // 宸ュ崟鍚嶇О锛堝叧鑱旀煡璇級
+ workOrderId?: number; // 鐢熶骇璁㈠崟 ID
+ workOrderCode?: string; // 璁㈠崟缂栧彿锛堝叧鑱旀煡璇級
+ workOrderName?: string; // 璁㈠崟鍚嶇О锛堝叧鑱旀煡璇級
taskId?: number; // 鐢熶骇浠诲姟 ID
workstationId?: number; // 宸ヤ綅 ID
workstationName?: string; // 宸ヤ綅鍚嶇О锛堝叧鑱旀煡璇級
diff --git a/src/api/mes/qc/pendinginspect/index.ts b/src/api/mes/qc/pendinginspect/index.ts
index 78200dc..6b6fa29 100644
--- a/src/api/mes/qc/pendinginspect/index.ts
+++ b/src/api/mes/qc/pendinginspect/index.ts
@@ -1,4 +1,4 @@
-import type { PageParam, PageResult } from '../../../../packages/effects/request/src';
+锘縤mport type { PageParam, PageResult } from '../../../../packages/effects/request/src';
import { requestClient } from '#/api/request';
@@ -19,8 +19,8 @@
// 渚涘簲鍟嗭紙IQC 鍦烘櫙锛�
vendorId?: number; // 渚涘簲鍟� ID
vendorName?: string; // 渚涘簲鍟嗗悕绉�
- // 宸ュ崟/宸ヤ綔绔�/浠诲姟锛圛PQC/RQC 鍦烘櫙锛�
- workOrderId?: number; // 鐢熶骇宸ュ崟 ID
+ // 璁㈠崟/宸ヤ綔绔�/浠诲姟锛圛PQC/RQC 鍦烘櫙锛�
+ workOrderId?: number; // 鐢熶骇璁㈠崟 ID
workstationId?: number; // 宸ヤ綔绔� ID
workstationName?: string; // 宸ヤ綔绔欏悕绉�
taskId?: number; // 鐢熶骇浠诲姟 ID
diff --git a/src/api/mes/wm/batch/index.ts b/src/api/mes/wm/batch/index.ts
index 5b9f256..46605fc 100644
--- a/src/api/mes/wm/batch/index.ts
+++ b/src/api/mes/wm/batch/index.ts
@@ -1,4 +1,4 @@
-import type { PageParam, PageResult } from '../../../../packages/effects/request/src';
+锘縤mport type { PageParam, PageResult } from '../../../../packages/effects/request/src';
import { requestClient } from '#/api/request';
@@ -23,8 +23,8 @@
clientName?: string; // 瀹㈡埛鍚嶇О
purchaseOrderCode?: string; // 閲囪喘璁㈠崟缂栧彿
salesOrderCode?: string; // 閿�鍞鍗曠紪鍙�
- workOrderId?: number; // 鐢熶骇宸ュ崟 ID
- workOrderCode?: string; // 鐢熶骇宸ュ崟缂栧彿
+ workOrderId?: number; // 鐢熶骇璁㈠崟 ID
+ workOrderCode?: string; // 鐢熶骇璁㈠崟缂栧彿
taskId?: number; // 鐢熶骇浠诲姟 ID
taskCode?: string; // 鐢熶骇浠诲姟缂栧彿
workstationId?: number; // 宸ヤ綔绔� ID
@@ -43,7 +43,7 @@
itemId?: number; // 鐗╂枡缂栧彿
vendorId?: number; // 渚涘簲鍟嗙紪鍙�
clientId?: number; // 瀹㈡埛缂栧彿
- workOrderId?: number; // 宸ュ崟缂栧彿
+ workOrderId?: number; // 璁㈠崟缂栧彿
taskId?: number; // 鐢熶骇浠诲姟缂栧彿
workstationId?: number; // 宸ヤ綔绔欑紪鍙�
toolId?: number; // 宸ュ叿缂栧彿
diff --git a/src/api/mes/wm/outsourceissue/index.ts b/src/api/mes/wm/outsourceissue/index.ts
index f19a116..4908898 100644
--- a/src/api/mes/wm/outsourceissue/index.ts
+++ b/src/api/mes/wm/outsourceissue/index.ts
@@ -1,4 +1,4 @@
-import type { PageParam, PageResult } from '../../../../packages/effects/request/src';
+锘縤mport type { PageParam, PageResult } from '../../../../packages/effects/request/src';
import { requestClient } from '#/api/request';
@@ -11,9 +11,9 @@
vendorId?: number; // 渚涘簲鍟嗙紪鍙�
vendorCode?: string; // 渚涘簲鍟嗙紪鐮�
vendorName?: string; // 渚涘簲鍟嗗悕绉�
- workOrderId?: number; // 鐢熶骇宸ュ崟缂栧彿
- workOrderCode?: string; // 鐢熶骇宸ュ崟缂栫爜
- workOrderName?: string; // 鐢熶骇宸ュ崟鍚嶇О
+ workOrderId?: number; // 鐢熶骇璁㈠崟缂栧彿
+ workOrderCode?: string; // 鐢熶骇璁㈠崟缂栫爜
+ workOrderName?: string; // 鐢熶骇璁㈠崟鍚嶇О
issueDate?: number; // 鍙戞枡鏃ユ湡
status?: number; // 鍗曟嵁鐘舵��
remark?: string; // 澶囨敞
diff --git a/src/api/mes/wm/outsourcereceipt/index.ts b/src/api/mes/wm/outsourcereceipt/index.ts
index 0c660aa..b1a524c 100644
--- a/src/api/mes/wm/outsourcereceipt/index.ts
+++ b/src/api/mes/wm/outsourcereceipt/index.ts
@@ -1,4 +1,4 @@
-import type { PageParam, PageResult } from '../../../../packages/effects/request/src';
+锘縤mport type { PageParam, PageResult } from '../../../../packages/effects/request/src';
import { requestClient } from '#/api/request';
@@ -8,8 +8,8 @@
id?: number; // 鍏ュ簱鍗曠紪鍙�
code?: string; // 鍏ュ簱鍗曠紪鐮�
name?: string; // 鍏ュ簱鍗曞悕绉�
- workOrderId?: number; // 澶栧崗宸ュ崟缂栧彿
- workOrderCode?: string; // 澶栧崗宸ュ崟缂栫爜
+ workOrderId?: number; // 澶栧崗璁㈠崟缂栧彿
+ workOrderCode?: string; // 澶栧崗璁㈠崟缂栫爜
vendorId?: number; // 渚涘簲鍟嗙紪鍙�
vendorName?: string; // 渚涘簲鍟嗗悕绉�
receiptDate?: number; // 鍏ュ簱鏃ユ湡
diff --git a/src/api/mes/wm/packages/line/index.ts b/src/api/mes/wm/packages/line/index.ts
index e3b02f1..6f81ae1 100644
--- a/src/api/mes/wm/packages/line/index.ts
+++ b/src/api/mes/wm/packages/line/index.ts
@@ -1,4 +1,4 @@
-import type { PageParam, PageResult } from '../../../../../packages/effects/request/src';
+锘縤mport type { PageParam, PageResult } from '../../../../../packages/effects/request/src';
import { requestClient } from '#/api/request';
@@ -14,8 +14,8 @@
specification?: string; // 瑙勬牸鍨嬪彿
unitMeasureName?: string; // 璁¢噺鍗曚綅鍚嶇О
quantity?: number; // 瑁呯鏁伴噺
- workOrderId?: number; // 鐢熶骇宸ュ崟缂栧彿
- workOrderCode?: string; // 鐢熶骇宸ュ崟缂栧彿
+ workOrderId?: number; // 鐢熶骇璁㈠崟缂栧彿
+ workOrderCode?: string; // 鐢熶骇璁㈠崟缂栧彿
batchCode?: string; // 鎵规鍙�
expireDate?: number; // 鏈夋晥鏈�
remark?: string; // 澶囨敞
diff --git a/src/api/mes/wm/productissue/index.ts b/src/api/mes/wm/productissue/index.ts
index da5f39a..4c8e959 100644
--- a/src/api/mes/wm/productissue/index.ts
+++ b/src/api/mes/wm/productissue/index.ts
@@ -1,4 +1,4 @@
-import type { PageParam, PageResult } from '../../../../packages/effects/request/src';
+锘縤mport type { PageParam, PageResult } from '../../../../packages/effects/request/src';
import { requestClient } from '#/api/request';
@@ -11,8 +11,8 @@
workstationId?: number; // 宸ヤ綔绔欑紪鍙�
workstationCode?: string; // 宸ヤ綔绔欑紪鐮�
workstationName?: string; // 宸ヤ綔绔欏悕绉�
- workOrderId?: number; // 鐢熶骇宸ュ崟缂栧彿
- workOrderCode?: string; // 鐢熶骇宸ュ崟缂栫爜
+ workOrderId?: number; // 鐢熶骇璁㈠崟缂栧彿
+ workOrderCode?: string; // 鐢熶骇璁㈠崟缂栫爜
clientCode?: string; // 瀹㈡埛缂栫爜
clientName?: string; // 瀹㈡埛鍚嶇О
requiredTime?: number; // 闇�姹傛椂闂�
diff --git a/src/api/mes/wm/productreceipt/index.ts b/src/api/mes/wm/productreceipt/index.ts
index 6090e5b..9858fba 100644
--- a/src/api/mes/wm/productreceipt/index.ts
+++ b/src/api/mes/wm/productreceipt/index.ts
@@ -1,4 +1,4 @@
-import type { PageParam, PageResult } from '../../../../packages/effects/request/src';
+锘縤mport type { PageParam, PageResult } from '../../../../packages/effects/request/src';
import { requestClient } from '#/api/request';
@@ -8,8 +8,8 @@
id?: number; // 鍏ュ簱鍗曠紪鍙�
code?: string; // 鍏ュ簱鍗曠紪鐮�
name?: string; // 鍏ュ簱鍗曞悕绉�
- workOrderId?: number; // 鐢熶骇宸ュ崟缂栧彿
- workOrderCode?: string; // 鐢熶骇宸ュ崟缂栫爜
+ workOrderId?: number; // 鐢熶骇璁㈠崟缂栧彿
+ workOrderCode?: string; // 鐢熶骇璁㈠崟缂栫爜
itemId?: number; // 浜у搧鐗╂枡缂栧彿
itemCode?: string; // 浜у搧鐗╂枡缂栫爜
itemName?: string; // 浜у搧鐗╂枡鍚嶇О
diff --git a/src/api/mes/wm/returnissue/index.ts b/src/api/mes/wm/returnissue/index.ts
index 8ec9798..d977723 100644
--- a/src/api/mes/wm/returnissue/index.ts
+++ b/src/api/mes/wm/returnissue/index.ts
@@ -1,4 +1,4 @@
-import type { PageParam, PageResult } from '../../../../packages/effects/request/src';
+锘縤mport type { PageParam, PageResult } from '../../../../packages/effects/request/src';
import { requestClient } from '#/api/request';
@@ -10,8 +10,8 @@
name?: string; // 閫�鏂欏崟鍚嶇О
workstationId?: number; // 宸ヤ綔绔欑紪鍙�
workstationName?: string; // 宸ヤ綔绔欏悕绉�
- workOrderId?: number; // 鐢熶骇宸ュ崟缂栧彿
- workOrderCode?: string; // 鐢熶骇宸ュ崟缂栫爜
+ workOrderId?: number; // 鐢熶骇璁㈠崟缂栧彿
+ workOrderCode?: string; // 鐢熶骇璁㈠崟缂栫爜
type?: number; // 閫�鏂欑被鍨�
returnDate?: number; // 閫�鏂欐棩鏈�
status?: number; // 鍗曟嵁鐘舵��
diff --git a/src/api/mes/wm/sn/index.ts b/src/api/mes/wm/sn/index.ts
index 5f0da60..00d1328 100644
--- a/src/api/mes/wm/sn/index.ts
+++ b/src/api/mes/wm/sn/index.ts
@@ -1,4 +1,4 @@
-import type { PageParam, PageResult } from '../../../../packages/effects/request/src';
+锘縤mport type { PageParam, PageResult } from '../../../../packages/effects/request/src';
import { requestClient } from '#/api/request';
@@ -13,7 +13,7 @@
specification?: string; // 瑙勬牸鍨嬪彿
unitName?: string; // 鍗曚綅鍚嶇О
batchCode?: string; // 鎵规鍙�
- workOrderId?: number; // 鐢熶骇宸ュ崟缂栧彿
+ workOrderId?: number; // 鐢熶骇璁㈠崟缂栧彿
createTime?: Date; // 鐢熸垚鏃堕棿
}
@@ -28,7 +28,7 @@
specification?: string; // 瑙勬牸鍨嬪彿
unitName?: string; // 鍗曚綅鍚嶇О
batchCode?: string; // 鎵规鍙�
- workOrderId?: number; // 鐢熶骇宸ュ崟缂栧彿
+ workOrderId?: number; // 鐢熶骇璁㈠崟缂栧彿
createTime?: Date; // 鐢熸垚鏃堕棿
}
@@ -36,7 +36,7 @@
export interface SnGenerate {
itemId?: number; // 鐗╂枡缂栧彿
batchCode?: string; // 鎵规鍙�
- workOrderId?: number; // 鐢熶骇宸ュ崟缂栧彿
+ workOrderId?: number; // 鐢熶骇璁㈠崟缂栧彿
count?: number; // 鐢熸垚鏁伴噺
}
diff --git a/src/packages/constants/src/biz-mes-enum.ts b/src/packages/constants/src/biz-mes-enum.ts
index 5419d1b..c790052 100644
--- a/src/packages/constants/src/biz-mes-enum.ts
+++ b/src/packages/constants/src/biz-mes-enum.ts
@@ -136,6 +136,8 @@
PD_PROJECT_CODE: 'PD_PROJECT_CODE',
PD_TASK_CODE: 'PD_TASK_CODE',
PD_VERSION_CODE: 'PD_VERSION_CODE',
+ PD_DOCUMENT_AUDIT_CODE: 'PD_DOCUMENT_AUDIT_CODE',
+ PD_ARCHIVE_CODE: 'PD_ARCHIVE_CODE',
PRO_CARD_CODE: 'PRO_CARD_CODE',
PRO_FEEDBACK_CODE: 'PRO_FEEDBACK_CODE',
PRO_PROCESS_CODE: 'PRO_PROCESS_CODE',
@@ -495,14 +497,13 @@
RIGHT: 2, // 鍙宠ˉ榻�
} as const;
-/** MES 浜у搧璁捐椤圭洰鐘舵�佹灇涓� */
+/** MES 浜у搧璁捐椤圭洰鐘舵�佹灇涓撅紙绾挎�ф祦杞細寰呭彂甯冣啋寰呬笂浼犫啋寰呭鏍糕啋寰呭綊妗b啋宸插綊妗o級 */
export const MesPdProjectStatusEnum = {
- DRAFT: MesOrderStatusConstants.DRAFT,
- DESIGNING: 10,
- REVIEWING: MesOrderStatusConstants.APPROVING,
- APPROVED: MesOrderStatusConstants.APPROVED,
- ARCHIVED: 20,
- CANCELLED: MesOrderStatusConstants.CANCELLED,
+ PENDING_PUBLISH: 0, // 寰呭彂甯�
+ PENDING_UPLOAD: 1, // 寰呬笂浼�
+ PENDING_AUDIT: 2, // 寰呭鏍�
+ PENDING_ARCHIVE: 3, // 寰呭綊妗�
+ ARCHIVED: 4, // 宸插綊妗�
} as const;
/** MES 浜у搧璁捐浠诲姟鐘舵�佹灇涓� */
@@ -528,14 +529,14 @@
PATCH: 3,
} as const;
-/** MES 浜у搧璁捐璧勬枡绫诲瀷鏋氫妇 */
+/** MES 浜у搧璁捐璧勬枡绫诲瀷鏋氫妇锛堝瓧鍏� mes_pd_document_type锛屽悗绔瓨鍌� string 绫诲瀷锛� */
export const MesPdDocumentTypeEnum = {
- SCHEME: 1,
- DRAWING: 2,
- MODEL: 3,
- PRODUCT_DESIGN: 4,
- OTHER: 5,
- BOM: 6,
+ SCHEME: 'scheme',
+ DRAWING: 'drawing',
+ MODEL: 'model',
+ PRODUCT_DESIGN: 'product_design',
+ BOM: 'bom',
+ OTHER: 'other',
} as const;
/** MES 鏉$爜鏍煎紡鏋氫妇 */
diff --git a/src/packages/constants/src/dict-enum.ts b/src/packages/constants/src/dict-enum.ts
index f0a2d99..65b0042 100644
--- a/src/packages/constants/src/dict-enum.ts
+++ b/src/packages/constants/src/dict-enum.ts
@@ -231,6 +231,7 @@
MES_PD_PROJECT_STATUS: 'mes_pd_project_status', // MES 浜у搧璁捐椤圭洰鐘舵��
MES_PD_TASK_STATUS: 'mes_pd_task_status', // MES 浜у搧璁捐浠诲姟鐘舵��
MES_PD_DRAWING_REVIEW_STATUS: 'mes_pd_drawing_review_status', // MES 鍥剧焊瀹℃牳鐘舵��
+ MES_PD_DOCUMENT_AUDIT_STATUS: 'mes_pd_document_audit_status', // MES 璧勬枡瀹℃牳鐘舵��
MES_PD_VERSION_CHANGE_TYPE: 'mes_pd_version_change_type', // MES 鐗堟湰鍙樻洿绫诲瀷
MES_PD_DOCUMENT_TYPE: 'mes_pd_document_type', // MES 璁捐璧勬枡绫诲瀷
MES_PD_ARCHIVE_STATUS: 'mes_pd_archive_status', // MES 璁捐褰掓。鐘舵��
diff --git a/src/views/mes/dv/repair/data.ts b/src/views/mes/dv/repair/data.ts
index 216341b..ef0db75 100644
--- a/src/views/mes/dv/repair/data.ts
+++ b/src/views/mes/dv/repair/data.ts
@@ -1,4 +1,4 @@
-import type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
+锘縤mport type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MesDvRepairApi } from '#/api/mes/dv/repair';
@@ -25,7 +25,7 @@
return ['confirm', 'detail', 'finish'].includes(formType);
}
-/** 鏂板/淇敼缁翠慨宸ュ崟鐨勮〃鍗� */
+/** 鏂板/淇敼缁翠慨璁㈠崟鐨勮〃鍗� */
export function useFormSchema(
formType: FormType,
formApi?: VbenFormApi,
diff --git a/src/views/mes/dv/repair/index.vue b/src/views/mes/dv/repair/index.vue
index c1b2bd7..1f338d3 100644
--- a/src/views/mes/dv/repair/index.vue
+++ b/src/views/mes/dv/repair/index.vue
@@ -1,4 +1,4 @@
-<script lang="ts" setup>
+锘�<script lang="ts" setup>
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MesDvRepairApi } from '#/api/mes/dv/repair';
@@ -25,17 +25,17 @@
gridApi.query();
}
-/** 鍒涘缓缁翠慨宸ュ崟 */
+/** 鍒涘缓缁翠慨璁㈠崟 */
function handleCreate() {
formModalApi.setData({ formType: 'create' }).open();
}
-/** 鏌ョ湅缁翠慨宸ュ崟 */
+/** 鏌ョ湅缁翠慨璁㈠崟 */
function handleDetail(row: MesDvRepairApi.Repair) {
formModalApi.setData({ id: row.id, formType: 'detail' }).open();
}
-/** 缂栬緫缁翠慨宸ュ崟 */
+/** 缂栬緫缁翠慨璁㈠崟 */
function handleEdit(row: MesDvRepairApi.Repair) {
formModalApi.setData({ id: row.id, formType: 'update' }).open();
}
@@ -50,7 +50,7 @@
formModalApi.setData({ id: row.id, formType: 'finish' }).open();
}
-/** 鍒犻櫎缁翠慨宸ュ崟 */
+/** 鍒犻櫎缁翠慨璁㈠崟 */
async function handleDelete(row: MesDvRepairApi.Repair) {
const hideLoading = message.loading({
content: $t('ui.actionMessage.deleting', [row.name]),
@@ -65,10 +65,10 @@
}
}
-/** 瀵煎嚭缁翠慨宸ュ崟 */
+/** 瀵煎嚭缁翠慨璁㈠崟 */
async function handleExport() {
const data = await exportRepair(await gridApi.formApi.getValues());
- downloadFileFromBlobPart({ fileName: '缁翠慨宸ュ崟.xls', source: data });
+ downloadFileFromBlobPart({ fileName: '缁翠慨璁㈠崟.xls', source: data });
}
const [Grid, gridApi] = useVbenVxeGrid({
@@ -102,12 +102,12 @@
</script>
<template>
<Page auto-content-height><FormModal @success="handleRefresh" />
- <Grid table-title="缁翠慨宸ュ崟鍒楄〃">
+ <Grid table-title="缁翠慨璁㈠崟鍒楄〃">
<template #toolbar-tools>
<TableAction
:actions="[
{
- label: $t('ui.actionTitle.create', ['缁翠慨宸ュ崟']),
+ label: $t('ui.actionTitle.create', ['缁翠慨璁㈠崟']),
type: 'primary',
icon: ACTION_ICON.ADD,
auth: ['mes:dv-repair:create'],
diff --git a/src/views/mes/dv/repair/modules/form.vue b/src/views/mes/dv/repair/modules/form.vue
index be42b0f..2320b8c 100644
--- a/src/views/mes/dv/repair/modules/form.vue
+++ b/src/views/mes/dv/repair/modules/form.vue
@@ -1,4 +1,4 @@
-<script lang="ts" setup>
+锘�<script lang="ts" setup>
import type { FormType } from '../data';
import type { MesDvRepairApi } from '#/api/mes/dv/repair';
@@ -43,7 +43,7 @@
);
const getTitle = computed(() => {
if (formType.value === 'detail') {
- return '鏌ョ湅缁翠慨宸ュ崟';
+ return '鏌ョ湅缁翠慨璁㈠崟';
}
if (formType.value === 'confirm') {
return '瀹屾垚缁翠慨';
@@ -51,7 +51,7 @@
if (formType.value === 'finish') {
return '楠屾敹缁翠慨';
}
- return formType.value === 'update' ? '淇敼缁翠慨宸ュ崟' : '鏂板缁翠慨宸ュ崟';
+ return formType.value === 'update' ? '淇敼缁翠慨璁㈠崟' : '鏂板缁翠慨璁㈠崟';
});
const [Form, formApi] = useVbenForm({
@@ -68,7 +68,7 @@
showDefaultActions: false,
});
-/** 鎻愪氦缁翠慨宸ュ崟 */
+/** 鎻愪氦缁翠慨璁㈠崟 */
async function handleSubmit() {
const { valid } = await formApi.validate();
if (!valid || !formData.value?.id) {
@@ -77,7 +77,7 @@
await doSubmit();
}
-/** 鎵ц缁翠慨宸ュ崟鎻愪氦 */
+/** 鎵ц缁翠慨璁㈠崟鎻愪氦 */
async function doSubmit() {
modalApi.lock();
try {
@@ -214,7 +214,7 @@
<div class="flex flex-auto items-center gap-2">
<Popconfirm
v-if="canSubmit"
- title="纭鎻愪氦璇ョ淮淇伐鍗曪紵鎻愪氦鍚庡皢涓嶈兘淇敼銆�"
+ title="纭鎻愪氦璇ョ淮淇鍗曪紵鎻愪氦鍚庡皢涓嶈兘淇敼銆�"
@confirm="handleSubmit"
>
<Button type="primary">鎻愪氦</Button>
diff --git a/src/views/mes/home/chart-options.ts b/src/views/mes/home/chart-options.ts
index ec3403a..41263e9 100644
--- a/src/views/mes/home/chart-options.ts
+++ b/src/views/mes/home/chart-options.ts
@@ -1,4 +1,4 @@
-import type { EChartsOption } from '../../../packages/effects/plugins/src/echarts';
+锘縤mport type { EChartsOption } from '../../../packages/effects/plugins/src/echarts';
/** 鐢熶骇瓒嬪娍鎶樼嚎鍥鹃厤缃� */
export function getProductionTrendChartOptions(
@@ -40,7 +40,7 @@
};
}
-/** 宸ュ崟鐘舵�佸垎甯冮ゼ鍥鹃厤缃� */
+/** 璁㈠崟鐘舵�佸垎甯冮ゼ鍥鹃厤缃� */
export function getWorkOrderStatusChartOptions(
data: Array<{ itemStyle: { color: string }; name: string; value: number }>,
): EChartsOption {
diff --git a/src/views/mes/home/data.ts b/src/views/mes/home/data.ts
index 46dad27..b340ca6 100644
--- a/src/views/mes/home/data.ts
+++ b/src/views/mes/home/data.ts
@@ -1,4 +1,4 @@
-import type { MesHomeApi } from '#/api/mes/home';
+锘縤mport type { MesHomeApi } from '#/api/mes/home';
import { MesProWorkOrderStatusEnum } from '../../../packages/constants/src';
@@ -19,7 +19,7 @@
yesterdayOutput: 0,
};
-/** 宸ュ崟鐘舵�佸搴旂殑棰滆壊鏄犲皠 */
+/** 璁㈠崟鐘舵�佸搴旂殑棰滆壊鏄犲皠 */
export const WORK_ORDER_STATUS_COLOR_MAP: Record<number, string> = {
[MesProWorkOrderStatusEnum.PREPARE]: '#909399', // 鑽夌
[MesProWorkOrderStatusEnum.CONFIRMED]: '#409EFF', // 宸茬‘璁�
diff --git a/src/views/mes/home/index.vue b/src/views/mes/home/index.vue
index a9a3ac2..5f383dc 100644
--- a/src/views/mes/home/index.vue
+++ b/src/views/mes/home/index.vue
@@ -1,4 +1,4 @@
-<script lang="ts" setup>
+锘�<script lang="ts" setup>
import type { MesHomeApi } from '#/api/mes/home';
import { onMounted, ref } from 'vue';
@@ -49,7 +49,7 @@
</Col>
</Row>
- <!-- 绗笁琛岋細宸ュ崟鍒嗗竷 + 蹇嵎鍏ュ彛 -->
+ <!-- 绗笁琛岋細璁㈠崟鍒嗗竷 + 蹇嵎鍏ュ彛 -->
<Row :gutter="16">
<Col :lg="12" :md="24" :sm="24" :xl="12" :xs="24" class="mb-4">
<WorkOrderChart />
diff --git a/src/views/mes/home/modules/alert-panel.vue b/src/views/mes/home/modules/alert-panel.vue
index c0b44f3..5830cfe 100644
--- a/src/views/mes/home/modules/alert-panel.vue
+++ b/src/views/mes/home/modules/alert-panel.vue
@@ -1,4 +1,4 @@
-<script lang="ts" setup>
+锘�<script lang="ts" setup>
import type { MesHomeApi } from '#/api/mes/home';
import { computed } from 'vue';
@@ -29,7 +29,7 @@
},
{
count: props.summary.repairActiveCount,
- desc: '寰呭鐞嗙殑缁翠慨宸ュ崟',
+ desc: '寰呭鐞嗙殑缁翠慨璁㈠崟',
icon: 'lucide:wrench',
iconClass: 'bg-orange-50 text-orange-500',
label: '璁惧缁翠慨',
@@ -37,10 +37,10 @@
},
{
count: props.summary.workOrderPrepareCount,
- desc: '鑽夌鐘舵�佺殑鐢熶骇宸ュ崟',
+ desc: '鑽夌鐘舵�佺殑鐢熶骇璁㈠崟',
icon: 'lucide:clipboard-list',
iconClass: 'bg-blue-50 text-blue-500',
- label: '寰呮帓浜у伐鍗�',
+ label: '寰呮帓浜ц鍗�',
routeName: 'MesProWorkOrder',
},
]);
diff --git a/src/views/mes/home/modules/kpi-cards.vue b/src/views/mes/home/modules/kpi-cards.vue
index c73e42c..63dbece 100644
--- a/src/views/mes/home/modules/kpi-cards.vue
+++ b/src/views/mes/home/modules/kpi-cards.vue
@@ -1,4 +1,4 @@
-<script lang="ts" setup>
+锘�<script lang="ts" setup>
import type { MesHomeApi } from '#/api/mes/home';
import { computed } from 'vue';
@@ -53,7 +53,7 @@
<IconifyIcon class="size-7" icon="lucide:file-text" />
</div>
<div>
- <div class="text-muted-foreground mb-1 text-sm">鐢熶骇宸ュ崟</div>
+ <div class="text-muted-foreground mb-1 text-sm">鐢熶骇璁㈠崟</div>
<div class="flex items-baseline gap-1">
<CountTo
class="text-2xl font-bold leading-tight text-[#409eff]"
diff --git a/src/views/mes/home/modules/shortcuts.vue b/src/views/mes/home/modules/shortcuts.vue
index f8f62e6..26eebed 100644
--- a/src/views/mes/home/modules/shortcuts.vue
+++ b/src/views/mes/home/modules/shortcuts.vue
@@ -1,4 +1,4 @@
-<script lang="ts" setup>
+锘�<script lang="ts" setup>
import { IconifyIcon } from '../../../../packages/icons/src';
import { Card, Col, Row } from 'ant-design-vue';
@@ -9,12 +9,12 @@
navigate: [name: string];
}>();
-/** 蹇嵎鍏ュ彛鍒楄〃锛�3脳3 缃戞牸甯冨眬涓庡伐鍗曠姸鎬佸垎甯冮潰鏉跨瓑楂� */
+/** 蹇嵎鍏ュ彛鍒楄〃锛�3脳3 缃戞牸甯冨眬涓庤鍗曠姸鎬佸垎甯冮潰鏉跨瓑楂� */
const shortcuts = [
{
bgColor: '#409EFF',
icon: 'lucide:file-text',
- name: '鐢熶骇宸ュ崟',
+ name: '鐢熶骇璁㈠崟',
routeName: 'MesProWorkOrder',
},
{
diff --git a/src/views/mes/home/modules/work-order-chart.vue b/src/views/mes/home/modules/work-order-chart.vue
index 73945dc..0e5ae72 100644
--- a/src/views/mes/home/modules/work-order-chart.vue
+++ b/src/views/mes/home/modules/work-order-chart.vue
@@ -1,4 +1,4 @@
-<script lang="ts" setup>
+锘�<script lang="ts" setup>
import type { EchartsUIType } from '../../../../packages/effects/plugins/src/echarts';
import { onMounted, ref } from 'vue';
@@ -17,7 +17,7 @@
const chartRef = ref<EchartsUIType>();
const { renderEcharts } = useEcharts(chartRef);
-/** 鍔犺浇宸ュ崟鐘舵�佸垎甯冩暟鎹苟娓叉煋楗煎浘 */
+/** 鍔犺浇璁㈠崟鐘舵�佸垎甯冩暟鎹苟娓叉煋楗煎浘 */
async function loadData() {
const data = await getWorkOrderStatusDistribution();
const chartData = data.map((d) => ({
@@ -34,7 +34,7 @@
</script>
<template>
- <Card title="宸ュ崟鐘舵�佸垎甯�" class="h-full">
+ <Card title="璁㈠崟鐘舵�佸垎甯�" class="h-full">
<EchartsUI ref="chartRef" class="h-[280px] w-full" />
</Card>
</template>
diff --git a/src/views/mes/md/item/modules/item-batch-config-form.vue b/src/views/mes/md/item/modules/item-batch-config-form.vue
index 8532b26..abce437 100644
--- a/src/views/mes/md/item/modules/item-batch-config-form.vue
+++ b/src/views/mes/md/item/modules/item-batch-config-form.vue
@@ -1,4 +1,4 @@
-<script lang="ts" setup>
+锘�<script lang="ts" setup>
import type { FormType } from '../data';
import type { MesMdItemBatchConfigApi } from '#/api/mes/md/item/batchConfig';
@@ -158,7 +158,7 @@
v-model:checked="formData.workorderFlag"
:disabled="isReadOnly"
>
- 鐢熶骇宸ュ崟
+ 鐢熶骇璁㈠崟
</Checkbox>
<Checkbox v-model:checked="formData.taskFlag" :disabled="isReadOnly">
鐢熶骇浠诲姟
diff --git a/src/views/mes/pd/archive/data.ts b/src/views/mes/pd/archive/data.ts
index 7146fcf..c8e697e 100644
--- a/src/views/mes/pd/archive/data.ts
+++ b/src/views/mes/pd/archive/data.ts
@@ -1,71 +1,79 @@
-import type { VbenFormSchema } from "#/adapter/form";
-import type { VxeTableGridOptions } from "#/adapter/vxe-table";
+import type { VbenFormSchema } from '#/adapter/form';
+import type { VxeTableGridOptions } from '#/adapter/vxe-table';
-import { DICT_TYPE } from "#/packages/constants/src";
-import { getDictOptions } from "#/packages/effects/hooks/src";
+import { DICT_TYPE } from '#/packages/constants/src';
+import { getDictOptions } from '#/packages/effects/hooks/src';
export function useGridFormSchema(): VbenFormSchema[] {
return [
{
- fieldName: "code",
- label: "褰掓。缂栧彿",
- component: "Input",
- componentProps: { placeholder: "璇疯緭鍏ュ綊妗g紪鍙�" },
+ fieldName: 'archiveCode',
+ label: '褰掓。缂栧彿',
+ component: 'Input',
+ componentProps: { placeholder: '璇疯緭鍏ュ綊妗g紪鍙�' },
},
{
- fieldName: "projectCode",
- label: "浠诲姟缂栫爜",
- component: "Input",
- componentProps: { placeholder: "璇疯緭鍏ヤ换鍔$紪鐮�" },
+ fieldName: 'productCode',
+ label: '浜у搧缂栫爜',
+ component: 'Input',
+ componentProps: { placeholder: '璇疯緭鍏ヤ骇鍝佺紪鐮�' },
},
{
- fieldName: "productCode",
- label: "浜у搧缂栫爜",
- component: "Input",
- componentProps: { placeholder: "璇疯緭鍏ヤ骇鍝佺紪鐮�" },
+ fieldName: 'productName',
+ label: '浜у搧鍚嶇О',
+ component: 'Input',
+ componentProps: { placeholder: '璇疯緭鍏ヤ骇鍝佸悕绉�' },
},
{
- fieldName: "archiveStatus",
- label: "褰掓。鐘舵��",
- component: "Select",
+ fieldName: 'archiveStatus',
+ label: '褰掓。鐘舵��',
+ component: 'Select',
componentProps: {
allowClear: true,
- options: getDictOptions(DICT_TYPE.MES_PD_ARCHIVE_STATUS, "number"),
- placeholder: "璇烽�夋嫨褰掓。鐘舵��",
+ options: getDictOptions(DICT_TYPE.MES_PD_ARCHIVE_STATUS, 'number'),
+ placeholder: '璇烽�夋嫨褰掓。鐘舵��',
},
},
];
}
-export function useGridColumns(): VxeTableGridOptions["columns"] {
+export function useGridColumns(): VxeTableGridOptions['columns'] {
return [
{
- field: "code",
- title: "褰掓。缂栧彿",
+ field: 'archiveCode',
+ title: '褰掓。缂栧彿',
minWidth: 130,
- slots: { default: "code" },
+ slots: { default: 'archiveCode' },
},
- { field: "projectCode", title: "浠诲姟缂栫爜", minWidth: 120 },
- { field: "projectName", title: "浠诲姟鍚嶇О", minWidth: 140 },
- { field: "productCode", title: "浜у搧缂栫爜", minWidth: 120 },
- { field: "productName", title: "浜у搧鍚嶇О", minWidth: 140 },
- { field: "version", title: "鐗堟湰鍙�", minWidth: 90 },
+ { field: 'productCode', title: '浜у搧缂栫爜', minWidth: 120 },
+ { field: 'productName', title: '浜у搧鍚嶇О', minWidth: 140 },
+ { field: 'taskCode', title: '浠诲姟缂栫爜', minWidth: 130 },
+ { field: 'taskName', title: '浠诲姟鍚嶇О', minWidth: 160 },
+ { field: 'archiveCount', title: '褰掓。鏁伴噺', minWidth: 90 },
{
- field: "archiveStatus",
- title: "褰掓。鐘舵��",
+ field: 'archiveStatus',
+ title: '褰掓。鐘舵��',
minWidth: 100,
cellRender: {
- name: "CellDict",
+ name: 'CellDict',
props: { type: DICT_TYPE.MES_PD_ARCHIVE_STATUS },
},
},
- { field: "documentCount", title: "璧勬枡鏁�", minWidth: 80 },
- { field: "archiverName", title: "褰掓。浜�", minWidth: 100 },
+ { field: 'archiverNickname', title: '褰掓。浜�', minWidth: 100 },
{
- field: "archiveTime",
- title: "褰掓。鏃堕棿",
+ field: 'archiveTime',
+ title: '褰掓。鏃堕棿',
minWidth: 160,
- formatter: "formatDateTime",
+ formatter: 'formatDateTime',
},
+ { field: 'updaterNickname', title: '鏇存柊浜�', minWidth: 100 },
+ {
+ field: 'updateTime',
+ title: '鏇存柊鏃堕棿',
+ minWidth: 160,
+ formatter: 'formatDateTime',
+ },
+
+
];
}
diff --git a/src/views/mes/pd/archive/index.vue b/src/views/mes/pd/archive/index.vue
index 9949bdb..cff869b 100644
--- a/src/views/mes/pd/archive/index.vue
+++ b/src/views/mes/pd/archive/index.vue
@@ -18,12 +18,12 @@
const detailRef = ref<InstanceType<typeof Detail>>();
function handleDetail(row: MesPdArchiveApi.Archive) {
- detailRef.value?.open(row.id!);
+ detailRef.value?.open(row.productCode!);
}
async function handleExport() {
const data = await exportPdArchive(await gridApi.formApi.getValues());
- downloadFileFromBlobPart({ fileName: '璁捐褰掓。鍙拌处.xls', source: data });
+ downloadFileFromBlobPart({ fileName: '褰掓。鍙拌处.xls', source: data });
}
const [Grid, gridApi] = useVbenVxeGrid({
@@ -53,7 +53,7 @@
<Page auto-content-height>
<Detail ref="detailRef" />
- <Grid table-title="浜у搧鐗堟湰褰掓。鍙拌处">
+ <Grid table-title="褰掓。鍙拌处">
<template #toolbar-tools>
<TableAction
:actions="[
@@ -67,8 +67,8 @@
]"
/>
</template>
- <template #code="{ row }">
- <Button type="link" @click="handleDetail(row)">{{ row.code }}</Button>
+ <template #archiveCode="{ row }">
+ <Button type="link" @click="handleDetail(row)">{{ row.archiveCode }}</Button>
</template>
</Grid>
</Page>
diff --git a/src/views/mes/pd/archive/modules/detail.vue b/src/views/mes/pd/archive/modules/detail.vue
index 6b3875f..9eeee80 100644
--- a/src/views/mes/pd/archive/modules/detail.vue
+++ b/src/views/mes/pd/archive/modules/detail.vue
@@ -1,104 +1,120 @@
<script lang="ts" setup>
import type { MesPdArchiveApi } from '#/api/mes/pd/archive';
-import type { MesPdVersionChangeApi } from '#/api/mes/pd/version-change';
import { ref } from 'vue';
import { useVbenModal } from '#/packages/effects/common-ui/src';
+import { DICT_TYPE } from '#/packages/constants/src';
-import { Alert, Descriptions, Tabs } from 'ant-design-vue';
+import { Descriptions, Table, Tabs } from 'ant-design-vue';
-import { getPdArchive } from '#/api/mes/pd/archive';
+import { getPdArchiveDetailByProduct } from '#/api/mes/pd/archive';
-import MaterialPanel from '#/views/mes/pd/project/modules/material-panel.vue';
-import VersionChangeList from '#/views/mes/pd/project/modules/version-change/version-change-list.vue';
+const loading = ref(false);
+const detailList = ref<MesPdArchiveApi.DetailItem[]>([]);
+const activeProject = ref('0');
-const detail = ref<MesPdArchiveApi.Archive>();
-const activeTab = ref('version-change');
-const materialVersion = ref<string>();
-const materialVersionHint = ref<string>();
+const archiveColumns = [
+ { title: '褰掓。缂栧彿', dataIndex: 'archiveCode', key: 'archiveCode' },
+ { title: '褰掓。浜�', dataIndex: 'archiverNickname', key: 'archiverNickname' },
+ { title: '褰掓。鐘舵��', dataIndex: 'archiveStatus', key: 'archiveStatus' },
+ { title: '褰掓。鏃堕棿', dataIndex: 'archiveTime', key: 'archiveTime' },
+ { title: '澶囨敞', dataIndex: 'remark', key: 'remark', ellipsis: true },
+];
-function handleViewMaterials(row: MesPdVersionChangeApi.VersionChange) {
- materialVersion.value = row.toVersion;
- materialVersionHint.value = `鍙樻洿鍗� ${row.code}锛�${row.fromVersion} 鈫� ${row.toVersion}`;
- activeTab.value = 'material';
-}
-
-function clearMaterialVersionFilter() {
- materialVersion.value = detail.value?.version;
- materialVersionHint.value = undefined;
-}
+const documentColumns = [
+ { title: '璧勬枡鍚嶇О', dataIndex: 'documentName', key: 'documentName' },
+ { title: '璧勬枡绫诲瀷', dataIndex: 'documentType', key: 'documentType' },
+ { title: '鐗堟湰', dataIndex: 'documentVersion', key: 'documentVersion', width: 80 },
+ { title: '鏂囦欢鍚�', dataIndex: 'fileName', key: 'fileName' },
+ { title: '涓婁紶浜�', dataIndex: 'uploadUserNickname', key: 'uploadUserNickname' },
+ { title: '涓婁紶鏃堕棿', dataIndex: 'uploadTime', key: 'uploadTime' },
+ {
+ title: '鎿嶄綔',
+ key: 'action',
+ width: 80,
+ },
+];
const [Modal, modalApi] = useVbenModal({
async onOpenChange(isOpen: boolean) {
if (!isOpen) {
- detail.value = undefined;
- activeTab.value = 'version-change';
- materialVersion.value = undefined;
- materialVersionHint.value = undefined;
+ detailList.value = [];
+ activeProject.value = '0';
return;
}
- const data = modalApi.getData<{ id: number }>();
- modalApi.lock();
+ const data = modalApi.getData<{ productCode: number }>();
+ loading.value = true;
try {
- detail.value = await getPdArchive(data.id);
- materialVersion.value = detail.value.version;
+ detailList.value = await getPdArchiveDetailByProduct(data.productCode);
+ activeProject.value = '0';
} finally {
- modalApi.unlock();
+ loading.value = false;
}
},
});
defineExpose({
- open: (id: number) => modalApi.setData({ id }).open(),
+ open: (productCode: number) => modalApi.setData({ productCode }).open(),
});
</script>
<template>
- <Modal class="w-4/5" title="褰掓。璇︽儏">
- <Descriptions v-if="detail" :column="3" bordered class="mx-4 mb-4" size="small">
- <Descriptions.Item label="褰掓。缂栧彿">{{ detail.code }}</Descriptions.Item>
- <Descriptions.Item label="浜у搧缂栫爜">{{ detail.productCode }}</Descriptions.Item>
- <Descriptions.Item label="浜у搧鍚嶇О">{{ detail.productName }}</Descriptions.Item>
- <Descriptions.Item label="璁捐鐗堟湰">{{ detail.version }}</Descriptions.Item>
- <Descriptions.Item label="浠诲姟缂栫爜">{{ detail.projectCode }}</Descriptions.Item>
- <Descriptions.Item label="浠诲姟鍚嶇О">{{ detail.projectName }}</Descriptions.Item>
- <Descriptions.Item label="璧勬枡鏁�">{{ detail.documentCount ?? '-' }}</Descriptions.Item>
- <Descriptions.Item label="褰掓。浜�">{{ detail.archiverName || '-' }}</Descriptions.Item>
- <Descriptions.Item label="褰掓。璺緞" :span="3">
- {{ detail.storagePath || '-' }}
- </Descriptions.Item>
- <Descriptions.Item label="澶囨敞" :span="3">{{ detail.remark || '-' }}</Descriptions.Item>
- </Descriptions>
+ <Modal class="w-4/5" title="褰掓。璇︽儏" :loading="loading">
+ <Tabs v-if="detailList.length > 0" v-model:active-key="activeProject" type="card">
+ <Tabs.TabPane
+ v-for="(detail, index) in detailList"
+ :key="String(index)"
+ :tab="detail.project.taskName || '椤圭洰'"
+ >
+ <!-- 椤圭洰淇℃伅 -->
+ <Descriptions :column="3" bordered size="small" class="mb-4">
+ <Descriptions.Item label="浠诲姟缂栫爜">{{ detail.project.taskCode }}</Descriptions.Item>
+ <Descriptions.Item label="浠诲姟鍚嶇О">{{ detail.project.taskName }}</Descriptions.Item>
+ <Descriptions.Item label="浜у搧缂栫爜">{{ detail.project.productCode }}</Descriptions.Item>
+ <Descriptions.Item label="浜у搧鍚嶇О">{{ detail.project.productName }}</Descriptions.Item>
+ <Descriptions.Item label="鐗堟湰鍙�">{{ detail.project.version }}</Descriptions.Item>
+ <Descriptions.Item label="涓昏璁″笀">{{ detail.project.chiefDesignerNickname }}</Descriptions.Item>
+ <Descriptions.Item label="瀹℃牳浜�">{{ detail.project.reviewerNickname }}</Descriptions.Item>
+ <Descriptions.Item label="璁″垝瀹屾垚">{{ detail.project.planFinishTime }}</Descriptions.Item>
+ </Descriptions>
- <template v-if="detail?.projectId">
- <Tabs v-model:active-key="activeTab" class="mx-4">
- <Tabs.TabPane key="version-change" tab="鐗堟湰鍙樻洿璁板綍">
- <VersionChangeList
- form-type="detail"
- :project-id="detail.projectId"
- :project-version="detail.version"
- @view-materials="handleViewMaterials"
+ <!-- 褰掓。璁板綍 -->
+ <div class="mb-4">
+ <h4 class="mb-2 text-sm font-medium">褰掓。璁板綍</h4>
+ <Table
+ :columns="archiveColumns"
+ :data-source="detail.archives"
+ :pagination="false"
+ bordered
+ row-key="id"
+ size="small"
/>
- </Tabs.TabPane>
- <Tabs.TabPane key="material" tab="鐗堟湰璧勬枡">
- <Alert
- v-if="materialVersionHint"
- class="mb-3"
- closable
- show-icon
- type="info"
- :message="`姝e湪鏌ョ湅 ${materialVersion} 鐗堟湰璧勬枡锛�${materialVersionHint}锛塦"
- @close="clearMaterialVersionFilter"
- />
- <MaterialPanel
- form-type="detail"
- :project-id="detail.projectId"
- table-title="鐗堟湰璧勬枡"
- :version="materialVersion"
- />
- </Tabs.TabPane>
- </Tabs>
- </template>
+ </div>
+
+ <!-- 璁捐璧勬枡 -->
+ <div>
+ <h4 class="mb-2 text-sm font-medium">璁捐璧勬枡</h4>
+ <Table
+ :columns="documentColumns"
+ :data-source="detail.documents"
+ :pagination="false"
+ bordered
+ row-key="id"
+ size="small"
+ >
+ <template #bodyCell="{ column, record }">
+ <template v-if="column.key === 'action'">
+ <a v-if="record.fileUrl" :href="record.fileUrl" target="_blank" class="text-primary">涓嬭浇</a>
+ <span v-else class="text-gray-400">-</span>
+ </template>
+ </template>
+ </Table>
+ </div>
+ </Tabs.TabPane>
+ </Tabs>
+ <div v-else class="py-8 text-center text-gray-400">
+ 鏆傛棤褰掓。璁板綍
+ </div>
</Modal>
</template>
diff --git a/src/views/mes/pd/project/data.ts b/src/views/mes/pd/project/data.ts
index 9d9cac6..9c1d3e1 100644
--- a/src/views/mes/pd/project/data.ts
+++ b/src/views/mes/pd/project/data.ts
@@ -1,381 +1,340 @@
-import type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
-import type { VxeTableGridOptions } from '#/adapter/vxe-table';
-import type { MesMdItemApi } from '#/api/mes/md/item';
-import type { MesPdProjectApi } from '#/api/mes/pd/project';
+import type { ExtendedFormApi, VbenFormSchema } from "#/adapter/form";
+import type { VxeTableGridOptions } from "#/adapter/vxe-table";
+import type { MesMdItemApi } from "#/api/mes/md/item";
+import type { MesPdProjectApi } from "#/api/mes/pd/project";
-import { h, markRaw } from 'vue';
+import { h, markRaw } from "vue";
import {
DICT_TYPE,
MesAutoCodeRuleCode,
MesPdDocumentTypeEnum,
-} from '#/packages/constants/src';
-import { getDictOptions } from '#/packages/effects/hooks/src';
+} from "#/packages/constants/src";
+import { getDictOptions } from "#/packages/effects/hooks/src";
-import { Button } from 'ant-design-vue';
+import { Button } from "ant-design-vue";
-import { generateAutoCode } from '#/api/mes/md/autocode/record';
-import { isPdMockEnabled } from '#/api/mes/pd/mock/enabled';
-import { mockNextCode } from '#/api/mes/pd/mock/utils';
-import { getRangePickerDefaultProps } from '#/utils';
-import { MdItemSelect } from '#/views/mes/md/item/components';
+import { generateAutoCode } from "#/api/mes/md/autocode/record";
-export type FormType = 'create' | 'detail' | 'update';
+import { MdItemSelect } from "#/views/mes/md/item/components";
+import PdUserSelect from "../project/modules/user-select.vue";
-async function generateTaskCode(formApi?: VbenFormApi) {
- const code = isPdMockEnabled()
- ? mockNextCode('DT-2026', Math.floor(Date.now() % 10_000))
- : await generateAutoCode(MesAutoCodeRuleCode.PD_PROJECT_CODE);
- await formApi?.setFieldValue('code', code);
+export type FormType = "create" | "detail" | "update";
+
+/** 寮圭獥鍐� DatePicker锛氭寕杞藉埌 dialog 鍐咃紝閬垮厤 focus-outside 鎷︽埅鏃ュ巻鐐瑰嚮 */
+function useModalDatePickerProps(options?: {
+ disabled?: boolean;
+ placeholder?: string;
+}) {
+ return {
+ allowClear: true,
+ class: "!w-full",
+ disabled: options?.disabled,
+ format: "YYYY-MM-DD",
+ getPopupContainer: (node: HTMLElement) =>
+ (node.closest('[data-slot="dialog-content"]') as HTMLElement) ??
+ document.body,
+ inputReadOnly: true,
+ placeholder: options?.placeholder ?? "璇烽�夋嫨鏃ユ湡",
+ valueFormat: "x",
+ };
+}
+
+async function generateTaskCode(formApi?: ExtendedFormApi) {
+ const code = await generateAutoCode(MesAutoCodeRuleCode.PD_PROJECT_CODE);
+ await formApi?.setFieldValue("taskCode", code);
}
async function syncTaskNameFromProduct(
- formApi: VbenFormApi | undefined,
- productName?: string,
+ formApi: ExtendedFormApi | undefined,
+ productName?: string
) {
- const version = (await formApi?.getFieldValue('version')) as
- | string
- | undefined;
+ const values = await formApi?.getValues();
+ const version = values?.version as string | undefined;
const name = productName?.trim();
if (name && version?.trim()) {
- await formApi?.setFieldValue('name', `${name} ${version.trim()} 璁捐`);
+ await formApi?.setFieldValue("taskName", `${name} ${version.trim()} 璁捐`);
}
}
/** 浜у搧閫夋嫨锛氶�夋嫨鍚庤嚜鍔ㄥ甫鍑轰骇鍝佺紪鐮� */
function useProductSelectSchema(
- formApi: VbenFormApi | undefined,
- readonly: boolean,
+ formApi: ExtendedFormApi | undefined,
+ readonly: boolean
): VbenFormSchema[] {
if (readonly) {
return [
{
- fieldName: 'productCode',
- label: '浜у搧缂栫爜',
- component: 'Input',
+ fieldName: "productCode",
+ label: "浜у搧缂栫爜",
+ component: "Input",
componentProps: { disabled: true },
},
{
- fieldName: 'productName',
- label: '浜у搧鍚嶇О',
- component: 'Input',
+ fieldName: "productName",
+ label: "浜у搧鍚嶇О",
+ component: "Input",
componentProps: { disabled: true },
},
];
}
return [
{
- fieldName: 'productId',
- label: '浜у搧',
+ fieldName: "productId",
+ label: "浜у搧",
component: markRaw(MdItemSelect),
componentProps: {
- placeholder: '璇烽�夋嫨浜у搧',
+ placeholder: "璇烽�夋嫨浜у搧",
onChange: async (item: MesMdItemApi.Item | undefined) => {
- await formApi?.setFieldValue('productCode', item?.code ?? '');
- await formApi?.setFieldValue('productName', item?.name ?? '');
+ await formApi?.setFieldValue("productCode", item?.code ?? "");
+ await formApi?.setFieldValue("productName", item?.name ?? "");
await syncTaskNameFromProduct(formApi, item?.name);
},
},
- rules: 'selectRequired',
+ rules: "selectRequired",
},
{
- fieldName: 'productCode',
- label: '浜у搧缂栫爜',
- component: 'Input',
+ fieldName: "productCode",
+ label: "浜у搧缂栫爜",
+ component: "Input",
componentProps: {
disabled: true,
- placeholder: '閫夋嫨浜у搧鍚庤嚜鍔ㄥ甫鍑�',
+ placeholder: "閫夋嫨浜у搧鍚庤嚜鍔ㄥ甫鍑�",
},
- rules: 'required',
+ rules: "required",
},
{
- fieldName: 'productName',
- component: 'Input',
- dependencies: { triggerFields: [''], show: () => false },
+ fieldName: "productName",
+ component: "Input",
+ dependencies: { triggerFields: [""], show: () => false },
},
];
}
-/** 鍙戣捣璁捐浠诲姟琛ㄥ崟 */
-export function useCreateTaskSchema(formApi?: VbenFormApi): VbenFormSchema[] {
+/** 鍙戣捣璁捐浠诲姟 / 鍒涘缓琛ㄥ崟 */
+export function useCreateFormSchema(
+ formApi?: ExtendedFormApi
+): VbenFormSchema[] {
return [
{
- fieldName: 'id',
- component: 'Input',
- dependencies: { triggerFields: [''], show: () => false },
+ fieldName: "id",
+ component: "Input",
+ dependencies: { triggerFields: [""], show: () => false },
},
{
- fieldName: 'code',
- label: '浠诲姟缂栫爜',
- component: 'Input',
- componentProps: { placeholder: '璇风偣鍑荤敓鎴愪换鍔$紪鐮�' },
- rules: 'required',
+ fieldName: "taskCode",
+ label: "浠诲姟缂栫爜",
+ component: "Input",
+ componentProps: { placeholder: "璇风偣鍑荤敓鎴愪换鍔$紪鐮�" },
+ rules: "required",
suffix: () =>
h(
Button,
- { type: 'default', onClick: () => generateTaskCode(formApi) },
- { default: () => '鐢熸垚' },
+ { type: "default", onClick: () => generateTaskCode(formApi) },
+ { default: () => "鐢熸垚" }
),
},
...useProductSelectSchema(formApi, false),
{
- fieldName: 'version',
- label: '璁捐鐗堟湰',
- component: 'Input',
- componentProps: { placeholder: '濡� V1.0銆乂2.1' },
- rules: 'required',
+ fieldName: "version",
+ label: "鐗堟湰鍙�",
+ component: "Input",
+ componentProps: { placeholder: "濡� V1.0銆乂2.1" },
+ rules: "required",
},
{
- fieldName: 'name',
- label: '浠诲姟鍚嶇О',
- component: 'Input',
- componentProps: { placeholder: '灏嗘牴鎹骇鍝佷笌鐗堟湰鑷姩鐢熸垚锛屽彲淇敼' },
- rules: 'required',
+ fieldName: "taskName",
+ label: "浠诲姟鍚嶇О",
+ component: "Input",
+ componentProps: { placeholder: "灏嗘牴鎹骇鍝佷笌鐗堟湰鑷姩鐢熸垚锛屽彲淇敼" },
+ rules: "required",
dependencies: {
- triggerFields: ['productName', 'version'],
+ triggerFields: ["productName", "version"],
trigger(values: Record<string, string>, form) {
const productName = values.productName?.trim();
const version = values.version?.trim();
if (productName && version) {
- form.setFieldValue('name', `${productName} ${version} 璁捐`);
+ form.setFieldValue("taskName", `${productName} ${version} 璁捐`);
}
},
},
},
{
- fieldName: 'designerName',
- label: '涓昏璁″笀',
- component: 'Input',
- componentProps: { placeholder: '璇疯緭鍏ヤ富璁捐甯�' },
- rules: 'required',
+ fieldName: "chiefDesigner",
+ label: "涓昏璁″笀",
+ component: markRaw(PdUserSelect),
+ componentProps: { placeholder: "璇烽�夋嫨涓昏璁″笀" },
+ rules: "selectRequired",
},
{
- fieldName: 'reviewerName',
- label: '瀹℃牳浜�',
- component: 'Input',
- componentProps: { placeholder: '璧勬枡瀹℃牳璐熻矗浜�' },
- rules: 'required',
+ fieldName: "reviewer",
+ label: "瀹℃牳浜�",
+ component: markRaw(PdUserSelect),
+ componentProps: { placeholder: "璇烽�夋嫨瀹℃牳浜�" },
+ rules: "selectRequired",
},
{
- fieldName: 'planDateRange',
- label: '璁″垝鍛ㄦ湡',
- component: 'RangePicker',
- componentProps: getRangePickerDefaultProps(),
- rules: 'required',
+ fieldName: "planFinishTime",
+ label: "璁″垝瀹屾垚鏃堕棿",
+ component: "DatePicker",
+ componentProps: useModalDatePickerProps({
+ placeholder: "璇烽�夋嫨璁″垝瀹屾垚鏃堕棿",
+ }),
},
{
- fieldName: 'remark',
- label: '浠诲姟璇存槑',
- component: 'Textarea',
+ fieldName: "remark",
+ label: "澶囨敞",
+ component: "Textarea",
componentProps: {
- placeholder: '绠�杩版湰娆¤璁$洰鏍囥�佸彉鏇磋儗鏅瓑',
+ placeholder: "绠�杩版湰娆¤璁$洰鏍囥�佸彉鏇磋儗鏅瓑",
rows: 3,
},
- formItemClass: 'col-span-2',
+ formItemClass: "col-span-2",
},
];
}
-/** 鍙戝竷浠诲姟纭琛ㄥ崟 */
-export function usePublishFormSchema(): VbenFormSchema[] {
- return [
- {
- fieldName: 'publishRemark',
- label: '鍙戝竷璇存槑',
- component: 'Textarea',
- componentProps: {
- placeholder: '鍙�夛紝濉啓鍙戝竷瑕佹眰鎴栨敞鎰忎簨椤�',
- rows: 3,
- },
- formItemClass: 'col-span-2',
- },
- ];
-}
-
-export type WorkflowActionType = 'approve' | 'archive' | 'submit-review';
-
-export interface WorkflowActionConfig {
- title: string;
- alertMessage: string;
- alertDescription: string;
- remarkLabel: string;
- remarkTag: string;
- remarkPlaceholder: string;
- successMessage: string;
- alertType: 'info' | 'success' | 'warning';
-}
-
-export const WORKFLOW_ACTION_CONFIG: Record<
- WorkflowActionType,
- WorkflowActionConfig
-> = {
- 'submit-review': {
- title: '鎻愪氦璧勬枡瀹℃牳',
- alertMessage: '纭鎻愪氦瀹℃牳',
- alertDescription:
- '鎻愪氦鍚庡皢杩涘叆璧勬枡瀹℃牳鐜妭锛岃纭璁捐璧勬枡宸蹭笂浼犲畬鏁淬�傛彁浜ゅ悗璁捐甯堝皢鏃犳硶缁х画淇敼璧勬枡銆�',
- remarkLabel: '鎻愪氦璇存槑',
- remarkTag: '銆愭彁浜よ鏄庛��',
- remarkPlaceholder: '鍙�夛紝濉啓鎻愪氦瀹℃牳鐨勮ˉ鍏呰鏄�',
- successMessage: '宸叉彁浜よ祫鏂欏鏍�',
- alertType: 'info',
- },
- approve: {
- title: '瀹℃牳閫氳繃',
- alertMessage: '纭瀹℃牳閫氳繃',
- alertDescription:
- '瀹℃牳閫氳繃鍚庝换鍔¤繘鍏ャ�屽凡閫氳繃銆嶇姸鎬侊紝鍙繘琛屽綊妗f搷浣溿�傝纭璁捐璧勬枡绗﹀悎瑕佹眰銆�',
- remarkLabel: '瀹℃牳鎰忚',
- remarkTag: '銆愬鏍告剰瑙併��',
- remarkPlaceholder: '鍙�夛紝濉啓瀹℃牳閫氳繃鎰忚',
- successMessage: '璧勬枡瀹℃牳閫氳繃',
- alertType: 'success',
- },
- archive: {
- title: '褰掓。璁捐浠诲姟',
- alertMessage: '纭褰掓。',
- alertDescription:
- '褰掓。鍚庡皢鐢熸垚鏈増鏈綊妗e彴璐﹁褰曪紝浠诲姟鐘舵�佸彉涓哄凡褰掓。锛岃璁¤祫鏂欏皢閿佸畾涓嶅彲淇敼銆�',
- remarkLabel: '褰掓。璇存槑',
- remarkTag: '銆愬綊妗h鏄庛��',
- remarkPlaceholder: '鍙�夛紝濉啓褰掓。澶囨敞',
- successMessage: '浠诲姟宸插綊妗�',
- alertType: 'warning',
- },
-};
-
-/** 娴佺▼鎿嶄綔纭琛ㄥ崟 */
-export function useWorkflowActionFormSchema(
- action: WorkflowActionType,
-): VbenFormSchema[] {
- const config = WORKFLOW_ACTION_CONFIG[action];
- return [
- {
- fieldName: 'actionRemark',
- label: config.remarkLabel,
- component: 'Textarea',
- componentProps: {
- placeholder: config.remarkPlaceholder,
- rows: 3,
- },
- formItemClass: 'col-span-2',
- },
- ];
-}
-
+/** 缃戞牸鎼滅储琛ㄥ崟 */
export function useGridFormSchema(): VbenFormSchema[] {
return [
{
- fieldName: 'code',
- label: '浠诲姟缂栫爜',
- component: 'Input',
- componentProps: { placeholder: '璇疯緭鍏ヤ换鍔$紪鐮�' },
+ fieldName: "taskCode",
+ label: "浠诲姟缂栫爜",
+ component: "Input",
+ componentProps: { placeholder: "璇疯緭鍏ヤ换鍔$紪鐮�" },
},
{
- fieldName: 'name',
- label: '浠诲姟鍚嶇О',
- component: 'Input',
- componentProps: { placeholder: '璇疯緭鍏ヤ换鍔″悕绉�' },
+ fieldName: "taskName",
+ label: "浠诲姟鍚嶇О",
+ component: "Input",
+ componentProps: { placeholder: "璇疯緭鍏ヤ换鍔″悕绉�" },
},
{
- fieldName: 'productCode',
- label: '浜у搧缂栫爜',
- component: 'Input',
- componentProps: { placeholder: '璇疯緭鍏ヤ骇鍝佺紪鐮�' },
+ fieldName: "productCode",
+ label: "浜у搧缂栫爜",
+ component: "Input",
+ componentProps: { placeholder: "璇疯緭鍏ヤ骇鍝佺紪鐮�" },
},
{
- fieldName: 'status',
- label: '浠诲姟鐘舵��',
- component: 'Select',
+ fieldName: "productName",
+ label: "浜у搧鍚嶇О",
+ component: "Input",
+ componentProps: { placeholder: "璇疯緭鍏ヤ骇鍝佸悕绉�" },
+ },
+ {
+ fieldName: "status",
+ label: "浠诲姟鐘舵��",
+ component: "Select",
componentProps: {
allowClear: true,
- options: getDictOptions(DICT_TYPE.MES_PD_PROJECT_STATUS, 'number'),
- placeholder: '璇烽�夋嫨椤圭洰鐘舵��',
+ options: getDictOptions(DICT_TYPE.MES_PD_PROJECT_STATUS, "number"),
+ placeholder: "璇烽�夋嫨椤圭洰鐘舵��",
},
},
];
}
-export function useGridColumns(): VxeTableGridOptions['columns'] {
+/** 缃戞牸鍒楀畾涔� */
+export function useGridColumns(): VxeTableGridOptions["columns"] {
return [
- { field: 'code', title: '浠诲姟缂栫爜', minWidth: 140, slots: { default: 'code' } },
- { field: 'name', title: '浠诲姟鍚嶇О', minWidth: 160 },
- { field: 'productCode', title: '浜у搧缂栫爜', minWidth: 120 },
- { field: 'productName', title: '浜у搧鍚嶇О', minWidth: 140 },
- { field: 'version', title: '鐗堟湰鍙�', minWidth: 90 },
{
- field: 'status',
- title: '鐘舵��',
+ field: "taskCode",
+ title: "浠诲姟缂栫爜",
+ minWidth: 140,
+ slots: { default: "taskCode" },
+ },
+ { field: "taskName", title: "浠诲姟鍚嶇О", minWidth: 160 },
+ { field: "productCode", title: "浜у搧缂栫爜", minWidth: 120 },
+ { field: "productName", title: "浜у搧鍚嶇О", minWidth: 140 },
+ { field: "version", title: "鐗堟湰鍙�", minWidth: 90 },
+ {
+ field: "status",
+ title: "鐘舵��",
minWidth: 100,
cellRender: {
- name: 'CellDict',
+ name: "CellDict",
props: { type: DICT_TYPE.MES_PD_PROJECT_STATUS },
},
},
- { field: 'designerName', title: '涓昏璁″笀', minWidth: 100 },
- { field: 'reviewerName', title: '瀹℃牳浜�', minWidth: 100 },
- { field: 'planEndDate', title: '璁″垝瀹屾垚', minWidth: 120, formatter: 'formatDate' },
- { field: 'createTime', title: '鍒涘缓鏃堕棿', minWidth: 160, formatter: 'formatDateTime' },
- { field: 'action', title: '鎿嶄綔', width: 220, fixed: 'right', slots: { default: 'actions' } },
+ { field: "chiefDesignerNickname", title: "涓昏璁″笀", minWidth: 100 },
+ { field: "reviewerNickname", title: "瀹℃牳浜�", minWidth: 100 },
+ {
+ field: "planFinishTime",
+ title: "璁″垝瀹屾垚",
+ minWidth: 120,
+ formatter: "formatDate",
+ },
+ {
+ field: "createTime",
+ title: "鍒涘缓鏃堕棿",
+ minWidth: 160,
+ formatter: "formatDateTime",
+ },
+ {
+ field: "action",
+ title: "鎿嶄綔",
+ width: 260,
+ fixed: "right",
+ slots: { default: "actions" },
+ },
];
}
+/** 缂栬緫/璇︽儏琛ㄥ崟 */
export function useFormSchema(
formType: FormType,
- formApi?: VbenFormApi,
+ formApi?: ExtendedFormApi
): VbenFormSchema[] {
- const readonly = formType === 'detail';
+ const readonly = formType === "detail";
return [
{
- fieldName: 'id',
- component: 'Input',
- dependencies: { triggerFields: [''], show: () => false },
+ fieldName: "id",
+ component: "Input",
+ dependencies: { triggerFields: [""], show: () => false },
},
{
- fieldName: 'code',
- label: '浠诲姟缂栫爜',
- component: 'Input',
- componentProps: { disabled: readonly, placeholder: '璇疯緭鍏ヤ换鍔$紪鐮�' },
- rules: 'required',
+ fieldName: "taskCode",
+ label: "浠诲姟缂栫爜",
+ component: "Input",
+ componentProps: { disabled: readonly, placeholder: "璇疯緭鍏ヤ换鍔$紪鐮�" },
+ rules: "required",
suffix:
- formType === 'detail'
+ formType === "detail"
? undefined
: () =>
h(
Button,
{
- type: 'default',
+ type: "default",
onClick: async () => {
- const code = isPdMockEnabled()
- ? mockNextCode(
- 'DT-2026',
- Math.floor(Date.now() % 10_000),
- )
- : await generateAutoCode(
- MesAutoCodeRuleCode.PD_PROJECT_CODE,
- );
- await formApi?.setFieldValue('code', code);
+ const code = await generateAutoCode(
+ MesAutoCodeRuleCode.PD_PROJECT_CODE
+ );
+ await formApi?.setFieldValue("taskCode", code);
},
},
- { default: () => '鐢熸垚' },
+ { default: () => "鐢熸垚" }
),
},
...useProductSelectSchema(formApi, readonly),
{
- fieldName: 'version',
- label: '鐗堟湰鍙�',
- component: 'Input',
- componentProps: { disabled: readonly, placeholder: '濡� V1.0' },
- rules: 'required',
+ fieldName: "version",
+ label: "鐗堟湰鍙�",
+ component: "Input",
+ componentProps: { disabled: readonly, placeholder: "濡� V1.0" },
+ rules: "required",
},
{
- fieldName: 'name',
- label: '浠诲姟鍚嶇О',
- component: 'Input',
- componentProps: { disabled: readonly, placeholder: '濡傦細鏅鸿兘娓╂帶妯$粍 V1.0 璁捐' },
- rules: 'required',
+ fieldName: "taskName",
+ label: "浠诲姟鍚嶇О",
+ component: "Input",
+ componentProps: {
+ disabled: readonly,
+ placeholder: "濡傦細鏅鸿兘娓╂帶妯$粍 V1.0 璁捐",
+ },
+ rules: "required",
dependencies: {
- triggerFields: ['productName', 'version'],
+ triggerFields: ["productName", "version"],
trigger(values: Record<string, string>, form) {
if (readonly) {
return;
@@ -383,152 +342,145 @@
const productName = values.productName?.trim();
const version = values.version?.trim();
if (productName && version) {
- form.setFieldValue('name', `${productName} ${version} 璁捐`);
+ form.setFieldValue("taskName", `${productName} ${version} 璁捐`);
}
},
},
},
{
- fieldName: 'status',
- label: '浠诲姟鐘舵��',
- component: 'Select',
+ fieldName: "status",
+ label: "浠诲姟鐘舵��",
+ component: "Select",
componentProps: {
disabled: true,
- options: getDictOptions(DICT_TYPE.MES_PD_PROJECT_STATUS, 'number'),
+ options: getDictOptions(DICT_TYPE.MES_PD_PROJECT_STATUS, "number"),
},
- dependencies: { triggerFields: [''], show: () => formType !== 'create' },
+ dependencies: { triggerFields: [""], show: () => formType !== "create" },
},
{
- fieldName: 'designerName',
- label: '涓昏璁″笀',
- component: 'Input',
- componentProps: { disabled: readonly, placeholder: '璇疯緭鍏ヤ富璁捐甯�' },
+ fieldName: "chiefDesigner",
+ label: "涓昏璁″笀",
+ component: markRaw(PdUserSelect),
+ componentProps: { disabled: readonly, placeholder: "璇烽�夋嫨涓昏璁″笀" },
},
{
- fieldName: 'reviewerName',
- label: '瀹℃牳浜�',
- component: 'Input',
- componentProps: { disabled: readonly, placeholder: '璇疯緭鍏ュ鏍镐汉' },
+ fieldName: "reviewer",
+ label: "瀹℃牳浜�",
+ component: markRaw(PdUserSelect),
+ componentProps: { disabled: readonly, placeholder: "璇烽�夋嫨瀹℃牳浜�" },
},
{
- fieldName: 'planDateRange',
- label: '璁″垝鍛ㄦ湡',
- component: 'RangePicker',
- componentProps: {
- ...getRangePickerDefaultProps(),
+ fieldName: "planFinishTime",
+ label: "璁″垝瀹屾垚鏃堕棿",
+ component: "DatePicker",
+ componentProps: useModalDatePickerProps({
disabled: readonly,
- },
+ placeholder: "璇烽�夋嫨璁″垝瀹屾垚鏃堕棿",
+ }),
},
{
- fieldName: 'remark',
- label: '澶囨敞',
- component: 'Textarea',
- componentProps: { disabled: readonly, placeholder: '璇疯緭鍏ュ娉�', rows: 3 },
- formItemClass: 'col-span-3',
+ fieldName: "remark",
+ label: "澶囨敞",
+ component: "Textarea",
+ componentProps: {
+ disabled: readonly,
+ placeholder: "璇疯緭鍏ュ娉�",
+ rows: 3,
+ },
+ formItemClass: "col-span-3",
},
];
}
-/** 璁捐璧勬枡绫诲瀷閫夐」锛堜笂浼犳椂閫夋嫨锛� */
+/** 璁捐璧勬枡绫诲瀷閫夐」 */
export function getPdDocumentTypeOptions() {
return [
- { label: '璁捐鏂规', value: MesPdDocumentTypeEnum.SCHEME },
- { label: '璁捐鍥剧焊', value: MesPdDocumentTypeEnum.DRAWING },
- { label: '璁捐妯″瀷', value: MesPdDocumentTypeEnum.MODEL },
- { label: '浜у搧璁捐', value: MesPdDocumentTypeEnum.PRODUCT_DESIGN },
- { label: 'BOM 娓呭崟', value: MesPdDocumentTypeEnum.BOM },
- { label: '鍏朵粬闄勪欢', value: MesPdDocumentTypeEnum.OTHER },
+ { label: "璁捐鏂规", value: MesPdDocumentTypeEnum.SCHEME },
+ { label: "璁捐鍥剧焊", value: MesPdDocumentTypeEnum.DRAWING },
+ { label: "璁捐妯″瀷", value: MesPdDocumentTypeEnum.MODEL },
+ { label: "浜у搧璁捐", value: MesPdDocumentTypeEnum.PRODUCT_DESIGN },
+ { label: "BOM 娓呭崟", value: MesPdDocumentTypeEnum.BOM },
+ { label: "鍏朵粬闄勪欢", value: MesPdDocumentTypeEnum.OTHER },
];
}
-/** 缁熶竴璁捐璧勬枡鍒楄〃鍒� */
+/** 璧勬枡鍒楄〃鎼滅储琛ㄥ崟 */
export function useMaterialListGridFormSchema(): VbenFormSchema[] {
return [
{
- fieldName: 'name',
- label: '璧勬枡鍚嶇О',
- component: 'Input',
- componentProps: { placeholder: '璇疯緭鍏ヨ祫鏂欏悕绉�' },
+ fieldName: "documentName",
+ label: "璧勬枡鍚嶇О",
+ component: "Input",
+ componentProps: { placeholder: "璇疯緭鍏ヨ祫鏂欏悕绉�" },
},
{
- fieldName: 'documentType',
- label: '璧勬枡绫诲瀷',
- component: 'Select',
+ fieldName: "documentType",
+ label: "璧勬枡绫诲瀷",
+ component: "Select",
componentProps: {
allowClear: true,
options: getPdDocumentTypeOptions(),
- placeholder: '璇烽�夋嫨璧勬枡绫诲瀷',
+ placeholder: "璇烽�夋嫨璧勬枡绫诲瀷",
},
},
];
}
-export function useMaterialListGridColumns(): VxeTableGridOptions['columns'] {
+/** 璧勬枡鍒楄〃鍒楀畾涔� */
+export function useMaterialListGridColumns(): VxeTableGridOptions["columns"] {
return [
{
- field: 'documentType',
- title: '璧勬枡绫诲瀷',
+ field: "documentType",
+ title: "璧勬枡绫诲瀷",
minWidth: 110,
- formatter: ({ cellValue }: { cellValue: number }) => {
+ formatter: ({ cellValue }: { cellValue: string }) => {
const option = getPdDocumentTypeOptions().find(
- (item) => item.value === cellValue,
+ (item) => item.value === cellValue
);
- return option?.label ?? String(cellValue ?? '');
+ return option?.label ?? String(cellValue ?? "");
},
},
- { field: 'name', title: '璧勬枡鍚嶇О', minWidth: 180 },
- { field: 'version', title: '鐗堟湰', minWidth: 90 },
- { field: 'fileName', title: '鏂囦欢鍚�', minWidth: 200 },
- { field: 'uploaderName', title: '涓婁紶浜�', minWidth: 100 },
+ { field: "documentName", title: "璧勬枡鍚嶇О", minWidth: 180 },
+ { field: "documentVersion", title: "鐗堟湰", minWidth: 90 },
{
- field: 'createTime',
- title: '涓婁紶鏃堕棿',
+ field: "fileUrl",
+ title: "鏂囦欢",
+ minWidth: 140,
+ slots: { default: "file" },
+ },
+ { field: "fileName", title: "鏂囦欢鍚�", minWidth: 160 },
+ { field: "uploadUserNickname", title: "涓婁紶浜�", minWidth: 100 },
+ {
+ field: "uploadTime",
+ title: "涓婁紶鏃堕棿",
minWidth: 160,
- formatter: 'formatDateTime',
+ formatter: "formatDateTime",
},
{
- field: 'action',
- title: '鎿嶄綔',
+ field: "action",
+ title: "鎿嶄綔",
width: 140,
- fixed: 'right',
- slots: { default: 'actions' },
+ fixed: "right",
+ slots: { default: "actions" },
},
- ];
-}
-
-/** @deprecated 鎸夌被鍨嬪垎 Tab 鏃朵娇鐢紝璇锋敼鐢� useMaterialListGridColumns */
-export function useDocumentGridColumns(documentType: number): VxeTableGridOptions['columns'] {
- const typeLabel =
- documentType === MesPdDocumentTypeEnum.SCHEME
- ? '鏂规'
- : documentType === MesPdDocumentTypeEnum.DRAWING
- ? '鍥剧焊'
- : documentType === MesPdDocumentTypeEnum.MODEL
- ? '妯″瀷'
- : documentType === MesPdDocumentTypeEnum.PRODUCT_DESIGN
- ? '浜у搧璁捐'
- : '璧勬枡';
-
- return [
- { field: 'name', title: `${typeLabel}鍚嶇О`, minWidth: 180 },
- { field: 'version', title: '鐗堟湰', minWidth: 90 },
- { field: 'fileName', title: '鏂囦欢鍚�', minWidth: 200 },
- { field: 'uploaderName', title: '涓婁紶浜�', minWidth: 100 },
- { field: 'createTime', title: '涓婁紶鏃堕棿', minWidth: 160, formatter: 'formatDateTime' },
- { field: 'action', title: '鎿嶄綔', width: 140, slots: { default: 'actions' } },
];
}
/** BOM 琛ㄦ牸鍒� */
-export function useBomGridColumns(): VxeTableGridOptions['columns'] {
+export function useBomGridColumns(): VxeTableGridOptions["columns"] {
return [
- { field: 'itemCode', title: '鐗╂枡缂栫爜', minWidth: 120 },
- { field: 'itemName', title: '鐗╂枡鍚嶇О', minWidth: 160 },
- { field: 'specification', title: '瑙勬牸鍨嬪彿', minWidth: 140 },
- { field: 'unitMeasureName', title: '鍗曚綅', minWidth: 80 },
- { field: 'quantity', title: '鐢ㄩ噺', minWidth: 90 },
- { field: 'remark', title: '澶囨敞', minWidth: 140 },
- { field: 'action', title: '鎿嶄綔', width: 140, slots: { default: 'actions' } },
+ { field: "itemCode", title: "鐗╂枡缂栫爜", minWidth: 120 },
+ { field: "itemName", title: "鐗╂枡鍚嶇О", minWidth: 160 },
+ { field: "specification", title: "瑙勬牸鍨嬪彿", minWidth: 140 },
+ { field: "unitMeasureName", title: "鍗曚綅", minWidth: 80 },
+ { field: "quantity", title: "鐢ㄩ噺", minWidth: 90 },
+ { field: "remark", title: "澶囨敞", minWidth: 140 },
+ {
+ field: "action",
+ title: "鎿嶄綔",
+ width: 140,
+ slots: { default: "actions" },
+ },
];
}
diff --git a/src/views/mes/pd/project/detail/data.ts b/src/views/mes/pd/project/detail/data.ts
index 5ad04da..6215e13 100644
--- a/src/views/mes/pd/project/detail/data.ts
+++ b/src/views/mes/pd/project/detail/data.ts
@@ -10,8 +10,8 @@
/** 璁捐浠诲姟璇︽儏鎽樿 */
export function useDetailSchema(): DescriptionItemSchema[] {
return [
- { field: 'code', label: '浠诲姟缂栫爜' },
- { field: 'name', label: '浠诲姟鍚嶇О' },
+ { field: 'taskCode', label: '浠诲姟缂栫爜' },
+ { field: 'taskName', label: '浠诲姟鍚嶇О' },
{ field: 'productCode', label: '浜у搧缂栫爜' },
{ field: 'productName', label: '浜у搧鍚嶇О' },
{ field: 'version', label: '璁捐鐗堟湰' },
@@ -21,21 +21,16 @@
render: (val) =>
h(DictTag, { type: DICT_TYPE.MES_PD_PROJECT_STATUS, value: val }),
},
- { field: 'designerName', label: '璁捐甯�' },
- { field: 'reviewerName', label: '瀹℃牳浜�' },
+ { field: 'chiefDesignerNickname', label: '涓昏璁″笀' },
+ { field: 'reviewerNickname', label: '瀹℃牳浜�' },
{
- field: 'planStartDate',
- label: '璁″垝寮�濮�',
- render: (val) => (val ? formatDate(val) : '-'),
- },
- {
- field: 'planEndDate',
+ field: 'planFinishTime',
label: '璁″垝瀹屾垚',
render: (val) => (val ? formatDate(val) : '-'),
},
{
field: 'createTime',
- label: '鍙戣捣鏃堕棿',
+ label: '鍒涘缓鏃堕棿',
render: (val) => (val ? formatDateTime(val) : '-'),
},
{ field: 'remark', label: '澶囨敞' },
diff --git a/src/views/mes/pd/project/detail/index.vue b/src/views/mes/pd/project/detail/index.vue
index ea6bf27..be5f1f1 100644
--- a/src/views/mes/pd/project/detail/index.vue
+++ b/src/views/mes/pd/project/detail/index.vue
@@ -9,22 +9,24 @@
import { useTabs } from '#/packages/effects/hooks/src';
import { MesPdProjectStatusEnum } from '#/packages/constants/src';
-import { Card, Tabs } from 'ant-design-vue';
+import { Card, message, Tabs } from 'ant-design-vue';
import {
+ archivePdProject,
+ auditPdProject,
getPdProject,
+ publishPdProject,
+ uploadPdProject,
} from '#/api/mes/pd/project';
import { useDescription } from '#/components/description';
import { ACTION_ICON, TableAction } from '#/adapter/vxe-table';
import { $t } from '#/locales';
import Form from '../modules/form.vue';
-import PublishForm from '../modules/publish-form.vue';
-import WorkflowActionForm from '../modules/workflow-action-form.vue';
-import ReviewList from '../modules/drawing-review/review-list.vue';
-import MaterialPanel from '../modules/material-panel.vue';
-import TaskDraftBanner from '../modules/task-draft-banner.vue';
+import DocumentAuditList from '../modules/document-audit-list.vue';
+import DocumentList from '../modules/document-list.vue';
import WorkflowTimeline from '../modules/workflow-timeline.vue';
+import TaskDraftBanner from '../modules/task-draft-banner.vue';
import { useDetailSchema } from './data';
const route = useRoute();
@@ -35,37 +37,29 @@
const projectId = ref(0);
const project = ref<MesPdProjectApi.Project>({});
const activeTab = ref('workflow');
-const workflowKey = ref(0);
-const isDraft = computed(
- () => project.value.status === MesPdProjectStatusEnum.DRAFT,
+const isPendingPublish = computed(
+ () => project.value.status === MesPdProjectStatusEnum.PENDING_PUBLISH,
);
-const isDesigning = computed(
- () => project.value.status === MesPdProjectStatusEnum.DESIGNING,
+const isPendingUpload = computed(
+ () => project.value.status === MesPdProjectStatusEnum.PENDING_UPLOAD,
);
-const isReviewing = computed(
- () => project.value.status === MesPdProjectStatusEnum.REVIEWING,
+const isPendingAudit = computed(
+ () => project.value.status === MesPdProjectStatusEnum.PENDING_AUDIT,
);
-const isApproved = computed(
- () => project.value.status === MesPdProjectStatusEnum.APPROVED,
+const isPendingArchive = computed(
+ () => project.value.status === MesPdProjectStatusEnum.PENDING_ARCHIVE,
);
const isArchived = computed(
() => project.value.status === MesPdProjectStatusEnum.ARCHIVED,
);
const isFormEditable = computed(
- () =>
- !isArchived.value &&
- project.value.status !== MesPdProjectStatusEnum.CANCELLED &&
- (isDraft.value || isDesigning.value),
+ () => isPendingPublish.value,
);
const materialFormType = computed<FormType>(() =>
- isDesigning.value ? 'update' : 'detail',
-);
-
-const showReviewTab = computed(
- () => isReviewing.value || isApproved.value || isArchived.value,
+ isPendingPublish.value || isPendingUpload.value || isPendingAudit.value ? 'update' : 'detail',
);
const [Descriptions] = useDescription({
@@ -79,25 +73,14 @@
destroyOnClose: true,
});
-const [PublishModal, publishModalApi] = useVbenModal({
- connectedComponent: PublishForm,
- destroyOnClose: true,
-});
-
-const [WorkflowActionModal, workflowActionModalApi] = useVbenModal({
- connectedComponent: WorkflowActionForm,
- destroyOnClose: true,
-});
-
async function loadProjectDetail() {
loading.value = true;
try {
project.value = await getPdProject(projectId.value);
- workflowKey.value += 1;
- if (isDesigning.value) {
+ if (isPendingUpload.value) {
activeTab.value = 'material';
- } else if (isReviewing.value) {
- activeTab.value = 'review';
+ } else if (isPendingAudit.value) {
+ activeTab.value = 'audit';
}
} finally {
loading.value = false;
@@ -113,12 +96,50 @@
formModalApi.setData({ formType: 'update', id: projectId.value }).open();
}
-function handlePublish() {
- publishModalApi.setData({ id: projectId.value }).open();
+async function handlePublish() {
+ const hideLoading = message.loading({ content: '鍙戝竷涓��', duration: 0 });
+ try {
+ await publishPdProject(projectId.value);
+ message.success('浠诲姟宸插彂甯冿紝杩涘叆寰呬笂浼犵姸鎬�');
+ loadProjectDetail();
+ } finally {
+ hideLoading();
+ }
}
-function handleWorkflowAction(action: 'approve' | 'archive' | 'submit-review') {
- workflowActionModalApi.setData({ id: projectId.value, action }).open();
+async function handleUpload() {
+ const hideLoading = message.loading({ content: '鎻愪氦瀹℃牳涓��', duration: 0 });
+ try {
+ await uploadPdProject(projectId.value);
+ message.success('宸叉彁浜よ祫鏂欏鏍�');
+ tabs.closeCurrentTab();
+ router.back();
+ } finally {
+ hideLoading();
+ }
+}
+
+async function handleAudit() {
+ const hideLoading = message.loading({ content: '瀹℃牳涓��', duration: 0 });
+ try {
+ await auditPdProject(projectId.value);
+ message.success('瀹℃牳閫氳繃锛岃繘鍏ュ緟褰掓。鐘舵��');
+ tabs.closeCurrentTab();
+ router.back();
+ } finally {
+ hideLoading();
+ }
+}
+
+async function handleArchive() {
+ const hideLoading = message.loading({ content: '褰掓。涓��', duration: 0 });
+ try {
+ await archivePdProject(projectId.value);
+ message.success('宸插綊妗�');
+ loadProjectDetail();
+ } finally {
+ hideLoading();
+ }
}
onMounted(() => {
@@ -131,11 +152,9 @@
<Page
auto-content-height
:loading="loading"
- :title="project.name || '璁捐浠诲姟璇︽儏'"
+ :title="project.taskName || '璁捐浠诲姟璇︽儏'"
>
<FormModal @success="loadProjectDetail" />
- <PublishModal @success="loadProjectDetail" />
- <WorkflowActionModal @success="loadProjectDetail" />
<template #extra>
<TableAction
@@ -155,40 +174,40 @@
onClick: handleEdit,
},
{
- label: '鍙戝竷浠诲姟',
+ label: '鍙戝竷',
type: 'primary',
auth: ['mes:pd-project:update'],
- ifShow: isDraft,
+ ifShow: isPendingPublish,
onClick: handlePublish,
},
{
- label: '鎻愪氦瀹℃牳',
- type: 'default',
- auth: ['mes:pd-project:submit-review'],
- ifShow: isDesigning,
- onClick: () => handleWorkflowAction('submit-review'),
+ label: '纭涓婁紶',
+ type: 'primary',
+ auth: ['mes:pd-project:update'],
+ ifShow: isPendingUpload,
+ onClick: handleUpload,
},
{
label: '瀹℃牳閫氳繃',
type: 'primary',
- auth: ['mes:pd-drawing-review:review'],
- ifShow: isReviewing,
- onClick: () => handleWorkflowAction('approve'),
+ auth: ['mes:pd-project:audit'],
+ ifShow: isPendingAudit,
+ onClick: handleAudit,
},
{
label: '褰掓。',
type: 'default',
auth: ['mes:pd-project:archive'],
- ifShow: isApproved,
- onClick: () => handleWorkflowAction('archive'),
+ ifShow: isPendingArchive,
+ onClick: handleArchive,
},
]"
/>
</template>
<TaskDraftBanner
- v-if="isDraft"
- :designer-name="project.designerName"
+ v-if="isPendingPublish"
+ :designer-name="project.chiefDesignerNickname"
:product-name="project.productName"
:version="project.version"
@edit="handleEdit"
@@ -202,21 +221,20 @@
<Card class="mt-4 min-h-[60%]">
<Tabs v-model:active-key="activeTab">
<Tabs.TabPane key="workflow" tab="娴佺▼杩涘害" :force-render="true">
- <WorkflowTimeline :key="workflowKey" :project-id="projectId" />
+ <WorkflowTimeline :status="project.status ?? 0" />
</Tabs.TabPane>
- <Tabs.TabPane key="material" tab="璁捐璧勬枡" :force-render="true">
- <p v-if="isDraft" class="mb-3 text-sm text-amber-600">
+ <Tabs.TabPane v-if="!isPendingAudit" key="material" tab="璁捐璧勬枡" :force-render="true">
+ <p v-if="isPendingPublish" class="mb-3 text-sm text-amber-600">
璇峰厛鍙戝竷浠诲姟鍚庡啀涓婁紶璁捐璧勬枡
</p>
- <MaterialPanel :form-type="materialFormType" :project-id="projectId" />
+ <DocumentList
+ :form-type="materialFormType"
+ :project-id="projectId"
+ :project-status="project.status"
+ />
</Tabs.TabPane>
- <Tabs.TabPane
- v-if="showReviewTab"
- key="review"
- tab="璧勬枡瀹℃牳"
- :force-render="true"
- >
- <ReviewList form-type="detail" :project-id="projectId" />
+ <Tabs.TabPane v-if="isPendingAudit" key="audit" tab="璧勬枡瀹℃牳" :force-render="true">
+ <DocumentAuditList :project-id="projectId" @success="loadProjectDetail" />
</Tabs.TabPane>
</Tabs>
</Card>
diff --git a/src/views/mes/pd/project/index.vue b/src/views/mes/pd/project/index.vue
index 1428d31..24516e1 100644
--- a/src/views/mes/pd/project/index.vue
+++ b/src/views/mes/pd/project/index.vue
@@ -2,6 +2,7 @@
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MesPdProjectApi } from '#/api/mes/pd/project';
+import { onActivated } from 'vue';
import { useRouter } from 'vue-router';
import { Page, useVbenModal } from '#/packages/effects/common-ui/src';
@@ -12,17 +13,19 @@
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import {
+ archivePdProject,
+
deletePdProject,
exportPdProject,
getPdProjectPage,
+ publishPdProject,
+
} from '#/api/mes/pd/project';
import { $t } from '#/locales';
import { useGridColumns, useGridFormSchema } from './data';
import CreateForm from './modules/create-form.vue';
import Form from './modules/form.vue';
-import PublishForm from './modules/publish-form.vue';
-import WorkflowActionForm from './modules/workflow-action-form.vue';
const router = useRouter();
@@ -36,23 +39,12 @@
destroyOnClose: true,
});
-const [PublishModal, publishModalApi] = useVbenModal({
- connectedComponent: PublishForm,
- destroyOnClose: true,
-});
-
-const [WorkflowActionModal, workflowActionModalApi] = useVbenModal({
- connectedComponent: WorkflowActionForm,
- destroyOnClose: true,
-});
-
function handleRefresh() {
gridApi.query();
}
-function handleCreateSuccess(projectId: number) {
+function handleCreateSuccess() {
handleRefresh();
- router.push({ name: 'MesPdProjectDetail', params: { id: projectId } });
}
function handleCreate() {
@@ -67,25 +59,42 @@
formModalApi.setData({ formType: 'update', id: row.id }).open();
}
-function handlePublish(row: MesPdProjectApi.Project) {
- publishModalApi.setData({ id: row.id }).open();
+async function handlePublish(row: MesPdProjectApi.Project) {
+ const hideLoading = message.loading({
+ content: '鍙戝竷涓��',
+ duration: 0,
+ });
+ try {
+ await publishPdProject(row.id!);
+ message.success('浠诲姟宸插彂甯冿紝杩涘叆寰呬笂浼犵姸鎬�');
+ handleRefresh();
+ } finally {
+ hideLoading();
+ }
}
-function handleWorkflowAction(
- row: MesPdProjectApi.Project,
- action: 'approve' | 'archive' | 'submit-review',
-) {
- workflowActionModalApi.setData({ id: row.id, action }).open();
+async function handleArchive(row: MesPdProjectApi.Project) {
+ const hideLoading = message.loading({
+ content: '褰掓。涓��',
+ duration: 0,
+ });
+ try {
+ await archivePdProject(row.id!);
+ message.success('宸插綊妗�');
+ handleRefresh();
+ } finally {
+ hideLoading();
+ }
}
async function handleDelete(row: MesPdProjectApi.Project) {
const hideLoading = message.loading({
- content: $t('ui.actionMessage.deleting', [row.name]),
+ content: $t('ui.actionMessage.deleting', [row.taskName]),
duration: 0,
});
try {
await deletePdProject(row.id!);
- message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
+ message.success($t('ui.actionMessage.deleteSuccess', [row.taskName]));
handleRefresh();
} finally {
hideLoading();
@@ -118,21 +127,23 @@
toolbarConfig: { refresh: true, search: true },
} as VxeTableGridOptions<MesPdProjectApi.Project>,
});
+
+onActivated(() => {
+ handleRefresh();
+});
</script>
<template>
<Page auto-content-height>
<CreateFormModal @success="handleCreateSuccess" />
<FormModal @success="handleRefresh" />
- <PublishModal @success="handleRefresh" />
- <WorkflowActionModal @success="handleRefresh" />
<Grid table-title="璁捐浠诲姟">
<template #toolbar-tools>
<TableAction
:actions="[
{
- label: '鍙戣捣璁捐浠诲姟',
+ label: '鍒涘缓璁捐浠诲姟',
type: 'primary',
icon: ACTION_ICON.ADD,
auth: ['mes:pd-project:create'],
@@ -148,49 +159,53 @@
]"
/>
</template>
- <template #code="{ row }">
- <Button type="link" @click="handleDetail(row)">{{ row.code }}</Button>
+ <template #taskCode="{ row }">
+ <Button type="link" @click="handleDetail(row)">{{ row.taskCode }}</Button>
</template>
<template #actions="{ row }">
<TableAction
:actions="[
{
- label: '鍙戝竷浠诲姟',
+ label: '鍙戝竷',
type: 'link',
auth: ['mes:pd-project:update'],
- ifShow: row.status === MesPdProjectStatusEnum.DRAFT,
- onClick: handlePublish.bind(null, row),
+ ifShow: row.status === MesPdProjectStatusEnum.PENDING_PUBLISH,
+ popConfirm: {
+ title: '纭鍙戝竷璇ヤ换鍔★紵鍙戝竷鍚庤繘鍏ュ緟涓婁紶鐘舵�併��',
+ confirm: handlePublish.bind(null, row),
+ },
+ },
+ {
+ label: '涓婁紶璧勬枡',
+ type: 'link',
+ auth: ['mes:pd-project:update'],
+ ifShow: row.status === MesPdProjectStatusEnum.PENDING_UPLOAD,
+ onClick: () => handleDetail(row),
+ },
+ {
+ label: '瀹℃牳',
+ type: 'link',
+ auth: ['mes:pd-project:audit'],
+ ifShow: row.status === MesPdProjectStatusEnum.PENDING_AUDIT,
+ onClick: () => handleDetail(row),
+ },
+ {
+ label: '褰掓。',
+ type: 'link',
+ auth: ['mes:pd-project:archive'],
+ ifShow: row.status === MesPdProjectStatusEnum.PENDING_ARCHIVE,
+ popConfirm: {
+ title: '纭褰掓。锛熷綊妗e悗灏嗙敓鎴愬彴璐﹁褰曪紝浠诲姟涓嶅彲鍐嶄慨鏀广��',
+ confirm: handleArchive.bind(null, row),
+ },
},
{
label: $t('common.edit'),
type: 'link',
icon: ACTION_ICON.EDIT,
auth: ['mes:pd-project:update'],
- ifShow:
- row.status === MesPdProjectStatusEnum.DRAFT ||
- row.status === MesPdProjectStatusEnum.DESIGNING,
+ ifShow: row.status === MesPdProjectStatusEnum.PENDING_PUBLISH,
onClick: handleEdit.bind(null, row),
- },
- {
- label: '鎻愪氦瀹℃牳',
- type: 'link',
- auth: ['mes:pd-project:submit-review'],
- ifShow: row.status === MesPdProjectStatusEnum.DESIGNING,
- onClick: () => handleWorkflowAction(row, 'submit-review'),
- },
- {
- label: '瀹℃牳閫氳繃',
- type: 'link',
- auth: ['mes:pd-drawing-review:review'],
- ifShow: row.status === MesPdProjectStatusEnum.REVIEWING,
- onClick: () => handleWorkflowAction(row, 'approve'),
- },
- {
- label: '褰掓。',
- type: 'link',
- auth: ['mes:pd-project:archive'],
- ifShow: row.status === MesPdProjectStatusEnum.APPROVED,
- onClick: () => handleWorkflowAction(row, 'archive'),
},
{
label: $t('common.delete'),
@@ -198,9 +213,9 @@
danger: true,
icon: ACTION_ICON.DELETE,
auth: ['mes:pd-project:delete'],
- ifShow: row.status === MesPdProjectStatusEnum.DRAFT,
+ ifShow: row.status === MesPdProjectStatusEnum.PENDING_PUBLISH,
popConfirm: {
- title: $t('ui.actionMessage.deleteConfirm', [row.name]),
+ title: $t('ui.actionMessage.deleteConfirm', [row.taskName]),
confirm: handleDelete.bind(null, row),
},
},
diff --git a/src/views/mes/pd/project/modules/create-form.vue b/src/views/mes/pd/project/modules/create-form.vue
index 0663079..71b4d03 100644
--- a/src/views/mes/pd/project/modules/create-form.vue
+++ b/src/views/mes/pd/project/modules/create-form.vue
@@ -9,10 +9,10 @@
import { createPdProject } from '#/api/mes/pd/project';
import { $t } from '#/locales';
-import { useCreateTaskSchema } from '../data';
+import { useCreateFormSchema } from '../data';
const emit = defineEmits<{
- success: [projectId: number];
+ success: [];
}>();
const [Form, formApi] = useVbenForm({
@@ -35,18 +35,16 @@
}
modalApi.lock();
const raw = (await formApi.getValues()) as MesPdProjectApi.Project & {
- planDateRange?: [string, string];
productId?: number;
};
- const { productId: _productId, planDateRange, ...data } = raw;
- if (planDateRange?.length === 2) {
- data.planStartDate = new Date(planDateRange[0]).getTime();
- data.planEndDate = new Date(planDateRange[1]).getTime();
+ const { productId: _productId, ...data } = raw;
+ if (data.planFinishTime) {
+ data.planFinishTime = Number(data.planFinishTime);
}
try {
- const id = await createPdProject(data);
- emit('success', id);
- message.success('璁捐浠诲姟宸插彂璧凤紝璇峰彂甯冧换鍔″悗寮�濮嬩笂浼犺祫鏂�');
+ await createPdProject(data);
+ emit('success');
+ message.success('璁捐浠诲姟宸插垱寤猴紝璇峰彂甯冧换鍔″悗寮�濮嬩笂浼犺祫鏂�');
await modalApi.close();
} finally {
modalApi.unlock();
@@ -57,21 +55,14 @@
await formApi.resetForm();
return;
}
- formApi.setState({ schema: useCreateTaskSchema(formApi) });
- modalApi.setState({ title: '鍙戣捣璁捐浠诲姟' });
+ formApi.setState({ schema: useCreateFormSchema(formApi) });
+ modalApi.setState({ title: '鍒涘缓璁捐浠诲姟' });
},
});
</script>
<template>
<Modal class="w-[720px]">
- <Alert
- class="mx-4 mb-4"
- message="鍙戣捣浠诲姟"
- description="涓烘寚瀹氫骇鍝佺殑鏌愪竴璁捐鐗堟湰鍒涘缓璁捐浠诲姟銆備换鍔′繚瀛樹负鑽夌锛屽彂甯冨悗鏂瑰彲涓婁紶璁捐璧勬枡銆�"
- show-icon
- type="info"
- />
<Form class="mx-4" />
</Modal>
</template>
diff --git a/src/views/mes/pd/project/modules/document-audit-form.vue b/src/views/mes/pd/project/modules/document-audit-form.vue
new file mode 100644
index 0000000..9fa4944
--- /dev/null
+++ b/src/views/mes/pd/project/modules/document-audit-form.vue
@@ -0,0 +1,65 @@
+<script lang="ts" setup>
+import type { MesPdDocumentAuditApi } from '#/api/mes/pd/document-audit';
+
+import { useVbenModal } from '#/packages/effects/common-ui/src';
+import { DICT_TYPE } from '#/packages/constants/src';
+import { getDictOptions } from '#/packages/effects/hooks/src';
+
+import { message } from 'ant-design-vue';
+
+import { useVbenForm } from '#/adapter/form';
+import { updatePdDocumentAudit } from '#/api/mes/pd/document-audit';
+import { $t } from '#/locales';
+
+const emit = defineEmits(['success']);
+
+const [Form, formApi] = useVbenForm({
+ commonConfig: { componentProps: { class: 'w-full' }, labelWidth: 100 },
+ layout: 'horizontal',
+ schema: [
+ { fieldName: 'id', component: 'Input', dependencies: { triggerFields: [''], show: () => false } },
+ { fieldName: 'auditNo', label: '瀹℃牳鍗曞彿', component: 'Input', componentProps: { disabled: true } },
+ { fieldName: 'documentName', label: '璧勬枡鍚嶇О', component: 'Input', componentProps: { disabled: true } },
+ { fieldName: 'documentVersion', label: '璧勬枡鐗堟湰', component: 'Input', componentProps: { disabled: true } },
+ { fieldName: 'reviewerNickname', label: '瀹℃牳浜�', component: 'Input', componentProps: { disabled: true } },
+ {
+ fieldName: 'auditStatus',
+ label: '瀹℃牳缁撴灉',
+ component: 'Select',
+ componentProps: { options: getDictOptions(DICT_TYPE.MES_PD_DOCUMENT_AUDIT_STATUS, 'number'), placeholder: '璇烽�夋嫨瀹℃牳缁撴灉' },
+ rules: 'selectRequired',
+ },
+ { fieldName: 'remark', label: '瀹℃牳鎰忚', component: 'Textarea', componentProps: { placeholder: '璇疯緭鍏ュ鏍告剰瑙�', rows: 3 } },
+ ],
+ showDefaultActions: false,
+});
+
+const [Modal, modalApi] = useVbenModal({
+ async onConfirm() {
+ const { valid } = await formApi.validate();
+ if (!valid) return;
+ modalApi.lock();
+ try {
+ const raw = await formApi.getValues();
+ await updatePdDocumentAudit({ id: raw.id, auditStatus: raw.auditStatus, remark: raw.remark, auditTime: Date.now() });
+ emit('success');
+ message.success($t('ui.actionMessage.operationSuccess'));
+ await modalApi.close();
+ } finally {
+ modalApi.unlock();
+ }
+ },
+ async onOpenChange(isOpen: boolean) {
+ if (!isOpen) return;
+ const data = modalApi.getData<MesPdDocumentAuditApi.DocumentAudit>();
+ modalApi.setState({ title: '璧勬枡瀹℃牳' });
+ await formApi.setValues(data);
+ },
+});
+</script>
+
+<template>
+ <Modal class="w-[520px]">
+ <Form class="mx-4" />
+ </Modal>
+</template>
diff --git a/src/views/mes/pd/project/modules/document-audit-list.vue b/src/views/mes/pd/project/modules/document-audit-list.vue
new file mode 100644
index 0000000..9b29cac
--- /dev/null
+++ b/src/views/mes/pd/project/modules/document-audit-list.vue
@@ -0,0 +1,94 @@
+<script lang="ts" setup>
+import type { VxeTableGridOptions } from '#/adapter/vxe-table';
+import type { MesPdDocumentAuditApi } from '#/api/mes/pd/document-audit';
+
+import { useVbenModal } from '#/packages/effects/common-ui/src';
+import { DICT_TYPE } from '#/packages/constants/src';
+import { getDictOptions } from '#/packages/effects/hooks/src';
+
+import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
+import { getPdDocumentAuditPage } from '#/api/mes/pd/document-audit';
+
+import AuditForm from './document-audit-form.vue';
+
+const props = defineProps<{
+ projectId: number;
+}>();
+
+const emit = defineEmits(['success']);
+
+const [AuditFormModal, auditFormModalApi] = useVbenModal({
+ connectedComponent: AuditForm,
+ destroyOnClose: true,
+});
+
+function handleRefresh() {
+ gridApi.query();
+ emit('success');
+}
+
+function handleAudit(row: MesPdDocumentAuditApi.DocumentAudit) {
+ auditFormModalApi.setData(row).open();
+}
+
+const [Grid, gridApi] = useVbenVxeGrid({
+ formOptions: {
+ schema: [
+ { fieldName: 'auditNo', label: '瀹℃牳鍗曞彿', component: 'Input', componentProps: { placeholder: '璇疯緭鍏ュ鏍稿崟鍙�' } },
+ { fieldName: 'documentName', label: '璧勬枡鍚嶇О', component: 'Input', componentProps: { placeholder: '璇疯緭鍏ヨ祫鏂欏悕绉�' } },
+ {
+ fieldName: 'auditStatus',
+ label: '瀹℃牳鐘舵��',
+ component: 'Select',
+ componentProps: { allowClear: true, options: getDictOptions(DICT_TYPE.MES_PD_DOCUMENT_AUDIT_STATUS, 'number'), placeholder: '璇烽�夋嫨瀹℃牳鐘舵��' },
+ },
+ ],
+ },
+ gridOptions: {
+ columns: [
+ { field: 'auditNo', title: '瀹℃牳鍗曞彿', minWidth: 140 },
+ { field: 'documentName', title: '璧勬枡鍚嶇О', minWidth: 160 },
+ { field: 'documentVersion', title: '璧勬枡鐗堟湰', minWidth: 90 },
+ { field: 'reviewerNickname', title: '瀹℃牳浜�', minWidth: 100 },
+ { field: 'auditStatus', title: '瀹℃牳鐘舵��', minWidth: 100, cellRender: { name: 'CellDict', props: { type: DICT_TYPE.MES_PD_DOCUMENT_AUDIT_STATUS } } },
+ { field: 'auditTime', title: '瀹℃牳鏃堕棿', minWidth: 160, formatter: 'formatDateTime' },
+ { field: 'createTime', title: '鍒涘缓鏃堕棿', minWidth: 160, formatter: 'formatDateTime' },
+ { field: 'action', title: '鎿嶄綔', width: 100, fixed: 'right', slots: { default: 'actions' } },
+ ],
+ height: 400,
+ keepSource: true,
+ proxyConfig: {
+ ajax: {
+ query: async ({ page }, formValues) => {
+ return await getPdDocumentAuditPage({
+ pageNo: page.currentPage,
+ pageSize: page.pageSize,
+ ...formValues,
+ });
+ },
+ },
+ },
+ rowConfig: { keyField: 'id', isHover: true },
+ toolbarConfig: { refresh: true, search: true },
+ } as VxeTableGridOptions<MesPdDocumentAuditApi.DocumentAudit>,
+});
+</script>
+
+<template>
+ <AuditFormModal @success="handleRefresh" />
+ <Grid table-title="璧勬枡瀹℃牳">
+ <template #actions="{ row }">
+ <TableAction
+ :actions="[
+ {
+ label: '瀹℃牳',
+ type: 'link',
+ icon: ACTION_ICON.EDIT,
+ auth: ['mes:pd-document-audit:update'],
+ onClick: handleAudit.bind(null, row),
+ },
+ ]"
+ />
+ </template>
+ </Grid>
+</template>
diff --git a/src/views/mes/pd/project/modules/document-form.vue b/src/views/mes/pd/project/modules/document-form.vue
index 9d015cf..b08d6fa 100644
--- a/src/views/mes/pd/project/modules/document-form.vue
+++ b/src/views/mes/pd/project/modules/document-form.vue
@@ -1,7 +1,7 @@
<script lang="ts" setup>
import type { MesPdDocumentApi } from '#/api/mes/pd/document';
-import { ref } from 'vue';
+import { markRaw, ref } from 'vue';
import { useVbenModal } from '#/packages/effects/common-ui/src';
import { MesPdDocumentTypeEnum } from '#/packages/constants/src';
@@ -14,6 +14,7 @@
getPdDocument,
updatePdDocument,
} from '#/api/mes/pd/document';
+import { FileUpload } from '#/components/upload';
import { $t } from '#/locales';
import { getPdDocumentTypeOptions } from '../data';
@@ -25,9 +26,11 @@
const [Form, formApi] = useVbenForm({
commonConfig: {
componentProps: { class: 'w-full' },
+ formItemClass: 'col-span-1',
labelWidth: 100,
},
layout: 'horizontal',
+ wrapperClass: 'grid-cols-1',
schema: [
{
fieldName: 'id',
@@ -50,14 +53,14 @@
rules: 'selectRequired',
},
{
- fieldName: 'name',
+ fieldName: 'documentName',
label: '璧勬枡鍚嶇О',
component: 'Input',
componentProps: { placeholder: '璇疯緭鍏ヨ祫鏂欏悕绉�' },
rules: 'required',
},
{
- fieldName: 'version',
+ fieldName: 'documentVersion',
label: '鐗堟湰鍙�',
component: 'Input',
componentProps: { placeholder: '濡� V1.0' },
@@ -65,21 +68,23 @@
},
{
fieldName: 'fileUrl',
- label: '鏂囦欢鍦板潃',
- component: 'Input',
- componentProps: { placeholder: '璇疯緭鍏ユ枃浠� URL 鎴栦笂浼犲悗濉叆' },
+ label: '鏂囦欢',
+ component: markRaw(FileUpload),
+ componentProps: {
+ directory: 'mes/pd',
+ maxNumber: 1,
+ onChange: async (url: string) => {
+ if (url) {
+ await formApi?.setFieldValue('fileUrl', url);
+ }
+ },
+ },
},
{
fieldName: 'fileName',
label: '鏂囦欢鍚�',
component: 'Input',
- componentProps: { placeholder: '濡� bom-list.xlsx' },
- },
- {
- fieldName: 'remark',
- label: '澶囨敞',
- component: 'Textarea',
- componentProps: { placeholder: '璇疯緭鍏ュ娉�', rows: 3 },
+ componentProps: { placeholder: '涓婁紶鍚庤嚜鍔ㄥ~鍏ワ紝涔熷彲鎵嬪姩杈撳叆' },
},
],
showDefaultActions: false,
@@ -113,10 +118,10 @@
const data = modalApi.getData<{
id?: number;
projectId: number;
- documentType?: number;
+ documentType?: string;
}>();
isUpdate.value = !!data.id;
- modalApi.setState({ title: isUpdate.value ? '缂栬緫闄勪欢' : '涓婁紶闄勪欢' });
+ modalApi.setState({ title: isUpdate.value ? '缂栬緫璧勬枡' : '涓婁紶璧勬枡' });
if (data.id) {
modalApi.lock();
try {
@@ -136,7 +141,7 @@
</script>
<template>
- <Modal class="w-[560px]">
+ <Modal class="w-[720px]">
<Form class="mx-4" />
</Modal>
</template>
diff --git a/src/views/mes/pd/project/modules/document-list.vue b/src/views/mes/pd/project/modules/document-list.vue
index cfb129f..71c10d8 100644
--- a/src/views/mes/pd/project/modules/document-list.vue
+++ b/src/views/mes/pd/project/modules/document-list.vue
@@ -7,7 +7,7 @@
import { computed, watch } from 'vue';
import { useVbenModal } from '#/packages/effects/common-ui/src';
-import { MesPdDocumentTypeEnum } from '#/packages/constants/src';
+import { MesPdDocumentTypeEnum, MesPdProjectStatusEnum } from '#/packages/constants/src';
import { message } from 'ant-design-vue';
@@ -29,6 +29,7 @@
formType: FormType;
gridHeight?: number | string;
projectId: number;
+ projectStatus?: number;
tableTitle?: string;
version?: string;
}>(),
@@ -38,8 +39,11 @@
},
);
-const isEditable = computed(() =>
- ['create', 'update'].includes(props.formType),
+/** 鏄惁鍏佽鏂板/缂栬緫/鍒犻櫎璧勬枡 */
+const canEdit = computed(() =>
+ props.projectStatus === undefined ||
+ props.projectStatus === MesPdProjectStatusEnum.PENDING_PUBLISH ||
+ props.projectStatus === MesPdProjectStatusEnum.PENDING_UPLOAD,
);
const [DocumentFormModal, documentFormModalApi] = useVbenModal({
@@ -66,21 +70,15 @@
async function handleDelete(row: MesPdDocumentApi.Document) {
const hideLoading = message.loading({
- content: $t('ui.actionMessage.deleting', [row.name]),
+ content: $t('ui.actionMessage.deleting', [row.documentName]),
duration: 0,
});
try {
await deletePdDocument(row.id!);
- message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
+ message.success($t('ui.actionMessage.deleteSuccess', [row.documentName]));
handleRefresh();
} finally {
hideLoading();
- }
-}
-
-function handlePreview(row: MesPdDocumentApi.Document) {
- if (row.fileUrl) {
- window.open(row.fileUrl, '_blank');
}
}
@@ -97,7 +95,7 @@
pageNo: page.currentPage,
pageSize: page.pageSize,
projectId: props.projectId,
- version: props.version,
+ documentVersion: props.version,
...formValues,
});
},
@@ -119,11 +117,11 @@
<template>
<DocumentFormModal @success="handleRefresh" />
<Grid :table-title="tableTitle">
- <template v-if="isEditable" #toolbar-tools>
+ <template v-if="canEdit" #toolbar-tools>
<TableAction
:actions="[
{
- label: '涓婁紶闄勪欢',
+ label: '涓婁紶璧勬枡',
type: 'primary',
icon: ACTION_ICON.ADD,
onClick: handleCreate,
@@ -131,20 +129,20 @@
]"
/>
</template>
+ <template #file="{ row }">
+ <a v-if="row.fileUrl" :href="row.fileUrl" target="_blank" class="text-primary">
+ {{ row.fileName || '鏌ョ湅鏂囦欢' }}
+ </a>
+ <span v-else class="text-gray-400">-</span>
+ </template>
<template #actions="{ row }">
<TableAction
:actions="[
{
- label: '棰勮',
- type: 'link',
- ifShow: !!row.fileUrl,
- onClick: handlePreview.bind(null, row),
- },
- {
label: $t('common.edit'),
type: 'link',
icon: ACTION_ICON.EDIT,
- ifShow: isEditable,
+ ifShow: canEdit,
onClick: handleEdit.bind(null, row),
},
{
@@ -152,9 +150,9 @@
type: 'link',
danger: true,
icon: ACTION_ICON.DELETE,
- ifShow: isEditable,
+ ifShow: canEdit,
popConfirm: {
- title: $t('ui.actionMessage.deleteConfirm', [row.name]),
+ title: $t('ui.actionMessage.deleteConfirm', [row.documentName]),
confirm: handleDelete.bind(null, row),
},
},
diff --git a/src/views/mes/pd/project/modules/form.vue b/src/views/mes/pd/project/modules/form.vue
index 375f096..18f65c7 100644
--- a/src/views/mes/pd/project/modules/form.vue
+++ b/src/views/mes/pd/project/modules/form.vue
@@ -51,13 +51,11 @@
}
modalApi.lock();
const raw = (await formApi.getValues()) as MesPdProjectApi.Project & {
- planDateRange?: [string, string];
productId?: number;
};
- const { productId: _productId, planDateRange, ...data } = raw;
- if (planDateRange?.length === 2) {
- data.planStartDate = new Date(planDateRange[0]).getTime();
- data.planEndDate = new Date(planDateRange[1]).getTime();
+ const { productId: _productId, ...data } = raw;
+ if (data.planFinishTime) {
+ data.planFinishTime = Number(data.planFinishTime);
}
try {
await updatePdProject(data);
@@ -85,12 +83,10 @@
modalApi.lock();
try {
formData.value = await getPdProject(data.id);
+ const { planFinishTime, ...rest } = formData.value;
await formApi.setValues({
- ...formData.value,
- planDateRange:
- formData.value.planStartDate && formData.value.planEndDate
- ? [formData.value.planStartDate, formData.value.planEndDate]
- : undefined,
+ ...rest,
+ planFinishTime: planFinishTime ? String(planFinishTime) : undefined,
});
} finally {
modalApi.unlock();
diff --git a/src/views/mes/pd/project/modules/publish-form.vue b/src/views/mes/pd/project/modules/publish-form.vue
deleted file mode 100644
index dd9ad6f..0000000
--- a/src/views/mes/pd/project/modules/publish-form.vue
+++ /dev/null
@@ -1,103 +0,0 @@
-<script lang="ts" setup>
-import type { MesPdProjectApi } from '#/api/mes/pd/project';
-
-import { ref } from 'vue';
-
-import { useVbenModal } from '#/packages/effects/common-ui/src';
-import { formatDate } from '#/packages/utils/src';
-
-import { Alert, Descriptions, message } from 'ant-design-vue';
-
-import { useVbenForm } from '#/adapter/form';
-import {
- getPdProject,
- publishPdProject,
- updatePdProject,
-} from '#/api/mes/pd/project';
-
-import { usePublishFormSchema } from '../data';
-
-const emit = defineEmits(['success']);
-
-const project = ref<MesPdProjectApi.Project>();
-
-const [Form, formApi] = useVbenForm({
- commonConfig: {
- componentProps: { class: 'w-full' },
- labelWidth: 100,
- },
- layout: 'horizontal',
- schema: usePublishFormSchema(),
- showDefaultActions: false,
-});
-
-const [Modal, modalApi] = useVbenModal({
- async onConfirm() {
- if (!project.value?.id) {
- return;
- }
- modalApi.lock();
- try {
- const { publishRemark } = await formApi.getValues();
- if (publishRemark) {
- const mergedRemark = [project.value.remark, `銆愬彂甯冭鏄庛��${publishRemark}`]
- .filter(Boolean)
- .join('\n');
- await updatePdProject({ ...project.value, remark: mergedRemark });
- }
- await publishPdProject(project.value.id);
- emit('success');
- message.success('浠诲姟宸插彂甯冿紝璇蜂笂浼犺璁¤祫鏂�');
- await modalApi.close();
- } finally {
- modalApi.unlock();
- }
- },
- async onOpenChange(isOpen: boolean) {
- if (!isOpen) {
- project.value = undefined;
- await formApi.resetForm();
- return;
- }
- const data = modalApi.getData<{ id: number }>();
- modalApi.setState({ title: '鍙戝竷璁捐浠诲姟' });
- modalApi.lock();
- try {
- project.value = await getPdProject(data.id);
- } finally {
- modalApi.unlock();
- }
- },
-});
-</script>
-
-<template>
- <Modal class="w-[640px]">
- <Alert
- class="mx-4 mb-4"
- message="纭鍙戝竷"
- description="鍙戝竷鍚庝换鍔¤繘鍏ャ�岃璁′腑銆嶇姸鎬侊紝璁捐甯堝彲涓婁紶璁捐璧勬枡銆傚彂甯冨墠璇风‘璁や骇鍝併�佺増鏈強浜哄憳瀹夋帓鏃犺銆�"
- show-icon
- type="warning"
- />
- <Descriptions
- v-if="project"
- bordered
- class="mx-4 mb-4"
- :column="2"
- size="small"
- >
- <Descriptions.Item label="浠诲姟缂栫爜">{{ project.code }}</Descriptions.Item>
- <Descriptions.Item label="浠诲姟鍚嶇О">{{ project.name }}</Descriptions.Item>
- <Descriptions.Item label="浜у搧缂栫爜">{{ project.productCode }}</Descriptions.Item>
- <Descriptions.Item label="浜у搧鍚嶇О">{{ project.productName }}</Descriptions.Item>
- <Descriptions.Item label="璁捐鐗堟湰">{{ project.version }}</Descriptions.Item>
- <Descriptions.Item label="涓昏璁″笀">{{ project.designerName || '-' }}</Descriptions.Item>
- <Descriptions.Item label="瀹℃牳浜�">{{ project.reviewerName || '-' }}</Descriptions.Item>
- <Descriptions.Item label="璁″垝瀹屾垚">
- {{ project.planEndDate ? formatDate(project.planEndDate) : '-' }}
- </Descriptions.Item>
- </Descriptions>
- <Form class="mx-4" />
- </Modal>
-</template>
diff --git a/src/views/mes/pd/project/modules/task-draft-banner.vue b/src/views/mes/pd/project/modules/task-draft-banner.vue
index c812428..86eca63 100644
--- a/src/views/mes/pd/project/modules/task-draft-banner.vue
+++ b/src/views/mes/pd/project/modules/task-draft-banner.vue
@@ -18,7 +18,7 @@
class="mb-4 flex items-center justify-between rounded-lg border border-amber-200 bg-amber-50 px-4 py-3"
>
<div class="text-sm text-amber-900">
- <span class="font-medium">浠诲姟宸插彂璧凤紙鑽夌锛�</span>
+ <span class="font-medium">浠诲姟寰呭彂甯�</span>
<span class="ml-2 text-amber-700">
{{ productName }} {{ version }} 路 璁捐甯� {{ designerName || '鏈寚瀹�' }}
</span>
diff --git a/src/views/mes/pd/project/modules/user-select.vue b/src/views/mes/pd/project/modules/user-select.vue
new file mode 100644
index 0000000..1e5af40
--- /dev/null
+++ b/src/views/mes/pd/project/modules/user-select.vue
@@ -0,0 +1,61 @@
+<script lang="ts" setup>
+import type { SystemUserApi } from '#/api/system/user';
+
+import { onMounted, ref, watch } from 'vue';
+
+import { Select } from 'ant-design-vue';
+
+import { getSimpleUserList } from '#/api/system/user';
+
+defineOptions({ name: 'PdUserSelect', inheritAttrs: false });
+
+const props = withDefaults(
+ defineProps<{
+ disabled?: boolean;
+ modelValue?: number;
+ placeholder?: string;
+ }>(),
+ {
+ disabled: false,
+ modelValue: undefined,
+ placeholder: '璇烽�夋嫨',
+ },
+);
+
+const emit = defineEmits<{
+ 'update:modelValue': [value: number | undefined];
+}>();
+
+const options = ref<{ label: string; value: number }[]>([]);
+
+onMounted(async () => {
+ const users = await getSimpleUserList();
+ options.value = users
+ .filter((u): u is SystemUserApi.User & { id: number } => u.id !== undefined)
+ .map((u) => ({ label: u.nickname || u.username, value: u.id }));
+});
+
+watch(
+ () => props.modelValue,
+ (val) => {
+ emit('update:modelValue', val);
+ },
+);
+</script>
+
+<template>
+ <Select
+ v-bind="$attrs"
+ :disabled="disabled"
+ :options="options"
+ :placeholder="placeholder"
+ :value="modelValue"
+ allow-clear
+ show-search
+ :filter-option="
+ (input: string, option: any) =>
+ option?.label?.toLowerCase().includes(input.toLowerCase())
+ "
+ @change="(val: number) => emit('update:modelValue', val)"
+ />
+</template>
diff --git a/src/views/mes/pd/project/modules/version-change/data.ts b/src/views/mes/pd/project/modules/version-change/data.ts
index e4756cc..9de9e96 100644
--- a/src/views/mes/pd/project/modules/version-change/data.ts
+++ b/src/views/mes/pd/project/modules/version-change/data.ts
@@ -9,8 +9,6 @@
import { Button } from 'ant-design-vue';
import { generateAutoCode } from '#/api/mes/md/autocode/record';
-import { isPdMockEnabled } from '#/api/mes/pd/mock/enabled';
-import { mockNextCode } from '#/api/mes/pd/mock/utils';
export type VersionChangeFormType = 'create' | 'detail' | 'update';
@@ -104,14 +102,9 @@
{
type: 'default',
onClick: async () => {
- const code = isPdMockEnabled()
- ? mockNextCode(
- 'VC-2026',
- Math.floor(Date.now() % 10_000),
- )
- : await generateAutoCode(
- MesAutoCodeRuleCode.PD_VERSION_CODE,
- );
+ const code = await generateAutoCode(
+ MesAutoCodeRuleCode.PD_VERSION_CODE,
+ );
await formApi?.setFieldValue('code', code);
},
},
diff --git a/src/views/mes/pd/project/modules/workflow-action-form.vue b/src/views/mes/pd/project/modules/workflow-action-form.vue
deleted file mode 100644
index 1a62efa..0000000
--- a/src/views/mes/pd/project/modules/workflow-action-form.vue
+++ /dev/null
@@ -1,126 +0,0 @@
-<script lang="ts" setup>
-import type { WorkflowActionType } from '../data';
-import type { MesPdProjectApi } from '#/api/mes/pd/project';
-
-import { computed, ref } from 'vue';
-
-import { useVbenModal } from '#/packages/effects/common-ui/src';
-import { formatDate } from '#/packages/utils/src';
-
-import { Alert, Descriptions, message } from 'ant-design-vue';
-
-import { useVbenForm } from '#/adapter/form';
-import {
- approvePdProject,
- archivePdProject,
- getPdProject,
- submitPdProjectReview,
- updatePdProject,
-} from '#/api/mes/pd/project';
-
-import { useWorkflowActionFormSchema, WORKFLOW_ACTION_CONFIG } from '../data';
-
-const emit = defineEmits(['success']);
-
-const project = ref<MesPdProjectApi.Project>();
-const actionType = ref<WorkflowActionType>('submit-review');
-
-const actionConfig = computed(() => WORKFLOW_ACTION_CONFIG[actionType.value]);
-
-const [Form, formApi] = useVbenForm({
- commonConfig: {
- componentProps: { class: 'w-full' },
- labelWidth: 100,
- },
- layout: 'horizontal',
- schema: [],
- showDefaultActions: false,
-});
-
-const [Modal, modalApi] = useVbenModal({
- async onConfirm() {
- if (!project.value?.id) {
- return;
- }
- modalApi.lock();
- try {
- const { actionRemark } = await formApi.getValues();
- const config = actionConfig.value;
- if (actionRemark) {
- const mergedRemark = [project.value.remark, `${config.remarkTag}${actionRemark}`]
- .filter(Boolean)
- .join('\n');
- await updatePdProject({ ...project.value, remark: mergedRemark });
- }
- const projectId = project.value.id;
- switch (actionType.value) {
- case 'approve': {
- await approvePdProject(projectId);
- break;
- }
- case 'archive': {
- await archivePdProject(projectId);
- break;
- }
- case 'submit-review': {
- await submitPdProjectReview(projectId);
- break;
- }
- }
- emit('success');
- message.success(config.successMessage);
- await modalApi.close();
- } finally {
- modalApi.unlock();
- }
- },
- async onOpenChange(isOpen: boolean) {
- if (!isOpen) {
- project.value = undefined;
- await formApi.resetForm();
- return;
- }
- const data = modalApi.getData<{ action: WorkflowActionType; id: number }>();
- actionType.value = data.action;
- formApi.setState({ schema: useWorkflowActionFormSchema(data.action) });
- modalApi.setState({ title: WORKFLOW_ACTION_CONFIG[data.action].title });
- modalApi.lock();
- try {
- project.value = await getPdProject(data.id);
- } finally {
- modalApi.unlock();
- }
- },
-});
-</script>
-
-<template>
- <Modal class="w-[640px]">
- <Alert
- class="mx-4 mb-4"
- :message="actionConfig.alertMessage"
- :description="actionConfig.alertDescription"
- show-icon
- :type="actionConfig.alertType"
- />
- <Descriptions
- v-if="project"
- bordered
- class="mx-4 mb-4"
- :column="2"
- size="small"
- >
- <Descriptions.Item label="浠诲姟缂栫爜">{{ project.code }}</Descriptions.Item>
- <Descriptions.Item label="浠诲姟鍚嶇О">{{ project.name }}</Descriptions.Item>
- <Descriptions.Item label="浜у搧缂栫爜">{{ project.productCode }}</Descriptions.Item>
- <Descriptions.Item label="浜у搧鍚嶇О">{{ project.productName }}</Descriptions.Item>
- <Descriptions.Item label="璁捐鐗堟湰">{{ project.version }}</Descriptions.Item>
- <Descriptions.Item label="涓昏璁″笀">{{ project.designerName || '-' }}</Descriptions.Item>
- <Descriptions.Item label="瀹℃牳浜�">{{ project.reviewerName || '-' }}</Descriptions.Item>
- <Descriptions.Item label="璁″垝瀹屾垚">
- {{ project.planEndDate ? formatDate(project.planEndDate) : '-' }}
- </Descriptions.Item>
- </Descriptions>
- <Form class="mx-4" />
- </Modal>
-</template>
diff --git a/src/views/mes/pd/project/modules/workflow-timeline.vue b/src/views/mes/pd/project/modules/workflow-timeline.vue
index 58a6d8a..6989422 100644
--- a/src/views/mes/pd/project/modules/workflow-timeline.vue
+++ b/src/views/mes/pd/project/modules/workflow-timeline.vue
@@ -1,53 +1,35 @@
<script lang="ts" setup>
-import type { MesPdWorkflowApi } from '#/api/mes/pd/workflow';
-
-import { onMounted, ref, watch } from 'vue';
+import { computed } from 'vue';
import { Steps } from 'ant-design-vue';
-import { getPdWorkflowList } from '#/api/mes/pd/workflow';
+const STEPS = ['寰呭彂甯�', '寰呬笂浼�', '寰呭鏍�', '寰呭綊妗�', '宸插綊妗�'] as const;
const props = defineProps<{
- projectId: number;
+ /** 椤圭洰褰撳墠鐘舵�� (0-4) */
+ status: number;
}>();
-const loading = ref(false);
-const nodes = ref<MesPdWorkflowApi.WorkflowNode[]>([]);
-const current = ref(0);
+const current = computed(() => {
+ // 鐘舵�佸�煎嵆褰撳墠宸插畬鎴愬埌绗嚑姝ワ細0=绗竴姝ヨ繘琛屼腑锛�4=鍏ㄩ儴瀹屾垚
+ return props.status;
+});
-async function loadData() {
- loading.value = true;
- try {
- nodes.value = await getPdWorkflowList(props.projectId);
- const activeIndex = nodes.value.findIndex((item) => item.status !== 1);
- current.value = activeIndex === -1 ? nodes.value.length : activeIndex;
- } finally {
- loading.value = false;
- }
-}
-
-watch(
- () => props.projectId,
- () => loadData(),
- { immediate: true },
+const nodes = computed(() =>
+ STEPS.map((name, index) => ({
+ title: name,
+ status: index < props.status ? 'finish' : index === props.status ? 'process' : 'wait',
+ })),
);
-
-onMounted(loadData);
</script>
<template>
<Steps :current="current" direction="vertical" size="small">
<Steps.Step
- v-for="node in nodes"
- :key="node.id"
- :description="node.remark"
- :sub-title="node.operatorName"
- :title="node.nodeName"
- />
- <Steps.Step
- v-if="!loading && nodes.length === 0"
- description="鏆傛棤娴佺▼璁板綍锛屼繚瀛橀」鐩悗灏嗚嚜鍔ㄧ敓鎴�"
- title="寰呭惎鍔�"
+ v-for="(node, index) in nodes"
+ :key="index"
+ :status="node.status as any"
+ :title="node.title"
/>
</Steps>
</template>
diff --git a/src/views/mes/pro/andon/record/data.ts b/src/views/mes/pro/andon/record/data.ts
index b390630..4635dc8 100644
--- a/src/views/mes/pro/andon/record/data.ts
+++ b/src/views/mes/pro/andon/record/data.ts
@@ -1,4 +1,4 @@
-import type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
+锘縤mport type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MesProAndonConfigApi } from '#/api/mes/pro/andon/config';
import type { MesProAndonRecordApi } from '#/api/mes/pro/andon/record';
@@ -82,7 +82,7 @@
return [
{ field: 'workstationCode', title: '宸ヤ綔绔欑紪鐮�', width: 140 },
{ field: 'workstationName', title: '宸ヤ綔绔欏悕绉�', minWidth: 140 },
- { field: 'workOrderCode', title: '宸ュ崟缂栫爜', width: 140 },
+ { field: 'workOrderCode', title: '璁㈠崟缂栫爜', width: 140 },
{ field: 'processName', title: '宸ュ簭鍚嶇О', width: 140 },
{ field: 'userNickname', title: '鍙戣捣浜�', width: 110 },
{
@@ -129,7 +129,7 @@
/**
* 鏂板/澶勭疆/璇︽儏瀹夌伅鍛煎彨璁板綍鐨勮〃鍗�
*
- * - create锛氬綍鍏ュ懠鍙富浣撲俊鎭紙宸ヤ綔绔�/鍙戣捣浜�/宸ュ崟/宸ュ簭/鍛煎彨鍘熷洜/澶囨敞锛�
+ * - create锛氬綍鍏ュ懠鍙富浣撲俊鎭紙宸ヤ綔绔�/鍙戣捣浜�/璁㈠崟/宸ュ簭/鍛煎彨鍘熷洜/澶囨敞锛�
* - update锛氬懠鍙富浣撳彧璇诲睍绀哄垱寤烘椂鐨勫揩鐓у瓧娈碉紙workstationName/workOrderCode/processName/reason锛夛紝缂栬緫澶勭疆鏃堕棿/澶勭疆浜�/澶囨敞
* - detail锛氭墍鏈夊瓧娈靛彧璇�
*/
@@ -187,16 +187,16 @@
isCreate
? {
fieldName: 'workOrderId',
- label: '鐢熶骇宸ュ崟',
+ label: '鐢熶骇璁㈠崟',
component: markRaw(ProWorkOrderSelect),
componentProps: {
- placeholder: '璇烽�夋嫨宸ュ崟锛堝彲閫夛級',
+ placeholder: '璇烽�夋嫨璁㈠崟锛堝彲閫夛級',
status: MesProWorkOrderStatusEnum.CONFIRMED,
},
}
: {
fieldName: 'workOrderCode',
- label: '鐢熶骇宸ュ崟',
+ label: '鐢熶骇璁㈠崟',
component: 'Input',
componentProps: {
disabled: true,
diff --git a/src/views/mes/pro/card/components/select.vue b/src/views/mes/pro/card/components/select.vue
index 7e322dd..f3c3754 100644
--- a/src/views/mes/pro/card/components/select.vue
+++ b/src/views/mes/pro/card/components/select.vue
@@ -1,4 +1,4 @@
-<script lang="ts" setup>
+锘�<script lang="ts" setup>
import type { MesProCardApi } from '#/api/mes/pro/card';
import { computed, ref, useAttrs, watch } from 'vue';
@@ -111,7 +111,7 @@
<template #title>
<div v-if="selectedItem" class="leading-6">
<div>缂栧彿锛歿{ selectedItem.code || '-' }}</div>
- <div>宸ュ崟锛歿{ selectedItem.workOrderCode || '-' }}</div>
+ <div>璁㈠崟锛歿{ selectedItem.workOrderCode || '-' }}</div>
<div>鎵规锛歿{ selectedItem.batchCode || '-' }}</div>
<div>浜у搧锛歿{ selectedItem.itemName || '-' }}</div>
</div>
diff --git a/src/views/mes/pro/card/data.ts b/src/views/mes/pro/card/data.ts
index 17c3172..bea6577 100644
--- a/src/views/mes/pro/card/data.ts
+++ b/src/views/mes/pro/card/data.ts
@@ -1,4 +1,4 @@
-import type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
+锘縤mport type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MesProCardApi } from '#/api/mes/pro/card';
import type { MesProCardProcessApi } from '#/api/mes/pro/card/process';
@@ -80,11 +80,11 @@
},
{
fieldName: 'workOrderId',
- label: '鐢熶骇宸ュ崟',
+ label: '鐢熶骇璁㈠崟',
component: markRaw(ProWorkOrderSelect),
componentProps: {
disabled: headerReadonly,
- placeholder: '璇烽�夋嫨鐢熶骇宸ュ崟',
+ placeholder: '璇烽�夋嫨鐢熶骇璁㈠崟',
status: MesProWorkOrderStatusEnum.CONFIRMED,
},
rules: 'selectRequired',
@@ -149,10 +149,10 @@
},
{
fieldName: 'workOrderId',
- label: '鐢熶骇宸ュ崟',
+ label: '鐢熶骇璁㈠崟',
component: markRaw(ProWorkOrderSelect),
componentProps: {
- placeholder: '璇烽�夋嫨鐢熶骇宸ュ崟',
+ placeholder: '璇烽�夋嫨鐢熶骇璁㈠崟',
},
},
{
@@ -186,12 +186,12 @@
},
{
field: 'workOrderCode',
- title: '鐢熶骇宸ュ崟缂栧彿',
+ title: '鐢熶骇璁㈠崟缂栧彿',
width: 160,
},
{
field: 'workOrderName',
- title: '宸ュ崟鍚嶇О',
+ title: '璁㈠崟鍚嶇О',
minWidth: 150,
},
{
@@ -437,10 +437,10 @@
},
{
fieldName: 'workOrderId',
- label: '鐢熶骇宸ュ崟',
+ label: '鐢熶骇璁㈠崟',
component: markRaw(ProWorkOrderSelect),
componentProps: {
- placeholder: '璇烽�夋嫨鐢熶骇宸ュ崟',
+ placeholder: '璇烽�夋嫨鐢熶骇璁㈠崟',
},
},
{
@@ -479,7 +479,7 @@
},
{
field: 'workOrderCode',
- title: '鐢熶骇宸ュ崟缂栧彿',
+ title: '鐢熶骇璁㈠崟缂栧彿',
width: 160,
},
{
diff --git a/src/views/mes/pro/feedback/data.ts b/src/views/mes/pro/feedback/data.ts
index 80c013d..fea352e 100644
--- a/src/views/mes/pro/feedback/data.ts
+++ b/src/views/mes/pro/feedback/data.ts
@@ -1,4 +1,4 @@
-import type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
+锘縤mport type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MesProFeedbackApi } from '#/api/mes/pro/feedback';
import type { MesProTaskApi } from '#/api/mes/pro/task';
@@ -32,11 +32,11 @@
return [
{
fieldName: 'code',
- label: '鎶ュ伐鍗曞彿',
+ label: '鎶ヨ鍗曞彿',
component: 'Input',
componentProps: {
allowClear: true,
- placeholder: '璇疯緭鍏ユ姤宸ュ崟鍙�',
+ placeholder: '璇疯緭鍏ユ姤璁㈠崟鍙�',
},
},
{
@@ -51,11 +51,11 @@
},
{
fieldName: 'workOrderId',
- label: '鐢熶骇宸ュ崟',
+ label: '鐢熶骇璁㈠崟',
component: markRaw(ProWorkOrderSelect),
componentProps: {
allowClear: true,
- placeholder: '璇烽�夋嫨宸ュ崟',
+ placeholder: '璇烽�夋嫨璁㈠崟',
},
},
{
@@ -118,7 +118,7 @@
return [
{
field: 'code',
- title: '鎶ュ伐鍗曞彿',
+ title: '鎶ヨ鍗曞彿',
width: 160,
slots: { default: 'code' },
},
@@ -133,7 +133,7 @@
},
{ field: 'workstationName', title: '宸ヤ綔绔�', width: 120 },
{ field: 'processName', title: '宸ュ簭', width: 100 },
- { field: 'workOrderCode', title: '鐢熶骇宸ュ崟缂栫爜', width: 160 },
+ { field: 'workOrderCode', title: '鐢熶骇璁㈠崟缂栫爜', width: 160 },
{ field: 'itemCode', title: '浜у搧鐗╂枡缂栫爜', width: 120 },
{ field: 'itemName', title: '浜у搧鐗╂枡鍚嶇О', minWidth: 140 },
{ field: 'itemSpecification', title: '瑙勬牸鍨嬪彿', width: 120 },
@@ -209,11 +209,11 @@
},
{
fieldName: 'code',
- label: '鎶ュ伐鍗曞彿',
+ label: '鎶ヨ鍗曞彿',
component: 'Input',
componentProps: {
disabled: isHeaderReadonly,
- placeholder: '璇疯緭鍏ユ姤宸ュ崟鍙�',
+ placeholder: '璇疯緭鍏ユ姤璁㈠崟鍙�',
},
rules: 'required',
suffix: () =>
@@ -245,13 +245,13 @@
},
{
fieldName: 'workOrderId',
- label: '鐢熶骇宸ュ崟',
+ label: '鐢熶骇璁㈠崟',
component: markRaw(ProWorkOrderSelect),
componentProps: {
disabled: isHeaderReadonly,
- placeholder: '璇烽�夋嫨宸ュ崟',
+ placeholder: '璇烽�夋嫨璁㈠崟',
status: MesProWorkOrderStatusEnum.CONFIRMED,
- // 宸ュ崟鍙樻洿锛氭竻绌轰换鍔″強浠诲姟甯﹀嚭鐨勪骇鍝佷俊鎭�佹暟閲忓尯鍩熸帶鍒朵綅
+ // 璁㈠崟鍙樻洿锛氭竻绌轰换鍔″強浠诲姟甯﹀嚭鐨勪骇鍝佷俊鎭�佹暟閲忓尯鍩熸帶鍒朵綅
onChange: async () => {
await formApi?.setValues({
checkFlag: true,
@@ -277,7 +277,7 @@
triggerFields: ['workOrderId', 'workstationId'],
componentProps: (values) => ({
disabled: isHeaderReadonly || !values.workOrderId,
- placeholder: values.workOrderId ? '璇烽�夋嫨浠诲姟' : '璇峰厛閫夋嫨宸ュ崟',
+ placeholder: values.workOrderId ? '璇烽�夋嫨浠诲姟' : '璇峰厛閫夋嫨璁㈠崟',
statuses: [MesProTaskStatusEnum.PREPARE],
workOrderId: values.workOrderId,
workstationId: values.workstationId,
diff --git a/src/views/mes/pro/feedback/modules/form.vue b/src/views/mes/pro/feedback/modules/form.vue
index bb815bc..5c3be5b 100644
--- a/src/views/mes/pro/feedback/modules/form.vue
+++ b/src/views/mes/pro/feedback/modules/form.vue
@@ -1,4 +1,4 @@
-<script lang="ts" setup>
+锘�<script lang="ts" setup>
import type { FormType } from '../data';
import type { MesProFeedbackApi } from '#/api/mes/pro/feedback';
@@ -152,7 +152,7 @@
await submitFeedback(formData.value!.id!);
await modalApi.close();
emit('success');
- message.success('鎶ュ伐鍗曞凡鎻愪氦');
+ message.success('鎶ヨ鍗曞凡鎻愪氦');
} finally {
modalApi.unlock();
}
@@ -169,7 +169,7 @@
await modalApi.close();
emit('success');
message.success(
- finished ? '鎶ュ伐鍗曞凡瀹℃壒瀹屾垚' : '鎶ュ伐鎴愬姛锛岃绛夊緟璐ㄩ噺妫�楠屽畬鎴愶紒',
+ finished ? '鎶ヨ鍗曞凡瀹℃壒瀹屾垚' : '鎶ュ伐鎴愬姛锛岃绛夊緟璐ㄩ噺妫�楠屽畬鎴愶紒',
);
} finally {
modalApi.unlock();
@@ -186,7 +186,7 @@
await rejectFeedback(formData.value.id);
await modalApi.close();
emit('success');
- message.success('鎶ュ伐鍗曞凡椹冲洖');
+ message.success('鎶ヨ鍗曞凡椹冲洖');
} finally {
modalApi.unlock();
}
@@ -236,7 +236,7 @@
formType.value !== 'detail' && formType.value !== 'approve',
});
if (!data?.id) {
- // 鏂板锛氶粯璁ゆ姤宸ヤ汉鍜屾姤宸ユ椂闂达紝骞惰嚜鍔ㄧ敓鎴愭姤宸ュ崟鍙�
+ // 鏂板锛氶粯璁ゆ姤宸ヤ汉鍜屾姤宸ユ椂闂达紝骞惰嚜鍔ㄧ敓鎴愭姤璁㈠崟鍙�
const code = await generateAutoCode(
MesAutoCodeRuleCode.PRO_FEEDBACK_CODE,
);
@@ -287,21 +287,21 @@
<div class="flex flex-auto items-center justify-end gap-2">
<Popconfirm
v-if="canSubmit"
- title="纭鎻愪氦璇ユ姤宸ュ崟锛熸彁浜ゅ悗灏嗕笉鑳戒慨鏀广��"
+ title="纭鎻愪氦璇ユ姤璁㈠崟锛熸彁浜ゅ悗灏嗕笉鑳戒慨鏀广��"
@confirm="handleSubmit"
>
<Button type="primary">{{ $t('common.submit') }}</Button>
</Popconfirm>
<Popconfirm
v-if="canApprove"
- title="纭瀹℃壒閫氳繃璇ユ姤宸ュ崟锛�"
+ title="纭瀹℃壒閫氳繃璇ユ姤璁㈠崟锛�"
@confirm="handleApprove"
>
<Button type="primary">閫氳繃</Button>
</Popconfirm>
<Popconfirm
v-if="canApprove"
- title="纭椹冲洖璇ユ姤宸ュ崟锛�"
+ title="纭椹冲洖璇ユ姤璁㈠崟锛�"
@confirm="handleReject"
>
<Button danger>涓嶉�氳繃</Button>
diff --git a/src/views/mes/pro/task/components/gantt-chart.vue b/src/views/mes/pro/task/components/gantt-chart.vue
index de9fe64..69e2af3 100644
--- a/src/views/mes/pro/task/components/gantt-chart.vue
+++ b/src/views/mes/pro/task/components/gantt-chart.vue
@@ -1,4 +1,4 @@
-<script lang="ts" setup>
+锘�<script lang="ts" setup>
import { onBeforeUnmount, onMounted, ref, watch } from 'vue';
import { BarcodeBizTypeEnum } from '../../../../../packages/constants/src';
@@ -10,7 +10,7 @@
/**
* 鐢樼壒鍥剧粍浠讹紙鍩轰簬 dhtmlx-gantt锛�
*
- * 1. 鎸夊伐鍗曞垎缁勫睍绀虹敓浜т换鍔★紝宸ュ崟涓� project 琛岋紝浠诲姟涓哄瓙琛�
+ * 1. 鎸夎鍗曞垎缁勫睍绀虹敓浜т换鍔★紝璁㈠崟涓� project 琛岋紝浠诲姟涓哄瓙琛�
* 2. 鏀寔鍙棰勮鍜屾嫋鎷界紪杈戜袱绉嶆ā寮�
* 3. 鎷栨嫿鍚庤Е鍙� taskUpdate 浜嬩欢锛岄�氱煡鐖剁粍浠舵壒閲忎繚瀛�
* 4. 鏃堕棿鍒诲害锛氬懆 鈫� 鏃� 鈫� 8 灏忔椂锛�1 宸ヤ綔鏃� = 8 灏忔椂锛�
@@ -113,7 +113,7 @@
gantt.templates.task_text = (_start: any, _end: any, task: any) => {
const percent = Math.round((task.progress || 0) * 100);
if (task.type === 'project') {
- return `<b>鐢熶骇宸ュ崟:</b> ${task.text} <span>瀹屾垚姣斾緥锛�${percent}%</span>`;
+ return `<b>鐢熶骇璁㈠崟:</b> ${task.text} <span>瀹屾垚姣斾緥锛�${percent}%</span>`;
}
return `<b>鐢熶骇浠诲姟:</b> ${task.process || ''} ${task.text} <span>瀹屾垚姣斾緥锛�${percent}%</span>`;
};
@@ -121,7 +121,7 @@
gantt.templates.tooltip_text = (_start: any, _end: any, task: any) => {
const percent = Math.round((task.progress || 0) * 100);
if (task.type === 'project') {
- return `<b>鐢熶骇宸ュ崟:</b> ${task.text} <span>瀹屾垚姣斾緥锛�${percent}%</span>`;
+ return `<b>鐢熶骇璁㈠崟:</b> ${task.text} <span>瀹屾垚姣斾緥锛�${percent}%</span>`;
}
return `<b>鐢熶骇浠诲姟:</b> ${task.process || ''} ${task.text} <span>瀹屾垚姣斾緥锛�${percent}%</span>`;
};
@@ -135,7 +135,7 @@
if (!props.readonly) {
gantt.attachEvent('onAfterTaskUpdate', (id: number | string) => {
const task = gantt.getTask(id);
- // 鍙洖鍐� task 鑺傜偣锛岄伩鍏嶆妸宸ュ崟(project)鑺傜偣褰撴垚浠诲姟淇濆瓨
+ // 鍙洖鍐� task 鑺傜偣锛岄伩鍏嶆妸璁㈠崟(project)鑺傜偣褰撴垚浠诲姟淇濆瓨
if (task.type !== gantt.config.types.task || !task.originalId) {
return;
}
@@ -227,7 +227,7 @@
color: #f44;
}
-/* 宸ュ崟锛坧roject锛夎鏍峰紡 */
+/* 璁㈠崟锛坧roject锛夎鏍峰紡 */
.gantt-project-bar .gantt_task_progress {
background: #7b68ee;
}
diff --git a/src/views/mes/pro/task/components/select-dialog.vue b/src/views/mes/pro/task/components/select-dialog.vue
index dd7be07..fb53bd7 100644
--- a/src/views/mes/pro/task/components/select-dialog.vue
+++ b/src/views/mes/pro/task/components/select-dialog.vue
@@ -1,4 +1,4 @@
-<script lang="ts" setup>
+锘�<script lang="ts" setup>
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MesProTaskApi } from '#/api/mes/pro/task';
@@ -30,7 +30,7 @@
const multiple = ref(false); // 鏄惁澶氶�夛紱榛樿鎸夊崟閫夐�夋嫨鍣ㄤ娇鐢�
const selectedRows = ref<MesProTaskApi.Task[]>([]); // 宸查�変换鍔″垪琛�
const preSelectedIds = ref<number[]>([]); // 棰勯�変换鍔$紪鍙峰垪琛�
-const externalWorkOrderId = ref<number>(); // 澶栭儴浼犲叆鐨勯粯璁ゅ伐鍗曡繃婊�
+const externalWorkOrderId = ref<number>(); // 澶栭儴浼犲叆鐨勯粯璁よ鍗曡繃婊�
const externalWorkstationId = ref<number>(); // 澶栭儴浼犲叆鐨勯粯璁ゅ伐浣嶈繃婊�
const statusTip = computed(() => {
@@ -163,7 +163,7 @@
},
});
-/** 閲嶇疆鏌ヨ鍜岄�夋嫨鐘舵�侊紝淇濈暀澶栭儴浼犲叆鐨勫伐鍗�/宸ヤ綅榛樿杩囨护 */
+/** 閲嶇疆鏌ヨ鍜岄�夋嫨鐘舵�侊紝淇濈暀澶栭儴浼犲叆鐨勮鍗�/宸ヤ綅榛樿杩囨护 */
async function resetQueryState() {
selectedRows.value = [];
await gridApi.grid.clearCheckboxRow();
diff --git a/src/views/mes/pro/task/data.ts b/src/views/mes/pro/task/data.ts
index aeef143..3d575ad 100644
--- a/src/views/mes/pro/task/data.ts
+++ b/src/views/mes/pro/task/data.ts
@@ -1,4 +1,4 @@
-import type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
+锘縤mport type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MesProTaskApi } from '#/api/mes/pro/task';
import type { MesProWorkOrderApi } from '#/api/mes/pro/workorder';
@@ -16,25 +16,25 @@
import { RouteColorPicker } from '#/views/mes/process-design/route/components';
import { ProWorkOrderSelect } from '#/views/mes/pro/workorder/components';
-/** 寰呮帓浜у伐鍗曞垪琛ㄧ殑鎼滅储琛ㄥ崟 */
+/** 寰呮帓浜ц鍗曞垪琛ㄧ殑鎼滅储琛ㄥ崟 */
export function useGridFormSchema(): VbenFormSchema[] {
return [
{
fieldName: 'code',
- label: '宸ュ崟缂栫爜',
+ label: '璁㈠崟缂栫爜',
component: 'Input',
componentProps: {
allowClear: true,
- placeholder: '璇疯緭鍏ュ伐鍗曠紪鐮�',
+ placeholder: '璇疯緭鍏ヨ鍗曠紪鐮�',
},
},
{
fieldName: 'name',
- label: '宸ュ崟鍚嶇О',
+ label: '璁㈠崟鍚嶇О',
component: 'Input',
componentProps: {
allowClear: true,
- placeholder: '璇疯緭鍏ュ伐鍗曞悕绉�',
+ placeholder: '璇疯緭鍏ヨ鍗曞悕绉�',
},
},
{
@@ -74,12 +74,12 @@
];
}
-/** 寰呮帓浜у伐鍗曞垪琛ㄧ殑瀛楁 */
+/** 寰呮帓浜ц鍗曞垪琛ㄧ殑瀛楁 */
export function useGridColumns(): VxeTableGridOptions<MesProWorkOrderApi.WorkOrder>['columns'] {
return [
{
field: 'code',
- title: '宸ュ崟缂栫爜',
+ title: '璁㈠崟缂栫爜',
fixed: 'left',
width: 200,
treeNode: true,
@@ -87,12 +87,12 @@
},
{
field: 'name',
- title: '宸ュ崟鍚嶇О',
+ title: '璁㈠崟鍚嶇О',
minWidth: 150,
},
{
field: 'orderSourceType',
- title: '宸ュ崟鏉ユ簮',
+ title: '璁㈠崟鏉ユ簮',
width: 100,
cellRender: {
name: 'CellDict',
@@ -126,7 +126,7 @@
},
{
field: 'quantity',
- title: '宸ュ崟鏁伴噺',
+ title: '璁㈠崟鏁伴噺',
width: 100,
},
{
@@ -173,12 +173,12 @@
];
}
-/** 鎺掍骇瀵硅瘽妗嗗彧璇诲伐鍗曚俊鎭殑琛ㄥ崟 */
+/** 鎺掍骇瀵硅瘽妗嗗彧璇昏鍗曚俊鎭殑琛ㄥ崟 */
export function useScheduleFormSchema(): VbenFormSchema[] {
return [
{
fieldName: 'code',
- label: '宸ュ崟缂栫爜',
+ label: '璁㈠崟缂栫爜',
component: 'Input',
componentProps: {
disabled: true,
@@ -186,7 +186,7 @@
},
{
fieldName: 'name',
- label: '宸ュ崟鍚嶇О',
+ label: '璁㈠崟鍚嶇О',
component: 'Input',
componentProps: {
disabled: true,
@@ -194,7 +194,7 @@
},
{
fieldName: 'orderSourceType',
- label: '宸ュ崟鏉ユ簮',
+ label: '璁㈠崟鏉ユ簮',
component: 'Select',
componentProps: {
disabled: true,
@@ -214,7 +214,7 @@
},
{
fieldName: 'type',
- label: '宸ュ崟绫诲瀷',
+ label: '璁㈠崟绫诲瀷',
component: 'Select',
componentProps: {
disabled: true,
@@ -247,7 +247,7 @@
},
{
fieldName: 'quantity',
- label: '宸ュ崟鏁伴噺',
+ label: '璁㈠崟鏁伴噺',
component: 'InputNumber',
componentProps: {
class: '!w-full',
@@ -284,7 +284,7 @@
},
{
fieldName: 'status',
- label: '宸ュ崟鐘舵��',
+ label: '璁㈠崟鐘舵��',
component: 'Select',
componentProps: {
disabled: true,
@@ -476,11 +476,11 @@
return [
{
fieldName: 'workOrderId',
- label: '鐢熶骇宸ュ崟',
+ label: '鐢熶骇璁㈠崟',
component: markRaw(ProWorkOrderSelect),
componentProps: {
allowClear: true,
- placeholder: '璇烽�夋嫨鐢熶骇宸ュ崟',
+ placeholder: '璇烽�夋嫨鐢熶骇璁㈠崟',
},
},
{
diff --git a/src/views/mes/pro/task/index.vue b/src/views/mes/pro/task/index.vue
index a97bb1c..49f2289 100644
--- a/src/views/mes/pro/task/index.vue
+++ b/src/views/mes/pro/task/index.vue
@@ -1,4 +1,4 @@
-<script lang="ts" setup>
+锘�<script lang="ts" setup>
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MesProWorkOrderApi } from '#/api/mes/pro/workorder';
@@ -43,7 +43,7 @@
});
}
-/** 鏌ョ湅宸ュ崟璇︽儏 */
+/** 鏌ョ湅璁㈠崟璇︽儏 */
function handleDetail(row: MesProWorkOrderApi.WorkOrder) {
scheduleModalApi.setData({ formType: 'detail', id: row.id }).open();
}
@@ -107,7 +107,7 @@
<GanttChart :height="350" :readonly="true" :tasks="ganttTasks" />
</Card>
- <Grid table-title="寰呮帓浜у伐鍗�">
+ <Grid table-title="寰呮帓浜ц鍗�">
<template #toolbar-tools>
<TableAction
:actions="[
diff --git a/src/views/mes/pro/task/modules/schedule-form.vue b/src/views/mes/pro/task/modules/schedule-form.vue
index d25e0a3..2f86e18 100644
--- a/src/views/mes/pro/task/modules/schedule-form.vue
+++ b/src/views/mes/pro/task/modules/schedule-form.vue
@@ -1,4 +1,4 @@
-<script lang="ts" setup>
+锘�<script lang="ts" setup>
import type { MesProRouteProcessApi } from '#/api/mes/pro/route/process';
import type { MesProWorkOrderApi } from '#/api/mes/pro/workorder';
@@ -17,14 +17,14 @@
const emit = defineEmits(['success']);
const formType = ref<'detail' | 'schedule'>('schedule');
-const workOrder = ref<MesProWorkOrderApi.WorkOrder>(); // 褰撳墠宸ュ崟璇︽儏
+const workOrder = ref<MesProWorkOrderApi.WorkOrder>(); // 褰撳墠璁㈠崟璇︽儏
const routeProcessList = ref<MesProRouteProcessApi.RouteProcess[]>([]); // 宸ヨ壓璺嚎宸ュ簭鍒楄〃
const activeProcessStep = ref(0); // 褰撳墠宸ュ簭姝ラ绱㈠紩
const currentRouteId = ref(0); // 褰撳墠宸ヨ壓璺嚎缂栧彿
const isReadonly = computed(() => formType.value === 'detail'); // 璇︽儏鎬佸彧璇�
const getTitle = computed(() =>
- formType.value === 'detail' ? '宸ュ崟璇︽儏' : '鐢熶骇鎺掍骇',
+ formType.value === 'detail' ? '璁㈠崟璇︽儏' : '鐢熶骇鎺掍骇',
);
const [Form, formApi] = useVbenForm({
@@ -54,7 +54,7 @@
);
}
-/** 瀹屾垚宸ュ崟 */
+/** 瀹屾垚璁㈠崟 */
async function handleFinish() {
if (!workOrder.value?.id) {
return;
@@ -62,7 +62,7 @@
modalApi.lock();
try {
await finishWorkOrder(workOrder.value.id);
- message.success('宸ュ崟宸插畬鎴�');
+ message.success('璁㈠崟宸插畬鎴�');
await modalApi.close();
emit('success');
} finally {
@@ -140,7 +140,7 @@
<div class="flex flex-auto items-center gap-2">
<Popconfirm
v-if="formType === 'schedule'"
- title="纭瑕佸畬鎴愯宸ュ崟鍚楋紵瀹屾垚鍚庡伐鍗曚笅鎵�鏈変换鍔″皢鏍囪涓哄凡瀹屾垚銆�"
+ title="纭瑕佸畬鎴愯璁㈠崟鍚楋紵瀹屾垚鍚庤鍗曚笅鎵�鏈変换鍔″皢鏍囪涓哄凡瀹屾垚銆�"
@confirm="handleFinish"
>
<Button type="primary">瀹屾垚</Button>
diff --git a/src/views/mes/pro/task/modules/task-form.vue b/src/views/mes/pro/task/modules/task-form.vue
index c193444..ce33356 100644
--- a/src/views/mes/pro/task/modules/task-form.vue
+++ b/src/views/mes/pro/task/modules/task-form.vue
@@ -1,4 +1,4 @@
-<script lang="ts" setup>
+锘�<script lang="ts" setup>
import type { MesProTaskApi } from '#/api/mes/pro/task';
import { computed, ref } from 'vue';
@@ -21,7 +21,7 @@
processId?: number;
routeId?: number;
workOrderId?: number;
-}>({}); // 鏂板浠诲姟鏃剁殑宸ュ崟 / 宸ュ簭涓婁笅鏂�
+}>({}); // 鏂板浠诲姟鏃剁殑璁㈠崟 / 宸ュ簭涓婁笅鏂�
const getTitle = computed(() => {
return formData.value?.id
diff --git a/src/views/mes/pro/workorder/components/select-dialog.vue b/src/views/mes/pro/workorder/components/select-dialog.vue
index a675091..8a204bf 100644
--- a/src/views/mes/pro/workorder/components/select-dialog.vue
+++ b/src/views/mes/pro/workorder/components/select-dialog.vue
@@ -1,4 +1,4 @@
-<script lang="ts" setup>
+锘�<script lang="ts" setup>
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MesProWorkOrderApi } from '#/api/mes/pro/workorder';
@@ -33,14 +33,14 @@
const open = ref(false); // 寮圭獥鏄惁鎵撳紑
const multiple = ref(false); // 鏄惁澶氶�夛紱榛樿鎸夊崟閫夐�夋嫨鍣ㄤ娇鐢�
-const selectedRows = ref<MesProWorkOrderApi.WorkOrder[]>([]); // 宸查�夊伐鍗曞垪琛�
-const preSelectedIds = ref<number[]>([]); // 棰勯�夊伐鍗曠紪鍙峰垪琛�
+const selectedRows = ref<MesProWorkOrderApi.WorkOrder[]>([]); // 宸查�夎鍗曞垪琛�
+const preSelectedIds = ref<number[]>([]); // 棰勯�夎鍗曠紪鍙峰垪琛�
const typeTip = computed(() => {
if (props.type === undefined) {
return '';
}
- return `浠呭睍绀恒��${getDictLabel(DICT_TYPE.MES_PRO_WORK_ORDER_TYPE, props.type)}銆戠被鍨嬬殑宸ュ崟`;
+ return `浠呭睍绀恒��${getDictLabel(DICT_TYPE.MES_PRO_WORK_ORDER_TYPE, props.type)}銆戠被鍨嬬殑璁㈠崟`;
});
/** 鑾峰彇澶氶�夎褰曪紝鍖呭惈 VXE reserve 璺ㄩ〉璁板綍 */
@@ -94,7 +94,7 @@
handleConfirm();
}
-/** 鍥炴樉棰勯�夊伐鍗� */
+/** 鍥炴樉棰勯�夎鍗� */
async function applyPreSelection() {
if (preSelectedIds.value.length === 0) {
return;
@@ -182,7 +182,7 @@
}
}
-/** 鎵撳紑宸ュ崟閫夋嫨寮圭獥 */
+/** 鎵撳紑璁㈠崟閫夋嫨寮圭獥 */
async function openModal(
selectedIds?: number[],
options?: { multiple?: boolean },
@@ -200,12 +200,12 @@
await applyPreSelection();
}
-/** 鍏抽棴宸ュ崟閫夋嫨寮圭獥 */
+/** 鍏抽棴璁㈠崟閫夋嫨寮圭獥 */
function closeModal() {
open.value = false;
}
-/** 纭閫夋嫨宸ュ崟 */
+/** 纭閫夋嫨璁㈠崟 */
function handleConfirm() {
const rows = multiple.value ? getMultipleSelectedRows() : selectedRows.value;
if (rows.length === 0) {
@@ -222,7 +222,7 @@
<template>
<Modal
v-model:open="open"
- title="鐢熶骇宸ュ崟閫夋嫨"
+ title="鐢熶骇璁㈠崟閫夋嫨"
width="80%"
:destroy-on-close="true"
@ok="handleConfirm"
@@ -235,7 +235,7 @@
show-icon
class="!mb-3"
/>
- <Grid table-title="鐢熶骇宸ュ崟鍒楄〃" />
+ <Grid table-title="鐢熶骇璁㈠崟鍒楄〃" />
<template #footer>
<Button @click="closeModal">鍙栨秷</Button>
<Button type="primary" @click="handleConfirm">纭畾</Button>
diff --git a/src/views/mes/pro/workorder/components/select.vue b/src/views/mes/pro/workorder/components/select.vue
index a6d8d93..78632e7 100644
--- a/src/views/mes/pro/workorder/components/select.vue
+++ b/src/views/mes/pro/workorder/components/select.vue
@@ -1,4 +1,4 @@
-<script lang="ts" setup>
+锘�<script lang="ts" setup>
import type { MesProWorkOrderApi } from '#/api/mes/pro/workorder';
import { computed, ref, useAttrs, watch } from 'vue';
@@ -26,7 +26,7 @@
allowClear: true,
disabled: false,
modelValue: undefined,
- placeholder: '璇烽�夋嫨宸ュ崟',
+ placeholder: '璇烽�夋嫨璁㈠崟',
status: undefined,
type: undefined,
},
@@ -38,9 +38,9 @@
}>();
const attrs = useAttrs(); // 閫忎紶灞炴��
-const dialogRef = ref<InstanceType<typeof ProWorkOrderSelectDialog>>(); // 宸ュ崟閫夋嫨寮圭獥
+const dialogRef = ref<InstanceType<typeof ProWorkOrderSelectDialog>>(); // 璁㈠崟閫夋嫨寮圭獥
const hovering = ref(false); // 鏄惁鎮仠
-const selectedItem = ref<MesProWorkOrderApi.WorkOrder>(); // 褰撳墠閫変腑宸ュ崟
+const selectedItem = ref<MesProWorkOrderApi.WorkOrder>(); // 褰撳墠閫変腑璁㈠崟
const displayLabel = computed(() => selectedItem.value?.code ?? ''); // 閫夋嫨鍣ㄥ睍绀虹紪鐮�
const showClear = computed(
@@ -53,7 +53,7 @@
props.modelValue !== null,
);
-/** 鏍规嵁缂栧彿鍗曟潯鏌ヨ宸ュ崟淇℃伅锛堢敤浜庣紪杈戝洖鏄撅級 */
+/** 鏍规嵁缂栧彿鍗曟潯鏌ヨ璁㈠崟淇℃伅锛堢敤浜庣紪杈戝洖鏄撅級 */
async function resolveItemById(id: number | undefined) {
if (!id) {
selectedItem.value = undefined;
@@ -67,14 +67,14 @@
watch(() => props.modelValue, resolveItemById, { immediate: true });
-/** 娓呯┖宸查�夊伐鍗� */
+/** 娓呯┖宸查�夎鍗� */
function clearSelected() {
selectedItem.value = undefined;
emit('update:modelValue', undefined);
emit('change', undefined);
}
-/** 鎵撳紑宸ュ崟閫夋嫨寮圭獥 */
+/** 鎵撳紑璁㈠崟閫夋嫨寮圭獥 */
function handleClick(event: MouseEvent) {
if (props.disabled) {
return;
diff --git a/src/views/mes/pro/workorder/data.ts b/src/views/mes/pro/workorder/data.ts
index 13d2f7f..5a3a104 100644
--- a/src/views/mes/pro/workorder/data.ts
+++ b/src/views/mes/pro/workorder/data.ts
@@ -1,4 +1,4 @@
-import type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
+锘縤mport type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MesMdProductBomApi } from '#/api/mes/md/item/productBom';
import type { MesProWorkOrderApi } from '#/api/mes/pro/workorder';
@@ -58,7 +58,7 @@
},
{
fieldName: 'status',
- label: '宸ュ崟鐘舵��',
+ label: '璁㈠崟鐘舵��',
component: 'Select',
componentProps: {
disabled: true,
@@ -71,11 +71,11 @@
},
{
fieldName: 'code',
- label: '宸ュ崟缂栫爜',
+ label: '璁㈠崟缂栫爜',
component: 'Input',
componentProps: {
disabled: headerReadonly,
- placeholder: '璇疯緭鍏ュ伐鍗曠紪鐮�',
+ placeholder: '璇疯緭鍏ヨ鍗曠紪鐮�',
},
rules: 'required',
suffix:
@@ -98,17 +98,17 @@
},
{
fieldName: 'name',
- label: '宸ュ崟鍚嶇О',
+ label: '璁㈠崟鍚嶇О',
component: 'Input',
componentProps: {
disabled: headerReadonly,
- placeholder: '璇疯緭鍏ュ伐鍗曞悕绉�',
+ placeholder: '璇疯緭鍏ヨ鍗曞悕绉�',
},
rules: 'required',
},
{
fieldName: 'orderSourceType',
- label: '宸ュ崟鏉ユ簮',
+ label: '璁㈠崟鏉ユ簮',
component: 'Select',
componentProps: {
disabled: headerReadonly,
@@ -116,8 +116,8 @@
DICT_TYPE.MES_PRO_WORK_ORDER_SOURCE_TYPE,
'number',
),
- placeholder: '璇烽�夋嫨宸ュ崟鏉ユ簮',
- // 宸ュ崟鏉ユ簮鍙樻洿锛氶潪瀹㈡埛璁㈠崟鏃舵竻绌烘潵婧愬崟鎹紪鍙峰拰瀹㈡埛
+ placeholder: '璇烽�夋嫨璁㈠崟鏉ユ簮',
+ // 璁㈠崟鏉ユ簮鍙樻洿锛氶潪瀹㈡埛璁㈠崟鏃舵竻绌烘潵婧愬崟鎹紪鍙峰拰瀹㈡埛
onChange: async (value: number) => {
if (value !== MesProWorkOrderSourceTypeEnum.ORDER) {
await formApi?.setValues({
@@ -145,13 +145,13 @@
},
{
fieldName: 'type',
- label: '宸ュ崟绫诲瀷',
+ label: '璁㈠崟绫诲瀷',
component: 'Select',
componentProps: {
disabled: headerReadonly,
options: getDictOptions(DICT_TYPE.MES_PRO_WORK_ORDER_TYPE, 'number'),
- placeholder: '璇烽�夋嫨宸ュ崟绫诲瀷',
- // 宸ュ崟绫诲瀷鍙樻洿锛氶潪浠e伐/閲囪喘鏃舵竻绌轰緵搴斿晢
+ placeholder: '璇烽�夋嫨璁㈠崟绫诲瀷',
+ // 璁㈠崟绫诲瀷鍙樻洿锛氶潪浠e伐/閲囪喘鏃舵竻绌轰緵搴斿晢
onChange: async (value: number) => {
if (
value !== MesProWorkOrderTypeEnum.OUTSOURCE &&
@@ -175,13 +175,13 @@
},
{
fieldName: 'quantity',
- label: '宸ュ崟鏁伴噺',
+ label: '璁㈠崟鏁伴噺',
component: 'InputNumber',
componentProps: {
class: '!w-full',
disabled: headerReadonly,
min: 1,
- placeholder: '璇疯緭鍏ュ伐鍗曟暟閲�',
+ placeholder: '璇疯緭鍏ヨ鍗曟暟閲�',
precision: 2,
},
rules: 'required',
@@ -256,20 +256,20 @@
return [
{
fieldName: 'code',
- label: '宸ュ崟缂栫爜',
+ label: '璁㈠崟缂栫爜',
component: 'Input',
componentProps: {
allowClear: true,
- placeholder: '璇疯緭鍏ュ伐鍗曠紪鐮�',
+ placeholder: '璇疯緭鍏ヨ鍗曠紪鐮�',
},
},
{
fieldName: 'name',
- label: '宸ュ崟鍚嶇О',
+ label: '璁㈠崟鍚嶇О',
component: 'Input',
componentProps: {
allowClear: true,
- placeholder: '璇疯緭鍏ュ伐鍗曞悕绉�',
+ placeholder: '璇疯緭鍏ヨ鍗曞悕绉�',
},
},
{
@@ -299,12 +299,12 @@
},
{
fieldName: 'type',
- label: '宸ュ崟绫诲瀷',
+ label: '璁㈠崟绫诲瀷',
component: 'Select',
componentProps: {
allowClear: true,
options: getDictOptions(DICT_TYPE.MES_PRO_WORK_ORDER_TYPE, 'number'),
- placeholder: '璇烽�夋嫨宸ュ崟绫诲瀷',
+ placeholder: '璇烽�夋嫨璁㈠崟绫诲瀷',
},
},
{
@@ -324,7 +324,7 @@
return [
{
field: 'code',
- title: '宸ュ崟缂栫爜',
+ title: '璁㈠崟缂栫爜',
fixed: 'left',
width: 200,
treeNode: true,
@@ -332,12 +332,12 @@
},
{
field: 'name',
- title: '宸ュ崟鍚嶇О',
+ title: '璁㈠崟鍚嶇О',
minWidth: 150,
},
{
field: 'type',
- title: '宸ュ崟绫诲瀷',
+ title: '璁㈠崟绫诲瀷',
width: 100,
cellRender: {
name: 'CellDict',
@@ -346,7 +346,7 @@
},
{
field: 'orderSourceType',
- title: '宸ュ崟鏉ユ簮',
+ title: '璁㈠崟鏉ユ簮',
width: 100,
cellRender: {
name: 'CellDict',
@@ -380,7 +380,7 @@
},
{
field: 'quantity',
- title: '宸ュ崟鏁伴噺',
+ title: '璁㈠崟鏁伴噺',
width: 100,
},
{
@@ -406,7 +406,7 @@
},
{
field: 'status',
- title: '宸ュ崟鐘舵��',
+ title: '璁㈠崟鐘舵��',
width: 100,
cellRender: {
name: 'CellDict',
@@ -428,7 +428,7 @@
];
}
-/** 宸ュ崟 BOM 瀛愯〃鐨勫瓧娈� */
+/** 璁㈠崟 BOM 瀛愯〃鐨勫瓧娈� */
export function useBomGridColumns(
editable: boolean,
generatable: boolean,
@@ -486,7 +486,7 @@
];
}
-/** 宸ュ崟 BOM 鏂板/淇敼鐨勮〃鍗� */
+/** 璁㈠崟 BOM 鏂板/淇敼鐨勮〃鍗� */
export function useBomFormSchema(
isCreate: boolean,
productId?: number,
@@ -559,25 +559,25 @@
];
}
-/** 宸ュ崟閫夋嫨寮圭獥鐨勬悳绱㈣〃鍗� */
+/** 璁㈠崟閫夋嫨寮圭獥鐨勬悳绱㈣〃鍗� */
export function useWorkOrderSelectGridFormSchema(): VbenFormSchema[] {
return [
{
fieldName: 'code',
- label: '宸ュ崟缂栫爜',
+ label: '璁㈠崟缂栫爜',
component: 'Input',
componentProps: {
allowClear: true,
- placeholder: '璇疯緭鍏ュ伐鍗曠紪鐮�',
+ placeholder: '璇疯緭鍏ヨ鍗曠紪鐮�',
},
},
{
fieldName: 'name',
- label: '宸ュ崟鍚嶇О',
+ label: '璁㈠崟鍚嶇О',
component: 'Input',
componentProps: {
allowClear: true,
- placeholder: '璇疯緭鍏ュ伐鍗曞悕绉�',
+ placeholder: '璇疯緭鍏ヨ鍗曞悕绉�',
},
},
{
@@ -598,18 +598,18 @@
},
{
fieldName: 'status',
- label: '宸ュ崟鐘舵��',
+ label: '璁㈠崟鐘舵��',
component: 'Select',
componentProps: {
allowClear: true,
options: getDictOptions(DICT_TYPE.MES_PRO_WORK_ORDER_STATUS, 'number'),
- placeholder: '璇烽�夋嫨宸ュ崟鐘舵��',
+ placeholder: '璇烽�夋嫨璁㈠崟鐘舵��',
},
},
];
}
-/** 宸ュ崟閫夋嫨寮圭獥鐨勫瓧娈� */
+/** 璁㈠崟閫夋嫨寮圭獥鐨勫瓧娈� */
export function useWorkOrderSelectGridColumns(
multiple = false,
): VxeTableGridOptions<MesProWorkOrderApi.WorkOrder>['columns'] {
@@ -620,17 +620,17 @@
},
{
field: 'code',
- title: '宸ュ崟缂栫爜',
+ title: '璁㈠崟缂栫爜',
width: 180,
},
{
field: 'name',
- title: '宸ュ崟鍚嶇О',
+ title: '璁㈠崟鍚嶇О',
minWidth: 180,
},
{
field: 'orderSourceType',
- title: '宸ュ崟鏉ユ簮',
+ title: '璁㈠崟鏉ユ簮',
width: 100,
cellRender: {
name: 'CellDict',
@@ -664,7 +664,7 @@
},
{
field: 'quantity',
- title: '宸ュ崟鏁伴噺',
+ title: '璁㈠崟鏁伴噺',
width: 100,
},
{
@@ -679,7 +679,7 @@
},
{
field: 'status',
- title: '宸ュ崟鐘舵��',
+ title: '璁㈠崟鐘舵��',
width: 100,
cellRender: {
name: 'CellDict',
@@ -695,7 +695,7 @@
];
}
-/** 宸ュ崟鐗╂枡闇�姹傚瓙琛ㄧ殑瀛楁锛堝彧璇伙級 */
+/** 璁㈠崟鐗╂枡闇�姹傚瓙琛ㄧ殑瀛楁锛堝彧璇伙級 */
export function useItemGridColumns(): VxeTableGridOptions<MesProWorkOrderBomApi.WorkOrderBom>['columns'] {
return [
{
diff --git a/src/views/mes/pro/workorder/index.vue b/src/views/mes/pro/workorder/index.vue
index 3bc1a53..ce3b3cc 100644
--- a/src/views/mes/pro/workorder/index.vue
+++ b/src/views/mes/pro/workorder/index.vue
@@ -1,4 +1,4 @@
-<script lang="ts" setup>
+锘�<script lang="ts" setup>
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MesProWorkOrderApi } from '#/api/mes/pro/workorder';
@@ -39,32 +39,32 @@
gridApi.query();
}
-/** 鍒涘缓宸ュ崟 */
+/** 鍒涘缓璁㈠崟 */
function handleCreate() {
formModalApi.setData({ formType: 'create' }).open();
}
-/** 鏂板瀛愬伐鍗� */
+/** 鏂板瀛愯鍗� */
function handleAddChild(row: MesProWorkOrderApi.WorkOrder) {
formModalApi.setData({ formType: 'create', parentRow: row }).open();
}
-/** 鏌ョ湅宸ュ崟璇︽儏 */
+/** 鏌ョ湅璁㈠崟璇︽儏 */
function handleDetail(row: MesProWorkOrderApi.WorkOrder) {
formModalApi.setData({ formType: 'detail', id: row.id }).open();
}
-/** 缂栬緫宸ュ崟 */
+/** 缂栬緫璁㈠崟 */
function handleEdit(row: MesProWorkOrderApi.WorkOrder) {
formModalApi.setData({ formType: 'update', id: row.id }).open();
}
-/** 瀹屾垚宸ュ崟 */
+/** 瀹屾垚璁㈠崟 */
function handleFinish(row: MesProWorkOrderApi.WorkOrder) {
formModalApi.setData({ formType: 'finish', id: row.id }).open();
}
-/** 鍒犻櫎宸ュ崟 */
+/** 鍒犻櫎璁㈠崟 */
async function handleDelete(row: MesProWorkOrderApi.WorkOrder) {
const hideLoading = message.loading({
content: $t('ui.actionMessage.deleting', [row.code]),
@@ -79,14 +79,14 @@
}
}
-/** 鍙栨秷宸ュ崟 */
+/** 鍙栨秷璁㈠崟 */
async function handleCancel(row: MesProWorkOrderApi.WorkOrder) {
await cancelWorkOrder(row.id!);
- message.success('宸ュ崟宸插彇娑�');
+ message.success('璁㈠崟宸插彇娑�');
handleRefresh();
}
-/** 鏌ョ湅宸ュ崟鏉$爜 */
+/** 鏌ョ湅璁㈠崟鏉$爜 */
function handleBarcode(row: MesProWorkOrderApi.WorkOrder) {
barcodeDetailRef.value?.openByBusiness(
row.id!,
@@ -99,7 +99,7 @@
/** 瀵煎嚭琛ㄦ牸 */
async function handleExport() {
const data = await exportWorkOrder(await gridApi.formApi.getValues());
- downloadFileFromBlobPart({ fileName: '鐢熶骇宸ュ崟.xls', source: data });
+ downloadFileFromBlobPart({ fileName: '鐢熶骇璁㈠崟.xls', source: data });
}
const [Grid, gridApi] = useVbenVxeGrid({
@@ -143,12 +143,12 @@
<template>
<Page auto-content-height><FormModal @success="handleRefresh" />
- <Grid table-title="鐢熶骇宸ュ崟鍒楄〃">
+ <Grid table-title="鐢熶骇璁㈠崟鍒楄〃">
<template #toolbar-tools>
<TableAction
:actions="[
{
- label: $t('ui.actionTitle.create', ['宸ュ崟']),
+ label: $t('ui.actionTitle.create', ['璁㈠崟']),
type: 'primary',
icon: ACTION_ICON.ADD,
auth: ['mes:pro-work-order:create'],
@@ -215,7 +215,7 @@
auth: ['mes:pro-work-order:update'],
ifShow: row.status === MesProWorkOrderStatusEnum.CONFIRMED,
popConfirm: {
- title: '纭瑕佸彇娑堣宸ュ崟鍚楋紵鍙栨秷鍚庝笉鍙仮澶嶃��',
+ title: '纭瑕佸彇娑堣璁㈠崟鍚楋紵鍙栨秷鍚庝笉鍙仮澶嶃��',
confirm: handleCancel.bind(null, row),
},
},
diff --git a/src/views/mes/pro/workorder/modules/bom-form.vue b/src/views/mes/pro/workorder/modules/bom-form.vue
index 50b6873..b67f28c 100644
--- a/src/views/mes/pro/workorder/modules/bom-form.vue
+++ b/src/views/mes/pro/workorder/modules/bom-form.vue
@@ -1,4 +1,4 @@
-<script lang="ts" setup>
+锘�<script lang="ts" setup>
import type { MesProWorkOrderBomApi } from '#/api/mes/pro/workorder/bom';
import { computed, ref } from 'vue';
@@ -19,7 +19,7 @@
const emit = defineEmits(['success']);
const formData = ref<MesProWorkOrderBomApi.WorkOrderBom>();
-const workOrderId = ref<number>(); // 鎵�灞炲伐鍗曠紪鍙�
+const workOrderId = ref<number>(); // 鎵�灞炶鍗曠紪鍙�
const getTitle = computed(() => {
return formData.value?.id
diff --git a/src/views/mes/pro/workorder/modules/bom-list.vue b/src/views/mes/pro/workorder/modules/bom-list.vue
index 14c8f82..35bd047 100644
--- a/src/views/mes/pro/workorder/modules/bom-list.vue
+++ b/src/views/mes/pro/workorder/modules/bom-list.vue
@@ -1,4 +1,4 @@
-<script lang="ts" setup>
+锘�<script lang="ts" setup>
import type { FormType } from '../data';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
@@ -43,7 +43,7 @@
);
const isConfirmed = computed(
() =>
- // 宸茬‘璁ゆ�佸彲鐢熸垚瀛愬伐鍗�
+ // 宸茬‘璁ゆ�佸彲鐢熸垚瀛愯鍗�
props.workOrder.status === MesProWorkOrderStatusEnum.CONFIRMED,
);
@@ -93,12 +93,12 @@
}
}
-/** 浠� BOM 琛岀敓鎴愬瓙宸ュ崟锛堥�氱煡鐖剁粍浠讹級 */
+/** 浠� BOM 琛岀敓鎴愬瓙璁㈠崟锛堥�氱煡鐖剁粍浠讹級 */
function handleGenerateWorkOrder(row: MesProWorkOrderBomApi.WorkOrderBom) {
emit('generateWorkOrder', row);
}
-/** 鏄惁灞曠ず鐢熸垚瀛愬伐鍗曟寜閽細宸茬‘璁� + 鑷埗 + 浜у搧绫诲瀷 BOM 琛� */
+/** 鏄惁灞曠ず鐢熸垚瀛愯鍗曟寜閽細宸茬‘璁� + 鑷埗 + 浜у搧绫诲瀷 BOM 琛� */
function showGenerate(row: MesProWorkOrderBomApi.WorkOrderBom) {
return (
isConfirmed.value &&
@@ -140,7 +140,7 @@
<template>
<div>
<BomFormModal @success="handleRefresh" />
- <Grid table-title="宸ュ崟 BOM">
+ <Grid table-title="璁㈠崟 BOM">
<template v-if="isEditable" #toolbar-tools>
<TableAction
:actions="[
@@ -175,7 +175,7 @@
},
},
{
- label: '鐢熸垚宸ュ崟',
+ label: '鐢熸垚璁㈠崟',
type: 'link',
ifShow: showGenerate(row),
onClick: handleGenerateWorkOrder.bind(null, row),
diff --git a/src/views/mes/pro/workorder/modules/form.vue b/src/views/mes/pro/workorder/modules/form.vue
index d8a1093..f01e02f 100644
--- a/src/views/mes/pro/workorder/modules/form.vue
+++ b/src/views/mes/pro/workorder/modules/form.vue
@@ -1,4 +1,4 @@
-<script lang="ts" setup>
+锘�<script lang="ts" setup>
import type { FormType } from '../data';
import type { MesProWorkOrderApi } from '#/api/mes/pro/workorder';
@@ -49,19 +49,19 @@
const isChild = !!formData.value?.parentId;
switch (formType.value) {
case 'confirm': {
- return '纭宸ュ崟';
+ return '纭璁㈠崟';
}
case 'detail': {
- return $t('ui.actionTitle.view', ['宸ュ崟']);
+ return $t('ui.actionTitle.view', ['璁㈠崟']);
}
case 'finish': {
- return '瀹屾垚宸ュ崟';
+ return '瀹屾垚璁㈠崟';
}
case 'update': {
- return isChild ? '缂栬緫瀛愬伐鍗�' : $t('ui.actionTitle.edit', ['宸ュ崟']);
+ return isChild ? '缂栬緫瀛愯鍗�' : $t('ui.actionTitle.edit', ['璁㈠崟']);
}
default: {
- return isChild ? '鏂板瀛愬伐鍗�' : $t('ui.actionTitle.create', ['宸ュ崟']);
+ return isChild ? '鏂板瀛愯鍗�' : $t('ui.actionTitle.create', ['璁㈠崟']);
}
}
});
@@ -86,7 +86,7 @@
modalApi.setState({ showConfirmButton: isEditable.value });
}
-/** 鏌ョ湅宸ュ崟鏉$爜 */
+/** 鏌ョ湅璁㈠崟鏉$爜 */
function handleBarcode() {
if (!formData.value?.id) {
return;
@@ -99,7 +99,7 @@
);
}
-/** 纭宸ュ崟锛氱紪杈戞�佹湁淇敼鏃跺厛淇濆瓨锛屽啀纭 */
+/** 纭璁㈠崟锛氱紪杈戞�佹湁淇敼鏃跺厛淇濆瓨锛屽啀纭 */
async function handleConfirm() {
const { valid } = await formApi.validate();
if (!valid || !formData.value?.id) {
@@ -117,7 +117,7 @@
}
}
await confirmWorkOrder(formData.value.id);
- message.success('宸ュ崟宸茬‘璁�');
+ message.success('璁㈠崟宸茬‘璁�');
await modalApi.close();
emit('success');
} finally {
@@ -125,7 +125,7 @@
}
}
-/** 瀹屾垚宸ュ崟 */
+/** 瀹屾垚璁㈠崟 */
async function handleFinish() {
if (!formData.value?.id) {
return;
@@ -133,7 +133,7 @@
modalApi.lock();
try {
await finishWorkOrder(formData.value.id);
- message.success('宸ュ崟宸插畬鎴�');
+ message.success('璁㈠崟宸插畬鎴�');
await modalApi.close();
emit('success');
} finally {
@@ -141,7 +141,7 @@
}
}
-/** 浠� BOM 鐗╂枡琛岄濉瓙宸ュ崟锛氬鐢ㄥ綋鍓嶅伐鍗曚笂涓嬫枃锛岃繘鍏ユ柊澧炴�� */
+/** 浠� BOM 鐗╂枡琛岄濉瓙璁㈠崟锛氬鐢ㄥ綋鍓嶈鍗曚笂涓嬫枃锛岃繘鍏ユ柊澧炴�� */
async function handleGenerateWorkOrder(
bomRow: MesProWorkOrderBomApi.WorkOrderBom,
) {
@@ -167,7 +167,7 @@
vendorId: current.vendorId,
});
originalSnapshot.value = JSON.stringify(await formApi.getValues());
- message.info('宸蹭粠 BOM 鐗╂枡棰勫~瀛愬伐鍗曪紝璇疯ˉ鍏呭伐鍗曠紪鐮佺瓑淇℃伅鍚庝繚瀛�');
+ message.info('宸蹭粠 BOM 鐗╂枡棰勫~瀛愯鍗曪紝璇疯ˉ鍏呰鍗曠紪鐮佺瓑淇℃伅鍚庝繚瀛�');
}
const [Modal, modalApi] = useVbenModal({
@@ -195,7 +195,7 @@
status: MesProWorkOrderStatusEnum.PREPARE,
};
formType.value = 'update';
- // 鍒涘缓鎴愬姛鍚庡垏鎹㈢紪杈戞�侊紝閲嶆寕 schema 璁┿�屽伐鍗曠姸鎬併�嶅瓧娈垫樉鐜�
+ // 鍒涘缓鎴愬姛鍚庡垏鎹㈢紪杈戞�侊紝閲嶆寕 schema 璁┿�岃鍗曠姸鎬併�嶅瓧娈垫樉鐜�
applySchema();
await formApi.setValues(formData.value);
}
@@ -231,7 +231,7 @@
modalApi.unlock();
}
} else if (data?.parentRow) {
- // 鏂板瀛愬伐鍗曟椂锛岄濉埗宸ュ崟淇℃伅
+ // 鏂板瀛愯鍗曟椂锛岄濉埗璁㈠崟淇℃伅
const parent = data.parentRow;
await formApi.setValues({
clientId: parent.clientId,
@@ -254,7 +254,7 @@
<!-- BOM / 鐗╂枡闇�姹� Tab锛氶潪鏂板缓鎬佸睍绀� -->
<template v-if="formData?.id">
<Tabs v-model:active-key="subTabsName" class="mx-4">
- <Tabs.TabPane key="bom" tab="宸ュ崟 BOM">
+ <Tabs.TabPane key="bom" tab="璁㈠崟 BOM">
<BomList
:form-type="formType"
:work-order="formData"
@@ -271,14 +271,14 @@
<div class="flex flex-auto items-center gap-2">
<Popconfirm
v-if="canConfirm || isConfirm"
- title="纭瑕佸畬鎴愬伐鍗曠紪鍒跺悧锛熺‘璁ゅ悗灏嗕笉鑳芥洿鏀广��"
+ title="纭瑕佸畬鎴愯鍗曠紪鍒跺悧锛熺‘璁ゅ悗灏嗕笉鑳芥洿鏀广��"
@confirm="handleConfirm"
>
<Button type="primary">纭</Button>
</Popconfirm>
<Popconfirm
v-if="isFinish"
- title="纭瑕佸畬鎴愯宸ュ崟鍚楋紵"
+ title="纭瑕佸畬鎴愯璁㈠崟鍚楋紵"
@confirm="handleFinish"
>
<Button type="primary">瀹屾垚</Button>
diff --git a/src/views/mes/qc/batchtrace/data.ts b/src/views/mes/qc/batchtrace/data.ts
index 35f1412..52e9620 100644
--- a/src/views/mes/qc/batchtrace/data.ts
+++ b/src/views/mes/qc/batchtrace/data.ts
@@ -1,4 +1,4 @@
-import type { VbenFormSchema } from '#/adapter/form';
+锘縤mport type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MesWmBatchApi } from '#/api/mes/wm/batch';
import type { DescriptionItemSchema } from '#/components/description';
@@ -138,7 +138,7 @@
return [
{
field: 'workOrderCode',
- title: '鐢熶骇宸ュ崟鍙�',
+ title: '鐢熶骇璁㈠崟鍙�',
width: 160,
},
{
@@ -219,7 +219,7 @@
},
{
field: 'workOrderCode',
- label: '鐢熶骇宸ュ崟',
+ label: '鐢熶骇璁㈠崟',
},
{
field: 'workstationCode',
diff --git a/src/views/mes/qc/ipqc/data.ts b/src/views/mes/qc/ipqc/data.ts
index 3cfe8e6..60836e7 100644
--- a/src/views/mes/qc/ipqc/data.ts
+++ b/src/views/mes/qc/ipqc/data.ts
@@ -1,4 +1,4 @@
-import type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
+锘縤mport type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MesQcIpqcApi } from '#/api/mes/qc/ipqc';
import type { MesQcIpqcLineApi } from '#/api/mes/qc/ipqc/line';
@@ -151,12 +151,12 @@
},
{
fieldName: 'workOrderId',
- label: '鐢熶骇宸ュ崟',
+ label: '鐢熶骇璁㈠崟',
component: markRaw(ProWorkOrderSelect),
componentProps: {
- placeholder: '璇烽�夋嫨鐢熶骇宸ュ崟',
+ placeholder: '璇烽�夋嫨鐢熶骇璁㈠崟',
status: MesProWorkOrderStatusEnum.CONFIRMED,
- // 宸ュ崟鍙樻洿鏃舵竻绌虹敓浜т换鍔�
+ // 璁㈠崟鍙樻洿鏃舵竻绌虹敓浜т换鍔�
onChange: () => formApi?.setFieldValue('taskId', undefined),
},
rules: 'selectRequired',
@@ -164,7 +164,7 @@
triggerFields: ['sourceDocId'],
componentProps: (values) => ({
disabled: !!values.sourceDocId,
- placeholder: '璇烽�夋嫨鐢熶骇宸ュ崟',
+ placeholder: '璇烽�夋嫨鐢熶骇璁㈠崟',
status: MesProWorkOrderStatusEnum.CONFIRMED,
onChange: () => formApi?.setFieldValue('taskId', undefined),
}),
@@ -379,10 +379,10 @@
},
{
fieldName: 'workOrderId',
- label: '鐢熶骇宸ュ崟',
+ label: '鐢熶骇璁㈠崟',
component: markRaw(ProWorkOrderSelect),
componentProps: {
- placeholder: '璇烽�夋嫨鐢熶骇宸ュ崟',
+ placeholder: '璇烽�夋嫨鐢熶骇璁㈠崟',
},
},
{
@@ -431,7 +431,7 @@
},
{
field: 'workOrderCode',
- title: '鐢熶骇宸ュ崟缂栧彿',
+ title: '鐢熶骇璁㈠崟缂栧彿',
width: 140,
},
{
diff --git a/src/views/mes/wm/barcode/data.ts b/src/views/mes/wm/barcode/data.ts
index 0f6357d..f52d7ca 100644
--- a/src/views/mes/wm/barcode/data.ts
+++ b/src/views/mes/wm/barcode/data.ts
@@ -1,4 +1,4 @@
-import type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
+锘縤mport type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MesWmBarcodeApi } from '#/api/mes/wm/barcode';
import type { MesWmBarcodeConfigApi } from '#/api/mes/wm/barcode/config';
@@ -221,7 +221,7 @@
},
{
fieldName: 'bizId',
- label: '宸ュ崟',
+ label: '璁㈠崟',
component: markRaw(ProWorkOrderSelect),
componentProps: {
status: MesProWorkOrderStatusEnum.CONFIRMED,
diff --git a/src/views/mes/wm/batch/data.ts b/src/views/mes/wm/batch/data.ts
index 472be86..6d8aa31 100644
--- a/src/views/mes/wm/batch/data.ts
+++ b/src/views/mes/wm/batch/data.ts
@@ -1,4 +1,4 @@
-import type { VbenFormSchema } from '#/adapter/form';
+锘縤mport type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MesWmBatchApi } from '#/api/mes/wm/batch';
import type { DescriptionItemSchema } from '#/components/description';
@@ -57,10 +57,10 @@
},
{
fieldName: 'workOrderId',
- label: '鐢熶骇宸ュ崟',
+ label: '鐢熶骇璁㈠崟',
component: markRaw(ProWorkOrderSelect),
componentProps: {
- placeholder: '璇烽�夋嫨鐢熶骇宸ュ崟',
+ placeholder: '璇烽�夋嫨鐢熶骇璁㈠崟',
},
},
{
@@ -229,7 +229,7 @@
},
{
field: 'workOrderCode',
- title: '宸ュ崟缂栫爜',
+ title: '璁㈠崟缂栫爜',
width: 140,
},
{
@@ -351,7 +351,7 @@
},
{
field: 'workOrderCode',
- label: '鐢熶骇宸ュ崟',
+ label: '鐢熶骇璁㈠崟',
render: (value) => value || '-',
},
{
diff --git a/src/views/mes/wm/outsourceissue/data.ts b/src/views/mes/wm/outsourceissue/data.ts
index 5746d2e..0253e05 100644
--- a/src/views/mes/wm/outsourceissue/data.ts
+++ b/src/views/mes/wm/outsourceissue/data.ts
@@ -1,4 +1,4 @@
-import type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
+锘縤mport type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MesProWorkOrderApi } from '#/api/mes/pro/workorder';
import type { MesWmMaterialStockApi } from '#/api/mes/wm/materialstock';
@@ -105,10 +105,10 @@
},
{
fieldName: 'workOrderId',
- label: '澶栧崗宸ュ崟',
+ label: '澶栧崗璁㈠崟',
component: markRaw(ProWorkOrderSelect),
componentProps: {
- // 閫夋嫨澶栧崗宸ュ崟鍚庯紝鑷姩鍥炲~渚涘簲鍟�
+ // 閫夋嫨澶栧崗璁㈠崟鍚庯紝鑷姩鍥炲~渚涘簲鍟�
onChange: async (workOrder?: MesProWorkOrderApi.WorkOrder) => {
await formApi?.setFieldValue('vendorId', workOrder?.vendorId);
},
@@ -195,7 +195,7 @@
},
{
field: 'workOrderCode',
- title: '鐢熶骇宸ュ崟鍙�',
+ title: '鐢熶骇璁㈠崟鍙�',
minWidth: 140,
},
{
diff --git a/src/views/mes/wm/outsourcereceipt/data.ts b/src/views/mes/wm/outsourcereceipt/data.ts
index 2049d3d..f05cb1d 100644
--- a/src/views/mes/wm/outsourcereceipt/data.ts
+++ b/src/views/mes/wm/outsourcereceipt/data.ts
@@ -1,4 +1,4 @@
-import type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
+锘縤mport type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MesProWorkOrderApi } from '#/api/mes/pro/workorder';
import type { MesWmOutsourceReceiptApi } from '#/api/mes/wm/outsourcereceipt';
@@ -95,10 +95,10 @@
},
{
fieldName: 'workOrderId',
- label: '澶栧崗宸ュ崟',
+ label: '澶栧崗璁㈠崟',
component: markRaw(ProWorkOrderSelect),
componentProps: {
- // 閫夋嫨澶栧崗宸ュ崟鍚庯紝鑷姩鍥炲~渚涘簲鍟�
+ // 閫夋嫨澶栧崗璁㈠崟鍚庯紝鑷姩鍥炲~渚涘簲鍟�
onChange: async (workOrder?: MesProWorkOrderApi.WorkOrder) => {
await formApi?.setFieldValue('vendorId', workOrder?.vendorId);
},
@@ -162,11 +162,11 @@
},
{
fieldName: 'workOrderCode',
- label: '澶栧崗宸ュ崟鍙�',
+ label: '澶栧崗璁㈠崟鍙�',
component: 'Input',
componentProps: {
allowClear: true,
- placeholder: '璇疯緭鍏ュ鍗忓伐鍗曞彿',
+ placeholder: '璇疯緭鍏ュ鍗忚鍗曞彿',
},
},
{
@@ -218,7 +218,7 @@
},
{
field: 'workOrderCode',
- title: '澶栧崗宸ュ崟鍙�',
+ title: '澶栧崗璁㈠崟鍙�',
minWidth: 140,
},
{
diff --git a/src/views/mes/wm/packages/data.ts b/src/views/mes/wm/packages/data.ts
index 45a8e54..26ad266 100644
--- a/src/views/mes/wm/packages/data.ts
+++ b/src/views/mes/wm/packages/data.ts
@@ -1,4 +1,4 @@
-import type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
+锘縤mport type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MesWmPackageApi } from '#/api/mes/wm/packages';
import type { MesWmPackageLineApi } from '#/api/mes/wm/packages/line';
@@ -419,10 +419,10 @@
return [
{
fieldName: 'workOrderId',
- label: '鐢熶骇宸ュ崟',
+ label: '鐢熶骇璁㈠崟',
component: markRaw(ProWorkOrderSelect),
componentProps: {
- placeholder: '璇烽�夋嫨鐢熶骇宸ュ崟',
+ placeholder: '璇烽�夋嫨鐢熶骇璁㈠崟',
status: MesProWorkOrderStatusEnum.CONFIRMED,
},
rules: 'selectRequired',
@@ -501,7 +501,7 @@
},
{
field: 'workOrderCode',
- title: '鐢熶骇宸ュ崟缂栧彿',
+ title: '鐢熶骇璁㈠崟缂栧彿',
minWidth: 140,
},
{
diff --git a/src/views/mes/wm/productissue/data.ts b/src/views/mes/wm/productissue/data.ts
index 70f9259..4757aa2 100644
--- a/src/views/mes/wm/productissue/data.ts
+++ b/src/views/mes/wm/productissue/data.ts
@@ -1,4 +1,4 @@
-import type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
+锘縤mport type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MesWmMaterialStockApi } from '#/api/mes/wm/materialstock';
import type { MesWmProductIssueApi } from '#/api/mes/wm/productissue';
@@ -107,7 +107,7 @@
},
{
fieldName: 'workOrderId',
- label: '鐢熶骇宸ュ崟',
+ label: '鐢熶骇璁㈠崟',
component: markRaw(ProWorkOrderSelect),
componentProps: {
status: MesProWorkOrderStatusEnum.CONFIRMED,
@@ -197,7 +197,7 @@
},
{
field: 'workOrderCode',
- title: '鐢熶骇宸ュ崟',
+ title: '鐢熶骇璁㈠崟',
minWidth: 140,
},
{
diff --git a/src/views/mes/wm/productreceipt/data.ts b/src/views/mes/wm/productreceipt/data.ts
index 38eee51..5da7ca7 100644
--- a/src/views/mes/wm/productreceipt/data.ts
+++ b/src/views/mes/wm/productreceipt/data.ts
@@ -1,4 +1,4 @@
-import type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
+锘縤mport type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MesWmMaterialStockApi } from '#/api/mes/wm/materialstock';
import type { MesWmProductReceiptApi } from '#/api/mes/wm/productreceipt';
@@ -104,7 +104,7 @@
},
{
fieldName: 'workOrderId',
- label: '鐢熶骇宸ュ崟',
+ label: '鐢熶骇璁㈠崟',
component: markRaw(ProWorkOrderSelect),
componentProps: {
status: MesProWorkOrderStatusEnum.CONFIRMED,
@@ -172,7 +172,7 @@
},
{
field: 'workOrderCode',
- title: '鐢熶骇宸ュ崟',
+ title: '鐢熶骇璁㈠崟',
minWidth: 140,
},
{
diff --git a/src/views/mes/wm/returnissue/data.ts b/src/views/mes/wm/returnissue/data.ts
index 81b5375..74997cd 100644
--- a/src/views/mes/wm/returnissue/data.ts
+++ b/src/views/mes/wm/returnissue/data.ts
@@ -1,4 +1,4 @@
-import type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
+锘縤mport type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MesWmMaterialStockApi } from '#/api/mes/wm/materialstock';
import type { MesWmReturnIssueApi } from '#/api/mes/wm/returnissue';
@@ -105,7 +105,7 @@
},
{
fieldName: 'workOrderId',
- label: '鐢熶骇宸ュ崟',
+ label: '鐢熶骇璁㈠崟',
component: markRaw(ProWorkOrderSelect),
componentProps: {
status: MesProWorkOrderStatusEnum.CONFIRMED,
@@ -168,10 +168,10 @@
},
{
fieldName: 'workOrderId',
- label: '鐢熶骇宸ュ崟',
+ label: '鐢熶骇璁㈠崟',
component: markRaw(ProWorkOrderSelect),
componentProps: {
- placeholder: '璇烽�夋嫨鐢熶骇宸ュ崟',
+ placeholder: '璇烽�夋嫨鐢熶骇璁㈠崟',
},
},
{
@@ -212,7 +212,7 @@
},
{
field: 'workOrderCode',
- title: '鐢熶骇宸ュ崟',
+ title: '鐢熶骇璁㈠崟',
minWidth: 140,
},
{
--
Gitblit v1.9.3