{
  "type": "page",
  "title": "單據明細查詢",
  "body": [
    {
      "type": "form",
      "initApi": {
        "method": "post",
        "url": "${ls:base_ip}/xapi/v2/${ls:base_db}/orm_api/20/",
        "data": {
          "token": "${ls:token}",
          "_$_tableName": "@TableName@",
          "_$_pk": "@pk@",
		  "_id_": "${@pk@}",
          "_field_": "@pk@",
          "_$_action": "P",
          "_$_query_filter": "1^10^@pk@^*^^"
        },
        "dataType": "form"
      },
	  "actions": [],
      "title": "@functionName@明細查詢",
      "mode": "horizontal",
      "body": [
        @Fields_By_View@,
        {
          "type": "panel",
          "title": "表身明細",
          "body": {
            "type": "crud",
			"tableClassName": "myGridHeader_a",
            "api": {
              "method": "post",
              "url": "${ls:base_ip}/xapi/v2/${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@^^"
              },
              "dataType": "form"
            },
            "syncLocation": false,
            "perPage": 10,
            "headerToolbar": [
              {
                "type": "search-box",
                "name": "keywords",
                "align": "left",
                "placeholder": "全文檢索"
              },
              {
                "type": "columns-toggler",
                "align": "right"
              },
              {
                "type": "drag-toggler",
                "align": "right"
              },
              {
                "type": "pagination",
                "align": "right"
              }
            ],
            "footerToolbar": [
              "statistics",
              "switch-per-page",
              "pagination"
            ],
            "columns": [
			  @Detail_By_View@
            ]
          }
        }
      ]
    }
  ]
}