king
2023-05-22 43a517b80f2803e0dcf6658113520c4a14c8c17f
2023-05-22
32个文件已修改
2个文件已添加
1217 ■■■■ 已修改文件
src/menu/components/card/balcony/options.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/options.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/double-data-card/options.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/carousel/data-card/options.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/module/voucher/voucherTable/index.scss 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/columns/index.jsx 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/columns/tableIn/index.jsx 117 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/columns/tableIn/index.scss 130 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/options.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/options.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/timeline/normal-timeline/options.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/module/voucher/voucherTable/index.scss 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/edit-table/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/edit-table/normalTable/index.jsx 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/index.jsx 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/normalbutton/index.jsx 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx 53 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelin/index.scss 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/baseform/index.jsx 111 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/billcodeform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/contrastform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/customform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/fullScripts/index.jsx 130 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/fullScripts/index.scss 130 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/index.jsx 121 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/index.scss 130 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/uniqueform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/voucherform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/balcony/options.jsx
@@ -261,13 +261,13 @@
      type: 'radio',
      field: 'permission',
      label: '权限验证',
      initval: wrap.permission || 'false',
      initval: wrap.permission || (!appType ? 'true' : 'false'),
      required: false,
      options: [
        {value: 'true', label: '启用'},
        {value: 'false', label: '禁用'},
      ],
      forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview'
      forbid: sessionStorage.getItem('editMenuType') === 'popview'
    },
    {
      type: 'select',
src/menu/components/card/data-card/options.jsx
@@ -522,13 +522,13 @@
      type: 'radio',
      field: 'permission',
      label: '权限验证',
      initval: wrap.permission || 'false',
      initval: wrap.permission || (!appType ? 'true' : 'false'),
      required: false,
      options: [
        {value: 'true', label: '启用'},
        {value: 'false', label: '禁用'},
      ],
      forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview'
      forbid: sessionStorage.getItem('editMenuType') === 'popview'
    },
    {
      type: 'multiselect',
src/menu/components/card/double-data-card/options.jsx
@@ -233,13 +233,13 @@
      type: 'radio',
      field: 'permission',
      label: '权限验证',
      initval: wrap.permission || 'false',
      initval: wrap.permission || (!appType ? 'true' : 'false'),
      required: false,
      options: [
        {value: 'true', label: '启用'},
        {value: 'false', label: '禁用'},
      ],
      forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview'
      forbid: sessionStorage.getItem('editMenuType') === 'popview'
    },
    {
      type: 'multiselect',
src/menu/components/carousel/data-card/options.jsx
@@ -206,13 +206,13 @@
      type: 'radio',
      field: 'permission',
      label: '权限验证',
      initval: wrap.permission || 'false',
      initval: wrap.permission || (!appType ? 'true' : 'false'),
      required: false,
      options: [
        {value: 'true', label: '启用'},
        {value: 'false', label: '禁用'},
      ],
      forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview'
      forbid: sessionStorage.getItem('editMenuType') === 'popview'
    },
    {
      type: 'multiselect',
src/menu/components/module/voucher/voucherTable/index.scss
@@ -31,10 +31,10 @@
      border-right: 1px solid #e9e9e9;
    }
    span:nth-child(3), span:nth-child(6) {
      border-color: #91d5ff;
      border-color: #474069;
    }
    span:nth-child(9) {
      border-color: #ffa39e;
      border-color: #C48584;
    }
  }
