From 889d8ddf4c13c1b1bdbabd04c2d80b904020151e Mon Sep 17 00:00:00 2001
From: hsy <1029150275@qq.com>
Date: 星期三, 19 八月 2026 12:49:24 +0800
Subject: [PATCH] 生产订单与报工模块改造汇总 (Git Commit 文档) feat(mes-pro): 生产订单及报工模块审批流与批次填报改造 1. 生产订单功能增强 (Work Order)
---
src/views/mes/pro/task/data.ts | 58 ++++++++++++++++++++++++++++++++++++++++++----------------
1 files changed, 42 insertions(+), 16 deletions(-)
diff --git a/src/views/mes/pro/task/data.ts b/src/views/mes/pro/task/data.ts
index a24e576..12cfcb1 100644
--- a/src/views/mes/pro/task/data.ts
+++ b/src/views/mes/pro/task/data.ts
@@ -1,5 +1,7 @@
-锘縤mport type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
+import type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
+import { z } from '#/adapter/form';
+import { getSimpleUserListByRoleCode } from '#/api/system/user';
import type { MesProTaskApi } from '#/api/mes/pro/task';
import type { MesProWorkOrderApi } from '#/api/mes/pro/workorder';
@@ -130,15 +132,33 @@
width: 80,
},
{
+ field: 'status',
+ title: '璁㈠崟鐘舵��',
+ width: 100,
+ cellRender: {
+ name: 'CellDict',
+ props: { type: DICT_TYPE.MES_PRO_WORK_ORDER_STATUS },
+ },
+ },
+ {
+ field: 'productionStatus',
+ title: '鐢熶骇鐘舵��',
+ width: 100,
+ cellRender: {
+ name: 'CellDict',
+ props: { type: DICT_TYPE.ORDER_PRODUCTION_STATUS },
+ },
+ },
+ {
field: 'quantity',
title: '璁㈠崟鏁伴噺',
width: 100,
},
- {
- field: 'quantityChanged',
- title: '璋冩暣鏁伴噺',
- width: 100,
- },
+ // {
+ // field: 'quantityChanged',
+ // title: '璋冩暣鏁伴噺',
+ // width: 100,
+ // },
{
field: 'quantityProduced',
title: '宸茬敓浜ф暟閲�',
@@ -160,15 +180,7 @@
width: 120,
formatter: 'formatDate',
},
- {
- field: 'status',
- title: '鎺掍骇鐘舵��',
- width: 100,
- cellRender: {
- name: 'CellDict',
- props: { type: DICT_TYPE.MES_PRO_WORK_ORDER_STATUS },
- },
- },
+
{
title: '鎿嶄綔',
width: 160,
@@ -381,7 +393,7 @@
}
/** 鐢熶骇浠诲姟鏂板/淇敼鐨勮〃鍗� */
-export function useTaskFormSchema(formApi?: VbenFormApi, workOrderQuantity?: Ref<number | undefined>): VbenFormSchema[] {
+export function useTaskFormSchema(formApi?: VbenFormApi, workOrderQuantity?: Ref<number | undefined>, feedbackRole?: Ref<string | undefined>): VbenFormSchema[] {
return [
{
fieldName: 'workstationId',
@@ -458,6 +470,20 @@
},
},
{
+ fieldName: 'assigneeUserIds',
+ label: '鎶ュ伐浜�',
+ component: 'ApiSelect',
+ componentProps: {
+ placeholder: '璇烽�夋嫨鎶ュ伐浜�',
+ api: getSimpleUserListByRoleCode,
+ params: { code: feedbackRole?.value || 'production_submit_work' },
+ labelField: 'nickname',
+ valueField: 'id',
+ mode: 'multiple',
+ },
+ rules: z.array(z.number()).min(1, '璇烽�夋嫨鎶ュ伐浜�').default([]),
+ },
+ {
fieldName: 'remark',
label: '澶囨敞',
component: 'Textarea',
--
Gitblit v1.9.3