{
  "id": "starter-sales",
  "version": "2024-12-24",
  "name": "销售:一张脏导出表,收干净",
  "category": "样例数据",
  "description": "一个季度的销售订单,原样从 CRM 导出来的 —— 大区有全角空格、有大小写不一、回款状态三种写法、还有两行空着。一个字没手改:三列公式当场把它收干净,第二张表按月汇总,看板读的就是这张汇总表。改一个金额,图立刻跟着变。",
  "locale": "zh_CN",
  "imageSrc": "",
  "vipOnly": false,
  "author": "TableDI",
  "tags": {
    "functions": []
  },
  "resourceCount": {
    "Sheet": 2,
    "Component": 5,
    "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": "Text"
              }
            },
            {
              "title": "金额",
              "meta": {
                "type": "Number",
                "decimal": 0,
                "unit": "none",
                "thousandPoint": true
              }
            },
            {
              "title": "回款状态",
              "meta": {
                "type": "Text"
              }
            },
            {
              "title": "大区(规范)",
              "formula": "UPPER(TRIM({{$sheet1.headers[3].code}}))",
              "meta": {
                "type": "Text"
              }
            },
            {
              "title": "月份",
              "formula": "LEFT({{$sheet1.headers[1].code}}, 7)",
              "meta": {
                "type": "Text"
              }
            },
            {
              "title": "是否回款",
              "formula": "IF(UPPER(TRIM({{$sheet1.headers[6].code}})) = \"已回款\", \"已回款\", \"未回款\")",
              "meta": {
                "type": "Text"
              }
            },
            {
              "title": "已回款金额",
              "formula": "IF(UPPER(TRIM({{$sheet1.headers[6].code}})) = \"已回款\", {{$sheet1.headers[5].code}}, 0)",
              "meta": {
                "type": "Number",
                "decimal": 0,
                "unit": "none",
                "thousandPoint": true
              }
            }
          ]
        },
        "entries": {
          "csv": "日期,业务员,大区,产品,金额,回款状态\n2026-07-02,王丹,华东,基础版,1240,已回款\n2026-07-03,李明,华北,专业版,3180,已回款\n2026-07-06,王 丹,华东 ,专业版,3180,未回款\n2026-07-08,周雅,华南,基础版,1240,已回款\n2026-07-09,李明, 华北,旗舰版,9600,已回款\n2026-07-13,陈涛,西南,专业版,3180,已回款\n2026-07-15,周雅,华南,基础版,1240,已回款\n2026-07-16,王丹,华东,旗舰版,9600,未回款\n2026-07-20,李明,华北,基础版,620,已回款\n2026-07-22,陈涛,西南,专业版,3180,已回款\n2026-07-24,周 雅,,基础版,1240,已回款\n2026-07-27,王丹,华东,专业版,2650,已回款\n2026-07-29,陈涛,西南,基础版,1240,未回款\n2026-07-30,李明,华北,旗舰版,9600,已回款\n2026-08-03,周雅,华南,专业版,3180,已回款\n2026-08-05,王丹,华东,基础版,620,已回款\n2026-08-06,陈 涛,西南 ,专业版,3180,已回款\n2026-08-10,李明,华北,基础版,1240,未回款\n2026-08-12,周雅,华南,旗舰版,9600,已回款\n2026-08-13,王丹,华东,专业版,3180,已回款\n2026-08-17,陈涛,西南,基础版,1240,已回款\n2026-08-19,李明,华北,专业版,2650,未回款\n2026-08-20,周雅,,专业版,3180,已回款\n2026-08-24,王丹,华东,旗舰版,12400,已回款\n2026-08-26,陈涛,西南,基础版,620,已回款\n2026-08-27,李明,华北,基础版,1240,已回款\n2026-08-31,周雅,华南 ,专业版,3180,已回款\n2026-09-02,王丹,华东,专业版,3180,未回款\n2026-09-04,李 明,华北,旗舰版,9600,已回款\n2026-09-08,周雅,华南,基础版,1240,已回款\n2026-09-09,陈涛,西南,专业版,3180,已回款\n2026-09-11,王丹,华东,基础版,620,未回款\n2026-09-15,李明,华北,专业版,2650,已回款\n2026-09-17,周雅,华南,旗舰版,12400,已回款\n2026-09-21,陈涛,西南,基础版,1240,已回款\n2026-09-23,王丹,华东 ,专业版,3180,已回款\n2026-09-25,李明,华北,基础版,620,未回款\n2026-09-28,周雅,华南,旗舰版,9600,已回款"
        }
      }
    },
    "sheet2": {
      "key": "sheet2",
      "type": "Sheet",
      "name": "月度汇总",
      "content": {
        "sheet": {
          "name": "月度汇总",
          "uniqueIndex": {
            "uniqueHeaders": []
          },
          "headers": [
            {
              "title": "月份",
              "formula": "{{$sheet1.headers[8].code}}"
            },
            {
              "title": "签单金额",
              "formula": "SUMIF({{$sheet1.headers[5].code}}, {{$sheet2.headers[0].code}} = {{$sheet1.headers[8].code}})",
              "meta": {
                "type": "Number",
                "decimal": 0,
                "unit": "none",
                "thousandPoint": true
              }
            },
            {
              "title": "已回款",
              "formula": "SUMIF({{$sheet1.headers[10].code}}, {{$sheet2.headers[0].code}} = {{$sheet1.headers[8].code}})",
              "meta": {
                "type": "Number",
                "decimal": 0,
                "unit": "none",
                "thousandPoint": true
              }
            },
            {
              "title": "订单数",
              "formula": "COUNTIF({{$sheet1.headers[1].code}}, {{$sheet2.headers[0].code}} = {{$sheet1.headers[8].code}})",
              "meta": {
                "type": "Number",
                "decimal": 0,
                "unit": "none",
                "thousandPoint": true
              }
            },
            {
              "title": "客单价",
              "formula": "{{$sheet2.headers[1].code}} / {{$sheet2.headers[3].code}}",
              "meta": {
                "type": "Number",
                "decimal": 0,
                "unit": "none",
                "thousandPoint": true
              }
            }
          ]
        },
        "entries": null
      }
    },
    "component1": {
      "key": "component1",
      "type": "Component",
      "name": "Text",
      "content": {
        "@t": "next.component.text",
        "dashboardId": "{{$dashboard1.id}}",
        "type": "Text",
        "title": "Text",
        "config": {
          "@t": "next.component.text.config",
          "text": "三季度销售总览",
          "previewEdit": false,
          "configType": "Text"
        },
        "css": {
          "@t": "next.component.text.css",
          "bold": false,
          "italic": false,
          "textSize": 22,
          "textColor": "#1F2933",
          "horizontalAlign": "left",
          "verticalAlign": "center",
          "cssType": "Text",
          "background": {
            "@t": "next.component.css.background",
            "color": "#EEF3FE",
            "opacity": 1
          },
          "border": {
            "@t": "next.component.css.border",
            "opacity": 0,
            "color": "#CAD0D5"
          },
          "showTitle": false
        },
        "actions": []
      }
    },
    "component2": {
      "key": "component2",
      "type": "Component",
      "name": "签单 vs 回款(按月)",
      "content": {
        "@t": "next.component.mixmap",
        "sheetId": "{{$sheet2.id}}",
        "type": "MixMap",
        "title": "签单 vs 回款(按月)",
        "config": {
          "@t": "next.component.mixmap.config",
          "xAxis": {
            "@t": "next.component.mixmap.config.x.axis",
            "headerId": "{{$sheet2.headers[0].id}}",
            "renderDirection": "Right"
          },
          "yAxis": {
            "@t": "next.component.mixmap.config.y.axis",
            "coordinates": [
              {
                "@t": "next.component.mixmap.config.coordinate",
                "headerId": "{{$sheet2.headers[1].id}}",
                "defaultColor": "#5B8FF9",
                "colorRules": [],
                "chartType": "Bar"
              },
              {
                "@t": "next.component.mixmap.config.coordinate",
                "headerId": "{{$sheet2.headers[2].id}}",
                "defaultColor": "#61C7B8",
                "colorRules": [],
                "chartType": "Bar"
              }
            ],
            "yRange": {
              "@t": "next.component.mixmap.config.coordinate.range",
              "rightHeaderIds": []
            }
          },
          "noneValueFillZero": true,
          "pageSize": 48,
          "filters": {
            "@t": "core.or.filter",
            "filters": [],
            "type": "OR"
          },
          "orders": [
            {
              "@t": "core.order.simple",
              "referenceKey": "{{$sheet2.headers[0].id}}",
              "op": "ASC"
            }
          ],
          "configType": "MixMap"
        },
        "css": {
          "@t": "next.component.mixmap.css",
          "horizontalDisplay": false,
          "dataLabel": {
            "@t": "next.component.mixmap.css.datalable",
            "showRule": "AllShow",
            "fontSize": 12,
            "placement": "outSideTop",
            "intervalNumber": 0
          },
          "titleSize": 15,
          "legendSize": 13,
          "axisLabel": {
            "@t": "next.component.mixmap.css.axis",
            "fontSize": 12,
            "interval": 0,
            "rotate": 0
          },
          "cssType": "MixMap",
          "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.pivot.table",
        "sheetId": "{{$sheet1.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": "{{$sheet1.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": "{{$sheet1.headers[5].id}}",
                "calcType": "Sum",
                "formula": "",
                "dataItemType": "FormulaHeader",
                "label": "金额",
                "showTotal": false,
                "meta": {
                  "@t": "next.component.pivot.table.meta.number",
                  "type": "Number",
                  "decimal": 0,
                  "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": []
      }
    },
    "component4": {
      "key": "component4",
      "type": "Component",
      "name": "产品 × 月份",
      "content": {
        "@t": "next.component.pivot.table",
        "sheetId": "{{$sheet1.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": [
              {
                "@t": "next.component.pivot.config.textHeader.item",
                "headerId": "{{$sheet1.headers[4].id}}",
                "dataItemType": "TextHeader",
                "label": "产品",
                "showTotal": false,
                "meta": {
                  "@t": "next.component.pivot.table.meta.text",
                  "type": "Text"
                }
              }
            ],
            "columns": [
              {
                "@t": "next.component.pivot.config.textHeader.item",
                "headerId": "{{$sheet1.headers[8].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": "{{$sheet1.headers[5].id}}",
                "calcType": "Sum",
                "formula": "",
                "dataItemType": "FormulaHeader",
                "label": "金额",
                "showTotal": false,
                "meta": {
                  "@t": "next.component.pivot.table.meta.number",
                  "type": "Number",
                  "decimal": 0,
                  "unit": "none",
                  "thousandPoint": true
                }
              }
            ],
            "aggregated": true
          },
          "displayType": "SheetReport",
          "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": []
      }
    },
    "component5": {
      "key": "component5",
      "type": "Component",
      "name": "销售订单",
      "content": {
        "@t": "next.component.workbook",
        "sheetId": "{{$sheet1.id}}",
        "type": "Workbook",
        "title": "销售订单",
        "config": {
          "@t": "next.component.workbookConfig",
          "headers": [
            {
              "@t": "next.component.workbook.header",
              "id": "{{$sheet1.headers[1].id}}",
              "width": 110
            },
            {
              "@t": "next.component.workbook.header",
              "id": "{{$sheet1.headers[2].id}}",
              "width": 150
            },
            {
              "@t": "next.component.workbook.header",
              "id": "{{$sheet1.headers[7].id}}",
              "width": 110
            },
            {
              "@t": "next.component.workbook.header",
              "id": "{{$sheet1.headers[4].id}}",
              "width": 130
            },
            {
              "@t": "next.component.workbook.header",
              "id": "{{$sheet1.headers[5].id}}",
              "width": 110
            },
            {
              "@t": "next.component.workbook.header",
              "id": "{{$sheet1.headers[9].id}}",
              "width": 100
            }
          ],
          "page": 0,
          "pageSize": 10,
          "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": 24,
              "h": 2
            }
          },
          {
            "@t": "dashboard.component",
            "innerComponentId": "{{$component2.id}}",
            "position": {
              "@t": "dashboard.component.position",
              "x": 0,
              "y": 2,
              "w": 14,
              "h": 10
            }
          },
          {
            "@t": "dashboard.component",
            "innerComponentId": "{{$component3.id}}",
            "position": {
              "@t": "dashboard.component.position",
              "x": 14,
              "y": 2,
              "w": 10,
              "h": 10
            }
          },
          {
            "@t": "dashboard.component",
            "innerComponentId": "{{$component4.id}}",
            "position": {
              "@t": "dashboard.component.position",
              "x": 0,
              "y": 12,
              "w": 24,
              "h": 9
            }
          },
          {
            "@t": "dashboard.component",
            "innerComponentId": "{{$component5.id}}",
            "position": {
              "@t": "dashboard.component.position",
              "x": 0,
              "y": 21,
              "w": 24,
              "h": 12
            }
          }
        ]
      }
    }
  }
}
