king
2020-02-11 30c350ff93af3fcc7dcd9b78eb110212b2d44a49
2020-02-11
16个文件已修改
365 ■■■■ 已修改文件
src/locales/en-US/comtable.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/locales/zh-CN/comtable.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/tableshare/actionList/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/tableshare/mutilform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/actionform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/index.jsx 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/formtabconfig/actionform/index.jsx 71 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/formtabconfig/index.jsx 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/formtabconfig/source.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/subtableconfig/index.jsx 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/tableshare/dragelement/card.jsx 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/tableshare/formconfig.js 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/tableshare/verifycard/billcodeform/index.jsx 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/tableshare/verifycard/index.jsx 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/tableshare/verifycard/uniqueform/index.jsx 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 86 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/locales/en-US/comtable.js
@@ -8,6 +8,7 @@
  'header.save': 'Save',
  'header.notsave': 'Do not save',
  'header.close': 'Close',
  'header.notclose': 'not close',
  'header.reset': 'Reset',
  'header.menu.basemsg': 'Please complete the basic information !',
  'header.menu.template.change': 'Switch the template',
@@ -194,6 +195,8 @@
  'header.form.status.open': '启用',
  'header.form.readin': '数据写入',
  'header.form.readin.tooltip': '是否将表格或主表中的数据写入表单',
  'header.form.afterExecSuccess': '成功后',
  'header.form.afterExecError': '失败后',
  'header.modal.form.edit': '表单-编辑',
  'header.modal.search.edit': '搜索条件-编辑',
  'header.modal.action.edit': '按钮-编辑',
src/locales/zh-CN/comtable.js
@@ -8,6 +8,7 @@
  'header.save': '保存',
  'header.notsave': '不保存',
  'header.close': '关闭',
  'header.notclose': '不关闭',
  'header.reset': '重置',
  'header.menu.basemsg': '请完善菜单基本信息!',
  'header.menu.template.change': '切换模板',
@@ -194,6 +195,8 @@
  'header.form.status.open': '启用',
  'header.form.readin': '数据写入',
  'header.form.readin.tooltip': '是否将表格中的数据写入表单',
  'header.form.afterExecSuccess': '成功后',
  'header.form.afterExecError': '失败后',
  'header.modal.form.edit': '表单-编辑',
  'header.modal.search.edit': '搜索条件-编辑',
  'header.modal.action.edit': '按钮-编辑',
