wwt-certificate-tool 1.2.58 → 1.2.59
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 +17 -9
- package/dist/version.json +6 -6
- package/package.json +1 -1
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.
|
|
6
|
+
<title>WWT 金蝶凭证工具 · 纯前端版 P1.2.59</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.
|
|
323
|
+
<h1>金蝶凭证工具 <span class="ver">P1.2.59</span></h1>
|
|
324
324
|
<div class="sub">纯前端离线版 · 双击即用 · 数据只存在本机,不上传任何服务器</div>
|
|
325
325
|
</div>
|
|
326
326
|
</div>
|
|
@@ -1627,7 +1627,10 @@ window.WWT_ENGINE = (function () {
|
|
|
1627
1627
|
ctx["来源"] = curSrc;
|
|
1628
1628
|
ctx["单据类型"] = danlei; ctx["单类"] = danlei;
|
|
1629
1629
|
ctx["对方"] = uniqJoin(items, partyFields, "/", curSrc);
|
|
1630
|
-
|
|
1630
|
+
// P1.2.59:{单位名称}/{供应商名称} 必须各自取对应字段,不能等价于 {对方},
|
|
1631
|
+
// 否则全部汇总按单位名称分组后,同一单位下多个供应商会被 / 拼接进摘要。
|
|
1632
|
+
ctx["单位名称"] = uniqJoin(items, ["单位名称"], "/", curSrc) || ctx["对方"];
|
|
1633
|
+
ctx["供应商名称"] = uniqJoin(items, ["供应商名称"], "/", curSrc) || ctx["对方"];
|
|
1631
1634
|
ctx["厂牌"] = uniqJoin(items, ["厂牌"], "/", curSrc);
|
|
1632
1635
|
ctx["收入板块"] = uniqJoin(items, ["收入板块"], "/", curSrc);
|
|
1633
1636
|
ctx["原单号"] = truncateBiz(orig, ",");
|
|
@@ -1825,7 +1828,7 @@ window.WWT_ENGINE = (function () {
|
|
|
1825
1828
|
}
|
|
1826
1829
|
|
|
1827
1830
|
for (const sub of subMap.values()) {
|
|
1828
|
-
const
|
|
1831
|
+
const subCtx = buildSummaryCtx(sub.items, rule, curSrc);
|
|
1829
1832
|
// 业务日期取组内最早
|
|
1830
1833
|
const meta = C.SOURCE_META[curSrc] || {};
|
|
1831
1834
|
let bizDate = "";
|
|
@@ -1857,9 +1860,10 @@ window.WWT_ENGINE = (function () {
|
|
|
1857
1860
|
const dimKey = Object.keys(dv).sort().map(d => [d, dv[d].name]);
|
|
1858
1861
|
const gkey = JSON.stringify([subj, dimKey, splitT]);
|
|
1859
1862
|
if (!groups.has(gkey)) {
|
|
1860
|
-
groups.set(gkey, { subj: subj, dv: dv, sgn: 0, vals: {}, first: it });
|
|
1863
|
+
groups.set(gkey, { subj: subj, dv: dv, sgn: 0, vals: {}, first: it, items: [] });
|
|
1861
1864
|
}
|
|
1862
1865
|
const g = groups.get(gkey);
|
|
1866
|
+
g.items.push(it);
|
|
1863
1867
|
g.sgn += sumAmtExpr(it.row, line.amountField);
|
|
1864
1868
|
lineSplitFs.forEach((f, fi) => {
|
|
1865
1869
|
const v = splitT[fi];
|
|
@@ -1872,6 +1876,8 @@ window.WWT_ENGINE = (function () {
|
|
|
1872
1876
|
const amt = Math.abs(signed);
|
|
1873
1877
|
if (amt <= 0) continue; // 净额 ≤ 0 跳过
|
|
1874
1878
|
eidx++;
|
|
1879
|
+
// P1.2.59 摘要上下文按最终分录小组构建,避免全组供应商拼接
|
|
1880
|
+
const sumCtx = buildSummaryCtx(g.items, rule, curSrc);
|
|
1875
1881
|
const splitVals = {};
|
|
1876
1882
|
for (const f in g.vals) splitVals[f] = truncateBiz(g.vals[f].join(","), ",");
|
|
1877
1883
|
const metaNo = meta.no || "原单号";
|
|
@@ -1914,7 +1920,7 @@ window.WWT_ENGINE = (function () {
|
|
|
1914
1920
|
const metaNo = meta.no || "原单号";
|
|
1915
1921
|
entries.push(makeEntry({
|
|
1916
1922
|
vno: curVno, eidx: eidx, acctDate: acctDate, bizDate: useBizDate,
|
|
1917
|
-
summary: fillSummary(line.summary || rule.name,
|
|
1923
|
+
summary: fillSummary(line.summary || rule.name, subCtx, {}, rule),
|
|
1918
1924
|
subj: subj, subjName: idx.subjectName(subj),
|
|
1919
1925
|
debit: side === "借" ? amt : 0, credit: side === "贷" ? amt : 0,
|
|
1920
1926
|
settleBiz: payRaw, settleCode: settleCode, settleName: settleName,
|
|
@@ -2187,7 +2193,6 @@ window.WWT_ENGINE = (function () {
|
|
|
2187
2193
|
subMap.get(k).items.push(it);
|
|
2188
2194
|
}
|
|
2189
2195
|
for (const sub of subMap.values()) {
|
|
2190
|
-
const sumCtx = buildSummaryCtx(sub.items, r, curSrc);
|
|
2191
2196
|
const meta = C.SOURCE_META[curSrc] || {};
|
|
2192
2197
|
let bizDate = "";
|
|
2193
2198
|
if (meta.datecol) {
|
|
@@ -2214,8 +2219,9 @@ window.WWT_ENGINE = (function () {
|
|
|
2214
2219
|
const splitT = lineSplitFs.map(f => clean(it.row[f]));
|
|
2215
2220
|
const dimKey = Object.keys(dv).sort().map(d => [d, dv[d].name]);
|
|
2216
2221
|
const gkey = JSON.stringify([subj, dimKey, splitT]);
|
|
2217
|
-
if (!groups.has(gkey)) groups.set(gkey, { subj: subj, dv: dv, sgn: 0, vals: {}, first: it });
|
|
2222
|
+
if (!groups.has(gkey)) groups.set(gkey, { subj: subj, dv: dv, sgn: 0, vals: {}, first: it, items: [] });
|
|
2218
2223
|
const g = groups.get(gkey);
|
|
2224
|
+
g.items.push(it);
|
|
2219
2225
|
g.sgn += sumAmtExpr(it.row, line.amountField);
|
|
2220
2226
|
lineSplitFs.forEach((f, fi) => {
|
|
2221
2227
|
const v = splitT[fi];
|
|
@@ -2227,6 +2233,8 @@ window.WWT_ENGINE = (function () {
|
|
|
2227
2233
|
const amt = Math.abs(signed);
|
|
2228
2234
|
if (amt <= 0) continue;
|
|
2229
2235
|
eidx++;
|
|
2236
|
+
// P1.2.59 摘要上下文按最终分录小组构建,避免全组供应商拼接
|
|
2237
|
+
const sumCtx = buildSummaryCtx(g.items, r, curSrc);
|
|
2230
2238
|
const splitVals = {};
|
|
2231
2239
|
for (const f in g.vals) splitVals[f] = truncateBiz(g.vals[f].join(","), ",");
|
|
2232
2240
|
const metaNo = meta.no || "原单号";
|
|
@@ -2579,7 +2587,7 @@ const S = window.__STATE__ = {
|
|
|
2579
2587
|
};
|
|
2580
2588
|
|
|
2581
2589
|
/* ---------------- 版本 & 框架自动更新(只更新程序本身,本地数据/规则不动) ---------------- */
|
|
2582
|
-
const WWT_VER=(function(){const raw='P1.2.
|
|
2590
|
+
const WWT_VER=(function(){const raw='P1.2.59';return raw.indexOf('__WVER__')>=0?'P1.2.10':raw;})();
|
|
2583
2591
|
const UPD_URL_KEY='wwt_fe_updurl';
|
|
2584
2592
|
// 默认更新源:Gitee 上本项目的 version.json(API 接口,浏览器可直接跨域读)
|
|
2585
2593
|
const DEFAULT_UPD_URL='https://gitee.com/api/v5/repos/wwtmrhu/certificate-generation/contents/dist/version.json';
|
package/dist/version.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"ver": "P1.2.
|
|
3
|
-
"npm": "1.2.
|
|
4
|
-
"url": "https://cdn.jsdelivr.net/npm/wwt-certificate-tool@1.2.
|
|
5
|
-
"url_unpkg": "https://unpkg.com/wwt-certificate-tool@1.2.
|
|
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.
|
|
7
|
-
"note": "① 内置默认基础表/规则/映射:新安装或分享打开即自带当前这套标准配置。② 生成凭证后实际生成了凭证的规则自动变绿并显示「已生成」徽章,状态持久化。③ 新增「清空已生成」按钮。④ 凭证起始号放到「④ 生成凭证」页生成栏。⑤ 对碰检测跳过未结算单据,缺失清单增加「单号」与「付款方式/结算方式」列。⑥ 凭证审核表「核算维度」列移到「科目名称」后。⑦ 分录级拆分字段:每条分录可单独设置拆分字段,实现一张凭证内借方按单号拆、贷方汇总等混合拆分。⑧ 【P1.2.55】顶部工具栏增加「清空业务数据」按钮,只清本月业务数据表,保留基础数据、规则、映射和配置。⑨ 【P1.2.56】生成/审核自动跳过 Excel 底部的「合计/小计/总计」行,避免汇总金额被重复累加(如 人进价 145万 翻倍的翻倍问题);合计行在编辑器内仍可见、只是不参与凭证生成。⑩ 【P1.2.57】修复合计行识别:扫描行内所有字段,避免「合计」写在摘要/备注/行类型等非标识列时仍被误当作数据行累加。⑪ 【P1.2.58】合计行兜底识别:若某行「单位名称/供应商名称/单号等标识列全空 +
|
|
2
|
+
"ver": "P1.2.59",
|
|
3
|
+
"npm": "1.2.59",
|
|
4
|
+
"url": "https://cdn.jsdelivr.net/npm/wwt-certificate-tool@1.2.59/dist/app.html",
|
|
5
|
+
"url_unpkg": "https://unpkg.com/wwt-certificate-tool@1.2.59/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.59.html",
|
|
7
|
+
"note": "① 内置默认基础表/规则/映射:新安装或分享打开即自带当前这套标准配置。② 生成凭证后实际生成了凭证的规则自动变绿并显示「已生成」徽章,状态持久化。③ 新增「清空已生成」按钮。④ 凭证起始号放到「④ 生成凭证」页生成栏。⑤ 对碰检测跳过未结算单据,缺失清单增加「单号」与「付款方式/结算方式」列。⑥ 凭证审核表「核算维度」列移到「科目名称」后。⑦ 分录级拆分字段:每条分录可单独设置拆分字段,实现一张凭证内借方按单号拆、贷方汇总等混合拆分。⑧ 【P1.2.55】顶部工具栏增加「清空业务数据」按钮,只清本月业务数据表,保留基础数据、规则、映射和配置。⑨ 【P1.2.56】生成/审核自动跳过 Excel 底部的「合计/小计/总计」行,避免汇总金额被重复累加(如 人进价 145万 翻倍的翻倍问题);合计行在编辑器内仍可见、只是不参与凭证生成。⑩ 【P1.2.57】修复合计行识别:扫描行内所有字段,避免「合计」写在摘要/备注/行类型等非标识列时仍被误当作数据行累加。⑪ 【P1.2.58】合计行兜底识别:若某行「单位名称/供应商名称/单号等标识列全空 + 有非零金额」(即合计行无合计字样),也判定为合计行跳过,彻底杜绝金额翻倍。⑫ 【P1.2.59】修复全部汇总模式下摘要把全组供应商拼接的问题:{供应商名称}/{单位名称} 各自读取对应字段,且摘要上下文按最终分录小组构建,同一凭证内多个供应商不再互相串到摘要里。"
|
|
8
8
|
}
|