king
2024-03-03 67036fb0ed31d77ca33b660ce5f9f47c29ae65c0
2024-03-03
17个文件已修改
133 ■■■■ 已修改文件
src/menu/components/search/main-search/index.scss 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/base-table/columns/editColumn/formconfig.jsx 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/base-table/columns/editColumn/index.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/columns/editColumn/index.jsx 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/columns/editColumn/index.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/customscript/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/share/normalTable/index.jsx 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/edit-table/normalTable/index.jsx 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/normalbutton/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/topSearch/advanceform/index.scss 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/topSearch/index.scss 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/searchcomponent/index.scss 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/callbackcustomscript/index.jsx 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/customscript/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/search/main-search/index.scss
@@ -84,6 +84,9 @@
      width: 100%;
    }
  }
  label[title=" "]::after, label[title="  "]::after {
    display: none;
  }
  .page-card.advanced {
    .ant-form-item-label label {
      color: orange;
src/menu/components/table/base-table/columns/editColumn/formconfig.jsx
@@ -460,6 +460,21 @@
      required: true
    },
    {
      type: 'radio',
      key: 'noValue',
      label: '空值',
      initVal: card.noValue || 'show',
      tooltip: '数值为 0 或时间小于 1949-10-02 时,是否显示',
      required: false,
      options: [{
        value: 'show',
        text: '显示'
      }, {
        value: 'hide',
        text: '隐藏'
      }]
    },
    {
      type: 'multiselect',
      key: 'blacklist',
      label: '黑名单',
src/menu/components/table/base-table/columns/editColumn/index.jsx
@@ -101,6 +101,14 @@
      _options.push('sortField')
    }
    if (this.record.Hide !== 'true') {
      if (['number', 'formula'].includes(this.record.type)) {
        _options.push('noValue')
      } else if (this.record.type === 'text' && ['YYYY-MM-DD', 'YYYY-MM-DD HH:mm:ss'].includes(this.record.textFormat)) {
        _options.push('noValue')
      }
    }
    return _options
  }
@@ -177,7 +185,7 @@
      }
    } else if (key === 'format' && value === 'percent') {
      this.props.form.setFieldsValue({postfix: '%'})
    } else if (['perspective', 'eval', 'IsSort'].includes(key)) {
    } else if (['perspective', 'eval', 'IsSort', 'textFormat'].includes(key)) {
      let _options = this.getOptions()
      this.setState({
src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx
@@ -743,7 +743,7 @@
      key: 'noValue',
      label: '空值',
      initVal: card.noValue || 'show',
      tooltip: '当值为0时是否显示',
      tooltip: '数值为 0 或时间小于 1949-10-02 时,是否显示',
      required: false,
      options: [{
        value: 'show',
src/menu/components/table/edit-table/columns/editColumn/index.jsx
@@ -99,8 +99,13 @@
    } else if (this.record.type === 'custom' && this.record.IsSort === 'true') {
      _options.push('sortField')
    }
    if (['number', 'formula'].includes(this.record.type) && this.record.Hide !== 'true') {
      _options.push('noValue')
    if (this.record.Hide !== 'true') {
      if (['number', 'formula'].includes(this.record.type)) {
        _options.push('noValue')
      } else if (this.record.type === 'text' && ['YYYY-MM-DD', 'YYYY-MM-DD HH:mm:ss'].includes(this.record.textFormat)) {
        _options.push('noValue')
      }
    }
    return _options
@@ -232,7 +237,7 @@
          return item
        })
      })
    } else if (['editable', 'editType', 'resourceType', 'ctrlField', 'eval', 'Hide', 'IsSort'].includes(key)) {
    } else if (['editable', 'editType', 'resourceType', 'ctrlField', 'eval', 'Hide', 'IsSort', 'textFormat'].includes(key)) {
      let _options = this.getOptions()
      this.setState({
src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx
@@ -436,6 +436,21 @@
      required: true
    },
    {
      type: 'radio',
      key: 'noValue',
      label: '空值',
      initVal: card.noValue || 'show',
      tooltip: '数值为 0 或时间小于 1949-10-02 时,是否显示',
      required: false,
      options: [{
        value: 'show',
        text: '显示'
      }, {
        value: 'hide',
        text: '隐藏'
      }]
    },
    {
      type: 'multiselect',
      key: 'blacklist',
      label: '黑名单',
src/menu/components/table/normal-table/columns/editColumn/index.jsx
@@ -99,6 +99,14 @@
      _options.push('sortField')
    }
    if (this.record.Hide !== 'true') {
      if (['number', 'formula'].includes(this.record.type)) {
        _options.push('noValue')
      } else if (this.record.type === 'text' && ['YYYY-MM-DD', 'YYYY-MM-DD HH:mm:ss'].includes(this.record.textFormat)) {
        _options.push('noValue')
      }
    }
    return _options
  }
@@ -178,7 +186,7 @@
      }
    } else if (key === 'format' && value === 'percent') {
      this.props.form.setFieldsValue({postfix: '%'})
    } else if (['perspective', 'eval', 'IsSort'].includes(key)) {
    } else if (['perspective', 'eval', 'IsSort', 'textFormat'].includes(key)) {
      let _options = this.getOptions()
      this.setState({
src/menu/datasource/verifycard/customscript/index.jsx
@@ -243,7 +243,7 @@
          </Col>
          <Col span={24}>
            <Form.Item label="可用字段" className="field-able">
              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'公共值,请按照@xxx@格式使用。'}><span style={{color: '#1890ff'}}>BID, LoginUID, SessionUid, UserID, Appkey, time_id, typename</span></Tooltip>,&nbsp;
              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'公共值,请按照@xxx@格式使用。'}><span style={{color: '#1890ff'}}>BID, LoginUID, SessionUid, UserID, Appkey, time_id, typename, datam</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;
              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'排序、分页以及搜索条件变量,请按照@xxx@格式使用。使用@pageSize@或@orderBy@代表自定义分页,总数请以mk_total返回。'}>orderBy, pageSize, pageIndex{usefulFields ? ', ' + usefulFields : ''}{type === 'calendar' ? ', mk_year' : ''}</Tooltip>
              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'url变量,请按照@xxx@格式使用。'}>{urlFields ? ', ' : ''}<span style={{color: '#13c2c2'}}>{urlFields}</span></Tooltip>
