/**
 * Namespace Api
 *
 * All backend api type
 */
declare namespace Api {
  namespace Common {
    /** common params of paginating */
    interface PaginatingCommonParams {
      /** current page number */
      current: number;
      /** page size */
      size: number;
      /** total count */
      total: number;
    }

    /** common params of paginating query list data */
    interface PaginatingQueryRecord<T = any> extends PaginatingCommonParams {
      records: T[];
    }
    /** common params of paginating query list data */
    interface PaginatingQueryRecord_NotPage<T = any> {
      records: T[];
    }
    /** common search params of table */
    type CommonSearchParams = Pick<Common.PaginatingCommonParams, 'current' | 'size'>;

    /**
     * enable status
     *
     * - "1": enabled
     * - "2": disabled
     */
    type EnableStatus = '1' | '2';

    /** common record */
    type CommonRecord<T = any> = {
      /** record id */
      id?: number;
      /** record status */
      status?: EnableStatus | null;
    } & T;
  }

  /**
   * namespace Auth
   *
   * backend api module: "auth"
   */
  namespace Auth {
    interface LoginToken {
      token: string;
      refreshToken: string;
      userIinfo: SYS_USER;
    }

    interface LoginTokenData {
      data: LoginToken;
      msg: string;
      code: string;
      Status: number;
    }
    interface UserInfo {
      userId: string;
      userName: string;
      roles: string[];
      buttons: string[];
    }
    interface SYS_USER {
      USER_ID: number;
      USER_CODE: string;
      USER_NAME: string;
      USER_PASSWORD: string;
      USER_REMARK: string;
      USER_ORDER: number;
      USER_FLAG: string;
    }
    interface SYS_USERData {
      data: SYS_USER;
      msg: string;
      code: string;
      Status: number;
    }
    interface UserEdit {
      id: number;
      USER_CODE: string;
      USER_NAME: string;
      USER_PASSWORD: string;
      USER_REMARK: string;
      status: string;
    }
  }

  /**
   * namespace Route
   *
   * backend api module: "route"
   */
  namespace Route {
    type ElegantConstRoute = import('@elegant-router/types').ElegantConstRoute;

    interface MenuRoute extends ElegantConstRoute {
      id: string;
      data: MenuRoute[];
    }

    interface MenuRouteData {
      data: MenuRoute[];
      msg: string;
      code: string;
      Status: number;
    }
    interface UserRoute {
      routes: MenuRoute[];
      home: import('@elegant-router/types').LastLevelRouteKey;
    }
    interface UserRouteData {
      data: UserRoute;
      msg: string;
      code: string;
      Status: number;
    }
  }

  /**
   * namespace SystemManage
   *
   * backend api module: "systemManage"
   */
  namespace SystemManage {
    /** user */
    type Codes = {
      /** record id */
      id: number;
      /** record status */
      status: Common.EnableStatus | null;
      /** user code */
      ITEM_LIST_NAME: string;
      /** user name */
      ITEM_LIST_CODE: string;
      ITEM_ID: string;
      ITEM_LIST_REMARK: string;
    };
    type CodesSearchParams = CommonType.RecordNullable<
      Pick<Api.SystemManage.Codes, 'ITEM_LIST_NAME' | 'ITEM_LIST_CODE' | 'ITEM_ID' | 'ITEM_LIST_REMARK' | 'status'> &
        CommonSearchParams
    >;
    /** role list */
    type CodesList = Common.PaginatingQueryRecord<Codes>;
    type CodesListData2 = {
      data: CodesListData2_1;
      msg: string;
      code: string;
      Status: number;
    };
    type CodesListData2_1 = {
      current: string;
      size: string;
      total: number;
      records: Codes[];
    };

    type CodesListData = {
      data: CodesOption[];
      msg: string;
      code: string;
      Status: number;
    };

    type CodesOption = {
      label: string;
      value: string;
    };

    type CommonSearchParams = Pick<Common.PaginatingCommonParams, 'current' | 'size'>;

    /** role */
    type Role = Common.CommonRecord<{
      /** role name */
      roleName: string;
      /** role code */
      roleCode: string;
      /** role description */
      roleDesc: string;
    }>;

    /** role search params */
    type RoleSearchParams = CommonType.RecordNullable<
      Pick<Api.SystemManage.Role, 'roleName' | 'roleCode' | 'status'> & CommonSearchParams
    >;

