king
2023-08-14 cc20b3cfe18b36c7b0f75937f88679eb031ecc6f
2023-08-14
24个文件已修改
382 ■■■■■ 已修改文件
public/options.json 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/index.js 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/actionform/index.jsx 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/calendar/index.jsx 90 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/balcony/index.jsx 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/data-card/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/double-data-card/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/prop-card/index.jsx 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/table-card/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/carousel/data-card/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/carousel/prop-card/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-G6/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-bar-line/index.jsx 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-dashboard/index.jsx 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-pie/index.jsx 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-scatter/index.jsx 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/custom-chart/index.jsx 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/code/sand-box/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/normal-table/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/timeline/normal-timeline/index.jsx 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/tree/antd-tree/index.jsx 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/normalbutton/index.jsx 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/baseform/index.jsx 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/index.jsx 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/options.json
@@ -1,16 +1,16 @@
{
  "appId": "202108312122504607B107A83F55B40C98CCF",
  "appkey": "20210831212235413F287EC3BF489424496C8",
  "appId": "201912040924165801464FF1788654BC5AC73",
  "appkey": "20191106103859640976D6E924E464D029CF0",
  "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars",
  "systemType": "",
  "externalDatabase": "",
  "lineColor": "",
  "filter": "false",
  "defaultApp": "mkindustry",
  "defaultApp": "mk",
  "defaultLang": "zh-CN",
  "WXAppID": "",
  "WXAppID": "wx4d8a34c8d4494872",
  "WXminiAppID": "",
  "WXNotice": "false",
  "WXNotice": "true",
  "nginx": "true",
  "debugger": false,
  "licenseKey": "",
@@ -18,6 +18,7 @@
  "transfer": "false",
  "keepPassword": "true",
  "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"],
  "host": "http://demo.mk9h.cn",
  "service": "erp_new/"
  "host": "http://qingqiumarket.cn",
  "service": "MKWMS/"
}
src/api/index.js
@@ -333,14 +333,17 @@
    if (!menuid) return
    let date = moment().format('YYYY-MM-DD HH:mm:ss')
    let _data = data ? JSON.stringify(data) : ''
    let userid = sessionStorage.getItem('UserID') || ''
    CacheUtils.writeCacheInIndexDB({menuid, CreateDate: date, LongParam: _data})
    CacheUtils.writeCacheInIndexDB({menuid: md5(menuid + userid), CreateDate: date, LongParam: _data})
  }
  getLCacheConfig (menuid, minutes) {
    return new Promise((resolve, reject) => {
      let limit = minutes ? moment().subtract(minutes, 'minutes').format('YYYY-MM-DD HH:mm:ss') : ''
      CacheUtils.getIndexDBCacheConfig(menuid).then(res => {
      let userid = sessionStorage.getItem('UserID') || ''
      CacheUtils.getIndexDBCacheConfig(md5(menuid + userid)).then(res => {
        if (res && res.LongParam) {
          resolve({data: JSON.parse(res.LongParam), valid: !limit || res.CreateDate > limit})
        } else {
src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -174,14 +174,16 @@
          shows.push('innerFunc')
        }
        if (this.record.callbackType === 'func') {
          shows.push('callbackFunc')
          shows.push('callbackFunc', 'output')
        } else if (this.record.callbackType === 'script') {
          shows.push('cbTable', 'output')
        } else if (this.record.callbackType !== 'none') {
          shows.push('cbTable')
        }
        reReadonly.interface = false
        reRequired.interface = true
      } else if (intertype === 'outer') {
        shows.push('procMode', 'sysInterface', 'outerFunc', 'callbackType', 'output')
        shows.push('procMode', 'sysInterface', 'outerFunc', 'callbackType')
        if (this.record.procMode === 'system') {
          shows.push('sql', 'sqlType')
        } else if (this.record.procMode === 'inner') {
@@ -189,7 +191,9 @@
          shows.push('innerFunc')
        }
        if (this.record.callbackType === 'func') {
          shows.push('callbackFunc')
          shows.push('callbackFunc', 'output')
        } else if (this.record.callbackType === 'script') {
          shows.push('cbTable', 'output')
        } else if (this.record.callbackType !== 'none') {
          shows.push('cbTable')
        }
src/tabviews/custom/components/calendar/index.jsx
@@ -69,12 +69,6 @@
      config: _config,
      arr_field: _config.columns.map(col => col.field).join(','),
      search: _config.$searches
    }, () => {
      if (_config.setting.onload === 'true') {
        setTimeout(() => {
          this.loadData()
        }, _config.setting.delay || 0)
      }
    })
  }
@@ -89,25 +83,7 @@
      MKEmitter.addListener('searchRefresh', this.searchRefresh)
    }
    if (config.$cache && !this.loaded) {
      Api.getLCacheConfig(config.uuid).then(res => {
        if (!res.data || this.loaded) return
        let data = []
        res.data.forEach((item, index) => {
          item.key = index
          item.$$uuid = item[config.setting.primaryKey] || ''
          let pass = this.resetLine(item)
          if (pass) {
            data.push(item)
          }
        })
        this.setState({data: data})
      })
    }
    this.initExec()
  }
  shouldComponentUpdate (nextProps, nextState) {
@@ -122,6 +98,66 @@
    MKEmitter.removeListener('searchRefresh', this.searchRefresh)
    MKEmitter.removeListener('resetSelectLine', this.resetParentParam)
    MKEmitter.removeListener('refreshByButtonResult', this.refreshByButtonResult)
  }
  initExec = () => {
    const { config } = this.state
    if (config.$cache) {
      if (config.$time) {
        Api.getLCacheConfig(config.uuid, config.$time).then(res => {
          if (!res.valid && config.setting.onload === 'true') {
            setTimeout(() => {
              this.loadData('init')
            }, config.setting.delay || 0)
          }
          if (!res.data) return
          let _data = []
          res.data.forEach((item, index) => {
            item.key = index
            item.$$uuid = item[config.setting.primaryKey] || ''
            let pass = this.resetLine(item)
            if (pass) {
              _data.push(item)
            }
          })
          this.setState({data: _data})
        })
      } else {
        Api.getLCacheConfig(config.uuid, 0).then(res => {
          if (!res.data || this.loaded) return
          let _data = []
          res.data.forEach((item, index) => {
            item.key = index
            item.$$uuid = item[config.setting.primaryKey] || ''
            let pass = this.resetLine(item)
            if (pass) {
              _data.push(item)
            }
          })
          this.setState({data: _data})
        })
        if (config.setting.onload === 'true') {
          setTimeout(() => {
            this.loadData('init')
          }, config.setting.delay || 0)
        }
      }
    } else if (config.setting.onload === 'true') {
      setTimeout(() => {
        this.loadData()
      }, config.setting.delay || 0)
    }
  }
  searchRefresh = (searchId) => {
@@ -171,7 +207,7 @@
    this.loadData()
  }
  async loadData () {
  async loadData (type) {
    const { config, arr_field, BID, search, year } = this.state
    
    if (config.setting.supModule && !BID) { // BID 不存在时,不做查询
@@ -207,7 +243,7 @@
    let result = await Api.genericInterface(param)
    if (result.status) {
      this.loaded = true
      if (config.$cache && config.setting.onload !== 'false') {
      if (config.$cache && type === 'init') {
        Api.writeCacheConfig(config.uuid, result.data || [])
      }
src/tabviews/custom/components/card/balcony/index.jsx
@@ -144,7 +144,7 @@
    if (config.wrap.datatype === 'dynamic') {
      if (config.timer) {
        this.timer = new TimerTask()
        this.timer.init(config.uuid, config.timer, config.timerRepeats, () => {this.loadData(true)})
        this.timer.init(config.uuid, config.timer, config.timerRepeats, () => {this.loadData('timer')})
      }
      this.initExec()
@@ -180,7 +180,7 @@
          Api.getLCacheConfig(config.uuid, config.$time).then(res => {
            if (!res.valid && config.setting.onload === 'true') {
              setTimeout(() => {
                this.loadData()
                this.loadData('init')
              }, config.setting.delay || 0)
            }
  
@@ -206,7 +206,7 @@
        if (config.setting.onload === 'true') {
          setTimeout(() => {
            this.loadData()
            this.loadData('init')
          }, config.setting.delay || 0)
        }
      }
@@ -354,7 +354,7 @@
    this.loadData()
  }
  async loadData (hastimer) {
  async loadData (type) {
    const { config, arr_field, BID, BData } = this.state
    if (config.wrap.datatype === 'public') {
@@ -377,7 +377,7 @@
    let searches = []
    if (!hastimer) {
    if (type !== 'timer') {
      this.setState({
        loading: true
      })
@@ -391,7 +391,7 @@
      let _data = {}
      this.loaded = true
      if (config.$cache && config.setting.onload !== 'false') {
      if (config.$cache && type === 'init') {
        Api.writeCacheConfig(config.uuid, result.data || [])
      }
src/tabviews/custom/components/card/data-card/index.jsx
@@ -263,7 +263,7 @@
          Api.getLCacheConfig(config.uuid, config.$time).then(res => {
            if (!res.valid && config.setting.onload === 'true') {
              setTimeout(() => {
                this.loadData()
                this.loadData('', 'init')
              }, config.setting.delay || 0)
            }
@@ -311,7 +311,7 @@
        if (config.setting.onload === 'true') {
          setTimeout(() => {
            this.loadData()
            this.loadData('', 'init')
          }, config.setting.delay || 0)
        }
      }
@@ -764,7 +764,7 @@
      }
      this.loaded = true
      if (config.$cache && pageIndex === 1 && config.setting.onload !== 'false') {
      if (config.$cache && type === 'init') {
        Api.writeCacheConfig(config.uuid, result.data || [])
      }
src/tabviews/custom/components/card/double-data-card/index.jsx
@@ -288,7 +288,7 @@
        Api.getLCacheConfig(config.uuid, config.$time).then(res => {
          if (!res.valid) {
            setTimeout(() => {
              this.loadData()
              this.loadData('', 'init')
            }, config.setting.delay || 0)
          }
@@ -304,7 +304,7 @@
        })
        setTimeout(() => {
          this.loadData()
          this.loadData('', 'init')
        }, config.setting.delay || 0)
      }
    } else {
@@ -608,7 +608,7 @@
      }
      this.loaded = true
      if (config.$cache && pageIndex === 1 && config.setting.onload !== 'false') {
      if (config.$cache && type === 'init') {
        Api.writeCacheConfig(config.uuid, result.data || [])
      }
src/tabviews/custom/components/card/prop-card/index.jsx
@@ -146,7 +146,7 @@
    if (config.timer && config.wrap.datatype === 'dynamic') {
      this.timer = new TimerTask()
      this.timer.init(config.uuid, config.timer, config.timerRepeats, () => {this.loadData(true)})
      this.timer.init(config.uuid, config.timer, config.timerRepeats, () => {this.loadData('timer')})
    }
    this.initExec()
@@ -182,7 +182,7 @@
            Api.getLCacheConfig(config.uuid, config.$time).then(res => {
              if (!res.valid && config.setting.onload === 'true') {
                setTimeout(() => {
                  this.loadData()
                  this.loadData('init')
                }, config.setting.delay || 0)
              }
@@ -221,7 +221,7 @@
  
          if (config.setting.onload === 'true') {
            setTimeout(() => {
              this.loadData()
              this.loadData('init')
            }, config.setting.delay || 0)
          } else if (this.loaded) {
            if (config.wrap.goback === 'true' && data.$$empty) {
@@ -429,7 +429,7 @@
    if ((position === 'mainline' || position === 'popclose') && config.setting.supModule && BID) { // 刷新源组件时,附带刷新上级行与当前组件
      MKEmitter.emit('reloadData', config.setting.supModule, BID)
    } else {
      this.loadData(false, btn)
      this.loadData('', btn)
    }
  }
@@ -487,7 +487,7 @@
    this.loadData()
  }
  async loadData (hastimer, btn) {
  async loadData (type, btn) {
    const { config, arr_field, BID, BData, selected } = this.state
    if (config.wrap.datatype === 'public') {
@@ -521,7 +521,7 @@
      return
    }
    if (!hastimer) {
    if (type !== 'timer') {
      this.setState({
        loading: true
      })
@@ -535,7 +535,7 @@
      let _data = {}
      this.loaded = true
      if (config.$cache && config.setting.onload !== 'false') {
      if (config.$cache && type === 'init') {
        Api.writeCacheConfig(config.uuid, result.data || [])
      }
src/tabviews/custom/components/card/table-card/index.jsx
@@ -163,7 +163,7 @@
          Api.getLCacheConfig(config.uuid, config.$time).then(res => {
            if (!res.valid && config.setting.onload === 'true') {
              setTimeout(() => {
                this.loadData()
                this.loadData('init')
              }, config.setting.delay || 0)
            }
  
@@ -197,7 +197,7 @@
        if (config.setting.onload === 'true') {
          setTimeout(() => {
            this.loadData()
            this.loadData('init')
          }, config.setting.delay || 0)
        }
      }
@@ -376,7 +376,7 @@
      }
      this.loaded = true
      if (config.$cache && pageIndex === 1 && config.setting.onload !== 'false') {
      if (config.$cache && type === 'init') {
        Api.writeCacheConfig(config.uuid, result.data || [])
      }
src/tabviews/custom/components/carousel/data-card/index.jsx
@@ -150,7 +150,7 @@
          Api.getLCacheConfig(config.uuid, config.$time).then(res => {
            if (!res.valid && config.setting.onload === 'true') {
              setTimeout(() => {
                this.loadData()
                this.loadData('init')
              }, config.setting.delay || 0)
            }
  
@@ -188,7 +188,7 @@
        if (config.setting.onload === 'true') {
          setTimeout(() => {
            this.loadData()
            this.loadData('init')
          }, config.setting.delay || 0)
        } else if (this.loaded) {
          this.openModal()
@@ -356,7 +356,7 @@
    let result = await Api.genericInterface(param)
    if (result.status) {
      this.loaded = true
      if (config.$cache && config.setting.onload !== 'false') {
      if (config.$cache && type === 'init') {
        Api.writeCacheConfig(config.uuid, result.data || [])
      }
src/tabviews/custom/components/carousel/prop-card/index.jsx
@@ -149,7 +149,7 @@
            Api.getLCacheConfig(config.uuid, config.$time).then(res => {
              if (!res.valid && config.setting.onload === 'true') {
                setTimeout(() => {
                  this.loadData()
                  this.loadData('init')
                }, config.setting.delay || 0)
              }
    
@@ -177,7 +177,7 @@
  
          if (config.setting.onload === 'true') {
            setTimeout(() => {
              this.loadData()
              this.loadData('init')
            }, config.setting.delay || 0)
          } else if (this.loaded) {
            this.openModal()
@@ -358,7 +358,7 @@
      let _data = {}
      this.loaded = true
      if (config.$cache && config.setting.onload !== 'false') {
      if (config.$cache && type === 'init') {
        Api.writeCacheConfig(config.uuid, result.data || [])
      }
src/tabviews/custom/components/chart/antv-G6/index.jsx
@@ -1034,7 +1034,7 @@
          Api.getLCacheConfig(config.uuid, config.$time).then(res => {
            if (!res.valid && config.setting.onload === 'true') {
              setTimeout(() => {
                this.loadData()
                this.loadData('init')
              }, config.setting.delay || 0)
            }
  
@@ -1058,7 +1058,7 @@
        if (config.setting.onload === 'true') {
          setTimeout(() => {
            this.loadData()
            this.loadData('init')
          }, config.setting.delay || 0)
        } else if (this.loaded) {
          this.handleData()
@@ -1125,7 +1125,7 @@
    }
  }
  async loadData () {
  async loadData (type) {
    const { config, arr_field, BID } = this.state
    if (config.setting.supModule && !BID) { // BID 不存在时,不做查询
@@ -1155,7 +1155,7 @@
    let result = await Api.genericInterface(param)
    if (result.status) {
      if (config.$cache && config.setting.onload !== 'false') {
      if (config.$cache && type === 'init') {
        Api.writeCacheConfig(config.uuid, result.data || [])
      }
src/tabviews/custom/components/chart/antv-bar-line/index.jsx
@@ -374,7 +374,7 @@
    if (config.timer) {
      this.timer = new TimerTask()
      this.timer.init(config.uuid, config.timer, config.timerRepeats, () => {
        this.loadData(true)
        this.loadData('timer')
      })
    }
@@ -407,7 +407,7 @@
          Api.getLCacheConfig(config.uuid, config.$time).then(res => {
            if (!res.valid && config.setting.onload === 'true') {
              setTimeout(() => {
                this.loadData()
                this.loadData('init')
              }, config.setting.delay || 0)
            }
  
@@ -431,7 +431,7 @@
        if (config.setting.onload === 'true') {
          setTimeout(() => {
            this.loadData()
            this.loadData('init')
          }, config.setting.delay || 0)
        } else if (this.loaded) {
          this.handleData()
@@ -544,7 +544,7 @@
  /**
   * @description 数据加载
   */
  async loadData (hastimer) {
  async loadData (type) {
    const { config, arr_field, BID, search } = this.state
    if (config.setting.supModule && !BID) { // BID 不存在时,不做查询
@@ -571,7 +571,7 @@
      return
    }
    if (!hastimer) {
    if (type !== 'timer') {
      this.setState({
        loading: true
      })
@@ -582,7 +582,7 @@
    let result = await Api.genericInterface(param)
    if (result.status) {
      if (config.$cache && config.setting.onload !== 'false') {
      if (config.$cache && type === 'init') {
        Api.writeCacheConfig(config.uuid, result.data || [])
      }
src/tabviews/custom/components/chart/antv-dashboard/index.jsx
@@ -146,7 +146,7 @@
    if (config.timer) {
      this.timer = new TimerTask()
      this.timer.init(config.uuid, config.timer, config.timerRepeats, () => {
        this.loadData(true)
        this.loadData('timer')
      })
    }
@@ -177,7 +177,7 @@
          Api.getLCacheConfig(config.uuid, config.$time).then(res => {
            if (!res.valid && config.setting.onload === 'true') {
              setTimeout(() => {
                this.loadData()
                this.loadData('init')
              }, config.setting.delay || 0)
            }
  
@@ -217,7 +217,7 @@
        if (config.setting.onload === 'true') {
          setTimeout(() => {
            this.loadData()
            this.loadData('init')
          }, config.setting.delay || 0)
        } else if (this.loaded) {
          this.handleData()
@@ -300,7 +300,7 @@
    }, 100)
  }
  async loadData (hastimer) {
  async loadData (type) {
    const { config, arr_field, BID } = this.state
    if (config.setting.supModule && !BID) { // BID 不存在时,不做查询
@@ -329,7 +329,7 @@
      return
    }
    if (!hastimer) {
    if (type !== 'timer') {
      this.setState({
        loading: true
      })
@@ -340,7 +340,7 @@
    let result = await Api.genericInterface(param)
    if (result.status) {
      if (config.$cache && config.setting.onload !== 'false') {
      if (config.$cache && type === 'init') {
        Api.writeCacheConfig(config.uuid, result.data || [])
      }
src/tabviews/custom/components/chart/antv-pie/index.jsx
@@ -118,7 +118,7 @@
    if (config.timer) {
      this.timer = new TimerTask()
      this.timer.init(config.uuid, config.timer, config.timerRepeats, () => {
        this.loadData(true)
        this.loadData('timer')
      })
    }
@@ -149,7 +149,7 @@
          Api.getLCacheConfig(config.uuid, config.$time).then(res => {
            if (!res.valid && config.setting.onload === 'true') {
              setTimeout(() => {
                this.loadData()
                this.loadData('init')
              }, config.setting.delay || 0)
            }
  
@@ -173,7 +173,7 @@
        if (config.setting.onload === 'true') {
          setTimeout(() => {
            this.loadData()
            this.loadData('init')
          }, config.setting.delay || 0)
        } else if (this.loaded) {
          this.handleData()
@@ -259,7 +259,7 @@
    }
  }
  async loadData (hastimer) {
  async loadData (type) {
    const { config, arr_field, search, BID } = this.state
    if (config.setting.supModule && !BID) { // BID 不存在时,不做查询
@@ -286,7 +286,7 @@
      return
    }
    if (!hastimer) {
    if (type !== 'timer') {
      this.setState({
        loading: true
      })
@@ -297,7 +297,7 @@
    let result = await Api.genericInterface(param)
    if (result.status) {
      if (config.$cache && config.setting.onload !== 'false') {
      if (config.$cache && type === 'init') {
        Api.writeCacheConfig(config.uuid, result.data || [])
      }
      this.loaded = true
src/tabviews/custom/components/chart/antv-scatter/index.jsx
@@ -112,7 +112,7 @@
    if (config.timer) {
      this.timer = new TimerTask()
      this.timer.init(config.uuid, config.timer, config.timerRepeats, () => {
        this.loadData(true)
        this.loadData('timer')
      })
    }
@@ -145,7 +145,7 @@
          Api.getLCacheConfig(config.uuid, config.$time).then(res => {
            if (!res.valid && config.setting.onload === 'true') {
              setTimeout(() => {
                this.loadData()
                this.loadData('init')
              }, config.setting.delay || 0)
            }
  
@@ -173,7 +173,7 @@
        if (config.setting.onload === 'true') {
          setTimeout(() => {
            this.loadData()
            this.loadData('init')
          }, config.setting.delay || 0)
        } else if (this.loaded) {
          this.handleData()
@@ -288,7 +288,7 @@
  /**
   * @description 数据加载
   */
  async loadData (hastimer) {
  async loadData (type) {
    const { config, arr_field, BID, search } = this.state
    if (config.setting.supModule && !BID) { // BID 不存在时,不做查询
@@ -318,7 +318,7 @@
      return
    }
    if (!hastimer) {
    if (type !== 'timer') {
      this.setState({
        loading: true
      })
@@ -329,7 +329,7 @@
    let result = await Api.genericInterface(param)
    if (result.status) {
      if (config.$cache && config.setting.onload !== 'false') {
      if (config.$cache && type === 'init') {
        Api.writeCacheConfig(config.uuid, result.data || [])
      }
      this.loaded = true
src/tabviews/custom/components/chart/custom-chart/index.jsx
@@ -101,7 +101,7 @@
    if (config.timer) {
      this.timer = new TimerTask()
      this.timer.init(config.uuid, config.timer, config.timerRepeats, () => {
        this.loadData(true)
        this.loadData('timer')
      })
    }
@@ -134,7 +134,7 @@
          Api.getLCacheConfig(config.uuid, config.$time).then(res => {
            if (!res.valid && config.setting.onload === 'true') {
              setTimeout(() => {
                this.loadData()
                this.loadData('init')
              }, config.setting.delay || 0)
            }
  
@@ -162,7 +162,7 @@
        if (config.setting.onload === 'true') {
          setTimeout(() => {
            this.loadData()
            this.loadData('init')
          }, config.setting.delay || 0)
        } else if (this.loaded) {
          this.handleData()
@@ -279,7 +279,7 @@
  /**
   * @description 数据加载
   */
  async loadData (hastimer) {
  async loadData (type) {
    const { config, arr_field, BID, search } = this.state
    if (config.setting.supModule && !BID) { // BID 不存在时,不做查询
@@ -311,7 +311,7 @@
      return
    }
    if (!hastimer) {
    if (type !== 'timer') {
      this.setState({
        loading: true
      })
@@ -322,7 +322,7 @@
    let result = await Api.genericInterface(param)
    if (result.status) {
      if (config.$cache && config.setting.onload !== 'false') {
      if (config.$cache && type === 'init') {
        Api.writeCacheConfig(config.uuid, result.data || [])
      }
      this.loaded = true
src/tabviews/custom/components/code/sand-box/index.jsx
@@ -116,7 +116,7 @@
            Api.getLCacheConfig(config.uuid, config.$time).then(res => {
              if (!res.valid && config.setting.onload === 'true') {
                setTimeout(() => {
                  this.loadData()
                  this.loadData('init')
                }, config.setting.delay || 0)
              }
    
@@ -142,7 +142,7 @@
  
          if (config.setting.onload === 'true') {
            setTimeout(() => {
              this.loadData()
              this.loadData('init')
            }, config.setting.delay || 0)
          } else if (this.loaded) {
            this.renderView()
@@ -204,7 +204,7 @@
    this.loadData()
  }
  async loadData () {
  async loadData (type) {
    const { config, arr_field, BID } = this.state
    if (config.wrap.datatype === 'static') {
@@ -243,7 +243,7 @@
      let _data = result.data || []
      this.loaded = true
      if (config.$cache && config.setting.onload !== 'false') {
      if (config.$cache && type === 'init') {
        Api.writeCacheConfig(config.uuid, result.data || [])
      }
src/tabviews/custom/components/table/normal-table/index.jsx
@@ -217,7 +217,7 @@
          Api.getLCacheConfig(config.uuid, config.$time).then(res => {
            if (!res.valid && config.setting.onload === 'true') {
              setTimeout(() => {
                this.loadmaindata()
                this.loadmaindata(false, 'true', '', 'init')
              }, config.setting.delay || 0)
            }
  
@@ -279,7 +279,7 @@
        if (config.setting.onload === 'true') {
          setTimeout(() => {
            this.loadmaindata()
            this.loadmaindata(false, 'true', '', 'init')
            this.getStatFieldsValue()
          }, config.setting.delay || 0)
        }
@@ -400,7 +400,7 @@
    let result = await Api.genericInterface(param)
    if (result.status) {
      this.loaded = true
      if (config.$cache && pageIndex === 1 && config.setting.onload !== 'false') {
      if (config.$cache && type === 'init') {
        Api.writeCacheConfig(config.uuid, result.data || [])
      }
src/tabviews/custom/components/timeline/normal-timeline/index.jsx
@@ -123,7 +123,7 @@
    if (config.timer) {
      this.timer = new TimerTask()
      this.timer.init(config.uuid, config.timer, config.timerRepeats, () => {
        this.loadData(true)
        this.loadData('timer')
      })
    }
@@ -158,7 +158,7 @@
          Api.getLCacheConfig(config.uuid, config.$time).then(res => {
            if (!res.valid && config.setting.onload === 'true') {
              setTimeout(() => {
                this.loadData()
                this.loadData('init')
              }, config.setting.delay || 0)
            }
  
@@ -190,7 +190,7 @@
        if (config.setting.onload === 'true') {
          setTimeout(() => {
            this.loadData()
            this.loadData('init')
          }, config.setting.delay || 0)
        }
      }
@@ -317,7 +317,7 @@
    })
  }
  async loadData (hastimer) {
  async loadData (type) {
    const { config, arr_field, BID, BData } = this.state
    
    if (config.setting.supModule && !BID) { // BID 不存在时,不做查询
@@ -343,7 +343,7 @@
      return
    }
    if (!hastimer) {
    if (type !== 'timer') {
      this.setState({
        loading: true
      })
@@ -355,7 +355,7 @@
    let result = await Api.genericInterface(param)
    if (result.status) {
      this.loaded = true
      if (config.$cache && config.setting.onload !== 'false') {
      if (config.$cache && type === 'init') {
        Api.writeCacheConfig(config.uuid, result.data || [])
      }
src/tabviews/custom/components/tree/antd-tree/index.jsx
@@ -105,7 +105,7 @@
    if (config.timer) {
      this.timer = new TimerTask()
      this.timer.init(config.uuid, config.timer, config.timerRepeats, () => {
        this.loadData(true)
        this.loadData('timer')
      })
    }
@@ -138,7 +138,7 @@
          Api.getLCacheConfig(config.uuid, config.$time).then(res => {
            if (!res.valid && config.setting.onload === 'true') {
              setTimeout(() => {
                this.loadData()
                this.loadData('init')
              }, config.setting.delay || 0)
            }
  
@@ -164,7 +164,7 @@
        if (config.setting.onload === 'true') {
          setTimeout(() => {
            this.loadData()
            this.loadData('init')
          }, config.setting.delay || 0)
        } else if (this.loaded) {
          this.handleData()
@@ -272,7 +272,7 @@
  /**
   * @description 数据加载
   */
  async loadData (hastimer) {
  async loadData (type) {
    const { config, arr_field, BID } = this.state
    if (config.setting.supModule && !BID) { // BID 不存在时,不做查询
@@ -294,7 +294,7 @@
      return
    }
    if (!hastimer) {
    if (type !== 'timer') {
      this.setState({
        loading: true
      })
@@ -306,7 +306,7 @@
    let result = await Api.genericInterface(param)
    if (result.status) {
      this.loaded = true
      if (config.$cache && config.setting.onload !== 'false') {
      if (config.$cache && type === 'init') {
        Api.writeCacheConfig(config.uuid, result.data || [])
      }
src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -1081,7 +1081,7 @@
              }, 600)
            }
            this.triggerNote(res) // 消息
            this.triggerNote(res, _param.ID) // 消息
            this.execSuccess(res)
          } else {
            this.execError(res)
@@ -1098,7 +1098,7 @@
            setTimeout(() => {
              Api.genericInterface(param).then(res => {
                if (res.status) {
                  this.triggerNote(res) // 消息
                  this.triggerNote(res, param.ID) // 消息
                }
                resolve(res)
              }, (error) => {
@@ -1449,6 +1449,8 @@
    Api.genericInterface(param).then(res => {
      if (res.status) {
        this.triggerNote(res, param.ID) // 消息
        if (params.length === 0) {
          this.execSuccess(res)
          _resolve()
@@ -1662,7 +1664,7 @@
    Api.genericInterface(param).then(res => {
      if (res.status) {
        this.triggerNote(res) // 消息
        this.triggerNote(res, param.ID) // 消息
        if (params.length === 0) {
          this.execSuccess(res)
@@ -1696,7 +1698,7 @@
    Api.genericInterface(param).then(res => {
      if (res.status) {
        this.triggerNote(res) // 消息
        this.triggerNote(res, param.ID) // 消息
        if (params.length === 0) {
          this.execSuccess(res)
@@ -1718,7 +1720,7 @@
            return new Promise(resolve => {
              Api.genericInterface(unCheckParam).then(result => {
                if (result.status) {
                  _this.triggerNote(result) // 消息
                  _this.triggerNote(result, param.ID) // 消息
          
                  if (params.length === 0) {
                    _this.execSuccess(result)
@@ -1960,6 +1962,8 @@
    Api.genericInterface(param).then(res => {
      if (res.status) {
        this.triggerNote(res, param.ID) // 消息
        // 一次请求成功,进行下一项请求
        if (params.length === 0) {
          this.execSuccess(res)
@@ -2210,15 +2214,19 @@
    }
  }
  triggerNote = (res) => {
  triggerNote = (res, ID) => {
    const { btn } = this.props
    if (!btn.verify) return
    if (btn.verify.noteEnable !== 'true' && btn.verify.wxNote !== 'true') return
    if (btn.verify.noteEnable !== 'true' && btn.verify.wxNote !== 'true' && btn.verify.printEnable !== 'true') return
    let id = ''
    if (btn.output) {
      id = res.mk_b_id || res[btn.output] || ''
    }
    if (btn.verify.printEnable === 'true') {
      this.billPrint(id || ID)
    }
    if (!id) return
@@ -2242,6 +2250,16 @@
    }
  }
  billPrint = (id) => {
    const { btn } = this.props
    if (!id) return
    setTimeout(() => {
      window.open('#/billprint/' + window.btoa(window.encodeURIComponent(JSON.stringify({ id: id, tempId: btn.verify.printTempId, dataM: sessionStorage.getItem('dataM') }))))
    }, 500)
  }
  sendWxMessage = (verify, id) => {
    if (!window.GLOB.nginx) {
      notification.warning({
src/templates/zshare/verifycard/baseform/index.jsx
@@ -15,6 +15,7 @@
    verify: PropTypes.object,
    unionFields: PropTypes.array,
    notes: PropTypes.array,
    appType: PropTypes.any,
    onChange: PropTypes.func
  }
@@ -22,6 +23,7 @@
    wxTemps: [],
    selectTemp: null,
    miniTemps: [],
    printTemps: []
  }
  componentDidMount() {
@@ -76,6 +78,11 @@
      this.resetTemps(wxTemps)
    }
    let printTemps = sessionStorage.getItem('printTemps')
    printTemps = printTemps ? JSON.parse(printTemps) : []
    this.setState({printTemps})
  }
  resetTemps = (wxTemps) => {
@@ -126,6 +133,8 @@
    let error = ''
    if (verify.noteEnable === 'true' && !verify.noteCode) { // 开启短信时,需要模板编码
      error = '开启短信时,需要选择短信模板!'
    } else if (verify.printEnable === 'true' && !verify.printTempId) {
      error = '使用单据打印时,需要选择打印模板!'
    } else if (verify.accountdate === 'true' && !verify.accountfield) {
      error = '开启账期时,需要选择验证公司!'
    } else if (verify.wxNote === 'true') {
@@ -148,6 +157,9 @@
    if (_verify.noteEnable !== 'true') {
      _verify.noteCode = ''
    }
    if (_verify.printEnable !== 'true') {
      _verify.printTempId = ''
    }
    if (_verify.accountdate !== 'true') {
      _verify.accountfield = ''
@@ -184,6 +196,14 @@
    const { verify } = this.props
    let _verify = {...verify, noteCode: val, noteId: option.props.id}
    this.props.onChange(_verify)
  }
  onPrintIdChange = (val) => {
    const { verify } = this.props
    let _verify = {...verify, printTempId: val}
    this.props.onChange(_verify)
  }
@@ -264,8 +284,8 @@
  }
  render() {
    const { unionFields, verify, notes, card } = this.props
    const { wxTemps, selectTemp } = this.state
    const { unionFields, verify, notes, card, appType } = this.props
    const { wxTemps, selectTemp, printTemps } = this.state
    const formItemLayout = {
      labelCol: {
        xs: { span: 24 },
@@ -393,6 +413,31 @@
            </Form.Item>
          </Col> : null}
          <Col span={24}></Col>
          {appType !== 'mob' ? <Col span={8}>
            <Form.Item label={
              <Tooltip placement="bottomLeft" title="使用单据打印时需选择打印模板,跳转打印界面时ID优先从返回值中获取,返回值没有时从行里获取。">
                <QuestionCircleOutlined className="mk-form-tip" />
                单据打印
              </Tooltip>
            }>
              <Radio.Group value={verify.printEnable} onChange={(e) => {this.onOptionChange(e.target.value, 'printEnable')}}>
                <Radio value="true">开启</Radio>
                <Radio value="false">不开启</Radio>
              </Radio.Group>
            </Form.Item>
          </Col> : null}
          {verify.printEnable === 'true' ? <Col span={8}>
            <Form.Item label="打印模板" required>
              <Select value={verify.printTempId} onSelect={this.onPrintIdChange}>
                {printTemps.map(option =>
                  <Select.Option key={option.value} value={option.value}>
                    {option.text}
                  </Select.Option>
                )}
              </Select>
            </Form.Item>
          </Col> : null}
          <Col span={24}></Col>
          <Col span={8}>
            <Form.Item label={
              <Tooltip placement="bottomLeft" title={'请在服务器完成公众号配置。'}>
src/templates/zshare/verifycard/index.jsx
@@ -537,6 +537,7 @@
  UNSAFE_componentWillMount() {
    const { columns, config, card, btnTab } = this.props
    const { appType } = this.state
    let _verify = fromJS(card.verify || {}).toJS()
    let _invalid = _verify.invalid
@@ -553,10 +554,11 @@
    }
    _verify.default = _verify.default || 'true'
    _verify.wxNote = _verify.wxNote || 'false'         // 公众号消息推送是否开启
    _verify.noteEnable = _verify.noteEnable || 'false' // 短信发送是否开启
    _verify.noteType = _verify.noteType || 'N'         // 短信发送模式:Y(实时)、N(定时)
    _verify.noteTemp = _verify.noteTemp || 'Y'         // 短信发送模板:Y(相同)、N(不同)
    _verify.wxNote = _verify.wxNote || 'false'           // 公众号消息推送是否开启
    _verify.noteEnable = _verify.noteEnable || 'false'   // 短信发送是否开启
    _verify.printEnable = _verify.printEnable || 'false' // 单据打印是否开启
    _verify.noteType = _verify.noteType || 'N'           // 短信发送模式:Y(实时)、N(定时)
    _verify.noteTemp = _verify.noteTemp || 'Y'           // 短信发送模板:Y(相同)、N(不同)
    _verify.invalid = _invalid
    _verify.uniques = _verify.uniques || []
    _verify.contrasts = _verify.contrasts || []
@@ -568,6 +570,11 @@
    _verify.voucher = _verify.voucher || {enabled: false}
    _verify.scripts = _verify.scripts || []
    _verify.cbScripts = _verify.cbScripts || []
    if (appType === 'mob') {
      _verify.printEnable = 'false'
      _verify.printTempId = ''
    }
    if (window.GLOB.funcs && window.GLOB.funcs.length > 0) {
      window.GLOB.funcs.forEach(m => {
@@ -1559,7 +1566,7 @@
              {verify.default === 'false' ? <span className="count-tip"><ExclamationOutlined style={{color: 'orange'}}/></span> : null}
            </span>
          } key="base">
            <BaseForm card={card} unionFields={unionFields} setting={setting} verify={verify} notes={notes} onChange={(verify) => this.setState({verify})} wrappedComponentRef={(inst) => this.baseForm = inst}/>
            <BaseForm card={card} appType={appType} unionFields={unionFields} setting={setting} verify={verify} notes={notes} onChange={(verify) => this.setState({verify})} wrappedComponentRef={(inst) => this.baseForm = inst}/>
          </TabPane> : null}
          {verifyInter === 'system' ? <TabPane tab={
            <span>