wwt-certificate-tool 1.2.50 → 1.2.51
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 +22 -4
- 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.51</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.51</span></h1>
|
|
324
324
|
<div class="sub">纯前端离线版 · 双击即用 · 数据只存在本机,不上传任何服务器</div>
|
|
325
325
|
</div>
|
|
326
326
|
</div>
|
|
@@ -410,6 +410,7 @@ input[data-f="field"][list^="dlGe_"]::placeholder{color:#a8861f;font-style:itali
|
|
|
410
410
|
</select>
|
|
411
411
|
</label>
|
|
412
412
|
<label>分组字段 <input type="text" id="genGroupBy" placeholder="单位名称"></label>
|
|
413
|
+
<label>凭证起始号 <input type="number" id="genVStart" value="1" style="width:70px" title="生成凭证时第一张凭证的编号,可在生成前直接改"></label>
|
|
413
414
|
<button class="btn primary" onclick="UI.doGenerate()">⚙ 生成凭证草稿</button>
|
|
414
415
|
<button class="btn" onclick="UI.clearGenerated()" title="清空规则列表的绿色「已生成」标记">清空已生成</button>
|
|
415
416
|
</div>
|
|
@@ -2525,7 +2526,7 @@ const S = window.__STATE__ = {
|
|
|
2525
2526
|
};
|
|
2526
2527
|
|
|
2527
2528
|
/* ---------------- 版本 & 框架自动更新(只更新程序本身,本地数据/规则不动) ---------------- */
|
|
2528
|
-
const WWT_VER=(function(){const raw='P1.2.
|
|
2529
|
+
const WWT_VER=(function(){const raw='P1.2.51';return raw.indexOf('__WVER__')>=0?'P1.2.10':raw;})();
|
|
2529
2530
|
const UPD_URL_KEY='wwt_fe_updurl';
|
|
2530
2531
|
// 默认更新源:Gitee 上本项目的 version.json(API 接口,浏览器可直接跨域读)
|
|
2531
2532
|
const DEFAULT_UPD_URL='https://gitee.com/api/v5/repos/wwtmrhu/certificate-generation/contents/dist/version.json';
|
|
@@ -4204,6 +4205,16 @@ function redrawRuleForm(){
|
|
|
4204
4205
|
* ④ 生成凭证
|
|
4205
4206
|
* ============================================================ */
|
|
4206
4207
|
function doGenerate(){
|
|
4208
|
+
// 【P1.2.51】生成栏里的「凭证起始号」优先级最高:生成前把它写回 S.monthly,并同步到②映射页的输入框
|
|
4209
|
+
const vsInp=$('genVStart');
|
|
4210
|
+
if(vsInp){
|
|
4211
|
+
const vs=vsInp.value.trim();
|
|
4212
|
+
if(vs!==''){
|
|
4213
|
+
S.monthly.vstart=vs;
|
|
4214
|
+
const v2=document.querySelector('input[data-mk="vstart"]');
|
|
4215
|
+
if(v2)v2.value=vs;
|
|
4216
|
+
}
|
|
4217
|
+
}
|
|
4207
4218
|
collectMonthly(); collectMaps();
|
|
4208
4219
|
if(!Object.keys(S.biz).some(k=>(S.biz[k]||[]).length)){ toast('先到「① 上传数据」传业务数据表'); return; }
|
|
4209
4220
|
if(!S.rules.length){ toast('还没有规则,去「③ 规则配置」建一条'); return; }
|
|
@@ -5498,7 +5509,13 @@ function switchTab(t){
|
|
|
5498
5509
|
document.querySelectorAll('.pane').forEach(p=>p.classList.toggle('on',p.id==='tab-'+t));
|
|
5499
5510
|
if(t==='maps'&&!$('monthlyForm').innerHTML)renderMaps();
|
|
5500
5511
|
if(t==='vrules'&&!$('ruleList').innerHTML)renderRules();
|
|
5501
|
-
if(t==='gen'
|
|
5512
|
+
if(t==='gen'){
|
|
5513
|
+
if(!$('ruleChecks').innerHTML)renderRuleChecks();
|
|
5514
|
+
// 【P1.2.51】切到生成页时,把最新的凭证起始号同步到生成栏,避免月度参数页改了这里还是旧值
|
|
5515
|
+
const v2=document.querySelector('input[data-mk="vstart"]');
|
|
5516
|
+
const vs=v2?v2.value:(S.monthly.vstart||1);
|
|
5517
|
+
if($('genVStart'))$('genVStart').value=vs;
|
|
5518
|
+
}
|
|
5502
5519
|
if(t==='audit')renderAudit();
|
|
5503
5520
|
}
|
|
5504
5521
|
async function init(){
|
|
@@ -5545,6 +5562,7 @@ async function init(){
|
|
|
5545
5562
|
S.balance=S.draft.length?E.balanceCheck(S.draft):null;
|
|
5546
5563
|
S.rules.forEach(r=>S.selRules.add(r.id));
|
|
5547
5564
|
if(S.monthly.date)$('genDate').value=S.monthly.date;
|
|
5565
|
+
if($('genVStart'))$('genVStart').value=S.monthly.vstart||1;
|
|
5548
5566
|
// 4) 顶部持久化状态提示(让用户一眼看清"能不能撑过刷新")
|
|
5549
5567
|
renderPersistHint();
|
|
5550
5568
|
if(getUpdUrl() && location.protocol!=='blob:' && window.parent===window) checkUpdate(true); // 已配置更新地址则静默检查一次;启动器内(blob URL 或 iframe srcdoc)由启动器统一处理更新
|
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.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】「凭证起始号」放到「④ 生成凭证」页生成栏,生成前可直接修改,修改后即时生效。"
|
|
8
8
|
}
|