    /** role list */
    type RoleList = Common.PaginatingQueryRecord<Role>;
    type RoleListData = {
      data: Role[];
      msg: string;
      code: string;
      Status: number;
    };

    /** all role */
    type AllRole = Pick<Role, 'id' | 'roleName' | 'roleCode'>;
    /**
     * user gender
     *
     * - "1": "male"
     * - "2": "female"
     */
    type UserGender = '1' | '2';

    /** user */
    type User = Common.CommonRecord<{
      /** user code */
      USER_CODE: string;
      /** user name */
      USER_NAME: string;
      /** user userRemark */
      USER_PASSWORD: string;

      USER_REMARK: string;

      /** user role code collection */
      userRoles: string[];
    }>;
    type UserDelInfo = {
      mesg: string;
    };
    type UserInfo = {
      data: UserDelInfo;
      msg: string;
      code: string;
      Status: number;
    };
    type UserInfoData = {
      data: UserInfo;
    };
    // /** user */
    // type User = Common.CommonRecord<{
    //   /** user name */
    //   userName: string;
    //   /** user gender */
    //   userGender: UserGender | null;
    //   /** user nick name */
    //   nickName: string;
    //   /** user phone */
    //   userPhone: string;
    //   /** user email */
    //   userEmail: string;
    //   /** user role code collection */
    //   userRoles: string[];
    // }>;
    /** user search params */
    type UserSearchParams = CommonType.RecordNullable<
      Pick<Api.SystemManage.User, 'USER_CODE' | 'USER_NAME' | 'USER_PASSWORD' | 'USER_REMARK' | 'status'> &
        CommonSearchParams
    >;

    /** user list */
    type UserList = Common.PaginatingQueryRecord<User>;

    type UserListData = {
      data: UserList;
      msg: string;
      code: string;
      Status: number;
    };
    /**
     * menu type
     *
     * - "1": directory
     * - "2": menu
     */
    type MenuType = '1' | '2';

    type MenuButton = {
      /**
       * button code
       *
       * it can be used to control the button permission
       */
      code: string;
      /** button description */
      desc: string;
    };

    /**
     * icon type
     *
     * - "1": iconify icon
     * - "2": local icon
     */
    type IconType = '1' | '2';

    type MenuPropsOfRoute = Pick<
      import('vue-router').RouteMeta,
      | 'i18nKey'
      | 'keepAlive'
      | 'constant'
      | 'order'
      | 'href'
      | 'hideInMenu'
      | 'activeMenu'
      | 'multiTab'
      | 'fixedIndexInTab'
      | 'query'
    >;

    type Menu = Common.CommonRecord<{
      /** parent menu id */
      parentId: number;
      /** menu type */
      menuType: MenuType;
      /** menu name */
      menuName: string;
      /** route name */
      routeName: string;
      /** route path */
      routePath: string;
      /** component */
      component?: string;
      /** iconify icon name or local icon name */
      icon: string;
      /** icon type */
      iconType: IconType;
      /** buttons */
      buttons?: MenuButton[] | null;
      /** children menu */
      children?: Menu[] | null;
    }> &
      MenuPropsOfRoute;

    /** menu list */
    type MenuList = Common.PaginatingQueryRecord<Menu>;

    type MenuTree = {
      id: number;
      label: string;
      pId: number;
      children?: MenuTree[];
    };
  }

