king
2020-02-02 35b44bed4aa7b3f645c20fca025813cf4f3786ea
2020-02-02
10个文件已修改
180 ■■■■■ 已修改文件
src/api/index.js 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/sidemenu/editthdmenu/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/options.js 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/tableshare/actionList/index.jsx 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/index.jsx 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/index.jsx 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/subtableconfig/index.jsx 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/tableshare/verifycard/billcodeform/index.jsx 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/tableshare/verifycard/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/index.js
@@ -26,10 +26,10 @@
})
const setCurrentUrl = () => {
  // if (!!(window.history && window.history.pushState)) {
  //   window.history.replaceState(null, null, window.location.href.split('#')[0] + '#/login')
  //   window.location.reload()
  // }
  if (!!(window.history && window.history.pushState)) {
    window.history.replaceState(null, null, window.location.href.split('#')[0] + '#/login')
    window.location.reload()
  }
}
let GlobMap = new Map()
@@ -124,13 +124,14 @@
    param.LoginUID = sessionStorage.getItem('LoginUID') || ''
    param.appkey = window.GLOB.appkey || ''
    let _rduri = ''
    if (sessionStorage.getItem('isEditState') === 'true' && options.cloudServiceApi) { // 编辑状态,且存在云端地址
      param.rduri = options.cloudServiceApi
      _rduri = options.cloudServiceApi
      param.userid = sessionStorage.getItem('CloudUserID')
      param.SessionUid = sessionStorage.getItem('CloudSessionUid') || ''
      param.LoginUID = sessionStorage.getItem('CloudLoginUID') || ''
    } else if (window.GLOB.mainSystemApi) {
      param.rduri = window.GLOB.mainSystemApi
      _rduri = window.GLOB.mainSystemApi
    }
    // param.nonc = Utils.getuuid()
