{
  "id": "scene-reconciliation",
  "version": "2024-12-24",
  "name": "两表对账：流水和台账对得上吗",
  "category": "场景模板",
  "description": "一张系统台账、一张银行流水，按单号自动对上。银行到账、差额、核对结果三列是公式算的：未到账、金额不符、一致三种情况一次分出来，不用再逐行看。下个月把新的流水导进来，结果自己更新。",
  "locale": "zh_CN",
  "imageSrc": "",
  "vipOnly": false,
  "author": "TableDI",
  "tags": {
    "functions": []
  },
  "resourceCount": {
    "Sheet": 2,
    "Component": 3,
    "Dashboard": 1
  },
  "installations": 0,
  "resources": {
    "sheet1": {
      "key": "sheet1",
      "type": "Sheet",
      "name": "银行流水",
      "content": {
        "sheet": {
          "name": "银行流水",
          "uniqueIndex": {
            "uniqueHeaders": []
          },
          "headers": [
            {
              "title": "#",
              "meta": {
                "AUTO_SCALE": 3,
                "thousandPoint": false,
                "type": "Number",
                "decimal": 0
              }
            },
            {
              "title": "到账日期",
              "meta": {
                "type": "Text"
              }
            },
            {
              "title": "摘要",
              "meta": {
                "type": "Text"
              }
            },
            {
              "title": "单号",
              "meta": {
                "type": "Text"
              }
            },
            {
              "title": "到账金额",
              "meta": {
                "type": "Number",
                "decimal": 2,
                "unit": "none",
                "thousandPoint": true
              }
            }
          ]
        },
        "entries": {
          "csv": "到账日期,摘要,单号,到账金额\n2026-09-02,网银转账,SO-20260901,12400.00\n2026-09-03,网银转账,SO-20260902,3180.00\n2026-09-04,网银转账,SO-20260903,9600.00\n2026-09-06,微信收款,SO-20260905,620.00\n2026-09-09,网银转账,SO-20260908,3180.00\n2026-09-10,网银转账,SO-20260909,1240.00\n2026-09-12,网银转账,SO-20260911,2650.00\n2026-09-16,网银转账,SO-20260915,3180.00\n2026-09-18,微信收款,SO-20260917,196.40\n2026-09-22,网银转账,SO-20260921,1800.00\n2026-09-24,网银转账,SO-20260923,412.00\n2026-09-25,网银转账,SO-20260924,600.00\n2026-09-26,支付宝收款,SO-20260925,96.40\n2026-09-29,网银转账,SO-20260928,9600.00\n2026-09-29,网银转账,SO-20260930,880.00"
        }
      }
    },
    "sheet2": {
      "key": "sheet2",
      "type": "Sheet",
      "name": "系统台账",
      "content": {
        "sheet": {
          "name": "系统台账",
          "uniqueIndex": {
            "uniqueHeaders": []
          },
          "headers": [
            {
              "title": "#",
              "meta": {
                "AUTO_SCALE": 3,
                "thousandPoint": false,
                "type": "Number",
                "decimal": 0
              }
            },
            {
              "title": "单号",
              "meta": {
                "type": "Text"
              }
            },
            {
              "title": "日期",
              "meta": {
                "type": "Text"
              }
            },
            {
              "title": "客户",
              "meta": {
                "type": "Text"
              }
            },
            {
              "title": "应收金额",
              "meta": {
                "type": "Number",
                "decimal": 2,
                "unit": "none",
                "thousandPoint": true
              }
            },
            {
              "title": "银行到账",
              "formula": "SUMIF({{$sheet1.headers[4].code}}, {{$sheet2.headers[1].code}} = {{$sheet1.headers[3].code}})",
              "meta": {
                "type": "Number",
                "decimal": 2,
                "unit": "none",
                "thousandPoint": true
              }
            },
            {
              "title": "差额",
              "formula": "{{$sheet2.headers[4].code}} - {{$sheet2.headers[5].code}}",
              "meta": {
                "type": "Number",
                "decimal": 2,
                "unit": "none",
                "thousandPoint": true
              }
            },
            {
              "title": "核对结果",
              "formula": "IF({{$sheet2.headers[5].code}} = 0, \"未到账\", IF({{$sheet2.headers[6].code}} = 0, \"一致\", \"金额不符\"))",
              "meta": {
                "type": "Text"
              }
            }
          ]
        },
        "entries": {
          "csv": "单号,日期,客户,应收金额\nSO-20260901,2026-09-01,明创办公,12400.00\nSO-20260902,2026-09-02,启程云计算,3180.00\nSO-20260903,2026-09-03,恒律法务,9600.00\nSO-20260905,2026-09-05,子午餐厅,620.00\nSO-20260908,2026-09-08,回路营销,3180.00\nSO-20260909,2026-09-09,明创办公,1240.00\nSO-20260911,2026-09-11,启程云计算,2650.00\nSO-20260914,2026-09-14,张岚工作室,745.20\nSO-20260915,2026-09-15,恒律法务,3180.00\nSO-20260917,2026-09-17,子午餐厅,196.40\nSO-20260921,2026-09-21,回路营销,1980.00\nSO-20260923,2026-09-23,明创办公,412.00\nSO-20260924,2026-09-24,启程云计算,600.00\nSO-20260925,2026-09-25,张岚工作室,96.40\nSO-20260928,2026-09-28,恒律法务,9600.00"
        }
      }
    },
    "component1": {
      "key": "component1",
      "type": "Component",
      "name": "核对结果分布",
      "content": {
        "@t": "next.component.pivot.table",
        "sheetId": "{{$sheet2.id}}",
        "type": "Pivot",
        "title": "核对结果分布",
        "config": {
          "@t": "next.component.pivot.config",
          "pivotDataOption": {
            "@t": "next.component.pivot.config.data.option",
            "filters": {
              "@t": "core.or.filter",
              "filters": [],
              "type": "OR"
            },
            "simpleFilters": [],
            "orders": [],
            "rows": [],
            "columns": [
              {
                "@t": "next.component.pivot.config.textHeader.item",
                "headerId": "{{$sheet2.headers[7].id}}",
                "dataItemType": "TextHeader",
                "label": "核对结果",
                "showTotal": false,
                "meta": {
                  "@t": "next.component.pivot.table.meta.text",
                  "type": "Text"
                }
              }
            ],
            "values": [
              {
                "@t": "next.component.pivot.config.formula.item",
                "headerId": "{{$sheet2.headers[4].id}}",
                "calcType": "Sum",
                "formula": "",
                "dataItemType": "FormulaHeader",
                "label": "应收金额",
                "showTotal": false,
                "meta": {
                  "@t": "next.component.pivot.table.meta.number",
                  "type": "Number",
                  "decimal": 2,
                  "unit": "none",
                  "thousandPoint": true
                }
              }
            ],
            "aggregated": true
          },
          "displayType": "ChartPie",
          "configType": "Pivot"
        },
        "css": {
          "@t": "next.component.pivot.css",
          "titleSize": 15,
          "dataLabel": {
            "@t": "next.component.mixmap.css.datalable",
            "showRule": "AllShow",
            "fontSize": 12,
            "placement": "outSideTop",
            "intervalNumber": 0
          },
          "legendSize": 12,
          "axisLabel": {
            "@t": "next.component.pivot.css.axis",
            "fontSize": 12,
            "interval": 0,
            "rotate": 0
          },
          "horizontalDisplay": false,
          "chartPieDisplay": "Ring",
          "cssType": "Pivot",
          "background": {
            "@t": "next.component.css.background",
            "color": "#ffffff",
            "opacity": 1
          },
          "border": {
            "@t": "next.component.css.border",
            "opacity": 0,
            "color": "#CAD0D5"
          },
          "showTitle": true
        },
        "actions": []
      }
    },
    "component2": {
      "key": "component2",
      "type": "Component",
      "name": "按客户看差额",
      "content": {
        "@t": "next.component.pivot.table",
        "sheetId": "{{$sheet2.id}}",
        "type": "Pivot",
        "title": "按客户看差额",
        "config": {
          "@t": "next.component.pivot.config",
          "pivotDataOption": {
            "@t": "next.component.pivot.config.data.option",
            "filters": {
              "@t": "core.or.filter",
              "filters": [],
              "type": "OR"
            },
            "simpleFilters": [],
            "orders": [],
            "rows": [],
            "columns": [
              {
                "@t": "next.component.pivot.config.textHeader.item",
                "headerId": "{{$sheet2.headers[3].id}}",
                "dataItemType": "TextHeader",
                "label": "客户",
                "showTotal": false,
                "meta": {
                  "@t": "next.component.pivot.table.meta.text",
                  "type": "Text"
                }
              }
            ],
            "values": [
              {
                "@t": "next.component.pivot.config.formula.item",
                "headerId": "{{$sheet2.headers[6].id}}",
                "calcType": "Sum",
                "formula": "",
                "dataItemType": "FormulaHeader",
                "label": "差额",
                "showTotal": false,
                "meta": {
                  "@t": "next.component.pivot.table.meta.number",
                  "type": "Number",
                  "decimal": 2,
                  "unit": "none",
                  "thousandPoint": true
                }
              }
            ],
            "aggregated": true
          },
          "displayType": "ChartColumnar",
          "configType": "Pivot"
        },
        "css": {
          "@t": "next.component.pivot.css",
          "titleSize": 15,
          "dataLabel": {
            "@t": "next.component.mixmap.css.datalable",
            "showRule": "AllShow",
            "fontSize": 12,
            "placement": "outSideTop",
            "intervalNumber": 0
          },
          "legendSize": 12,
          "axisLabel": {
            "@t": "next.component.pivot.css.axis",
            "fontSize": 12,
            "interval": 0,
            "rotate": 0
          },
          "horizontalDisplay": false,
          "chartPieDisplay": "Ring",
          "cssType": "Pivot",
          "background": {
            "@t": "next.component.css.background",
            "color": "#ffffff",
            "opacity": 1
          },
          "border": {
            "@t": "next.component.css.border",
            "opacity": 0,
            "color": "#CAD0D5"
          },
          "showTitle": true
        },
        "actions": []
      }
    },
    "component3": {
      "key": "component3",
      "type": "Component",
      "name": "系统台账 · 核对结果",
      "content": {
        "@t": "next.component.workbook",
        "sheetId": "{{$sheet2.id}}",
        "type": "Workbook",
        "title": "系统台账 · 核对结果",
        "config": {
          "@t": "next.component.workbookConfig",
          "headers": [
            {
              "@t": "next.component.workbook.header",
              "id": "{{$sheet2.headers[1].id}}",
              "width": 150
            },
            {
              "@t": "next.component.workbook.header",
              "id": "{{$sheet2.headers[3].id}}",
              "width": 130
            },
            {
              "@t": "next.component.workbook.header",
              "id": "{{$sheet2.headers[4].id}}",
              "width": 110
            },
            {
              "@t": "next.component.workbook.header",
              "id": "{{$sheet2.headers[5].id}}",
              "width": 110
            },
            {
              "@t": "next.component.workbook.header",
              "id": "{{$sheet2.headers[6].id}}",
              "width": 100
            },
            {
              "@t": "next.component.workbook.header",
              "id": "{{$sheet2.headers[7].id}}",
              "width": 110
            }
          ],
          "page": 0,
          "pageSize": 15,
          "editable": true,
          "filters": {
            "@t": "core.or.filter",
            "filters": [],
            "type": "OR"
          },
          "orders": [],
          "configType": "Workbook"
        },
        "css": {
          "@t": "next.component.workbook.css",
          "titleSize": 15,
          "headerSize": 14,
          "paginationSize": 11,
          "cssType": "Workbook",
          "background": {
            "@t": "next.component.css.background",
            "color": "#ffffff",
            "opacity": 1
          },
          "border": {
            "@t": "next.component.css.border",
            "opacity": 0,
            "color": "#CAD0D5"
          },
          "showTitle": true
        },
        "actions": []
      }
    },
    "dashboard1": {
      "key": "dashboard1",
      "type": "Dashboard",
      "name": "对账结果总览",
      "content": {
        "@t": "net.thingworks.jarvis.dashboard",
        "name": "对账结果总览",
        "components": [
          {
            "@t": "dashboard.component",
            "innerComponentId": "{{$component1.id}}",
            "position": {
              "@t": "dashboard.component.position",
              "x": 0,
              "y": 0,
              "w": 10,
              "h": 10
            }
          },
          {
            "@t": "dashboard.component",
            "innerComponentId": "{{$component2.id}}",
            "position": {
              "@t": "dashboard.component.position",
              "x": 10,
              "y": 0,
              "w": 14,
              "h": 10
            }
          },
          {
            "@t": "dashboard.component",
            "innerComponentId": "{{$component3.id}}",
            "position": {
              "@t": "dashboard.component.position",
              "x": 0,
              "y": 10,
              "w": 24,
              "h": 13
            }
          }
        ]
      }
    }
  }
}
