|
@@ -1,6 +1,7 @@
|
|
|
{% extends "templates/web.html" %}
|
|
|
|
|
|
{% block page_content %}
|
|
|
+<link rel="stylesheet" type="text/css" href="/assets/upsystem/css/tms_common.css">
|
|
|
<div class="tms-container">
|
|
|
<!-- 顶部状态标签页 -->
|
|
|
<div class="tms-section">
|
|
@@ -126,7 +127,7 @@
|
|
|
</div>
|
|
|
<div class="order-priority high">高优先级</div>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<div class="order-content">
|
|
|
<div class="order-main-info">
|
|
|
<div class="waybill-section">
|
|
@@ -146,7 +147,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<div class="order-actions-inline">
|
|
|
<button class="tms-btn tms-btn-primary btn-sm" onclick="handleOperate('YT2523400706780414', 'approve')">
|
|
|
<i class="fas fa-check"></i> 批准
|
|
@@ -161,7 +162,7 @@
|
|
|
<i class="fas fa-phone"></i> 联系
|
|
|
</button>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<div class="order-timer">
|
|
|
<div class="remaining-time">剩余时间: 1天 6小时 32分钟</div>
|
|
|
<div class="created-time">创建时间: 2024-01-15 14:30</div>
|
|
@@ -177,7 +178,7 @@
|
|
|
</div>
|
|
|
<div class="order-priority medium">中优先级</div>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<div class="order-content">
|
|
|
<div class="order-main-info">
|
|
|
<div class="waybill-section">
|
|
@@ -197,7 +198,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<div class="order-actions-inline">
|
|
|
<button class="tms-btn tms-btn-primary btn-sm" onclick="handleOperate('YT2523501400141793', 'approve')">
|
|
|
<i class="fas fa-check"></i> 批准
|
|
@@ -212,7 +213,7 @@
|
|
|
<i class="fas fa-phone"></i> 联系
|
|
|
</button>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<div class="order-timer">
|
|
|
<div class="remaining-time">剩余时间: 2天 18小时 58分钟</div>
|
|
|
<div class="created-time">创建时间: 2024-01-14 16:45</div>
|
|
@@ -228,7 +229,7 @@
|
|
|
</div>
|
|
|
<div class="order-priority low">低优先级</div>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<div class="order-content">
|
|
|
<div class="order-main-info">
|
|
|
<div class="waybill-section">
|
|
@@ -248,7 +249,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<div class="order-actions-inline">
|
|
|
<button class="tms-btn tms-btn-primary btn-sm" onclick="handleOperate('YT2523801001599989', 'approve')">
|
|
|
<i class="fas fa-check"></i> 批准
|
|
@@ -263,7 +264,7 @@
|
|
|
<i class="fas fa-phone"></i> 联系
|
|
|
</button>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<div class="order-timer">
|
|
|
<div class="remaining-time">剩余时间: 3天 6小时 15分钟</div>
|
|
|
<div class="created-time">创建时间: 2024-01-13 12:20</div>
|
|
@@ -300,10 +301,10 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
|
// 初始化TMS系统
|
|
|
if (window.TMS) {
|
|
|
TMS.Logger.info('异常订单页面初始化开始');
|
|
|
-
|
|
|
+
|
|
|
// 绑定事件
|
|
|
bindEvents();
|
|
|
-
|
|
|
+
|
|
|
TMS.Logger.info('异常订单页面初始化完成');
|
|
|
} else {
|
|
|
console.warn('TMS系统未加载,使用基础功能');
|
|
@@ -318,57 +319,57 @@ function bindEvents() {
|
|
|
topTabItems.forEach(tab => {
|
|
|
tab.addEventListener('click', handleTopTabClick);
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
// 处理类别标签页
|
|
|
const categoryTabItems = document.querySelectorAll('.tms-tabs:nth-of-type(2) .tms-tab-item');
|
|
|
categoryTabItems.forEach(tab => {
|
|
|
tab.addEventListener('click', handleCategoryTabClick);
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
// 内容标签页
|
|
|
const contentTabItems = document.querySelectorAll('.tms-tabs:nth-of-type(3) .tms-tab-item');
|
|
|
contentTabItems.forEach(tab => {
|
|
|
tab.addEventListener('click', handleContentTabClick);
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
// 搜索按钮
|
|
|
const searchBtn = document.getElementById('searchBtn');
|
|
|
if (searchBtn) {
|
|
|
searchBtn.addEventListener('click', handleSearch);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 全局操作按钮
|
|
|
const intelligentSettingBtn = document.getElementById('intelligentSettingBtn');
|
|
|
if (intelligentSettingBtn) {
|
|
|
intelligentSettingBtn.addEventListener('click', handleIntelligentSetting);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
const releaseBtn = document.getElementById('releaseBtn');
|
|
|
if (releaseBtn) {
|
|
|
releaseBtn.addEventListener('click', handleRelease);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
const returnBtn = document.getElementById('returnBtn');
|
|
|
if (returnBtn) {
|
|
|
returnBtn.addEventListener('click', handleReturn);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
const returnDetailsBtn = document.getElementById('returnDetailsBtn');
|
|
|
if (returnDetailsBtn) {
|
|
|
returnDetailsBtn.addEventListener('click', handleReturnDetails);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
const awbChangeBtn = document.getElementById('awbChangeBtn');
|
|
|
if (awbChangeBtn) {
|
|
|
awbChangeBtn.addEventListener('click', handleAWBChange);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 更多操作下拉菜单
|
|
|
const moreActionsBtn = document.getElementById('moreActionsBtn');
|
|
|
if (moreActionsBtn) {
|
|
|
moreActionsBtn.addEventListener('click', toggleMoreActionsMenu);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 分页按钮
|
|
|
const pageBtns = document.querySelectorAll('.tms-page-btn');
|
|
|
pageBtns.forEach(btn => {
|
|
@@ -376,7 +377,7 @@ function bindEvents() {
|
|
|
btn.addEventListener('click', handlePageChange);
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
// 页面大小选择
|
|
|
const pageSizeSelect = document.querySelector('.tms-page-size-select');
|
|
|
if (pageSizeSelect) {
|
|
@@ -388,15 +389,15 @@ function bindEvents() {
|
|
|
function handleTopTabClick(e) {
|
|
|
const tabItems = document.querySelectorAll('.tms-tabs:first-of-type .tms-tab-item');
|
|
|
tabItems.forEach(tab => tab.classList.remove('active'));
|
|
|
-
|
|
|
+
|
|
|
e.target.closest('.tms-tab-item').classList.add('active');
|
|
|
-
|
|
|
+
|
|
|
const status = e.target.closest('.tms-tab-item').dataset.status;
|
|
|
-
|
|
|
+
|
|
|
if (window.TMS) {
|
|
|
TMS.Logger.info('切换到顶部状态标签:', status);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 加载对应状态的异常订单
|
|
|
loadExceptionOrdersByStatus(status);
|
|
|
}
|
|
@@ -405,15 +406,15 @@ function handleTopTabClick(e) {
|
|
|
function handleCategoryTabClick(e) {
|
|
|
const tabItems = document.querySelectorAll('.tms-tabs:nth-of-type(2) .tms-tab-item');
|
|
|
tabItems.forEach(tab => tab.classList.remove('active'));
|
|
|
-
|
|
|
+
|
|
|
e.target.closest('.tms-tab-item').classList.add('active');
|
|
|
-
|
|
|
+
|
|
|
const category = e.target.closest('.tms-tab-item').dataset.category;
|
|
|
-
|
|
|
+
|
|
|
if (window.TMS) {
|
|
|
TMS.Logger.info('切换到处理类别标签:', category);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 加载对应类别的异常订单
|
|
|
loadExceptionOrdersByCategory(category);
|
|
|
}
|
|
@@ -422,15 +423,15 @@ function handleCategoryTabClick(e) {
|
|
|
function handleContentTabClick(e) {
|
|
|
const tabItems = document.querySelectorAll('.tms-tabs:nth-of-type(3) .tms-tab-item');
|
|
|
tabItems.forEach(tab => tab.classList.remove('active'));
|
|
|
-
|
|
|
+
|
|
|
e.target.closest('.tms-tab-item').classList.add('active');
|
|
|
-
|
|
|
+
|
|
|
const content = e.target.closest('.tms-tab-item').dataset.content;
|
|
|
-
|
|
|
+
|
|
|
if (window.TMS) {
|
|
|
TMS.Logger.info('切换到内容标签:', content);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 加载对应内容的异常订单
|
|
|
loadExceptionOrdersByContent(content);
|
|
|
}
|
|
@@ -439,11 +440,11 @@ function handleContentTabClick(e) {
|
|
|
function handleSearch() {
|
|
|
const waybill = document.getElementById('waybillInput').value.trim();
|
|
|
const problemType = document.getElementById('problemType').value;
|
|
|
-
|
|
|
+
|
|
|
if (window.TMS) {
|
|
|
TMS.Logger.info('执行异常订单搜索:', { waybill, problemType });
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 执行搜索逻辑
|
|
|
alert(`搜索条件:运单号=${waybill}, 问题类型=${problemType}`);
|
|
|
}
|
|
@@ -500,15 +501,15 @@ function toggleMoreActionsMenu() {
|
|
|
function handlePageChange(e) {
|
|
|
const pageBtns = document.querySelectorAll('.tms-page-btn');
|
|
|
pageBtns.forEach(btn => btn.classList.remove('active'));
|
|
|
-
|
|
|
+
|
|
|
e.target.classList.add('active');
|
|
|
-
|
|
|
+
|
|
|
const page = e.target.textContent;
|
|
|
-
|
|
|
+
|
|
|
if (window.TMS) {
|
|
|
TMS.Logger.info('切换到页面:', page);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 加载对应页面的数据
|
|
|
loadExceptionOrdersByPage(page);
|
|
|
}
|
|
@@ -516,11 +517,11 @@ function handlePageChange(e) {
|
|
|
// 页面大小变化处理
|
|
|
function handlePageSizeChange(e) {
|
|
|
const pageSize = e.target.value;
|
|
|
-
|
|
|
+
|
|
|
if (window.TMS) {
|
|
|
TMS.Logger.info('页面大小变化:', pageSize);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 重新加载数据
|
|
|
loadExceptionOrdersWithPageSize(pageSize);
|
|
|
}
|
|
@@ -530,7 +531,7 @@ function handleOperate(waybillNumber, action) {
|
|
|
if (window.TMS) {
|
|
|
TMS.Logger.info('处理异常订单操作:', { waybillNumber, action });
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
let actionText = '';
|
|
|
switch (action) {
|
|
|
case 'approve':
|
|
@@ -548,7 +549,7 @@ function handleOperate(waybillNumber, action) {
|
|
|
default:
|
|
|
actionText = '操作';
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
alert(`${actionText}订单: ${waybillNumber}`);
|
|
|
}
|
|
|
|