  namespace PlanManage {
    type Plan = {
      PLAN_ID: number;
      PLAN_RELATIVE_ID: number;
      PLAN_CODE: string;
      PLAN_RELA_CODE: string;
      PLAN_TYPE_CODE: number | null | undefined;
      PLAN_CREATE_TIME: string;
      PLAN_BEGIN_TIME: string | null | undefined;
      PLAN_END_TIME: string | null;
      PLAN_STATUS: string;
      PLAN_INOUT_STATION: string | null | undefined;
      PLAN_CREATER: string;
      PLAN_FROM_DEPT: string;
      PLAN_TO_DEPT: string;
      PLAN_FROM_USER: string;
      PLAN_TO_USER: string;
      PLAN_REMARK: string;
      PLAN_TASK_PRIO: number;
      PLAN_TYPE_ID: number;
      PLAN_FLAG: string | null | undefined;
      PLAN_TYPE_FLAG: string | null | undefined;
      PLAN_TYPE_GROUP: string | null | undefined;
      PLAN_TYPE_NAME: string | null | undefined;
      PLAN_TYPE_ORDER: number | null | undefined;
      PLAN_TYPE_REMARK: string | null | undefined;
      PLAN_TYPE_INOUT: string | null | undefined;
      // PLAN_STATUS: Common.EnableStatus | null;
    };
    type TaskDetailItem = {
      DetailID: string;
      RFIDCode: string;
      BinLocation: string;
      RelatedTaskID: string;
      CreateUser: string;
      TaskType: number | null | undefined;
      CreateTime: string;
      OrderLineNumber: string;
      PurchaseOrderNumber: string;
      PurchaseOrderLineItem: string;
      PurchaseRequestNumber: string;
      StockUnit: string;
      MaterialType: string;
      ProjectName: string;
      MaterialCode: string;
      MaterialName: string;
      OrderQuantity: number | null | undefined;
      MaterialUnit: string;
      SupplierName: string;
      PlannedDeliveryDate: string;
      ERPSystemFactory: string;
      ProjectCode: string;
      ContractUnitPrice: number | null | undefined;
      ContractTotalPrice: number | null | undefined;
      ProjectType: string;
      ProcurementMethod: string;
      MajorCategory: string;
      MiddleCategory: string;
      SubCategory: string;
      ExtraField1: string;
      ExtraField2: string;
    };
    type TaskDetailItem2 = {
      DetailID: string;
      RFIDCode: string;
      BinLocation: string;
      RelatedTaskID: string;
      CreateUser: string;
      TaskType: number | null | undefined;
      CreateTime: string;
      OrderLineNumber: string;
      PurchaseOrderNumber: string;
      PurchaseOrderLineItem: string;
      PurchaseRequestNumber: string;
      StockUnit: string;
      MaterialType: string;
      ProjectName: string;
      MaterialCode: string;
      MaterialName: string;
      OrderQuantity: number | null | undefined;
      MaterialUnit: string;
      SupplierName: string;
      PlannedDeliveryDate: string;
      ERPSystemFactory: string;
      ProjectCode: string;
      ContractUnitPrice: number | null | undefined;
      ContractTotalPrice: number | null | undefined;
      ProjectType: string;
      ProcurementMethod: string;
      MajorCategory: string;
      MiddleCategory: string;
      SubCategory: string;
      ExtraField1: string;
      ExtraField2: string;
    };
    type PlanSearchParams = CommonType.RecordNullable<
      Pick<Api.PlanManage.Plan, 'PLAN_RELATIVE_ID' | 'PLAN_CODE'> & SystemManage.CommonSearchParams
    >;
    /** role list */
    type PlanList = Common.PaginatingQueryRecord<Plan>;

    type TaskDetails = {
      TaskID: string; // 任务ID（GUID）
      PalletNo: string; // 托盘号
      OrderLine: string; // 订单+行号
      TaskQty: number; // 任务数量
      RFID: string; // RFID编号
      TargetLocation: string; // 终点位置（储位号）
      SourceLocation: string; // 起点位置
      TaskStatus: number; // 任务状态（0=待执行，1=执行中，2=已完成，3=异常）
      TaskType: number; // 任务类型（0=出库，1=入库，2=盘库）
      RelatedTaskID: number | null; // 关联任务ID
      Aisle: string | null; // 巷道字段
      Ext1: string | null; // 扩展字段1
      Ext2: string | null; // 扩展字段2
      CreateUser: string; // 创建任务的用户名
      CreateTime: string; // 创建时间
    };
    type TaskDetails2 = {
      TaskID: string; // 任务ID（GUID）
      PalletNo: string; // 托盘号
      OrderLine: string; // 订单+行号
      TaskQty: number; // 任务数量
      RFID: string; // RFID编号
      TargetLocation: string; // 终点位置（储位号）
      SourceLocation: string; // 起点位置
      TaskStatus: number; // 任务状态（0=待执行，1=执行中，2=已完成，3=异常）
      TaskType: number; // 任务类型（0=出库，1=入库，2=盘库）
      RelatedTaskID: number | null; // 关联任务ID
      Aisle: string | null; // 巷道字段
      Ext1: string | null; // 扩展字段1
      Ext2: string | null; // 扩展字段2
      CreateUser: string; // 创建任务的用户名
      CreateTimeStart: string; // 创建时间
      CreateTimeEnd: string; // 创建时间
    };
    type TaskDetailsSearchParams = CommonType.RecordNullable<
      Pick<
        TaskDetails2,
        | 'PalletNo'
        | 'OrderLine'
        | 'TaskQty'
        | 'RFID'
        | 'TaskType'
        | 'TaskStatus'
        | 'CreateUser'
        | 'CreateTimeStart'
        | 'CreateTimeEnd'
      > &
        SystemManage.CommonSearchParams
    >;
    type ManageTaskToWCSRequest = {
      TaskDetailsList: TaskDetails[];
    };
    type TaskDetailItem_List = {
      Status: number;
      code: string;
      data: TaskDetailItem2[];
      msg: string;
    };
    type LybRemainderNumber = {
      Status: number;
      code: string;
      data: number;
      msg: string;
    };
    type SystemCode = {
      Status: number;
      code: string;
      data: string;
      msg: string;
    };
    // 历史完成（带分页）
    type TaskDetailsList = Common.PaginatingQueryRecord<TaskDetails>;

