add docs
This commit is contained in:
@@ -0,0 +1,604 @@
|
||||
{
|
||||
"title": "@functionName@",
|
||||
"type": "page",
|
||||
@aside_setup@
|
||||
"toolbar": [
|
||||
{
|
||||
"type": "button",
|
||||
"label": "新增",
|
||||
"icon": "fa fa-plus pull-left",
|
||||
"primary": true,
|
||||
"actionType": "drawer",
|
||||
"disabledOn": "${ls:@menuid@@insert == null}",
|
||||
"drawer": {
|
||||
"position": "right",
|
||||
"resizable": true,
|
||||
"size": "xl",
|
||||
"actions": [{
|
||||
"label": "存檔",
|
||||
"actionType": "submit",
|
||||
"primary": true,
|
||||
"type": "button"
|
||||
},
|
||||
{
|
||||
"label": "取消",
|
||||
"actionType": "cancel",
|
||||
"type": "button"
|
||||
}
|
||||
],
|
||||
@insert_default@
|
||||
"title": "新增",
|
||||
"body": {
|
||||
"type": "form",
|
||||
"mode": "horizontal",
|
||||
"horizontal": {
|
||||
"leftFixed": true
|
||||
},
|
||||
"name": "form_insert",
|
||||
@init_api_org@
|
||||
"api": {
|
||||
"method": "post",
|
||||
"url": "${ls:base_ip}/xapi/v3/${ls:base_db}/orm_api/2/",
|
||||
"dataType": "form",
|
||||
"requestAdaptor": "return {\n ...api,\n data: {\n ...api.data,\n token: local_get_token(), \n_$_tableName: \"@TableName@\",\n _$_pk: \"@pk@\",\n _$_action: \"C\"}\n}"
|
||||
},
|
||||
"body": [
|
||||
@Fields_by_add@,
|
||||
{
|
||||
"type": "form",
|
||||
"title": "表身明細",
|
||||
"actions": [],
|
||||
"body": {
|
||||
"type": "crud",
|
||||
"id": "detail_edit",
|
||||
"tableClassName": "myGridHeader_a",
|
||||
"api": {
|
||||
"method": "post",
|
||||
"url": "${ls:base_ip}/xapi/v3/${ls:base_db}/orm_api/3/",
|
||||
"data": {
|
||||
"token": "${ls:token}",
|
||||
"page": "${page}",
|
||||
"perPage": "${perPage}",
|
||||
"keywords": "${keywords}",
|
||||
"_$_tableName": "@Sub_TableName_x@",
|
||||
"_$_pk": "@sub_pk@",
|
||||
"_id_": "@TableName:4_6@${ls:userid|substring:0:6}",
|
||||
"_field_": "@pk@",
|
||||
"_$_action": "P",
|
||||
"_$_query_filter": "1^10^@pk@,@seqno@^@detail_fields@^^^@pk@"
|
||||
},
|
||||
"dataType": "form"
|
||||
},
|
||||
"syncLocation": false,
|
||||
"perPage": 10,
|
||||
"headerToolbar": [
|
||||
{
|
||||
"type": "button",
|
||||
"label": "新增表身",
|
||||
"level": "primary",
|
||||
"actionType": "drawer",
|
||||
"drawer": {
|
||||
"title": "新增表身",
|
||||
"position": "right",
|
||||
"size": "lg",
|
||||
"resizable": true,
|
||||
"body": {
|
||||
"type": "form",
|
||||
"name": "form_detail_insert",
|
||||
"api": {
|
||||
"method": "post",
|
||||
"url": "${ls:base_ip}/xapi/v3/${ls:base_db}/orm_api/2/",
|
||||
"dataType": "form",
|
||||
"requestAdaptor": "return {\n ...api,\n data: {\n ...api.data,\n token: local_get_token(),\n _$_tableName: \"@Sub_TableName_x@\",\n _$_pk: \"@sub_pk@\",\n _$_action: \"C\"}\n}"
|
||||
},
|
||||
"body": [
|
||||
@Detail_By_Edit_Insert@
|
||||
],
|
||||
"onEvent": {
|
||||
"submitSucc": {
|
||||
"actions": [
|
||||
{
|
||||
"actionType": "reload",
|
||||
"componentId": "detail_edit"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "columns-toggler",
|
||||
"align": "right"
|
||||
},
|
||||
{
|
||||
"type": "drag-toggler",
|
||||
"align": "right"
|
||||
},
|
||||
{
|
||||
"type": "pagination",
|
||||
"align": "right"
|
||||
}
|
||||
],
|
||||
"footerToolbar": [
|
||||
"statistics",
|
||||
"switch-per-page",
|
||||
"pagination"
|
||||
],
|
||||
"columns": [
|
||||
@Detail_By_View@,
|
||||
{
|
||||
"type": "operation",
|
||||
"label": "操作",
|
||||
"width": 100,
|
||||
"buttons": [
|
||||
{
|
||||
"type": "button",
|
||||
"icon": "fa fa-pencil",
|
||||
"tooltip": "編輯",
|
||||
"actionType": "drawer",
|
||||
"drawer": {
|
||||
"position": "left",
|
||||
"resizable": true,
|
||||
"size": "lg",
|
||||
"actions": [{
|
||||
"label": "存檔",
|
||||
"actionType": "submit",
|
||||
"primary": true,
|
||||
"type": "button"
|
||||
},
|
||||
{
|
||||
"label": "取消",
|
||||
"actionType": "cancel",
|
||||
"type": "button"
|
||||
}
|
||||
],
|
||||
"title": "編輯",
|
||||
"body": {
|
||||
"type": "form",
|
||||
"mode": "horizontal",
|
||||
"horizontal": {
|
||||
"leftFixed": true
|
||||
},
|
||||
"name": "form_detail_edit",
|
||||
@init_api_org@
|
||||
"api": {
|
||||
"method": "post",
|
||||
"url": "${ls:base_ip}/xapi/v3/${ls:base_db}/orm_api/3/",
|
||||
"dataType": "form",
|
||||
"requestAdaptor": "return {\n ...api,\n data: {\n ...api.data,\n token: local_get_token(),\n _$_tableName: \"@Sub_TableName_x@\",\n _$_pk: \"@sub_pk@\",\n _$_action: \"U\"}\n}"
|
||||
},
|
||||
"body": [
|
||||
@Detail_By_Edit@
|
||||
],
|
||||
"onEvent": {
|
||||
"submitSucc": {
|
||||
"actions": [
|
||||
{
|
||||
"actionType": "reload",
|
||||
"componentId": "detail_edit"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "button",
|
||||
"icon": "fa fa-times text-danger",
|
||||
"actionType": "ajax",
|
||||
"tooltip": "刪除",
|
||||
"confirmText": "確定要刪除本筆資料?",
|
||||
"api": {
|
||||
"method": "post",
|
||||
"url": "${ls:base_ip}/xapi/v3/${ls:base_db}/orm_api/2/",
|
||||
"dataType": "form",
|
||||
"requestAdaptor": "return {\n ...api,\n data: {\n ...api.data,\n token: local_get_token(),\n _$_tableName: \"@Sub_TableName_x@\",\n _$_pk: \"@sub_pk@\",\n _$_action: \"D\"}\n}"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"type": "crud",
|
||||
"tableClassName": "myGridHeader_a",
|
||||
"name": "dataList",
|
||||
"api": {
|
||||
"method": "post",
|
||||
"url": "${ls:base_ip}/xapi/v3/${ls:base_db}/orm_api/3/",
|
||||
"data": {
|
||||
"token": "${ls:token}",
|
||||
"page": "${page}",
|
||||
"perPage": "${perPage}",
|
||||
"keywords": "${keywords}",
|
||||
@aside_filter@
|
||||
@query_type_data@
|
||||
"_$_tableName": "@TableName@",
|
||||
"_$_pk": "@pk@",
|
||||
"_$_action": "P",
|
||||
"_$_query_filter": "1^10^@pk@^*^^@menuid@^@Filters@"
|
||||
},
|
||||
"dataType": "form",
|
||||
"//requestAdaptor": "return {\n ...api,\n data: {\n ...api.data,\n _$_tableName: \"@TableName@\",\n _$_pk: \"@pk@\",\n _$_action: \"P\",\n _$_query_filter: \"1^10^@pk@^*\"}\n}"
|
||||
},
|
||||
"syncLocation": false,
|
||||
"autoGenerateFilter": @is_query_header@,
|
||||
"perPage": 10,
|
||||
"headerToolbar": [
|
||||
@keyword_search@
|
||||
{
|
||||
"type": "export-excel",
|
||||
"label": "匯出 Excel",
|
||||
"api": {
|
||||
"method": "post",
|
||||
"url": "${ls:base_ip}/xapi/v3/${ls:base_db}/orm_api/2/",
|
||||
"data": {
|
||||
"token": "${ls:token}",
|
||||
"page": "${page}",
|
||||
"perPage": "10000",
|
||||
"keywords": "${keywords}",
|
||||
@aside_filter@
|
||||
@query_type_data@
|
||||
"_$_tableName": "@TableName@",
|
||||
"_$_pk": "@pk@",
|
||||
"_$_action": "P",
|
||||
"_$_query_filter": "1^10^@pk@^*^^@menuid@^@Filters@"
|
||||
},
|
||||
"dataType": "form"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "button",
|
||||
"level": "info",
|
||||
"tooltip": "查看 Source",
|
||||
"icon": "fas fa-bullseye",
|
||||
"actionType": "drawer",
|
||||
"drawer": {
|
||||
"size": "lg",
|
||||
"resizable": true,
|
||||
"body": {
|
||||
"type": "service",
|
||||
"schemaApi": "get:/pages/zen_codeviewer.json"
|
||||
},
|
||||
"actions": []
|
||||
}
|
||||
},
|
||||
@ext_button_U@
|
||||
{
|
||||
"type": "columns-toggler",
|
||||
"align": "right"
|
||||
},
|
||||
{
|
||||
"type": "drag-toggler",
|
||||
"align": "right"
|
||||
},
|
||||
{
|
||||
"type": "pagination",
|
||||
"align": "right"
|
||||
}
|
||||
],
|
||||
"footerToolbar": [
|
||||
"statistics",
|
||||
"switch-per-page",
|
||||
"pagination"
|
||||
],
|
||||
"columns": [
|
||||
@Fields_By_GridView@
|
||||
{
|
||||
"type": "operation",
|
||||
"label": "操作",
|
||||
"width": @op-width@,
|
||||
"buttons": [
|
||||
{
|
||||
"type": "button",
|
||||
"icon": "fa fa-eye",
|
||||
"actionType": "dialog",
|
||||
"dialog": {
|
||||
"title": "查看",
|
||||
"size": "full",
|
||||
"body": {
|
||||
"type": "form",
|
||||
"mode": "horizontal",
|
||||
"horizontal": {
|
||||
"leftFixed": true
|
||||
},
|
||||
@init_api_org@
|
||||
"body": [
|
||||
@Fields_By_View@,
|
||||
{
|
||||
"type": "panel",
|
||||
"title": "表身明細",
|
||||
"body": {
|
||||
"type": "crud",
|
||||
"tableClassName": "myGridHeader_a",
|
||||
"api": {
|
||||
"method": "post",
|
||||
"url": "${ls:base_ip}/xapi/v3/${ls:base_db}/orm_api/3/",
|
||||
"data": {
|
||||
"token": "${ls:token}",
|
||||
"page": "${page}",
|
||||
"perPage": "${perPage}",
|
||||
"keywords": "${keywords}",
|
||||
"_$_tableName": "@Sub_TableName@",
|
||||
"_$_pk": "@sub_pk@",
|
||||
"_id_": "${@pk@}",
|
||||
"_field_": "@pk@",
|
||||
"_$_action": "P",
|
||||
"_$_query_filter": "1^10^@pk@,@seqno@^@detail_fields@^^^@pk@"
|
||||
},
|
||||
"dataType": "form"
|
||||
},
|
||||
"syncLocation": false,
|
||||
"perPage": 10,
|
||||
"headerToolbar": [
|
||||
{
|
||||
"type": "columns-toggler",
|
||||
"align": "right"
|
||||
},
|
||||
{
|
||||
"type": "drag-toggler",
|
||||
"align": "right"
|
||||
},
|
||||
{
|
||||
"type": "pagination",
|
||||
"align": "right"
|
||||
}
|
||||
],
|
||||
"footerToolbar": [
|
||||
"statistics",
|
||||
"switch-per-page",
|
||||
"pagination"
|
||||
],
|
||||
"columns": [
|
||||
@Detail_By_View@
|
||||
],
|
||||
"affixRow": [
|
||||
[
|
||||
{
|
||||
"type": "text",
|
||||
"text": "數量合計",
|
||||
"colSpan": 2
|
||||
},
|
||||
{
|
||||
"type": "tpl",
|
||||
"tpl": "${rows|pick:quantity|sum}"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"type": "text",
|
||||
"text": "未稅合計",
|
||||
"colSpan": 2
|
||||
},
|
||||
{
|
||||
"type": "tpl",
|
||||
"tpl": "${rows|pick:subamount|sum}"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"type": "text",
|
||||
"text": "稅金",
|
||||
"colSpan": 2
|
||||
},
|
||||
{
|
||||
"type": "tpl",
|
||||
"tpl": "${rows|pick:subamount|sum}"
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "button",
|
||||
"icon": "fa fa-pencil",
|
||||
"actionType": "drawer",
|
||||
"disabledOn": "${ls:@menuid@@update == null@bpm_edit@",
|
||||
"drawer": {
|
||||
"position": "left",
|
||||
"resizable": true,
|
||||
"size": "xl",
|
||||
"actions": [{
|
||||
"label": "存檔",
|
||||
"actionType": "submit",
|
||||
"primary": true,
|
||||
"type": "button"
|
||||
},
|
||||
{
|
||||
"label": "取消",
|
||||
"actionType": "cancel",
|
||||
"type": "button"
|
||||
}
|
||||
],
|
||||
"title": "編輯",
|
||||
"body": {
|
||||
"type": "form",
|
||||
"mode": "horizontal",
|
||||
"horizontal": {
|
||||
"leftFixed": true
|
||||
},
|
||||
"name": "form_edit",
|
||||
"id": "form_edit",
|
||||
@init_api_org@
|
||||
"api": {
|
||||
"method": "post",
|
||||
"url": "${ls:base_ip}/xapi/v3/${ls:base_db}/orm_api/2/",
|
||||
"dataType": "form",
|
||||
"requestAdaptor": "return {\n ...api,\n data: {\n ...api.data,\n token: local_get_token(),\n _$_tableName: \"@TableName@\",\n _$_pk: \"@pk@\",\n _$_action: \"U\"}\n}"
|
||||
},
|
||||
"body": [
|
||||
@Fields_By_Edit@,
|
||||
{
|
||||
"type": "form",
|
||||
"title": "表身明細",
|
||||
"actions": [],
|
||||
"body": {
|
||||
"type": "crud",
|
||||
"id": "detail_edit",
|
||||
"tableClassName": "myGridHeader_a",
|
||||
"api": {
|
||||
"method": "post",
|
||||
"url": "${ls:base_ip}/xapi/v3/${ls:base_db}/orm_api/3/",
|
||||
"data": {
|
||||
"token": "${ls:token}",
|
||||
"page": "${page}",
|
||||
"perPage": "${perPage}",
|
||||
"keywords": "${keywords}",
|
||||
"_$_tableName": "@Sub_TableName@",
|
||||
"_$_pk": "@sub_pk@",
|
||||
"_id_": "${@pk@}",
|
||||
"_field_": "@pk@",
|
||||
"_$_action": "P",
|
||||
"_$_query_filter": "1^10^@pk@,@seqno@^@detail_fields@^^^@pk@"
|
||||
},
|
||||
"dataType": "form"
|
||||
},
|
||||
"syncLocation": false,
|
||||
"perPage": 10,
|
||||
"headerToolbar": [
|
||||
{
|
||||
"type": "button",
|
||||
"label": "新增表身",
|
||||
"level": "primary",
|
||||
"actionType": "drawer",
|
||||
"drawer": {
|
||||
"title": "新增表身",
|
||||
"position": "right",
|
||||
"size": "lg",
|
||||
"resizable": true,
|
||||
"body": {
|
||||
"type": "form",
|
||||
"name": "form_detail_insert",
|
||||
"api": {
|
||||
"method": "post",
|
||||
"url": "${ls:base_ip}/xapi/v3/${ls:base_db}/orm_api/2/",
|
||||
"dataType": "form",
|
||||
"requestAdaptor": "return {\n ...api,\n data: {\n ...api.data,\n token: local_get_token(),\n _$_tableName: \"@Sub_TableName@\",\n _$_pk: \"@sub_pk@\",\n _$_action: \"C\"}\n}"
|
||||
},
|
||||
"body": [
|
||||
@Detail_By_Edit_Insert@
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "columns-toggler",
|
||||
"align": "right"
|
||||
},
|
||||
{
|
||||
"type": "drag-toggler",
|
||||
"align": "right"
|
||||
},
|
||||
{
|
||||
"type": "pagination",
|
||||
"align": "right"
|
||||
}
|
||||
],
|
||||
"footerToolbar": [
|
||||
"statistics",
|
||||
"switch-per-page",
|
||||
"pagination"
|
||||
],
|
||||
"columns": [
|
||||
@Detail_By_View@,
|
||||
{
|
||||
"type": "operation",
|
||||
"label": "操作",
|
||||
"width": 100,
|
||||
"buttons": [
|
||||
{
|
||||
"type": "button",
|
||||
"icon": "fa fa-pencil",
|
||||
"tooltip": "編輯",
|
||||
"actionType": "drawer",
|
||||
"drawer": {
|
||||
"position": "left",
|
||||
"resizable": true,
|
||||
"size": "lg",
|
||||
"actions": [{
|
||||
"label": "存檔",
|
||||
"actionType": "submit",
|
||||
"primary": true,
|
||||
"type": "button"
|
||||
},
|
||||
{
|
||||
"label": "取消",
|
||||
"actionType": "cancel",
|
||||
"type": "button"
|
||||
}
|
||||
],
|
||||
"title": "編輯",
|
||||
"body": {
|
||||
"type": "form",
|
||||
"mode": "horizontal",
|
||||
"horizontal": {
|
||||
"leftFixed": true
|
||||
},
|
||||
"name": "form_detail_edit",
|
||||
@init_api_org@
|
||||
"api": {
|
||||
"method": "post",
|
||||
"url": "${ls:base_ip}/xapi/v3/${ls:base_db}/orm_api/3/",
|
||||
"dataType": "form",
|
||||
"requestAdaptor": "return {\n ...api,\n data: {\n ...api.data,\n token: local_get_token(),\n _$_tableName: \"@Sub_TableName@\",\n _$_pk: \"@sub_pk@\",\n _$_action: \"U\"}\n}"
|
||||
},
|
||||
"body": [
|
||||
@Detail_By_Edit@
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "button",
|
||||
"icon": "fa fa-times text-danger",
|
||||
"actionType": "ajax",
|
||||
"tooltip": "刪除",
|
||||
"confirmText": "確定要刪除本筆資料?",
|
||||
"api": {
|
||||
"method": "post",
|
||||
"url": "${ls:base_ip}/xapi/v3/${ls:base_db}/orm_api/2/",
|
||||
"dataType": "form",
|
||||
"requestAdaptor": "return {\n ...api,\n data: {\n ...api.data,\n token: local_get_token(),\n _$_tableName: \"@Sub_TableName@\",\n _$_pk: \"@sub_pk@\",\n _$_action: \"D\"}\n}"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
@ext_button_I@
|
||||
{
|
||||
"type": "button",
|
||||
"icon": "fa fa-times text-danger",
|
||||
"actionType": "ajax",
|
||||
"disabledOn": "${ls:@menuid@@delete == null@bpm_edit@",
|
||||
"tooltip": "刪除",
|
||||
"confirmText": "確定要刪除本筆資料?",
|
||||
"api": {
|
||||
"method": "post",
|
||||
"url": "${ls:base_ip}/xapi/v3/${ls:base_db}/orm_api/2/",
|
||||
"dataType": "form",
|
||||
"requestAdaptor": "return {\n ...api,\n data: {\n ...api.data,\n token: local_get_token(),\n _$_tableName: \"@TableName@\",\n _$_pk: \"@pk@\",\n _$_action: \"D\"}\n}"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user