wwt-certificate-tool 1.2.61 → 1.2.63
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 +30 -8
- 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.63</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}
|
|
@@ -131,6 +131,10 @@ main{padding:14px 18px 60px}
|
|
|
131
131
|
.fld{display:flex;flex-direction:column;gap:3px}
|
|
132
132
|
.fld label{font-size:11.5px;color:#57606a}
|
|
133
133
|
.fld.must label{color:#b0305c;font-weight:600}
|
|
134
|
+
.fld.hl label{color:#0c447c;font-weight:600}
|
|
135
|
+
.fld.hl input{padding:5px 8px;border:1px solid #378add;border-radius:5px;font-size:12.5px;font-family:inherit;background:#e6f1fb}
|
|
136
|
+
.fld.hl input:focus{outline:none;border-color:#185fa5;box-shadow:0 0 0 2px #b5d4f4}
|
|
137
|
+
.hl-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#185fa5;margin-left:4px;vertical-align:middle}
|
|
134
138
|
.fld input{padding:5px 8px;border:1px solid #d0d7de;border-radius:5px;font-size:12.5px;font-family:inherit}
|
|
135
139
|
.fld input:focus{outline:none;border-color:#2f6feb;box-shadow:0 0 0 2px #e8f0fe}
|
|
136
140
|
.genbar{display:flex;gap:12px;align-items:center;flex-wrap:wrap;background:#fff;border:1px solid #dde2e8;border-radius:7px;padding:12px}
|
|
@@ -184,6 +188,9 @@ tr.bad:hover td{background:#fbe9e9}
|
|
|
184
188
|
.chkbox.generated:hover{background:#bbf7d0}
|
|
185
189
|
.genbadge{margin-left:4px;background:#22c55e;color:#fff;font-size:10px;font-weight:600;border-radius:4px;padding:1px 5px}
|
|
186
190
|
.vnobadge{margin-left:4px;background:#f43f5e;color:#fff;font-size:10px;font-weight:600;border-radius:4px;padding:1px 5px}
|
|
191
|
+
/* 【P1.2.62】规则卡片上单条「清空」入口 */
|
|
192
|
+
.clearone{margin-left:4px;border:1px solid #d0d7de;background:#fff;border-radius:4px;padding:1px 6px;font-size:10px;color:#57606a;cursor:pointer;line-height:1.4}
|
|
193
|
+
.clearone:hover{background:#fdf0f0;border-color:#e5a3a3;color:#c1121f}
|
|
187
194
|
.rulecard{background:#fff;border:1px solid #dde2e8;border-radius:7px;padding:11px 13px;margin-bottom:9px}
|
|
188
195
|
.rulecard.off{opacity:.55}
|
|
189
196
|
.rulehead{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
|
|
@@ -321,7 +328,7 @@ input[data-f="field"][list^="dlGe_"]::placeholder{color:#a8861f;font-style:itali
|
|
|
321
328
|
<div class="brand">
|
|
322
329
|
<span class="logo">WWT</span>
|
|
323
330
|
<div>
|
|
324
|
-
<h1>金蝶凭证工具 <span class="ver">P1.2.
|
|
331
|
+
<h1>金蝶凭证工具 <span class="ver">P1.2.63</span></h1>
|
|
325
332
|
<div class="sub">纯前端离线版 · 双击即用 · 数据只存在本机,不上传任何服务器</div>
|
|
326
333
|
</div>
|
|
327
334
|
</div>
|
|
@@ -414,7 +421,7 @@ input[data-f="field"][list^="dlGe_"]::placeholder{color:#a8861f;font-style:itali
|
|
|
414
421
|
<label>分组字段 <input type="text" id="genGroupBy" placeholder="单位名称"></label>
|
|
415
422
|
<label>凭证起始号 <input type="number" id="genVStart" value="1" style="width:70px" title="生成凭证时第一张凭证的编号,可在生成前直接改"></label>
|
|
416
423
|
<button class="btn primary" onclick="UI.doGenerate()">⚙ 生成凭证草稿</button>
|
|
417
|
-
<button class="btn" onclick="UI.clearGenerated()" title="
|
|
424
|
+
<button class="btn" onclick="UI.clearGenerated()" title="清空所有规则的绿色「已生成」标记">清空全部已生成</button>
|
|
418
425
|
</div>
|
|
419
426
|
<div class="rowacts">
|
|
420
427
|
<button class="btn ghost" onclick="UI.selAllRules(true)">☑ 全选规则</button>
|
|
@@ -947,6 +954,8 @@ window.WWT_CONST = (function () {
|
|
|
947
954
|
];
|
|
948
955
|
// 每月必改 4 项
|
|
949
956
|
const MONTHLY_MUST = ["date","busdate","year","period"];
|
|
957
|
+
// 【P1.2.63】月度参数中需与金蝶档案逐一核对的字段,蓝色高亮提示
|
|
958
|
+
const MONTHLY_HL = ["accountbookid","orgid","orgname"];
|
|
950
959
|
|
|
951
960
|
/* ---------- 映射表定义 ----------
|
|
952
961
|
cols: 数据 key 数组(与 rows[i][k] 对应;scanMap/addMapRow 也用它)
|
|
@@ -995,7 +1004,7 @@ window.WWT_CONST = (function () {
|
|
|
995
1004
|
DIM_DISPLAY, DIM_COLUMNS, DIM_LIST, STRICT_DIMS,
|
|
996
1005
|
SOURCE_META, BIZ_SLOTS, BASE_SLOTS,
|
|
997
1006
|
DETECT_ALLOWED_SOURCES, DETECT_ALLOWED_PAY,
|
|
998
|
-
MONTHLY_FIELDS, MONTHLY_MUST, MAP_DEFS,
|
|
1007
|
+
MONTHLY_FIELDS, MONTHLY_MUST, MONTHLY_HL, MAP_DEFS,
|
|
999
1008
|
DRILL_1122, DRILL_1122_DEFAULT, DRILL_6002, DRILL_6002_DEFAULT,
|
|
1000
1009
|
OPS, PAY_FIELDS, JOIN_PREFIX,
|
|
1001
1010
|
};
|
|
@@ -2621,7 +2630,7 @@ const S = window.__STATE__ = {
|
|
|
2621
2630
|
};
|
|
2622
2631
|
|
|
2623
2632
|
/* ---------------- 版本 & 框架自动更新(只更新程序本身,本地数据/规则不动) ---------------- */
|
|
2624
|
-
const WWT_VER=(function(){const raw='P1.2.
|
|
2633
|
+
const WWT_VER=(function(){const raw='P1.2.63';return raw.indexOf('__WVER__')>=0?'P1.2.10':raw;})();
|
|
2625
2634
|
const UPD_URL_KEY='wwt_fe_updurl';
|
|
2626
2635
|
// 默认更新源:Gitee 上本项目的 version.json(API 接口,浏览器可直接跨域读)
|
|
2627
2636
|
const DEFAULT_UPD_URL='https://gitee.com/api/v5/repos/wwtmrhu/certificate-generation/contents/dist/version.json';
|
|
@@ -3764,7 +3773,8 @@ function renderMaps(){
|
|
|
3764
3773
|
const f=$('monthlyForm');
|
|
3765
3774
|
f.innerHTML=C.MONTHLY_FIELDS.map(m=>{
|
|
3766
3775
|
const must=C.MONTHLY_MUST.indexOf(m.k)>=0;
|
|
3767
|
-
|
|
3776
|
+
const hl=C.MONTHLY_HL.indexOf(m.k)>=0;
|
|
3777
|
+
return '<div class="fld'+(must?' must':'')+(hl?' hl':'')+'"><label>'+esc(m.cn)+(must?' ●':'')+(hl?'<span class="hl-dot" title="需与金蝶档案核对一致"></span>':'')+'</label>'+
|
|
3768
3778
|
'<input type="'+m.t+'" data-mk="'+m.k+'" value="'+esc(nz(S.monthly[m.k]))+'"'+
|
|
3769
3779
|
(m.t==='date'?'':'')+' title="'+esc(m.tip||'')+'"></div>';
|
|
3770
3780
|
}).join('');
|
|
@@ -3958,13 +3968,23 @@ function renderRuleChecks(){
|
|
|
3958
3968
|
const vtxt=vnoInfo.min===vnoInfo.max?String(vnoInfo.min):vnoInfo.min+'-'+vnoInfo.max;
|
|
3959
3969
|
vnoBadge='<span class="vnobadge" title="本规则生成的凭证号">凭证 '+esc(vtxt)+'</span>';
|
|
3960
3970
|
}
|
|
3971
|
+
// 【P1.2.62】已生成的规则卡片上增加「清空本条」入口,避免一刀切全部清空
|
|
3972
|
+
const clearOne=generated?'<button type="button" class="clearone" title="清空这条规则的已生成标记" onclick="UI.clearGeneratedForRule(\''+esc(r.id)+'\')">清空</button>':'';
|
|
3961
3973
|
return '<label class="chkbox'+(generated?' generated':'')+'"><input type="checkbox" data-rid="'+esc(r.id)+'" '+
|
|
3962
3974
|
(S.selRules.has(r.id)?'checked':'')+' onchange="UI.toggleRuleSel(this)">'+
|
|
3963
|
-
esc(r.name||r.id)+(generated?'<span class="genbadge">已生成</span>':'')+vnoBadge+
|
|
3975
|
+
esc(r.name||r.id)+(generated?'<span class="genbadge">已生成</span>':'')+vnoBadge+clearOne+
|
|
3964
3976
|
'<span style="color:#8b949e;font-size:11px">'+esc(r.source)+'</span></label>';
|
|
3965
3977
|
}).join('')
|
|
3966
3978
|
:'<div style="color:#8b949e;font-size:12px;padding:8px">当前来源「'+esc(filter)+'」没规则可勾选。切到「全部」或在「③ 规则配置」加规则。</div>';
|
|
3967
3979
|
}
|
|
3980
|
+
function clearGeneratedForRule(ruleId){
|
|
3981
|
+
const r=S.rules.find(x=>x.id===ruleId);
|
|
3982
|
+
const name=r?esc(r.name||ruleId):ruleId;
|
|
3983
|
+
if(!confirm('确定清空规则「'+name+'」的已生成标记?\n(仅移除该规则的绿色「已生成」和凭证号记录,不影响凭证草稿和其他规则)')) return;
|
|
3984
|
+
S.genRules['delete'](ruleId);
|
|
3985
|
+
if(S.ruleVnos && S.ruleVnos[ruleId]) delete S.ruleVnos[ruleId];
|
|
3986
|
+
saveCfg(); renderRuleChecks(); toast('已清空「'+name+'」的生成标记');
|
|
3987
|
+
}
|
|
3968
3988
|
|
|
3969
3989
|
/* ---------- 规则编辑器(模态) ---------- */
|
|
3970
3990
|
let editing=null, editingIdx=-1;
|
|
@@ -6048,7 +6068,9 @@ window.UI={
|
|
|
6048
6068
|
selAllRules:v=>{S.selRules.clear();if(v)S.rules.forEach(r=>S.selRules.add(r.id));renderRuleChecks();},
|
|
6049
6069
|
renderRuleChecks:renderRuleChecks,
|
|
6050
6070
|
// 【P1.2.50】清空「已生成」绿色标记(规则删除时也会同步清理)
|
|
6051
|
-
|
|
6071
|
+
// 【P1.2.62】改名为「清空全部已生成」,与单条规则的「清空」入口区分
|
|
6072
|
+
clearGenerated:()=>{ if(!S.genRules.size){ toast('没有已生成标记可清空'); return; } if(!confirm('确定清空全部「已生成」绿色标记?\n已生成的凭证草稿不会受影响。'))return; S.genRules.clear(); S.ruleVnos={}; saveCfg(); renderRuleChecks(); toast('已清空全部生成标记'); },
|
|
6073
|
+
clearGeneratedForRule:clearGeneratedForRule,
|
|
6052
6074
|
// 【P1.2.35】全局排除弹窗:按业务源分组的总开关(在外面,不嵌在每条规则里)
|
|
6053
6075
|
openGlobalExcludes:()=>{
|
|
6054
6076
|
const ge = S.globalExcludes || (S.globalExcludes = {});
|
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": "① 内置默认基础表/规则/映射:新安装或分享打开即自带当前这套标准配置。② 生成凭证后实际生成了凭证的规则自动变绿并显示「已生成」徽章,状态持久化。③
|
|
2
|
+
"ver": "P1.2.63",
|
|
3
|
+
"npm": "1.2.63",
|
|
4
|
+
"url": "https://cdn.jsdelivr.net/npm/wwt-certificate-tool@1.2.63/dist/app.html",
|
|
5
|
+
"url_unpkg": "https://unpkg.com/wwt-certificate-tool@1.2.63/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.63.html",
|
|
7
|
+
"note": "① 内置默认基础表/规则/映射:新安装或分享打开即自带当前这套标准配置。② 生成凭证后实际生成了凭证的规则自动变绿并显示「已生成」徽章,状态持久化。③ 新增「清空全部已生成」按钮,同时每条规则卡片上增加「清空」入口,可单独清掉某条规则的生成标记而不影响其他规则。④ 凭证起始号放到「④ 生成凭证」页生成栏。⑤ 对碰检测跳过未结算单据,缺失清单增加「单号」与「付款方式/结算方式」列。⑥ 凭证审核表「核算维度」列移到「科目名称」后。⑦ 分录级拆分字段:每条分录可单独设置拆分字段,实现一张凭证内借方按单号拆、贷方汇总等混合拆分。⑧ 【P1.2.55】顶部工具栏增加「清空业务数据」按钮,只清本月业务数据表,保留基础数据、规则、映射和配置。⑨ 【P1.2.56】生成/审计自动跳过 Excel 底部的「合计/小计/总计」行,避免汇总金额被重复累加(如 人进价 145万 翻倍的翻倍问题);合计行在编辑器内仍可见、只是不参与凭证生成。⑩ 【P1.2.57】修复合计行识别:扫描行内所有字段,避免「合计」写在摘要/备注/行类型等非标识列时仍被误当作数据行累加。⑪ 【P1.2.58】合计行兜底识别:若某行「单位名称/供应商名称/单号等标识列全空 + 有非零金额」(即合计行无合计字样),也判定为合计行跳过,彻底杜绝金额翻倍。⑫ 【P1.2.59】修复全部汇总模式下摘要把全组供应商拼接的问题:{供应商名称}/{单位名称} 各自读取对应字段,且摘要上下文按最终分录小组构建,同一凭证内多个供应商不再互相串到摘要里。⑬ 【P1.2.60】多规则全选生成时按优先级排序:先「入库未确认/出库未确认/调拨未确认/在修车/已完工未结算」,再按付款方式/支付方式「对冲F/对账S/对账F/还件F/入库F/冲转S/冲转F/挂账/冲预收/冲预付/现金S/银行S/现金F/银行F」凑近凭证号;规则卡片显示本次生成的凭证号范围,方便核对。⑭ 【P1.2.61】重复生成时保留已有规则凭证号:第二次点生成若混选新旧规则,旧规则保持原凭证号不变,新规则从当前最大已用凭证号+1 往后延续,避免 150/151/150 这种号被覆盖的情况。⑮ 【P1.2.62】「清空已生成」支持按规则清空单条生成标记:规则卡片上的「清空」按钮只清当前规则,顶部「清空全部已生成」仍保留一键全清功能。⑯ 【P1.2.63】月度参数「账簿编码/核算组织编码/核算组织名称」三个字段蓝色高亮(边框+浅蓝底+标签前小圆点),提示引入前务必与金蝶档案核对一致;账簿名称保持常规不标色。"
|
|
8
8
|
}
|