wwt-certificate-tool 1.2.51 → 1.2.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/app.html CHANGED
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="UTF-8">
5
5
  <meta name="viewport" content="width=device-width,initial-scale=1">
6
- <title>WWT 金蝶凭证工具 · 纯前端版 P1.2.51</title>
6
+ <title>WWT 金蝶凭证工具 · 纯前端版 P1.2.52</title>
7
7
  <style>*{box-sizing:border-box;margin:0;padding:0}
8
8
  body{font-family:"Microsoft YaHei","PingFang SC",-apple-system,Segoe UI,sans-serif;font-size:13px;color:#1f2328;background:#f4f6f9;line-height:1.6}
9
9
  h1{font-size:17px;font-weight:600}
@@ -320,7 +320,7 @@ input[data-f="field"][list^="dlGe_"]::placeholder{color:#a8861f;font-style:itali
320
320
  <div class="brand">
321
321
  <span class="logo">WWT</span>
322
322
  <div>
323
- <h1>金蝶凭证工具 <span class="ver">P1.2.51</span></h1>
323
+ <h1>金蝶凭证工具 <span class="ver">P1.2.52</span></h1>
324
324
  <div class="sub">纯前端离线版 · 双击即用 · 数据只存在本机,不上传任何服务器</div>
325
325
  </div>
326
326
  </div>
@@ -450,7 +450,7 @@ input[data-f="field"][list^="dlGe_"]::placeholder{color:#a8861f;font-style:itali
450
450
 
451
451
  <!-- ⑥ 对碰 -->
452
452
  <section class="pane" id="tab-check">
453
- <div class="notice">对碰检测 = 拿业务数据里的<b>单位名称 / 供应商名称</b>,去客户 / 供应商基础档案里对一遍,<b>档案里没有的列出来</b>(只检测「已确认/已结算」且付款方式=挂账·对账S·冲转S 的单据;不再核对部门、员工)。</div>
453
+ <div class="notice">对碰检测 = 拿业务数据里的<b>单位名称 / 供应商名称</b>,去客户 / 供应商基础档案里对一遍,<b>档案里没有的列出来</b>(只检测「已确认/已结算」单据,未结算单据不参与;付款方式=挂账·对账S·冲转S;不再核对部门、员工)。</div>
454
454
  <div class="rowacts">
455
455
  <button class="btn primary" onclick="UI.runDetect()">🔍 运行对碰检测</button>
456
456
  <button class="btn ghost" id="btnDlMissing" style="display:none" onclick="UI.dlMissing()">📥 下载缺失清单 Excel</button>
@@ -894,11 +894,10 @@ window.WWT_CONST = (function () {
894
894
  {key:"已完工未结算", label:"已完工未结算(维修完工)"},
895
895
  {key:"维修已结算", label:"维修已结算(维修已结)"},
896
896
  ];
897
- // 对碰检测只覆盖"已确认/已结算"的来源;已完工未结算 用户要求不参与(2026-09-09)
897
+ // 对碰检测只覆盖"已确认/已结算"的来源;已完工未结算/入库未结算 用户要求不参与(2026-09-09 / 2026-09-21
898
898
  // 【P1.2.39】新增 维修已结算(已结算类,按设计意图纳入对碰检测)
899
- // 【P1.2.48】对碰检测增加「入库未结算」:用户要求付款方式=挂账的入库数据,
900
- // 即使供应商尚未在基础供应商表建档,也要报出来,便于补档案/补映射。
901
- const DETECT_ALLOWED_SOURCES = ["入库已确认","入库未结算","销售已确认","调拨已确认","维修已结算"];
899
+ // 【P1.2.52】移除「入库未结算」:未结算单据不需要对碰,避免干扰补档案。
900
+ const DETECT_ALLOWED_SOURCES = ["入库已确认","销售已确认","调拨已确认","维修已结算"];
902
901
  // v1.2.20:只核对 挂账 / 对账S / 冲转S 三类(去掉 对帐F / 冲转F)
903
902
  const DETECT_ALLOWED_PAY = ["对帐S","挂帐","冲转S"];
904
903
 
@@ -2456,11 +2455,12 @@ window.WWT_ENGINE = (function () {
2456
2455
  const meta = C.SOURCE_META[src] || {};
2457
2456
  const allow = C.DETECT_ALLOWED_PAY.map(normPay);
2458
2457
  const checked = rows.filter(r => {
2459
- // ① 单据状态:已结算 / 已确认 才参与(无状态列则不过滤)
2458
+ // ① 单据状态:已结算 / 已确认 才参与(无状态列则不过滤);含「未结算」字样的明确跳过
2460
2459
  let statusVal = "";
2461
2460
  for (const k of STATUS_KEYS) { const v = clean(r[k]); if (v) { statusVal = v; break; } }
2462
2461
  if (statusVal) {
2463
2462
  const sv = statusVal.toLowerCase();
2463
+ if (sv.indexOf("未结算") >= 0) return false;
2464
2464
  if (sv.indexOf("已确认") < 0 && sv.indexOf("已结算") < 0) return false;
2465
2465
  }
2466
2466
  // ② 付款方式 / 结算方式
@@ -2469,7 +2469,7 @@ window.WWT_ENGINE = (function () {
2469
2469
  });
2470
2470
  totalRows += checked.length;
2471
2471
 
2472
- const push = (dimName, val, kind, hint) => {
2472
+ const push = (dimName, val, kind, hint, billNo) => {
2473
2473
  if (!val) return;
2474
2474
  let code = "";
2475
2475
  if (kind === "客户" || kind === "供应商") {
@@ -2479,7 +2479,7 @@ window.WWT_ENGINE = (function () {
2479
2479
  if (!code) {
2480
2480
  missCount++;
2481
2481
  byDim[dimName] = (byDim[dimName] || 0) + 1;
2482
- res.push({ 来源单据: src, 维度: dimName, 名称: val, 建议: hint });
2482
+ res.push({ 来源单据: src, 维度: dimName, 名称: val, 单号: billNo || '', 建议: hint });
2483
2483
  }
2484
2484
  };
2485
2485
 
@@ -2488,7 +2488,8 @@ window.WWT_ENGINE = (function () {
2488
2488
  const party = clean(r[meta.party]);
2489
2489
  if (party) {
2490
2490
  const dimName = meta.partytype === "供应商" ? "供应商" : "客户";
2491
- push(dimName, party, dimName, suggest[dimName]);
2491
+ const billNo = clean(r[meta.no]) || clean(r["原单号"]);
2492
+ push(dimName, party, dimName, suggest[dimName], billNo);
2492
2493
  }
2493
2494
  }
2494
2495
  }
@@ -2526,7 +2527,7 @@ const S = window.__STATE__ = {
2526
2527
  };
2527
2528
 
2528
2529
  /* ---------------- 版本 & 框架自动更新(只更新程序本身,本地数据/规则不动) ---------------- */
2529
- const WWT_VER=(function(){const raw='P1.2.51';return raw.indexOf('__WVER__')>=0?'P1.2.10':raw;})();
2530
+ const WWT_VER=(function(){const raw='P1.2.52';return raw.indexOf('__WVER__')>=0?'P1.2.10':raw;})();
2530
2531
  const UPD_URL_KEY='wwt_fe_updurl';
2531
2532
  // 默认更新源:Gitee 上本项目的 version.json(API 接口,浏览器可直接跨域读)
2532
2533
  const DEFAULT_UPD_URL='https://gitee.com/api/v5/repos/wwtmrhu/certificate-generation/contents/dist/version.json';
@@ -4740,9 +4741,9 @@ function runDetect(){
4740
4741
  (Object.keys(r.byDim).length?'('+Object.entries(r.byDim).map(x=>esc(x[0])+' '+x[1]).join('、')+')':'');
4741
4742
  let h='';
4742
4743
  if(r.rows.length){
4743
- h='<table><thead><tr><th>来源单据</th><th>维度</th><th>业务里的名称</th><th>建议</th></tr></thead><tbody>'+
4744
+ h='<table><thead><tr><th>来源单据</th><th>维度</th><th>业务里的名称</th><th>单号</th><th>建议</th></tr></thead><tbody>'+
4744
4745
  r.rows.slice(0,500).map(x=>'<tr><td>'+esc(x.来源单据)+'</td><td>'+esc(x.维度)+'</td><td><b>'+esc(x.名称)+'</b></td>'+
4745
- '<td style="color:#8b949e">'+esc(x.建议)+'</td></tr>').join('')+'</tbody></table>';
4746
+ '<td>'+esc(x.单号||'-')+'</td><td style="color:#8b949e">'+esc(x.建议)+'</td></tr>').join('')+'</tbody></table>';
4746
4747
  $('btnDlMissing').style.display='';
4747
4748
  }else h='<div class="notice">✅ 全部对得上,没有缺失。</div>';
4748
4749
  $('checkWrap').innerHTML=h;
@@ -4872,7 +4873,7 @@ function dlMissing(){
4872
4873
  const aoa=[C.MISSING_HEAD].concat(S.missing.map(m=>C.MISSING_HEAD.map(h=>m[h]||'')));
4873
4874
  aoaToXlsx([aoa],['缺失编码清单'],'缺失编码清单.xlsx');
4874
4875
  }else{
4875
- const aoa=[['来源单据','维度','业务里的名称','建议']].concat(S.checkRows.map(x=>[x.来源单据,x.维度,x.名称,x.建议]));
4876
+ const aoa=[['来源单据','维度','业务里的名称','单号','建议']].concat(S.checkRows.map(x=>[x.来源单据,x.维度,x.名称,x.单号||'',x.建议]));
4876
4877
  aoaToXlsx([aoa],['缺失清单'],'缺失编码清单.xlsx');
4877
4878
  }
4878
4879
  }
package/dist/version.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
- "ver": "P1.2.51",
3
- "npm": "1.2.51",
4
- "url": "https://cdn.jsdelivr.net/npm/wwt-certificate-tool@1.2.51/dist/app.html",
5
- "url_unpkg": "https://unpkg.com/wwt-certificate-tool@1.2.51/dist/app.html",
6
- "url_gh": "https://api.github.com/repos/huweipei745839/certificate-generation/contents/dist/WWT%E5%87%AD%E8%AF%81%E5%B7%A5%E5%85%B7_P1.2.51.html",
7
- "note": "① 内置默认基础表/规则/映射:新安装或分享打开即自带当前这套标准配置。② 生成凭证后实际生成了凭证的规则自动变绿并显示「已生成」徽章,状态持久化。③ 新增「清空已生成」按钮。④ 【P1.2.51】「凭证起始号」放到「④ 生成凭证」页生成栏,生成前可直接修改,修改后即时生效。"
2
+ "ver": "P1.2.52",
3
+ "npm": "1.2.52",
4
+ "url": "https://cdn.jsdelivr.net/npm/wwt-certificate-tool@1.2.52/dist/app.html",
5
+ "url_unpkg": "https://unpkg.com/wwt-certificate-tool@1.2.52/dist/app.html",
6
+ "url_gh": "https://api.github.com/repos/huweipei745839/certificate-generation/contents/dist/WWT%E5%87%AD%E8%AF%81%E5%B7%A5%E5%85%B7_P1.2.52.html",
7
+ "note": "① 内置默认基础表/规则/映射:新安装或分享打开即自带当前这套标准配置。② 生成凭证后实际生成了凭证的规则自动变绿并显示「已生成」徽章,状态持久化。③ 新增「清空已生成」按钮。④ 凭证起始号放到「④ 生成凭证」页生成栏。⑤ 【P1.2.52】对碰检测跳过未结算单据,缺失清单增加「单号」列。"
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wwt-certificate-tool",
3
- "version": "1.2.51",
3
+ "version": "1.2.52",
4
4
  "description": "WWT 金蝶凭证工具 · 纯前端版(离线单文件 HTML,双击即用)",
5
5
  "keywords": [
6
6
  "WWT",