From 34e3301ff24f10100dae8c9b4b98cafef1b6a653 Mon Sep 17 00:00:00 2001 From: jiazx0107@163.com <jiazx0107@163.com> Date: 星期日, 25 六月 2023 21:17:51 +0800 Subject: [PATCH] 出入库流程优化-入库详单优化 --- igds-inout/src/main/java/com/ld/igds/inout/view/InoutList.view.xml | 115 ++++----------------------------------------------------- 1 files changed, 9 insertions(+), 106 deletions(-) diff --git a/igds-inout/src/main/java/com/ld/igds/inout/view/InoutList.view.xml b/igds-inout/src/main/java/com/ld/igds/inout/view/InoutList.view.xml index 29a11fe..fa9fff5 100644 --- a/igds-inout/src/main/java/com/ld/igds/inout/view/InoutList.view.xml +++ b/igds-inout/src/main/java/com/ld/igds/inout/view/InoutList.view.xml @@ -222,7 +222,6 @@ edit = function(){
 var data = view.get("#dataGridMain.currentEntity");
 if(!data) return;
 - 
 if ("RECORD" == data.get("progress")) {
 view.get("#btnOK").set("visible",true);
 }else{
 @@ -334,110 +333,6 @@ });
 };
 </ClientEvent> - <ClientEvent name="onCreate">
 -/**
 - * 鑷姩璁$畻锛屽綋鍓嶉〉闈笉鑷姩鍏宠仈鎵︽牱璁板綍锛屽叏閮ㄧ敱鎵嬪姩涓哄噯
 - * 
 - * 1.鍑�閲� = 姣涢噸 - 鐨噸
 - * 2.鎬绘墸閲� = 鐜板満鎵i噸 + 鍏朵粬鎵i噸 + 鎵f按鏉傝川
 - * 3.缁撶畻閲嶉噺 = 鍑�閲� - 鎬绘墸閲� 锛堝惈姘存潅澧為噸锛�
 - * 4.鍑�/鍏ュ簱閲嶉噺 = 鍑�閲� - 鎬绘墸閲� 锛堜笉鍚按鏉傚閲嶏級
 - * 
 - * 5.鍏ュ簱鏃讹細鎵f按鏉� 姝f暟 = 鎵i噸锛岃礋鏁� = 澧為噸
 - * 6.鍑哄簱鏃讹細姘村垎澧為噸锛屾鏁�=澧為噸锛岃礋鏁�=鎵i噸
 - */
 -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;
 - }
 - 
 - //姹囨�荤粨鏋�
 - var deSum = 0, addSum = 0, settleWeight = 0, recordWeight = 0;
 - //鎵f按鏉�
 - var deWet = 0;
 - 
 - var impurity = 0;
 - 
 - 
 - var deBase = 0, multiple = 0;
 - var checkItems = curData.get("checkItems");
 -
 - /** 鎬绘墸閲嶏紝涓嶅惈澧為噸*/
 - deSum = Number(curData.get("deOther")) + Number(curData.get("deHandle"));
 - 
 - //鍑哄簱
 - if ("OUT" == curData.get("type")) {
 - if (Number(deWet) > 0) {//澧為噸
 - addSum = addSum + Number(deWet);
 - } else {
 - deSum = deSum + Number(deWet);
 - }
 -
 - if (Number(deImpurity) > 0) {//鎵i噸
 - deSum = deSum + Number(deImpurity);
 - } else {
 - addSum = addSum + Number(deImpurity);
 - }
 - }else{
 - if (Number(deWet) > 0) {//鎵i噸
 - deSum = deSum + Number(deWet);
 - } else {
 - addSum = addSum + Number(deWet);
 - }
 - if (Number(deImpurity) > 0) {//鎵i噸
 - deSum = deSum + Number(deImpurity);
 - } else {
 - addSum = addSum + Number(deImpurity);
 - }
 - }
 - 
 - deSum = deSum.toFixed(0);
 - /** 澧為噸杞鏁帮紝渚夸簬璁$畻 */
 - addSum = Math.abs(addSum).toFixed(0);
 - 
 - /** 鍏ュ簱閲嶉噺 = 鍑�閲� - 鎬绘墸閲� */
 - recordWeight = Number(netWeight) - Number(deSum);
 - 
 - /** 缁撶畻閲嶉噺 = 鍑�閲� - 鎬绘墸閲� + 澧為噸 */
 - settleWeight = Number(netWeight) - Number(deSum) + Number(addSum);
 - 
 - curData.set("netWeight",netWeight);
 - curData.set("settleWeight",settleWeight);
 - curData.set("recordWeight",recordWeight);
 -};
 -
 -/**
 - * 鏍规嵁鍖栭獙椤瑰拰浼犻�掕繃鏉ョ殑鍙傛暟鑾峰彇褰撳墠鍙傛暟鐨勯厤缃俊鎭�
 - * @param checkItems
 - * @param code1 绯荤粺鍙傛暟ID
 - * @param code2 鍥芥爣鍙傛暟ID
 - * @returns {undefined}
 - */
 -function getCheckItem(checkItems, code1, code2) {
 - if (!checkItems) return null;
 - $.each(checkItems, function (index, checkItem) {
 - if (checkItem.get("standardId") == code1 || checkItem.get("standardId") == code2) {
 - if (checkItem.get("ruleNum") && checkItem.get("upperLimit") > 0.0) {
 - return checkItem;
 - }
 - }
 - });
 - return null;
 -}</ClientEvent> <Property name="packages">font-awesome,css-common</Property> <Property name="javaScriptFile">./static/plugins/lodop/LodopFuncs.js</Property> <DataSet id="dsMain"> @@ -861,7 +756,7 @@ var id = self.getDom().id;
 var prop = id.substring(2,id.length);
 deAutoByWeight(prop);
 - </ClientEvent> +</ClientEvent> <Property name="name">fullWeight</Property> <Property name="property">fullWeight</Property> <Editor/> @@ -902,11 +797,19 @@ <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> + <ClientEvent name="onBlur">//id 瑙勫垯 d_prop
 +var id = self.getDom().id;
 +var prop = id.substring(2,id.length);
 +deAutoByWeight(prop);</ClientEvent> <Property name="name">deCheck</Property> <Property name="property">deCheck</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> + <ClientEvent name="onBlur">//id 瑙勫垯 d_prop
 +var id = self.getDom().id;
 +var prop = id.substring(2,id.length);
 +deAutoByWeight(prop);</ClientEvent> <Property name="name">addCheck</Property> <Property name="property">addCheck</Property> <Editor/> -- Gitblit v1.9.3