qiqi.page
page 模块提供跳转到指定界面的功能。
API
openForm(options): Promise<boolean>打开单据卡片详情界面
options 对象属性如下:
| 参数 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| mode | 模式 (View查看态, Edit编辑态, Create创建态) | string | - |
| id | 单据id, 对于查看态\编辑态必传 | string | - |
| entityName | 业务对象的名称 | string | |
| contextOrgId | 使用组织id, 对于受管控档案必传 | string | |
| billTypeId | 单据类型id | string |
- demo
// 打开报销单查看态
qiqi.page.openForm({
id: 'xxxx',
mode: 'View',
entityName: 'Reimburse'
});
openReport(options): void打开报表界面
options 对象属性如下:
| 参数 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| groupId | 报表分组ID | string | - |
| definitionId | 报表定义ID | string | - |
| criterias | 查询条件数组 | array | - |
| entityName | 业务对象名称(可选,没有entityName会有业务特殊扩展可能会走不到,查询没有问题,不强制要求) | string | - |
其中 criterias 数组中的每个对象包含:
| 参数 | 说明 | 类型 |
|---|---|---|
| operator | 操作符 | IEnumValue |
| fieldName | 字段名称 | string |
| fieldType | 字段类型 | string |
| value | 字段值对象 | object |
value 对象属性:
| 参数 | 说明 | 类型 |
|---|---|---|
| values | 值数组(多值时使用) | array |
| value | 单个值 | any |
| from | 范围查询起始值 | any |
| to | 范围查询结束值 | any |
| unit | 相对时间单位 | string |
| offset | 相对时间偏移量 | number |
| length | 相对时间长度 | number |
- demo
// 打开报表
qiqi.page.openReport({
groupId: 'financial_reports',
definitionId: 'expense_summary',
entityName: 'Expense'
});
openVPage(options): void打开VPage界面
options 对象属性如下:
| 参数 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| pageId | 页面ID | string | - |
| params | 页面参数对象 | Record<string, any> | - |
- demo
// 打开VPage页面
qiqi.page.openVPage({
pageId: 'custom_page_001',
params: {
userId: '12345',
mode: 'edit'
}
});