king
2023-08-23 547e5fe219ee7bee309ecd67db74bc8df66b5433
src/tabviews/subtable/index.jsx
@@ -39,7 +39,6 @@
    config: null,         // 页面配置信息,包括按钮、搜索、显示列、标签等
    actions: null,        // 按钮集
    columns: null,        // 显示列
    arr_field: '',        // 查询字段集
    setting: null,        // 页面全局设置:数据源、按钮及显示列固定、主键等
    data: [],             // 列表数据集
    selectedData: [],     // 已选表格数据
@@ -229,6 +228,16 @@
        item.$menuId = this.props.MenuID
        item.$old = true
        if (item.OpenType === 'excelOut') { // 导出
          item.$menuName = Tab.label
          if (!item.verify || !item.verify.columns || item.verify.columns.length === 0) {
            item.errorType = 'error1'
          } else if (item.intertype === 'system' && item.verify.dataType !== 'custom' && config.setting.interType !== 'system') {
            item.errorType = 'error2'
          }
        }
        if (item.OpenType === 'funcbutton' && item.funcType === 'print' && item.verify) { // 打印机设置
          let _item = window.GLOB.UserCacheMap.get(Tab.uuid + item.uuid)
@@ -343,6 +352,8 @@
        resetContrl: config.setting.resetContrl,
      }
      config.setting.arr_field = _arrField.join(',')
      this.setState({
        pageSize: config.setting.pageSize || 10,
        BID: this.props.BID || '',
@@ -355,7 +366,6 @@
        setting: config.setting,
        actions: _actions,
        columns: _columns,
        arr_field: _arrField.join(','),
        search: Utils.initMainSearch(config.search)
      }, () => {
        if (config.setting.onload !== 'false' && (!Tab.supMenu || this.props.BID || Tab.isTreeNode)) { // 初始化可加载
@@ -429,7 +439,7 @@
   */
  async loadmaindata (id) {
    const { mainSearch } = this.props
    const { setting, BID, arr_field, search, orderBy, pageIndex, pageSize, absFields } = this.state
    const { setting, BID, search, orderBy, pageIndex, pageSize, absFields } = this.state
    let searches = fromJS(search).toJS()
    if (mainSearch && mainSearch.length > 0) { // 主表搜索条件
@@ -441,7 +451,7 @@
    })
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID)
    let param = UtilsDM.getQueryDataParams(setting, searches, _orderBy, pageIndex, pageSize, BID)
    let result = await Api.genericInterface(param)
@@ -515,7 +525,7 @@
   */ 
  async loadmainLinedata (id) {
    const { mainSearch } = this.props
    const { setting, BID, arr_field, search, orderBy, pageIndex, pageSize, absFields } = this.state
    const { setting, BID, search, orderBy, pageIndex, pageSize, absFields } = this.state
    let searches = fromJS(search).toJS()
    if (mainSearch && mainSearch.length > 0) { // 主表搜索条件
@@ -527,7 +537,7 @@
    })
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, id)
    let param = UtilsDM.getQueryDataParams(setting, searches, _orderBy, pageIndex, pageSize, BID, id)
    let result = await Api.genericInterface(param)
    if (result.status) {
@@ -687,8 +697,8 @@
   * @description 导出Excel时,获取页面搜索排序等参数
   */
  queryModuleParam = (menuId, callback) => {
    const { Tab, mainSearch, MenuID } = this.props
    const { arr_field, orderBy, search, setting} = this.state
    const { mainSearch, MenuID } = this.props
    const { orderBy, search, setting} = this.state
    if (MenuID !== menuId) return
@@ -698,10 +708,8 @@
    }
    callback({
      arr_field: arr_field,
      orderBy: orderBy || setting.order,
      search: searches,
      menuName: Tab.label
      search: searches
    })
  }