From ea9d117374e44d9eac0309ea2687b439f89b07b4 Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期三, 16 九月 2026 17:45:16 +0800
Subject: [PATCH] feat(mes): 生产排产新增任务报工人下拉源调整为工作站人力配置
---
src/views/system/approvalConfig/data.ts | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 111 insertions(+), 0 deletions(-)
diff --git a/src/views/system/approvalConfig/data.ts b/src/views/system/approvalConfig/data.ts
new file mode 100644
index 0000000..1d1b06d
--- /dev/null
+++ b/src/views/system/approvalConfig/data.ts
@@ -0,0 +1,111 @@
+import type { VbenFormSchema } from '#/adapter/form';
+import type { VxeTableGridOptions } from '#/adapter/vxe-table';
+
+import { getSimpleUserList } from '#/api/system/user';
+
+/** 鍒楄〃鐨勬悳绱㈣〃鍗� */
+export function useGridFormSchema(): VbenFormSchema[] {
+ return [
+ {
+ fieldName: 'bizName',
+ label: '涓氬姟绫诲瀷',
+ component: 'Input',
+ componentProps: {
+ allowClear: true,
+ placeholder: '璇疯緭鍏ヤ笟鍔$被鍨嬪悕绉�',
+ },
+ },
+ {
+ fieldName: 'approvalEnabled',
+ label: '鏄惁鍚敤',
+ component: 'Select',
+ componentProps: {
+ allowClear: true,
+ options: [
+ { label: '宸插惎鐢�', value: true },
+ { label: '鏈惎鐢�', value: false },
+ ],
+ placeholder: '璇烽�夋嫨鏄惁鍚敤',
+ },
+ },
+ ];
+}
+
+/** 鍒楄〃鐨勫瓧娈� */
+export function useGridColumns(): VxeTableGridOptions['columns'] {
+ return [
+ { field: 'bizName', title: '涓氬姟绫诲瀷', minWidth: 160 },
+ { field: 'bizType', title: '涓氬姟缂栫爜', minWidth: 200 },
+ {
+ field: 'approvalEnabled',
+ title: '鏄惁鍚敤瀹℃壒',
+ width: 120,
+ align: 'center',
+ slots: { default: 'approvalEnabled' },
+ },
+ {
+ field: 'userNames',
+ title: '瀹℃壒浜�',
+ minWidth: 200,
+ slots: { default: 'userNames' },
+ },
+ { field: 'remark', title: '澶囨敞', minWidth: 200 },
+ { title: '鎿嶄綔', width: 140, fixed: 'right', slots: { default: 'actions' } },
+ ];
+}
+
+/** 閰嶇疆琛ㄥ崟锛氫笟鍔$被鍨� + 鍚敤寮�鍏� + 瀹℃壒浜� */
+export function useConfigFormSchema(): VbenFormSchema[] {
+ return [
+ {
+ fieldName: 'bizName',
+ label: '涓氬姟绫诲瀷',
+ component: 'Input',
+ componentProps: {
+ disabled: true,
+ },
+ },
+ {
+ fieldName: 'bizType',
+ label: '涓氬姟缂栫爜',
+ component: 'Input',
+ componentProps: {
+ disabled: true,
+ },
+ },
+ {
+ fieldName: 'approvalEnabled',
+ label: '鍚敤瀹℃壒',
+ component: 'Switch',
+ defaultValue: false,
+ componentProps: {
+ checkedChildren: '鍚敤',
+ unCheckedChildren: '鍋滅敤',
+ },
+ help: '鍋滅敤鍚庤涓氬姟绫诲瀷灏嗘棤娉曟彁浜ゅ鏍�',
+ },
+ {
+ fieldName: 'userIds',
+ label: '瀹℃壒浜�',
+ component: 'ApiSelect',
+ componentProps: {
+ api: getSimpleUserList,
+ labelField: 'nickname',
+ valueField: 'id',
+ mode: 'multiple',
+ allowClear: true,
+ placeholder: '璇烽�夋嫨瀹℃壒浜�',
+ },
+ help: '鍙厤缃涓鎵逛汉锛屽涓鎵逛汉涔嬮棿涓恒�屾垨绛俱�嶏紝鍗充换鎰忎竴浜哄鏍搁�氳繃鍗充负閫氳繃',
+ },
+ {
+ fieldName: 'remark',
+ label: '澶囨敞',
+ component: 'Textarea',
+ componentProps: {
+ rows: 3,
+ placeholder: '璇疯緭鍏ュ娉�',
+ },
+ },
+ ];
+}
--
Gitblit v1.9.3