king
2023-03-28 ffd044cf75ae896187b938e91dbd8fb83abd3615
2023-03-28
5个文件已修改
88 ■■■■ 已修改文件
public/options.json 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/index.jsx 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/modalform/index.jsx 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/appmanage/index.jsx 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/options.json
@@ -1,12 +1,12 @@
{
  "appId": "201912040924165801464FF1788654BC5AC73",
  "appkey": "20191106103859640976D6E924E464D029CF0",
  "appId": "202108312122504607B107A83F55B40C98CCF",
  "appkey": "20210831212235413F287EC3BF489424496C8",
  "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars",
  "systemType": "",
  "externalDatabase": "",
  "lineColor": "",
  "lineColor": "red",
  "filter": "false",
  "defaultApp": "mk",
  "defaultApp": "retail_pad",
  "defaultLang": "zh-CN",
  "WXAppID": "",
  "WXminiAppID": "",
@@ -17,6 +17,6 @@
  "transfer": "false",
  "keepPassword": "true",
  "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"],
  "host": "http://qingqiumarket.cn",
  "service": "MKWMS/"
  "host": "http://demo.mk9h.cn",
  "service": "erp_new/"
}
src/tabviews/zshare/mutilform/index.jsx
@@ -175,6 +175,19 @@
        if (item.empty === 'hidden' && item.oriOptions.length === 0) {
          item.hidden = true
        }
        if (item.type === 'checkcard' && item.readonly && item.unchecked === 'hidden') {
          let selectKeys = item.initval
          if (item.multiple === 'true') {
            selectKeys = selectKeys ? selectKeys.split(',') : []
            item.options = item.options.filter(item => selectKeys.includes(item.$value))
          } else {
            item.options = item.options.filter(item => selectKeys === item.$value)
          }
          item.oriOptions = fromJS(item.options).toJS()
          if (item.options.length === 0) {
            item.hidden = true
          }
        }
      }
      let newval = '$empty'
@@ -824,6 +837,21 @@
        if (item.empty === 'hidden' && item.oriOptions.length > 0) {
          item.hidden = false
        }
        if (item.type === 'checkcard' && item.readonly && item.unchecked === 'hidden') {
          let selectKeys = item.initval
          if (item.multiple === 'true') {
            selectKeys = selectKeys ? selectKeys.split(',') : []
            item.options = item.options.filter(item => selectKeys.includes(item.$value))
          } else {
            item.options = item.options.filter(item => selectKeys === item.$value)
          }
          item.oriOptions = fromJS(item.options).toJS()
          if (item.options.length === 0) {
            item.hidden = true
          } else {
            item.hidden = false
          }
        }
      }
      
      return item
src/templates/zshare/formconfig.jsx
@@ -3369,6 +3369,20 @@
      }]
    },
    {
      type: 'radio',
      key: 'unchecked',
      label: '未选中项',
      initVal: card.unchecked || 'show',
      tooltip: '如果没有选中项,该表单将被隐藏。',
      options: [{
        value: 'show',
        text: '显示'
      }, {
        value: 'hidden',
        text: '隐藏'
      }]
    },
    {
      type: 'color',
      key: 'backgroundColor',
      label: '背景色',
src/templates/zshare/modalform/index.jsx
@@ -230,6 +230,9 @@
      if (sessionStorage.getItem('appType') === 'mob') {
        shows.push('hidelabel')
      }
      if (this.record.readonly === 'true' && this.record.hidden !== 'true') {
        shows.push('unchecked')
      }
    } else if (['date', 'datemonth', 'datetime'].includes(type)) {
      reOptions.initval = dateOptions[type]
      reTypes.initval = 'select'
src/views/appmanage/index.jsx
@@ -509,14 +509,23 @@
          let record = localStorage.getItem(_href)
          record = record ? JSON.parse(record) : null
          
          if (record) {
            if (record.activeId) {
              let index = applist.findIndex(item => item.ID === record.activeId)
              if (index === -1) {
                localStorage.setItem(_href, JSON.stringify({preId: '', activeId: ''}))
              } else if (index !== 0) {
                applist.unshift(...applist.splice(index, 1))
          if (record && record.dates) {
            let ids = applist.map(item => item.ID)
            let reset = false
            Object.keys(record.dates).forEach(key => {
              if (!ids.includes(key)) {
                delete record.dates[key]
                reset = true
              }
            })
            applist.sort((a, b) => {
              return (record.dates[b.ID] || 0) - (record.dates[a.ID] || 0)
            })
            if (reset) {
              localStorage.setItem(_href, JSON.stringify(record))
            }
          }
        }
@@ -698,11 +707,11 @@
    let record = localStorage.getItem(_href)
    record = record ? JSON.parse(record) : null
    if (!record) {
      localStorage.setItem(_href, JSON.stringify({preId: selectApp.ID, activeId: ''}))
    if (!record || !record.dates) {
      localStorage.setItem(_href, JSON.stringify({preId: selectApp.ID, activeId: selectApp.ID, dates: {[selectApp.ID]: new Date().getTime()}}))
    } else {
      if (record.preId === selectApp.ID) {
        localStorage.setItem(_href, JSON.stringify({preId: selectApp.ID, activeId: selectApp.ID}))
      if (record.preId === selectApp.ID || record.activeId === selectApp.ID) {
        localStorage.setItem(_href, JSON.stringify({preId: selectApp.ID, activeId: selectApp.ID, dates: {...record.dates, [selectApp.ID]: new Date().getTime()}}))
      } else {
        localStorage.setItem(_href, JSON.stringify({...record, preId: selectApp.ID}))
      }