From fff32dc747a54cfa796c3ebde3334d54c7a827a3 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期二, 12 八月 2025 08:40:21 +0800
Subject: [PATCH] #

---
 src/main/webapp/static/js/orderPakout/out.js |   43 +++++++++++++++++++++++++++++++++++++++----
 1 files changed, 39 insertions(+), 4 deletions(-)

diff --git a/src/main/webapp/static/js/orderPakout/out.js b/src/main/webapp/static/js/orderPakout/out.js
index d84ce61..70ba831 100644
--- a/src/main/webapp/static/js/orderPakout/out.js
+++ b/src/main/webapp/static/js/orderPakout/out.js
@@ -117,7 +117,6 @@
 
     /* 琛ㄦ牸2澶村伐鍏锋爮鐐瑰嚮浜嬩欢 */
     table.on('toolbar(orderDetlTable)', function (obj) {
-
         var checkStatus = table.checkStatus(obj.config.id).data;
         if (obj.event === 'pakoutPreview') { // 娣诲姞
             if (checkStatus.length === 0) {
@@ -137,8 +136,41 @@
                 return d.id;
             });
             doDelSensor({ids: ids});
+        } else if (obj.event === 'restartSync') {
+            restartSyncOrder(checkStatus.map(function (d) {
+                return d.id;
+            }))
         }
     });
+
+    function restartSyncOrder(ids) {
+        layer.confirm('纭畾瑕侀噸鏂板悓姝ヨ璁㈠崟鏁版嵁鍚楋紵', {
+            skin: 'layui-layer-admin',
+            shade: .1
+        }, function (i) {
+            layer.close(i);
+            var loadIndex = layer.load(2);
+            $.ajax({
+                url: baseUrl+"/order/restartSyncOrder",
+                headers: {'token': localStorage.getItem('token')},
+                contentType: 'application/json;charset=UTF-8',
+                data: JSON.stringify(ids),
+                method: 'POST',
+                success: function (res) {
+                    layer.close(loadIndex);
+                    if (res.code === 200){
+                        layer.msg(res.msg, {icon: 1});
+                        $(".layui-laypage-btn")[0].click();
+                    } else if (res.code === 403){
+                        top.location.href = baseUrl+"/";
+                    }else {
+                        layer.msg(res.msg, {icon: 2});
+                    }
+                }
+            })
+
+        });
+    }
 
     /* 琛ㄦ牸2宸ュ叿鏉$偣鍑讳簨浠� */
     table.on('tool(orderDetlTable)', function (obj) {
@@ -158,7 +190,10 @@
             url: baseUrl + "/out/pakout/preview/auth",
             headers: {'token': localStorage.getItem('token')},
             contentType: 'application/json;charset=UTF-8',
-            data: JSON.stringify(ids),
+            data: JSON.stringify({
+                ids: ids,
+                cstateid: $("#defaultCstateid").val()
+            }),
             method: 'POST',
             success: function (res) {
                 layer.close(loadIndex);
@@ -189,6 +224,8 @@
                                     {field: 'orderNo', title: '鍗曟嵁缂栧彿', merge: true, align: 'center'},
                                     {field: 'title', title: '鍟嗗搧', merge: true, align: 'center', width: 350},
                                     {field: 'batch', title: '鎵规', align: 'center'},
+                                    {field: 'initialWeight', title: '鍘熸墭鐩樿緟鏁伴噺', align: 'center', width: 90, style: 'font-weight: bold'},
+                                    {field: 'initialAnfme', title: '鍘熸墭鐩樻暟閲�', align: 'center', width: 90, style: 'font-weight: bold'},
                                     {field: 'anfme', title: '涓绘暟閲�', align: 'center', width: 90, style: 'font-weight: bold'},
                                     {field: 'weight', title: '杈呮暟閲�', align: 'center', width: 90, style: 'font-weight: bold'},
                                     {field: 'unit', align: 'center',title: '鍗曚綅'},
@@ -391,8 +428,6 @@
             $("#defaultOutSta").html(res.data)
         } else if (res.code === 403){
             top.location.href = baseUrl+"/";
-        } else {
-            layer.msg(res.msg, {icon: 2})
         }
     }
 })

--
Gitblit v1.9.1