king
2025-01-16 0a932e56960fc8d39eb9cb04e16cac2249445062
src/templates/zshare/verifycard/index.jsx
@@ -848,7 +848,7 @@
      colfields: colfields.join(', '),
      uniqueColumns: this.state.uniqueColumns.map(col => {
        if (col.dataIndex === 'field') {
          col.options = _fields
          col.options = unionFields
        }
        return col
      }),
@@ -1353,21 +1353,26 @@
        item.field.split(',').forEach((_field, index) => {
          let _key = _field.toLowerCase()
          let _val = ''
          let _val2 = ''
  
          arr.push(_key)
          if (_key === 'bid') { // 表单中没有bid则使用系统bid变量
            _val = BID
          } else if (numForms.includes(_key)) {
            _val = '1'
          } else if (dateForms.includes(_key)) {
            _val = '1949-10-01'
          if (_key === 'bid') {
            _val = `'${BID}'`
          } else {
            _val = `@${_field}`
          }
          _fieldValue.push(`${_key}='${_val}'`)
          _value.push(`${_labels[index] || ''}:${_val || ''}`)
          if (_key === 'bid') {
            _val2 = BID
          } else {
            _val2 = `' + @${_field} + '`
          }
          _fieldValue.push(`${_key}=${_val}`)
          _value.push(`${_labels[index] || ''}:${_val2}`)
        })
  
        if (!arr.includes(primaryKey.toLowerCase())) {
        if (!arr.includes(primaryKey.toLowerCase()) && btn.Ot !== 'notRequired') {
          _fieldValue.push(`${primaryKey} !='${primaryId}'`)
        }
  
@@ -1418,7 +1423,7 @@
    let hasvoucher = false
  
    // 凭证-显示列中选取,必须选行
    if (verify.voucher && verify.voucher.enabled && btn.Ot !== 'requiredOnce') {
    if (verify.voucher && verify.voucher.enabled && btn.Ot !== 'notRequired') {
      let _voucher = verify.voucher
  
      hasvoucher = true
@@ -1426,7 +1431,7 @@
      _sql += `
        /* 创建凭证 */
        exec s_BVoucher_Create
          @Bill ='0',
          @Bill = @${_voucher.linkField},
          @BVoucherType ='${_voucher.BVoucherType}',
          @VoucherTypeOne ='${_voucher.VoucherTypeOne}',
          @VoucherTypeTwo ='${_voucher.VoucherTypeTwo}',
@@ -1899,7 +1904,7 @@
      let hasvoucher = false
  
      // 凭证-显示列中选取,必须选行
      if (verify.voucher && verify.voucher.enabled && btn.Ot !== 'requiredOnce') {
      if (verify.voucher && verify.voucher.enabled && btn.Ot !== 'notRequired') {
        hasvoucher = true
      }
      if (hasvoucher) {
@@ -2442,12 +2447,12 @@
  changeUniques = (uniques) => {
    const { card } = this.props
    const { verify, fields, columnsFields } = this.state
    const { verify, unionFields, columnsFields } = this.state
    let _fields = []
    let change = {}
    if (card.Ot !== 'requiredOnce') {
      _fields = fields
      _fields = unionFields
    } else {
      _fields = columnsFields
    }
@@ -2645,7 +2650,7 @@
            />
            <EditTable actions={['move']} data={verify.customverifys} columns={customColumns} onChange={(customverifys) => {this.setState({verify: {...verify, customverifys}})}}/>
          </TabPane> : null}
          {verifyInter === 'system' ? <TabPane tab={
          {verifyInter === 'system' && (['form', 'pop'].includes(card.OpenType) || !card.OpenType) ? <TabPane tab={
            <span>
              单号生成
              {verify.billcodes.length ? <span className="count-tip">{verify.billcodes.length}</span> : null}
@@ -2663,7 +2668,7 @@
            />
            <EditTable actions={['move']} data={verify.billcodes} columns={orderColumns} onChange={(billcodes) => {this.setState({verify: {...verify, billcodes}})}}/>
          </TabPane> : null}
          {verifyInter === 'system' ? <TabPane tab={
          {verifyInter === 'system' && (card.Ot === 'requiredOnce' || (['form', 'pop'].includes(card.OpenType) || !card.OpenType)) ? <TabPane tab={
            <span>
              {card.Ot !== 'requiredOnce' ? '唯一性验证' : '同类数据验证'}
              {verify.uniques.length ? <span className="count-tip">{verify.uniques.length}</span> : null}
@@ -2671,17 +2676,17 @@
          } key="uniques">
            <UniqueForm
              btn={card}
              fields={card.Ot !== 'requiredOnce' ? fields : columnsFields}
              fields={card.Ot !== 'requiredOnce' ? unionFields : columnsFields}
              uniqueChange={this.uniqueChange}
            />
            <EditTable actions={['edit', 'move', 'del', 'status', 'sql']} data={verify.uniques} columns={card.Ot !== 'requiredOnce' ? uniqueColumns : onceUniqueColumns} onChange={this.changeUniques}/>
          </TabPane> : null}
          {verifyInter === 'system' ? <TabPane tab={
            <span>
            <span title={card.Ot === 'notRequired' ? '不选行时创建凭证不可用' : ''}>
              创建凭证
              {verify.voucher && verify.voucher.enabled ? <span className="count-tip">1</span> : null}
            </span>
          } key="voucher">
          } key="voucher" disabled={card.Ot === 'notRequired'}>
            <VoucherForm
              voucher={voucher}
              columns={columns}