king
2020-04-15 02a05c4e82e74c290e80ae7710fbb394ed7cac7a
2020-04-15
8个文件已修改
146 ■■■■ 已修改文件
src/components/sidemenu/config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/formtab/actionList/index.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/formtab/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/verupmanage/actionList/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/index.jsx 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycardprint/index.jsx 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/sidemenu/config.js
@@ -30,7 +30,7 @@
      text: '传输号查询'
    }, {
      src: '',
      systems: ['official'],
      systems: ['official', 'local', 'SSO', 'cloud'],
      PageParam: {OpenType: 'newtab', Template: 'VerupTable'},
      type: 'VerupTable',
      MenuID: '1583979633842550imkchl4qt4qppsiv',
src/tabviews/formtab/actionList/index.jsx
@@ -116,6 +116,13 @@
        param.secretkey = Utils.encrypt(param.LText, param.timestamp)
        _primaryId = param.ID
      } else if (btn.sql && btn.sqlType === 'insertOrUpdate') { // 系统函数添加或修改时
        param.ID = primaryId || Utils.getguid()
        param.LText = Utils.formatOptions(Utils.getSysDefaultSql(btn, setting, formdata, param, data, logcolumns)) // 数据源
        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
        param.secretkey = Utils.encrypt(param.LText, param.timestamp)
        _primaryId = param.ID
      } else if (btn.sql) {
        param.ID = primaryId
        param.LText = Utils.formatOptions(Utils.getSysDefaultSql(btn, setting, formdata, param, data, logcolumns)) // 数据源
src/tabviews/formtab/index.jsx
@@ -488,7 +488,7 @@
        this.props.modifyTabview(tabs)
      }
    } else if (type === 'error' && btn.afterExecError === 'notclose') {
      if (btn.execSuccess === 'refresh') {
      if (btn.execError === 'refresh') {
        this.loadmaindata()
      }
    } else if (type === 'error' && btn.afterExecError === 'close') {
src/tabviews/verupmanage/actionList/index.jsx
@@ -482,7 +482,7 @@
        let _callbackparam = {..._outParam, ...response}
        return Api.genericInterface(_callbackparam)
        return Api.getLocalConfig(_callbackparam)
      } else {
        if (response.status) {
          // 一次请求成功,进行下一项请求
@@ -503,7 +503,7 @@
      if (_localParam) {
        return Api.genericInterface(_localParam)
        return Api.getLocalConfig(_localParam)
      } else if (res.status) {
        if (params.length === 0) {
          this.execSuccess(btn, res)
src/tabviews/zshare/actionList/index.jsx
@@ -357,7 +357,8 @@
          let param = {
            func: 's_PrintTemplateMGetData',
            Type: 'Y',
            ID: tempId
            // ID: tempId, // 添加模板时,保存及查询使用模板参数
            PrintTempNO: tempId
          }
    
          if (window.GLOB.mainSystemApi) { // 从单点登录服务器取打印配置信息
@@ -2535,56 +2536,38 @@
  render() {
    const { loadingUuid, btnloading, loadingNumber } = this.state
    if (this.props.setting.actionfixed && this.props.type === 'main') { // 按钮是否固定在头部
    let fixed = this.props.setting.actionfixed && this.props.type === 'main' // 按钮是否固定在头部
    let actionlist = <div className="button-list toolbar-button" id={fixed ? this.props.MenuID + 'mainaction' : ''}>
      {this.props.actions.map((item, index) => {
        let label = item.label
        if (loadingUuid === item.uuid && loadingNumber !== '') {
          label = label + '(' + loadingNumber + ')'
        }
        return (
          <Button
            className={'mk-btn mk-' + item.class}
            icon={item.icon}
            key={'action' + index}
            onClick={() => {this.actionTrigger(item)}}
            loading={loadingUuid === item.uuid}
          >{label}</Button>
        )
      })}
      {this.getModels()}
      {btnloading && <Spin size="large" />}
      <ExcelIn MenuID={this.props.MenuID} returndata={this.getexceldata} ref="excelIn" />
    </div>
    if (fixed) {
      return (
        <Affix offsetTop={48}>
          <div className="button-list toolbar-button" id={this.props.MenuID + 'mainaction'}>
            {this.props.actions.map((item, index) => {
              let label = item.label
              if (loadingUuid === item.uuid && loadingNumber !== '') {
                label = label + '(' + loadingNumber + ')'
              }
              return (
                <Button
                  className={'mk-btn mk-' + item.class}
                  icon={item.icon}
                  key={'action' + index}
                  onClick={() => {this.actionTrigger(item)}}
                  loading={loadingUuid === item.uuid}
                >{label}</Button>
              )
            })}
            {this.getModels()}
            {btnloading && <Spin size="large" />}
            <ExcelIn MenuID={this.props.MenuID} returndata={this.getexceldata} ref="excelIn" />
          </div>
          {actionlist}
        </Affix>
      )
    } else {
      return (
        <div className="button-list toolbar-button">
          {this.props.actions.map((item, index) => {
            let label = item.label
            if (loadingUuid === item.uuid && loadingNumber !== '') {
              label = label + '(' + loadingNumber + ')'
            }
            return (
              <Button
                className={'mk-btn mk-' + item.class}
                icon={item.icon}
                key={'action' + index}
                onClick={() => {this.actionTrigger(item)}}
                loading={loadingUuid === item.uuid}
              >{label}</Button>
            )
          })}
          {this.getModels()}
          {btnloading && <Spin size="large" />}
          <ExcelIn MenuID={this.props.MenuID} returndata={this.getexceldata} ref="excelIn" />
        </div>
      )
      return actionlist
    }
  }
}
src/templates/zshare/verifycardprint/index.jsx
@@ -54,20 +54,20 @@
  }
  componentDidMount() {
    let _sql = `select ID,Images,PrintTempNO+PrintTempName as PN from sPrintTemplate
      where appkey= @appkey@ and Deleted=0
      union select ID,Images,a.PrintTempNO+PrintTempName as PN
      from (select * from sPrintTemplate where appkey= '' and Deleted=0 ) a
      left join (select PrintTempNO from sPrintTemplate where appkey= @appkey@ and Deleted=0 ) b
      on a.PrintTempNO=b.PrintTempNO
      left join (select Srcid from sPrintTemplate_Log where appkey='' and apicode= @appkey@ and Deleted=0 ) c
      on a.ID=c.Srcid  where b.PrintTempNO is null and c.Srcid is null`
    let _sql = `select PrintTempNO,Images,PrintTempNO+PrintTempName as PN from sPrintTemplate
    where appkey= @appkey@ and Deleted=0
    union select ID,Images,a.PrintTempNO+PrintTempName as PN
    from (select * from sPrintTemplate where appkey= '' and Deleted=0 ) a
    left join (select PrintTempNO from sPrintTemplate where appkey= @appkey@ and Deleted=0 ) b
    on a.PrintTempNO=b.PrintTempNO
    left join (select Srcid from sPrintTemplate_Log where appkey='' and apicode= @appkey@ and Deleted=0 ) c
    on a.ID=c.Srcid where b.PrintTempNO is null and c.Srcid is null`
    let param = {
      func: 'sPC_Get_SelectedList',
      LText: Utils.formatOptions(_sql),
      obj_name: 'data',
      arr_field: 'PN,ID,Images'
      arr_field: 'PN,PrintTempNO,Images'
    }
    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
@@ -77,7 +77,7 @@
      if (res.status) {
        let temps = res.data.map(temp => {
          return {
            value: temp.ID,
            value: temp.PrintTempNO,
            text: temp.PN,
            img: temp.Images
          }
src/utils/utils.js
@@ -672,6 +672,12 @@
    let BID = param.BID
    let verify = btn.verify || {}
    let _formFieldValue = {}
    let _actionType = null
    if (verify.default !== 'false') { // 判断是否使用默认sql
      _actionType = btn.sqlType
    }
    // 需要声明的变量集
    // 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', 'modulardetailcode']
@@ -901,6 +907,7 @@
    }
    // 单号生成,使用上级id(BID)或列表数据,声明变量(检验)
    let _billcodesSql  = ''
    if (verify.billcodes && verify.billcodes.length > 0) {
      verify.billcodes.forEach(item => {
        let _ModularDetailCode = ''
@@ -932,7 +939,7 @@
          _vars.push(_key)
        }
        _sql += `${_declare}
        _billcodesSql += `${_declare}
          select @BillCode='', @${_key}='', @ModularDetailCode=''
          ${_lpline}
          exec s_get_BillCode
@@ -948,6 +955,10 @@
          set @${_key}=@BillCode
          `
      })
      if (_actionType !== 'insertOrUpdate') {
        _sql += _billcodesSql
      }
    }
    let hasvoucher = false
@@ -979,14 +990,7 @@
    let primaryKeyName = ['id', 'bid', 'loginuid', 'sessionuid', 'userid', 'appkey'].includes(primaryKey.toLowerCase()) ? primaryKey + '@' : primaryKey
    let _actionType = null
    if (verify.default !== 'false') { // 判断是否使用默认sql
      _actionType = btn.sqlType
    }
    let _insertsql = ''
    let _updatesql = ''
    if (_actionType === 'insert' || _actionType === 'insertOrUpdate') { // 添加语句
      let keys = []
      let values = []
@@ -1032,7 +1036,10 @@
      keys = keys.join(',')
      values = values.join(',')
      _insertsql = `insert into ${btn.sql} (${keys}) select ${values};`
    } else if (_actionType === 'update' || _actionType === 'insertOrUpdate') { // 修改语句
    }
    let _updatesql = ''
    if (_actionType === 'update' || _actionType === 'insertOrUpdate') { // 修改语句
      let _form = []
      let _arr = []
@@ -1065,7 +1072,6 @@
          _form.push('FiYear=@FiYear')
        }
      }
      _form = _form.join(',')
      _updatesql = `update ${btn.sql} set ${_form} where ${primaryKey}=@${primaryKeyName};`
    }
@@ -1094,9 +1100,14 @@
      _sql += `select @tbid=''
        select @tbid='X' from ${btn.sql} where ${primaryKey}=@ID@
        if @tbid=''
          begin
          ${_billcodesSql}
          ${_insertsql}
          end
        else
          begin
          ${_updatesql}
          end
      `
    }
src/views/login/index.jsx
@@ -136,6 +136,11 @@
            auth: false
          })
        }
      } else if (res.ErrCode === 'N') {
        localStorage.removeItem('AuthCode')
        this.setState({
          auth: false
        })
      }
    })