From e771ba19739b537526ddb9a6fb2499b58a45a8ab Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 07 七月 2020 11:47:56 +0800 Subject: [PATCH] 2020-07-07 --- src/store/options.js | 2 src/locales/zh-CN/model.js | 1 src/templates/sharecomponent/actioncomponent/index.jsx | 19 +++++---- src/locales/en-US/model.js | 1 src/tabviews/zshare/actionList/newpagebutton/index.jsx | 11 ----- src/templates/zshare/formconfig.jsx | 41 +++++++++++--------- src/templates/sharecomponent/actioncomponent/actionform/index.jsx | 16 +++++++- src/templates/subtableconfig/index.jsx | 2 8 files changed, 52 insertions(+), 41 deletions(-) diff --git a/src/locales/en-US/model.js b/src/locales/en-US/model.js index 243c9c7..ee775a7 100644 --- a/src/locales/en-US/model.js +++ b/src/locales/en-US/model.js @@ -33,6 +33,7 @@ 'model.new': 'New ', 'model.window': 'Window', 'model.empty': 'Empty', + 'model.pay': 'Pay', 'model.switch.open': 'Open', 'model.switch.close': 'Close', 'model.menu.level1': 'Level 1 menu', diff --git a/src/locales/zh-CN/model.js b/src/locales/zh-CN/model.js index ea483c2..953d2cd 100644 --- a/src/locales/zh-CN/model.js +++ b/src/locales/zh-CN/model.js @@ -33,6 +33,7 @@ 'model.new': '鏂�', 'model.window': '绐楀彛', 'model.empty': '绌�', + 'model.pay': '鏀粯', 'model.switch.open': '寮�', 'model.switch.close': '鍏�', 'model.menu.level1': '涓�绾ц彍鍗�', diff --git a/src/store/options.js b/src/store/options.js index 82066e3..22b1228 100644 --- a/src/store/options.js +++ b/src/store/options.js @@ -3,5 +3,5 @@ sysType: 'bG9j$mkYWw=', // yun ( Y2xv$mkdWQ= ) 銆� dandian ( U1$mkNP ) 銆� yewu ( bG9j$mkYWw= ) caId: 'MjAyMDAxMTYxMjMzMzU1MDd$mkGQzkyMzI1Rjk4MDY0QUNGQjQ2Mg==', // mk cakey: 'MjAyMDAxMTYxMjQwMDQ2NDM$mk2N0QzODE2MjExNUI0MTc4OTVDMQ==', // mk - cdomain: 'aHR0cDovL2Nsb3V$mkkLm1rOWguY24=' // mk + cdomain: 'aHR0cDovL2Nsb3V$mkkLm1rOWguY24=' // window.btoa('') } \ No newline at end of file diff --git a/src/tabviews/zshare/actionList/newpagebutton/index.jsx b/src/tabviews/zshare/actionList/newpagebutton/index.jsx index be6e13b..7901770 100644 --- a/src/tabviews/zshare/actionList/newpagebutton/index.jsx +++ b/src/tabviews/zshare/actionList/newpagebutton/index.jsx @@ -81,16 +81,7 @@ let msg = '&uid=' + sessionStorage.getItem('UserID') + '&sid=' + sessionStorage.getItem('SessionUid') + '&lid=' + sessionStorage.getItem('LoginUID') + '&un=' + sessionStorage.getItem('User_Name') let src = '#/print/' + window.btoa('ID=' + Id + msg + cloudmsg) window.open(src) - } else if (btn.pageTemplate === 'custom' && btn.url === 'pay') { - if (data.length !== 1) { - // 鏀粯鏃讹紝闇�瑕侀�夋嫨鍗曡鏁版嵁 - notification.warning({ - top: 92, - message: this.state.dict['main.action.confirm.selectSingleLine'], - duration: 5 - }) - return - } + } else if (btn.pageTemplate === 'pay') { let url = '#/pay/' + window.btoa(`ID=${Id}&LoginUID=${sessionStorage.getItem('LoginUID')}`) window.open(url) diff --git a/src/templates/sharecomponent/actioncomponent/actionform/index.jsx b/src/templates/sharecomponent/actioncomponent/actionform/index.jsx index 17f211e..e159cec 100644 --- a/src/templates/sharecomponent/actioncomponent/actionform/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/actionform/index.jsx @@ -140,7 +140,7 @@ } else if (item.key === 'icon') { item.options = btnIcons } else if (item.key === 'Ot') { - if (card.position === 'grid') { + if (card.position === 'grid' || card.pageTemplate === 'pay') { // 琛岀骇鎸夐挳銆佹敮浠樻寜閽紝鍙兘閫夊崟琛� item.options = this.state.requireOptions.filter(op => ['requiredSgl'].includes(op.value)) } else if (['innerpage', 'blank', 'tab', 'popview', 'excelIn'].includes(_opentype)) { item.options = this.state.requireOptions.filter(op => ['notRequired', 'requiredSgl'].includes(op.value)) @@ -397,8 +397,9 @@ }) } else if (key === 'pageTemplate') { let _options = null + let _fieldval = {} if (value === 'custom') { - _options = ['label', 'Ot', 'OpenType', 'pageTemplate', 'url', 'icon', 'class', 'position'] + _options = ['label', 'Ot', 'OpenType', 'pageTemplate', 'url', 'joint', 'icon', 'class', 'position'] } else { _options = ['label', 'Ot', 'OpenType', 'pageTemplate', 'icon', 'class', 'position'] } @@ -407,9 +408,20 @@ openType: value, formlist: this.state.formlist.map(item => { item.hidden = !_options.includes(item.key) + + if (item.key === 'Ot') { + if (value === 'pay') { + item.options = this.state.requireOptions.filter(op => ['requiredSgl'].includes(op.value)) + _fieldval.Ot = 'requiredSgl' + } else { + item.options = this.state.requireOptions.filter(op => ['notRequired', 'requiredSgl'].includes(op.value)) + } + } return item }) + }, () => { + this.props.form.setFieldsValue(_fieldval) }) } else if (key === 'tabTemplate') { let _options = ['label', 'Ot', 'OpenType', 'icon', 'class', 'position', 'tabTemplate'] diff --git a/src/templates/sharecomponent/actioncomponent/index.jsx b/src/templates/sharecomponent/actioncomponent/index.jsx index a628cd5..ab59331 100644 --- a/src/templates/sharecomponent/actioncomponent/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/index.jsx @@ -97,15 +97,18 @@ <p>{this.state.dict['model.tooltip.func.outface']}</p> </div> - let menulist = menu.fstMenuList.map(item => { - return { - value: item.MenuID, - label: item.text, - isLeaf: false - } - }) + let menulist = [] + if (menu.fstMenuList) { + menulist = menu.fstMenuList.map(item => { + return { + value: item.MenuID, + label: item.text, + isLeaf: false + } + }) + } - if (card.linkmenu && card.linkmenu.length > 0) { + if (menu.fstMenuList && card.linkmenu && card.linkmenu.length > 0) { let _param = { func: 'sPC_Get_FunMenu', ParentID: card.linkmenu[0], diff --git a/src/templates/subtableconfig/index.jsx b/src/templates/subtableconfig/index.jsx index a5326dc..282f7a6 100644 --- a/src/templates/subtableconfig/index.jsx +++ b/src/templates/subtableconfig/index.jsx @@ -1196,7 +1196,7 @@ {config.charts.length > 1 ? <p className="chart-title">{item.title}</p> : null} <ActionComponent type="subtable" - menu={{MenuID: config.uuid, MenuName: config.tabName, MenuNo: config.tabNo}} + menu={{MenuID: config.uuid, MenuName: config.tabName, MenuNo: config.tabNo, fstMenuList: this.props.menu.fstMenuList}} config={config} tabs={this.state.tabviews} menuformRef={this.menuformRef} diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index b886073..7680c60 100644 --- a/src/templates/zshare/formconfig.jsx +++ b/src/templates/zshare/formconfig.jsx @@ -941,16 +941,7 @@ }, { value: 'popview', text: Formdict['model.form.popview'] - } - ] - - if (type === 'subtable') { - opentypes.push({ - value: 'funcbutton', - text: Formdict['model.form.funcbutton'] - }) - } else { - opentypes.push({ + }, { value: 'tab', text: Formdict['model.form.tab'] }, { @@ -959,7 +950,16 @@ }, { value: 'funcbutton', text: Formdict['model.form.funcbutton'] - }) + } + ] + + // 鏍囩绫诲瀷锛屼富琛ㄦ墠浼氬瓨鍦ㄨ〃鍗曟爣绛鹃〉 + let tabTems = [{ + value: 'FormTab', + text: '琛ㄥ崟鏍囩椤�' + }] + if (type === 'subtable') { + tabTems = [] } let refresh = [] @@ -1095,6 +1095,9 @@ value: 'print', text: Formdict['header.menu.printTemplate'] }, { + value: 'pay', + text: Formdict['model.pay'] + }, { value: 'custom', text: Formdict['header.form.custom'] }] @@ -1170,15 +1173,15 @@ type: 'select', key: 'tabTemplate', label: '鏍囩绫诲瀷', - initVal: card.tabTemplate || 'FormTab', + initVal: card.tabTemplate || '', required: true, - options: [{ - value: 'FormTab', - text: '琛ㄥ崟鏍囩椤�' - }, { - value: 'ThdMenu', - text: Formdict['model.menu.level3'] - }] + options: [ + { + value: 'ThdMenu', + text: Formdict['model.menu.level3'] + }, + ...tabTems + ] }, { type: 'cascader', -- Gitblit v1.8.0