From a62f415be2b0f37eb2b5340ad4c7626260c40289 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 13 一月 2025 10:10:38 +0800
Subject: [PATCH] 宝工排产:表头排序功能,排序后实际数据与显示数据不一致问题 解决

---
 WebTM/Properties/PublishProfiles/JFTM.pubxml.user |    4 ++--
 WebTM/views/生产管理/宝工排产/JIT_DayPlanPlatForm.html    |   12 ++++++++++++
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
index 9e4bc87..d46abf2 100644
--- a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
+++ b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
@@ -4897,7 +4897,7 @@
       <publishTime>09/11/2024 21:05:00</publishTime>
     </File>
     <File Include="views/鐢熶骇绠$悊/瀹濆伐鎺掍骇/JIT_DayPlanPlatForm.html">
-      <publishTime>01/13/2025 09:45:34</publishTime>
+      <publishTime>01/13/2025 09:57:33</publishTime>
     </File>
     <File Include="views/鐢熶骇绠$悊/宸ュ崟/Sc_CurrentTicket.html">
       <publishTime>06/07/2024 15:42:08</publishTime>
@@ -7228,7 +7228,7 @@
       <publishTime>12/02/2024 15:15:02</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/鏀舵鍗�/YS_ReceiveBillList.html">
-      <publishTime>12/02/2024 15:15:02</publishTime>
+      <publishTime>01/13/2025 10:02:52</publishTime>
     </File>
     <File Include="views/閿�鍞鐞�/鏀舵鍗�/YS_ReceiveBillQuery.html">
       <publishTime>12/02/2024 15:15:02</publishTime>
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\256\235\345\267\245\346\216\222\344\272\247/JIT_DayPlanPlatForm.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\256\235\345\267\245\346\216\222\344\272\247/JIT_DayPlanPlatForm.html"
index cea54b7..62972a4 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\256\235\345\267\245\346\216\222\344\272\247/JIT_DayPlanPlatForm.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\256\235\345\267\245\346\216\222\344\272\247/JIT_DayPlanPlatForm.html"
@@ -1086,6 +1086,18 @@
                         option.data = table.cache["mainTable"];
                     }
                 }
+                , sort: function (obj) { // 鎺掑簭浜嬩欢
+                    // 鑾峰彇褰撳墠鎺掑簭鐨勫瓧娈靛拰鎺掑簭绫诲瀷
+                    var field = obj.field;
+                    var type = obj.type;
+                    data.sort(function (a, b) {
+                        return type === 'asc' ? (a[field] - b[field]) : (b[field] - a[field]);
+                    });
+                    // 閲嶆柊娓叉煋琛ㄦ牸
+                    table.reload('test', {
+                        data: data
+                    });
+                }
                 , done: function (res, page, count) {
                     soulTable.render(this);
                     $('.layui-table thead').on('click', 'th', function () {

--
Gitblit v1.9.1