VWD AI Guide v3.9

自动对账:一件"做不起"的事,现在只需几秒 Auto-Reconciliation: From "Not Worth Doing" to Done in Seconds

内部分享 · 采购部 · 2026.05 Internal Share · Procurement · May 2026

K

Kai Mai

生产计划经理 · kai@valuewds.com

Production Planning Manager · kai@valuewds.com

我用中文描述我想要什么,Claude 来写代码、调试、改需求。整个系统全程没写一行代码。 I described what I wanted in plain language. Claude wrote the code, debugged it, and revised it. I never wrote a single line of code. — Kai Mai

1. 我们遇到了什么问题The Problem We Were Sitting On

我们每个月从供应商收到四种文件:订单、订单确认单、装箱单、发票。理论上四份文件的数量、尺寸、金额应该完全对得上——但实际上经常有差异。我们知道应该做比对,但人工核对没有性价比,所以这件事根本没有被做过。差异就这样不了了之。

Every month we receive four types of documents from our supplier: the purchase order, order acknowledgement, packing slip, and invoice. In theory, quantities, dimensions, and amounts should match across all four. In practice, they often don't. We always knew we should be reconciling these — but doing it manually just wasn't worth the time. So it never got done. Discrepancies just disappeared into the noise.

⚠️ 以前Before

  • 每个 PO 涉及 4 种不同文件
  • Each PO spans 4 different document types
  • 人工逐行核对:繁琐且容易出错
  • Manual line-by-line comparison: tedious and error-prone
  • 供应商邮件附件需要手动下载归档
  • Supplier email attachments downloaded one by one
  • 同一辆车的货可能混在一份装箱单里
  • One packing slip can mix multiple POs from the same truck
  • 没有性价比 → 根本没做过
  • Not worth the effort → Never got done

✅ 现在Now

  • 邮件附件自动下载归类
  • Email attachments auto-downloaded and sorted
  • 输入 Invoice 号码,几秒出结果
  • Enter an invoice number, get results in seconds
  • 金额差异自动标红
  • Price discrepancies flagged automatically in red
  • 所有 PO 汇总一张表 + 实时 Dashboard
  • All POs in one master sheet + live Dashboard
  • 从"做不起" → 几秒完成
  • From "not worth it" → done in seconds

2. 我们搭了一套什么系统What We Built

整个流程从收到供应商邮件开始,到实时 Dashboard 结束,中间每一步全部自动。

The entire pipeline runs from the moment a supplier email arrives to a live, queryable Dashboard — every step automated.

📬Gmail 自动拉取Gmail Auto-Pull
监听专属 label,自动下载附件Watch labels, download attachments
→
📄PDF / Excel 解析PDF / Excel Parse
识别文件类型,提取结构化数据Detect file type, extract structured data
→
⚖️自动四方比对4-Way Match
Order × Ack × Packing × Invoice
→
📊Master 汇总表Master Workbook
所有 PO 合并,标记异常行All POs consolidated, anomalies flagged
→
🖥️实时 DashboardLive Dashboard
多维度查询,可视化分析Multi-view queries, visual analytics
💡 一条命令跑全流程One Command Runs Everything
python3 refresh_master.py

自动完成以上所有步骤,约 1–2 分钟。Completes all steps above — takes about 1–2 minutes.

3. Dashboard 四大功能The Dashboard: Four Views, One Source of Truth

207
已处理 InvoiceInvoices Processed
187
PO 数量POs Tracked
3,489
明细行数Line Items
几秒
Seconds
单次查询耗时Per Query

① Invoice Lookup — 发票查询Invoice Lookup

输入 Invoice 号码,立即查看 Order / Ack / Packing Slip / Invoice 四方比对结果。

Enter invoice numbers and instantly see the 4-way comparison: Order / Ack / Packing Slip / Invoice.

② Price Issues — 价格差异Price Issues

自动找出 Invoice 与 Order 之间的定价差异,按面积、厚度、LoE 加价等规则逐行核算,红色标记超出范围的行。

Automatically finds pricing discrepancies using thickness, area, and LoE surcharge rules — flags anything out of range in red.

③ Reorder Report — 补单追踪Reorder Report

区分 R(客户驱动补单)和 Z(供应商内部返工),按月统计补单率,帮助识别哪些订单类型容易出问题。

Distinguishes R-type (customer-driven remake) from Z-type (supplier rework), tracks monthly reorder rates.

④ Glass Mix — 玻璃类型分布Glass Mix

各玻璃类型面积分布饼图 + LE3 vs Clear 差异拆解表,净差值 +4,920.5 sf 完全可解释。

Sqft breakdown by glass type + LE3 vs. Clear surplus analysis. Net delta +4,920.5 sf fully reconciled by IGU structure.

4. 意外之喜:一个随口问出来的分析报告A Happy Accident: The Report That Came From a Casual Question

💬 真实场景True Story

