From a6cfaea4cfac187f24cbd56ec07a7cc766a6c9a7 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 29 六月 2024 15:31:17 +0800 Subject: [PATCH] 2024-06-29 --- public/options.json | 1 src/tabviews/zshare/actionList/exceloutbutton/index.jsx | 27 ++++++ src/menu/components/share/actioncomponent/actionform/index.jsx | 6 src/tabviews/custom/components/module/invoice/index.jsx | 4 src/tabviews/custom/components/module/voucher/index.jsx | 4 src/tabviews/zshare/actionList/funcbutton/index.jsx | 19 ---- src/menu/components/share/actioncomponent/formconfig.jsx | 106 +++++++++++++------------- src/tabviews/zshare/actionList/normalbutton/index.jsx | 12 +-- public/README.txt | 3 src/tabviews/zshare/actionList/changeuserbutton/index.jsx | 2 src/tabviews/zshare/actionList/excelInbutton/index.jsx | 27 ++++++ 11 files changed, 124 insertions(+), 87 deletions(-) diff --git a/public/README.txt b/public/README.txt index ab6579d..e4607b2 100644 --- a/public/README.txt +++ b/public/README.txt @@ -11,8 +11,9 @@ defaultLang -- 鎵撳紑鐨勫瓙搴旂敤璇█绫诲瀷锛岄粯璁や负zh-CN WXAppID -- 浣跨敤鍏紬鍙锋椂锛岀粦瀹氱殑鍏紬鍙稩D WXminiAppID -- 浣跨敤寰俊灏忕▼搴忔椂锛岀粦瀹氱殑灏忕▼搴廔D +WXMerchID -- 浣跨敤寰俊鏀粯鏃讹紝缁戝畾鐨勫晢鎴稩D WXNotice -- 鏄惁寮�鍚槑绉戜簯鍏紬鍙锋秷鎭彁閱掞紝鍊间负 true 鏃跺紑鍚紝鍙�氳繃鏄庣浜戝彂閫佹ā鏉挎秷鎭� -WXApps -- 瀛樺湪澶氫釜鍏紬鍙锋垨灏忕▼搴忔椂鍙娇鐢ㄥ井淇PP鍒楄〃锛屾敞鎰忓~鍐欓粯璁ゅ叕浼楀彿鎴栧皬绋嬪簭锛孾{"appId": "", "appName": "", "appType": "public/miniProgram"}] +WXApps -- 瀛樺湪澶氫釜鍏紬鍙枫�佸皬绋嬪簭鎴栧晢鎴锋椂鍙娇鐢ㄥ井淇PP鍒楄〃锛屾敞鎰忓~鍐欓粯璁ゅ叕浼楀彿銆佸皬绋嬪簭涓庡晢鎴峰彿锛屾牸寮� [{"appId": "", "appName": "", "appType": "public/miniProgram/merchant"}] nginx -- 鏄惁寮�鍚簡nginx鏈嶅姟锛屽�间负 true 鏃跺紑鍚紝濡傞渶浣跨敤寰俊妯℃澘娑堟伅绛夋湇鍔★紝璇峰厛璁剧疆nginx鏈嶅姟骞跺紑鍚閰嶇疆 debugger -- 鍊间负 true 鏃跺紑鍚皟璇曟ā寮忥紝寮�鍚悗绉诲姩绔瓙搴旂敤涓細鏈夋帶鍒跺彴 licenseKey -- 璁稿彲瀵嗛挜锛屽湪鍐呴儴缃戠粶涓娇鐢ㄧ郴缁熸椂锛屼細璺宠繃epc楠岃瘉 diff --git a/public/options.json b/public/options.json index ccd6826..8a77372 100644 --- a/public/options.json +++ b/public/options.json @@ -10,6 +10,7 @@ "defaultLang": "zh-CN", "WXAppID": "wx4d8a34c8d4494872", "WXminiAppID": "", + "WXMerchID": "", "WXNotice": "true", "nginx": "true", "debugger": false, diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx index 1c3c0e4..9a27fcb 100644 --- a/src/menu/components/share/actioncomponent/actionform/index.jsx +++ b/src/menu/components/share/actioncomponent/actionform/index.jsx @@ -18,8 +18,8 @@ pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'hoverTitle', 'hidden', 'preButton'], prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'tipTitle', 'hoverTitle', 'hidden', 'preButton'], exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'hoverTitle', 'hidden', 'preButton'], - excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'hover', 'icon', 'class', 'color', 'sheet', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'width', 'hidden'], - excelOut: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'hover', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'pagination', 'search', 'width', 'hidden'], + excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'hover', 'icon', 'class', 'color', 'sheet', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'width', 'hidden', 'refreshTab'], + excelOut: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'hover', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'pagination', 'search', 'width', 'hidden', 'refreshTab'], popview: ['label', 'Ot', 'OpenType', 'show', 'hover', 'icon', 'class', 'color', 'popClose', 'width', 'display', 'ratio', 'syncComponent', 'clickouter', 'maskStyle', 'closeButton', 'hidden'], tab: ['label', 'Ot', 'OpenType', 'show', 'hover', 'icon', 'class', 'color', 'linkmenu', 'width', 'hidden', 'openTab'], innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'width', 'hidden'], @@ -534,7 +534,7 @@ shows.push('output') } } else if (_funcType === 'refund') { - shows.push('Ot', 'wxApp', 'execSuccess', 'execError', 'syncComponent', 'openmenu', 'tipTitle') + shows.push('Ot', 'execSuccess', 'execError', 'syncComponent', 'openmenu', 'tipTitle') reOptions.Ot = requireOptions.filter(op => ['requiredSgl'].includes(op.value)) shows.push('payMode') diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx index e9d1a30..bbf9eb6 100644 --- a/src/menu/components/share/actioncomponent/formconfig.jsx +++ b/src/menu/components/share/actioncomponent/formconfig.jsx @@ -1013,37 +1013,6 @@ options: modules.length ? [...modules, {value: 'multiComponent', label: '澶氱粍浠�'}] : [] }, { - type: 'radio', - key: 'pagination', - label: '鍒嗛〉', - initVal: card.pagination || 'false', - tooltip: '瀵煎嚭鏁版嵁閲忚緝澶ф椂锛�1000+锛夛紝鍙缃垎椤佃姹傛暟鎹��', - required: false, - options: [{ - value: 'true', - text: '鏄�' - }, { - value: 'false', - text: '鍚�' - }], - forbid: appType === 'mob' - }, - { - type: 'radio', - key: 'search', - label: '鎼滅储鏉′欢', - initVal: card.search || 'false', - required: false, - options: [{ - value: 'true', - text: '蹇呭~' - }, { - value: 'false', - text: '闈炲繀濉�' - }], - forbid: appType === 'mob' - }, - { type: 'cascader', key: 'refreshTab', label: '鍒锋柊鑿滃崟', @@ -1083,6 +1052,37 @@ tooltip: '鎵ц鎴愬姛鍚庯紝闇�瑕佽烦杞殑閿氱偣銆�' + (appType === 'mob' ? '娉細灏忕▼搴忎腑鏃犳晥' : ''), required: false, options: anchors + }, + { + type: 'radio', + key: 'pagination', + label: '鍒嗛〉', + initVal: card.pagination || 'false', + tooltip: '瀵煎嚭鏁版嵁閲忚緝澶ф椂锛�1000+锛夛紝鍙缃垎椤佃姹傛暟鎹��', + required: false, + options: [{ + value: 'true', + text: '鏄�' + }, { + value: 'false', + text: '鍚�' + }], + forbid: appType === 'mob' + }, + { + type: 'radio', + key: 'search', + label: '鎼滅储鏉′欢', + initVal: card.search || 'false', + required: false, + options: [{ + value: 'true', + text: '蹇呭~' + }, { + value: 'false', + text: '闈炲繀濉�' + }], + forbid: appType === 'mob' }, { type: 'select', @@ -2355,6 +2355,28 @@ options: modules.length ? [...modules, {value: 'multiComponent', label: '澶氱粍浠�'}] : [] }, { + type: 'cascader', + key: 'refreshTab', + label: '鍒锋柊鑿滃崟', + initVal: card.refreshTab || [], + tooltip: '鎵ц鎴愬姛鍚庯紙鎴栨墽琛屽け璐ヤ笖瀛樺湪鍒锋柊椤规椂锛夛紝闇�瑕佸悓姝ュ埛鏂扮殑鑿滃崟', + required: false, + forbid: viewType === 'popview', + options: menulist + }, + { + type: 'cascader', + key: 'openmenu', + label: '鎵撳紑鑿滃崟', + tooltip: '鎵ц鎴愬姛鍚庨渶瑕佹墦寮�鐨勮彍鍗曘��', + initVal: card.openmenu || [], + extendName: 'MenuNo', + required: false, + allowClear: true, + options: menulist, + forbid: viewType === 'popview' + }, + { type: 'radio', key: 'pagination', label: '鍒嗛〉', @@ -2382,28 +2404,6 @@ value: 'false', text: '闈炲繀濉�' }] - }, - { - type: 'cascader', - key: 'refreshTab', - label: '鍒锋柊鑿滃崟', - initVal: card.refreshTab || [], - tooltip: '鎵ц鎴愬姛鍚庯紙鎴栨墽琛屽け璐ヤ笖瀛樺湪鍒锋柊椤规椂锛夛紝闇�瑕佸悓姝ュ埛鏂扮殑鑿滃崟', - required: false, - forbid: viewType === 'popview', - options: menulist - }, - { - type: 'cascader', - key: 'openmenu', - label: '鎵撳紑鑿滃崟', - tooltip: '鎵ц鎴愬姛鍚庨渶瑕佹墦寮�鐨勮彍鍗曘��', - initVal: card.openmenu || [], - extendName: 'MenuNo', - required: false, - allowClear: true, - options: menulist, - forbid: viewType === 'popview' }, { type: 'text', diff --git a/src/tabviews/custom/components/module/invoice/index.jsx b/src/tabviews/custom/components/module/invoice/index.jsx index 5733915..1575193 100644 --- a/src/tabviews/custom/components/module/invoice/index.jsx +++ b/src/tabviews/custom/components/module/invoice/index.jsx @@ -510,7 +510,7 @@ }) if (res.status) { if (config.billSaveBtn.reTabId) { - MKEmitter.emit('reloadMenuView', config.billSaveBtn.reTabId, 'table') + MKEmitter.emit('reloadMenuView', config.billSaveBtn.reTabId) } if (config.billSaveBtn.syncComId) { MKEmitter.emit('reloadData', config.billSaveBtn.syncComId) @@ -988,7 +988,7 @@ }) if (res.status) { if (config.billOutBtn.reTabId) { - MKEmitter.emit('reloadMenuView', config.billOutBtn.reTabId, 'table') + MKEmitter.emit('reloadMenuView', config.billOutBtn.reTabId) } if (config.billOutBtn.syncComId) { MKEmitter.emit('reloadData', config.billOutBtn.syncComId) diff --git a/src/tabviews/custom/components/module/voucher/index.jsx b/src/tabviews/custom/components/module/voucher/index.jsx index 0fd7ac5..89c8085 100644 --- a/src/tabviews/custom/components/module/voucher/index.jsx +++ b/src/tabviews/custom/components/module/voucher/index.jsx @@ -700,7 +700,7 @@ } if (tabId) { - MKEmitter.emit('reloadMenuView', tabId, 'table') + MKEmitter.emit('reloadMenuView', tabId) } }) } @@ -953,7 +953,7 @@ } if (tabId) { - MKEmitter.emit('reloadMenuView', tabId, 'table') + MKEmitter.emit('reloadMenuView', tabId) } }) } diff --git a/src/tabviews/zshare/actionList/changeuserbutton/index.jsx b/src/tabviews/zshare/actionList/changeuserbutton/index.jsx index 76bfb7c..90fd522 100644 --- a/src/tabviews/zshare/actionList/changeuserbutton/index.jsx +++ b/src/tabviews/zshare/actionList/changeuserbutton/index.jsx @@ -114,7 +114,7 @@ MKEmitter.emit('closeTabView', MenuID || btn.$MenuID) if (btn.refreshTab && btn.refreshTab.length > 0) { - MKEmitter.emit('reloadMenuView', btn.refreshTab[btn.refreshTab.length - 1], 'table') + MKEmitter.emit('reloadMenuView', btn.refreshTab[btn.refreshTab.length - 1]) } return } diff --git a/src/tabviews/zshare/actionList/excelInbutton/index.jsx b/src/tabviews/zshare/actionList/excelInbutton/index.jsx index 1be21b1..9310404 100644 --- a/src/tabviews/zshare/actionList/excelInbutton/index.jsx +++ b/src/tabviews/zshare/actionList/excelInbutton/index.jsx @@ -180,6 +180,16 @@ loading: false }) + let tabId = '' + if (btn.refreshTab && btn.refreshTab.length > 0) { + tabId = btn.refreshTab[btn.refreshTab.length - 1] + } + + if (tabId && btn.$MenuID === tabId) { // 鍒锋柊褰撳墠鑿滃崟鏃讹紝鍋滄鍏朵粬鎿嶄綔 + MKEmitter.emit('reloadMenuView', tabId) + return + } + if (btn.execSuccess === 'closepoptab') { MKEmitter.emit('popclose') } else if (btn.execSuccess !== 'never') { @@ -202,6 +212,10 @@ } else { MKEmitter.emit('reloadData', btn.syncComponentId) } + } + + if (tabId) { + MKEmitter.emit('reloadMenuView', tabId) } if (btn.switchTab && btn.switchTab.length > 0) { @@ -258,6 +272,15 @@ if (btn.execError === 'closepoptab') { MKEmitter.emit('popclose') } else if (btn.execError !== 'never') { + let tabId = '' + if (btn.refreshTab && btn.refreshTab.length > 0) { + tabId = btn.refreshTab[btn.refreshTab.length - 1] + } + if (tabId && btn.$MenuID === tabId) { // 鍒锋柊褰撳墠鑿滃崟鏃讹紝鍋滄鍏朵粬鎿嶄綔 + MKEmitter.emit('reloadMenuView', tabId, 'table') + return + } + MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn, '', this.state.selines) if (btn.syncComponentId) { @@ -277,6 +300,10 @@ MKEmitter.emit('reloadData', btn.syncComponentId) } } + + if (tabId) { + MKEmitter.emit('reloadMenuView', tabId) + } } if (btn.execError === 'popclose' && btn.$tabId) { // 鏍囩鍏抽棴鍒锋柊 diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx index cd40165..2a87051 100644 --- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx +++ b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx @@ -986,6 +986,16 @@ loading: false }) + let tabId = '' + if (btn.refreshTab && btn.refreshTab.length > 0) { + tabId = btn.refreshTab[btn.refreshTab.length - 1] + } + + if (tabId && btn.$MenuID === tabId) { // 鍒锋柊褰撳墠鑿滃崟鏃讹紝鍋滄鍏朵粬鎿嶄綔 + MKEmitter.emit('reloadMenuView', tabId) + return + } + if (btn.execSuccess === 'closepoptab') { MKEmitter.emit('popclose') } else if (btn.execSuccess !== 'never') { @@ -1008,6 +1018,10 @@ } else { MKEmitter.emit('reloadData', btn.syncComponentId) } + } + + if (tabId) { + MKEmitter.emit('reloadMenuView', tabId) } if (btn.switchTab && btn.switchTab.length > 0) { @@ -1064,6 +1078,15 @@ if (btn.execError === 'closepoptab') { MKEmitter.emit('popclose') } else if (btn.execError !== 'never') { + let tabId = '' + if (btn.refreshTab && btn.refreshTab.length > 0) { + tabId = btn.refreshTab[btn.refreshTab.length - 1] + } + if (tabId && btn.$MenuID === tabId) { // 鍒锋柊褰撳墠鑿滃崟鏃讹紝鍋滄鍏朵粬鎿嶄綔 + MKEmitter.emit('reloadMenuView', tabId) + return + } + MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn, '', []) if (btn.syncComponentId) { @@ -1083,6 +1106,10 @@ MKEmitter.emit('reloadData', btn.syncComponentId) } } + + if (tabId) { + MKEmitter.emit('reloadMenuView', tabId) + } } if (btn.execError === 'popclose' && btn.$tabId) { // 鏍囩鍏抽棴鍒锋柊 diff --git a/src/tabviews/zshare/actionList/funcbutton/index.jsx b/src/tabviews/zshare/actionList/funcbutton/index.jsx index 995c55d..53fc63a 100644 --- a/src/tabviews/zshare/actionList/funcbutton/index.jsx +++ b/src/tabviews/zshare/actionList/funcbutton/index.jsx @@ -215,21 +215,6 @@ } } - let appId = window.GLOB.WXAppID || window.GLOB.WXminiAppID || '' - - if (btn.wxApp && window.GLOB.WXApps && window.GLOB.WXApps.findIndex(item => item.appId === btn.wxApp) > -1) { - appId = btn.wxApp - } - - if (!appId) { - notification.warning({ - top: 10, - message: '鏈幏鍙栧埌搴旂敤ID锛�', - duration: 5 - }) - return - } - this.setState({loading: true}) if (param) { @@ -240,7 +225,7 @@ id = res.mk_b_id || res[btn.output] || orderId } - Api.setRefund({out_biz_no: id, app_id: appId}).then(res => { + Api.setRefund({out_biz_no: id}).then(res => { if (!res.status) { this.execError({ErrCode: 'E', message: res.message || window.GLOB.dict['exc_fail'] || '鎵ц澶辫触锛�', ...res}) } else { @@ -252,7 +237,7 @@ } }) } else { - Api.setRefund({out_biz_no: orderId, app_id: appId}).then(res => { + Api.setRefund({out_biz_no: orderId}).then(res => { if (!res.status) { this.execError({ErrCode: 'E', message: res.message || window.GLOB.dict['exc_fail'] || '鎵ц澶辫触锛�', ...res}) } else { diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index c4b526d..c1320ea 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -2359,12 +2359,8 @@ tabId = btn.refreshTab[btn.refreshTab.length - 1] } - // if (btn.formCache === 'clear') { // 娓呴櫎琛ㄥ崟缂撳瓨 - // window.GLOB.CacheMap = new Map() - // } - if (tabId && btn.$MenuID === tabId) { // 鍒锋柊褰撳墠鑿滃崟鏃讹紝鍋滄鍏朵粬鎿嶄綔 - MKEmitter.emit('reloadMenuView', tabId, 'table') + MKEmitter.emit('reloadMenuView', tabId) return } @@ -2406,7 +2402,7 @@ } if (tabId) { - MKEmitter.emit('reloadMenuView', tabId, 'table') + MKEmitter.emit('reloadMenuView', tabId) } if (btn.switchTab && btn.switchTab.length > 0) { @@ -3103,7 +3099,7 @@ tabId = btn.refreshTab[btn.refreshTab.length - 1] } if (tabId && btn.$MenuID === tabId) { // 鍒锋柊褰撳墠鑿滃崟鏃讹紝鍋滄鍏朵粬鎿嶄綔 - MKEmitter.emit('reloadMenuView', tabId, 'table') + MKEmitter.emit('reloadMenuView', tabId) return } @@ -3135,7 +3131,7 @@ } if (tabId) { - MKEmitter.emit('reloadMenuView', tabId, 'table') + MKEmitter.emit('reloadMenuView', tabId) } } -- Gitblit v1.8.0