From d22f020305f8be78bbd255904d3cee1b06aab875 Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期三, 12 二月 2025 09:24:29 +0800
Subject: [PATCH] #订单出库 三个库方法拆分

---
 src/main/webapp/static/js/inventoryCheckOrder/inventoryCheckOrder.js |   88 +++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 78 insertions(+), 10 deletions(-)

diff --git a/src/main/webapp/static/js/inventoryCheckOrder/inventoryCheckOrder.js b/src/main/webapp/static/js/inventoryCheckOrder/inventoryCheckOrder.js
index 7cac188..c90da50 100644
--- a/src/main/webapp/static/js/inventoryCheckOrder/inventoryCheckOrder.js
+++ b/src/main/webapp/static/js/inventoryCheckOrder/inventoryCheckOrder.js
@@ -30,15 +30,15 @@
         where: {order_id: 9999999999},
         cols: [[
             {type: 'checkbox'}
-            ,{type: 'numbers', title: '#'}
-            ,{field: 'orderNo', align: 'center',title: '鍗曟嵁缂栧彿', templet: '#orderNoTpl', width: 160}
+            ,{field: 'orderNo', align: 'center',title: '鍗曟嵁缂栧彿', templet: '#orderNoTpl'}
+            ,{field: 'locNo', align: 'center',title: '搴撲綅'}
             ,{field: 'matnr', align: 'center',title: '鍟嗗搧缂栫爜', width: 160}
             ,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О', width: 200}
-            ,{field: 'batch', align: 'center',title: '搴忓垪鐮�'}
-            ,{field: 'specs', align: 'center',title: '瑙勬牸'}
-            // ,{field: 'anfme', align: 'center',title: '鏁伴噺'}
+            ,{field: 'batch', align: 'center',title: '鎵规'}
+            ,{field: 'anfme', align: 'center',title: '鏁伴噺'}
+            ,{field: 'checkAnfme', align: 'center',title: '鐩樼偣鏁伴噺', style: 'font-weight: bold'}
             // ,{field: 'qty', align: 'center',title: '浣滀笟鏁伴噺', style: 'font-weight: bold'}
-            ,{field: 'enableQty', align: 'center',title: '寰呭嚭鏁伴噺', style: 'font-weight: bold'}
+            // ,{field: 'enableQty', align: 'center',title: '寰呭嚭鏁伴噺', style: 'font-weight: bold'}
             // ,{field: 'name', align: 'center',title: '鍚嶇О'}
             // ,{field: 'model', align: 'center',title: '鍨嬪彿'}
             ,{field: 'unit', align: 'center',title: '鍗曚綅', hide: true}
@@ -48,13 +48,14 @@
             // ,{field: 'itemNum', align: 'center',title: '鍝侀」鏁�'}
             // ,{field: 'count', align: 'center',title: '鏁伴噺'}
             // ,{field: 'weight', align: 'center',title: '閲嶉噺'}
-            // ,{field: 'status$', align: 'center',title: '鐘舵��'}
+            ,{field: 'profit$', align: 'center',title: '鐩堜簭',templet: '#profitTpl'}
+            ,{field: 'status$', align: 'center',title: '鐘舵��'}
             // ,{field: 'createBy$', align: 'center',title: '娣诲姞浜哄憳'}
             // ,{field: 'createTime$', align: 'center',title: '娣诲姞鏃堕棿'}
             // ,{field: 'updateBy$', align: 'center',title: '淇敼浜哄憳'}
             // ,{field: 'updateTime$', align: 'center',title: '淇敼鏃堕棿'}
             // ,{field: 'memo', align: 'center',title: '澶囨敞'}
-            ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width: 160}
+            // ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width: 160}
         ]],
         request: {
             pageName: 'curr',
@@ -86,9 +87,52 @@
         return false;
     });
 
+    // 鏄剧ず寮规
+    $('#showFormBtn').on('click', function () {
+        // 寮规鍐呭
+        var content = `
+                <form class="layui-form" id="billForm" style="padding: 20px;">                    
+                    <div class="layui-form-item" style="margin-bottom: 20px;">
+                        <label class="layui-form-label" style="width: 80px; font-size: 14px;">搴撳尯锛�</label>
+                        <div class="layui-input-block" style="margin-left: 110px;">
+                            <select id="warehouseArea" class="layui-input" style="width: 100%;">
+                                <option value="鍫嗗灈鏈�" selected>鍫嗗灈鏈�</option>
+                                <option value="鍥涘悜搴�">鍥涘悜搴�</option>
+                                <option value="CTU">CTU</option>
+                            </select>
+                        </div>
+                    </div>
+                    <div class="layui-form-item" style="text-align: right;">
+                        <button type="button" class="layui-btn" id="saveBtn" style="display: inline-block; padding: 0px 20px; font-size: 16px; background-color: #5FB878; border-color: #5FB878; text-align: center;">淇濆瓨</button>
+                    </div>
+                </form>
+            `;
+
+        // 寮规
+        layer.open({
+            type: 1,  // 浣跨敤 HTML 鍐呭
+            title: '娣诲姞鐩樼偣鍗�',
+            content: content,
+            area: ['400px', '280px'],  // 寮规澶у皬
+            shadeClose: true,  // 鐐瑰嚮閬僵鍏抽棴
+            offset: '100px',
+            success: function (layero, index) {
+                form.render();
+                // 鐐瑰嚮淇濆瓨鎸夐挳浜嬩欢
+                $('#saveBtn').on('click', function () {
+                    var billNumber = $('#billNumber').val();
+                    var warehouseArea = $('#warehouseArea').val();
+
+
+
+                });
+            }
+        });
+    });
+
     /* 琛ㄦ牸2澶村伐鍏锋爮鐐瑰嚮浜嬩欢 */
     table.on('toolbar(orderDetlTable)', function (obj) {
-
+        // console.log(obj.config.where.order_id);
         var checkStatus = table.checkStatus(obj.config.id).data;
         if (obj.event === 'pakoutPreview') { // 娣诲姞
             if (checkStatus.length === 0) {
@@ -108,7 +152,31 @@
                 return d.id;
             });
             doDelSensor({ids: ids});
+        } else if (obj.event === 'submitERP') { // 鎻愪氦erp
+            $.ajax({
+                url: baseUrl + "/mobile/checkOut/submit/auth",
+                headers: {'token': localStorage.getItem('token')},
+                // contentType: 'application/json;charset=UTF-8',
+                data: {
+                    orderId: obj.config.where.order_id
+                },
+                method: 'GET',
+                success: function (res) {
+                    notice.destroy();
+                    if (res.code === 200) {
+                        layer.msg(res.msg, {icon: 1});
+                        insTb.reload({where: null});
+                        insTb2.reload({where: null, page: {curr: 1}});
+                    } else if (res.code === 403) {
+                        top.location.href = baseUrl + "/";
+                    } else {
+                        layer.msg(res.msg, {icon: 2})
+                    }
+                }
+            });
+
         }
+
     });
 
     /* 琛ㄦ牸2宸ュ叿鏉$偣鍑讳簨浠� */
@@ -126,7 +194,7 @@
     function pakoutPreview(ids) {
         let loadIndex = layer.load(2);
         $.ajax({
-            url: baseUrl + "/out/pakout/preview/auth",
+            url: baseUrl + "/out/pakout/preview/auth/sxk",
             headers: {'token': localStorage.getItem('token')},
             contentType: 'application/json;charset=UTF-8',
             data: JSON.stringify(ids),

--
Gitblit v1.9.1