src/tabviews/tableshare/actionList/index.jsx
@@ -836,7 +836,7 @@
      if (item.type === 'textarea' || item.type === 'fileupload') {
        _fieldlen = item.fieldlength || 512
      } else if (item.type === 'number') {
        _fieldlen = (item.decimal || item.decimal === 0) ? item.decimal : 18
        _fieldlen = item.decimal ? item.decimal : 0
      }
      return {
src/tabviews/tableshare/mutilform/index.jsx
@@ -68,7 +68,7 @@
      if (item.type === 'textarea' || item.type === 'fileupload') {
        _fieldlen = item.fieldlength || 512
      } else if (item.type === 'number') {
        _fieldlen = (item.decimal || item.decimal === 0) ? item.decimal : 18
        _fieldlen = item.decimal ? item.decimal : 0
      }
      datatype[item.field] = item.type
src/templates/comtableconfig/actionform/index.jsx
@@ -311,7 +311,7 @@
        })
      }
      this.setState({
        interType: value,
        // interType: value,
        formlist: this.state.formlist.map(item => {
          if (item.key === 'interface' && value === 'true') {
            item.readonly = true
src/templates/comtableconfig/index.jsx
@@ -2163,7 +2163,30 @@
   * @description 显示隐藏显示列字段名
   */
  onColumnNameChange = () => {
    const { showColumnName } = this.state
    const { showColumnName, config } = this.state
    if (!showColumnName) {
      let fields = []
      config.columns.forEach(col => {
        if (col.field) {
          fields.push(col.field)
        }
      })
      fields = fields.join(',')
      let textArea = document.createElement('textarea')
      textArea.value = fields
      document.body.appendChild(textArea)
      textArea.select()
      try {
        document.execCommand('copy')
        document.body.removeChild(textArea)
      } catch (err) {
        document.body.removeChild(textArea)
      }
    }
    this.setState({
      showColumnName: !showColumnName
src/templates/formtabconfig/actionform/index.jsx
@@ -2,7 +2,7 @@
import PropTypes from 'prop-types'
import { Form, Row, Col, Input, Select, Icon, Radio, notification, Tooltip, InputNumber } from 'antd'
import { btnIcons, btnClasses, formRule } from '@/utils/option.js'
import Utils from '@/utils/utils.js'
// import Utils from '@/utils/utils.js'
import './index.scss'
const { TextArea } = Input
@@ -19,31 +19,6 @@
    formlist: null,  // 表单信息
    openType: null,  // 打开方式
    interType: null, // 接口类型:内部、外部
    position: null,  // 按钮位置
    reqOptionSgl: [{
      value: 'requiredSgl',
      text: this.props.dict['header.form.requiredSgl']
    }],
    reqOptions: [{
      value: 'notRequired',
      text: this.props.dict['header.form.notRequired']
    }, {
      value: 'requiredSgl',
      text: this.props.dict['header.form.requiredSgl']
    }],
    reqOptionsMutil: [{
      value: 'notRequired',
      text: this.props.dict['header.form.notRequired']
    }, {
      value: 'requiredSgl',
      text: this.props.dict['header.form.requiredSgl']
    }, {
      value: 'required',
      text: this.props.dict['header.form.required']
    }, {
      value: 'requiredOnce',
      text: this.props.dict['header.form.requiredOnce']
    }],
    insertUpdateOptions: [{
      value: '',
      text: this.props.dict['header.form.empty']
@@ -72,9 +47,9 @@
      })
  
      if (_intertype === 'outer') {
        _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'interface', 'outerFunc', 'callbackFunc', 'sysInterface', 'icon', 'class', 'execSuccess', 'execError']
        _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'interface', 'outerFunc', 'callbackFunc', 'sysInterface', 'icon', 'class', 'execSuccess', 'execError', 'afterExecSuccess', 'afterExecError']
      } else {
        _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError', 'sql', 'sqlType']
        _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError', 'sql', 'sqlType', 'afterExecSuccess', 'afterExecError']
      }
    }
@@ -97,10 +72,10 @@
            }
          ]
          if (card.btnType === 'cancel') {
            item.readonly = 'true'
            item.readonly = true
          }
        } else if (item.key === 'execSuccess' && card.btnType === 'cancel') {
          item.label = '返回后'
          item.label = '关闭后'
        }
        item.hidden = !_options.includes(item.key)
        return item
@@ -126,14 +101,38 @@
    if (key === 'intertype') {
      let _options = null
      if (value === 'inner') {
        _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError', 'sql', 'sqlType']
        _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError', 'sql', 'sqlType', 'afterExecSuccess', 'afterExecError']
      } else {
        _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc', 'method']
        _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc', 'afterExecSuccess', 'afterExecError']
      }
      this.setState({
        interType: value,
        formlist: this.state.formlist.map(item => {
          item.hidden = !_options.includes(item.key)
          if (item.key === 'interface') {
            item.readonly = false
          } else if (item.key === 'sysInterface') {
            item.initVal = 'false'
          }
          return item
        })
      })
    } else if (key === 'sysInterface') {
      if (value === 'true') {
        this.props.form.setFieldsValue({
          interface: window.GLOB.mainSystemApi || window.GLOB.subSystemApi
        })
      }
      this.setState({
        // interType: value,
        formlist: this.state.formlist.map(item => {
          if (item.key === 'interface' && value === 'true') {
            item.readonly = true
          } else if (item.key === 'interface') {
            item.readonly = false
          }
          return item
        })
      })
@@ -231,6 +230,7 @@
                  showSearch
                  filterOption={(input, option) => option.props.children[2].toLowerCase().indexOf(input.toLowerCase()) >= 0}
                  getPopupContainer={() => document.getElementById('winter')}
                  disabled={!!item.readonly}
                >
                  {item.options.map((option, index) =>
                    <Select.Option id={`${index}`} title={option.text} key={`${index}`} value={option.value}>
@@ -291,13 +291,8 @@
          values.id = this.props.card.id
          values.uuid = this.props.card.uuid
          values.verify = this.props.card.verify || null
          values.btnType = this.props.card.btnType || 'tabFormBtn'
          if (values.OpenType === 'excelIn' || values.OpenType === 'excelOut') {
            values.position = 'toolbar'
            values.Ot = 'notRequired'
          } else if (values.OpenType === 'popview' && !values.linkTab) { // 没有关联标签(新建时),创建新标签Id
            values.linkTab = Utils.getuuid()
          }
          if (values.innerFunc === '' && values.sql === '') {
            notification.warning({
src/templates/formtabconfig/index.jsx
@@ -75,6 +75,7 @@
    const { menu, btnTab, config } = this.props
    let _config = ''
    let columns = []
    if (!config) {
      _config = JSON.parse(JSON.stringify(Source.baseConfig))
@@ -84,8 +85,13 @@
      // _config.action = Source.baseConfig.action
    }
    if (menu && menu.LongParam && menu.LongParam.columns) {
      columns = menu.LongParam.columns
    }
    this.setState({
      config: _config,
      columns: columns,
      originMenu: JSON.parse(JSON.stringify(_config)),
      selectedTables: _config.tables,
      menuformlist: [
@@ -2075,7 +2081,8 @@
          width={700}
          onCancel={this.editModalCancel}
          footer={[
            <Button key="delete" className="mk-btn mk-purple" onClick={this.creatFunc} loading={this.state.funcLoading}>{this.state.dict['header.menu.func.create']}</Button>,
            this.state.card && this.state.card.btnType !== 'cancel' ?
            <Button key="delete" className="mk-btn mk-purple" onClick={this.creatFunc} loading={this.state.funcLoading}>{this.state.dict['header.menu.func.create']}</Button> : null,
            <Button key="cancel" onClick={this.editModalCancel}>{this.state.dict['header.cancel']}</Button>,
            <Button key="confirm" type="primary" onClick={this.handleSubmit}>{this.state.dict['header.confirm']}</Button>
          ]}
@@ -2141,7 +2148,14 @@
          onCancel={() => { this.setState({ profileVisible: false }) }}
          destroyOnClose
        >
          <VerifyCard card={this.state.card} columns={this.state.config.columns} wrappedComponentRef={(inst) => this.verifyRef = inst} dict={this.state.dict} />
          <VerifyCard
            card={this.state.card}
            btnTab={this.props.btnTab}
            config={this.state.config}
            columns={this.state.columns}
            wrappedComponentRef={(inst) => this.verifyRef = inst}
            dict={this.state.dict}
          />
        </Modal>
        {/* 设置全局配置及列表数据源 */}
        <Modal
src/templates/formtabconfig/source.jsx
@@ -88,7 +88,7 @@
      }, {
        btnType: 'cancel',
        uuid: Utils.getuuid(),
        label: '返回',
        label: '关闭',
        execSuccess: 'grid',
        execError: 'never',
        errorTime: 15,
src/templates/subtableconfig/index.jsx
@@ -1854,7 +1854,30 @@
  }
  onColumnNameChange = () => {
    const { showColumnName } = this.state
    const { showColumnName, config } = this.state
    if (!showColumnName) {
      let fields = []
      config.columns.forEach(col => {
        if (col.field) {
          fields.push(col.field)
        }
      })
      fields = fields.join(',')
      let textArea = document.createElement('textarea')
      textArea.value = fields
      document.body.appendChild(textArea)
      textArea.select()
      try {
        document.execCommand('copy')
        document.body.removeChild(textArea)
      } catch (err) {
        document.body.removeChild(textArea)
      }
    }
    this.setState({
      showColumnName: !showColumnName
src/templates/tableshare/dragelement/card.jsx
@@ -1,12 +1,12 @@
import React from 'react'
import { useDrag, useDrop } from 'react-dnd'
import { Icon, Button, Select, DatePicker, Input, Typography } from 'antd'
import { Icon, Button, Select, DatePicker, Input } from 'antd'
import moment from 'moment'
import ItemTypes from './itemtypes'
import './index.scss'
const { MonthPicker, WeekPicker, RangePicker } = DatePicker
const { Paragraph } = Typography
// const { Paragraph } = Typography
const Card = ({ id, type, card, moveCard, findCard, editCard, delCard, copyCard, profileCard, hasDrop, showfield }) => {
  const originalIndex = findCard(id).index
@@ -133,13 +133,13 @@
            </div>
            {showfield ?
              <div className="ant-table-column-fields">
                {/* <span className="ant-table-column-title">{card.type === 'colspan' ? card.subfield : card.field}</span> */}
                <span className="ant-table-column-title">
                <span className="ant-table-column-title">{card.type === 'colspan' ? card.subfield : card.field}</span>
                {/* <span className="ant-table-column-title">
                  {card.type === 'colspan' ?
                    <Paragraph copyable>{card.subfield}</Paragraph> :
                    <Paragraph copyable>{card.field}</Paragraph>
                  }
                </span>
                </span> */}
              </div> : null
            }
          </span> : null
src/templates/tableshare/formconfig.js
@@ -393,6 +393,34 @@
    },
    {
      type: 'select',
      key: 'afterExecSuccess',
      label: Formdict['header.form.afterExecSuccess'],
      initVal: card.afterExecSuccess || 'close',
      required: true,
      options: [{
        value: 'close',
        text: Formdict['header.close']
      }, {
        value: 'notclose',
        text: Formdict['header.notclose']
      }]
    },
    {
      type: 'select',
      key: 'afterExecError',
      label: Formdict['header.form.afterExecError'],
      initVal: card.afterExecError || 'notclose',
      required: true,
      options: [{
        value: 'close',
        text: Formdict['header.close']
      }, {
        value: 'notclose',
        text: Formdict['header.notclose']
      }]
    },
    {
      type: 'select',
      key: 'execSuccess',
      label: Formdict['header.form.execSuccess'],
      initVal: card.execSuccess || 'never',
@@ -581,8 +609,8 @@
      max: 18,
      decimal: 0,
      label: Formdict['header.form.decimal'],
      initVal: card.decimal,
      required: false
      initVal: card.decimal || 0,
      required: true
    },
    {
      type: 'select',
@@ -867,7 +895,7 @@
      key: 'decimal',
      label: Formdict['header.form.decimal'],
      initVal: card.decimal || 0,
      required: false
      required: true
    },
    {
      type: 'number',
src/templates/tableshare/verifycard/billcodeform/index.jsx
@@ -7,7 +7,6 @@
class UniqueForm extends Component {
  static propTpyes = {
    floor: PropTypes.any,           // 是否为子表
    dict: PropTypes.object,         // 字典项
    fields: PropTypes.array,        // 表单
    billcodes: PropTypes.array,     // 表单
@@ -45,16 +44,6 @@
        fieldMap.set(_field.field, true)
      }
    })
    if (this.props.floor === 'subtable') {
      if (!fieldMap.has('BID')) {
        _billFields.unshift({
          uuid: 'BID',
          field: 'BID',
          label: 'BID'
        })
      }
    }
    let _usedfields = this.props.billcodes.map(item => item.field)
src/templates/tableshare/verifycard/index.jsx
@@ -19,6 +19,8 @@
class VerifyCard extends Component {
  static propTpyes = {
    floor: PropTypes.any,     // 是否为子表
    btnTab: PropTypes.any,     // 表单标签页(按钮)参数
    config: PropTypes.any,     // 表单标签页参数
    dict: PropTypes.object,   // 字典项
    card: PropTypes.object,
    columns: PropTypes.array
@@ -356,7 +358,7 @@
  }
  UNSAFE_componentWillMount() {
    const { columns } = this.props
    const { columns, config } = this.props
    let _verify = this.props.card.verify || {}
    this.setState({
@@ -373,6 +375,37 @@
      }
    })
    if (this.props.card.btnType) { // 按钮-表单标签页
      let _fields = []
      config.groups.forEach(group => {
        _fields.push(...group.sublist)
      })
      let _usefulfields = ['BID', 'ID', 'LoginUID', 'SessionUid', 'UserID', 'Appkey']
      _fields.forEach(_f => {
        if (_f.field) {
          _usefulfields.push(_f.field)
        }
      })
      if (columns && columns.length > 0 && this.props.btnTab.Ot !== 'notRequired') {
        columns.forEach(_f => {
          if (_f.field) {
            _usefulfields.push(_f.field)
          }
        })
      }
      _usefulfields = Array.from(new Set(_usefulfields))
      _usefulfields = _usefulfields.join(', ')
      this.setState({
        fields: _fields,
        usefulfields: _usefulfields
      })
      return
    }
    if (this.props.card.OpenType === 'pop') {
      Api.getSystemConfig({
        func: 'sPC_Get_LongParam',
@@ -394,20 +427,32 @@
          let _fields = []
          if (_LongParam.groups.length > 0) {
            _LongParam.groups.forEach(group => {
              group.sublist.forEach(field => {
                _fields.push(field)
              })
              _fields.push(...group.sublist)
            })
          } else {
            _fields = _LongParam.fields
          }
          let _usefulfields = ['BID', 'ID', 'LoginUID', 'SessionUid', 'UserID', 'Appkey']
          let hasBid = false
          _fields.forEach(_f => {
            if (_f.field) {
              _usefulfields.push(_f.field)
            }
            if (_f.field.toLowerCase() === 'bid') {
              hasBid = true
            }
          })
          if (this.props.floor === 'subtable' && !hasBid) { // 子表表单中增加BID
            _fields.unshift({
              uuid: 'BID',
              field: 'BID',
              label: 'BID',
              type: 'text'
            })
          }
          if (columns && columns.length > 0 && this.props.card.Ot !== 'notRequired') {
            columns.forEach(_f => {
@@ -1029,7 +1074,6 @@
          </TabPane>
          <TabPane tab="单号生成" key="4">
            <BillcodeForm
              floor={this.props.floor}
              fields={fields}
              billcodes={verify.billcodes}
              columns={this.props.columns}
src/templates/tableshare/verifycard/uniqueform/index.jsx
@@ -15,19 +15,6 @@
    editItem: null // 编辑元素
  }
  UNSAFE_componentWillMount() {
    let fields = JSON.parse(JSON.stringify(this.props.fields))
    if (fields && fields.filter(_field => _field.field === 'BID').length === 0) {
      fields.unshift({
        field: 'BID',
        label: 'BID',
        uuid: 'BID'
      })
    }
    this.setState({fields: fields})
  }
  edit = (record) => {
    this.setState({
      editItem: record
@@ -42,7 +29,7 @@
  handleConfirm = () => {
    const { fields } = this.state
    const { fields } = this.props
    // 表单提交时检查输入值是否正确
    this.props.form.validateFieldsAndScroll((err, values) => {
      if (!err) {
@@ -72,7 +59,7 @@
  render() {
    const { getFieldDecorator } = this.props.form
    const { fields } = this.state
    const { fields } = this.props
    const formItemLayout = {
      labelCol: {
src/utils/utils.js
@@ -452,7 +452,8 @@
    let _formFieldValue = {}
    // 需要声明的变量集
    // let _vars = ['tbid', 'ErrorCode', 'retmsg', 'BillCode', 'BVoucher', 'FIBVoucherDate', 'FiYear', 'UserName', 'FullName', 'ID', 'BID', 'LoginUID', 'SessionUid', 'UserID', 'Appkey']
    let _vars = ['tbid', 'errorcode', 'retmsg', 'billcode', 'bvoucher', 'fibvoucherdate', 'fiyear', 'username', 'fullname', 'id', 'bid', 'loginuid', 'sessionuid', 'userid', 'appkey']
    // let _vars = ['tbid', 'errorcode', 'retmsg', 'billcode', 'bvoucher', 'fibvoucherdate', 'fiyear', 'username', 'fullname', 'id', 'bid', 'loginuid', 'sessionuid', 'userid', 'appkey']
    let _vars = ['tbid', 'errorcode', 'retmsg', 'billcode', 'bvoucher', 'fibvoucherdate', 'fiyear', 'username', 'fullname']
    // 主键字段
    let primaryKey = setting.primaryKey || 'id'
@@ -462,7 +463,8 @@
      `
    // let _initvars = ['ID', 'BID', 'LoginUID', 'SessionUid', 'UserID', 'Appkey'] // 已赋值字段集
    let _initvars = ['id', 'bid', 'loginuid', 'sessionuid', 'userid', 'appkey'] // 已赋值字段集
    // let _initvars = ['id', 'bid', 'loginuid', 'sessionuid', 'userid', 'appkey'] // 已赋值字段集
    let _initvars = [] // 已赋值字段集
    let _initfields = []
    let _declarefields = []
@@ -474,7 +476,12 @@
        if (!_initvars.includes(_key)) {
          _initvars.push(_key)
          if (form.type === 'number' && typeof(form.value) === 'number') {
            _initfields.push(`@${_key}=${form.value}`)
          } else {
          _initfields.push(`@${_key}='${form.value}'`)
          }
        }
        
        if (!_vars.includes(_key)) {
@@ -505,7 +512,12 @@
            _initvars.push(_key)
            let _val = data.hasOwnProperty(col.field) ? data[col.field] : ''
            if (col.type === 'number' && typeof(_val) === 'number') {
              _initfields.push(`@${_key}=${_val}`)
            } else {
            _initfields.push(`@${_key}='${_val}'`)
            }
          }
          
          if (!_vars.includes(_key)) {
@@ -514,7 +526,7 @@
            let _type = `nvarchar(${col.fieldlength || 50})`
            if (col.type === 'number') {
              let _length = (col.decimal || col.decimal === 0) ? col.decimal : 18
              let _length = col.decimal ? col.decimal : 0
              _type = `decimal(18,${_length})`
            } else if (col.type === 'picture' || col.type === 'textarea') {
              _type = `nvarchar(${col.fieldlength || 512})`
@@ -605,6 +617,12 @@
    // 唯一性验证,必须存在表单(表单存在时,主键均为单值),必须填写数据源
    if (formdata && verify.uniques && verify.uniques.length > 0) {
      let hasBid = false // 检验表单及列字段中是否有bid
      let _keys_ = Object.keys(_formFieldValue).map(key => key.toLowerCase())
      if (_keys_.includes('bid')) {
        hasBid = true
      }
      verify.uniques.forEach(item => {
        let _fieldValue = []                     // 表单键值对field=value
        let _value = []                          // 表单值,用于错误提示
@@ -612,8 +630,11 @@
        item.field.split(',').forEach((_field, index) => {
          let _fval = `'${_formFieldValue[_field]}'`
          if (['id', 'bid', 'loginuid', 'sessionuid', 'userid', 'appkey'].includes(_field.toLowerCase())) {
            _fval = '@' + _field + '@'
          // if (['id', 'bid', 'loginuid', 'sessionuid', 'userid', 'appkey'].includes(_field.toLowerCase())) {
          //   _fval = '@' + _field + '@'
          // }
          if (_field.toLowerCase() === 'bid' && !hasBid) { // 表单中没有bid则使用系统bid变量
            _fval = '@BID@'
          }
          _fieldValue.push(`${_field}=${_fval}`)
          _value.push(`${_labels[index] || ''}:${_formFieldValue[_field] || ''}`)
@@ -690,13 +711,13 @@
      })
    }
    let _updateconfig = ''
    let hasvoucher = false
    // 凭证-显示列中选取,必须选行
    if (verify.voucher && verify.voucher.enabled && data) {
      let _voucher = verify.voucher
      _updateconfig = ',BVoucher=@BVoucher,FIBVoucherDate=@FIBVoucherDate,FiYear=@FiYear'
      hasvoucher = true
      _sql += `exec s_BVoucher_Create
          @Bill ='${data[_voucher.linkField]}',
@@ -724,26 +745,48 @@
    if (btn.OpenType === 'pop' && btn.sqlType === 'insert' && verify.default !== 'false') {
      let keys = []
      let values = []
      formdata.forEach(item => {
        if (item.type === 'funcvar') {
          keys.push(item.key)
          keys.push(item.key.toLowerCase())
          values.push('@' + item.key)
        } else if (item.type === 'number') {
          keys.push(item.key)
          keys.push(item.key.toLowerCase())
          values.push(item.value)
        } else {
          keys.push(item.key)
          keys.push(item.key.toLowerCase())
          values.push('\'' + item.value + '\'')
        }
      })
      if (!keys.includes('createuserid')) {
        keys.push('createuserid')
        values.push('@userid@')
      }
      if (!keys.includes('createuser')) {
        keys.push('createuser')
        values.push('@username')
      }
      if (!keys.includes('createstaff')) {
        keys.push('createstaff')
        values.push('@fullname')
      }
      if (!keys.includes('bid')) {
        keys.push('bid')
        values.push('@BID@')
      }
      keys = keys.join(',')
      values = values.join(',')
      _sql += _user
      _sql += `insert into ${btn.sql} (${keys},createuserid,CreateUser,CreateStaff,BID) select ${values},@userid@,@username,@fullname,@BID@;`
      _sql += `insert into ${btn.sql} (${keys}) select ${values};`
    } else if (btn.OpenType === 'pop' && btn.sqlType === 'update' && verify.default !== 'false') {
      let _form = []
      let _arr = []
      formdata.forEach(item => {
        _arr.push(item.key.toLowerCase())
        if (item.type === 'funcvar') {
          _form.push(item.key + '=@' + item.key)
        } else if (item.type === 'number') {
@@ -752,8 +795,27 @@
          _form.push(item.key + '=\'' + item.value + '\'')
        }
      })
      if (!_arr.includes('modifydate')) {
        _form.push('modifydate=getdate()')
      }
      if (!_arr.includes('modifyuserid')) {
        _form.push('modifyuserid=@userid@')
      }
      if (hasvoucher) {
        if (!_arr.includes('bvoucher')) {
          _form.push('BVoucher=@BVoucher')
        }
        if (!_arr.includes('fibvoucherdate')) {
          _form.push('FIBVoucherDate=@FIBVoucherDate')
        }
        if (!_arr.includes('fiyear')) {
          _form.push('FiYear=@FiYear')
        }
      }
      _form = _form.join(',')
      _sql += `update ${btn.sql} set ${_form},modifydate=getdate(),modifyuserid=@userid@${_updateconfig} where ${primaryKey}=@${primaryKeyName};`
      _sql += `update ${btn.sql} set ${_form} where ${primaryKey}=@${primaryKeyName};`
    } else if ((btn.OpenType === 'prompt' || btn.OpenType === 'exec') && btn.sqlType === 'LogicDelete' && verify.default !== 'false') { // 逻辑删除
      _sql += `update ${btn.sql} set deleted=1,modifydate=getdate(),modifyuserid=@userid@ where ${primaryKey}=@${primaryKeyName};`
    } else if ((btn.OpenType === 'prompt' || btn.OpenType === 'exec') && btn.sqlType === 'delete' && verify.default !== 'false') {      // 物理删除