    type GetCell_ResponseResult = {
      data: TaskDetails[];
      msg: string;
      code: string;
      Status: number;
    };
    type OrdersData = Record<
      string,
      {
        palletno: string | undefined;
        selectedOrders: Api.Exploitation.NewPurchaseOrder[];
      }
    >;
  }
  namespace InventoryTask {
    type Inventory = {
      TaskID: string; // 任务ID（GUID）
      TaskStatus: number; // 任务状态（0=待执行，1=执行中，2=已完成，3=异常）
      CreateUser: string; // 创建任务的用户名
      CreateTime: string; // 创建时间
      Ex1: string; // 创建时间
      Ex2: string; // 创建时间
    };
    type InventoryItem = {
      Profit: string; // 盘盈
      Loss: number; // 盘亏
      BreakEven: string; // 盘平
      Profit_RFID: string; // 盘盈条码
      Loss_RFID: string; // 盘亏条码
      InvTaskID: string; // 盘库任务id
      Ex1: string; // 创建时间
      Ex2: string; // 创建时间
    };
    type InventoryParams = {
      TaskID: string; // 任务ID（GUID）
      TaskStatus: number; // 任务状态（0=待执行，1=执行中，2=已完成，3=异常）
      CreateUser: string; // 创建任务的用户名
      CreateTimeStart: string; // 创建时间
      CreateTimeEnd: string; // 创建时间
    };
    type InventorySearchParams = CommonType.RecordNullable<
      Pick<InventoryParams, 'TaskID' | 'TaskStatus' | 'CreateUser' | 'CreateTimeStart' | 'CreateTimeEnd'> &
        SystemManage.CommonSearchParams
    >;
    type Inventory_ResponseResult = {
      data: Inventory[];
      msg: string;
      code: string;
      Status: number;
    };
    type InventoryItem_ResponseResult = {
      data: InventoryItem[];
      msg: string;
      code: string;
      Status: number;
    };
    type ManageTaskToWCSRequest = {
      TaskInventory: Inventory;
    };
    // 历史完成（带分页）
    type InventoryList = Common.PaginatingQueryRecord<Inventory>;

