| | |
| | | import { ActionItem, BasicColumn } from '/@/components/Table'; |
| | | import { useMessage } from '/@/hooks/web/useMessage'; |
| | | import { useI18n } from '/@/hooks/web/useI18n'; |
| | | |
| | | const { t } = useI18n(); |
| | | const { notification } = useMessage(); |
| | | /* 自定义按钮方法 */ |
| | | export function DftGrpRelease(fn: Fn, params: {}) { |
| | | export function DftGrpRelease(reload: Fn, params: {}) { |
| | | console.log('点击了下发按钮'); |
| | | notification.success({ |
| | | message: '点击了下发按钮', |
| | | description: `${params.entityName}`, |
| | | duration: 3, |
| | | }); |
| | | fn(); |
| | | reload(); |
| | | } |
| | | |
| | | export const dftGrpactionColumn: BasicColumn = { |
| | |
| | | slots: { customRender: 'action' }, |
| | | fixed: undefined, |
| | | }; |
| | | |
| | | export const dftGrpActionItem: ActionItem[] = [ |
| | | { |
| | | icon: 'release|svg', |
| | | tooltip: '下发', |
| | | onClick: () => {}, |
| | | }, |
| | | ]; |
| | | |
| | | export function dftGrpGetSelectSuccess(d, u) { |
| | | return { |
| | | ITEM_CODE: d.values['val'], |
| | | }; |
| | | } |
| | | |
| | | export function dftGrpOpenSelectItem(openItemModal: Fn) { |
| | | openItemModal(true, { |
| | | title: '物料列表', |
| | | schemas: [ |
| | | { |
| | | field: 'ITEM_CODE', |
| | | component: 'Input', |
| | | label: '物料编码', |
| | | colProps: { |
| | | span: 12, |
| | | }, |
| | | }, |
| | | ], |
| | | ItemColumns: [ |
| | | { |
| | | title: t('物料编码'), |
| | | dataIndex: 'ITEM_CODE', |
| | | resizable: true, |
| | | sorter: true, |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: t('物料名称'), |
| | | dataIndex: 'ITEM_NAME', |
| | | resizable: true, |
| | | sorter: true, |
| | | width: 180, |
| | | }, |
| | | ], |
| | | tableName: 'BAS_ITEM', |
| | | rowKey: 'ITEM_CODE', |
| | | }); |
| | | } |