hurx 1 dienu atpakaļ
vecāks
revīzija
a0abfaa63e

+ 2 - 2
src/views/order/orderAssignment/splitAssignDialog.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 订单分配详情抽屉 -->
-  <el-drawer v-model="drawer.visible" size="65%" direction="rtl" :close-on-click-modal="true" :before-close="handleDrawerClose">
+  <el-drawer v-model="drawer.visible" size="70%" direction="rtl" :close-on-click-modal="true" :before-close="handleDrawerClose">
     <template #header>
       <div class="drawer-header">
         <!-- <el-icon color="#f56c6c" :size="24"><WarningFilled /></el-icon> -->
@@ -137,7 +137,7 @@
   </el-drawer>
 
   <!-- 分配抽屉 -->
-  <el-drawer v-model="assignDialog.visible" title="分配" size="50%" direction="rtl" :close-on-click-modal="true">
+  <el-drawer v-model="assignDialog.visible" title="分配" size="60%" direction="rtl" :close-on-click-modal="true">
     <div class="assign-drawer-content">
       <!-- 分配目标选择 -->
       <div class="assign-target-section">

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

@@ -261,14 +261,16 @@ import { getCompany } from '@/api/company/company';
 import { getWarehouse } from '@/api/company/warehouse';
 import { getCustomerInfo } from '@/api/customer/customerFile/customerInfo';
 import { getDept } from '@/api/system/dept';
+import { useRoute, useRouter } from 'vue-router';
 
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
 const { pay_method, fee_type } = toRefs<any>(proxy?.useDict('pay_method', 'fee_type'));
-const router = useRouter();
 
 const buttonLoading = ref(false);
 const loading = ref(true);
-
+// 获取路由和 router 实例
+const route = useRoute();
+const router = useRouter();
 // 订单信息
 const orderInfo = ref<any>({});
 // 收货地址信息
@@ -505,7 +507,6 @@ const goBack = () => {
 
 // 页面加载时获取订单ID并加载订单详情
 onMounted(() => {
-  const route = useRoute();
   const orderId = route.query.id;
   if (orderId) {
     getOrderDetail(orderId as string);
@@ -514,6 +515,15 @@ onMounted(() => {
     router.back();
   }
 });
+// 监听路由 query 中的 id 变化
+watch(
+  () => route.query.id, // 监听 id 的变化
+  (newOrderId) => {
+    if (newOrderId) {
+      getOrderDetail(newOrderId as string);
+    }
+  }
+);
 </script>
 
 <style scoped lang="scss">