hurx пре 1 недеља
родитељ
комит
99dac32802
1 измењених фајлова са 26 додато и 2 уклоњено
  1. 26 2
      src/views/order/orderDeliver/index.vue

+ 26 - 2
src/views/order/orderDeliver/index.vue

@@ -85,6 +85,14 @@
           <template #default="scope">
             <!-- <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"
+              v-if="scope.row.orderStatus == '3' || scope.row.orderStatus == '4' || scope.row.orderStatus == '5'"
+              @click="handleViewLogistics(scope.row)"
+              >查看物流</el-button
+            >
+
             <el-button link type="primary">取消订单</el-button>
           </template>
         </el-table-column>
@@ -95,6 +103,8 @@
 
     <!-- 发货对话框 -->
     <DeliverDialog v-model="showDeliverDialog" :order-id="currentOrderId" :order-no="currentOrderNo" @success="handleDeliverSuccess" />
+
+    <LogisticsDetail v-model="showLogisticsDialog" :order-id="logisticsOrderId" />
   </div>
 </template>
 
@@ -110,7 +120,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')
@@ -134,6 +144,9 @@ const showDeliverDialog = ref(false);
 const currentOrderId = ref<string | number>();
 const currentOrderNo = ref<string>();
 
+const showLogisticsDialog = ref(false);
+const logisticsOrderId = ref<string | number>();
+
 const dialog = reactive<DialogOption>({
   visible: false,
   title: ''
@@ -237,7 +250,7 @@ const data = reactive<PageData<OrderMainForm, OrderMainQuery>>({
     status: undefined,
     platformCode: undefined,
     orderType: '1',
-    currentLevelStr: '1,2',
+    currentLevelStr: '2',
     assigneeType: 'bp',
     assignmentStatus: undefined,
 
@@ -269,6 +282,17 @@ const getList = async () => {
   queryOrderStatusStatsMethod();
 };
 
+/** 查看物流按钮操作 */
+const handleViewLogistics = (row?: OrderMainVO) => {
+  if (!row?.id) {
+    proxy?.$modal.msgWarning('订单ID不能为空');
+    return;
+  }
+  logisticsOrderId.value = row.id;
+
+  showLogisticsDialog.value = true;
+};
+
 const queryOrderStatusStatsMethod = async () => {
   const res = await queryOrderStatusStats();
   orderStatusStats.value = res as any;