king
2024-09-13 defb24c2a9e816a3ee0c7261da9090f325b258e0
src/tabviews/custom/components/module/invoice/index.jsx
@@ -233,7 +233,7 @@
    item.setting.customScript = _customScript // 整理后自定义脚本
    item.setting.tailScript = _tailScript     // 后置自定义脚本
    item.setting.custompage = /@pageSize@|@orderBy@/i.test(item.setting.dataresource + item.setting.customScript)
    item.setting.custompage = /@pageSize@|@orderBy@|@mk_total/i.test(item.setting.dataresource + item.setting.customScript)
    return item
  }
@@ -510,7 +510,7 @@
          })
          if (res.status) {
            if (config.billSaveBtn.reTabId) {
              MKEmitter.emit('reloadMenuView', config.billSaveBtn.reTabId, 'table')
              MKEmitter.emit('reloadMenuView', config.billSaveBtn.reTabId)
            }
            if (config.billSaveBtn.syncComId) {
              MKEmitter.emit('reloadData', config.billSaveBtn.syncComId)
@@ -540,6 +540,22 @@
  outBill = () => {
    const { config, BID, saveType } = this.state
    if (window.GLOB.storeFiles) {
      if (!window.GLOB.storeDate || window.GLOB.storeDate < 0) {
        Modal.warning({
          title: `电子档案存储包已过期。`,
          okText: '知道了'
        })
        return
      } else if (window.GLOB.storeDate < 30) {
        notification.warning({
          top: 92,
          message: `电子档案存储包还剩${window.GLOB.storeDate}天。`,
          duration: 5
        })
      }
    }
    if (window.GLOB.systemType === 'production' && !config.billOutBtn.proInterface) {
      notification.warning({
@@ -698,6 +714,7 @@
    sql = sql.replace(/@SessionUid@/ig, `'${localStorage.getItem('SessionUid') || ''}'`)
    sql = sql.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID') || ''}'`)
    sql = sql.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`)
    sql = sql.replace(/@lang@/ig, `'${sessionStorage.getItem('lang')}'`)
    sql = sql.replace(/@typename@/ig, `'admin'`)
    if (window.GLOB.externalDatabase !== null) {
@@ -711,7 +728,7 @@
    }
    if (window.GLOB.debugger === true) {
      console.info(sql.replace(/\n\s{6}/ig, '\n'))
      window.mkInfo(sql.replace(/\n\s{6}/ig, '\n'))
    }
    return sql
@@ -797,6 +814,10 @@
    param.data.invoiceTypeCode = trans[param.data.invoiceTypeCode] || ''
    if (window.GLOB.storeFiles) {
      param.store = true
    }
    let url = ''
    if (window.GLOB.systemType === 'production') {
      url = config.billOutBtn.proInterface
@@ -843,10 +864,15 @@
          if (Array.isArray(val)) {
            val.forEach(item => {
              if (typeof(item) !== 'object' || Array.isArray(item)) return
              if (Object.keys(item).length > 0) {
                item.$$key = tb + '_' + key
                subObjs.push(item)
              }
              if (Object.keys(item).length === 0) return
              Object.keys(item).forEach(k => {
                if (item[k] === null) {
                  item[k] = ''
                }
              })
              item.$$key = tb + '_' + key
              subObjs.push(item)
            })
          } else if (Object.keys(val).length > 0) {
            val.$$key = tb + '_' + key
@@ -937,6 +963,7 @@
    sql = sql.replace(/@SessionUid@/ig, `'${localStorage.getItem('SessionUid') || ''}'`)
    sql = sql.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID') || ''}'`)
    sql = sql.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`)
    sql = sql.replace(/@lang@/ig, `'${sessionStorage.getItem('lang')}'`)
    sql = sql.replace(/@typename@/ig, `'admin'`)
    if (sessionStorage.getItem('dataM') === 'true') { // 数据权限
@@ -946,8 +973,8 @@
    }
    if (window.GLOB.debugger === true) {
      console.info('%c' + config.name + '(回调)', 'color: blue')
      console.info(sql.replace(/\n\s{8}/ig, '\n'))
      window.mkInfo('%c' + config.name + '(回调)', 'color: blue')
      window.mkInfo(sql.replace(/\n\s{8}/ig, '\n'))
    }
    param.LText = sql
@@ -966,7 +993,7 @@
      })
      if (res.status) {
        if (config.billOutBtn.reTabId) {
          MKEmitter.emit('reloadMenuView', config.billOutBtn.reTabId, 'table')
          MKEmitter.emit('reloadMenuView', config.billOutBtn.reTabId)
        }
        if (config.billOutBtn.syncComId) {
          MKEmitter.emit('reloadData', config.billOutBtn.syncComId)