From 69cd9f59a0fabf12f8c9147fcba7f69817a870b3 Mon Sep 17 00:00:00 2001 From: jiazx0107@163.com <jiazx0107@163.com> Date: 星期一, 06 十一月 2023 23:40:59 +0800 Subject: [PATCH] 更新仓内抓拍2 --- igds-inout/src/main/java/com/ld/igds/inout/view/InoutList.js | 41 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 41 insertions(+), 0 deletions(-) diff --git a/igds-inout/src/main/java/com/ld/igds/inout/view/InoutList.js b/igds-inout/src/main/java/com/ld/igds/inout/view/InoutList.js index 393ca23..b92b4da 100644 --- a/igds-inout/src/main/java/com/ld/igds/inout/view/InoutList.js +++ b/igds-inout/src/main/java/com/ld/igds/inout/view/InoutList.js @@ -86,4 +86,45 @@ //鎵撳嵃缁撶畻鍗� printPay = function(){ $alert("鎵撳嵃妯$増鏈畾涔夆�︹��"); +}; + + +/** + * 鑷姩璁$畻 + * @param name + */ +deAutoByWeight = function(name){ + + if(null == name) name = "1"; + + var curData = view.get("#dsMain.data:#"); + var fullWeight = curData.get("fullWeight"); + var emptyWeight = curData.get("emptyWeight"); + + if(fullWeight == 0 || emptyWeight == 0){ + return; + } + // 鍑�閲� + var netWeight = Number(fullWeight) - Number(emptyWeight); + + if (netWeight <= 0){ + $notify("鍑�閲嶅皬浜�0锛屽綋鍓嶇О閲嶅瓨鍦ㄩ�昏緫闂"); + return; + } + + //鎵i噸淇℃伅 + var deHandle = curData.get("deHandle"), deCheck = curData.get("deCheck"), dePackage = curData.get("dePackage"), addCheck = curData.get("addCheck"); + + var deSum = Number(deHandle) + Number(deCheck) + Number(dePackage); + + + /** 鍏ュ簱閲嶉噺 = 鍑�閲� - 鎬绘墸閲� */ + recordWeight = Number(netWeight) - Number(deSum); + + /** 缁撶畻閲嶉噺 = 鍑�閲� - 鎬绘墸閲� + 澧為噸 */ + settleWeight = Number(netWeight) - Number(deSum) + Number(addCheck); + + curData.set("netWeight",netWeight); + curData.set("settleWeight",settleWeight); + curData.set("recordWeight",recordWeight); }; \ No newline at end of file -- Gitblit v1.9.3