| | |
| | | * @param {*} usefulFields 存储过程可用的开始字段 |
| | | * @param {*} type 按钮类型,用于区分可选的打开方式 |
| | | */ |
| | | export function getActionForm (card, functip, config, usefulFields, modules = [], anchors = []) { |
| | | export function getActionForm (card, functip, config, usefulFields, modules = [], anchors = [], side) { |
| | | let appType = sessionStorage.getItem('appType') |
| | | let viewType = sessionStorage.getItem('editMenuType') // 弹窗 popview |
| | | let printTemps = sessionStorage.getItem('printTemps') |
| | | printTemps = printTemps ? JSON.parse(printTemps) : [] |
| | | let setting = config.setting || {} |
| | | let columns = config.columns || [] |
| | | let columns = side === 'sub' && config.subColumns ? config.subColumns : (config.columns || []) |
| | | let appMenus = [] |
| | | let menulist = [] |
| | | let type = '' |
| | |
| | | { value: 'pay', text: '支付' }, |
| | | { value: 'custom', text: '链接' } |
| | | ] |
| | | } else { |
| | | if (card.pageTemplate === 'print') { // 原类型支持 |
| | | pageTemps.unshift({ value: 'print', text: '标签打印模板' }) |
| | | } else if (card.pageTemplate === 'billprintTemp') { // 原类型支持 |
| | | pageTemps.unshift({ value: 'billprintTemp', text: '单据打印模板' }) |
| | | } |
| | | } |
| | | |
| | | if (type === 'chart' && appType !== 'mob') { |
| | |
| | | }, { |
| | | value: 'radio', |
| | | text: '勾选框' |
| | | }, { |
| | | value: 'counter', |
| | | text: '计数器' |
| | | }, |
| | | ...formTypes] |
| | | }, |
| | |
| | | { |
| | | type: 'radio', |
| | | key: 'size', |
| | | label: '开关尺寸', |
| | | label: '尺寸', |
| | | initVal: card.size || 'default', |
| | | options: [{ |
| | | value: 'large', |
| | |
| | | initVal: card.openVal === undefined ? '' : card.openVal + '', |
| | | tooltip: '当开启与关闭值均为正整数时,默认转换为INT类型。', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'min', |
| | | label: '最小值', |
| | | initVal: card.min, |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'max', |
| | | label: '最大值', |
| | | initVal: card.max, |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'decimal', |
| | | label: '小数位', |
| | | initVal: card.decimal || 0, |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'text', |
| | |
| | | { value: 'custom', text: '自定义' } |
| | | ] |
| | | |
| | | if (card.pageTemplate === 'print') { // 原类型支持 |
| | | pageTemps.unshift({ value: 'print', text: '标签打印模板' }) |
| | | } else if (card.pageTemplate === 'billprintTemp') { // 原类型支持 |
| | | pageTemps.unshift({ value: 'billprintTemp', text: '单据打印模板' }) |
| | | } |
| | | |
| | | let funTypes = [ |
| | | { value: 'print', text: '标签打印' }, |
| | | { value: 'refund', text: '退款' }, |