yyg1378265336
2025-02-27 8099042b51891d1e58d6066f0247ba423f4457bd
src/views/tigerprojects/system/lowcode/entityts/BAS_DEFECT.ts
@@ -4,7 +4,7 @@
 * @version:
 * @Date: 2024-06-19 20:34:27
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-07-02 20:00:10
 * @LastEditTime: 2024-07-04 11:21:28
 */
import { Ref, h, unref } from 'vue';
@@ -17,7 +17,7 @@
import { Tag } from 'ant-design-vue';
import { useLocale } from '/@/locales/useLocale';
import { useDrawer } from '/@/components/Drawer';
import { EditOperation, Search } from '../data';
import { EditOperation, Search, custDel } from '../data';
const { getLocale } = useLocale();
function _default() {
@@ -38,7 +38,7 @@
     * @description: 获取新增按钮的行为
     * @return {*}
     */
    CreateAction: (fnName: string) => {
    CreateAction: (type: string) => {
      return {
        action: 'drawer', //drawer(打开左侧抽屉框) | go(跳转到新的页面)
      };
@@ -49,7 +49,7 @@
     */
    ActionItem: (params: Recordable<any>, data, ...args): ActionItem[] => {
      if (!isNullOrUnDef(data[1])) {
        data[1].popConfirm.confirm = DftGrpDel.bind(null, args, params);
        data[1].popConfirm.confirm = custDel.bind(null, args, params);
      }
      return data;
    },
@@ -120,7 +120,7 @@
          slots: [],
          preIcons: {},
          title: '不良代码组信息',
          entityName: 'BAS_DEFECT_GRP',
          entityName: 'BAS_DEFECT_GRP',
        },
        // {
        //   name: 'prodinfo',
@@ -158,7 +158,7 @@
            submitFunc: () => Search('BAS_DEFECT', data, args[0]), //自定义查询提交按钮的方法,触发查询提交事件
          },
          useSearchForm: true,
          showTableSetting: true,
          showTableSetting: false,
          bordered: true,
          canResize: true,
          showIndexColumn: false,
@@ -192,7 +192,7 @@
      }
      return data;
    },
    OthersValues: (val: string, id: string) => {
    KeyFieldValues: (val: string, id: string) => {
      return { DFTG_CODE: val };
    } /**
     * @description: 自定义明细表中编辑返回方法
@@ -230,33 +230,12 @@
        }
      };
    },
    GetUseForm: () => {
      return {};
    },
  };
  /**
   * @description: 自定义删除方法
   * @param {Fn} args
   * @param {*} params
   * @return {*}
   */
  function DftGrpDel(args: Fn[], params: {}) {
    if (!isNullOrEmpty(params['data'])) {
      var _data = params['data'].value.filter((item) => item['ID'] != params['record']['ID']);
      params['data'].value = _data;
      args[6]({
        dataSource: [],
      });
      args[6]({
        dataSource: params['data'],
      });
      args[1]();
    } else {
      DeleteEntity(params['record'], params['entityName']).then((action) => {
        if (action.IsSuccessed) {
          args[1]();
        }
      });
    }
  }
  /* 以下是内部方法,不export,供上面的方法调用 */
  const baseColumns = {
    BAS_DEFECT: [