From a3bea567c554c2c57809ceed2a040baf473aa95f Mon Sep 17 00:00:00 2001
From: cp <513960435@qq.com>
Date: 星期四, 27 三月 2025 13:04:38 +0800
Subject: [PATCH] 1

---
 zy-asrs-wms/src/main/webapp/static/js/order/order.js |   79 +++++++++++++++++++++++++++++++++++----
 1 files changed, 70 insertions(+), 9 deletions(-)

diff --git a/zy-asrs-wms/src/main/webapp/static/js/order/order.js b/zy-asrs-wms/src/main/webapp/static/js/order/order.js
index ae2c137..cafbbd3 100644
--- a/zy-asrs-wms/src/main/webapp/static/js/order/order.js
+++ b/zy-asrs-wms/src/main/webapp/static/js/order/order.js
@@ -33,6 +33,12 @@
         }
     })
 
+    let docName = getQueryVariable('docName')
+    let where = {};
+    if (docName != false) {
+        where.docName = decodeURI(docName);
+    }
+
     // 娓叉煋琛ㄦ牸
     var insTb = table.render({
         elem: '#order',
@@ -40,11 +46,12 @@
         headers: {token: localStorage.getItem('token')},
         page: true,
         cellMinWidth: 100,
+        where: where,
         limit: 16,
         limits: [16, 30, 50, 100, 200, 500],
         cols: [[
             {type: 'numbers'},
-            {field: 'orderNo', title: '鍗曟嵁缂栧彿', templet: '#orderNoTpl'},
+            {field: 'orderNo', title: '鍗曟嵁缂栧彿', templet: '#orderNoTpl',sort:true},
             {field: 'docType$', align: 'center', title: '绫诲瀷',  minWidth: 160, width: 160},
             {align: 'center', title: '鏄庣粏', toolbar: '#tbLook', minWidth: 160, width: 160},
             {field: 'createTime$', title: '鍒涘缓鏃堕棿', minWidth: 200, width: 200},
@@ -97,6 +104,8 @@
             showWrkTrace(data.id);
         } else if (layEvent === 'del') {
             doDel(data.id);
+        } else if (layEvent === 'dy') {
+            doDy(data.id);
         } else if (layEvent === 'complete') {
             doModify(data.id, 4);
         } else if (layEvent === 'cancel') {
@@ -152,12 +161,12 @@
                         cellMinWidth: 100,
                         cols: [[
                             {type: 'numbers'},
-                            {field: 'matnr', title: '鍟嗗搧缂栫爜', width: 160},
+                            {field: 'matnr', title: '鍝佸彿', width: 160},
                             {field: 'maktx', title: '鍟嗗搧鍚嶇О', width: 160},
                             {field: 'batch', title: '搴忓垪鐮�'},
                             {field: 'anfme', title: '鏁伴噺'},
-                            {field: 'qty', title: '浣滀笟鏁伴噺', style: 'font-weight: bold'},
-                            // {field: 'unit', title: '鍗曚綅'},
+                            {field: 'workQty', title: '浣滀笟鏁伴噺', style: 'font-weight: bold'},
+                            {field: 'qty', title: '瀹屾垚鏁伴噺'},
                             // {
                             //     field: 'createTime$', title: '鍒涘缓鏃堕棿', sort: true, templet: function (d) {
                             //         return util.toDateString(d.createTime);
@@ -165,7 +174,7 @@
                             // },
                             // {field: 'inQty', title: '宸插叆搴撻噺'},
                             // {field: 'color', title: '棰滆壊'},
-                            {field: 'origin', title: '浠撳簱鍙�'}
+                            {field: 'threeCode', title: '浠撳簱鍙�'}
                         ]],
                         request: {
                             pageName: 'curr',
@@ -228,6 +237,24 @@
             area: '1300px',
             success: function (layero, dIndex) {
                 $(layero).children('.layui-layer-content').css('overflow', 'visible');
+
+                $.ajax({
+                    url: baseUrl + "/docTypeQuery/auth",
+                    headers: {'token': localStorage.getItem('token')},
+                    method: 'POST',
+                    data: {
+                        condition: decodeURI(docName)
+                    },
+                    success: function (res) {
+                        if (res.code == 200) {
+                            if (res.data.length > 0) {
+                                $("#docType").val(res.data[0].id);
+                                $(document.getElementById("docType$")).val(res.data[0].value)
+                            }
+                        }
+                    }
+                })
+
                 var isExpAdd = !expTpe;
                 // 鍥炴樉鏁版嵁
                 form.val('editForm', expTpe);
@@ -286,8 +313,8 @@
                     cellMinWidth: 100,
                     cols: [[
                         {type: 'numbers', title: '#'},
-                        {field: 'matnr', title: '鍟嗗搧缂栫爜', width: 160},
-                        {field: 'maktx', title: '鍟嗗搧鍚嶇О', width: 200},
+                        {field: 'matnr', title: '鍝佸彿', width: 160},
+                        {field: 'maktx', title: '鍚嶇О', width: 200},
                         {field: 'batch', title: '搴忓垪鐮�', edit: true},
                         {field: 'specs', title: '瑙勬牸'},
                         {field: 'anfme', title: '鏁伴噺(淇敼)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110},
@@ -478,6 +505,40 @@
         });
     }
 
+    // 鎵撳嵃
+    function doDy(orderId) {
+        layer.confirm('纭畾瑕佹墦鍗板悧锛�', {
+            shade: .1,
+            skin: 'layui-layer-admin'
+        }, function (i) {
+            layer.close(i);
+            layer.load(2);
+            $.ajax({
+                url: baseUrl+"/order/dy",
+                headers: {'token': localStorage.getItem('token')},
+                data: {
+                    orderId: orderId
+                },
+                method: 'POST',
+                success: function (res) {
+                    layer.closeAll('loading');
+                    if (res.code === 200){
+                        if (insTbCount === 0) {
+                            insTb.reload({page: {curr: 1}});
+                        } else {
+                            $(".layui-laypage-btn")[0].click();
+                        }
+                        layer.msg(res.msg, {icon: 1});
+                    } else if (res.code === 403){
+                        top.location.href = baseUrl+"/";
+                    }else {
+                        layer.msg(res.msg, {icon: 2});
+                    }
+                }
+            })
+        });
+    }
+
 
     // 淇敼璁㈠崟鐘舵��
     function doModify(orderId, settle) {
@@ -540,7 +601,7 @@
                                 var traceCharts = echarts.init(document.getElementById('wrkTraceCharts'));
                                 var traceOptions = {
                                     title: {
-                                        text: '浣滀笟/鎬婚噺', x: 'center', y: '38%',
+                                        text: '鎬婚噺/浣滀笟/瀹屾垚', x: 'center', y: '38%',
                                         textStyle: {fontSize: 18, color: '#262626', fontWeight: 'normal'},
                                         subtextStyle: {fontSize: 36, color: '#10B4E8'},
                                         itemGap: 20
@@ -553,7 +614,7 @@
                                 // 璧嬪��
                                 traceCharts.setOption({
                                     title: {
-                                        subtext: res.data.wrkQty+"/"+res.data.totalQty
+                                        subtext: res.data.totalQty+"/"+res.data.wrkQty+"/"+res.data.endQty
                                     },
                                     series: [
                                         {

--
Gitblit v1.9.1