    type WhCell = {
      CELL_ID: number; // 主键ID
      AREA_ID: number; // 区域ID
      LOGIC_ID: number; // 逻辑ID
      CELL_NAME: string; // 货位名称
      CELL_CODE: string; // 货位编码
      CELL_TYPE: string; // 货位类型
      DEVICE_CODE: string; // 设备编码
      CELL_Z: number; // 层（Z轴）
      CELL_X: number; // 列（X轴）
      CELL_Y: number; // 排（Y轴）
      CELL_INOUT: string; // 进出标志
      CELL_MODEL: string; // 模式
      CELL_STATUS: string; // 状态
      RUN_STATUS: string; // 运行状态
      CELL_CLASS: string; // 类别
      CELL_LOGICAL_Z: string; // 逻辑层
      LANEWAY: number; // 巷道号
      LOCK_STATION_ID: number; // 锁定站台ID
      HAVE_GOODS: boolean; // 是否有货
      STORE_LOC_ID: number; // 存储位置ID（decimal 类型通常转为 number）
    };
    type WhCellList = {
      row: number;
      col: number;
      layers: WhCell[];
    };
    type WhCell_ResponseResult = {
      data: WhCellList[];
      msg: string;
      code: string;
      Status: number;
    };
    type WhCellInfoRequest = {
      row: number; // 货位名称
      col: number; // 货位编码
    };
    type WhCellInfo = {
      CELL_NAME: string; // 货位名称
      CELL_CODE: string; // 货位编码
      CELL_TYPE: string; // 货位类型
      RUN_STATUS: string; // 运行状态
      HAVE_GOODS: boolean; // 是否有货
      PurchaseOrdersInv: Exploitation.Inventory[];
    };
    type WhCellInfo_ResponseResult = {
      data: Exploitation.Inventory[];
      msg: string;
      code: string;
      Status: number;
    };
  }
  namespace Exploitation {
    type PurchaseOrder = {
      PurchaseOrderID: number | null | undefined;
      OrderLineNumber: string | null | undefined; // 订单+行号，作为主键
      PurchaseOrderNumber: string | null | undefined; // 采购订单号
      PurchaseOrderLineItem: string | null | undefined; // 采购订单行项目号
      PurchaseRequestNumber: string | null | undefined; // 采购申请号（可选）
      StockUnit: string | null | undefined; // 库存单位
      MaterialType: string | null | undefined; // 物资类型
      ProjectName: string | null | undefined; // 项目名称
      MaterialCode: string | null | undefined; // 物料编码
      MaterialName: string | null | undefined; // 物资名称
      OrderQuantity: number; // 订单数量
      MaterialUnit: string | null | undefined; // 物料单位
      SupplierName: string | null | undefined; // 供应商名称
      PlannedDeliveryDate: string | null | undefined; // 采购订单计划交货日期
      ERPSystemFactory: string | null | undefined; // ERP系统工厂
      ProjectCode: string | null | undefined; // 项目编码
      ContractUnitPrice: number; // 签约单价(不含税)
      ContractTotalPrice: number; // 签约总价(不含税)
      ProjectType: string | null | undefined; // 项目类型
      ProcurementMethod: string | null | undefined; // 采购方式
      MajorCategory: string | null | undefined; // 大类
      MiddleCategory: string | null | undefined; // 中类
      SubCategory: string | null | undefined; // 小类
      ExtraField1: string | null | undefined; // 扩展字段1
      ExtraField2: string | null | undefined; // 扩展字段2
    };
    type PurchaseOrder2 = {
      PurchaseOrderID: number | null | undefined;
      OrderLineNumber: string | null | undefined; // 订单+行号，作为主键
      PurchaseOrderNumber: string | null | undefined; // 采购订单号
      PurchaseOrderLineItem: string | null | undefined; // 采购订单行项目号
      PurchaseRequestNumber: string | null | undefined; // 采购申请号（可选）
      StockUnit: string | null | undefined; // 库存单位
      MaterialType: string | null | undefined; // 物资类型
      ProjectName: string | null | undefined; // 项目名称
      MaterialCode: string | null | undefined; // 物料编码
      MaterialName: string | null | undefined; // 物资名称
      OrderQuantity: number; // 订单数量
      MaterialUnit: string | null | undefined; // 物料单位
      SupplierName: string | null | undefined; // 供应商名称
      PlannedDeliveryDate: string | null | undefined; // 采购订单计划交货日期
      ERPSystemFactory: string | null | undefined; // ERP系统工厂
      ProjectCode: string | null | undefined; // 项目编码
      ContractUnitPrice: number; // 签约单价(不含税)
      ContractTotalPrice: number; // 签约总价(不含税)
      ProjectType: string | null | undefined; // 项目类型
      ProcurementMethod: string | null | undefined; // 采购方式
      MajorCategory: string | null | undefined; // 大类
      MiddleCategory: string | null | undefined; // 中类
      SubCategory: string | null | undefined; // 小类
      ExtraField1: string | null | undefined; // 扩展字段1
      ExtraField2: string | null | undefined; // 扩展字段2
      CreateTimeStart: string; // 创建时间
      CreateTimeEnd: string; // 创建时间
    };
    type NewPurchaseOrder = PurchaseOrder & {
      RFIDCode: string | null | undefined; // RFID编号
      BinLocation: string | null | undefined; // 仓位号
    };
    // 查询参数类型
    // type PurchaseOrderSearchParams = Partial<PurchaseOrder,'ITEM_LIST_NAME' > & SystemManage.CommonSearchParams>;
    type PurchaseOrderSearchParams = CommonType.RecordNullable<
      Pick<
        PurchaseOrder2,
        | 'PurchaseOrderID'
        | 'OrderLineNumber'
        | 'PurchaseOrderNumber'
        | 'PurchaseOrderLineItem'
        | 'PurchaseRequestNumber'
        | 'StockUnit'
        | 'MaterialType'
        | 'ProjectName'
        | 'MaterialCode'
        | 'MaterialName'
        | 'OrderQuantity'
        | 'MaterialUnit'
        | 'SupplierName'
        | 'PlannedDeliveryDate'
        | 'ERPSystemFactory'
        | 'ProjectCode'
        | 'ContractUnitPrice'
        | 'ContractTotalPrice'
        | 'ProjectType'
        | 'ProcurementMethod'
        | 'MajorCategory'
        | 'MiddleCategory'
        | 'SubCategory'
        | 'ExtraField1'
        | 'ExtraField2'
        | 'CreateTimeStart'
        | 'CreateTimeEnd'
      > &
        SystemManage.CommonSearchParams
    >;
    // 采购订单列表类型（带分页）
    type PurchaseOrderList = Common.PaginatingQueryRecord<PurchaseOrder>;
    type InventoryList = Common.PaginatingQueryRecord<InventoryData>;