src/tabviews/custom/components/share/normalTable/index.jsx
@@ -126,6 +126,10 @@
          content = <span>{col.prefix || ''}<Encrypts value={content} />{col.postfix || ''}</span>
        }
        if (col.noValue === 'hide' && content < '1949-10-02') {
          content = ''
        }
        if (col.textFormat !== 'encryption') {
          content = (col.prefix || '') + content + (col.postfix || '')
        }
@@ -175,6 +179,9 @@
      try {
        content = parseFloat(record[col.field])
        if (isNaN(content)) {
          content = ''
        }
        if (col.noValue === 'hide' && content === 0) {
          content = ''
        }
      } catch (e) {
@@ -348,6 +355,10 @@
          // eslint-disable-next-line
          let func = new Function('data', col.formula)
          content = func([record])
          if (col.noValue === 'hide' && content === 0) {
            content = ''
          }
        } catch (e) {
          console.warn(e)
          content = ''
@@ -361,6 +372,10 @@
          try {
            // eslint-disable-next-line
            content = eval(content)
            if (col.noValue === 'hide' && content === 0) {
              content = ''
            }
          } catch (e) {
            console.info(content)
            console.warn(e)
src/tabviews/custom/components/table/edit-table/normalTable/index.jsx
@@ -767,6 +767,10 @@
          content = <span>{col.prefix || ''}<Encrypts value={content} />{col.postfix || ''}</span>
        }
        if (col.noValue === 'hide' && content < '1949-10-02') {
          content = ''
        }
        if (col.textFormat !== 'encryption') {
          content = (col.prefix || '') + content + (col.postfix || '')
        }
@@ -1107,6 +1111,10 @@
            content = <span>{col.prefix || ''}<Encrypts value={content} />{col.postfix || ''}</span>
          }
          if (col.noValue === 'hide' && content < '1949-10-02') {
            content = ''
          }
          if (col.textFormat !== 'encryption') {
            content = (col.prefix || '') + content + (col.postfix || '')
          }
