king
2023-10-09 b20d0f21e53b3730de9ad1e7d96f25512620ff77
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,21 @@
    _verify.voucher = _verify.voucher || {enabled: false}
    _verify.scripts = _verify.scripts || []
    _verify.cbScripts = _verify.cbScripts || []
    if (window.GLOB.process) {
      _verify.workFlow = _verify.workFlow || 'false'
      _verify.flowType = _verify.flowType || (card.sqlType === 'insert' ? 'start' : 'approval')
      _verify.flowSql = _verify.flowSql || 'true'
    } else {
      delete _verify.workFlow
      delete _verify.flowType
      delete _verify.flowSql
    }
    if (appType === 'mob') {
      _verify.printEnable = 'false'
      _verify.printTempId = ''
    }
    if (window.GLOB.funcs && window.GLOB.funcs.length > 0) {
      window.GLOB.funcs.forEach(m => {
@@ -609,7 +626,7 @@
      oriVerify: fromJS(_verify).toJS()
    })
    if (config.Template !== 'FormTab' && card.intertype === 'inner') {
    if (card.intertype === 'inner') {
      return
    }
@@ -620,11 +637,6 @@
          field: card.field,
          label: card.label,
          type: 'text'
        })
        resolve(_fields)
      } else if (config.Template === 'FormTab') {
        config.groups.forEach(group => {
          _fields.push(...group.sublist)
        })
        resolve(_fields)
      } else if (card.modal && (card.OpenType === 'pop' || !card.OpenType)) {
@@ -714,7 +726,7 @@
          _fieldlen = _f.decimal ? _f.decimal : 0
        }
        if (_fieldlen > 2048) {
        if (_fieldlen > 4000) {
          _fieldlen = 'max'
        }
@@ -779,7 +791,7 @@
          let _fieldlen = _f.fieldlength || 50
          if (_fieldlen > 2048) {
          if (_fieldlen > 4000) {
            _fieldlen = 'max'
          }
@@ -1536,7 +1548,7 @@
  }
  render() {
    const { card } = this.props
    const { card, columns } = this.props
    const { activeKey, verifyInter, setting, verify, fields, uniqueFields, uniqueColumns, unionFields, onceUniqueColumns, columnsFields, contrastColumns, customColumns, orderColumns, scriptsColumns, cbScriptsColumns, orderModular, orderModularDetail, voucher, voucherDetail, notes, appType } = this.state
    const formItemLayout = {
      labelCol: {
@@ -1559,7 +1571,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} columns={columns} 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>
@@ -1595,7 +1607,7 @@
              fields={fields}
              btn={this.props.card}
              billcodes={verify.billcodes}
              columns={this.props.columns}
              columns={columns}
              modular={orderModular}
              modularDetail={orderModularDetail}
              orderChange={this.orderChange}
@@ -1624,7 +1636,7 @@
          } key="voucher">
            <VoucherForm
              voucher={voucher}
              columns={this.props.columns}
              columns={columns}
              voucherobj={verify.voucher}
              voucherDetail={voucherDetail}
              voucherChange={this.voucherChange}
@@ -1659,6 +1671,8 @@
            <CustomScript
              btn={this.props.card}
              initsql={this.state.initsql}
              workFlow={verify.workFlow}
              flowType={verify.flowType}
              customScripts={verify.scripts}
              defaultsql={this.state.defaultsql}
              usefulfields={this.state.usefulfields}