From 2fc0465d435e2558e58509905b5ecd11b01d0deb Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Mon, 25 Nov 2024 18:28:28 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E8=BF=87=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/accessory/accessory_out_bound_list.js | 3 +++ js/accessory/accessory_return_list.js | 3 +++ js/accessory/accessory_scrap_list.js | 3 +++ js/accessory/accessory_store_list.js | 3 +++ .../child/accessory_out_bound_detail.js | 3 +++ js/accessory/child/accessory_return_detail.js | 3 +++ js/accessory/child/accessory_scrap_detail.js | 3 +++ js/accessory/child/accessory_store_detail.js | 3 +++ js/accessory/child/choose_fit_type_list.js | 3 +++ .../choose_inventory_count_fit_type_list.js | 3 +++ .../child/choose_return_fit_type_list.js | 3 +++ .../child/choose_scrap_fit_type_list.js | 3 +++ js/accessory/child/inventory_count_detail.js | 3 +++ js/accessory/child/pro_count_detail.js | 3 +++ js/accessory/inventory_count_list.js | 3 +++ js/accessory/inventory_statistics_list.js | 3 +++ js/accessory/pro_count_list.js | 3 +++ js/demandPlan/apply_plan_list.js | 3 +++ js/demandPlan/child/apply_plan_detail.js | 3 +++ js/demandPlan/child/choose_tool_type_list.js | 3 +++ js/demandPlan/child/delivery_all_list.js | 3 +++ js/demandPlan/child/delivery_batch_list.js | 3 +++ js/demandPlan/child/delivery_not_send_list.js | 3 +++ .../child/demand_plan_detail_list.js | 3 +++ js/demandPlan/child/excess_inventory_list.js | 3 +++ .../child/excess_inventory_source.js | 3 +++ js/demandPlan/child/send_goods_form.js | 3 +++ .../child/unplanned_quantity_list.js | 3 +++ js/demandPlan/child/view_data_list.js | 3 +++ js/demandPlan/child/view_data_source_list.js | 3 +++ js/demandPlan/delivery_list.js | 3 +++ js/demandPlan/plan_check_list.js | 3 +++ js/public.js | 22 +++++++++++++++++++ 33 files changed, 118 insertions(+) diff --git a/js/accessory/accessory_out_bound_list.js b/js/accessory/accessory_out_bound_list.js index b03883a..27fd4c8 100644 --- a/js/accessory/accessory_out_bound_list.js +++ b/js/accessory/accessory_out_bound_list.js @@ -76,6 +76,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } return { "code": 0, // 解析接口状态 "msg": '获取成功', // 解析提示文本 diff --git a/js/accessory/accessory_return_list.js b/js/accessory/accessory_return_list.js index c8d8292..d46f74f 100644 --- a/js/accessory/accessory_return_list.js +++ b/js/accessory/accessory_return_list.js @@ -76,6 +76,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } return { "code": 0, // 解析接口状态 "msg": '获取成功', // 解析提示文本 diff --git a/js/accessory/accessory_scrap_list.js b/js/accessory/accessory_scrap_list.js index b9ad554..5ae662c 100644 --- a/js/accessory/accessory_scrap_list.js +++ b/js/accessory/accessory_scrap_list.js @@ -76,6 +76,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } return { "code": 0, // 解析接口状态 "msg": '获取成功', // 解析提示文本 diff --git a/js/accessory/accessory_store_list.js b/js/accessory/accessory_store_list.js index 7f4c748..2f53d8e 100644 --- a/js/accessory/accessory_store_list.js +++ b/js/accessory/accessory_store_list.js @@ -76,6 +76,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } return { "code": 0, // 解析接口状态 "msg": '获取成功', // 解析提示文本 diff --git a/js/accessory/child/accessory_out_bound_detail.js b/js/accessory/child/accessory_out_bound_detail.js index 9038826..d93dd13 100644 --- a/js/accessory/child/accessory_out_bound_detail.js +++ b/js/accessory/child/accessory_out_bound_detail.js @@ -290,6 +290,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } return { "code": 0, // 解析接口状态 "msg": '获取成功', // 解析提示文本 diff --git a/js/accessory/child/accessory_return_detail.js b/js/accessory/child/accessory_return_detail.js index 2c2247b..748aa08 100644 --- a/js/accessory/child/accessory_return_detail.js +++ b/js/accessory/child/accessory_return_detail.js @@ -160,6 +160,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } return { "code": 0, // 解析接口状态 "msg": '获取成功', // 解析提示文本 diff --git a/js/accessory/child/accessory_scrap_detail.js b/js/accessory/child/accessory_scrap_detail.js index 4aaa93a..b24d272 100644 --- a/js/accessory/child/accessory_scrap_detail.js +++ b/js/accessory/child/accessory_scrap_detail.js @@ -160,6 +160,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } return { "code": 0, // 解析接口状态 "msg": '获取成功', // 解析提示文本 diff --git a/js/accessory/child/accessory_store_detail.js b/js/accessory/child/accessory_store_detail.js index 252928b..be349cb 100644 --- a/js/accessory/child/accessory_store_detail.js +++ b/js/accessory/child/accessory_store_detail.js @@ -161,6 +161,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } return { "code": 0, // 解析接口状态 "msg": '获取成功', // 解析提示文本 diff --git a/js/accessory/child/choose_fit_type_list.js b/js/accessory/child/choose_fit_type_list.js index 84c18d5..d8cef75 100644 --- a/js/accessory/child/choose_fit_type_list.js +++ b/js/accessory/child/choose_fit_type_list.js @@ -105,6 +105,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } if (jjDetailArr && res.list) { $.each(res.list, function (index, item) { $.each(jjDetailArr, function (index2, item2) { diff --git a/js/accessory/child/choose_inventory_count_fit_type_list.js b/js/accessory/child/choose_inventory_count_fit_type_list.js index f258a15..9cd06ce 100644 --- a/js/accessory/child/choose_inventory_count_fit_type_list.js +++ b/js/accessory/child/choose_inventory_count_fit_type_list.js @@ -89,6 +89,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } if (jjDetailArr && res.list) { $.each(res.list, function (index, item) { $.each(jjDetailArr, function (index2, item2) { diff --git a/js/accessory/child/choose_return_fit_type_list.js b/js/accessory/child/choose_return_fit_type_list.js index b6c10d6..d51a723 100644 --- a/js/accessory/child/choose_return_fit_type_list.js +++ b/js/accessory/child/choose_return_fit_type_list.js @@ -90,6 +90,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } if (jjDetailArr && res.list) { $.each(res.list, function (index, item) { $.each(jjDetailArr, function (index2, item2) { diff --git a/js/accessory/child/choose_scrap_fit_type_list.js b/js/accessory/child/choose_scrap_fit_type_list.js index 681c8c5..ef7afc8 100644 --- a/js/accessory/child/choose_scrap_fit_type_list.js +++ b/js/accessory/child/choose_scrap_fit_type_list.js @@ -89,6 +89,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } if (jjDetailArr && res.list) { $.each(res.list, function (index, item) { $.each(jjDetailArr, function (index2, item2) { diff --git a/js/accessory/child/inventory_count_detail.js b/js/accessory/child/inventory_count_detail.js index 4f244e0..5699ba1 100644 --- a/js/accessory/child/inventory_count_detail.js +++ b/js/accessory/child/inventory_count_detail.js @@ -162,6 +162,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } return { "code": 0, // 解析接口状态 "msg": '获取成功', // 解析提示文本 diff --git a/js/accessory/child/pro_count_detail.js b/js/accessory/child/pro_count_detail.js index efd8f27..7ade146 100644 --- a/js/accessory/child/pro_count_detail.js +++ b/js/accessory/child/pro_count_detail.js @@ -78,6 +78,9 @@ function initFileTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } return { "code": 0, // 解析接口状态 "msg": '获取成功', // 解析提示文本 diff --git a/js/accessory/inventory_count_list.js b/js/accessory/inventory_count_list.js index 8664474..8db2a64 100644 --- a/js/accessory/inventory_count_list.js +++ b/js/accessory/inventory_count_list.js @@ -65,6 +65,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } return { "code": 0, // 解析接口状态 "msg": '获取成功', // 解析提示文本 diff --git a/js/accessory/inventory_statistics_list.js b/js/accessory/inventory_statistics_list.js index 204987b..2b626c5 100644 --- a/js/accessory/inventory_statistics_list.js +++ b/js/accessory/inventory_statistics_list.js @@ -108,6 +108,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } return { "code": 0, // 解析接口状态 "msg": '获取成功', // 解析提示文本 diff --git a/js/accessory/pro_count_list.js b/js/accessory/pro_count_list.js index 2b24032..b4d2375 100644 --- a/js/accessory/pro_count_list.js +++ b/js/accessory/pro_count_list.js @@ -67,6 +67,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } return { "code": 0, // 解析接口状态 "msg": '获取成功', // 解析提示文本 diff --git a/js/demandPlan/apply_plan_list.js b/js/demandPlan/apply_plan_list.js index fade224..ccf2684 100644 --- a/js/demandPlan/apply_plan_list.js +++ b/js/demandPlan/apply_plan_list.js @@ -76,6 +76,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } return { "code": 0, // 解析接口状态 "msg": '获取成功', // 解析提示文本 diff --git a/js/demandPlan/child/apply_plan_detail.js b/js/demandPlan/child/apply_plan_detail.js index 1662157..793dd67 100644 --- a/js/demandPlan/child/apply_plan_detail.js +++ b/js/demandPlan/child/apply_plan_detail.js @@ -95,6 +95,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } return { "code": 0, // 解析接口状态 "msg": '获取成功', // 解析提示文本 diff --git a/js/demandPlan/child/choose_tool_type_list.js b/js/demandPlan/child/choose_tool_type_list.js index bb6c317..33a304f 100644 --- a/js/demandPlan/child/choose_tool_type_list.js +++ b/js/demandPlan/child/choose_tool_type_list.js @@ -80,6 +80,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } if (jjDetailArr && res.list) { $.each(res.list, function (index, item) { $.each(jjDetailArr, function (index2, item2) { diff --git a/js/demandPlan/child/delivery_all_list.js b/js/demandPlan/child/delivery_all_list.js index 1a01dbb..861da5a 100644 --- a/js/demandPlan/child/delivery_all_list.js +++ b/js/demandPlan/child/delivery_all_list.js @@ -94,6 +94,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } return { "code": 0, // 解析接口状态 "msg": '获取成功', // 解析提示文本 diff --git a/js/demandPlan/child/delivery_batch_list.js b/js/demandPlan/child/delivery_batch_list.js index 6f2f801..a8821dd 100644 --- a/js/demandPlan/child/delivery_batch_list.js +++ b/js/demandPlan/child/delivery_batch_list.js @@ -151,6 +151,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } return { "code": 0, // 解析接口状态 "msg": '获取成功', // 解析提示文本 diff --git a/js/demandPlan/child/delivery_not_send_list.js b/js/demandPlan/child/delivery_not_send_list.js index bd74136..556d6cb 100644 --- a/js/demandPlan/child/delivery_not_send_list.js +++ b/js/demandPlan/child/delivery_not_send_list.js @@ -78,6 +78,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } return { "code": 0, // 解析接口状态 "msg": '获取成功', // 解析提示文本 diff --git a/js/demandPlan/child/demand_plan_detail_list.js b/js/demandPlan/child/demand_plan_detail_list.js index 406f350..c6cf846 100644 --- a/js/demandPlan/child/demand_plan_detail_list.js +++ b/js/demandPlan/child/demand_plan_detail_list.js @@ -71,6 +71,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } return { "code": 0, // 解析接口状态 "msg": '获取成功', // 解析提示文本 diff --git a/js/demandPlan/child/excess_inventory_list.js b/js/demandPlan/child/excess_inventory_list.js index 95524db..fd8e84f 100644 --- a/js/demandPlan/child/excess_inventory_list.js +++ b/js/demandPlan/child/excess_inventory_list.js @@ -76,6 +76,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } return { "code": 0, // 解析接口状态 "msg": '获取成功', // 解析提示文本 diff --git a/js/demandPlan/child/excess_inventory_source.js b/js/demandPlan/child/excess_inventory_source.js index 2b3d843..8315c3f 100644 --- a/js/demandPlan/child/excess_inventory_source.js +++ b/js/demandPlan/child/excess_inventory_source.js @@ -59,6 +59,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } return { "code": 0, // 解析接口状态 "msg": '获取成功', // 解析提示文本 diff --git a/js/demandPlan/child/send_goods_form.js b/js/demandPlan/child/send_goods_form.js index 94ec718..89450f1 100644 --- a/js/demandPlan/child/send_goods_form.js +++ b/js/demandPlan/child/send_goods_form.js @@ -146,6 +146,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } if (jjDetailArr && res.list) { $.each(res.list, function (index, item) { $.each(jjDetailArr, function (index2, item2) { diff --git a/js/demandPlan/child/unplanned_quantity_list.js b/js/demandPlan/child/unplanned_quantity_list.js index 0b05a3d..6d48506 100644 --- a/js/demandPlan/child/unplanned_quantity_list.js +++ b/js/demandPlan/child/unplanned_quantity_list.js @@ -76,6 +76,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } return { "code": 0, // 解析接口状态 "msg": '获取成功', // 解析提示文本 diff --git a/js/demandPlan/child/view_data_list.js b/js/demandPlan/child/view_data_list.js index 44779de..a28ad53 100644 --- a/js/demandPlan/child/view_data_list.js +++ b/js/demandPlan/child/view_data_list.js @@ -86,6 +86,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } return { "code": 0, // 解析接口状态 "msg": '获取成功', // 解析提示文本 diff --git a/js/demandPlan/child/view_data_source_list.js b/js/demandPlan/child/view_data_source_list.js index 68714b9..f6a1c6d 100644 --- a/js/demandPlan/child/view_data_source_list.js +++ b/js/demandPlan/child/view_data_source_list.js @@ -109,6 +109,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } return { "code": 0, // 解析接口状态 "msg": '获取成功', // 解析提示文本 diff --git a/js/demandPlan/delivery_list.js b/js/demandPlan/delivery_list.js index cf32a07..bfaefad 100644 --- a/js/demandPlan/delivery_list.js +++ b/js/demandPlan/delivery_list.js @@ -128,6 +128,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if (res.code === 401) { + closeWindowOpen(); + } return { "code": 0, // 解析接口状态 "msg": '获取成功', // 解析提示文本 diff --git a/js/demandPlan/plan_check_list.js b/js/demandPlan/plan_check_list.js index 1bf191b..c2658ac 100644 --- a/js/demandPlan/plan_check_list.js +++ b/js/demandPlan/plan_check_list.js @@ -73,6 +73,9 @@ function initTable() { limitName: 'pageSize' }, parseData: function (res) { // res 即为原始返回的数据 + if(res.code === 401){ + closeWindowOpen(); + } return { "code": 0, // 解析接口状态 "msg": '获取成功', // 解析提示文本 diff --git a/js/public.js b/js/public.js index e4aac64..179864d 100644 --- a/js/public.js +++ b/js/public.js @@ -21,6 +21,10 @@ function ajaxRequest(url, type, data, async, beforeFn, successFn, errorFn, conte beforeSend: beforeFn, contentType: contentType || "application/x-www-form-urlencoded; charset=utf-8", success: function (data) { + // closeWindowOpen(); + if (data.code === 401) { + closeWindowOpen(); + } successFn(data); }, error: function (error) { @@ -44,6 +48,9 @@ function ajaxRequestByUploadFile(url, data, beforeFn, successFn, errorFn) { data: data, beforeSend: beforeFn, success: function (data) { + if (data.code === 401) { + closeWindowOpen(); + } successFn(data); }, error: function (error) { @@ -254,4 +261,19 @@ function checkValue(value) { return false; } +// 页面401关闭页面 +function closeWindowOpen() { + top.layer.confirm('登录已过期,请点击确定后重新登录!', { + btn: ['确认', '取消'], + 'title': '操作提示', + move:false, + cancel: function (index, layero) { + window.close(); + } + }, function () { + window.close(); + }, function () { + window.close(); + }); +}