From 889c68898bba81f90bae9923c01e40a5052cc843 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期五, 27 八月 2021 15:38:07 +0800
Subject: [PATCH] #

---
 src/main/webapp/static/js/waitMatin/waitMatin.js |   22 +++++++++++++++++++---
 1 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/src/main/webapp/static/js/waitMatin/waitMatin.js b/src/main/webapp/static/js/waitMatin/waitMatin.js
index b195694..91cf79f 100644
--- a/src/main/webapp/static/js/waitMatin/waitMatin.js
+++ b/src/main/webapp/static/js/waitMatin/waitMatin.js
@@ -190,6 +190,7 @@
                 var xxDataList = [];
                 var tbOptions = {
                     elem: '#formSSXMTable',
+                    headers: {token: localStorage.getItem('token')},
                     data: xxDataList,
                     page: true,
                     height: '350px;',
@@ -201,14 +202,28 @@
                         {field: 'qty', title: '淇敼鏁伴噺', style: 'color: blue;font-weight: bold', edit: true, minWidth: 100, width: 100},
                         {align: 'center', title: '鎿嶄綔', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80}
                     ]],
-                    done: function () {
+                    done: function (res) {
                         $(layero).find('.layui-table-view').css('margin', '0');
                     },
                     size: ''
                 };
                 if (!isExpAdd) {
-                    tbOptions.data = undefined;
-                    tbOptions.url = '../../json/e-course-tb2.json?experimentTypeId=' + expTpe.experimentTypeId;
+                    $.ajax({
+                        url: baseUrl+"/waitMatin/detl/list/auth?billNo=" + expTpe.billNo,
+                        headers: {'token': localStorage.getItem('token')},
+                        method: 'GET',
+                        async: false,
+                        success: function (res) {
+                            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})
+                            }
+                        }
+                    })
                 }
                 var insTbSSXM = table.render(tbOptions);
                 // 宸ュ叿鏉$偣鍑讳簨浠�
@@ -226,6 +241,7 @@
                             for (var j = 0; j < xxDataList.length; j++) {
                                 if (xxDataList[j].matNo === data.matNo) {
                                     xxDataList.splice(j, 1);
+                                    break;
                                 }
                             }
                             insTbSSXM.reload({data: xxDataList, page: {curr: 1}});

--
Gitblit v1.9.1