From 065209f768eb1d4019f3ccd678c3bbc8619835c1 Mon Sep 17 00:00:00 2001 From: "gary_chen\\gary_chen" Date: Tue, 31 Oct 2023 09:53:17 +0800 Subject: [PATCH] Merge branch 'gary' of http://10.10.1.6:3080/masada-admin/httpdocs into gary # Conflicts: # wms/wipwhole-index-function.php # wms/wipwhole-renovate-index-function.php # wms/wipwhole-renovate-rec-invoice-edit.php --- wms/wipwhole-index-function.php | 6 +----- wms/wipwhole-renovate-index-function.php | 2 +- wms/wipwholeinstall-renovate-index.php | 12 ++++++++++++ 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/wms/wipwhole-index-function.php b/wms/wipwhole-index-function.php index 063f10cd..81804787 100644 --- a/wms/wipwhole-index-function.php +++ b/wms/wipwhole-index-function.php @@ -1040,10 +1040,6 @@ function getSaveEstimateInstallData($user_department_id, $role_id) return true; if ($user_department_id == '545' && $role_id == '6') return true; - if ($user_department_id == '312' && $role_id == '3') - return true; - if ($user_department_id == '541' && $role_id == '1') - return true; return false; } @@ -1053,7 +1049,7 @@ function saveInstallData($user_department_id, $role_id) return true; if ($user_department_id == '521' && $role_id == '9') return true; - if ($user_department_id == '541' && $role_id == '1') + if ($user_department_id == '542' && in_array($role_id, ['1', '5', '6'])) return true; if ($user_department_id == '543' && $role_id == '2') return true; diff --git a/wms/wipwhole-renovate-index-function.php b/wms/wipwhole-renovate-index-function.php index 4f792455..7d615397 100644 --- a/wms/wipwhole-renovate-index-function.php +++ b/wms/wipwhole-renovate-index-function.php @@ -1002,7 +1002,7 @@ function getWipwholeChangeButtonStatus($user_department_id) function getSaveEstimateInstallData($user_department_id, $role_id) { - if ($user_department_id == '541' && $role_id == '1') + if (in_array($user_department_id, ['50', '501']) && $role_id == '2') return true; if ($user_department_id == '311' && $role_id == '4') return true; diff --git a/wms/wipwholeinstall-renovate-index.php b/wms/wipwholeinstall-renovate-index.php index 80b675a5..90b257ad 100644 --- a/wms/wipwholeinstall-renovate-index.php +++ b/wms/wipwholeinstall-renovate-index.php @@ -306,8 +306,16 @@ mysqli_close($link); var showNum = ; var nowPage = ; var searchContent = ""; + var orderColumn = ""; + var orderDirection = ""; var table = $('#table_index2').DataTable(); + + // 设置排序信息 + if (orderColumn !== '' && orderDirection !== '') { + table.order([orderColumn, orderDirection]).draw(); + } + table.search(searchContent).draw(); table.page.len(showNum).draw(); table.page((nowPage) - 1).draw('page'); @@ -331,8 +339,12 @@ mysqli_close($link); showNum = table.page.len(); nowPage = table.page.info().page + 1; searchContent = table.search(); + var order = table.order(); + orderColumn = order[0][0]; // 获取排序的列索引 + orderDirection = order[0][1]; // 获取排序的方向 window.location.href = "" + "&showNum=" + showNum + "&nowPage=" + nowPage + "&searchContent=" + searchContent + + "&orderColumn=" + orderColumn + "&orderDirection=" + orderDirection + "&contractno=" + contractno + "&facilityno=" + facilityno + "&custom=" + custom + "&site_survey_contact_verify=" + site_survey_contact_verify + "&real_arrival_date_start=" + real_arrival_date_start + "&real_arrival_date_end=" + real_arrival_date_end + "&area_no=" + area_no;