Ben Lin
2024-06-07 62541dd3e9ea18836bec9ab6f35d2a7b9dd1e741
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import { ActionItem, BasicColumn } from '/@/components/Table';
import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n';
import { FunctionType } from '/@/api/tigerapi/model/systemModel';
 
const { t } = useI18n();
const { notification } = useMessage();
/* 自定义按钮方法 */
export function RsGrpRelease(reload: Fn, params: {}) {
  console.log('点击了下发按钮');
  notification.success({
    message: '点击了下发按钮',
    description: `${params.entityName}`,
    duration: 3,
  });
  reload();
}
 
export const rsGrpactionColumn: BasicColumn = {
  width: 180,
  title: '操作',
  dataIndex: 'action',
  slots: { customRender: 'action' },
  fixed: undefined,
};
 
export const rsGrpActionItem: ActionItem[] = [
  {
    icon: 'release|svg',
    tooltip: '下发',
    onClick: () => {},
  },
];
 
export function rsGrpGetSelectSuccess(d, u) {
  return {
    RSNG_CODE: d.values['val'],
  };
}
 
export function rsGrpOpenSelectItem(openItemModal: Fn) {
  openItemModal(true, {
    title: '不良原因组列表',
    schemas: [
      {
        field: 'RSNG_CODE',
        component: 'Input',
        label: '不良原因组代码',
        colProps: {
          span: 12,
        },
      },
    ],
    ItemColumns: [
      {
        title: t('不良原因组代码'),
        dataIndex: 'RSNG_CODE',
        resizable: true,
        sorter: true,
        width: 200,
      },
      {
        title: t('不良原因组名称'),
        dataIndex: 'RSNG_NAME',
        resizable: true,
        sorter: true,
        width: 180,
      },
    ],
    tableName: 'BAS_REASON_GRP',
    rowKey: 'RSNG_CODE',
  });
}
 
/* Select onChange 方法字典 */
export const onChangeFns: Record<string, FunctionType> = {
  ABC: (e) => {
    notification.success({
      message: '进入了onChange函数',
      description: `${e}`,
      duration: 3,
    });
  },
  XXX: (e) => {},
};