@@ -45,7 +45,7 @@
      tr {
        th {
          position: relative;
          background-color: transparent;
          background-color: #E3E7F2;
          padding: 0;
          height: 60px;
          line-height: 60px;
@@ -83,6 +83,9 @@
      max-width: 60px;
    }
    .ant-table-tbody {
      tr:last-child {
        background-color: #FBF8EF;
      }
      tr td {
        position: relative;
        background-color: transparent;
src/menu/components/table/edit-table/columns/index.jsx
@@ -482,7 +482,22 @@
  deleteCol = (col) => {
    let _columns = fromJS(this.state.columns).toJS()
    if (col.type === 'colspan' && col.subcols && col.subcols.length > 0) {
      let Index = _columns.findIndex(item => item.uuid === col.uuid)
      if (Index !== -1) {
        let list = col.subcols.map(item => {
          item.isSub = false
          return item
        })
        _columns.splice(Index, 1, ...list)
      } else {
    _columns = this.loopDelCol(_columns, col)
      }
    } else {
      _columns = this.loopDelCol(_columns, col)
    }
    this.setState({
      columns: _columns
src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx
@@ -300,29 +300,27 @@
      }
    }
    let _type = type || ''
    return (
      <Form {...formItemLayout} className="verify-form" id="verify-excelin-custom-scripts">
        <Row gutter={24}>
          {!_type && btn.sheet ? <Col span={8}>
          {!type && btn.sheet ? <Col span={8}>
            <Form.Item label={'表名'} style={{whiteSpace: 'nowrap', margin: 0}}>
              {btn.sheet}
            </Form.Item>
          </Col> : null}
          {!_type ? <Col span={10}>
          {!type ? <Col span={10}>
            <Form.Item label={'报错字段'} style={{margin: 0, whiteSpace: 'nowrap'}}>
              ErrorCode(增加后缀NT表示数据不回滚,如ENT、NNT、FNT、NMNT), retmsg
            </Form.Item>
          </Col> : null}
          {!_type ? <Col span={24} className="sqlfield">
          {!type ? <Col span={24} className="sqlfield">
            <Form.Item label={'可用字段'}>
              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'公共值,请按照@xxx@格式使用。'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, time_id</span></Tooltip>,&nbsp;
              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'系统变量,系统会定义变量并赋值。'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address</span></Tooltip>,&nbsp;
              {usefulfields},data_type(注:jskey为主键值,新增时前端生成;data_type为操作类型,新增 - add、修改 - upt、删除 - del)
            </Form.Item>
          </Col> : null}
          {!_type ? <Col span={8} style={{whiteSpace: 'nowrap'}}>
          {!type ? <Col span={8} style={{whiteSpace: 'nowrap'}}>
            <Form.Item style={{marginBottom: 0}} label={
              <Tooltip placement="bottomLeft" title={'自定义脚本与默认sql位置关系。'}>
                <QuestionCircleOutlined className="mk-form-tip" />
@@ -340,7 +338,7 @@
              )}
            </Form.Item>
          </Col> : null}
          {!_type ? <Col span={10}>
          {!type ? <Col span={10}>
            <Form.Item style={{marginBottom: 0}} label={'快捷添加'}>
              <Select
                showSearch
@@ -364,7 +362,7 @@
          </Col> : null}
          <Col span={6} className="add">
            <Button onClick={this.handleConfirm} loading={this.state.loading} className="mk-green" style={{marginBottom: 15, marginLeft: 40}}>
              {_type === 'fullscreen' && !editItem ? '添加' : '保存'}
              {type === 'fullscreen' && !editItem ? '添加' : '保存'}
            </Button>
            <Button onClick={this.handleCancel} style={{marginBottom: 15, marginLeft: 10}}>
              取消
src/menu/components/table/edit-table/columns/tableIn/index.jsx
@@ -2,7 +2,7 @@
import PropTypes from 'prop-types'
import { fromJS } from 'immutable'
import { Form, Tabs, Row, Col, Input, Button, Popconfirm, notification, Modal, message, InputNumber, Radio, Typography } from 'antd'
import { StopTwoTone, CheckCircleTwoTone, EditOutlined, SwapOutlined, DeleteOutlined, BorderOutlined, CheckCircleOutlined, StopOutlined } from '@ant-design/icons'
import { StopTwoTone, CheckCircleTwoTone, EditOutlined, SwapOutlined, DeleteOutlined } from '@ant-design/icons'
import moment from 'moment'
import Api from '@/api'
@@ -10,7 +10,6 @@
import MKEmitter from '@/utils/events.js'
import UniqueForm from './uniqueform'
import CustomScript from './customscript'
import MinView from '@/assets/img/minview.png'
import asyncComponent from '@/utils/asyncComponent'
import './index.scss'
@@ -18,6 +17,7 @@
const { confirm } = Modal
const { Paragraph } = Typography
const EditTable = asyncComponent(() => import('@/templates/zshare/editTable'))
const FullScripts = asyncComponent(() => import('@/templates/zshare/verifycard/fullScripts'))
class VerifyTableCard extends Component {
  static propTpyes = {
@@ -26,8 +26,6 @@
  }
  state = {
    visible: false,
    scriptId: '',
    verify: {},
    fields: [],
    fieldLabel: {},
@@ -493,7 +491,7 @@
  }
  render() {
    const { verify, scriptsColumns, uniqueColumns, activeKey, fields, visible } = this.state
    const { verify, scriptsColumns, uniqueColumns, activeKey, fields } = this.state
    const formItemLayout = {
      labelCol: {
        xs: { span: 24 },
@@ -582,17 +580,23 @@
              {verify.scripts.length ? <span className="count-tip">{verify.scripts.length}</span> : null}
            </span>
          } key="scripts">
            <BorderOutlined className="full-scripts" onClick={() => {
              if (this.scriptsForm && (this.scriptsForm.state.editItem || (this.scriptsForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.scriptsForm.props.form.getFieldValue('sql'))))) {
                notification.warning({
                  top: 92,
                  message: '请保存自定义脚本!',
                  duration: 5
                })
                return
              }
              this.setState({visible: true, scriptId: ''})
            }}/>
            <FullScripts
              verify={verify}
              getScriptsFullForm={() => this.scriptsFullForm}
              getScriptsForm={() => this.scriptsForm}
              handleStatus={this.handleStatus}
              handleDelete={this.handleDelete}
            >
              <CustomScript
                type="fullscreen"
                btn={verify}
                usefulfields={fields}
                scripts={verify.scripts}
                systemScripts={this.state.systemScripts}
                scriptsChange={this.scriptsChange}
                wrappedComponentRef={(inst) => this.scriptsFullForm = inst}
              />
            </FullScripts>
            <CustomScript
              btn={verify}
              usefulfields={fields}
@@ -691,87 +695,6 @@
            </Form>
          </TabPane>
        </Tabs>
        <Modal
          wrapClassName="model-custom-scripts-modal"
          title="自定义脚本"
          visible={visible}
          width={'95vw'}
          maskClosable={false}
          destroyOnClose
        >
          <img className="unfull-scripts" src={MinView} onClick={() => this.setState({visible: false, scriptId: ''})} alt=""/>
          <div className="script-table-wrap">
            {verify.scripts.map(item => {
              let title = item.sql.match(/^\s*\/\*.+\*\//)
              title = title && title[0] ? title[0] : ''
              let _text = title ? item.sql.replace(title, '') : item.sql
              let position = null
              if (item.position === 'init') {
                position = <span style={{color: 'orange'}}>初始化</span>
              } else if (item.position === 'front') {
                position = <span style={{color: '#26C281'}}>sql前</span>
              } else {
                position = <span style={{color: '#1890ff'}}>sql后</span>
              }
              if (item.status === 'false') {
                return (
                  <div className="script-item" key={item.uuid}>
                    <div style={{cursor: 'not-allowed'}}>
                      {title ? <div style={{color: '#a50', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis'}}>{title}</div> : null}
                      <Paragraph copyable={{ text: item.sql }} ellipsis={{ rows: 4 }}>{_text}</Paragraph>
                      <div>{position}
                        <span style={{color: '#ff4d4f', marginLeft: '20px'}}>
                          禁用
                          <StopOutlined style={{marginLeft: '5px'}} />
                        </span>
                      </div>
                    </div>
                    <div style={{height: '24px'}}></div>
                  </div>
                )
              } else {
                return (
                  <div className={'script-item ' + (this.state.scriptId === item.uuid ? 'active' : '') } key={item.uuid}>
                    <div style={{cursor: 'pointer'}} onClick={() => {
                      this.scriptsFullForm.edit(item)
                      this.setState({scriptId: item.uuid})
                    }}>
                      {title ? <div style={{color: '#a50', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis'}}>{title}</div> : null}
                      <Paragraph copyable={{ text: item.sql }} ellipsis={{ rows: 4 }}>{_text}</Paragraph>
                      <div>{position}
                        <span style={{color: '#26C281', marginLeft: '20px'}}>
                          启用
                          <CheckCircleOutlined style={{marginLeft: '5px'}}/>
                        </span>
                      </div>
                    </div>
                    <div style={{textAlign: 'right'}}>
                      <span className="operation-btn" onClick={() => this.handleStatus(item, 'scripts')} style={{color: '#8E44AD'}}><SwapOutlined /></span>
                      <Popconfirm
                        overlayClassName="popover-confirm"
                        title="确定删除吗?"
                        onConfirm={() => this.handleDelete(item, 'scripts')
                      }>
                        <span className="operation-btn" style={{color: '#ff4d4f'}}><DeleteOutlined /></span>
                      </Popconfirm>
                    </div>
                  </div>
                )
              }
            })}
          </div>
          <CustomScript
            type="fullscreen"
            btn={verify}
            usefulfields={fields}
            scripts={verify.scripts}
            systemScripts={this.state.systemScripts}
            scriptsChange={this.scriptsChange}
            wrappedComponentRef={(inst) => this.scriptsFullForm = inst}
          />
        </Modal>
      </div>
    )
  }
src/menu/components/table/edit-table/columns/tableIn/index.scss
@@ -86,133 +86,3 @@
    z-index: 1;
  }
}
.model-custom-scripts-modal {
  .ant-modal {
    top: 30px;
    .ant-modal-header {
      padding: 10px 24px;
    }
    .ant-modal-footer {
      display: none;
    }
    .ant-modal-close {
      display: none;
    }
    .ant-modal-body {
      padding: 0;
      height: calc(100vh - 100px);
      overflow: hidden;
      display: flex;
      .script-table-wrap {
        width: 240px;
        overflow-y: auto;
        overflow-x: hidden;
        height: calc(100vh - 100px);
        .operation-btn {
          display: inline-block;
          font-size: 16px;
          padding: 0 5px;
          cursor: pointer;
          margin-left: 5px;
        }
        .script-item {
          border-bottom: 1px solid #eeeeee;
          padding: 15px 10px 5px;
        }
        .script-item.active {
          background-color: #bae7ff;
        }
        .ant-typography {
          margin-bottom: 5px;
        }
      }
      .script-table-wrap::-webkit-scrollbar {
        width: 7px;
      }
      .script-table-wrap::-webkit-scrollbar-thumb {
        border-radius: 5px;
        box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13);
        background: rgba(0, 0, 0, 0.13);
      }
      .script-table-wrap::-webkit-scrollbar-track {
        box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05);
        border-radius: 3px;
        border: 1px solid rgba(0, 0, 0, 0.07);
        background: rgba(0, 0, 0, 0);
      }
      .unfull-scripts {
        position: absolute;
        right: 20px;
        z-index: 2;
        top: 10px;
        color: #1890ff;
        width: 26px;
        cursor: pointer;
        padding: 5px;
      }
      .verify-form {
        flex: 1;
        >.ant-row {
          margin: 0!important;
          position: unset;
        }
        .sql {
          padding: 0!important;
          .ant-form-item-label {
            display: none;
          }
          .ant-form-item-control-wrapper {
            width: 100%;
          }
          .CodeMirror {
            height: calc(100vh - 100px);
            border-radius: 0;
          }
          .code-mirror-area {
            border-radius: 0;
            width: calc(95vw - 240px);
          }
        }
        .sqlfield {
          .ant-form-item {
            margin-bottom: 5px;
          }
          .ant-form-item-control {
            line-height: 24px;
          }
          .ant-form-item-label {
            line-height: 25px;
          }
          .ant-form-item-children {
            line-height: 22px;
          }
          .ant-col-sm-8 {
            width: 10.5%;
          }
          .ant-col-sm-16 {
            width: 89.5%;
          }
        }
        .add {
          position: absolute;
          top: 10px;
          z-index: 1;
          .ant-btn {
            height: 28px;
          }
          .mk-green {
            margin-left: 0!important;
            margin-right: 10px;
          }
        }
      }
    }
  }
}
src/menu/components/table/edit-table/options.jsx
@@ -274,13 +274,13 @@
      type: 'radio',
      field: 'permission',
      label: '权限验证',
      initval: wrap.permission || 'false',
      initval: wrap.permission || (!appType ? 'true' : 'false'),
      required: false,
      options: [
        {value: 'true', label: '启用'},
        {value: 'false', label: '禁用'},
      ],
      forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview'
      forbid: sessionStorage.getItem('editMenuType') === 'popview'
    },
    // {
    //   type: 'radio',
src/menu/components/table/normal-table/options.jsx
@@ -269,13 +269,13 @@
      type: 'radio',
      field: 'permission',
      label: '权限验证',
      initval: wrap.permission || 'false',
      initval: wrap.permission || (!appType ? 'true' : 'false'),
      required: false,
      options: [
        {value: 'true', label: '启用'},
        {value: 'false', label: '禁用'},
      ],
      forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview'
      forbid: sessionStorage.getItem('editMenuType') === 'popview'
    },
    {
      type: 'multiselect',
src/menu/components/timeline/normal-timeline/options.jsx
@@ -165,13 +165,13 @@
      type: 'radio',
      field: 'permission',
      label: '权限验证',
      initval: wrap.permission || 'false',
      initval: wrap.permission || (!appType ? 'true' : 'false'),
      required: false,
      options: [
        {value: 'true', label: '启用'},
        {value: 'false', label: '禁用'},
      ],
      forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview'
      forbid: sessionStorage.getItem('editMenuType') === 'popview'
    },
    {
      type: 'radio',
src/tabviews/custom/components/module/voucher/voucherTable/index.scss
@@ -31,10 +31,10 @@
      border-right: 1px solid #e9e9e9;
    }
    span:nth-child(3), span:nth-child(6) {
      border-color: #91d5ff;
      border-color: #474069;
    }
    span:nth-child(9) {
      border-color: #ffa39e;
      border-color: #C48584;
    }
  }
@@ -45,7 +45,7 @@
      tr {
        th {
          position: relative;
          background-color: transparent;
          background-color: #E3E7F2;
          padding: 0;
          height: 60px;
          line-height: 60px;
@@ -83,6 +83,9 @@
      max-width: 60px;
    }
    .ant-table-tbody {
      tr:last-child {
        background-color: #FBF8EF;
      }
      tr td {
        position: relative;
        background-color: transparent;
src/tabviews/custom/components/table/edit-table/index.jsx
@@ -481,7 +481,9 @@
        BID: id,
        BData: data
      }, () => {
        setTimeout(() => {
        this.loadmaindata(true, 'true')
        }, setting.delay || 0)
      })
    }
  }
src/tabviews/custom/components/table/edit-table/normalTable/index.jsx
@@ -220,15 +220,7 @@
      }
    }, 50)
    let values = {}
    // if (col.editField) {
    //   values[col.field] = label
    //   values[col.editField] = val
    // } else {
      values[col.field] = val
    // }
    MKEmitter.emit('changeRecord', col.tableId, {...record, ...values})
    MKEmitter.emit('changeRecord', col.tableId, {...record, [col.field]: val})
  }
  onSelectChange = (val, option) => {
@@ -244,12 +236,7 @@
        })
      }
      // if (col.editField) {
      //   values[col.field] = _option.label
      //   values[col.editField] = val
      // } else {
        values[col.field] = val
      // }
    }
    this.setState({editing: false})
@@ -333,22 +320,14 @@
              <Input className={err ? 'has-error' : ''} title={err} id={col.uuid + record.$$uuid} defaultValue={value} onChange={(e) => this.onChange(e.target.value)} onPressEnter={this.enterPress} onBlur={this.onBlur}/>
            </td>)
          } else if (col.editType === 'switch') {
            let _value = ''
            // if (col.editField) {
            //   _value = record[col.editField] !== undefined ? record[col.editField] : ''
            // } else {
              _value = record[col.field] !== undefined ? record[col.field] : ''
            // }
            let _value = record[col.field] !== undefined ? record[col.field] : ''
            return (<td className="editing_table_cell">
              <CusSwitch config={col} defaultValue={_value} autoFocus={true} onChange={this.onSwitchChange} onBlur={this.switchBlur}/>
            </td>)
          } else {
            let _value = ''
            // if (col.editField) {
            //   _value = record[col.editField] !== undefined ? record[col.editField] : ''
            // } else {
              _value = record[col.field] !== undefined ? record[col.field] : ''
            // }
            let _value = record[col.field] !== undefined ? record[col.field] : ''
            return (<td className="editing_table_cell">
              <Select
                showSearch
@@ -641,15 +620,7 @@
      }
    }, 50)
    let values = {}
    // if (col.editField) {
    //   values[col.field] = label
    //   values[col.editField] = val
    // } else {
      values[col.field] = val
    // }
    MKEmitter.emit('changeRecord', col.tableId, {...record, ...values})
    MKEmitter.emit('changeRecord', col.tableId, {...record, [col.field]: val})
  }
  onSelectChange = (val, option) => {
@@ -665,12 +636,7 @@
        })
      }
      // if (col.editField) {
      //   values[col.field] = _option.label
      //   values[col.editField] = val
      // } else {
        values[col.field] = val
      // }
    }
    setTimeout(() => {
@@ -707,12 +673,7 @@
    let children = null
    if (col.type === 'text') {
      if (col.editable === 'true' && !disabled) {
        let _value = ''
        // if (col.editField) {
        //   _value = record[col.editField] !== undefined ? record[col.editField] : ''
        // } else {
          _value = record[col.field] !== undefined ? record[col.field] : ''
        // }
        let _value = record[col.field] !== undefined ? record[col.field] : ''
        
        if (!col.editType || col.editType === 'text') {
          children = (<>
@@ -776,6 +737,11 @@
            content = <span style={mark.innerStyle}>{content}</span>
          }
        }
        if (col.editable === 'true' && disabled) {
          content = <span style={{display: 'inline-block', padding: '0 6px'}}>{content}</span>
        }
        children = content
      }
    } else if (col.type === 'number') {
@@ -838,6 +804,11 @@
            content = <span style={mark.innerStyle}>{content}</span>
          }
        }
        if (col.editable === 'true' && disabled) {
          content = <span style={{display: 'inline-block', padding: '0 6px'}}>{content}</span>
        }
        children = content
      }
    } else if (col.type === 'textarea') {
@@ -1111,7 +1082,13 @@
    if (menuid !== MenuID) return
    if (type !== 'line') {
      if (setting.editType === 'multi' && data.length > 0) {
        this.setState({edData: []}, () => {
      this.setState({edData: data})
        })
      } else {
        this.setState({edData: data})
      }
      if (setting.addable && data.length === 0) {
        setTimeout(() => {
src/tabviews/custom/index.jsx
@@ -486,6 +486,12 @@
        }
      }
      let pass = skip
      if (item.wrap && item.wrap.permission === 'false') {
        pass = true
      }
      // 权限过滤
      if (item.action && item.action.length > 0) {
        item.action = item.action.filter(cell => {
@@ -506,7 +512,7 @@
            cell = this.getPrinter(cell, item.uuid)
          }
          return skip || permAction[cell.uuid]
          return pass || permAction[cell.uuid]
        })
      }
@@ -559,7 +565,7 @@
                    cell = this.getPrinter(cell, item.uuid)
                  }
                  return skip || permAction[cell.uuid]
                  return pass || permAction[cell.uuid]
                } else {
                  cell = this.resetElement(cell)
                }
