From 290e5fd2e74efe19326f56e38c3391aaae23ffc5 Mon Sep 17 00:00:00 2001
From: IZCD4L12RTSW0VZ\Administrator <skyouc>
Date: 星期三, 24 十二月 2025 17:14:09 +0800
Subject: [PATCH] Merge branch 'jsxswms' of http://47.97.1.152:5880/r/zy-asrs into jsxswms

---
 src/main/webapp/static/js/adjustOrder/adjustOrder.js |  243 ++++++++++++++++++++++++-----------------------
 1 files changed, 124 insertions(+), 119 deletions(-)

diff --git a/src/main/webapp/static/js/adjustOrder/adjustOrder.js b/src/main/webapp/static/js/adjustOrder/adjustOrder.js
index a5936e9..11ec3ab 100644
--- a/src/main/webapp/static/js/adjustOrder/adjustOrder.js
+++ b/src/main/webapp/static/js/adjustOrder/adjustOrder.js
@@ -3,7 +3,7 @@
     base: baseUrl + "/static/layui/lay/modules/"
 }).extend({
     notice: 'notice/notice',
-}).use(['layer', 'form', 'table', 'util', 'admin', 'xmSelect', 'laydate','tableMerge','notice'], function () {
+}).use(['layer', 'form', 'table', 'util', 'admin', 'xmSelect', 'laydate', 'tableMerge', 'notice'], function () {
     var $ = layui.jquery;
     var layer = layui.layer;
     var form = layui.form;
@@ -18,21 +18,21 @@
 
     // 娓叉煋鎼滅储妯℃澘
     $.ajax({
-        url: baseUrl+"/docType/list/auth",
-        headers: {'token': localStorage.getItem('token')},
+        url: baseUrl + "/docType/list/auth",
+        headers: { 'token': localStorage.getItem('token') },
         data: {
             limit: 9999
         },
         method: 'POST',
         success: function (res) {
-            if (res.code === 200){
+            if (res.code === 200) {
                 let template = Handlebars.compile($('#docTypeTpl').html());
                 $('#docType-query').html(template(res.data));
                 layui.form.render('select');
-            } else if (res.code === 403){
-                top.location.href = baseUrl+"/";
+            } else if (res.code === 403) {
+                top.location.href = baseUrl + "/";
             } else {
-                layer.msg(res.msg, {icon: 2})
+                layer.msg(res.msg, { icon: 2 })
             }
         }
     })
@@ -40,19 +40,22 @@
     // 娓叉煋琛ㄦ牸
     var insTb = table.render({
         elem: '#order',
-        url: baseUrl+'/adjustOrder/list/auth',
-        headers: {token: localStorage.getItem('token')},
+        url: baseUrl + '/adjustOrder/list/auth',
+        headers: { token: localStorage.getItem('token') },
         page: true,
         cellMinWidth: 100,
         cols: [[
-            {type: 'numbers'},
-            {field: 'orderNo', title: '鍗曟嵁缂栧彿'},
-            {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},
-            {field: 'settle$', align: 'center', title: '鐘舵��', templet: '#settleTpl',  minWidth: 160, width: 160},
-            {field: 'memo', align: 'center',title: '澶囨敞', hide: true},
-            {align: 'center', title: '鎿嶄綔', toolbar: '#operate',}
+            { type: 'numbers' },
+            { field: 'orderNo', title: '鍗曟嵁缂栧彿' },
+            { field: 'docType$', align: 'center', title: '绫诲瀷', minWidth: 120, width: 120 },
+            { field: 'defNumber', align: 'center', title: '娴佹按鍙�', minWidth: 160, width: 160 },
+            { field: 'cstmrName', align: 'center', title: '鍏徃', minWidth: 160, width: 160 },
+            { field: 'orderTime', title: '璁㈠崟鏃堕棿', minWidth: 200, width: 200 },
+            { field: 'shipName', align: 'center', title: '璋冩暣鍘熷洜' },
+            { field: 'memo', align: 'center', title: '鍘熷洜鎻忚堪' },
+            { field: 'settle$', align: 'center', title: '鐘舵��', templet: '#settleTpl', minWidth: 120, width: 120 },
+            { align: 'center', title: '鏄庣粏', toolbar: '#tbLook', minWidth: 160, width: 160 },
+            { align: 'center', title: '鎿嶄綔', toolbar: '#operate', }
         ]],
         request: {
             pageName: 'curr',
@@ -72,7 +75,7 @@
         done: function (res, curr, count) {
             limit();
             if (res.code === 403) {
-                top.location.href = baseUrl+"/";
+                top.location.href = baseUrl + "/";
             }
             insTbCount = count;
         }
@@ -80,7 +83,7 @@
 
     // 鎼滅储
     form.on('submit(tbSearch)', function (data) {
-        insTb.reload({where: data.field, page: {curr: 1}});
+        insTb.reload({ where: data.field, page: { curr: 1 } });
     });
 
     // 娣诲姞
@@ -94,11 +97,11 @@
         var layEvent = obj.event;
         if (layEvent === 'edit') {
             showEditModel(data);
-        }else if (layEvent === 'adjust') {
+        } else if (layEvent === 'adjust') {
             adjustComplete(data.id);
-        }else if (layEvent === 'export') {
+        } else if (layEvent === 'export') {
             export1(data.id);
-        }else if (layEvent === 'del') {
+        } else if (layEvent === 'del') {
             doDel(data.id);
         } else if (layEvent === 'complete') {
             doModify(data.id, data.orderNo, 4);
@@ -125,15 +128,17 @@
                         height: '450px;',
                         cellMinWidth: 100,
                         cols: [[
-                            {type: 'numbers'},
-                            {field: 'locNo', title: '搴撲綅鍙�', width: 120},
-                            {field: 'zpallet', title: '瀹瑰櫒鐮�', width: 120},
-                            {field: 'matnr', title: '鍟嗗搧缂栫爜', width: 160},
-                            {field: 'maktx', title: '鍟嗗搧鍚嶇О', width: 160},
-                            {field: 'batch', title: '鎵瑰彿'},
-                            {field: 'diffQty', title: '宸紓鏁伴噺', style: 'font-weight: bold'},
-                            {field: 'specs', title: '瑙勬牸'},
-                            {field: 'status$', title: '鐘舵��'}
+                            { type: 'numbers' },
+                            { field: 'locNo', title: '搴撲綅鍙�', width: 120 },
+                            { field: 'zpallet', title: '瀹瑰櫒鐮�', width: 120 },
+                            { field: 'matnr', title: '鍟嗗搧缂栫爜', width: 160 },
+                            { field: 'maktx', title: '鍟嗗搧鍚嶇О', width: 160 },
+                            { field: 'suppCode', title: '渚涘簲鍟嗙紪鐮�' },
+                            { field: 'length', align: 'center', title: '閲嶉噺', hide: false }
+                            ,{ field: 'volume', align: 'center', title: '灏哄', hide: false }
+                            ,{ field: 'diffQty', title: '宸紓鏁伴噺', style: 'font-weight: bold' },
+                            { field: 'specs', title: '瑙勬牸' },
+                            { field: 'status$', title: '鐘舵��' }
                         ]],
                         request: {
                             pageName: 'curr',
@@ -179,58 +184,58 @@
                 form.on('submit(orderEditSubmit)', function (data) {
                     // 缁勮鏁版嵁
                     if (xxDataList.length <= 0) {
-                        layer.tips('璇锋坊鍔犲崟鎹槑缁�', '#matAddBtnComment', {tips: [1, '#ff4c4c']});
+                        layer.tips('璇锋坊鍔犲崟鎹槑缁�', '#matAddBtnComment', { tips: [1, '#ff4c4c'] });
                         return false;
                     }
                     let nList = admin.util.deepClone(xxDataList);
                     layer.load(2);
-                    if (isExpAdd){
+                    if (isExpAdd) {
                         $.ajax({
-                            url: baseUrl+"/checkOrder/form/" + "add" + "/auth",
-                            headers: {'token': localStorage.getItem('token')},
+                            url: baseUrl + "/checkOrder/form/" + "add" + "/auth",
+                            headers: { 'token': localStorage.getItem('token') },
                             data: JSON.stringify({
                                 orderId: Number(data.field.id),
                                 docType: Number(data.field.docType),
                                 orderNo: data.field.orderNo,
                                 locDetlList: nList
                             }),
-                            contentType:'application/json;charset=UTF-8',
+                            contentType: 'application/json;charset=UTF-8',
                             method: 'POST',
                             success: function (res) {
                                 layer.closeAll('loading');
-                                if (res.code === 200){
+                                if (res.code === 200) {
                                     layer.close(dIndex);
                                     $(".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});
+                                    layer.msg(res.msg, { icon: 1 });
+                                } else if (res.code === 403) {
+                                    top.location.href = baseUrl + "/";
+                                } else {
+                                    layer.msg(res.msg, { icon: 2 });
                                 }
                             }
                         })
-                    }else {
+                    } else {
                         $.ajax({
-                            url: baseUrl+"/checkOrder/form/" + "modify" + "/auth",
-                            headers: {'token': localStorage.getItem('token')},
+                            url: baseUrl + "/checkOrder/form/" + "modify" + "/auth",
+                            headers: { 'token': localStorage.getItem('token') },
                             data: JSON.stringify({
                                 orderId: Number(data.field.id),
                                 docType: Number(data.field.docType),
                                 orderNo: data.field.orderNo,
                                 checkOrderDetls: nList
                             }),
-                            contentType:'application/json;charset=UTF-8',
+                            contentType: 'application/json;charset=UTF-8',
                             method: 'POST',
                             success: function (res) {
                                 layer.closeAll('loading');
-                                if (res.code === 200){
+                                if (res.code === 200) {
                                     layer.close(dIndex);
                                     $(".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});
+                                    layer.msg(res.msg, { icon: 1 });
+                                } else if (res.code === 403) {
+                                    top.location.href = baseUrl + "/";
+                                } else {
+                                    layer.msg(res.msg, { icon: 2 });
                                 }
                             }
                         })
@@ -242,21 +247,21 @@
                 var xxDataList = [];
                 var tbOptions = {
                     elem: '#formSSXMTable',
-                    headers: {token: localStorage.getItem('token')},
+                    headers: { token: localStorage.getItem('token') },
                     data: xxDataList,
                     page: true,
                     height: '350px;',
                     cellMinWidth: 100,
                     cols: [[
-                        {type: 'numbers', title: '#'},
-                        {field: 'locNo', title: '搴撲綅鍙�'},
-                        {field: 'matnr', title: '鍟嗗搧缂栫爜', width: 160},
-                        {field: 'maktx', title: '鍟嗗搧鍚嶇О', width: 200},
-                        {field: 'batch', title: '鎵瑰彿'},
-                        {field: 'specs', title: '瑙勬牸'},
-                        {field: 'anfme', title: '鏁伴噺', minWidth: 110, width: 110},
+                        { type: 'numbers', title: '#' },
+                        { field: 'locNo', title: '搴撲綅鍙�' },
+                        { field: 'matnr', title: '鍟嗗搧缂栫爜', width: 160 },
+                        { field: 'maktx', title: '鍟嗗搧鍚嶇О', width: 200 },
+                        { field: 'batch', title: '鎵瑰彿' },
+                        { field: 'specs', title: '瑙勬牸' },
+                        { field: 'anfme', title: '鏁伴噺', minWidth: 110, width: 110 },
                         // {field: 'unit', title: '鍗曚綅', width: 80},
-                        {align: 'center', title: '鎿嶄綔', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80, fixed: 'right'}
+                        { align: 'center', title: '鎿嶄綔', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80, fixed: 'right' }
                     ]],
                     done: function (res) {
                         $(layero).find('.layui-table-view').css('margin', '0');
@@ -265,18 +270,18 @@
                 };
                 if (!isExpAdd) {
                     $.ajax({
-                        url: baseUrl+"/checkOrderDetl/select/all?orderId=" + expTpe.id,
-                        headers: {'token': localStorage.getItem('token')},
+                        url: baseUrl + "/checkOrderDetl/select/all?orderId=" + expTpe.id,
+                        headers: { 'token': localStorage.getItem('token') },
                         method: 'GET',
                         async: false,
                         success: function (res) {
-                            if (res.code === 200){
+                            if (res.code === 200) {
                                 xxDataList = res.data;
                                 tbOptions.data = xxDataList;
-                            } else if (res.code === 403){
-                                top.location.href = baseUrl+"/";
-                            }else {
-                                layer.msg(res.msg, {icon: 2})
+                            } else if (res.code === 403) {
+                                top.location.href = baseUrl + "/";
+                            } else {
+                                layer.msg(res.msg, { icon: 2 })
                             }
                         }
                     })
@@ -287,8 +292,8 @@
                     var data = obj.data;
                     var layEvent = obj.event;
                     if (layEvent === 'del') {
-                        if(data.workQty > 0){
-                            layer.msg("宸插瓨鍦ㄤ綔涓氭暟閲忥紝涓嶈兘鍒犻櫎", {icon: 2});
+                        if (data.workQty > 0) {
+                            layer.msg("宸插瓨鍦ㄤ綔涓氭暟閲忥紝涓嶈兘鍒犻櫎", { icon: 2 });
                             return;
                         }
                         layer.confirm('纭畾瑕佸垹闄ゅ悧锛�', {
@@ -302,13 +307,13 @@
                                     break;
                                 }
                             }
-                            insTbSSXM.reload({data: xxDataList, page: {curr: 1}});
+                            insTbSSXM.reload({ data: xxDataList, page: { curr: 1 } });
                         });
                     }
                 });
 
                 // 鍏ㄥ眬鍑芥暟锛岀敤浜庢帴鏀朵粠搴撳瓨鏌ヨ椤甸潰杩斿洖鐨勬暟鎹�
-                window.addCheckOrderTableData = function(data) {
+                window.addCheckOrderTableData = function (data) {
                     // 澶勭悊閫変腑鐨勫簱瀛樻暟鎹�
                     var addedCount = 0;
                     var duplicateCount = 0;
@@ -317,7 +322,7 @@
                         var isDuplicate = false;
                         for (var j = 0; j < xxDataList.length; j++) {
                             if (xxDataList[j].locNo === data[i].locNo && xxDataList[j].matnr === data[i].matnr && xxDataList[j].batch === data[i].batch) {
-                                if (xxDataList[j].diffQty !== 0){
+                                if (xxDataList[j].diffQty !== 0) {
                                     isDuplicate = true;
                                     duplicateCount++;
                                     break;
@@ -325,22 +330,22 @@
 
                             }
                         }
-                        if (data[j].diffQty !== 0){
+                        if (data[j].diffQty !== 0) {
                             isDuplicate = true;
                             duplicateCount++;
                         }
                         // 濡傛灉涓嶉噸澶嶏紝鍒欐坊鍔犲埌鍒楄〃
                         if (!isDuplicate) {
-                            xxDataList.push({...data[i]});
+                            xxDataList.push({ ...data[i] });
                             addedCount++;
                         }
                     }
-                    insTbSSXM.reload({data: xxDataList, page: {curr: 1}});
+                    insTbSSXM.reload({ data: xxDataList, page: { curr: 1 } });
                     // 鎻愮ず娣诲姞缁撴灉
                     if (duplicateCount > 0) {
-                        layer.msg('鎴愬姛娣诲姞 ' + addedCount + ' 鏉℃暟鎹紝' + duplicateCount + ' 鏉℃暟鎹凡蹇界暐', {icon: 1});
+                        layer.msg('鎴愬姛娣诲姞 ' + addedCount + ' 鏉℃暟鎹紝' + duplicateCount + ' 鏉℃暟鎹凡蹇界暐', { icon: 1 });
                     } else if (addedCount > 0) {
-                        layer.msg('鎴愬姛娣诲姞 ' + addedCount + ' 鏉℃暟鎹�', {icon: 1});
+                        layer.msg('鎴愬姛娣诲姞 ' + addedCount + ' 鏉℃暟鎹�', { icon: 1 });
                     }
                 };
 
@@ -350,7 +355,7 @@
 
                 // 鏄剧ず娣诲姞鏄庣粏琛ㄥ崟寮圭獥 - 鎻愬彇搴撳瓨
                 function showEditModel2(exp) {
-                    let loadIndex = layer.msg('璇锋眰涓�...', {icon: 16, shade: 0.01, time: false});
+                    let loadIndex = layer.msg('璇锋眰涓�...', { icon: 16, shade: 0.01, time: false });
                     layer.open({
                         type: 2,
                         title: '鎻愬彇搴撳瓨',
@@ -359,7 +364,7 @@
                         area: ['90%', '85%'],
                         shadeClose: true,
                         content: 'checkOrderLocQuery.html',
-                        success: function(layero, index){
+                        success: function (layero, index) {
                             layer.close(loadIndex);
                         }
                     });
@@ -378,25 +383,25 @@
             layer.close(i);
             layer.load(2);
             $.ajax({
-                url: baseUrl+"/checkOrder/delete/auth",
-                headers: {'token': localStorage.getItem('token')},
+                url: baseUrl + "/checkOrder/delete/auth",
+                headers: { 'token': localStorage.getItem('token') },
                 data: {
                     orderId: orderId
                 },
                 method: 'POST',
                 success: function (res) {
                     layer.closeAll('loading');
-                    if (res.code === 200){
+                    if (res.code === 200) {
                         if (insTbCount === 0) {
-                            insTb.reload({page: {curr: 1}});
+                            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});
+                        layer.msg(res.msg, { icon: 1 });
+                    } else if (res.code === 403) {
+                        top.location.href = baseUrl + "/";
+                    } else {
+                        layer.msg(res.msg, { icon: 2 });
                     }
                 }
             })
@@ -412,25 +417,25 @@
             layer.close(i);
             layer.load(2);
             $.ajax({
-                url: baseUrl+"/checkOrder/complete/auth",
-                headers: {'token': localStorage.getItem('token')},
+                url: baseUrl + "/checkOrder/complete/auth",
+                headers: { 'token': localStorage.getItem('token') },
                 data: {
                     orderId: orderId
                 },
                 method: 'POST',
                 success: function (res) {
                     layer.closeAll('loading');
-                    if (res.code === 200){
+                    if (res.code === 200) {
                         if (insTbCount === 0) {
-                            insTb.reload({page: {curr: 1}});
+                            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});
+                        layer.msg(res.msg, { icon: 1 });
+                    } else if (res.code === 403) {
+                        top.location.href = baseUrl + "/";
+                    } else {
+                        layer.msg(res.msg, { icon: 2 });
                     }
                 }
             })
@@ -442,31 +447,31 @@
         let loadIndex = layer.load(2);
         $.ajax({
             url: baseUrl + "/adjustOrder/complete/auth",
-            headers: {'token': localStorage.getItem('token')},
+            headers: { 'token': localStorage.getItem('token') },
             data: {
                 orderId: id
             },
             method: 'POST',
             success: function (res) {
-                if (res.code === 200){
+                if (res.code === 200) {
                     layer.close(loadIndex);
-                    layer.msg(res.msg, {icon: 1});
-                    insTb.reload({where: null});
-                } else if (res.code === 403){
-                    top.location.href = baseUrl+"/";
+                    layer.msg(res.msg, { icon: 1 });
+                    insTb.reload({ where: null });
+                } else if (res.code === 403) {
+                    top.location.href = baseUrl + "/";
                 } else {
                     layer.close(loadIndex);
-                    layer.msg(res.msg, {icon: 2})
+                    layer.msg(res.msg, { icon: 2 })
                 }
             }
         })
     }
 
     function export1(id) {
-        notice.msg('姝e湪瀵煎嚭鏂囦欢......', {icon: 4});
+        notice.msg('姝e湪瀵煎嚭鏂囦欢......', { icon: 4 });
         $.ajax({
             url: baseUrl + "/checkOrder/export/auth",
-            headers: {'token': localStorage.getItem('token')},
+            headers: { 'token': localStorage.getItem('token') },
             data: {
                 orderId: id
             },
@@ -486,9 +491,9 @@
                         filename = decodeURIComponent(matches[1].replace(/['"]/g, ''));
                     }
                 }
-                
+
                 // 鍒涘缓涓嬭浇閾炬帴
-                var blob = new Blob([data], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'});
+                var blob = new Blob([data], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
                 var link = document.createElement('a');
                 link.href = window.URL.createObjectURL(blob);
                 link.download = filename;
@@ -496,15 +501,15 @@
                 link.click();
                 document.body.removeChild(link);
                 window.URL.revokeObjectURL(link.href);
-                
-                layer.msg('瀵煎嚭鎴愬姛', {icon: 1});
+
+                layer.msg('瀵煎嚭鎴愬姛', { icon: 1 });
             },
             error: function (xhr, status, error) {
                 notice.destroy();
                 if (xhr.status === 403) {
                     top.location.href = baseUrl + "/";
                 } else {
-                    layer.msg('瀵煎嚭澶辫触锛�' + error, {icon: 2});
+                    layer.msg('瀵煎嚭澶辫触锛�' + error, { icon: 2 });
                 }
             }
         });
@@ -512,10 +517,10 @@
 
     function pakout(tableCache, layerIndex) {
         // let loadIndex = layer.load(2);
-        notice.msg('姝e湪鐢熸垚鐩樼偣鍑哄簱浠诲姟......', {icon: 4});
+        notice.msg('姝e湪鐢熸垚鐩樼偣鍑哄簱浠诲姟......', { icon: 4 });
         $.ajax({
             url: baseUrl + "/out/checkPakOut/auth",
-            headers: {'token': localStorage.getItem('token')},
+            headers: { 'token': localStorage.getItem('token') },
             contentType: 'application/json;charset=UTF-8',
             data: JSON.stringify(tableCache),
             method: 'POST',
@@ -523,12 +528,12 @@
                 notice.destroy();
                 if (res.code === 200) {
                     layer.close(layerIndex);
-                    layer.msg(res.msg, {icon: 1});
-                    insTb.reload({where: null});
+                    layer.msg(res.msg, { icon: 1 });
+                    insTb.reload({ where: null });
                 } else if (res.code === 403) {
                     top.location.href = baseUrl + "/";
                 } else {
-                    layer.msg(res.msg, {icon: 2})
+                    layer.msg(res.msg, { icon: 2 })
                 }
             }
         });
@@ -536,7 +541,7 @@
 
     layDate.render({
         elem: '.layui-laydate-range'
-        ,type: 'datetime'
-        ,range: true
+        , type: 'datetime'
+        , range: true
     });
 });

--
Gitblit v1.9.1