From 244d3d199047018fe30a7c287afec6d047ed5f73 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 14 十月 2026 15:51:55 +0800
Subject: [PATCH] fix(hrm): 薪资核算页去掉「执行核算」按钮,强制走「预览数据 → 保存核算」流程

---
 src/views/mes/qc/ledger/data.ts |  200 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 200 insertions(+), 0 deletions(-)

diff --git a/src/views/mes/qc/ledger/data.ts b/src/views/mes/qc/ledger/data.ts
new file mode 100644
index 0000000..8bf9f20
--- /dev/null
+++ b/src/views/mes/qc/ledger/data.ts
@@ -0,0 +1,200 @@
+import type { VbenFormSchema } from '#/adapter/form';
+import type { VxeTableGridOptions } from '#/adapter/vxe-table';
+import type { MesQcInspectionLedgerApi } from '#/api/mes/qc/ledger';
+
+import { markRaw } from 'vue';
+
+import { DICT_TYPE } from '@vben/constants';
+import { getDictOptions } from '@vben/hooks';
+
+import { getSimpleUserList } from '#/api/system/user';
+import { getRangePickerDefaultProps } from '#/utils';
+import { MdmItemSelect } from '#/views/basicData/mdm/components';
+
+/** 鍒楄〃鐨勬悳绱㈣〃鍗� */
+export function useGridFormSchema(): VbenFormSchema[] {
+  return [
+    {
+      fieldName: 'qcType',
+      label: '鍒嗙被',
+      component: 'Select',
+      componentProps: {
+        allowClear: true,
+        options: getDictOptions(DICT_TYPE.MES_QC_TYPE, 'number'),
+        placeholder: '璇烽�夋嫨鍒嗙被',
+      },
+    },
+    {
+      fieldName: 'inspectDate',
+      label: '妫�娴嬫棩鏈�',
+      component: 'RangePicker',
+      componentProps: {
+        ...getRangePickerDefaultProps(),
+      },
+    },
+    {
+      fieldName: 'code',
+      label: '妫�楠屽崟缂栧彿',
+      component: 'Input',
+      componentProps: {
+        allowClear: true,
+        placeholder: '璇疯緭鍏ユ楠屽崟缂栧彿',
+      },
+    },
+    {
+      fieldName: 'itemId',
+      label: '浜у搧鐗╂枡',
+      component: markRaw(MdmItemSelect),
+      componentProps: {
+        placeholder: '璇烽�夋嫨浜у搧鐗╂枡',
+      },
+    },
+    {
+      fieldName: 'batchNo',
+      label: '鎵规鍙�',
+      component: 'Input',
+      componentProps: {
+        allowClear: true,
+        placeholder: '璇疯緭鍏ユ壒娆″彿',
+      },
+    },
+    {
+      fieldName: 'checkResult',
+      label: '妫�娴嬬粨鏋�',
+      component: 'Select',
+      componentProps: {
+        allowClear: true,
+        options: getDictOptions(DICT_TYPE.MES_QC_CHECK_RESULT, 'number'),
+        placeholder: '璇烽�夋嫨妫�娴嬬粨鏋�',
+      },
+    },
+    {
+      fieldName: 'inspectorUserId',
+      label: '妫�娴嬩汉鍛�',
+      component: 'ApiSelect',
+      componentProps: {
+        allowClear: true,
+        api: getSimpleUserList,
+        labelField: 'nickname',
+        placeholder: '璇烽�夋嫨妫�娴嬩汉鍛�',
+        valueField: 'id',
+      },
+    },
+  ];
+}
+
+/** 鍒楄〃鐨勫瓧娈碉紙涓�琛屼竴涓娴嬮」缁撴灉锛� */
+export function useGridColumns(): VxeTableGridOptions<MesQcInspectionLedgerApi.Ledger>['columns'] {
+  return [
+    {
+      field: 'qcType',
+      title: '鍒嗙被',
+      width: 130,
+      cellRender: {
+        name: 'CellDict',
+        props: { type: DICT_TYPE.MES_QC_TYPE },
+      },
+    },
+    {
+      field: 'code',
+      title: '妫�楠屽崟缂栧彿',
+      width: 170,
+    },
+    {
+      field: 'name',
+      title: '妫�楠屽崟鍚嶇О',
+      minWidth: 180,
+      showOverflow: 'tooltip',
+    },
+    {
+      field: 'itemCode',
+      title: '鐗╂枡缂栫爜',
+      width: 130,
+    },
+    {
+      field: 'itemName',
+      title: '鐗╂枡鍚嶇О',
+      minWidth: 150,
+      showOverflow: 'tooltip',
+    },
+    {
+      field: 'itemSpecification',
+      title: '瑙勬牸鍨嬪彿',
+      minWidth: 140,
+      showOverflow: 'tooltip',
+    },
+    {
+      field: 'batchNo',
+      title: '鎵规鍙�',
+      width: 130,
+    },
+    {
+      field: 'indicatorName',
+      title: '妫�娴嬮」',
+      minWidth: 140,
+      showOverflow: 'tooltip',
+    },
+    {
+      field: 'indicatorValue',
+      title: '妫�娴嬪��',
+      minWidth: 120,
+      showOverflow: 'tooltip',
+    },
+    {
+      field: 'judgementBasis',
+      title: '鍒ゅ畾渚濇嵁',
+      minWidth: 120,
+      showOverflow: 'tooltip',
+    },
+    {
+      field: 'checkResult',
+      title: '妫�娴嬬粨鏋�',
+      width: 110,
+      cellRender: {
+        name: 'CellDict',
+        props: { type: DICT_TYPE.MES_QC_CHECK_RESULT },
+      },
+    },
+    {
+      field: 'checkQuantity',
+      title: '妫�娴嬫暟閲�',
+      width: 100,
+    },
+    {
+      field: 'qualifiedQuantity',
+      title: '鍚堟牸鏁伴噺',
+      width: 100,
+    },
+    {
+      field: 'unqualifiedQuantity',
+      title: '涓嶅悎鏍兼暟閲�',
+      width: 110,
+    },
+    {
+      field: 'inspectorName',
+      title: '妫�娴嬩汉鍛�',
+      width: 110,
+    },
+    {
+      field: 'inspectDate',
+      title: '妫�娴嬫棩鏈�',
+      width: 170,
+      formatter: 'formatDateTime',
+    },
+    {
+      field: 'status',
+      title: '鍗曟嵁鐘舵��',
+      width: 110,
+      cellRender: {
+        name: 'CellDict',
+        props: { type: DICT_TYPE.MES_ORDER_STATUS },
+      },
+    },
+    {
+      field: 'remark',
+      title: '澶囨敞',
+      minWidth: 160,
+      showOverflow: 'tooltip',
+    },
+  ];
+}

--
Gitblit v1.9.3