@@ -618,7 +624,7 @@
              cell = this.resetElement(cell)
            }
            return cell.eleType !== 'button' || skip || permAction[cell.uuid]
            return cell.eleType !== 'button' || pass || permAction[cell.uuid]
          })
          if (!card.backElements || card.backElements.length === 0) return
@@ -643,7 +649,7 @@
              cell = this.resetElement(cell)
            }
            return cell.eleType !== 'button' || skip || permAction[cell.uuid]
            return cell.eleType !== 'button' || pass || permAction[cell.uuid]
          })
        })
      } else if (item.type === 'balcony') {
@@ -674,7 +680,7 @@
            cell = this.resetElement(cell)
          }
          return cell.eleType !== 'button' || skip || permAction[cell.uuid]
          return cell.eleType !== 'button' || pass || permAction[cell.uuid]
        })
      } else if (item.type === 'form') {
        item.subcards = item.subcards.map(group => {
src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -2105,7 +2105,18 @@
      this.sendMessage(btn.verify, id)
    }
    if (btn.verify.wxNote === 'true') {
      if (btn.verify.wxTemplateId === 'mk_category_temp') {
        let verify = fromJS(btn.verify).toJS()
        verify.wxTemplateId = verify.wxCustomTempId
        verify.wxNoteKeys = verify.wxNoteKeys.filter(item => item.key)
        if (!verify.wxTemplateId || verify.wxNoteKeys.length === 0) return
        this.sendWxMessage(verify, id)
      } else {
      this.sendWxMessage(btn.verify, id)
      }
    }
  }
@@ -2129,7 +2140,7 @@
    param.secretkey = Utils.encrypt(param.LText, param.timestamp)
    Api.genericInterface(param).then(res => {
      res.send_data = [{openid: 'o2E7gvoSFvQRG7I8_gZxf4y3ONkQ', send_id: Utils.getuuid(), first: '您的缴费信息如下', p1: '010000000001', p2: '2022年07月03日', p3: '供暖缴费', p4: '20元', p5: '成功', remark: '感谢您的使用!'}]
      res.send_data = [{openid: 'o2E7gvoSFvQRG7I8_gZxf4y3ONkQ', send_id: Utils.getuuid(), p1: '010000000001', p2: '明科', p3: 'dddd', p4: '顺风', p5: '成功'}]
      if (!res.status) {
        notification.warning({
          top: 92,
@@ -2196,13 +2207,19 @@
        params.forEach(n => {
          Api.wxNginxRequest(`cgi-bin/message/template/send?access_token=${res.oa_access_token}`, 'post', n).then(re => {
            if (verify.wxNoteCallback === 'true') {
              let msg = re.errmsg || ''
              if (msg.length > 50) {
                msg = msg.substr(0, 50)
              }
              let _p = {
                func: 's_get_sms_weixin_local_suc_err',
                upid: id,
                send_id: n.client_msg_id || '',
                status_result: re.errcode === 0 ? 'S' : 'E',
                errcode: re.errcode,
                msg_result: re.errmsg
                msg_result: msg
              }
              _p.LText = Utils.formatOptions(Utils.getuuid())
src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx
@@ -61,19 +61,39 @@
  }
  edit = (record) => {
    const { type } = this.props
    this.setState({
      editItem: record
    })
    if (type === 'fullscreen') {
      this.props.form.setFieldsValue({
        sql: record.sql
      })
    } else {
    this.props.form.setFieldsValue({
      sql: record.sql,
      position: record.position || 'back'
    })
  }
  }
  handleConfirm = () => {
    const { type } = this.props
    const { editItem } = this.state
    // 表单提交时检查输入值是否正确
    this.props.form.validateFieldsAndScroll((err, values) => {
      if (type === 'fullscreen' && err) {
        notification.warning({
          top: 92,
          message: '请输入sql!',
          duration: 5
        })
        return
      }
      if (!err) {
        if (/^[\s\n]+$/.test(values.sql)) {
          notification.warning({
@@ -84,7 +104,11 @@
          return
        }
        
        values.uuid = this.state.editItem ? this.state.editItem.uuid : ''
        values.uuid = editItem ? editItem.uuid : ''
        if (type === 'fullscreen' && editItem) {
          values.status = editItem.status || 'true'
        }
        let _quot = values.sql.match(/'{1}/g)
        let _lparen = values.sql.match(/\({1}/g)
@@ -258,6 +282,9 @@
    }
    let _sql = this.props.form.getFieldValue('sql')
    if (/^\s+$/.test(_sql)) {
      _sql = ''
    }
    if (_sql) {
      _sql = _sql + ` 
@@ -276,8 +303,8 @@
  }
  render() {
    const { systemScripts, btn } = this.props
    const { usefulfields } = this.state
    const { systemScripts, btn, type } = this.props
    const { usefulfields, editItem } = this.state
    const { getFieldDecorator } = this.props.form
    const formItemLayout = {
      labelCol: {
@@ -293,24 +320,24 @@
    return (
      <Form {...formItemLayout} className="verify-form" id="verify-excelin-custom-scripts">
        <Row gutter={24}>
          {btn.sheet ? <Col span={8}>
          {!type && btn.sheet ? <Col span={8}>
            <Form.Item label={'表名'} style={{whiteSpace: 'nowrap', margin: 0}}>
              {btn.sheet}
            </Form.Item>
          </Col> : null}
          <Col span={10}>
          {!type ? <Col span={10}>
            <Form.Item label={'报错字段'} style={{margin: 0, whiteSpace: 'nowrap'}}>
              ErrorCode(增加后缀NT表示数据不回滚,如ENT、NNT、FNT、NMNT), retmsg
            </Form.Item>
          </Col>
          <Col span={24} className="sqlfield">
          </Col> : null}
          {!type ? <Col span={24} className="sqlfield">
            <Form.Item label={'可用字段'}>
              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'公共值,请按照@xxx@格式使用。'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, time_id, typename</span></Tooltip>,&nbsp;
              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'系统变量,系统会定义变量并赋值。'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address</span></Tooltip>,&nbsp;
              {usefulfields}
            </Form.Item>
          </Col>
          <Col span={8} style={{whiteSpace: 'nowrap'}}>
          </Col> : null}
          {!type ? <Col span={8} style={{whiteSpace: 'nowrap'}}>
            <Form.Item style={{marginBottom: 0}} label={
              <Tooltip placement="bottomLeft" title={'自定义脚本与默认sql位置关系。'}>
                <QuestionCircleOutlined className="mk-form-tip" />
@@ -327,8 +354,8 @@
                </Radio.Group>
              )}
            </Form.Item>
          </Col>
          <Col span={10}>
          </Col> : null}
          {!type ? <Col span={10}>
            <Form.Item style={{marginBottom: 0}} label={'快捷添加'}>
              <Select
                showSearch
@@ -349,10 +376,10 @@
                )}
              </Select>
            </Form.Item>
          </Col>
          </Col> : null}
          <Col span={6} className="add">
            <Button onClick={this.handleConfirm} loading={this.state.loading} className="mk-green" style={{marginBottom: 15, marginLeft: 40}}>
              保存
            {type === 'fullscreen' && !editItem ? '添加' : '保存'}
            </Button>
            <Button onClick={this.handleCancel} style={{marginBottom: 15, marginLeft: 10}}>
              取消
src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx
@@ -19,6 +19,7 @@
const { confirm } = Modal
const { Paragraph } = Typography
const EditTable = asyncComponent(() => import('@/templates/zshare/editTable'))
const FullScripts = asyncComponent(() => import('@/templates/zshare/verifycard/fullScripts'))
class VerifyCard extends Component {
  static propTpyes = {
@@ -464,6 +465,7 @@
  changeColumns = (columns) => {
    const { verify } = this.state
    let reset = false
    columns = columns.map(col => {
      col.type = col.type || 'Nvarchar(50)'
      if (col.type === 'text' || col.type === 'image') {
@@ -476,8 +478,14 @@
        col.limit = col.type.match(/\d+/) ? col.type.match(/\d+/)[0] : '20000'
      } else if (/^Decimal/ig.test(col.type)) {
        col.limit = col.type.match(/\d+/ig)[1]
        if (col.required === 'false') {
          reset = true
        }
        col.required = 'true'
      } else if (/^int/ig.test(col.type)) {
        if (col.required === 'false') {
          reset = true
        }
        col.required = 'true'
      } else {
        col.limit = ''
@@ -488,6 +496,10 @@
      return col
    })
    if (reset) {
      message.warn('数值类型均为必填。')
    }
    this.setState({verify: {...verify, columns}}, () => {
      this.resetUniqueColumns()
@@ -844,6 +856,23 @@
              {verify.scripts.length ? <span className="count-tip">{verify.scripts.length}</span> : null}
            </span>
          } key="scripts" id="mk-exin-script">
            <FullScripts
              verify={verify}
              getScriptsFullForm={() => this.scriptsFullForm}
              getScriptsForm={() => this.scriptsForm}
              handleStatus={this.handleStatus}
              handleDelete={this.handleDelete}
            >
              <CustomScript
                type="fullscreen"
                btn={this.props.card}
                usefulfields={verify.columns}
                scripts={verify.scripts}
                systemScripts={this.state.systemScripts}
                scriptsChange={this.scriptsChange}
                wrappedComponentRef={(inst) => this.scriptsFullForm = inst}
              />
            </FullScripts>
            <CustomScript
              btn={this.props.card}
              usefulfields={verify.columns}
src/templates/sharecomponent/actioncomponent/verifyexcelin/index.scss
@@ -77,4 +77,12 @@
      z-index: 1;
    }
  }
  .full-scripts {
    position: absolute;
    right: 24px;
    top: 0px;
    font-size: 16px;
    color: #1890ff;
    z-index: 1;
  }
}
src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx
@@ -115,7 +115,7 @@
    this.props.form.setFieldsValue({
      sql: record.sql,
      position: record.position || 'back'
      // position: record.position || 'back'
    })
  }
@@ -232,6 +232,9 @@
    }
    let _sql = this.props.form.getFieldValue('sql')
    if (/^\s+$/.test(_sql)) {
      _sql = ''
    }
    if (_sql) {
      _sql = _sql + ` 
src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
@@ -160,20 +160,20 @@
          )
        }
      },
      {
        title: '执行位置',
        dataIndex: 'position',
        width: '10%',
        render: (text, record) => {
          if (record.position === 'init') {
            return <span style={{color: 'orange'}}>初始化</span>
          } else if (record.position === 'front') {
            return <span style={{color: '#26C281'}}>sql前</span>
          } else {
            return <span style={{color: '#1890ff'}}>sql后</span>
          }
        }
      },
      // {
      //   title: '执行位置',
      //   dataIndex: 'position',
      //   width: '10%',
      //   render: (text, record) => {
      //     if (record.position === 'init') {
      //       return <span style={{color: 'orange'}}>初始化</span>
      //     } else if (record.position === 'front') {
      //       return <span style={{color: '#26C281'}}>sql前</span>
      //     } else {
      //       return <span style={{color: '#1890ff'}}>sql后</span>
      //     }
      //   }
      // },
      {
        title: '状态',
        dataIndex: 'status',
src/templates/zshare/verifycard/baseform/index.jsx
@@ -82,30 +82,30 @@
    const { verify } = this.props
    let sysTemps = [
      // {
      //   template_id: '8IFltwzyKcu15iA8fqSyb6m-pMa88a3ZTu0No3vDHgo',
      //   title: '订单受理通知(明科云)',
      //   primary_industry: 'IT科技',
      //   deputy_industry: 'IT软件与服务',
      //   content: '订单号:{{keyword1.DATA}}\n订单类型:{{keyword2.DATA}}\n订单状态:{{keyword3.DATA}}\n通知时间:{{keyword4.DATA}}',
      //   example: '订单号:20190101001\r\n订单类型:衣柜\r\n订单状态:设计完成\r\n通知时间:2019年1月1日12:30'
      // },
      // {
      //   template_id: 'LOB-bbt9jVncGh7IOAUdESh1Sgzcbt62UwOqSqcK9ok',
      //   title: '订单进度提醒(明科云)',
      //   primary_industry: 'IT科技',
      //   deputy_industry: 'IT软件与服务',
      //   content: '订单类型:{{keyword1.DATA}}\n订单号:{{keyword2.DATA}}\n订单状态:{{keyword3.DATA}}',
      //   example: '订单类型:退租申请\r\n订单号:TZ16101909\r\n订单状态:待取货'
      // },
      // {
      //   template_id: 'mk_category_temp',
      //   title: '类目模板',
      //   primary_industry: '',
      //   deputy_industry: '',
      //   content: '',
      //   example: ''
      // }
      {
        template_id: '8IFltwzyKcu15iA8fqSyb6m-pMa88a3ZTu0No3vDHgo',
        title: '订单受理通知(明科云)',
        primary_industry: 'IT科技',
        deputy_industry: 'IT软件与服务',
        content: '订单号:{{keyword1.DATA}}\n订单类型:{{keyword2.DATA}}\n订单状态:{{keyword3.DATA}}\n通知时间:{{keyword4.DATA}}',
        example: '订单号:20190101001\r\n订单类型:衣柜\r\n订单状态:设计完成\r\n通知时间:2019年1月1日12:30'
      },
      {
        template_id: 'LOB-bbt9jVncGh7IOAUdESh1Sgzcbt62UwOqSqcK9ok',
        title: '订单进度提醒(明科云)',
        primary_industry: 'IT科技',
        deputy_industry: 'IT软件与服务',
        content: '订单类型:{{keyword1.DATA}}\n订单号:{{keyword2.DATA}}\n订单状态:{{keyword3.DATA}}',
        example: '订单类型:退租申请\r\n订单号:TZ16101909\r\n订单状态:待取货'
      },
      {
        template_id: 'mk_category_temp',
        title: '类目模板',
        primary_industry: '',
        deputy_industry: '',
        content: '',
        example: ''
      }
    ]
    
    let _wxTemps = [...wxTemps, ...sysTemps]
@@ -131,6 +131,8 @@
    } else if (verify.wxNote === 'true') {
      if (!verify.wxTemplateId) {
        error = '开启公众号消息推送时,需要选择消息模板!'
      } else if (verify.wxTemplateId === 'mk_category_temp' && !verify.wxCustomTempId) {
        error = '开启公众号消息推送时,需要填写消息模板ID!'
      } else if (verify.wxNoteLink === 'url' && !verify.wxNoteLinkUrl) {
        error = '请填写网址!'
      }
@@ -158,6 +160,8 @@
      _verify.wxNoteLinkMenuId = ''
      _verify.wxNoteCallback = 'false'
      _verify.wxNoteKeys = null
      delete _verify.wxCustomTempId
      if (this.state.selectTemp) {
        this.setState({selectTemp: null})
@@ -196,6 +200,17 @@
      keys = keys.map(key => key.replace(/{{|\.DATA}}/g, ''))
    }
    delete _verify.wxCustomTempId
    if (selectTemp.template_id === 'mk_category_temp') {
      _verify.wxNoteKeys = []
      for (let i = 1; i <= 10; i++) {
        _verify.wxNoteKeys.push({
          key: '',
          value: 'p' + i
        })
      }
    } else {
    let index = 1
    _verify.wxNoteKeys = keys.map(key => {
      let item = { key: key }
@@ -205,6 +220,7 @@
      return item
    })
    }
    this.setState({selectTemp})
@@ -221,6 +237,28 @@
      return m
    })
    this.props.onChange(_verify)
  }
  onWxNoteValueChange = (value, val) => {
    let _verify = fromJS(this.props.verify).toJS()
    _verify.wxNoteKeys = _verify.wxNoteKeys.map(m => {
      if (m.value === value) {
        m.key = val.replace(/\s+/ig, '')
      }
      return m
    })
    this.props.onChange(_verify)
  }
  onWxNoteTempIdChange = (value) => {
    let _verify = fromJS(this.props.verify).toJS()
    _verify.wxCustomTempId = value.replace(/\s+/ig, '')
    this.props.onChange(_verify)
  }
@@ -421,7 +459,7 @@
              <Input placeholder="" autoComplete="off" value={verify.wxNoteLinkMenuId || ''} onChange={(e) => {this.onOptionChange(e.target.value, 'wxNoteLinkMenuId')}}/>
            </Form.Item>
          </Col> : null}
          {verify.wxNote === 'true' && verify.wxNoteKeys ? verify.wxNoteKeys.map((item, index) => <Col span={8} key={'mk' + index}>
          {verify.wxNote === 'true' && verify.wxNoteKeys && (!selectTemp || selectTemp.template_id !== 'mk_category_temp') ? verify.wxNoteKeys.map((item, index) => <Col span={8} key={'mk' + index}>
            <Form.Item label={item.key} required>
              <Select value={item.value} onSelect={(val) => this.onWxNoteKeyChange(item.key, val)}>
                <Select.Option value="p1">p1</Select.Option>
@@ -435,6 +473,16 @@
                <Select.Option value="p9">p9</Select.Option>
                <Select.Option value="p10">p10</Select.Option>
              </Select>
            </Form.Item>
          </Col>) : null}
          {verify.wxNote === 'true' && verify.wxNoteKeys && (selectTemp && selectTemp.template_id === 'mk_category_temp') ? <Col span={8}>
            <Form.Item label="模板ID" required>
              <Input placeholder="" defaultValue={verify.wxCustomTempId} autoComplete="off" onChange={(e) => {this.onWxNoteTempIdChange(e.target.value)}}/>
            </Form.Item>
          </Col> : null}
          {verify.wxNote === 'true' && verify.wxNoteKeys && (selectTemp && selectTemp.template_id === 'mk_category_temp') ? verify.wxNoteKeys.map((item, index) => <Col span={8} key={'mk' + index}>
            <Form.Item label={item.value}>
              <Input placeholder="" defaultValue={item.key} autoComplete="off" onChange={(e) => {this.onWxNoteValueChange(item.value, e.target.value)}}/>
            </Form.Item>
          </Col>) : null}
          {selectTemp && selectTemp.template_id !== 'mk_category_temp' && verify.wxNoteKeys ? <Col span={24} className="wx-note">
@@ -462,6 +510,19 @@
              </div>
            </div>
          </Col> : null}
          {selectTemp && selectTemp.template_id === 'mk_category_temp' && verify.wxNoteKeys ? <Col span={24} className="wx-note">
            <div className="note-wrap">
              <div className="note">
                <p>消息体</p>
                <div>
                  <p>openid:&nbsp;&nbsp;"接收者openid",</p>
                  <p>send_id:&nbsp;&nbsp;"防重入id",</p>
                  <p>bid:&nbsp;&nbsp;"跳转小程序时,可作为BID。"</p>
                  <p style={{color: '#1890ff'}}>请在通用字段中(p1~p10)填入模板中对应的字段名,如 time1.DATA 则填写 time1。</p>
                </div>
              </div>
            </div>
          </Col> : null}
        </Row>
      </Form>
    )
src/templates/zshare/verifycard/billcodeform/index.jsx
@@ -4,7 +4,7 @@
import { Form, Row, Col, Select, Button, InputNumber, Input, Tooltip } from 'antd'
import { QuestionCircleOutlined } from '@ant-design/icons'
import './index.scss'
// import './index.scss'
class BillCodeForm extends Component {
  static propTpyes = {
src/templates/zshare/verifycard/contrastform/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { Form, Row, Col, Select, Button, Input } from 'antd'
import './index.scss'
// import './index.scss'
class UniqueForm extends Component {
  static propTpyes = {
src/templates/zshare/verifycard/customform/index.jsx
@@ -6,7 +6,7 @@
import Utils from '@/utils/utils.js'
import Api from '@/api'
import CodeMirror from '@/templates/zshare/codemirror'
import './index.scss'
// import './index.scss'
class CustomForm extends Component {
  static propTpyes = {
src/templates/zshare/verifycard/fullScripts/index.jsx
New file
@@ -0,0 +1,130 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { Modal, notification, Typography, Popconfirm } from 'antd'
import { CheckCircleOutlined, StopOutlined, SwapOutlined, DeleteOutlined, BorderOutlined } from '@ant-design/icons'
import MinView from '@/assets/img/minview.png'
import './index.scss'
const { Paragraph } = Typography
class fullScripts extends Component {
  static propTpyes = {
    verify: PropTypes.object,
    getScriptsForm: PropTypes.func
  }
  state = {
    visible: false,
    scriptId: '',
    columns: []
  }
  trigger = () => {
    const { getScriptsForm } = this.props
    let scriptsForm = getScriptsForm()
    if (scriptsForm) {
      let sql = scriptsForm.props.form.getFieldValue('sql') || ''
      if (scriptsForm.state.editItem || (sql && !/^\s+$/.test(sql))) {
        notification.warning({
          top: 92,
          message: '请保存自定义脚本!',
          duration: 5
        })
        return
      }
    }
    this.setState({visible: true, scriptId: ''})
  }
  render() {
    const { verify, children } = this.props
    const { visible, scriptId } = this.state
    return (
      <>
        <BorderOutlined className="full-scripts" onClick={this.trigger}/>
        <Modal
          wrapClassName="model-custom-scripts-modal"
          title="自定义脚本"
          visible={visible}
          width={'95vw'}
          maskClosable={false}
          destroyOnClose
        >
          <img className="unfull-scripts" src={MinView} onClick={() => this.setState({visible: false, scriptId: ''})} alt=""/>
          <div className="script-table-wrap">
            {verify.scripts.map(item => {
              let title = item.sql.match(/^\s*\/\*.+\*\//)
              title = title && title[0] ? title[0] : ''
              let _text = title ? item.sql.replace(title, '') : item.sql
              let position = null
              if (item.position === 'init') {
                position = <span style={{color: 'orange'}}>初始化</span>
              } else if (item.position === 'front') {
                position = <span style={{color: '#26C281'}}>sql前</span>
              } else {
                position = <span style={{color: '#1890ff'}}>sql后</span>
              }
              if (item.status === 'false') {
                return (
                  <div className="script-item" key={item.uuid}>
                    <div style={{cursor: 'not-allowed'}}>
                      {title ? <div style={{color: '#a50', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis'}}>{title}</div> : null}
                      <Paragraph copyable={{ text: item.sql }} ellipsis={{ rows: 4 }}>{_text}</Paragraph>
                      <div>{position}
                        <span style={{color: '#ff4d4f', marginLeft: '20px'}}>
                          禁用
                          <StopOutlined style={{marginLeft: '5px'}} />
                        </span>
                      </div>
                    </div>
                    <div style={{height: '24px'}}></div>
                  </div>
                )
              } else {
                return (
                  <div className={'script-item ' + (scriptId === item.uuid ? 'active' : '') } key={item.uuid}>
                    <div style={{cursor: 'pointer'}} onClick={() => {
                      let scriptsFullForm = this.props.getScriptsFullForm()
                      scriptsFullForm && scriptsFullForm.edit(item)
                      this.setState({scriptId: item.uuid})
                    }}>
                      {title ? <div style={{color: '#a50', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis'}}>{title}</div> : null}
                      <Paragraph copyable={{ text: item.sql }} ellipsis={{ rows: 4 }}>{_text}</Paragraph>
                      <div>{position}
                        <span style={{color: '#26C281', marginLeft: '20px'}}>
                          启用
                          <CheckCircleOutlined style={{marginLeft: '5px'}}/>
                        </span>
                      </div>
                    </div>
                    <div style={{textAlign: 'right'}}>
                      <span className="operation-btn" onClick={() => this.props.handleStatus(item, 'scripts')} style={{color: '#8E44AD'}}><SwapOutlined /></span>
                      <Popconfirm
                        overlayClassName="popover-confirm"
                        title="确定删除吗?"
                        onConfirm={() => this.props.handleDelete(item, 'scripts')
                      }>
                        <span className="operation-btn" style={{color: '#ff4d4f'}}><DeleteOutlined /></span>
                      </Popconfirm>
                    </div>
                  </div>
                )
              }
            })}
          </div>
          {visible ? children : null}
        </Modal>
      </>
    )
  }
}
export default fullScripts
src/templates/zshare/verifycard/fullScripts/index.scss
New file
@@ -0,0 +1,130 @@
.model-custom-scripts-modal {
  .ant-modal {
    top: 30px;
    .ant-modal-header {
      padding: 10px 24px;
    }
    .ant-modal-footer {
      display: none;
    }
    .ant-modal-close {
      display: none;
    }
    .ant-modal-body {
      padding: 0;
      height: calc(100vh - 100px);
      overflow: hidden;
      display: flex;
      .script-table-wrap {
        width: 240px;
        overflow-y: auto;
        overflow-x: hidden;
        height: calc(100vh - 100px);
        .operation-btn {
          display: inline-block;
          font-size: 16px;
          padding: 0 5px;
          cursor: pointer;
          margin-left: 5px;
        }
        .script-item {
          border-bottom: 1px solid #eeeeee;
          padding: 15px 10px 5px;
        }
        .script-item.active {
          background-color: #bae7ff;
        }
        .ant-typography {
          margin-bottom: 5px;
        }
      }
      .script-table-wrap::-webkit-scrollbar {
        width: 7px;
      }
      .script-table-wrap::-webkit-scrollbar-thumb {
        border-radius: 5px;
        box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13);
        background: rgba(0, 0, 0, 0.13);
      }
      .script-table-wrap::-webkit-scrollbar-track {
        box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05);
        border-radius: 3px;
        border: 1px solid rgba(0, 0, 0, 0.07);
        background: rgba(0, 0, 0, 0);
      }
      .unfull-scripts {
        position: absolute;
        right: 20px;
        z-index: 2;
        top: 10px;
        color: #1890ff;
        width: 26px;
        cursor: pointer;
        padding: 5px;
      }
      .verify-form {
        flex: 1;
        >.ant-row {
          margin: 0!important;
          position: unset;
        }
        .sql {
          padding: 0!important;
          .ant-form-item-label {
            display: none;
          }
          .ant-form-item-control-wrapper {
            width: 100%;
          }
          .CodeMirror {
            height: calc(100vh - 100px);
            border-radius: 0;
          }
          .code-mirror-area {
            border-radius: 0;
            width: calc(95vw - 240px);
          }
        }
        .sqlfield {
          .ant-form-item {
            margin-bottom: 5px;
          }
          .ant-form-item-control {
            line-height: 24px;
          }
          .ant-form-item-label {
            line-height: 25px;
          }
          .ant-form-item-children {
            line-height: 22px;
          }
          .ant-col-sm-8 {
            width: 10.5%;
          }
          .ant-col-sm-16 {
            width: 89.5%;
          }
        }
        .add {
          position: absolute;
          top: 10px;
          z-index: 1;
          .ant-btn {
            height: 28px;
          }
          .mk-green {
            margin-left: 0!important;
            margin-right: 10px;
          }
        }
      }
    }
  }
}
src/templates/zshare/verifycard/index.jsx
@@ -2,7 +2,7 @@
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Form, Tabs, Row, Col, Button, Popconfirm, notification, Modal, message, InputNumber, Typography } from 'antd'
import { CheckCircleOutlined, StopOutlined, EditOutlined, SwapOutlined, DeleteOutlined, ExclamationOutlined, BorderOutlined } from '@ant-design/icons'
import { CheckCircleOutlined, StopOutlined, EditOutlined, SwapOutlined, DeleteOutlined, ExclamationOutlined } from '@ant-design/icons'
import Toast from 'antd-mobile/es/components/toast'
import Dialog from 'antd-mobile/es/components/dialog'
import moment from 'moment'
@@ -21,13 +21,13 @@
import asyncComponent from '@/utils/asyncComponent'
import { updateForm } from '@/utils/utils-update.js'
import MKEmitter from '@/utils/events.js'
import MinView from '@/assets/img/minview.png'
import './index.scss'
const { TabPane } = Tabs
const { confirm } = Modal
const { Paragraph } = Typography
const EditTable = asyncComponent(() => import('@/templates/zshare/editTable'))
const FullScripts = asyncComponent(() => import('./fullScripts'))
class VerifyCard extends Component {
  static propTpyes = {
@@ -44,8 +44,6 @@
    appType: sessionStorage.getItem('appType'),
    notes: [],              // 短信模板
    setting: null,
    visible: false,
    scriptId: '',
    verify: {},
    fields: [],
    usefulfields: '',
@@ -1540,7 +1538,7 @@
  render() {
    const { card } = this.props
    const { activeKey, verifyInter, setting, verify, fields, visible, uniqueFields, uniqueColumns, unionFields, onceUniqueColumns, columnsFields, contrastColumns, customColumns, orderColumns, scriptsColumns, cbScriptsColumns, orderModular, orderModularDetail, voucher, voucherDetail, notes, appType } = this.state
    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: {
        xs: { span: 24 },
@@ -1640,17 +1638,25 @@
              {verify.scripts.length ? <span className="count-tip">{verify.scripts.length}</span> : null}
            </span>
          } key="scripts" id="mk-normal-script">
            <BorderOutlined className="full-scripts" onClick={() => {
              if (this.scriptsForm && (this.scriptsForm.state.editItem || (this.scriptsForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.scriptsForm.props.form.getFieldValue('sql'))))) {
                notification.warning({
                  top: 92,
                  message: '请保存自定义脚本!',
                  duration: 5
                })
                return
              }
              this.setState({visible: true, scriptId: ''})
            }}/>
            <FullScripts
              verify={verify}
              getScriptsFullForm={() => this.scriptsFullForm}
              getScriptsForm={() => this.scriptsForm}
              handleStatus={this.handleStatus}
              handleDelete={this.handleDelete}
            >
              <CustomScript
                type="fullscreen"
                btn={this.props.card}
                initsql={this.state.initsql}
                customScripts={verify.scripts}
                defaultsql={this.state.defaultsql}
                usefulfields={this.state.usefulfields}
                systemScripts={this.state.systemScripts}
                scriptsChange={this.scriptsChange}
                wrappedComponentRef={(inst) => this.scriptsFullForm = inst}
              />
            </FullScripts>
            <CustomScript
              btn={this.props.card}
              initsql={this.state.initsql}
@@ -1768,89 +1774,6 @@
            </Form>
          </TabPane>
        </Tabs>
        <Modal
          wrapClassName="model-custom-scripts-modal"
          title="自定义脚本"
          visible={visible}
          width={'95vw'}
          maskClosable={false}
          destroyOnClose
        >
          <img className="unfull-scripts" src={MinView} onClick={() => this.setState({visible: false, scriptId: ''})} alt=""/>
          <div className="script-table-wrap">
            {verify.scripts.map(item => {
              let title = item.sql.match(/^\s*\/\*.+\*\//)
              title = title && title[0] ? title[0] : ''
              let _text = title ? item.sql.replace(title, '') : item.sql
              let position = null
              if (item.position === 'init') {
                position = <span style={{color: 'orange'}}>初始化</span>
              } else if (item.position === 'front') {
                position = <span style={{color: '#26C281'}}>sql前</span>
              } else {
                position = <span style={{color: '#1890ff'}}>sql后</span>
              }
              if (item.status === 'false') {
                return (
                  <div className="script-item" key={item.uuid}>
                    <div style={{cursor: 'not-allowed'}}>
                      {title ? <div style={{color: '#a50', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis'}}>{title}</div> : null}
                      <Paragraph copyable={{ text: item.sql }} ellipsis={{ rows: 4 }}>{_text}</Paragraph>
                      <div>{position}
                        <span style={{color: '#ff4d4f', marginLeft: '20px'}}>
                          禁用
                          <StopOutlined style={{marginLeft: '5px'}} />
                        </span>
                      </div>
                    </div>
                    <div style={{height: '24px'}}></div>
                  </div>
                )
              } else {
                return (
                  <div className={'script-item ' + (this.state.scriptId === item.uuid ? 'active' : '') } key={item.uuid}>
                    <div style={{cursor: 'pointer'}} onClick={() => {
                      this.scriptsFullForm.edit(item)
                      this.setState({scriptId: item.uuid})
                    }}>
                      {title ? <div style={{color: '#a50', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis'}}>{title}</div> : null}
                      <Paragraph copyable={{ text: item.sql }} ellipsis={{ rows: 4 }}>{_text}</Paragraph>
                      <div>{position}
                        <span style={{color: '#26C281', marginLeft: '20px'}}>
                          启用
                          <CheckCircleOutlined style={{marginLeft: '5px'}}/>
                        </span>
                      </div>
                    </div>
                    <div style={{textAlign: 'right'}}>
                      <span className="operation-btn" onClick={() => this.handleStatus(item, 'scripts')} style={{color: '#8E44AD'}}><SwapOutlined /></span>
                      <Popconfirm
                        overlayClassName="popover-confirm"
                        title="确定删除吗?"
                        onConfirm={() => this.handleDelete(item, 'scripts')
                      }>
                        <span className="operation-btn" style={{color: '#ff4d4f'}}><DeleteOutlined /></span>
                      </Popconfirm>
                    </div>
                  </div>
                )
              }
            })}
          </div>
          <CustomScript
            type="fullscreen"
            btn={this.props.card}
            initsql={this.state.initsql}
            customScripts={verify.scripts}
            defaultsql={this.state.defaultsql}
            usefulfields={this.state.usefulfields}
            systemScripts={this.state.systemScripts}
            scriptsChange={this.scriptsChange}
            wrappedComponentRef={(inst) => this.scriptsFullForm = inst}
          />
        </Modal>
      </div>
    )
  }
src/templates/zshare/verifycard/index.scss
@@ -89,136 +89,6 @@
    z-index: 1;
  }
}
.model-custom-scripts-modal {
  .ant-modal {
    top: 30px;
    .ant-modal-header {
      padding: 10px 24px;
    }
    .ant-modal-footer {
      display: none;
    }
    .ant-modal-close {
      display: none;
    }
    .ant-modal-body {
      padding: 0;
      height: calc(100vh - 100px);
      overflow: hidden;
      display: flex;
      .script-table-wrap {
        width: 240px;
        overflow-y: auto;
        overflow-x: hidden;
        height: calc(100vh - 100px);
        .operation-btn {
          display: inline-block;
          font-size: 16px;
          padding: 0 5px;
          cursor: pointer;
          margin-left: 5px;
        }
        .script-item {
          border-bottom: 1px solid #eeeeee;
          padding: 15px 10px 5px;
        }
        .script-item.active {
          background-color: #bae7ff;
        }
        .ant-typography {
          margin-bottom: 5px;
        }
      }
      .script-table-wrap::-webkit-scrollbar {
        width: 7px;
      }
      .script-table-wrap::-webkit-scrollbar-thumb {
        border-radius: 5px;
        box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13);
        background: rgba(0, 0, 0, 0.13);
      }
      .script-table-wrap::-webkit-scrollbar-track {
        box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05);
        border-radius: 3px;
        border: 1px solid rgba(0, 0, 0, 0.07);
        background: rgba(0, 0, 0, 0);
      }
      .unfull-scripts {
        position: absolute;
        right: 20px;
        z-index: 2;
        top: 10px;
        color: #1890ff;
        width: 26px;
        cursor: pointer;
        padding: 5px;
      }
      .verify-form {
        flex: 1;
        >.ant-row {
          margin: 0!important;
          position: unset;
        }
        .sql {
          padding: 0!important;
          .ant-form-item-label {
            display: none;
          }
          .ant-form-item-control-wrapper {
            width: 100%;
          }
          .CodeMirror {
            height: calc(100vh - 100px);
            border-radius: 0;
          }
          .code-mirror-area {
            border-radius: 0;
            width: calc(95vw - 240px);
          }
        }
        .sqlfield {
          .ant-form-item {
            margin-bottom: 5px;
          }
          .ant-form-item-control {
            line-height: 24px;
          }
          .ant-form-item-label {
            line-height: 25px;
          }
          .ant-form-item-children {
            line-height: 22px;
          }
          .ant-col-sm-8 {
            width: 10.5%;
          }
          .ant-col-sm-16 {
            width: 89.5%;
          }
        }
        .add {
          position: absolute;
          top: 10px;
          z-index: 1;
          .ant-btn {
            height: 28px;
          }
          .mk-green {
            margin-left: 0!important;
            margin-right: 10px;
          }
        }
      }
    }
  }
}
.adm-mask {
  z-index: 2000!important;
}
src/templates/zshare/verifycard/uniqueform/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { Form, Row, Col, Select, Button } from 'antd'
import './index.scss'
// import './index.scss'
class UniqueForm extends Component {
  static propTpyes = {
src/templates/zshare/verifycard/voucherform/index.jsx
@@ -2,7 +2,7 @@
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Form, Row, Col, Select, Switch, notification } from 'antd'
import './index.scss'
// import './index.scss'
class UniqueForm extends Component {
  static propTpyes = {
src/utils/utils.js
@@ -982,33 +982,12 @@
            }
          })
        }
      } else if (/^int/ig.test(col.type)) {
      } else if (/^Decimal/ig.test(col.type) || /^int/ig.test(col.type)) {
        if (!val && val !== 0) {
          errors.push(_position + '内容不可为空')
        } else {
          let _val = val + ''
          if (!/^(([^0][0-9]+|0)$)|^(([1-9]+)$)/.test(_val)) {               // 检验是否为整数
            errors.push(_position + '内容应为整数')
          } else if ((col.min || col.min === 0) && val < col.min) {          // 最小值检验
            errors.push(_position + '小于最小值')
          } else if ((col.max || col.max === 0) && val > col.max) {          // 最大值检验
            errors.push(_position + '大于最大值')
          }
        }
      } else if (/^Decimal/ig.test(col.type)) {
        if (!val && val !== 0) {
          errors.push(_position + '内容不可为空')
        } else {
          let _val = val + ''
          let _vals = _val.split('.')
          if (!/^(([^0][0-9]+|0)\.([0-9]+)$)|^(([^0][0-9]+|0)$)|^(([1-9]+)\.([0-9]+)$)|^(([1-9]+)$)/.test(_val)) {                           // 检验是否为浮点数
            errors.push(_position + '内容应为浮点数')
          } else if (_vals[0].length > 18) {                          // 检验整数位
            errors.push(_position + '整数位超出范围')
          } else if (_vals[1] && _vals[1].length > col.limit) {       // 最小值检验
            errors.push(_position + '小数位超出范围')
          if (!/^(([^0][0-9]+|0)\.([0-9]+)$)|^(([^0][0-9]+|0)$)|^(([1-9]+)\.([0-9]+)$)|^(([1-9]+)$)/.test(val)) {                           // 检验是否为浮点数
            errors.push(_position + '内容应为数值')
          } else if ((col.min || col.min === 0) && val < col.min) {   // 最小值检验
            errors.push(_position + '小于最小值')
          } else if ((col.max || col.max === 0) && val > col.max) {   // 最大值检验
src/views/menudesign/index.jsx
@@ -723,6 +723,11 @@
        if (item.$tables) {
          tbs.push(...item.$tables)
        }
        if (item.wrap && item.wrap.permission === 'false') {
          return
        }
        if (item.action && item.action.length > 0) {
          item.action.forEach(btn => {
            if (btn.hidden === 'true') return