From 866db6d8afa6980fd485570acda6b5fcebda4da3 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 01 七月 2024 16:08:27 +0800 Subject: [PATCH] 2024-07-01 --- src/menu/components/share/actioncomponent/formconfig.jsx | 300 ++++++++++++++++++++++++++++++++++++++++------------------- 1 files changed, 201 insertions(+), 99 deletions(-) diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx index 1106bec..4d90ee7 100644 --- a/src/menu/components/share/actioncomponent/formconfig.jsx +++ b/src/menu/components/share/actioncomponent/formconfig.jsx @@ -222,6 +222,7 @@ opentypes = opentypes.filter(item => item.value !== 'tab') funTypes = [ { value: 'print', text: '鏍囩鎵撳嵃' }, + { value: 'refund', text: '閫�娆�' }, ] pageTemps = [ { value: 'linkpage', text: '鍏宠仈鑿滃崟' }, @@ -330,9 +331,21 @@ extraParam.push('dataM') } + let apps = [] + let merchs = [] if (!appType) { if (typeof(card.openmenu) === 'string') { card.openmenu = [] + } + + if (window.GLOB.WXApps) { + window.GLOB.WXApps.forEach(item => { + if (item.appType === 'merchant') { + merchs.push({value: item.appId, text: item.appName}) + } else { + apps.push({value: item.appId, text: item.appName}) + } + }) } } else { if (typeof(card.openmenu) !== 'string') { @@ -421,20 +434,20 @@ required: true, options: [] }, - { - type: 'checkbox', - key: 'payType', - label: '鏀粯鏂瑰紡', - initVal: card.payType || [], - required: true, - options: [{ - value: 'wxpay', - text: '寰俊' - // }, { - // value: 'alipay', - // text: '鏀粯瀹�' - }] - }, + // { + // type: 'checkbox', + // key: 'payType', + // label: '鏀粯鏂瑰紡', + // initVal: card.payType || [], + // required: true, + // options: [{ + // value: 'wxpay', + // text: '寰俊' + // // }, { + // // value: 'alipay', + // // text: '鏀粯瀹�' + // }] + // }, { type: 'radio', key: 'procMode', @@ -470,15 +483,6 @@ }, { type: 'text', - key: 'innerFunc', - label: '鍐呴儴鍑芥暟', - initVal: card.innerFunc || '', - tooltip: functip, - fields: usefulFields, - required: false, - }, - { - type: 'text', key: 'urlkey', label: '鍦板潃瀛楁', initVal: card.urlkey || '', @@ -493,6 +497,53 @@ initVal: card.pageTemplate || '', required: true, options: pageTemps + }, + { + type: 'radio', + key: 'payMode', + label: '鍙傛暟澶勭悊', + initVal: card.payMode || 'none', + tooltip: '鏀粯锛堟垨閫�娆撅級鍗曞彿鐨勯澶勭悊鏂瑰紡銆�', + required: true, + options: [{ + value: 'system', + text: '绯荤粺鍑芥暟' + }, { + value: 'inner', + text: '鍐呴儴鍑芥暟' + }, { + value: 'none', + text: '鏃�' + }] + }, + { + type: 'select', + key: 'wxApp', + label: '鍏宠仈搴旂敤', + initVal: card.wxApp || '', + tooltip: '璇峰叧鑱旀敮浠樼殑鍏紬鍙锋垨灏忕▼搴忋��', + required: true, + forbid: apps.length === 0, + options: apps + }, + { + type: 'select', + key: 'wxMerch', + label: '鍏宠仈鍟嗘埛', + initVal: card.wxMerch || '', + tooltip: '璇峰叧鑱旀敮浠樼殑鍟嗘埛鍙枫��', + required: true, + forbid: merchs.length === 0, + options: merchs + }, + { + type: 'text', + key: 'innerFunc', + label: '鍐呴儴鍑芥暟', + initVal: card.innerFunc || '', + tooltip: functip, + fields: usefulFields, + required: false, }, { type: 'printTemps', @@ -984,37 +1035,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: '鍒锋柊鑿滃崟', @@ -1054,6 +1074,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', @@ -1735,6 +1786,19 @@ extraParam.push('dataM') } + let apps = [] + let merchs = [] + + if (window.GLOB.WXApps) { + window.GLOB.WXApps.forEach(item => { + if (item.appType === 'merchant') { + merchs.push({value: item.appId, text: item.appName}) + } else { + apps.push({value: item.appId, text: item.appName}) + } + }) + } + let forms = [ { type: 'select', @@ -1795,20 +1859,20 @@ required: true, options: [] }, - { - type: 'checkbox', - key: 'payType', - label: '鏀粯鏂瑰紡', - initVal: card.payType || [], - required: true, - options: [{ - value: 'wxpay', - text: '寰俊' - // }, { - // value: 'alipay', - // text: '鏀粯瀹�' - }] - }, + // { + // type: 'checkbox', + // key: 'payType', + // label: '鏀粯鏂瑰紡', + // initVal: card.payType || [], + // required: true, + // options: [{ + // value: 'wxpay', + // text: '寰俊' + // // }, { + // // value: 'alipay', + // // text: '鏀粯瀹�' + // }] + // }, { type: 'radio', key: 'procMode', @@ -1844,15 +1908,6 @@ }, { type: 'text', - key: 'innerFunc', - label: '鍐呴儴鍑芥暟', - initVal: card.innerFunc || '', - tooltip: functip, - fields: usefulFields, - required: false, - }, - { - type: 'text', key: 'urlkey', label: '鍦板潃瀛楁', initVal: card.urlkey || '', @@ -1867,6 +1922,53 @@ initVal: card.pageTemplate || '', required: true, options: pageTemps + }, + { + type: 'radio', + key: 'payMode', + label: '鍙傛暟澶勭悊', + initVal: card.payMode || 'none', + tooltip: '鏀粯锛堟垨閫�娆撅級鍗曞彿鐨勯澶勭悊鏂瑰紡銆�', + required: true, + options: [{ + value: 'system', + text: '绯荤粺鍑芥暟' + }, { + value: 'inner', + text: '鍐呴儴鍑芥暟' + }, { + value: 'none', + text: '鏃�' + }] + }, + { + type: 'select', + key: 'wxApp', + label: '鍏宠仈搴旂敤', + initVal: card.wxApp || '', + tooltip: '璇峰叧鑱旀敮浠樼殑鍏紬鍙锋垨灏忕▼搴忋��', + required: true, + forbid: apps.length === 0, + options: apps + }, + { + type: 'select', + key: 'wxMerch', + label: '鍏宠仈鍟嗘埛', + initVal: card.wxMerch || '', + tooltip: '璇峰叧鑱旀敮浠樼殑鍟嗘埛鍙枫��', + required: true, + forbid: merchs.length === 0, + options: merchs + }, + { + type: 'text', + key: 'innerFunc', + label: '鍐呴儴鍑芥暟', + initVal: card.innerFunc || '', + tooltip: functip, + fields: usefulFields, + required: false, }, { type: 'printTemps', @@ -2298,6 +2400,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: '鍒嗛〉', @@ -2325,28 +2449,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', -- Gitblit v1.8.0