Ben Lin
2024-06-07 aa0bc81d06736cc1a1bd210dde61f57736585d43
src/views/tigerprojects/system/lowcode/normal/basDefectGrp.ts
@@ -1,16 +1,18 @@
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 = {
@@ -20,3 +22,51 @@
  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',
  });
}