"为什么 LoE 玻璃比 Clear 玻璃的总面积多那么多?" "Why does LoE glass always have more total sqft than Clear glass?"

有一次随口问了 Claude 这个问题,原本只是想得到一个解释。没想到 Claude 不只回答了为什么,还顺手把分析逻辑直接写进了 Dashboard——变成了一个可以随时查看的 LE3 vs Clear 面积差异报告。 I asked Claude this offhand one day — I was just looking for an explanation. What I got back wasn't just an answer. Claude explained the reasoning and then built it directly into the Dashboard as a live LE3 vs. Clear sqft surplus analysis report. A feature I never planned for, created from a single casual question.

为什么 LoE 面积会比 Clear 多?Why LE3 sqft runs higher

正常双层 IGU 是 1 片 LE3 + 1 片 Clear,理论上面积应该 1:1。但实际订单里有很多"例外":

A standard 2-pane IGU uses one LE3 sheet and one Clear sheet — theoretically a 1:1 ratio. But real orders are full of exceptions:

IGU 类型IGU Type原因Reason
🔸 三层玻璃(LE3 + LE3 + Clear)Triple-pane (LE3 + LE3 + Clear)2 片 LE3 对 1 片 Clear2 LE3 per 1 Clear
🔸 浴室窗(LE3 + OBS 磨砂)Bathroom windows (LE3 + OBS obscure)LE3 无 Clear 配对No Clear pair
🔸 落地门(LE3 + Lami 夹胶)Floor-to-ceiling doors (LE3 + Lami)LE3 无 Clear 配对No Clear pair
🔸 单片 LE3(单层窗)Single-pane LE3 monolithic无配对,净 surplusNo pair at all

Claude 自动计算 Surplus,净差值:Claude auto-calculated the surplus. Net delta: +4,920.5 sf — 全部有据可查— fully accounted for

5. 全程没写一行代码——Claude 怎么做到的Zero Lines of Code Written — Here's How It Actually Happened

以下是真实开发过程的缩影。从 PDF 解析 → 价格核算 → 汇总表 → Dashboard,每一步都是这样一问一答迭代完成的。

This is a condensed version of a real development process. Every piece was built this way — conversation by conversation.

K
我需要一个工具,把供应商发来的 Invoice PDF 和我们的 Order Excel 做自动比对,找出金额不一致的地方I need a tool that automatically compares the supplier's Invoice PDFs against our Order spreadsheets and flags any pricing differences
AI
好的。供应商的 Invoice PDF 格式是固定的吗?你能发一份样本让我看看结构?Got it. Is the supplier's invoice format consistent? Can you drop a sample so I can see the structure?
K
(把 PDF 拖进对话)就是这种格式,每行是一个玻璃的尺寸、数量和金额(dragged a PDF into the chat) Yes, this format — each row is a glass piece with dimensions, quantity, and amount
AI
明白了。价格规则是按面积算还是按块?不同厚度单价一样吗?Clear. Is pricing calculated by sqft or per piece? Does it vary by thickness?
K
按 sqft,3.1mm 和 3.9mm 向上取整到整英寸,4.7mm 和 5.7mm 取整到偶数英寸,LoE 玻璃还要加价……By sqft. 3.1mm and 3.9mm round up to the next whole inch, 4.7mm and 5.7mm round up to the next even inch, and LoE glass gets a surcharge on top...
AI
价格规则已写进去了。可以先跑 python3 glass_tools.py parse "invoice.pdf" 看看解析结果对不对?Pricing rules are in. Try running python3 glass_tools.py parse "invoice.pdf" and let me know if the parsed output looks right?
K
跑出来了,但有一行 LoE 玻璃的加价算错了It ran, but one of the LoE surcharge lines is wrong
AI
找到了,LoE 加价的判断条件写反了,已修复。重新跑一遍确认一下……Found it — the LoE surcharge condition was inverted. Fixed. Run it again and check?
K
好了,现在对的。能不能做个 Dashboard,可以直接输入 Invoice 号码查询?Perfect, that's correct now. Can we add a Dashboard where I can type in an invoice number and see the comparison?
AI
可以,我来写一个 HTML Dashboard,数据从 Master Excel 读取,支持多个 Invoice 号码批量查询……Sure — I'll build an HTML Dashboard that reads from the Master Excel, with support for batch invoice number lookup...

6. Claude 手把手教我设置 Gmail 自动化Claude Walked Me Through Gmail Automation — Step by Step

这一步 Claude 一行一行教我在 Terminal 里完成的——从来没用过命令行的我,跟着做下来也成功了。

Claude guided me through this one command at a time — and I'd never used Terminal before.

📧 先在 Gmail 里设好 FilterFirst: Set Up Gmail Filters

设置 4 个 Filter,让供应商邮件自动归类到专属 Label:Set up 4 Gmail Filters so supplier emails are automatically tagged:

Temp Order Temp Acknowledgement Temp Packing Slip Temp Invoice
1

