| | |
| | | opentypes = opentypes.filter(item => item.value !== 'tab') |
| | | funTypes = [ |
| | | { value: 'print', text: '标签打印' }, |
| | | { value: 'refund', text: '退款' }, |
| | | ] |
| | | pageTemps = [ |
| | | { value: 'linkpage', text: '关联菜单' }, |
| | |
| | | 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') { |
| | |
| | | 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', |
| | |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'innerFunc', |
| | | label: '内部函数', |
| | | initVal: card.innerFunc || '', |
| | | tooltip: functip, |
| | | fields: usefulFields, |
| | | required: false, |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'urlkey', |
| | | label: '地址字段', |
| | | initVal: card.urlkey || '', |
| | |
| | | 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', |
| | |
| | | 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: '刷新菜单', |
| | |
| | | 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', |
| | |
| | | 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', |
| | |
| | | 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', |
| | |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'innerFunc', |
| | | label: '内部函数', |
| | | initVal: card.innerFunc || '', |
| | | tooltip: functip, |
| | | fields: usefulFields, |
| | | required: false, |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'urlkey', |
| | | label: '地址字段', |
| | | initVal: card.urlkey || '', |
| | |
| | | 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', |
| | |
| | | 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: '分页', |
| | |
| | | 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', |