From 6dea1627b77c43bd6693592b2a37be894e7d5bb6 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 30 十月 2023 19:11:11 +0800
Subject: [PATCH] 发货通知单:子表公式重算、退出按钮优化
---
WebTM/views/销售管理/发货通知单/Add_Edit_Xs_SeOutStockBillList.html | 82 ++++++++++++++++++++++++++++++++++++++++-
WebTM/Properties/PublishProfiles/JFTM.pubxml.user | 2
2 files changed, 81 insertions(+), 3 deletions(-)
diff --git a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
index 61487f5..2585661 100644
--- a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
+++ b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
@@ -4578,7 +4578,7 @@
<publishTime>10/26/2023 20:16:37</publishTime>
</File>
<File Include="views/閿�鍞鐞�/鍙戣揣閫氱煡鍗�/Add_Edit_Xs_SeOutStockBillList.html">
- <publishTime>10/07/2023 09:12:15</publishTime>
+ <publishTime>10/30/2023 19:07:36</publishTime>
</File>
<File Include="views/閿�鍞鐞�/鍙戣揣閫氱煡鍗�/Xs_SeOutStockBillList.html">
<publishTime>10/07/2023 09:12:15</publishTime>
diff --git "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\345\217\221\350\264\247\351\200\232\347\237\245\345\215\225/Add_Edit_Xs_SeOutStockBillList.html" "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\345\217\221\350\264\247\351\200\232\347\237\245\345\215\225/Add_Edit_Xs_SeOutStockBillList.html"
index ee0f095..fb179b2 100644
--- "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\345\217\221\350\264\247\351\200\232\347\237\245\345\215\225/Add_Edit_Xs_SeOutStockBillList.html"
+++ "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\345\217\221\350\264\247\351\200\232\347\237\245\345\215\225/Add_Edit_Xs_SeOutStockBillList.html"
@@ -439,7 +439,11 @@
//閫�鍑烘寜閽�
form.on('submit(Exit)', function () {
- Pub_Close(1);
+ if (params[1] != null) {
+ Pub_Close(1);
+ } else if (params[1] == null) {
+ Pub_Close(2);
+ }
})
//閫夋嫨涓氬姟鍛樻寜閽�
@@ -500,6 +504,80 @@
});
}
});
+
+ //#region 鐩戝惉鍗曞厓鏍肩紪杈� 鍗曞厓鏍肩紪杈戝悗 鍙樻洿
+ table.on('edit(mainTable)', function (obj) {
+ //鏁板�兼牸寮忔牎楠屽伐鍏�
+ var ref = /^\d+(\.\d+)?$/; //闈炶礋鏁版鍒欒〃杈惧紡
+ var temp = "";
+
+ // 鍗曞厓鏍肩紪杈戜箣鍓嶇殑鍊�
+ var oldText = $(this).prev().text();
+ var value = obj.value //寰楀埌淇敼鍚庣殑鍊�
+ , data = obj.data //寰楀埌鎵�鍦ㄨ鎵�鏈夐敭鍊�
+ , field = obj.field; //寰楀埌瀛楁
+ //layer.msg('[ID: ' + data.id + '] ' + field + ' 瀛楁鏇存敼涓猴細' + value);
+
+ switch (field) {
+ case "HQty": //瀹炲彂鏁伴噺
+ //鏁版嵁鏍煎紡鏍¢獙
+ temp = value + "";
+ if (!ref.test(temp) || temp == 0) {
+ //鎭㈠鏁版嵁鍒扮紪杈戝墠
+ obj.update({
+ HQty: oldText
+ });
+ table.render(option);
+
+ layer.msg("瀹炲彂鏁伴噺璇疯緭鍏ュぇ浜�0鐨勬暟瀛�!");
+ return;
+ }
+
+
+ //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
+ var HQty = value * 1; //瀹炲彂鏁伴噺
+ var HPrice = obj.data.HPrice * 1; //鍗曚环
+ var HMoney = HQty * HPrice; //閲戦=瀹炲彂鏁伴噺*鍗曚环
+
+ //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+ obj.update({
+ HQty: HQty
+ , HPrice: HPrice
+ , HMoney: HMoney
+ });
+ table.render(option);
+ break;
+ case "HPrice": //鍗曚环
+ //鏁版嵁鏍煎紡鏍¢獙
+ temp = value + "";
+ if (!ref.test(temp) || temp == 0) {
+ //鎭㈠鏁版嵁鍒扮紪杈戝墠
+ obj.update({
+ HPrice: oldText
+ });
+ table.render(option);
+
+ layer.msg("鍗曚环璇疯緭鍏ュぇ浜�0鐨勬暟瀛�!");
+ return;
+ }
+
+ //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
+ var HQty = obj.data.HQty * 1; //瀹炲彂鏁伴噺
+ var HPrice = value * 1; //鍗曚环
+ var HMoney = HQty * HPrice; //閲戦=瀹炲彂鏁伴噺*鍗曚环
+
+ //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+ obj.update({
+ HQty: HQty
+ , HPrice: HPrice
+ , HMoney: HMoney
+ });
+ table.render(option);
+ break;
+ default:
+ }
+ });
+ //#endregion
//#endregion
@@ -535,7 +613,7 @@
, { field: '鍙戣揣浠撳簱', title: '鍙戣揣浠撳簱', width: 100, edit: 'text', event: "HWHID" }//f7
, { field: 'HQty', title: '鏁伴噺', width: 100, edit: 'text' }
, { field: 'HPrice', title: '鍗曚环', width: 100, edit: 'text' }
- , { field: 'HMoney', title: '閲戦', width: 100, edit: 'text' }
+ , { field: 'HMoney', title: '閲戦', width: 100 }
, { field: 'HRemark', title: '澶囨敞', width: 100, edit: 'text' }
, { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
]]
--
Gitblit v1.9.1