安装 Homebrew(Mac 上的"软件管家")Install Homebrew (Mac's package manager)只需做一次One time only

% /bin/bash -c "$(curl -fsSL https://brew.sh/install.sh)"
Claude 说:装好它之后安装任何工具只需一行命令。
Claude said: Once it's installed, adding any command-line tool is just one line.
2

安装 gog(Gmail 命令行工具)Install gog (Gmail command-line client)只需做一次One time only

% brew install gogcli
Claude 说:gog 是让脚本直接访问 Gmail 的工具。
Claude said: gog lets scripts access your Gmail directly from the command line.
3

在 Google Cloud 创建 OAuth 授权Create a Google Cloud OAuth App只需做一次One time only

Claude 生成了完整分步文档:① 新建项目 ② 启用 Gmail API ③ 配置 OAuth Consent Screen ④ 下载 client_secret.jsonClaude produced a detailed guide: ① Create project ② Enable Gmail API ③ Configure OAuth Consent Screen ④ Download client_secret.json

4

授权 Gmail 访问Authorize Gmail access只需做一次One time only

% gog auth credentials ~/Downloads/client_secret.json % gog auth add kai@valuewholesaler.ai % echo 'export GOG_ACCOUNT=kai@valuewholesaler.ai' >> ~/.zshrc
Claude 说:"此应用未经 Google 验证"是正常的,点 Advanced → Continue 继续。
Claude said: The "This app isn't verified" warning is expected — click Advanced → Continue to proceed.
5

运行同步脚本 — 完成!Run the sync script — done!

% python3 refresh_master.py === Temp Invoice → Invoice/ 3 封待处理 + Invoice-54466069.pdf + Invoice-54464065.pdf 已存在跳过: 1 === Temp Packing Slip → Packing Slip/ 1 封待处理 + PackingSlip_LOAD3403690.pdf 解析完成 → 更新 TempGlass_Master.xlsx ✓

7. Claude 还能帮你做什么What Claude Can Do For You

不需要会编程。只要你知道"我想做什么",Claude 就能帮你把想法变成工具。

No programming required. If you know what you want, Claude can turn the idea into a working tool.

📧

邮件自动整理Email Automation

设置 Gmail Filter 把供应商邮件自动归类打标签,Claude 帮你写脚本批量下载附件

Auto-sort supplier emails into labels, Claude writes the script to batch download attachments

📈

数据分析报告Data Analysis

把 Excel 丢给 Claude,自动做汇总、找异常、生成可视化图表

Drop an Excel file to Claude — auto-summarize, find anomalies, generate charts

⏰

定时自动任务Scheduled Automation

用 Claude Code 的 /schedule 指令,设定每天自动跑数据、生成报告

Use Claude Code's /schedule command to auto-run data jobs and generate reports daily

🔍

文件智能问答Document Q&A

把 SOP、产品资料上传到 Claude Project,随时问随时答

Upload SOPs and product docs to a Claude Project for instant Q&A anytime

✍️

内容批量生成Batch Content Generation

报价单、邮件模板——给一个样本,Claude 帮你批量套用

Quotes, email templates — give Claude one sample, it generates the rest

🔗

系统之间的桥梁System Bridge

两个不对接的系统之间,用 Claude 来做"翻译"和自动搬运

Use Claude as a bridge between two systems that don't talk to each other

8. 怎么开始你自己的 ProjectHow to Start Your Own Project

Claude Project 是一个持久的工作空间——记住你上传的文件、你设定的指令,所有对话共享同一个上下文。

A Claude Project is a persistent workspace — it remembers your uploaded files and instructions, and all conversations share the same context.

1

打开 claude.ai → Projects → New projectGo to claude.ai → Projects → New project

给 Project 起名字,写清楚它的用途Give it a name and describe its purpose

2

上传文件 / 写好 InstructionsUpload files / Write Instructions

把相关的 Excel、PDF、SOP 上传进去;在 Instructions 里告诉 Claude 它的角色和规则Upload relevant Excel, PDF, SOP files; tell Claude its role and rules in the Instructions field

3

用你自己的语言描述想做的事Describe what you want in plain language

不用写代码,不用学技术。描述需求,Claude 来实现,发现问题继续告诉 Claude 来改No coding needed, no technical knowledge required. Describe the need, Claude builds it, iterate from there

🌱 每个人都可以用 AI 做出改变🌱 Anyone Can Create Change with AI

你不需要懂代码,不需要懂技术。只要你清楚自己的业务痛点,AI 就能帮你把想法变成工具。从一个小问题开始,试着和 Claude 聊一聊——你会发现改变比你想象的更容易。You don't need to know how to code or have a technical background. As long as you understand your own workflow challenges, AI can help turn your ideas into real tools. Start with one small problem, open a conversation with Claude — you'll find that change is easier than you think.

VWD AI Guide v3.9 | VWD | 2026 | Created by IT depart. | 有问题发邮件到Questions? Email it@valuewds.com