king
2021-04-16 d7534812c8199bf1e9faa0279b63e434737d6374
src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -99,7 +99,7 @@
   * @description 触发按钮操作
   */
  actionTrigger = (triggerId, record) => {
    const { setting, Tab, BID, btn, selectedData } = this.props
    const { Tab, BID, btn, selectedData } = this.props
    const { loading } = this.state
    if ((triggerId && btn.uuid !== triggerId) || loading) return
@@ -129,14 +129,6 @@
      notification.warning({
        top: 92,
        message: this.state.dict['main.action.confirm.selectSingleLine'],
        duration: 5
      })
      return
    } else if (btn.OpenType !== 'formSubmit' && !setting.primaryKey) {
      // 需要选择行时,校验是否设置主键
      notification.warning({
        top: 92,
        message: '未设置主键!',
        duration: 5
      })
      return
@@ -258,7 +250,7 @@
      
      let primaryId = ''
      if (btn.Ot === 'requiredSgl' || btn.Ot === 'requiredOnce') {
      if ((btn.Ot === 'requiredSgl' || btn.Ot === 'requiredOnce') && setting.primaryKey) {
        let ids = data.map(d => { return d[setting.primaryKey] || ''})
        ids = ids.filter(Boolean)
        primaryId = ids.join(',')
@@ -512,13 +504,15 @@
      
      let primaryId = ''
      if (btn.Ot === 'requiredSgl' || btn.Ot === 'requiredOnce') {
      if ((btn.Ot === 'requiredSgl' || btn.Ot === 'requiredOnce') && setting.primaryKey) {
        let ids = data.map(d => { return d[setting.primaryKey] || ''})
        ids = ids.filter(Boolean)
        primaryId = ids.join(',')
      }
      param[setting.primaryKey] = primaryId // 设置主键参数
      if (setting.primaryKey) {
        param[setting.primaryKey] = primaryId // 设置主键参数
      }
      if (btn.OpenType === 'pop' || btn.OpenType === 'formSubmit') { // 表单
        formdata.forEach(_data => {
@@ -559,7 +553,9 @@
            param[_data.key] = _data.value
          })
        }
        param[setting.primaryKey] = primaryId
        if (setting.primaryKey) {
          param[setting.primaryKey] = primaryId
        }
        if (this.props.menuType === 'HS' && param.func === 's_sDataDictb_TBBack' && param.LTextOut) { // 函数 s_sDataDictb_TBBack 云端验证
          param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
@@ -1687,7 +1683,7 @@
          type="link"
          title={show === 'icon' ? btn.label : ''}
          loading={loading}
          style={btn.btnstyle || style}
          style={btn.style || style}
          icon={show === 'text' ? '' : (btn.icon || '')}
          onClick={() => {this.actionTrigger()}}
        >{show === 'icon' && btn.icon ? '' : btn.label}</Button>