king
2022-10-10 5354b648a9765d8c9ca3f8c7ce065b58c3d55716
2022-10-10
12个文件已修改
112 ■■■■■ 已修改文件
src/menu/datasource/verifycard/settingform/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/balcony/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/prop-card/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/interfaces/interItem/index.jsx 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/exceloutbutton/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelout/datasource/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/billcodeform/index.jsx 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/index.scss 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils-datamanage.js 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/billprint/index.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/settingform/index.jsx
@@ -468,7 +468,7 @@
                )}
              </Form.Item>
            </Col> : null}
            <Col span={8}>
            {/* <Col span={8}>
              <Form.Item label="事务">
                {getFieldDecorator('transaction', {
                  initialValue: setting.transaction || 'false'
@@ -478,7 +478,7 @@
                  <Radio value="false">不使用</Radio>
                </Radio.Group>)}
              </Form.Item>
            </Col>
            </Col> */}
            {!['navbar', 'balcony', 'menubar', 'interface'].includes(config.type) ? <Col span={8}>
              <Form.Item label="初始化数据">
                {getFieldDecorator('onload', {
src/tabviews/custom/components/card/balcony/index.jsx
@@ -289,6 +289,11 @@
  async loadData (hastimer) {
    const { config, arr_field, BID, BData } = this.state
    if (config.wrap.datatype === 'public') {
      MKEmitter.emit('reloadData', config.wrap.publicId)
      return
    }
    if (config.wrap.datatype === 'static') {
      this.setState({
        data: {$$BID: BID || '', $$BData: BData, $$empty: true},
src/tabviews/custom/components/card/prop-card/index.jsx
@@ -314,6 +314,11 @@
    const { mainSearch } = this.props
    const { config, arr_field, BID, BData, selected } = this.state
    if (config.wrap.datatype === 'public') {
      MKEmitter.emit('reloadData', config.wrap.publicId)
      return
    }
    if (config.wrap.datatype === 'static') {
      this.setState({
        data: {$$BID: BID || '', $$BData: BData, $$empty: true},
src/tabviews/custom/components/interfaces/interItem/index.jsx
@@ -15,6 +15,8 @@
    config: PropTypes.object,  // 配置信息
  }
  loading = false
  state = {}
  componentDidMount () {
@@ -27,6 +29,8 @@
    setTimeout(() => {
      this.loadData()
    }, config.setting.delay)
    MKEmitter.addListener('reloadData', this.reloadData)
  }
  shouldComponentUpdate (nextProps, nextState) { return false }
@@ -39,15 +43,27 @@
      return
    }
    this.timer && this.timer.stop()
    MKEmitter.removeListener('reloadData', this.reloadData)
  }
  reloadData = (publicId) => {
    if (this.props.config.uuid !== publicId) return
    this.loadData()
  }
  async loadData () {
    const { config, BID } = this.props
    if (this.loading) return
    this.loading = true
    let param = UtilsDM.getQueryDataParams(config.setting, config.columns.map(col => col.field).join(','), [], config.setting.order, 1, 1, BID)
    let result = await Api.genericInterface(param)
    if (result.status) {
      this.loading = false
      let _data = { $$empty: true }
      if (result.data && result.data[0]) {
@@ -56,8 +72,11 @@
      
      _data.$$loaded = true
      window.GLOB.CacheData.set(config.uuid, _data)
      MKEmitter.emit('mkPublicData', config.uuid, _data)
    } else {
      this.loading = false
      this.timer && this.timer.stop()
      notification.error({
        top: 92,
src/tabviews/zshare/actionList/exceloutbutton/index.jsx
@@ -765,13 +765,11 @@
    let customScript = setting.customScript || ''
    let _dataresource = setting.dataresource || ''
    let queryType = setting.queryType
    let transaction = setting.transaction
    if (btn.verify.dataType === 'custom') {
      defaultSql = btn.verify.defaultSql || 'true'
      _dataresource = btn.verify.dataresource || ''
      queryType = btn.verify.queryType
      transaction = btn.verify.transaction
      if (/\s/.test(_dataresource)) {
        _dataresource = '(' + _dataresource + ') tb'
@@ -920,10 +918,6 @@
    if (window.GLOB.mkHS) { // 云端数据验证
      param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp)
    }
    if (transaction === 'true') {
      param.func = 'sPC_Get_TableData_try'
    }
    return param
src/templates/sharecomponent/actioncomponent/verifyexcelout/datasource/index.jsx
@@ -225,7 +225,7 @@
                </Radio.Group>)}
              </Form.Item>
            </Col> : null}
            {dataType === 'custom' ? <Col span={8}>
            {/* {dataType === 'custom' ? <Col span={8}>
              <Form.Item label="事务">
                {getFieldDecorator('transaction', {
                  initialValue: setting.transaction || 'false'
@@ -235,7 +235,7 @@
                  <Radio value="false">不使用</Radio>
                </Radio.Group>)}
              </Form.Item>
            </Col> : null}
            </Col> : null} */}
          </Row>
        </Form>
      </div>
src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx
@@ -491,7 +491,7 @@
              </Radio.Group>)}
            </Form.Item>
          </Col>
          <Col span={8}>
          {/* <Col span={8}>
            <Form.Item label="事务">
              {getFieldDecorator('transaction', {
                initialValue: setting.transaction || 'false'
@@ -501,7 +501,7 @@
                <Radio value="false">不使用</Radio>
              </Radio.Group>)}
            </Form.Item>
          </Col>
          </Col> */}
          <Col span={8}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="使用急速模式时,表格中的标记、双击事件、格式化、行合并、前缀、后缀、字段透视等效果将无效,且数据都会以文本格式显示。">
src/templates/zshare/verifycard/billcodeform/index.jsx
@@ -8,7 +8,6 @@
class BillCodeForm extends Component {
  static propTpyes = {
    dict: PropTypes.object,         // 字典项
    btn: PropTypes.object,          // 按钮信息
    fields: PropTypes.array,        // 表单
    billcodes: PropTypes.array,     // 表单
@@ -217,16 +216,16 @@
    }
    return (
      <Form {...formItemLayout} className="verify-form">
      <Form {...formItemLayout} className="verify-form mk-fix-form-height">
        <Row gutter={24}>
          <Col span={7}>
            <Form.Item label={this.props.dict['header.form.funcvar']}>
            <Form.Item label="函数变量">
              {getFieldDecorator('field', {
                initialValue: '',
                rules: [
                  {
                    required: true,
                    message: this.props.dict['form.required.input'] + this.props.dict['header.form.funcvar'] + '!'
                    message: '请选择函数变量!'
                  }
                ]
              })(
@@ -247,7 +246,7 @@
                rules: [
                  {
                    required: true,
                    message: this.props.dict['form.required.select'] + '类型!'
                    message: '请选择类型!'
                  }
                ]
              })(
@@ -267,7 +266,7 @@
                rules: [
                  {
                    required: true,
                    message: this.props.dict['form.required.input'] + '关联字段!'
                    message: '请选择关联字段!'
                  }
                ]
              })(
@@ -288,7 +287,7 @@
                rules: [
                  {
                    required: true,
                    message: this.props.dict['form.required.input'] + '凭证类型!'
                    message: '请选择凭证类型!'
                  }
                ]
              })(
@@ -318,7 +317,7 @@
                rules: [
                  {
                    required: true,
                    message: this.props.dict['form.required.input'] + '位数!'
                    message: '请输入位数!'
                  }
                ]
              })(<InputNumber min={1} max={10} precision={0} />)}
@@ -331,7 +330,7 @@
                rules: [
                  {
                    required: true,
                    message: this.props.dict['form.required.input'] + '凭证标识!'
                    message: '请选择凭证标识!'
                  }
                ]
              })(
@@ -360,7 +359,7 @@
                rules: [
                  {
                    required: true,
                    message: this.props.dict['form.required.input'] + '标识!'
                    message: '请输入标识!'
                  },
                  {
                    pattern: /^[a-zA-Z0-9]*$/ig,
src/templates/zshare/verifycard/index.jsx
@@ -1562,7 +1562,6 @@
              btn={this.props.card}
              billcodes={verify.billcodes}
              columns={this.props.columns}
              dict={this.props.dict}
              modular={orderModular}
              modularDetail={orderModularDetail}
              orderChange={this.orderChange}
src/templates/zshare/verifycard/index.scss
@@ -18,6 +18,11 @@
    color: #1890ff;
    font-size: 12px;
  }
  .mk-fix-form-height {
    >.ant-row >.ant-col {
      height: 64px;
    }
  }
  .verify-form {
    .sql {
      .ant-col-sm-8 {
src/utils/utils-datamanage.js
@@ -99,9 +99,9 @@
      default_sql: setting.execute ? 'true' : 'false'
    }
    if (setting.transaction === 'true') {
      param.func = 'sPC_Get_TableData_try'
    }
    // if (setting.transaction === 'true') {
    //   param.func = 'sPC_Get_TableData_try'
    // }
    let userName = sessionStorage.getItem('User_Name') || ''
    let fullName = sessionStorage.getItem('Full_Name') || ''
@@ -196,6 +196,9 @@
      regoptions.forEach(item => {
        _customScript = _customScript.replace(item.reg, item.value)
      })
      if (window.GLOB.breakpoint) {
        _customScript = _customScript.replace(/\$breakpoint_proc@/ig, window.GLOB.breakpoint)
      }
    }
    let LText = ''
@@ -295,9 +298,9 @@
      default_sql: setting.execute ? 'true' : 'false'
    }
    if (setting.transaction === 'true') {
      param.func = 'sPC_Get_TableData_try'
    }
    // if (setting.transaction === 'true') {
    //   param.func = 'sPC_Get_TableData_try'
    // }
    
    let _dataresource = setting.dataresource
    let _customScript = ''
@@ -792,7 +795,7 @@
    foreign_key: '',
    sql: _dataresource,
    script: _customScript,
    transaction: setting.transaction === 'true'
    // transaction: setting.transaction === 'true'
  }
}
@@ -803,7 +806,7 @@
export function getStructuredParams (params, config, BID) {
  let LText_field = []
  let diffUser = false
  let transaction = false
  // let transaction = false
  let loginId = `'${sessionStorage.getItem('LoginUID') || ''}'`
  let sessionId = `'${localStorage.getItem('SessionUid') || ''}'`
  let userId = `'${sessionStorage.getItem('UserID') || ''}'`
@@ -815,9 +818,9 @@
    if (!diffUser && (/@userid@/ig.test(item.sql) || /@userid@/ig.test(_script))) {
      diffUser = true
    }
    if (item.transaction) {
      transaction = true
    }
    // if (item.transaction) {
    //   transaction = true
    // }
    _sql = _sql.replace(/@ID@/ig, `''`)
    _script = _script.replace(/@ID@/ig, `''`)
@@ -851,9 +854,9 @@
    BID: BID
  }
  if (transaction) {
    param.func = 'sPC_Get_structured_data_try'
  }
  // if (transaction) {
  //   param.func = 'sPC_Get_structured_data_try'
  // }
  let { LText, LText1, LText2 } = Utils.sPCInUpDeFormatOptions(param.LText)
src/views/billprint/index.jsx
@@ -426,7 +426,6 @@
      foreign_key: '',
      sql: _dataresource,
      script: _customScript,
      transaction: setting.transaction === 'true'
    }
  }
@@ -435,7 +434,6 @@
    if (!params || params.length === 0) return ''
    let LText_field = []
    let transaction = false
    let userName = sessionStorage.getItem('User_Name') || ''
    let fullName = sessionStorage.getItem('Full_Name') || ''
@@ -464,9 +462,6 @@
          ${_script}
        `
      }
      if (item.transaction) {
        transaction = true
      }
      item.columns.forEach(cell => {
        LText_field.push(`Select '${item.name}' as tablename,'${cell.field}' as fieldname,'${cell.datatype}' as field_type`)
@@ -479,10 +474,6 @@
      LText: LText.join(' union all '),
      LText_field: LText_field.join(' union all '),
      BID: BID || ''
    }
    if (transaction) {
      param.func = 'sPC_Get_structured_data_try'
    }
    param.LText = Utils.formatOptions(param.LText)