فهرست منبع

修改商品列表页面

hurx 4 روز پیش
والد
کامیت
1ea8b8aac8
2فایلهای تغییر یافته به همراه21 افزوده شده و 5 حذف شده
  1. 14 2
      src/views/order/orderAudit/index.vue
  2. 7 3
      src/views/order/orderManage/index.vue

+ 14 - 2
src/views/order/orderAudit/index.vue

@@ -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 {

+ 7 - 3
src/views/order/orderManage/index.vue

@@ -159,7 +159,10 @@
                   @click="handleViewLogistics(order)"
                   >查看物流</el-button
                 >
-                <el-button type="primary" v-if="order.auditStatus != '0'" link @click="handleViewAudit(order)">查看审批流</el-button>
+                <el-button type="primary" link @click="handleViewDetail(order)"> 订单详情 </el-button>
+                <el-button type="primary" v-if="order.isNeedCheck == '0' && order.auditStatus != '0'" link @click="handleViewAudit(order)"
+                  >查看审批流</el-button
+                >
                 <el-button v-if="order.fileCount" type="primary" link size="small">审核文件({{ order.fileCount }})</el-button>
               </div>
             </div>
@@ -246,7 +249,7 @@ import { parseTime } from '@/utils/ruoyi';
 import LogisticsDetail from './logisticsDetail.vue';
 import AuditDetail from './auditDetail.vue';
 
-// 格式化订单时间
+// 格式化时间
 const formatOrderTime = (timeStr: string) => {
   if (!timeStr) return '';
   try {
@@ -469,6 +472,7 @@ const fetchOrderList = async () => {
         statusText: getStatusText(order.orderStatus || ''),
         countdown: '',
         auditStatus: order.checkStatus,
+        isNeedCheck: order.isNeedCheck,
         evaluationStatus: order.evaluationStatus,
         fileCount: 0,
         checked: false,
@@ -596,7 +600,7 @@ const handleOrderCheck = () => {
   selectAll.value = orderList.value.every((order) => order.checked);
 };
 const handleViewDetail = (order: any) => {
-  router.push(`/order/orderManage/detail/${order.id}`);
+  router.push(`/order/orderManage/detail?orderId=${order.id}`);
 };
 
 const handleEvaluation = (order: any) => {