From 2c83b33304129e926c2b6d3421307f628b761ad0 Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期三, 03 十二月 2025 14:19:18 +0800
Subject: [PATCH] #出库单

---
 src/main/webapp/static/js/orderPakout/order.js |   42 +++++++++++++++++++++++++++++++++++-------
 1 files changed, 35 insertions(+), 7 deletions(-)

diff --git a/src/main/webapp/static/js/orderPakout/order.js b/src/main/webapp/static/js/orderPakout/order.js
index bedb1f0..3f6dc40 100644
--- a/src/main/webapp/static/js/orderPakout/order.js
+++ b/src/main/webapp/static/js/orderPakout/order.js
@@ -43,12 +43,13 @@
         cols: [[
             {type: 'numbers'},
             {field: 'orderNo', title: '鍗曟嵁缂栧彿', templet: '#orderNoTpl'},
+            {field: 'itemName$', align: 'center', title: '鍑哄簱鍖哄煙',  minWidth: 160, width: 160},
             {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', width: 180}
+            {align: 'center', title: '鎿嶄綔', toolbar: '#operate'}
         ]],
         request: {
             pageName: 'curr',
@@ -122,9 +123,10 @@
                         cellMinWidth: 100,
                         cols: [[
                             {type: 'numbers'},
-                            {field: 'matnr', title: '鍟嗗搧缂栫爜', width: 160},
-                            {field: 'maktx', title: '鍟嗗搧鍚嶇О', width: 160},
-                            {field: 'batch', title: '鎵瑰彿'},
+                            {field: 'matnr', title: '闆朵欢浠g爜', width: 160},
+                            {field: 'maktx', title: '闆朵欢鍚嶇О', width: 160},
+                            // {field: 'batch', title: '鎵瑰彿'},
+                            {field: 'standby1', title: '渚涘簲鍟嗕唬鐮�'},
                             {field: 'anfme', title: '鏁伴噺'},
                             {field: 'workQty', title: '浣滀笟鏁伴噺'},
                             {field: 'qty', title: '瀹屾垚鏁伴噺', style: 'font-weight: bold'},
@@ -173,6 +175,30 @@
             success: function (layero, dIndex) {
                 $(layero).children('.layui-layer-content').css('overflow', 'visible');
                 var isExpAdd = !expTpe;
+                // 鍔犺浇鍖哄煙涓嬫媺鏁版嵁
+                $.ajax({
+                    url: baseUrl + "/basAreas/list/auth",
+                    headers: {'token': localStorage.getItem('token')},
+                    data: { limit: 9999 },
+                    method: 'POST',
+                    success: function (res) {
+                        if (res.code === 200) {
+                            var areaSelect = $(layero).find('select[name="itemName"]');
+                            var html = '<option value="">璇烽�夋嫨鍖哄煙</option>';
+                            var records = res.data.records || res.data;
+                            for (var i = 0; i < records.length; i++) {
+                                var selected = (expTpe && expTpe.itemName == records[i].id) ? ' selected' : '';
+                                html += '<option value="' + records[i].id + '"' + selected + '>' + records[i].name + '</option>';
+                            }
+                            areaSelect.html(html);
+                            form.render('select', 'editForm');
+                        } else if (res.code === 403) {
+                            top.location.href = baseUrl + "/";
+                        } else {
+                            layer.msg(res.msg, {icon: 2});
+                        }
+                    }
+                });
                 // 鍥炴樉鏁版嵁
                 form.val('editForm', expTpe);
                 if (expTpe) {
@@ -204,6 +230,7 @@
                             orderId: Number(data.field.id),
                             docType: Number(data.field.docType),
                             orderNo: data.field.orderNo,
+                            areaId: data.field.areaId ? Number(data.field.areaId) : null,
                             orderDetlPakoutList: nList
                         }),
                         contentType:'application/json;charset=UTF-8',
@@ -234,9 +261,10 @@
                     cellMinWidth: 100,
                     cols: [[
                         {type: 'numbers', title: '#'},
-                        {field: 'matnr', title: '鍟嗗搧缂栫爜', width: 160},
-                        {field: 'maktx', title: '鍟嗗搧鍚嶇О', width: 200},
-                        {field: 'batch', title: '鎵瑰彿', edit: true},
+                        {field: 'matnr', title: '闆朵欢浠g爜', width: 160},
+                        {field: 'maktx', title: '闆朵欢鍚嶇О', width: 200},
+                        // {field: 'batch', title: '鎵瑰彿', edit: true},
+                        {field: 'standby1', title: '渚涘簲鍟嗕唬鐮�', edit: true},
                         {field: 'specs', title: '瑙勬牸'},
                         {field: 'anfme', title: '鏁伴噺(淇敼)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110},
                         {field: 'workQty', title: '浣滀笟鏁伴噺',  minWidth: 100, width: 100},

--
Gitblit v1.9.1