    type InventoryData = {
      PurchaseOrderID: number | null | undefined;
      OrderLineNumber: string | null | undefined; // 订单+行号，作为主键
      PurchaseOrderNumber: string | null | undefined; // 采购订单号
      PurchaseOrderLineItem: string | null | undefined; // 采购订单行项目号
      PurchaseRequestNumber: string | null | undefined; // 采购申请号（可选）
      StockUnit: string | null | undefined; // 库存单位
      MaterialType: string | null | undefined; // 物资类型
      ProjectName: string | null | undefined; // 项目名称
      MaterialCode: string | null | undefined; // 物料编码
      MaterialName: string | null | undefined; // 物资名称
      OrderQuantity: number; // 订单数量
      MaterialUnit: string | null | undefined; // 物料单位
      SupplierName: string | null | undefined; // 供应商名称
      PlannedDeliveryDate: string | null | undefined; // 采购订单计划交货日期
      ERPSystemFactory: string | null | undefined; // ERP系统工厂
      ProjectCode: string | null | undefined; // 项目编码
      ContractUnitPrice: number; // 签约单价(不含税)
      ContractTotalPrice: number; // 签约总价(不含税)
      ProjectType: string | null | undefined; // 项目类型
      ProcurementMethod: string | null | undefined; // 采购方式
      MajorCategory: string | null | undefined; // 大类
      MiddleCategory: string | null | undefined; // 中类
      SubCategory: string | null | undefined; // 小类
      ExtraField1: string | null | undefined; // 扩展字段1
      ExtraField2: string | null | undefined; // 扩展字段2
      CreateTime: string; // 创建时间
      SearchType: number; // 搜索类型
      RFID: string; // 搜索类型
      PalletNo: string; // 搜索类型
      CellNo: string; // 搜索类型
      CreateUser: string; // 搜索类型
    };
    type Inventory = {
      PurchaseOrderID: number | null | undefined;
      OrderLineNumber: string | null | undefined; // 订单+行号，作为主键
      PurchaseOrderNumber: string | null | undefined; // 采购订单号
      PurchaseOrderLineItem: string | null | undefined; // 采购订单行项目号
      PurchaseRequestNumber: string | null | undefined; // 采购申请号（可选）
      StockUnit: string | null | undefined; // 库存单位
      MaterialType: string | null | undefined; // 物资类型
      ProjectName: string | null | undefined; // 项目名称
      MaterialCode: string | null | undefined; // 物料编码
      MaterialName: string | null | undefined; // 物资名称
      OrderQuantity: number; // 订单数量
      MaterialUnit: string | null | undefined; // 物料单位
      SupplierName: string | null | undefined; // 供应商名称
      PlannedDeliveryDate: string | null | undefined; // 采购订单计划交货日期
      ERPSystemFactory: string | null | undefined; // ERP系统工厂
      ProjectCode: string | null | undefined; // 项目编码
      ContractUnitPrice: number; // 签约单价(不含税)
      ContractTotalPrice: number; // 签约总价(不含税)
      ProjectType: string | null | undefined; // 项目类型
      ProcurementMethod: string | null | undefined; // 采购方式
      MajorCategory: string | null | undefined; // 大类
      MiddleCategory: string | null | undefined; // 中类
      SubCategory: string | null | undefined; // 小类
      ExtraField1: string | null | undefined; // 扩展字段1
      ExtraField2: string | null | undefined; // 扩展字段2
      CreateTimeStart: string; // 创建时间
      CreateTimeEnd: string; // 创建时间
      SearchType: number; // 搜索类型
      RFID: string; // 搜索类型
      PalletNo: string; // 搜索类型
      CellNo: string; // 搜索类型
      CreateUser: string; // 搜索类型
    };
    type InventorySearchParams = CommonType.RecordNullable<
      Pick<
        Inventory,
        | 'PurchaseOrderID'
        | 'OrderLineNumber'
        | 'PurchaseOrderNumber'
        | 'PurchaseOrderLineItem'
        | 'PurchaseRequestNumber'
        | 'StockUnit'
        | 'MaterialType'
        | 'ProjectName'
        | 'MaterialCode'
        | 'MaterialName'
        | 'OrderQuantity'
        | 'MaterialUnit'
        | 'SupplierName'
        | 'PlannedDeliveryDate'
        | 'ERPSystemFactory'
        | 'ProjectCode'
        | 'ContractUnitPrice'
        | 'ContractTotalPrice'
        | 'ProjectType'
        | 'ProcurementMethod'
        | 'MajorCategory'
        | 'MiddleCategory'
        | 'SubCategory'
        | 'ExtraField1'
        | 'ExtraField2'
        | 'CreateTimeStart'
        | 'CreateTimeEnd'
        | 'SearchType'
        | 'RFID'
        | 'PalletNo'
        | 'CellNo'
        | 'CreateUser'
      > &
        SystemManage.CommonSearchParams
    >;
  }

