hurx 1 долоо хоног өмнө
parent
commit
85706b7a8a

+ 24 - 1
src/views/order/orderDeliver/index.vue

@@ -86,6 +86,13 @@
             <el-button link type="primary" v-if="scope.row.orderStatus != '4'" @click="handleDeliver(scope.row)">发货</el-button>
             <el-button link type="primary" @click="handleReview(scope.row)">查看发货信息</el-button>
             <el-button link type="primary">取消订单</el-button>
+            <el-button
+              link
+              type="primary"
+              v-if="scope.row.orderStatus == '3' || scope.row.orderStatus == '4' || scope.row.orderStatus == '5'"
+              @click="handleViewLogistics(scope.row)"
+              >查看物流</el-button
+            >
           </template>
         </el-table-column>
       </el-table>
@@ -95,6 +102,8 @@
 
     <!-- 发货对话框 -->
     <DeliverDialog v-model="showDeliverDialog" :order-id="currentOrderId" :order-no="currentOrderNo" @success="handleDeliverSuccess" />
+
+    <LogisticsDetail v-model="showLogisticsDialog" :order-id="logisticsOrderId" />
   </div>
 </template>
 
@@ -110,7 +119,7 @@ import {
 } from '@/api/order/orderMain';
 import { OrderMainVO, OrderMainQuery, OrderMainForm } from '@/api/order/orderMain/types';
 import DeliverDialog from '../saleOrder/deliverDialog.vue';
-
+import LogisticsDetail from '../saleOrder/logisticsDetail.vue';
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
 const { order_status, fee_type, pay_method, order_source, deliver_method } = toRefs<any>(
   proxy?.useDict('order_status', 'fee_type', 'pay_method', 'order_source', 'deliver_method')
@@ -139,6 +148,9 @@ const dialog = reactive<DialogOption>({
   title: ''
 });
 
+const showLogisticsDialog = ref(false);
+const logisticsOrderId = ref<string | number>();
+
 const orderStatusStats = ref({
   pendingPaymentCount: 0, // 待支付
   pendingShipmentCount: 0, // 待发货
@@ -272,6 +284,17 @@ const queryOrderStatusStatsMethod = async () => {
   orderStatusStats.value = res as any;
 };
 
+/** 查看物流按钮操作 */
+const handleViewLogistics = (row?: OrderMainVO) => {
+  if (!row?.id) {
+    proxy?.$modal.msgWarning('订单ID不能为空');
+    return;
+  }
+  logisticsOrderId.value = row.id;
+
+  showLogisticsDialog.value = true;
+};
+
 /** 关闭订单操作 */
 const handleCloseOrder = async (row?: OrderMainVO) => {
   const _ids = row?.id || ids.value;

+ 3 - 1
src/views/order/saleOrder/orderAffirm.vue

@@ -187,7 +187,9 @@
         <el-descriptions-item label="收货人手机号" :span="2">{{ crrcExtInfo.mobile || '--' }}</el-descriptions-item>
         <el-descriptions-item label="收货人邮箱">{{ crrcExtInfo.email || '--' }}</el-descriptions-item>
         <el-descriptions-item label="收货地址" :span="2">
-          {{ crrcExtInfo.provinceName || '' }}-{{ crrcExtInfo.cityName || '' }}-{{ crrcExtInfo.countyName || '' }}-{{ crrcExtInfo.townName || '' }}-{{ crrcExtInfo.detailAddress || '' }}
+          {{ crrcExtInfo.provinceName || '' }}-{{ crrcExtInfo.cityName || '' }}-{{ crrcExtInfo.countyName || '' }}-{{ crrcExtInfo.townName || '' }}-{{
+            crrcExtInfo.detailAddress || ''
+          }}
         </el-descriptions-item>
         <el-descriptions-item label="下单人姓名">{{ crrcExtInfo.buyerName || '--' }}</el-descriptions-item>
         <el-descriptions-item label="下单人手机号" :span="2">{{ crrcExtInfo.buyerMobile || '--' }}</el-descriptions-item>