From 3cc2632faea335273c67d8dbaf105ee49b2caa77 Mon Sep 17 00:00:00 2001
From: 18516761980 <56479841@qq.com>
Date: 星期六, 16 七月 2022 16:48:25 +0800
Subject: [PATCH] #

---
 src/main/webapp/static/js/salesOrder/salsesOrder.js |   93 +++++++++++++++++++++++++++++++---------------
 1 files changed, 63 insertions(+), 30 deletions(-)

diff --git a/src/main/webapp/static/js/salesOrder/salsesOrder.js b/src/main/webapp/static/js/salesOrder/salsesOrder.js
index 1b9da5e..2508d00 100644
--- a/src/main/webapp/static/js/salesOrder/salsesOrder.js
+++ b/src/main/webapp/static/js/salesOrder/salsesOrder.js
@@ -4,19 +4,23 @@
 function getCol() {
     var cols = [];
     cols.push(
-        {field: 'orderCode', align: 'center', title: '璁㈠崟缂栧彿', width: 120}
-        , {field: 'orderDate', align: 'center', title: '璁㈠崟鏃ユ湡', width: 180}
-        , {field: 'invCode', align: 'center', title: '鐗╂枡缂栫爜', width: 180}
-        , {field: 'invName', align: 'center', title: '鐗╂枡鍚嶇О', width: 400}
-        , {field: 'invStd', align: 'center', title: '瑙勬牸鍨嬪彿', width: 180}
-        , {field: 'invUnit', align: 'center', title: '鍗曚綅', width: 80}
+        {field: 'orderCode', align: 'center', title: '璁㈠崟缂栧彿', width: 110}
+        , {field: 'orderDate', align: 'center', title: '璁㈠崟鏃ユ湡', width: 120}
+        , {field: 'invCode', align: 'center', title: '鐗╂枡缂栫爜', width: 130}
+        , {field: 'invName', align: 'center', title: '鐗╂枡鍚嶇О', width: 350}
+        , {field: 'invStd', align: 'center', title: '瑙勬牸鍨嬪彿', width: 160}
+        , {field: 'invUnit', align: 'center', title: '鍗曚綅', width: 80, hide: true}
         , {field: 'orderQty', align: 'center', title: '璁㈠崟鏁伴噺', width: 120}
-        , {field: 'outQty', align: 'center', title: '鍙戣揣鏁伴噺', width: 120}
-        , {field: 'izMrp', align: 'center', title: '鏄惁mrp璁$畻', hide: true}
-        , {field: 'productQty', align: 'center', title: '鐢熶骇浠诲姟鍗曟暟閲�', width: 140}
-        , {field: 'izReceive', align: 'center', title: '鏄惁鏀舵枡', hide: true}
-        , {field: 'inQty', align: 'center', title: '浜ф垚鍝佸叆搴撴暟閲�'}
-
+        , {field: 'izMrp', align: 'center', title: '澶ц鍗�(mrp)',width: 115}
+        , {field: 'productQty', align: 'center', title: '浠诲姟鍗�', width: 110}
+        , {field: 'izReceive', align: 'center', title: '灏忚鍗�', width: 80}
+        , {field: 'inQty', align: 'center', title: '鍏ュ簱鏁伴噺', width: 110}
+        , {field: 'disQty', align: 'center', title: '閫氱煡鍗�', width: 110}
+        , {field: 'outQty', align: 'center', title: '鍑哄簱鏁伴噺', width: 110}
+        , {field: 'invoiceQty', align: 'center', title: '寮�绁ㄦ暟閲�'}
+        , {field: 'unInvoiceQty', align: 'center', title: '鏈紑绁ㄦ暟閲�'}
+        , {field: 'deliveryDate', align: 'center', title: '浜よ揣鏃ユ湡'}
+        , {field: 'personName', align: 'center', title: '涓氬姟鍛�'}
     );
     return cols;
 }
@@ -34,11 +38,8 @@
         elem: '#salesOrder',
         headers: {token: localStorage.getItem('token')},
         url: 'http://192.168.0.253:8073/api/report/getorderreport',
-        // where: {
-        //     orderCode: 'NX5288',
-        //     startTime: '2021-01-01',
-        //     endTime: '2021-01-01',
-        // },
+        height: 650,
+        width: '100%',
         page: true,
         limit: limit,
         limits: [16, 50, 100, 200, 500],
@@ -96,18 +97,13 @@
 /* 琛ㄦ牸鏁版嵁閲嶈浇 */
 function tableReload(child) {
     var searchData = {};
-    $.each($('#search-box [name]').serializeArray(), function () {
-        if (this.name == 'orderCode') {
-            searchData.orderCode = this.value;
-        }
+    $.each($('#search-box [name]').serializeArray(), function() {
+        searchData[this.name] = this.value;
         if (this.name == 'orderTime') {
             searchData.startTime = this.value.substring(0, 10);
             searchData.endTime = this.value.substring(13, this.value.length);
         }
     });
-
-    console.log(searchData);
-
     (child ? parent.tableIns : tableIns).reload({
         where: searchData,
         page: {
@@ -115,24 +111,61 @@
         },
         done: function (res, curr, count) {
             if (res.code === 403) {
-                top.location.href = baseUrl + "/";
+                top.location.href = baseUrl+"/";
             }
-            pageCurr = curr;
+            pageCurr=curr;
             if (res.data.length === 0 && count !== 0) {
                 tableIns.reload({
                     where: searchData,
                     page: {
-                        curr: pageCurr - 1
+                        curr: pageCurr-1
                     }
                 });
                 pageCurr -= 1;
             }
-            limit(child);
-            // 褰撳墠鍒嗛〉鏁版嵁瀛樺偍
-            locNormalList = res.data;
+            // limit(child);
         }
     });
 }
+// function tableReload(child) {
+//     var searchData = {};
+//     $.each($('#search-box [name]').serializeArray(), function () {
+//         if (this.name == 'orderCode') {
+//             searchData.orderCode = this.value;
+//         }
+//         if (this.name == 'orderTime') {
+//             searchData.startTime = this.value.substring(0, 10);
+//             searchData.endTime = this.value.substring(13, this.value.length);
+//         }
+//     });
+//
+//     console.log(searchData);
+//
+//     (child ? parent.tableIns : tableIns).reload({
+//         where: searchData,
+//         page: {
+//             curr: pageCurr
+//         },
+//         done: function (res, curr, count) {
+//             if (res.code === 403) {
+//                 top.location.href = baseUrl + "/";
+//             }
+//             pageCurr = curr;
+//             if (res.data.length === 0 && count !== 0) {
+//                 tableIns.reload({
+//                     where: searchData,
+//                     page: {
+//                         curr: pageCurr - 1
+//                     }
+//                 });
+//                 pageCurr -= 1;
+//             }
+//             // limit(child);
+//             // 褰撳墠鍒嗛〉鏁版嵁瀛樺偍
+//             locNormalList = res.data;
+//         }
+//     });
+// }
 
 /* 鐩戝惉鍥炶溅浜嬩欢 */
 $('body').keydown(function () {

--
Gitblit v1.9.1