king
2024-05-21 66bdbc1df92e8ec4a5108a4e0323e25a7b9ff8f8
src/templates/zshare/verifycard/baseform/index.jsx
@@ -134,6 +134,8 @@
      error = '开启邮件发送时,需要选择邮件模板!'
    } else if (verify.printEnable === 'true' && !verify.printTempId) {
      error = '使用单据打印时,需要选择打印模板!'
    } else if (verify.linkEnable === 'true' && !verify.linkUrl) {
      error = '打开链接开启时,需要添加链接地址!'
    } else if (verify.accountdate === 'true' && !verify.accountfield) {
      error = '开启账期时,需要选择验证公司!'
    } else if (verify.preHandle === 'true' && !verify.pre_func) {
@@ -166,6 +168,10 @@
    }
    if (_verify.printEnable !== 'true') {
      _verify.printTempId = ''
    }
    if (_verify.linkEnable !== 'true') {
      delete _verify.linkUrl
      delete _verify.linkProUrl
    }
    if (_verify.accountdate !== 'true') {
      _verify.accountfield = ''
@@ -292,7 +298,7 @@
  }
  render() {
    const { unionFields, verify, notes, emailCodes, card, appType, columns } = this.props
    const { unionFields, verify, notes, emailCodes, card, appType, columns, fields } = this.props
    const { wxTemps, selectTemp } = this.state
    const formItemLayout = {
      labelCol: {
@@ -306,13 +312,29 @@
    }
    let _columns = []
    if (window.GLOB.process) {
      _columns = columns.filter(col => {
        if (!col.field) return false
        if (col.field.toLowerCase() === 'id') return false
        if (col.type === 'text' && col.fieldlength > 100)  return false
    let remarks = []
    if (window.GLOB.process && card.intertype !== 'inner') {
      let cols = []
      fields.forEach(col => {
        if (!col.field) return
        cols.push(col.field.toLowerCase())
        _columns.push(col)
        if ((col.type === 'text' || col.type === 'textarea') && col.field !== 'BID') {
          remarks.push(col)
        }
      })
      columns.forEach(col => {
        if (!col.field) return
        let key = col.field.toLowerCase()
        if (key === 'id' || cols.includes(key)) return
        if (col.type === 'text' && col.fieldlength > 100)  return
  
        return true
        _columns.push(col)
      })
    }
@@ -524,7 +546,31 @@
            </Form.Item>
          </Col> : null}
          <Col span={24}></Col>
          {window.GLOB.process ? <Col span={8}>
          <Col span={8}>
            <Form.Item label={
              <Tooltip placement="bottomLeft" title="按钮执行成功后需要打开的链接地址。">
                <QuestionCircleOutlined className="mk-form-tip" />
                打开链接
              </Tooltip>
            }>
              <Radio.Group value={verify.linkEnable || 'false'} onChange={(e) => {this.onOptionChange(e.target.value, 'linkEnable')}}>
                <Radio value="true">开启</Radio>
                <Radio value="false">不开启</Radio>
              </Radio.Group>
            </Form.Item>
          </Col>
          {verify.linkEnable === 'true' ? <Col span={24} className="dz-link">
            <Form.Item label="链接地址" required>
              <Input.TextArea autoComplete="off" value={verify.linkUrl || ''} onChange={(e) => {this.onOptionChange(e.target.value, 'linkUrl')}}/>
            </Form.Item>
          </Col> : null}
          {verify.linkEnable === 'true' ? <Col span={24} className="dz-link">
            <Form.Item label="正式地址">
              <Input.TextArea autoComplete="off" value={verify.linkProUrl || ''} onChange={(e) => {this.onOptionChange(e.target.value, 'linkProUrl')}}/>
            </Form.Item>
          </Col> : null}
          <Col span={24}></Col>
          {window.GLOB.process && card.intertype !== 'inner' ? <Col span={8}>
            <Form.Item label={
              <Tooltip placement="bottomLeft" title="在菜单开启工作流时有效。">
                <QuestionCircleOutlined className="mk-form-tip" />
@@ -537,7 +583,7 @@
              </Radio.Group>
            </Form.Item>
          </Col> : null}
          {window.GLOB.process && verify.workFlow === 'true' ? <Col span={8}>
          {window.GLOB.process && card.intertype !== 'inner' && verify.workFlow === 'true' ? <Col span={8}>
            <Form.Item label="类型">
              <Radio.Group value={verify.flowType} onChange={(e) => {this.onOptionChange(e.target.value, 'flowType')}}>
                <Radio value="start">发起</Radio>
@@ -546,7 +592,7 @@
              </Radio.Group>
            </Form.Item>
          </Col> : null}
          {window.GLOB.process && verify.workFlow === 'true' ? <Col span={8}>
          {window.GLOB.process && card.intertype !== 'inner' && verify.workFlow === 'true' ? <Col span={8}>
            <Form.Item label={
              <Tooltip placement="bottomLeft" title="执行位置在系统默认sql之后。">
                <QuestionCircleOutlined className="mk-form-tip" />
@@ -559,9 +605,9 @@
              </Radio.Group>
            </Form.Item>
          </Col> : null}
          {window.GLOB.process && verify.workFlow === 'true' && verify.flowType === 'approval' ? <Col span={8}>
          {window.GLOB.process && card.intertype !== 'inner' && verify.workFlow === 'true' && verify.flowType === 'approval' ? <Col span={8}>
            <Form.Item label={
              <Tooltip placement="bottomLeft" title="如果审批存在多条分支,可添加审批流程的控制字段,通过行信息控制流程走向。注:需在流程图中完善分支的执行条件。">
              <Tooltip placement="bottomLeft" title="如果审批存在多条分支,可添加审批流程的控制字段,通过表单信息或行信息控制流程走向。注:需在流程图中完善分支的执行条件。">
                <QuestionCircleOutlined className="mk-form-tip" />
                流程控制
              </Tooltip>
@@ -575,6 +621,22 @@
              </Select>
            </Form.Item>
          </Col> : null}
          {window.GLOB.process && card.intertype !== 'inner' && verify.workFlow === 'true' && verify.flowType !== 'start' ? <Col span={8}>
            <Form.Item label={
              <Tooltip placement="bottomLeft" title="可通过表单字段填写审批或驳回的备注信息。">
                <QuestionCircleOutlined className="mk-form-tip" />
                备注字段
              </Tooltip>
            }>
              <Select allowClear value={verify.flowRemark} onChange={(val) => {this.onOptionChange(val || '', 'flowRemark')}}>
                {remarks.map(option =>
                  <Select.Option key={option.field} value={option.field}>
                    {option.label}
                  </Select.Option>
                )}
              </Select>
            </Form.Item>
          </Col> : null}
          <Col span={24}></Col>
          <Col span={8}>
            <Form.Item label={