From 9df1652a644882443cc7c14297f3bd7af76582a1 Mon Sep 17 00:00:00 2001 From: Junjie <540245094@qq.com> Date: 星期一, 28 七月 2025 14:28:45 +0800 Subject: [PATCH] # --- src/main/webapp/static/js/pakStore/stockOut.js | 25 ++++++++++++++++++++++++- 1 files changed, 24 insertions(+), 1 deletions(-) diff --git a/src/main/webapp/static/js/pakStore/stockOut.js b/src/main/webapp/static/js/pakStore/stockOut.js index 333e006..485f456 100644 --- a/src/main/webapp/static/js/pakStore/stockOut.js +++ b/src/main/webapp/static/js/pakStore/stockOut.js @@ -2,7 +2,8 @@ var locDetlData = []; function getCol() { var cols = [ - {field: 'count', align: 'center',title: '鍑哄簱鏁伴噺', edit:'text', width: 130, style:'color: blue;font-weight: bold'} + {field: 'countWeight', align: 'center',title: '鍑哄簱杈呮暟閲�', edit:'text', width: 130, style:'color: blue;font-weight: bold'} + ,{field: 'count', align: 'center',title: '鍑哄簱鏁伴噺', width: 130, style:'color: blue;font-weight: bold'} ,{field: 'anfme', align: 'center',title: '搴撳瓨鏁伴噺'} ,{field: 'locNo$', align: 'center',title: '搴撲綅鍙�'} ]; @@ -55,6 +56,27 @@ layer.msg("鍑哄簱鏁伴噺涓嶅緱澶т簬搴撳瓨鏁伴噺", {icon: 2}); modify = false; } + } + } + if (obj.field === 'countWeight'){ + let vle = Number(obj.value); + if (isNaN(vle)) { + layer.msg("璇疯緭鍏ユ暟瀛�", {icon: 2}); + modify = false; + } else { + if (vle <= 0) { + layer.msg("鏁伴噺蹇呴』澶т簬闆�", {icon: 2}); + modify = false; + } + if (vle > Number(data.weight)) { + layer.msg("鍑哄簱鏁伴噺涓嶅緱澶т簬搴撳瓨鏁伴噺", {icon: 2}); + modify = false; + } + + let arr = data.origin.split("/") + let mainAnfme = vle * parseFloat(arr[1]) * parseFloat(arr[0]) + let flooredNum = Math.floor(mainAnfme * 10000) / 10000; // 鎴柇鍒板皬鏁扮偣鍚�4浣� + data.count = flooredNum } } if (modify) { @@ -170,6 +192,7 @@ data.splice(i--, 1); } else { data[i]["count"] = data[i]["anfme"]; + data[i]["countWeight"] = data[i]["weight"]; } } locDetlData.push.apply(locDetlData, data); -- Gitblit v1.9.1