king
2020-03-26 e0f1f05b7567a7bfd29fd5ad54e4b2222ddfcb94
2020-03-26
18个文件已修改
139 ■■■■ 已修改文件
src/tabviews/commontable/index.jsx 62 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/formtab/formgroup/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtable/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/verupmanage/actionList/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/normalTable/index.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/topSearch/index.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/verifycard/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/verifycard/tabcard/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/index.scss 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/modalform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/pasteform/index.jsx 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/searchform/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/option.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.jsx
@@ -68,7 +68,8 @@
    refreshtabs: null,    // 需要刷新的标签集
    confirmLoading: false,// 自定义设置模态框加载中
    settingVisible: false,// 自定义设置模态框
    triggerBtn: null      // 点击表格中或快捷键触发的按钮
    triggerBtn: null,     // 点击表格中或快捷键触发的按钮
    tabActive: null       // 标签页展开控制
  }
  /**
@@ -188,6 +189,13 @@
        })
      }
      let _tabActive = {} // 筛选展开的tab页
      config.tabgroups.forEach(groupId => {
        if (!config[groupId] || config[groupId].length === 0) return
        _tabActive[groupId] = config[groupId][0].uuid
      })
      let _arrField = []     // 字段集
      let _columns = []      // 显示列
      let _logcolumns = []   // 日志显示列
@@ -274,6 +282,7 @@
      this.setState({
        loadingview: false,
        config: config,
        tabActive: _tabActive,
        userConfig: userConfig,
        setting: config.setting,
        searchlist: config.search,
@@ -303,7 +312,7 @@
  }
  setShortcut = () => {
    const { actions, userConfig } = this.state
    const { actions, userConfig, config } = this.state
    if (!userConfig) return
    document.onkeydown = (event) => {
@@ -357,14 +366,41 @@
            e.preventDefault()
            istrigger = true
            this.setState({
              triggerBtn: {
                uuid: new Date().getTime(),
                parentId: key,
                button: {...item, uuid: btnkey},
                data: null
            let _groupId = ''
            let _ActiveTabId = ''
            config.tabgroups.forEach(groupId => {
              if (!config[groupId] || config[groupId].length === 0) return
              let _tab = config[groupId].filter(tab => tab.uuid === key)[0]
              if (_tab) {
                _groupId = groupId
                _ActiveTabId = _tab.uuid
              }
            })
            if (this.state.tabActive[_groupId] === _ActiveTabId) {
              this.setState({
                triggerBtn: {
                  uuid: new Date().getTime(),
                  parentId: key,
                  button: {...item, uuid: btnkey},
                  data: null
                }
              })
            } else {
              this.setState({
                tabActive: {...this.state.tabActive, [_groupId]: _ActiveTabId}
              }, () => {
                this.setState({
                  triggerBtn: {
                    uuid: new Date().getTime(),
                    parentId: key,
                    button: {...item, uuid: btnkey},
                    data: null
                  }
                })
              })
            }
          }
        })
      })
@@ -1070,7 +1106,7 @@
  }
  render() {
    const { view, setting, searchlist, actions, columns, loadingview, viewlost, pickup, config, triggerBtn, userConfig } = this.state
    const { view, setting, searchlist, actions, columns, loadingview, viewlost, pickup, config, triggerBtn, userConfig, tabActive } = this.state
    return (
      <div>
@@ -1133,21 +1169,21 @@
              if (config[group].length === 0) return null
              return (
                <Tabs defaultActiveKey="0" key={group}>
                  {config[group].map((_tab, index) => {
                <Tabs activeKey={tabActive[group]} key={group} onChange={(key) => this.setState({tabActive: {...tabActive, [group]: key}})}>
                  {config[group].map(_tab => {
                    return (
                      <TabPane tab={
                        <span>
                          {_tab.icon ? <Icon type={_tab.icon} /> : null}
                          {_tab.label}
                        </span>
                      } key={`${index}`}>
                      } key={_tab.uuid}>
                        {_tab.type === 'SubTable' ?
                          <SubTable
                            Tab={_tab}
                            menuType="main"
                            MenuID={_tab.linkTab}
                            userConfig={userConfig ? userConfig[_tab.linkTab] : null}
                            userConfig={userConfig ? userConfig[_tab.uuid] : null}
                            triggerBtn={triggerBtn}
                            SupMenuID={this.props.MenuID}
                            refreshtabs={this.state.refreshtabs}
src/tabviews/formtab/formgroup/index.jsx
@@ -124,7 +124,7 @@
        }
        let _fieldlen = item.fieldlength || 50
        if (item.type === 'textarea' || item.type === 'fileupload') {
        if (item.type === 'textarea' || item.type === 'fileupload' || item.type === 'multiselect') {
          _fieldlen = item.fieldlength || 512
        } else if (item.type === 'number') {
          _fieldlen = item.decimal ? item.decimal : 0
src/tabviews/subtable/index.jsx
@@ -73,9 +73,13 @@
      this.loadmaindata(nextProps.BID, 'refresh')
    } else if (this.state.config && nextProps.refreshtabs && nextProps.refreshtabs.includes(this.props.Tab.uuid)) {
      this.reloadtable()
    } else if (nextProps.triggerBtn && !is(fromJS(this.props.triggerBtn), fromJS(nextProps.triggerBtn)) && nextProps.triggerBtn.parentId === this.props.MenuID) {
    } else if (nextProps.triggerBtn && !is(fromJS(this.props.triggerBtn), fromJS(nextProps.triggerBtn)) && nextProps.triggerBtn.parentId === this.props.Tab.uuid) {
      let trigger = nextProps.triggerBtn
      trigger.parentId = this.props.MenuID
      this.setState({
        triggerBtn: nextProps.triggerBtn
        triggerBtn: trigger
      })
    }
  }
src/tabviews/verupmanage/actionList/index.jsx
@@ -617,7 +617,7 @@
      }
      let _fieldlen = item.fieldlength || 50
      if (item.type === 'textarea' || item.type === 'fileupload') {
      if (item.type === 'textarea' || item.type === 'fileupload' || item.type === 'multiselect') {
        _fieldlen = item.fieldlength || 512
      } else if (item.type === 'number') {
        _fieldlen = item.decimal ? item.decimal : 0
src/tabviews/zshare/actionList/index.jsx
@@ -583,6 +583,7 @@
    }).then(response => {
      if (!response) return
      response = {"status":true,"message":"","ErrCode":"","ErrMesg":"","CpCode":"YTO","InsideBill":"202003261727348572C0D0C2C0E444FD0B42A","PrintData":"{\"data\":{\"CpCode\":\"YTO\",\"WayBillCode\":\"YT2045589280491\",\"InsideBill\":\"19042003260002\",\"RecvInfo\":\"张先生  137147852  \\r\\n河北省保定市竞秀区001\",\"SendInfo\":\"宝时得科技(中国)有限公司  0512-65152888-5147  \\r\\n宝时得科技(中国)有限公司(B区)苏州工业园区东旺路18号\",\"BigShot\":\"176保定\",\"GatherCenterCode\":\"311911\",\"GatherCenterName\":\"\",\"CustomData\":\"wu800*2\\\\r\\\\n\",\"Pin\":\"\"},\"templateURL\":\"http://css.positecgroup.com/template/yto.srt\",\"ectype\":\"jdpop\"}","CustomData":""}
      if (response.status) {
        _list.push(response)
@@ -2387,7 +2388,7 @@
      }
      let _fieldlen = item.fieldlength || 50
      if (item.type === 'textarea' || item.type === 'fileupload') {
      if (item.type === 'textarea' || item.type === 'fileupload' || item.type === 'multiselect') {
        _fieldlen = item.fieldlength || 512
      } else if (item.type === 'number') {
        _fieldlen = item.decimal ? item.decimal : 0
src/tabviews/zshare/mutilform/index.jsx
@@ -81,7 +81,7 @@
      }
      let _fieldlen = item.fieldlength || 50
      if (item.type === 'textarea' || item.type === 'fileupload') {
      if (item.type === 'textarea' || item.type === 'fileupload' || item.type === 'multiselect') {
        _fieldlen = item.fieldlength || 512
      } else if (item.type === 'number') {
        _fieldlen = item.decimal ? item.decimal : 0
src/tabviews/zshare/normalTable/index.scss
@@ -126,7 +126,7 @@
      }
      .ant-table-tbody > tr > td .content {
        p {
          margin-bottom: 5px;
          margin-bottom: 2px;
        }
        span {
          display: inline-block;
src/tabviews/zshare/topSearch/index.scss
@@ -1,5 +1,5 @@
.ant-advanced-search-form.top-search {
  padding: 0px 24px 20px;
  padding: 0px 24px 10px;
  border-bottom: 1px solid #efefef;
  .ant-form-item {
    display: flex;
src/tabviews/zshare/verifycard/index.jsx
@@ -108,7 +108,7 @@
          if (!res.LongParam) return
          let subconfig = ''
          let subUserConfig = userConfig ? userConfig[res.tab.linkTab] : ''
          let subUserConfig = userConfig ? userConfig[res.tab.uuid] : ''
          try {
            subconfig = JSON.parse(window.decodeURIComponent(window.atob(res.LongParam)))
@@ -228,7 +228,8 @@
          }
          menuParam.push({
            uuid: res.tab.linkTab,
            uuid: res.tab.uuid,
            linkTab: res.tab.linkTab,
            label: res.tab.label,
            setting: {tableType: subconfig.setting.tableType},
            action: subconfig.action.map(item => {
src/tabviews/zshare/verifycard/tabcard/index.jsx
@@ -210,7 +210,7 @@
      if (!item.verify || !item.verify.linkUrl) {
        notification.warning({
          top: 92,
          message: '打印按钮《' + item.label + '》设置错误!',
          message: '按钮《' + item.label + '》设置错误!',
          duration: 10
        })
      } else {
src/templates/modalconfig/index.scss
@@ -224,18 +224,18 @@
              }
              .edit {
                position: absolute;
                right: 100px;
                right: 50px;
                top: -5px;
                color: #1890ff;
                cursor: pointer;
                display: none;
              }
              .edit.close {
                right: 60px;
                right: 10px;
                color: #ff4d4f;
              }
              .edit.copy {
                right: 80px;
                right: 30px;
                color: #26C281;
              }
            }
src/templates/zshare/formconfig.jsx
@@ -838,7 +838,7 @@
    })
  }
  if (card.type === 'textarea' || card.type === 'fileupload') {
  if (card.type === 'textarea' || card.type === 'fileupload' || card.type === 'multiselect') {
    _fieldlength = 512
  }
src/templates/zshare/modalform/index.jsx
@@ -190,7 +190,7 @@
            form.show = false
          } else if (form.key === 'fieldlength') {
            form.initVal = 50
            if (value === 'textarea' || value === 'fileupload') {
            if (value === 'textarea' || value === 'fileupload' || value === 'multiselect') {
              form.initVal = 512
            }
            form.show = false
src/templates/zshare/pasteform/index.jsx
@@ -10,6 +10,17 @@
    dict: PropTypes.object     // 字典项
  }
  componentDidMount () {
    try {
      let _form = document.getElementById('config')
      if (_form && _form.select) {
        _form.select()
      }
    } catch {
      console.warn('Form focusing error!')
    }
  }
  handleConfirm = () => {
    // 表单提交时检查输入值是否正确
    return new Promise((resolve, reject) => {
src/templates/zshare/searchform/index.jsx
@@ -61,7 +61,9 @@
        if (form.key === 'match') {
          if (type === 'text') {
            form.options = matchReg.text
          } else if (type === 'multiselect' || type === 'select' || type === 'link') {
          } else if (type === 'multiselect') {
            form.options = matchReg.multiselect
          } else if (type === 'select' || type === 'link') {
            form.options = matchReg.select
          } else if (type === 'date') {
            form.options = matchReg.date
@@ -137,7 +139,9 @@
          } else if (form.key === 'match') {                     // 搜索条件类型切换时,匹配规则类型对应切换
            if (value === 'text') {
              form.options = matchReg.text
            } else if (value === 'multiselect' || value === 'select' || value === 'link') {
            } else if (value === 'multiselect') {
              form.options = matchReg.multiselect
            } else if (value === 'select' || value === 'link') {
              form.options = matchReg.select
            } else if (value === 'date') {
              form.options = matchReg.date
src/utils/option.js
@@ -125,6 +125,13 @@
    value: '=',
    text: '='
  }],
  multiselect: [{
    value: 'like',
    text: 'like'
  }, {
    value: 'not like',
    text: 'not like'
  }],
  select: [{
    value: '=',
    text: '='
src/utils/utils.js
@@ -326,12 +326,8 @@
        searchText += item.key + ' ' + item.match + ' \'' + str + item.value + str + '\''
      } else if (item.type === 'multiselect') {
        let str = item.match === '=' ? '' : '%'
        let options = item.value.map(val => {
          return item.key + ' ' + item.match + ' \'' + str + val + str + '\''
        })
        searchText += '(' + options.join(' OR ') + ')'
        searchText += `'${item.value}' ` + item.match + ' \'%\'+' + item.key + '+\'%\''
      } else if (item.type === 'date') {
        let _val = item.value
        let timetail = ' 00:00:00.000'
@@ -364,6 +360,7 @@
        searchText += '(' + item.key + ' ' + item.match + ' \'' + item.value + '\')'
      }
    })
    return searchText
  }
src/views/login/index.jsx
@@ -128,6 +128,12 @@
        auth: true
      })
    }
    // let link = document.querySelector("link[rel*='icon']") || document.createElement('link')
    // link.type = 'image/x-icon'
    // link.rel = 'shortcut icon'
    // link.href = 'http://www.stackoverflow.com/favicon.ico'
    // document.getElementsByTagName('head')[0].appendChild(link)
  }
  render () {