wwt-certificate-tool 1.2.74 → 1.2.75
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 -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.75</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.75</span></h1>
|
|
332
332
|
<div class="sub">纯前端离线版 · 双击即用 · 数据只存在本机,不上传任何服务器</div>
|
|
333
333
|
</div>
|
|
334
334
|
</div>
|
|
@@ -510,7 +510,9 @@ input[data-f="field"][list^="dlGe_"]::placeholder{color:#a8861f;font-style:itali
|
|
|
510
510
|
<br><b>资产编码 = 零件编码</b>(如 D2206020054);<b>资产类别按零件编码首字母</b>自动判定;资产位置/使用部门等映射可在下方查看与微调。
|
|
511
511
|
</div>
|
|
512
512
|
<div class="genbar">
|
|
513
|
-
<
|
|
513
|
+
<span class="dropzone" id="assetDrop" title="点击选择,或把 库存.xls / 入库明细.xls 拖到这里" style="display:inline-block">
|
|
514
|
+
<button class="btn" onclick="UI.assetPick()">📂 上传 库存.xls / 入库明细.xls(可拖入)</button>
|
|
515
|
+
</span>
|
|
514
516
|
<button class="btn primary big" onclick="UI.assetGenerate()">⚙ 生成资产卡片</button>
|
|
515
517
|
<button class="btn ghost" id="btnAssetDl" style="display:none" onclick="UI.assetDownload()">📥 下载资产卡片引入文件</button>
|
|
516
518
|
<button class="btn ghost" onclick="UI.assetReset()">🧹 清空生成结果</button>
|
|
@@ -2758,7 +2760,7 @@ const S = window.__STATE__ = {
|
|
|
2758
2760
|
};
|
|
2759
2761
|
|
|
2760
2762
|
/* ---------------- 版本 & 框架自动更新(只更新程序本身,本地数据/规则不动) ---------------- */
|
|
2761
|
-
const WWT_VER=(function(){const raw='P1.2.
|
|
2763
|
+
const WWT_VER=(function(){const raw='P1.2.75';return raw.indexOf('__WVER__')>=0?'P1.2.10':raw;})();
|
|
2762
2764
|
const UPD_URL_KEY='wwt_fe_updurl';
|
|
2763
2765
|
// 默认更新源:Gitee 上本项目的 version.json(API 接口,浏览器可直接跨域读)
|
|
2764
2766
|
const DEFAULT_UPD_URL='https://gitee.com/api/v5/repos/wwtmrhu/certificate-generation/contents/dist/version.json';
|
|
@@ -5916,7 +5918,7 @@ async function init(){
|
|
|
5916
5918
|
}
|
|
5917
5919
|
}
|
|
5918
5920
|
}
|
|
5919
|
-
// 【P1.2.
|
|
5921
|
+
// 【P1.2.75】资产基础表(资产位置表/资产类别表)随其它内置表在启动时一并补全,
|
|
5920
5922
|
// 仅在用户未上传(表缺失或空)时补,绝不覆盖用户已上传的数据。
|
|
5921
5923
|
const AP=window.__ASSET_PRESET__||{};
|
|
5922
5924
|
for(const k of Object.keys(AP)){
|
|
@@ -6233,7 +6235,7 @@ function _dvFilter(){
|
|
|
6233
6235
|
|
|
6234
6236
|
|
|
6235
6237
|
/* ============================================================
|
|
6236
|
-
* ⑨ 资产卡片生成引擎 (P1.2.
|
|
6238
|
+
* ⑨ 资产卡片生成引擎 (P1.2.75)
|
|
6237
6239
|
* 数据源:库存.xls(厂牌含"资产工具") + 入库明细.xls(零件编码关联)
|
|
6238
6240
|
* 输出:金蝶资产卡片引入文件(37列 + 可选供应商/客户/付款方式列)
|
|
6239
6241
|
* ============================================================ */
|
|
@@ -6427,7 +6429,7 @@ const ASSET = (function(){
|
|
|
6427
6429
|
})();
|
|
6428
6430
|
|
|
6429
6431
|
|
|
6430
|
-
/* ===== P1.2.
|
|
6432
|
+
/* ===== P1.2.75 模块9 UI 交互 ===== */
|
|
6431
6433
|
const ASSET_UI=(function(){
|
|
6432
6434
|
function log(msg){ const l=$('assetLog'); if(!l)return; l.classList.add('on');
|
|
6433
6435
|
l.innerHTML+='<div>'+new Date().toLocaleTimeString('zh-CN')+' '+esc(msg)+'</div>'; l.scrollTop=l.scrollHeight; }
|
|
@@ -6528,6 +6530,18 @@ const ASSET_UI=(function(){
|
|
|
6528
6530
|
el._assetBound=true;
|
|
6529
6531
|
el.addEventListener('change',async e=>{ await onFiles(Array.from(e.target.files||[])); e.target.value=''; });
|
|
6530
6532
|
}
|
|
6533
|
+
// 【P1.2.75】拖拽上传:把 库存.xls / 入库明细.xls 拖到按钮上即可(复用上传数据页的 .dropzone 高亮样式)
|
|
6534
|
+
const dz=$('assetDrop');
|
|
6535
|
+
if(dz && !dz._assetDropBound){
|
|
6536
|
+
dz._assetDropBound=true;
|
|
6537
|
+
dz.addEventListener('dragover',e=>{ e.preventDefault(); e.stopPropagation(); dz.classList.add('drag-over'); });
|
|
6538
|
+
dz.addEventListener('dragleave',e=>{ e.preventDefault(); e.stopPropagation(); dz.classList.remove('drag-over'); });
|
|
6539
|
+
dz.addEventListener('drop',async e=>{
|
|
6540
|
+
e.preventDefault(); e.stopPropagation(); dz.classList.remove('drag-over');
|
|
6541
|
+
const fs=Array.from(e.dataTransfer&&e.dataTransfer.files||[]);
|
|
6542
|
+
if(fs.length) await onFiles(fs);
|
|
6543
|
+
});
|
|
6544
|
+
}
|
|
6531
6545
|
// 自动带出会计期间(月度参数 年-期间),如 2026-11
|
|
6532
6546
|
const per=$('assetPeriod');
|
|
6533
6547
|
if(per && !per.value && S.monthly && S.monthly.year && S.monthly.period){
|
|
@@ -6817,7 +6831,7 @@ if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',
|
|
|
6817
6831
|
else init();
|
|
6818
6832
|
})();
|
|
6819
6833
|
|
|
6820
|
-
/* ===== P1.2.
|
|
6834
|
+
/* ===== P1.2.75 内置:资产位置表 / 资产类别表 默认数据 ===== */
|
|
6821
6835
|
window.__ASSET_PRESET__={
|
|
6822
6836
|
'资产位置表':[
|
|
6823
6837
|
{编码:'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.75",
|
|
3
|
+
"npm": "1.2.75",
|
|
4
|
+
"url": "https://cdn.jsdelivr.net/npm/wwt-certificate-tool@1.2.75/dist/app.html",
|
|
5
|
+
"url_unpkg": "https://unpkg.com/wwt-certificate-tool@1.2.75/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.75.html",
|
|
7
|
+
"note": "㉘ 【P1.2.75】模块⑨资产卡片上传区支持拖拽:把 库存.xls / 入库明细.xls 直接拖到上传按钮即可导入,拖拽时有高亮提示。"
|
|
8
8
|
}
|