src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -1721,9 +1721,9 @@
      sql = sql.replace(/@typename@/ig, `'admin'`)
      if (sessionStorage.getItem('dataM') === 'true') { // 数据权限
        sql = sql.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
        sql = sql.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, `'Y'`)
      } else {
        sql = sql.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
        sql = sql.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, `''`)
      }
      if (window.GLOB.debugger === true) {
src/tabviews/zshare/topSearch/advanceform/index.scss
@@ -22,6 +22,9 @@
  .ant-form-item-label {
    text-overflow: ellipsis;
  }
  label[title=" "]::after, label[title="  "]::after {
    display: none;
  }
  .daterange .ant-calendar-picker-input {
    padding: 4px 20px 4px 5px;
    font-size: 13px;
src/tabviews/zshare/topSearch/index.scss
@@ -24,6 +24,9 @@
  .ant-form-item-label {
    text-overflow: ellipsis;
  }
  label[title=" "]::after, label[title="  "]::after {
    display: none;
  }
  .daterange .ant-calendar-picker-input {
    padding: 4px 20px 4px 5px;
    font-size: 13px;
src/templates/sharecomponent/searchcomponent/index.scss
@@ -50,6 +50,9 @@
      .ant-form-item-label {
        float: left;
      }
      label[title=" "]::after, label[title="  "]::after {
        display: none;
      }
      .ant-form-item-control-wrapper {
        float: left;
        .ant-select {
src/templates/zshare/verifycard/callbackcustomscript/index.jsx
@@ -115,6 +115,7 @@
        // 数据权限
        sql = sql.replace(/@\$|\$@/ig, '').replace(/\$check@|@check\$/ig, '')
        sql = sql.replace(/@datam@/ig, `''`)
        sql = sql.replace(/@typename@/ig, `'debug'`)
        
        if (skip) {
@@ -207,18 +208,18 @@
      <Form {...formItemLayout} className="verify-form verify-custom-callback-scripts" id="verify-custom-callback-scripts">
        <Row gutter={24}>
          {!type ? <Col span={8}>
            <Form.Item label={'表名'} style={{whiteSpace: 'nowrap', margin: 0}}>
            <Form.Item label="表名" style={{whiteSpace: 'nowrap', margin: 0}}>
              {btn.cbTable}
            </Form.Item>
          </Col> : null}
          {!type ? <Col span={10}>
            <Form.Item label={'报错字段'} style={{margin: 0, whiteSpace: 'nowrap'}}>
            <Form.Item label="报错字段" style={{margin: 0, whiteSpace: 'nowrap'}}>
              ErrorCode(增加后缀NT表示数据不回滚,如ENT、NNT、FNT、NMNT、CNT、-2NT), retmsg
            </Form.Item>
          </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;
            <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, datam</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, mk_deleted</span></Tooltip>,&nbsp;
              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'系统变量,系统会定义变量并在单号生成或创建凭证时使用。'}><span style={{color: '#13c2c2'}}>BillCode, BVoucher, FIBVoucherDate, FiYear, ModularDetailCode</span></Tooltip>
              {usefulfields ? <span>, {usefulfields}</span> : ''}
@@ -242,7 +243,7 @@
            </Form.Item>
          </Col> : null}
          {!type ? <Col span={8}>
            <Form.Item label={'快捷添加'} style={{marginBottom: 0}}>
            <Form.Item label="快捷添加" style={{marginBottom: 0}}>
              <Select
                allowClear
                showSearch
src/templates/zshare/verifycard/customscript/index.jsx
@@ -309,7 +309,7 @@
          </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={'公共值,请按照@xxx@格式使用。'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, time_id, typename, datam</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, mk_deleted</span></Tooltip>,&nbsp;
              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'系统变量,系统会定义变量并在单号生成或创建凭证时使用。'}><span style={{color: '#13c2c2'}}>BillCode, BVoucher, FIBVoucherDate, FiYear, ModularDetailCode</span></Tooltip>
              {usefulfields ? <span>, {usefulfields}</span> : ''}
src/utils/utils.js
@@ -726,9 +726,9 @@
      if (item.type === 'date') {
        if (!item.value) {
          if (['>=', '>'].includes(item.match)) {
            item.value = '1970-01-01 00:00:00.000'
            item.value = '1900-01-01 00:00:00.000'
          } else if (['<=', '<'].includes(item.match)) {
            item.value = '2050-01-01 00:00:00.000'
            item.value = '3000-01-01 00:00:00.000'
          }
        } else if (search.precision === 'day') {
          if (['>=', '>'].includes(item.match)) {
@@ -749,8 +749,8 @@
        if (item.match === '=') {
          options.push(item)
        } else {
          let _startval = item.value ? moment(item.value, 'YYYY-MM').startOf('month').format('YYYY-MM-DD') + ' 00:00:00.000' : '1970-01-01 00:00:00.000'
          let _endval = item.value ? moment(item.value, 'YYYY-MM').endOf('month').add(1, 'days').format('YYYY-MM-DD') + ' 00:00:00.000' : '2050-01-01 00:00:00.000'
          let _startval = item.value ? moment(item.value, 'YYYY-MM').startOf('month').format('YYYY-MM-DD') + ' 00:00:00.000' : '1900-01-01 00:00:00.000'
          let _endval = item.value ? moment(item.value, 'YYYY-MM').endOf('month').add(1, 'days').format('YYYY-MM-DD') + ' 00:00:00.000' : '3000-01-01 00:00:00.000'
  
          let copy = JSON.parse(JSON.stringify(item))
          copy.key = copy.key + '1'
@@ -773,8 +773,8 @@
        options.push(item)
        options.push(copy)
      } else if (item.type === 'dateweek') {
        let _startval = item.value ? moment(item.value, 'YYYY-MM-DD').startOf('week').format('YYYY-MM-DD') + ' 00:00:00.000' : '1970-01-01 00:00:00.000'
        let _endval = item.value ? moment(item.value, 'YYYY-MM-DD').endOf('week').add(1, 'days').format('YYYY-MM-DD') + ' 00:00:00.000' : '2050-01-01 00:00:00.000'
        let _startval = item.value ? moment(item.value, 'YYYY-MM-DD').startOf('week').format('YYYY-MM-DD') + ' 00:00:00.000' : '1900-01-01 00:00:00.000'
        let _endval = item.value ? moment(item.value, 'YYYY-MM-DD').endOf('week').add(1, 'days').format('YYYY-MM-DD') + ' 00:00:00.000' : '3000-01-01 00:00:00.000'
        let copy = JSON.parse(JSON.stringify(item))
        copy.key = copy.key + '1'
@@ -785,8 +785,8 @@
        options.push(item)
        options.push(copy)
      } else if (item.type === 'daterange') {
        let _startval = '1970-01-01 00:00:00.000'
        let _endval = '2050-01-01 00:00:00.000'
        let _startval = '1900-01-01 00:00:00.000'
        let _endval = '3000-01-01 00:00:00.000'
        if (item.value) {
          let val = item.value.split(',')