|
|
@@ -48,7 +48,7 @@
|
|
|
<div v-for="(order, orderIndex) in orderList" :key="orderIndex" class="order-card">
|
|
|
<div class="order-header">
|
|
|
<el-checkbox v-model="order.checked" />
|
|
|
- <span class="order-time">{{ order.orderTime }}</span>
|
|
|
+ <div>{{ formatOrderTime(order.orderTime) }}</div>
|
|
|
<span class="order-info">订单号:{{ order.orderNo }}</span>
|
|
|
<el-button type="primary" link class="detail-btn" @click="handleViewDetail(order)">
|
|
|
订单详情 <el-icon><ArrowRight /></el-icon>
|
|
|
@@ -153,6 +153,7 @@ import { ElMessage, ElMessageBox } from 'element-plus';
|
|
|
import { PageTitle, StatusTabs } from '@/components';
|
|
|
import { getDeptTree } from '@/api/pc/organization';
|
|
|
import { DeptInfo } from '@/api/pc/organization/types';
|
|
|
+import { parseTime } from '@/utils/ruoyi';
|
|
|
import { getOrderList, getOrderProducts, checkOrderStatus, getCheckOrderIds } from '@/api/pc/enterprise/order';
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
const { complaints_suggestion_type } = toRefs<any>(proxy?.useDict('complaints_suggestion_type'));
|
|
|
@@ -314,7 +315,18 @@ const loadOrderList = async () => {
|
|
|
loading.value = false;
|
|
|
}
|
|
|
};
|
|
|
-
|
|
|
+// 格式化时间
|
|
|
+const formatOrderTime = (timeStr: string) => {
|
|
|
+ if (!timeStr) return '';
|
|
|
+ try {
|
|
|
+ // 处理后端返回的中文时间格式 "2026/3/13 上午3:35"
|
|
|
+ const date = new Date(timeStr);
|
|
|
+ if (isNaN(date.getTime())) return timeStr;
|
|
|
+ return parseTime(date, '{y}-{m}-{d} {h}:{i}:{s}');
|
|
|
+ } catch (e) {
|
|
|
+ return timeStr;
|
|
|
+ }
|
|
|
+};
|
|
|
// 加载部门树
|
|
|
const loadDeptTree = async () => {
|
|
|
try {
|