| | |
| | | { |
| | | "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": "", |
| | |
| | | "transfer": "false", |
| | | "keepPassword": "true", |
| | | "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"], |
| | | "host": "http://qingqiumarket.cn", |
| | | "service": "MKWMS/" |
| | | "host": "http://demo.mk9h.cn", |
| | | "service": "erp_new/" |
| | | } |
| | |
| | | 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' |
| | |
| | | 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 |
| | |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'unchecked', |
| | | label: '未选中项', |
| | | initVal: card.unchecked || 'show', |
| | | tooltip: '如果没有选中项,该表单将被隐藏。', |
| | | options: [{ |
| | | value: 'show', |
| | | text: '显示' |
| | | }, { |
| | | value: 'hidden', |
| | | text: '隐藏' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'color', |
| | | key: 'backgroundColor', |
| | | label: '背景色', |
| | |
| | | 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' |
| | |
| | | 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)) |
| | | } |
| | | } |
| | | } |
| | |
| | | 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})) |
| | | } |