  namespace Material {
    // 物料类别
    type GoodsCategory = {
      GOODS_CLASS_ID: number;
      GOODS_CLASS_PARENT_ID: number | null;
      PARENT_GOODS_CLASS_NAME: string | null | undefined;
      GOODS_CLASS_CODE: string;
      GOODS_CLASS_NAME: string;
      GOODS_CLASS_REMARK: string;
      GOODS_CLASS_ORDER: number | null | undefined;
      GOODS_CLASS_FLAG: string;
    };
    type GoodsCategorySearchParams = CommonType.RecordNullable<SystemManage.CommonSearchParams>;
    type GoodsCategoryList = Common.PaginatingQueryRecord<GoodsCategory>;

    // 物料类型
    type GoodsType = {
      GOODS_TYPE_ID: number;
      GOODS_TYPE_CODE: string;
      GOODS_TYPE_NAME: string;
      GOODS_TYPE_REMARK: string;
      GOODS_TYPE_ORDER: number | null | undefined;
      GOODS_TYPE_FLAG: string;
    };
    type GoodsTypeDelInfo = {
      mesg: string;
    };
    type GoodsTypeInfo = {
      data: GoodsTypeDelInfo;
      msg: string;
      code: string;
      Status: number;
    };
    type GoodsTypeInfoData = {
      data: GoodsTypeInfo;
    };
    type GoodsTypeSearchParams = CommonType.RecordNullable<SystemManage.CommonSearchParams>;
    type GoodsTypeList = Common.PaginatingQueryRecord<GoodsType>;

    // 物料属性
    type GoodsProperty = {
      id: number;
      GOODS_PROPERTY_ID: number;
      GOODS_TYPE_ID: number | null;
      GOODS_TYPE_NAME: string | null;
      GOODS_PROPERTY_CODE: string;
      GOODS_PROPERTY_NAME: string;
      GOODS_PROPERTY_REMARK: string;
      GOODS_PROPERTY_ORDER: number | null | undefined;
      GOODS_PROPERTY_FLAG: string | null;
      GOODS_PROPERTY_DATASOURCE: string;
      GOODS_PROPERTY_FIELDTYPE: string;
      GOODS_PROPERTY_VALID: string | null | undefined;
    };
    type GoodsPropertySearchParams = CommonType.RecordNullable<SystemManage.CommonSearchParams>;
    type GoodsPropertyList = Common.PaginatingQueryRecord<GoodsProperty>;
  }
}
