{
  "version": 6,
  "form": [
    {
      "page": {
        "id": "id${newId()}",
        "type": "fx-page",
        "props": {
          "title": "编辑",
          "key": "${newId()}",
          "tipsExpand": false
        }
      },
      "graph": {
        "shape": "panel",
        "id": "root_panel",
        "type": "fx-split-panel",
        "props": {
          "horizontal": false,
          "shadow": "",
          "scroll": false,
          "size": "",
          "name": "s0"
        },
        "children": [
          {
            "id": "${newId()}",
            "type": "fx-split-panel",
            "shape": "panel",
            "props": {
              "size": "56",
              "horizontal": true,
              "scroll": false,
              "name": "s11"
            },
            "children": [
              {
                "id": "${newId()}",
                "type": "fx-form-panel",
                "shape": "panel",
                "props": {
                  "alignY": "center",
                  "size": "200",
                  "paddingLeft": 16
                },
                "children": [
                  {
                    "id": "${newId()}",
                    "type": "fx-title",
                    "props": {
                      "label": "${title}",
                      "showPrefix": true
                    }
                  }
                ]
              },
{
"id": "${newId()}",
"type": "fx-form-panel",
"shape": "panel",
"props": {},
"children": []
},
              {
              "id": "${newId()}",
              "type": "fx-form-panel",
              "shape": "panel",
              "props": {
                "alignY": "center",
                "size": "75"
              },
              "children": [
                {
                  "id": "${newId()}",
                  "type": "fx-title",
                  "props": {
                    "label": "单据状态:",
                    "fontWeight": "bold",
                    "color": "#F56C6C",
                    "showPrefix": false
                  }
                }
              ]
              },
              {
              "id": "${newId()}",
              "type": "fx-form-panel",
              "shape": "panel",
              "props": {
                "alignY": "center",
                "size": "200",
                "colNum": 1
              },
              "children": [
              {
                "id": "${newId()}",
                "type": "fx-select",
                "props": {
                  "name":"flowTaskRef",
                  "label": "当前任务",
                  "clearable": true,
                  "labelWidth": 100,
                  "affixError": false,
                  "size": "default",
                  "hideLabel": true,
                  "dataset": "flow",
                  "field": "selTaskId"
                },
                "events": {
                   "on-change": "onTaskChange"
                },
                "vars": {
                  "$ref": "$ref"
                 }
                }
              ]
              }
            ]
          },
          {
            "id": "${newId()}",
            "type": "fx-split-panel",
            "shape": "panel",
            "props": {
              "size": "",
              "horizontal": true,
              "scroll": true
            },
            "children": [
              {
                "id": "${newId()}",
                "type": "fx-split-panel",
                "shape": "panel",
                "props": {
                  "size": "",
                  "horizontal": false,
                  "scroll": true,
                  "name": "s12"
                },
                "children": [
                  <#list layout.card as group>
                  <#assign field = group.fields>
                  {
                    "id": "${newId()}",
                    "type": "fx-form-panel",
                    "shape": "panel",
                    "props": {
                      "size": "16",
                      "backgroundColor": "--color-transparent"
                    },
                    "children": []
                  },
                  {
                    "id": "${newId()}",
                    "type": "fx-form-panel",
                    "shape": "panel",
                    "props": {
                      "size": "0",
                      <#if param.col lte 1>
                      "gridTemplateColumns": "1fr 2fr",
                      <#elseif param.col gte 2>
                      "gridTemplateColumns": "1fr 1fr 1fr",
                      </#if>
                      "paddingTop": 32
                    },
                    "children": [
                      <#list group.fields as fields>
                      <#--                  <#list num..(group.fields?size?number)!0 as i>-->
                      {
                        "id": "id${newId()}",
                        <#if (fields.readonly = true)>
                        "type": "fx-text",
                        <#else>
                        "type": "${fields.editor}",
                        </#if>
                        "props": {
                          "label": "${fields.label}",
                          "dataset": "${fields.dataset}",
                          "required": "${fields.required}",
                          "field": "${fields.id}",
                          <#if fields.maxlength gt 0>
                          "maxlength": ${fields.maxlength},
                      </#if>
                      <#if fields.lookup??>
                      "lookup": {
                        <#list fields.lookup as k, v>
                          <#if v?is_enumerable>
                            "${k}": [
                            <#list v as v1>
                              {
                              <#list v1 as vk1, vv1>
                                "${vk1}": "${vv1}"<#if vk1_has_next>,</#if>
                              </#list>
                              }
                              <#if v1_has_next>,</#if>
                            </#list>
                            ]
                          <#else>
                            "${k}": "${v}"
                          </#if>
                          <#if k_has_next>,</#if>
                        </#list>
                      },
                      </#if>
                      "placeholder": "请输入内容",
                      <#if (param.col = 2)>
                      "tips": "${fields.desc}",
                      </#if>
                      "labelWidth": 100,
                      <#if (fields.readonly = true)>
                      "readonly": true,
                      <#else>
                      "readonly": false,
                      </#if>
                      "affixError": true
                      },
                      "events": {}
                      }
                      <#if fields_has_next>
                      <#if (param.col lte 1 )>
                      <#if (fields.desc != "")>
                    ,{
                        "id": "id181d83cdb41",
                        "type": "fx-label",
                        "props": {
                          "label": "${fields.desc}",
                          "labelWidth": 0,
                          "affixError": true,
                          "labelAlign": "left"
                        }
                      }
                      <#else>
                    ,{
                        "id": "id${newId()}",
                        "type": "fx-placeholder",
                        "props": {
                          "label": "占位"
                        },
                        "layout": {
                          "row": 1
                        }
                      }
                      </#if>
                      </#if>
                      <#if (param.col = 2 && ((fields_index+1) % 2 = 0 ) )>
                    ,{
                        "id": "id${newId()}",
                        "type": "fx-placeholder",
                        "props": {
                          "label": "占位"
                        },
                        "layout": {
                          "row": 1
                        }
                      }
                      </#if>
                    ,
                      </#if>
                      </#list>
                    ]

                  },
                  </#list>
                  <#list layout.flow as group>
                  <#assign field = group.fields>
                  {
                    "id": "${newId()}",
                    "type": "fx-form-panel",
                    "shape": "panel",
                    "props": {
                      "size": "16",
                      "backgroundColor": "--color-transparent"
                    },
                    "children": []
                  },
                  {

                    "id": "${newId()}",
                    "type": "fx-form-panel",
                    "shape": "panel",
                    "props": {
                      "size": "0",
                      <#if param.col lte 1>
                      "gridTemplateColumns": "1fr 2fr",
                      <#elseif param.col gte 2>
                      "gridTemplateColumns": "1fr 1fr 1fr",
                      </#if>
                      "paddingTop": 32
                    },
                    "children": [
                      <#list group.fields as fields>
                      {
                        "id": "id${newId()}",
                        <#if (fields.readonly = true)>
                        "type": "fx-text",
                        <#else>
                        "type": "${fields.editor}",
                        </#if>
                        "props": {
                          "label": "${fields.label}",
                          "dataset": "${fields.dataset}",
                          "required": "${fields.required}",
                          "field": "${fields.id}",
                          <#if fields.maxlength gt 0>
                          "maxlength": ${fields.maxlength},
                      </#if>
                      <#if fields.lookup??>
                      "lookup": {
                        <#list fields.lookup as k, v>
                          <#if v?is_enumerable>
                            "${k}": [
                            <#list v as v1>
                              {
                              <#list v1 as vk1, vv1>
                                "${vk1}": "${vv1}"<#if vk1_has_next>,</#if>
                              </#list>
                              }
                              <#if v1_has_next>,</#if>
                            </#list>
                            ]
                          <#else>
                            "${k}": "${v}"
                          </#if>
                          <#if k_has_next>,</#if>
                        </#list>
                      },
                      </#if>
                      "placeholder": "请输入内容",
                      <#if (param.col = 2)>
                      "tips": "${fields.desc}",
                      </#if>
                      "labelWidth": 100,
                      <#if (fields.readonly = true)>
                      "readonly": true,
                      <#else>
                      "readonly": false,
                      </#if>
                      "affixError": true
                      },
                      "events": {}
                      }
                      <#if fields_has_next>
                      <#if (param.col lte 1 )>
                      <#if (fields.desc != "")>
                    ,{
                        "id": "id181d83cdb41",
                        "type": "fx-label",
                        "props": {
                          "label": "${fields.desc}",
                          "labelWidth": 0,
                          "affixError": true,
                          "labelAlign": "left"
                        }
                      }
                      <#else>
                    ,{
                        "id": "id${newId()}",
                        "type": "fx-placeholder",
                        "props": {
                          "label": "占位"
                        },
                        "layout": {
                          "row": 1
                        }
                      }
                      </#if>
                      </#if>
                      <#if (param.col = 2 && ((fields_index+1) % 2 = 0 ) )>
                    ,{
                        "id": "id${newId()}",
                        "type": "fx-placeholder",
                        "props": {
                          "label": "占位"
                        },
                        "layout": {
                          "row": 1
                        }
                      }
                      </#if>
                    ,
                      </#if>
                      </#list>
                    ]

                  }
                  </#list>
                ,{
                    "id": "${newId()}",
                    "type": "fx-form-panel",
                    "shape": "panel",
                    "props": {},
                    "children": []
                  }
                ]
              },
              {
                "id": "${newId()}",
                "type": "fx-split-panel",
                "shape": "panel",
                "props": {
                  "horizontal": false,
                  "size": "250"
                },
                "children": [
                  {
                    "id": "${newId()}",
                    "type": "fx-form-panel",
                    "shape": "panel",
                    "props": {
                      "size": "16",
                      "backgroundColor": "--color-transparent"
                    },
                    "children": []
                  },
                  {
                    "id": "${newId()}",
                    "type": "fx-split-panel",
                    "shape": "panel",
                    "props": {
                      "horizontal": true
                    },
                    "children": [
                      {
                        "id": "${newId()}",
                        "type": "fx-form-panel",
                        "shape": "panel",
                        "props": {
                          "size": "16",
                          "backgroundColor": "--color-transparent"
                        },
                        "children": []
                      },
                      {
                        "id": "${newId()}",
                        "type": "fx-split-panel",
                        "shape": "panel",
                        "props": {
                          "size": "",
                          "horizontal": false
                        },
                        "children": [
                          {
                            "id": "${newId()}",
                            "type": "fx-form-panel",
                            "shape": "panel",
                            "props": {
                              "alignX": "center",
                              "alignY": "center",
                              "paddingTop": 36,
                              "paddingBottom": 36,
                              "size": "",
                              "scroll": false
                            },
                            "children": [
                              {
                                "id": "${newId()}",
                                "type": "fx-steps",
                                "w": 3,
                                "h": 2,
                                "props": {
                                  "active": 1,
                                  "direction": "vertical"
                                },
                                "slots": {
                                  "default": [
                                    {
                                      "type": "fx-step",
                                      "props": {
                                        "label": "步骤一",
                                        "description": "我是一段描述"
                                      },
                                      "id": "${newId()}"
                                    },
                                    {
                                      "type": "fx-step",
                                      "props": {
                                        "label": "步骤二",
                                        "description": "我也是一段描述"
                                      },
                                      "id": "${newId()}"
                                    },
                                    {
                                      "type": "fx-step",
                                      "props": {
                                        "label": "步骤三",
                                        "description": "我也也是一段描述"
                                      },
                                      "id": "${newId()}"
                                    }
                                  ]
                                },
                                "events": {}
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          },

          {
            "id": "${newId()}",
            "type": "fx-form-panel",
            "shape": "panel",
            "props": {
              "size": "16",
              "backgroundColor": "--color-transparent"
            },
            "children": []
          },
          {
            "id": "${newId()}",
            "type": "fx-form-panel",
            "shape": "panel",
            "props": {
              "size": "56",
              "alignY": "center",
              "alignX": "center"
            },
            "children": [
              {
                "id": "${newId()}",
                "type": "fx-button-group",
                "props": {
                  "menus": []
                },
                "slots": {
                  "default": [
{
"id": "${newId()}",
"type": "fx-button",
"props": {
"name": "button:new",
"label": "新增",
"type": "primary",
"action": "button:addCard"
},
"vars": {
"$ref": "$ref"
}
},
                    {
                      "type": "fx-button",
                      "props": {
                        "name": "button:save-and-new",
                        "label": "保存并新增",
                        "type": "primary",
                        "action": "button:saveAddCard",
                        "linkType": "curr"
                      },
                      "id": "${newId()}",
                      "vars": {
                        "$ref": "$ref"
                      }
                    },
                    {
                      "type": "fx-button",
                      "props": {
                        "name": "button:save",
                        "label": "保存",
                        "type": "success",
                        "action": "button:saveCard"
                      },
                      "id": "${newId()}",
                      "vars": {
                        "$ref": "$ref"
                      }
                    },
                    {
                      "type": "fx-button",
                      "props": {
                        "name": "button:submit",
                        "label": "提交",
                        "type": "primary",
                        "action": "button:submit"
                      },
                      "id": "${newId()}",
                      "vars": {
                        "$ref": "$ref"
                      }
                    },
                    {
                      "type": "fx-button",
                      "props": {
                        "name": "button:retake",
                        "label": "取回",
                        "action": "button:retake"
                      },
                      "id": "${newId()}",
                      "vars": {
                        "$ref": "$ref"
                      }
                    },
                    {
                      "type": "fx-button",
                      "props": {
                        "name": "button:reject",
                        "label": "驳回",
                        "type": "warning",
                        "action": "button:reject"
                      },
                      "id": "${newId()}",
                      "vars": {
                        "$ref": "$ref"
                      }
                    },
                    {
                      "type": "fx-button",
                      "props": {
                        "name": "button:disuse",
                        "label": "作废",
                        "type": "danger",
                        "action": "button:disuse"
                      },
                      "id": "${newId()}",
                      "vars": {
                        "$ref": "$ref"
                      }
                    },
                    {
                      "type": "fx-button",
                      "props": {
                        "name": "button:interrupt",
                        "label": "终止",
                        "type": "danger",
                        "action": "button:interrupt"
                      },
                      "id": "${newId()}",
                      "vars": {
                        "$ref": "$ref"
                      }
                    },
{
"type": "fx-button",
"props": {
"name": "button:delete",
"label": "删除",
"type": "danger",
"action": "button:delCard"
},
"id": "${newId()}",
"vars": {
"$ref": "$ref"
}
},
{
"id": "${newId()}",
"type": "fx-button",
"props": {
"name": "button:return",
"label": "返回",
"size": "default",
"action": "button:backList"
},
"events": {},
"vars": {
"$ref": "$ref"
}
}



                  ]
                }
              }
            ]
          },
          {
            "id": "${newId()}",
            "type": "fx-form-panel",
            "shape": "panel",
            "props": {
              "size": "16",
              "backgroundColor": "--color-transparent"
            },
            "children": []
          }
        ]
      }
    },
    {
      "page": {
        "id": "${newId()}",
        "type": "fx-dialog",
        "props": {
          "title": "审批意见",
          "key": "dlgOpt",
          "width": "450px",
          "height": "260px",
          "showPrefix": true
        },
        "events": {}
      },
      "graph": {
        "shape": "panel",
        "id": "${newId()}",
        "type": "fx-split-panel",
        "props": {
          "horizontal": false,
          "shadow": "never"
        },
        "children": [
          {
            "id": "${newId()}",
            "type": "fx-split-panel",
            "shape": "panel",
            "props": {
              "horizontal": false
            },
            "children": [
              {
                "shape": "panel",
                "id": "${newId()}",
                "type": "fx-form-panel",
                "props": {
                  "name": "dlgOptForm",
                  "colNum": 1,
                  "paddingTop": 24,
                  "size": "0"
                },
                "children": [
                  {
                    "id": "${newId()}",
                    "type": "fx-select",
                    "props": {
                      "name":"flowSelCommentRef",
                      "label": "备选意见",
                      "clearable": true,
                      "labelWidth": 100,
                      "affixError": true,
                      "dataset": "dlgOpt",
                      "field": "selComment",
                      "size": "default"
                    },
                    "events": {
                        "on-change": "onSelCommentChange"
                    },
                    "vars": {
                        "$ref": "$ref"
                    }
                  },
                  {
                    "id": "${newId()}",
                    "type": "fx-textarea",
                    "props": {
                      "label": "处理意见",
                      "maxlength": 200,
                      "placeholder": "请输入内容",
                      "labelWidth": 100,
                      "affixError": true,
                      "size": "default",
                      "dataset": "dlgOpt",
                      "field": "comment",
                      "rows": 4
                    },
                    "events": {}
                  }
                ]
              },
              {
                "id": "${newId()}",
                "type": "fx-form-panel",
                "shape": "panel",
                "props": {},
                "children": []
              }
            ]
          },
          {
            "id": "${newId()}",
            "type": "fx-form-panel",
            "shape": "panel",
            "props": {
              "size": "0"
            },
            "children": [
              {
                "id": "${newId()}",
                "type": "fx-divider",
                "props": {
                  "label": "",
                  "contentPosition": "center",
                  "direction": "horizontal"
                }
              }
            ]
          },
          {
            "id": "182f81da2e4",
            "type": "fx-form-panel",
            "shape": "panel",
            "props": {
              "size": "50",
              "alignX": "end",
              "alignY": "center",
              "paddingRight": 10
            },
            "children": [
              {
                "id": "${newId()}",
                "type": "fx-button-group",
                "props": {
                  "showDropdown": false
                },
                "slots": {
                  "default": [
                    {
                      "type": "fx-button",
                      "props": {
                        "label": "确认",
                        "leftIcon": "correct",
                        "type": "primary",
                        "action": "button:dlgDynConfirm",
                        "linkType": ""
                      },
                      "id": "${newId()}",
                      "events": {}
                    },
                    {
                      "type": "fx-button",
                      "props": {
                        "label": "取消",
                        "leftIcon": "error",
                        "action": "button:closeDialog"
                      },
                      "id": "${newId()}",
                      "events": {}
                    }
                  ],
                  "dropdown": []
                }
              }
            ]
          }
        ]
      }
    },
    {
  "page": {
  "id": "${newId()}",
      "type": "fx-dialog",
      "props": {
    "title": "驳回",
        "key": "dlgReject",
        "width": "450px",
        "height": "300px",
        "showPrefix": true
  },
  "events": {}
},
  "graph": {
  "shape": "panel",
      "id": "${newId()}",
      "type": "fx-split-panel",
      "props": {
    "horizontal": false,
        "shadow": "never"
  },
  "children": [
    {
      "id": "${newId()}",
      "type": "fx-split-panel",
      "shape": "panel",
      "props": {
        "horizontal": false
      },
      "children": [
        {
          "shape": "panel",
          "id": "${newId()}",
          "type": "fx-form-panel",
          "props": {
            "name": "dlgOptForm",
            "colNum": 1,
            "paddingTop": 24,
            "size": "0"
          },
          "children": [
{
"id": "${newId()}",
"type": "fx-select",
"props": {
"name":"flowToTaskRef",
"label": "驳回到",
"clearable": true,
"labelWidth": 100,
"affixError": true,
"size": "default",
"multiple": true,
"dataset": "dlgOpt",
"field": "toTaskId"
},
"events": {},
"vars": {
"$ref": "$ref"
}
},
            {
              "id": "${newId()}",
              "type": "fx-select",
              "props": {
                "name":"flowSelCommentRef",
                "label": "备选意见",
                "clearable": true,
                "labelWidth": 100,
                "affixError": true,
                "dataset": "dlgOpt",
                "field": "selComment",
                "size": "default"
              },
                "events": {
                     "on-change": "onSelCommentChange"
                },
                "vars": {
                     "$ref": "$ref"
                }
            },
            {
              "id": "${newId()}",
              "type": "fx-textarea",
              "props": {
                "label": "处理意见",
                "maxlength": 200,
                "placeholder": "请输入内容",
                "labelWidth": 100,
                "affixError": true,
                "size": "default",
                "dataset": "dlgOpt",
                "field": "comment",
                "rows": 4
              },
              "events": {}
            }

          ]
        },
        {
          "id": "${newId()}",
          "type": "fx-form-panel",
          "shape": "panel",
          "props": {},
          "children": []
        }
      ]
    },
    {
      "id": "${newId()}",
      "type": "fx-form-panel",
      "shape": "panel",
      "props": {
        "size": "0"
      },
      "children": [
        {
          "id": "${newId()}",
          "type": "fx-divider",
          "props": {
            "label": "",
            "contentPosition": "center",
            "direction": "horizontal"
          }
        }
      ]
    },
    {
      "id": "${newId()}",
      "type": "fx-form-panel",
      "shape": "panel",
      "props": {
        "size": "50",
        "alignX": "end",
        "alignY": "center",
        "paddingRight": 10
      },
      "children": [
        {
          "id": "${newId()}",
          "type": "fx-button-group",
          "props": {
            "showDropdown": false
          },
          "slots": {
            "default": [
              {
                "type": "fx-button",
                "props": {
                  "label": "确认",
                  "leftIcon": "correct",
                  "type": "primary",
                  "action": "button:dlgDynConfirm",
                  "linkType": ""
                },
                "id": "${newId()}",
                "events": {}
              },
              {
                "type": "fx-button",
                "props": {
                  "label": "取消",
                  "leftIcon": "error",
                  "action": "button:closeDialog"
                },
                "id": "${newId()}",
                "events": {}
              }
            ],
            "dropdown": []
          }
        }
      ]
    }
  ]
}
}
  ],
  "model": [
    <#list datasets as dataset>
    <#include "incModel/inc_model.ftl"/><#if dataset_has_next>,</#if>
    </#list>
  ],
  "option": {
    "widgetRef": [${widgetRef}],
    "vars": []
  }
}