@@ -139,6 +140,10 @@
    // let keys = Object.keys(param).sort()
    // let values = keys.map(key => key + param[key]).join('')
    // param.sign  = md5(values)
    if (_rduri) {
      param.rduri = _rduri
    }
    return axios({
      url: '/webapi/dostar',
@@ -156,6 +161,13 @@
    param.LoginUID = sessionStorage.getItem('LoginUID') || ''
    param.appkey = window.GLOB.appkey || ''
    // param.nonc = Utils.getuuid()
    // param._ = new Date().getTime()
    // let keys = Object.keys(param).sort()
    // let values = keys.map(key => key + param[key]).join('')
    // param.sign  = md5(values)
    return axios({
      url: '/webapi/dostar',
      data: param
src/components/sidemenu/editthdmenu/index.jsx
@@ -58,7 +58,9 @@
    editMenu: null,         // 编辑菜单
    editAction: null,       // 编辑按钮
    editTab: null,          // 编辑标签
    tabConfig: null,        // 标签配置信息
    editSubTab: null,       // 编辑子标签(标签中的标签)
    subTabConfig: null,     // 子标签配置信息
    subConfig: null         // 子配置信息
  }
@@ -494,7 +496,7 @@
          })
        }
      } else if (type === 'tabButton') { // 三级菜单下,标签下,按钮配置
        console.log(item)
        let pageParam = ''
        if (item.OpenType === 'popview') {
          if (config && config.Template === 'SubTable') {
@@ -663,6 +665,9 @@
          <ModalConfig
            menu={this.state.editMenu}
            editTab={this.state.editTab}
            tabConfig={this.state.tabConfig}
            editSubTab={this.state.editSubTab}
            subTabConfig={this.state.subTabConfig}
            editAction={this.state.editAction}
            subConfig={this.state.subConfig}
            handleView={this.handleView}
@@ -673,6 +678,7 @@
            menu={this.state.editMenu}
            editTab={this.state.editTab}
            editSubTab={this.state.editSubTab}
            tabConfig={this.state.tabConfig}
            config={this.state.subConfig}
            handleView={this.handleView}
          />
src/store/options.js
@@ -1,9 +1,7 @@
// 系统配置
export default {
  systemType: 'Cloud', // Cloud 、 SSO 、 local, 云端使用系统配置appId
  systemType: 'local', // Cloud 、 SSO 、 local, 云端使用系统配置appId
  AppId: '201912040924165801464FF1788654BC5AC73',
  // cloudServiceApi: 'http://qingqiumarket.cn/mkwms/webapi/dostar',
  // cloudLoginApi: 'http://qingqiumarket.cn/mkwms/webapi/dologon',
  cloudServiceApi: 'http://cloud.mk9h.cn/webapi/dostar',
  cloudLoginApi: 'http://cloud.mk9h.cn/webapi/dologon',
  cloudDatabase: 'sqlserver',
src/tabviews/tableshare/actionList/index.jsx
@@ -332,6 +332,8 @@
          })
        }
        let _outParam = null
        new Promise(resolve => {
          // 内部请求
          if (btn.innerFunc) {
@@ -376,26 +378,31 @@
        }).then(res => {
          if (!res) return
          // 外部请求
          _outParam = res
          return Api.genericInterface(res)
        }).then(response => {
          if (!response) return
          // 回调请求
          if (response.status) {
            if (btn.callbackFunc) {
              // 存在回调函数时,调用
              delete response.ErrCode
              delete response.ErrMesg
              delete response.message
              delete response.status
              response.func = btn.callbackFunc
              return Api.genericInterface(response)
            } else {
          if (btn.callbackFunc) {
            // 存在回调函数时,调用
            delete response.ErrMesg
            delete response.message
            delete response.status
            delete _outParam.rduri
            response.func = btn.callbackFunc
            let _callbackparam = {..._outParam, ...response}
            return Api.genericInterface(_callbackparam)
          } else {
            if (response.status) {
              this.execSuccess(btn, response)
              _resolve()
            } else {
              this.execError(response, btn)
              _resolve()
            }
          } else {
            this.execError(response, btn)
            _resolve()
          }
        }).then(res => {
          if (!res) return
src/templates/comtableconfig/index.jsx
@@ -77,7 +77,7 @@
   */
  UNSAFE_componentWillMount () {
    const { menu } = this.props
    console.log(menu)
    let _LongParam = menu.LongParam
    let _config = ''
@@ -2035,6 +2035,9 @@
        let param = {
          editMenu: _originMenu,
          editTab: !isbutton ? item : '',
          tabConfig: null,
          editSubTab: null,
          subTabConfig: null,
          editAction: isbutton ? item : '',
          subConfig: '',
          tabview: _view
src/templates/modalconfig/index.jsx
@@ -28,8 +28,11 @@
  static propTpyes = {
    menu: PropTypes.any,
    editTab: PropTypes.any,
    subConfig: PropTypes.any,
    editSubTab: PropTypes.any,
    tabConfig: PropTypes.any,
    subTabConfig: PropTypes.any,
    editAction: PropTypes.object,
    subConfig: PropTypes.any,
    handleView: PropTypes.func
  }
@@ -64,15 +67,17 @@
   * 4、设置按钮基本信息
   */
  UNSAFE_componentWillMount () {
    const {menu, editAction, editTab, subConfig} = this.props
    const {menu, editAction, tabConfig, subTabConfig, subConfig} = this.props
    let _config = ''
    let _tab = subTabConfig ? subTabConfig : tabConfig
    let _menu = { // 上级菜单是三级菜单或标签页
      type: editTab ? editTab.Template : menu.type,
      tables: editTab ? editTab.tables : menu.LongParam.tables,
      MenuID: editTab ? editTab.uuid : menu.MenuID,
      MenuNo: editTab ? editTab.tabNo : menu.MenuNo,
      MenuName: editTab ? editTab.tabName : menu.MenuName
      type: _tab ? _tab.Template : menu.type,
      tables: _tab ? _tab.tables : menu.LongParam.tables,
      MenuID: _tab ? _tab.uuid : menu.MenuID,
      MenuNo: _tab ? _tab.tabNo : menu.MenuNo,
      MenuName: _tab ? _tab.tabName : menu.MenuName
    }
    if (subConfig) {
@@ -215,13 +220,19 @@
  // 页面返回
  handleViewBack = () => {
    const {menu, editTab} = this.props
    const {menu, editTab, editSubTab, tabConfig, subTabConfig} = this.props
    let _view = (subTabConfig && subTabConfig.Template) || (tabConfig && tabConfig.Template) || menu.LongParam.Template
    let param = {
      editMenu: menu,
      editTab: editTab,
      editAction: '',
      subConfig: '',
      tabview: editTab ? editTab.Template : menu.LongParam.Template
      tabConfig: tabConfig,
      editSubTab: editSubTab,
      subTabConfig: subTabConfig,
      editAction: null,
      subConfig: subTabConfig || tabConfig || null,
      tabview: _view
    }
    this.props.handleView(param)
src/templates/subtableconfig/index.jsx
@@ -36,6 +36,7 @@
  static propTpyes = {
    menu: PropTypes.any,
    editTab: PropTypes.any,
    tabConfig: PropTypes.any,
    editSubTab: PropTypes.any,
    config: PropTypes.any,
    handleView: PropTypes.func
@@ -78,14 +79,14 @@
   * 2、设置操作类型、原始菜单信息(每次保存后重置)、已使用表及基本信息表单
   */
  UNSAFE_componentWillMount () {
    const { config, editTab } = this.props
    const { config, editTab, editSubTab } = this.props
    let _config = null
    if (!config) {
      _config = JSON.parse(JSON.stringify(Source.baseConfig))
      _config.uuid = editTab.linkTab
      _config.tabName = editTab.label
      _config.uuid = editSubTab ? editSubTab.linkTab : editTab.linkTab
      _config.tabName = editSubTab ? editSubTab.label : editTab.label
      _config.isAdd = true
    } else {
      _config = JSON.parse(JSON.stringify(config))
@@ -262,20 +263,33 @@
   * @description 组件销毁,清除state更新
   */
  componentWillUnmount () {
    this.setState = (state, callback) => {
    this.setState = () => {
      return
    }
  }
  // 页面返回
  handleViewBack = () => {
    const {menu} = this.props
    const {menu, editTab, tabConfig, editSubTab} = this.props
    let _tabview = menu ? menu.LongParam.Template : ''
    if (editSubTab) {
      if (editTab.hasOwnProperty('OpenType')) {
        _tabview = editTab.tabType
      } else {
        _tabview = editTab.type
      }
    }
    let param = {
      editMenu: menu,
      editTab: '',
      editAction: '',
      subConfig: '',
      tabview: menu ? menu.LongParam.Template : ''
      editTab: editSubTab ? editTab : null,
      tabConfig: null,
      editSubTab: null,
      subTabConfig: null,
      editAction: null,
      subConfig: tabConfig,
      tabview: _tabview
    }
    this.props.handleView(param)
@@ -1684,7 +1698,7 @@
   * @description 设置可配置按钮
   */
  setSubConfig = (btn) => {
    const { menu } = this.props
    const {menu, editTab, tabConfig, editSubTab} = this.props
    const { config, originConfig } = this.state
    if (originConfig.isAdd) {
@@ -1710,17 +1724,21 @@
          // 子菜单信息验证通过后,跳转子按钮配置页面
          let _view = ''
          let _subtab = editSubTab
          if (btn.OpenType === 'pop') {
            _view = 'Modal'             // 表单页面
          } else if (btn.OpenType === 'popview') {
            _view = btn.tabType        // 新弹窗标签模板
            _subtab = btn
          }
          let param = {
            editMenu: menu,
            editTab: originConfig,
            editSubTab: '',
            editTab: editTab,
            tabConfig: editSubTab ? tabConfig : originConfig,
            editSubTab: _subtab,
            subTabConfig: editSubTab ? originConfig : null,
            editAction: btn,
            subConfig: '',
            tabview: _view
@@ -2080,7 +2098,7 @@
          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 floor="subtable" card={this.state.card} columns={this.state.config.columns} wrappedComponentRef={(inst) => this.verifyRef = inst} dict={this.state.dict} />
        </Modal>
        {/* 设置全局配置及列表数据源 */}
        <Modal
src/templates/tableshare/verifycard/billcodeform/index.jsx
@@ -7,12 +7,13 @@
class UniqueForm extends Component {
  static propTpyes = {
    dict: PropTypes.object,  // 字典项
    fields: PropTypes.array,  // 表单
    columns: PropTypes.array,  // 表单
    modular: PropTypes.array,  // 表单
    modularDetail: PropTypes.array,  // 表单
    orderChange: PropTypes.func  // 表单
    floor: PropTypes.any,           // 是否为子表
    dict: PropTypes.object,         // 字典项
    fields: PropTypes.array,        // 表单
    columns: PropTypes.array,       // 表单
    modular: PropTypes.array,       // 表单
    modularDetail: PropTypes.array, // 表单
    orderChange: PropTypes.func     // 表单
  }
  state = {
@@ -44,6 +45,16 @@
      }
    })
    if (this.props.floor === 'subtable') {
      if (!fieldMap.has('BID')) {
        _billFields.unshift({
          uuid: 'BID',
          field: 'BID',
          label: 'BID'
        })
      }
    }
    this.setState({
      modularDetail: _modularDetail,
      funFields: this.props.fields.filter(field => field.type === 'funcvar'),
src/templates/tableshare/verifycard/index.jsx
@@ -14,6 +14,7 @@
class VerifyCard extends Component {
  static propTpyes = {
    floor: PropTypes.any,     // 是否为子表
    dict: PropTypes.object,   // 字典项
    card: PropTypes.object,
    columns: PropTypes.array
@@ -611,6 +612,7 @@
        </TabPane>
        <TabPane tab="单号生成" key="4">
          <BillcodeForm
            floor={this.props.floor}
            fields={fields}
            columns={this.props.columns}
            dict={this.props.dict}
src/utils/utils.js
@@ -913,7 +913,7 @@
      ROLLBACK TRAN
      
    END`
    console.log(Ltext)
    Ltext = Ltext.replace(/\n\s{4}/ig, 'mchr13k')
    return Ltext