wwt-certificate-tool 1.2.75 → 1.2.76
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 +29 -11
- 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.76</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}
|
|
@@ -328,7 +328,7 @@ input[data-f="field"][list^="dlGe_"]::placeholder{color:#a8861f;font-style:itali
|
|
|
328
328
|
<div class="brand">
|
|
329
329
|
<span class="logo">WWT</span>
|
|
330
330
|
<div>
|
|
331
|
-
<h1>金蝶凭证工具 <span class="ver">P1.2.
|
|
331
|
+
<h1>金蝶凭证工具 <span class="ver">P1.2.76</span></h1>
|
|
332
332
|
<div class="sub">纯前端离线版 · 双击即用 · 数据只存在本机,不上传任何服务器</div>
|
|
333
333
|
</div>
|
|
334
334
|
</div>
|
|
@@ -543,6 +543,12 @@ input[data-f="field"][list^="dlGe_"]::placeholder{color:#a8861f;font-style:itali
|
|
|
543
543
|
<label>单据头起始号 <input type="number" id="assetBillStart" value="200000" style="width:100px"></label>
|
|
544
544
|
<label>子表序号起始 <input type="number" id="assetSubStart" value="200000" style="width:100px"></label>
|
|
545
545
|
</div>
|
|
546
|
+
<div class="genbar" style="margin-top:8px">
|
|
547
|
+
<label class="chk"><input type="checkbox" id="assetUseDefDept"> 使用默认费用部门(不分部门的行统一填下面这个)</label>
|
|
548
|
+
<label>默认部门名称 <input type="text" id="assetDefDeptName" value="公司费用" style="width:120px" placeholder="如 公司费用"></label>
|
|
549
|
+
<label>默认部门编码 <input type="text" id="assetDefDeptCode" value="006" style="width:90px" placeholder="如 006"></label>
|
|
550
|
+
<span style="font-size:12px;color:#666">(不勾选时:按费用部门→仓位→库号推断,费用部门空则随资产位置,如 福特仓→广州维修基地)</span>
|
|
551
|
+
</div>
|
|
546
552
|
<div id="assetStat" class="stat"></div>
|
|
547
553
|
<div id="assetBanner"></div>
|
|
548
554
|
<div class="tablewrap" id="assetWrap"></div>
|
|
@@ -2760,7 +2766,7 @@ const S = window.__STATE__ = {
|
|
|
2760
2766
|
};
|
|
2761
2767
|
|
|
2762
2768
|
/* ---------------- 版本 & 框架自动更新(只更新程序本身,本地数据/规则不动) ---------------- */
|
|
2763
|
-
const WWT_VER=(function(){const raw='P1.2.
|
|
2769
|
+
const WWT_VER=(function(){const raw='P1.2.76';return raw.indexOf('__WVER__')>=0?'P1.2.10':raw;})();
|
|
2764
2770
|
const UPD_URL_KEY='wwt_fe_updurl';
|
|
2765
2771
|
// 默认更新源:Gitee 上本项目的 version.json(API 接口,浏览器可直接跨域读)
|
|
2766
2772
|
const DEFAULT_UPD_URL='https://gitee.com/api/v5/repos/wwtmrhu/certificate-generation/contents/dist/version.json';
|
|
@@ -5918,7 +5924,7 @@ async function init(){
|
|
|
5918
5924
|
}
|
|
5919
5925
|
}
|
|
5920
5926
|
}
|
|
5921
|
-
// 【P1.2.
|
|
5927
|
+
// 【P1.2.76】资产基础表(资产位置表/资产类别表)随其它内置表在启动时一并补全,
|
|
5922
5928
|
// 仅在用户未上传(表缺失或空)时补,绝不覆盖用户已上传的数据。
|
|
5923
5929
|
const AP=window.__ASSET_PRESET__||{};
|
|
5924
5930
|
for(const k of Object.keys(AP)){
|
|
@@ -6235,7 +6241,7 @@ function _dvFilter(){
|
|
|
6235
6241
|
|
|
6236
6242
|
|
|
6237
6243
|
/* ============================================================
|
|
6238
|
-
* ⑨ 资产卡片生成引擎 (P1.2.
|
|
6244
|
+
* ⑨ 资产卡片生成引擎 (P1.2.76)
|
|
6239
6245
|
* 数据源:库存.xls(厂牌含"资产工具") + 入库明细.xls(零件编码关联)
|
|
6240
6246
|
* 输出:金蝶资产卡片引入文件(37列 + 可选供应商/客户/付款方式列)
|
|
6241
6247
|
* ============================================================ */
|
|
@@ -6388,9 +6394,18 @@ const ASSET = (function(){
|
|
|
6388
6394
|
const posCode=posIdx.byName[placeName]||'';
|
|
6389
6395
|
if(!posCode) stats.posMiss++;
|
|
6390
6396
|
const posName=posCode?(posIdx.byCode[posCode]||placeName):placeName;
|
|
6391
|
-
//
|
|
6392
|
-
|
|
6393
|
-
|
|
6397
|
+
// 使用部门(P1.2.76):
|
|
6398
|
+
// ① 若启用「默认费用部门」→ 全部卡片强制用用户填的名称+编码(不分部门的用户)
|
|
6399
|
+
// ② 否则按 费用部门 → 仓位 → 库号 推断,并经过 normPlace 归一化
|
|
6400
|
+
// (费用部门为空时随位置走,如「福特仓」→「广州维修基地」)
|
|
6401
|
+
let deptName, deptCode;
|
|
6402
|
+
if(opts.useDefDept){
|
|
6403
|
+
deptName=clean(opts.defDeptName)||'公司费用';
|
|
6404
|
+
deptCode=clean(opts.defDeptCode)||deptIdx[deptName]||'';
|
|
6405
|
+
}else{
|
|
6406
|
+
deptName=normPlace(clean(r['费用部门'])||clean(r['仓位'])||clean(r['库号']));
|
|
6407
|
+
deptCode=deptIdx[deptName]||'';
|
|
6408
|
+
}
|
|
6394
6409
|
if(!deptCode) stats.deptMiss++;
|
|
6395
6410
|
const cost=isLow(cg.name)?COST.low:COST.fixed;
|
|
6396
6411
|
// 供应商/客户/付款方式
|
|
@@ -6429,7 +6444,7 @@ const ASSET = (function(){
|
|
|
6429
6444
|
})();
|
|
6430
6445
|
|
|
6431
6446
|
|
|
6432
|
-
/* ===== P1.2.
|
|
6447
|
+
/* ===== P1.2.76 模块9 UI 交互 ===== */
|
|
6433
6448
|
const ASSET_UI=(function(){
|
|
6434
6449
|
function log(msg){ const l=$('assetLog'); if(!l)return; l.classList.add('on');
|
|
6435
6450
|
l.innerHTML+='<div>'+new Date().toLocaleTimeString('zh-CN')+' '+esc(msg)+'</div>'; l.scrollTop=l.scrollHeight; }
|
|
@@ -6466,6 +6481,9 @@ const ASSET_UI=(function(){
|
|
|
6466
6481
|
acctFrom: $('acctDateFrom')?$('acctDateFrom').value:'same',
|
|
6467
6482
|
billStart: $('assetBillStart')?$('assetBillStart').value:'200000',
|
|
6468
6483
|
subStart: $('assetSubStart')?$('assetSubStart').value:'200000',
|
|
6484
|
+
useDefDept: !!$('assetUseDefDept')?.checked,
|
|
6485
|
+
defDeptName: $('assetDefDeptName')?$('assetDefDeptName').value:'公司费用',
|
|
6486
|
+
defDeptCode: $('assetDefDeptCode')?$('assetDefDeptCode').value:'006',
|
|
6469
6487
|
});
|
|
6470
6488
|
if(!r.ok){ $('assetBanner').innerHTML='<div class="banner err">❌ '+esc(r.msg)+'</div>'; toast(r.msg); return; }
|
|
6471
6489
|
S.assetResult=r;
|
|
@@ -6530,7 +6548,7 @@ const ASSET_UI=(function(){
|
|
|
6530
6548
|
el._assetBound=true;
|
|
6531
6549
|
el.addEventListener('change',async e=>{ await onFiles(Array.from(e.target.files||[])); e.target.value=''; });
|
|
6532
6550
|
}
|
|
6533
|
-
// 【P1.2.
|
|
6551
|
+
// 【P1.2.76】拖拽上传:把 库存.xls / 入库明细.xls 拖到按钮上即可(复用上传数据页的 .dropzone 高亮样式)
|
|
6534
6552
|
const dz=$('assetDrop');
|
|
6535
6553
|
if(dz && !dz._assetDropBound){
|
|
6536
6554
|
dz._assetDropBound=true;
|
|
@@ -6831,7 +6849,7 @@ if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',
|
|
|
6831
6849
|
else init();
|
|
6832
6850
|
})();
|
|
6833
6851
|
|
|
6834
|
-
/* ===== P1.2.
|
|
6852
|
+
/* ===== P1.2.76 内置:资产位置表 / 资产类别表 默认数据 ===== */
|
|
6835
6853
|
window.__ASSET_PRESET__={
|
|
6836
6854
|
'资产位置表':[
|
|
6837
6855
|
{编码:'AOA001',地址:'广州市花都区先科一路',详细地址:'广州市花都区先科一路'},
|
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.76",
|
|
3
|
+
"npm": "1.2.76",
|
|
4
|
+
"url": "https://cdn.jsdelivr.net/npm/wwt-certificate-tool@1.2.76/dist/app.html",
|
|
5
|
+
"url_unpkg": "https://unpkg.com/wwt-certificate-tool@1.2.76/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.76.html",
|
|
7
|
+
"note": "㉙ 【P1.2.76】修复使用部门:费用部门为空时随资产位置推断(福特仓→广州维修基地/编码003.003);新增「默认费用部门」勾选框,可自填名称+编码(如 006 公司费用)统一填入。"
|
|
8
8
|
}
|