hurx 1 månad sedan
förälder
incheckning
6b482d015f

+ 4 - 0
src/api/order/orderProduct/types.ts

@@ -52,6 +52,8 @@ export interface OrderProductVO {
    */
   productImage: string;
 
+  categoryName: string;
+
   /**
    * 产品图片URLUrl
    */
@@ -359,6 +361,8 @@ export interface OrderProductQuery extends PageQuery {
    */
   productImage?: string;
 
+  categoryName?: string;
+
   /**
    * 平台价格(元)
    */

+ 16 - 11
src/views/customer/customerFile/customerInfo/overview/contactInfo.vue

@@ -3,7 +3,7 @@
     <el-card shadow="never">
       <template #header>
         <el-row :gutter="10" class="mb8">
-          <el-col :span="22">
+          <el-col :span="20">
             <span>联系人信息列表</span>
           </el-col>
           <el-col :span="1.5">
@@ -189,7 +189,7 @@ const dialog = reactive<DialogOption>({
   title: ''
 });
 
-const roleOptions = ref<RoleVO[]>([]);
+const roleOptions = ref<any>([]);
 
 const initFormData: CustomerContactForm = {
   id: undefined,
@@ -262,15 +262,20 @@ const getList = async () => {
 /** 加载角色列表 */
 const loadRoleOptions = async () => {
   try {
-    const res: any = await listRole({
-      pageNum: 1,
-      pageSize: 9999,
-      roleName: '',
-      roleKey: '',
-      status: ''
-    } as any);
-
-    roleOptions.value = res?.rows || res?.data?.rows || res?.data || [];
+    // const res: any = await listRole({
+    //   pageNum: 1,
+    //   pageSize: 9999,
+    //   roleName: '',
+    //   roleKey: '',
+    //   status: ''
+    // } as any);
+    // roleOptions.value = res?.rows || res?.data?.rows || res?.data || [];
+    roleOptions.value = [
+      { roleId: 1, roleName: '管理角色' },
+      { roleId: 2, roleName: '采购角色' },
+      { roleId: 3, roleName: '查询角色' },
+      { roleId: 4, roleName: '审核角色' }
+    ];
   } catch (error) {
     console.error('加载角色列表失败:', error);
     roleOptions.value = [];

+ 1 - 1
src/views/customer/customerFile/customerInfo/overview/contractManagement.vue

@@ -32,7 +32,7 @@
     <el-card shadow="never">
       <template #header>
         <el-row :gutter="10" class="mb8">
-          <el-col :span="22">
+          <el-col :span="20">
             <span>合同管理信息列表</span>
           </el-col>
           <el-col :span="1.5">

+ 1 - 1
src/views/customer/customerFile/customerInfo/overview/shippingAddress.vue

@@ -3,7 +3,7 @@
     <el-card shadow="never">
       <template #header>
         <el-row :gutter="10" class="mb8">
-          <el-col :span="22">
+          <el-col :span="20">
             <span>收货地址信息列表</span>
           </el-col>
           <el-col :span="1.5">

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

@@ -90,7 +90,7 @@
           <template #default="scope">
             <el-button link type="primary" @click="handleReview(scope.row)">详情</el-button>
             <el-button link type="primary" v-if="scope.row.assignmentStatus != '1'" @click="handleAssignment(scope.row)">分配</el-button>
-            <!-- <el-button link type="primary" v-if="scope.row.assignmentStatus == '1'" @click="handleAssignment(scope.row)">重新分配</el-button> -->
+            <el-button link type="primary" v-if="scope.row.assignmentStatus == '1'" @click="handleAssignment(scope.row)">分配记录</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -282,7 +282,7 @@ const handleAssignment = async (row?: OrderMainVO | null) => {
 
   if (row) {
     // 单个订单分配 - 直接打开统一的分配抽屉
-    splitAssignDialogRef.value?.open(row.id);
+    splitAssignDialogRef.value?.open(row.id, row.assignmentStatus);
   } else {
     // 批量分配 - 只支持整单分配
     if (!ids.value || ids.value.length === 0) {

+ 9 - 4
src/views/order/orderAssignment/splitAssignDialog.vue

@@ -45,7 +45,7 @@
       </div>
 
       <el-tabs v-model="activeTab" class="detail-tabs">
-        <el-tab-pane label="待分配" name="pending">
+        <el-tab-pane label="待分配" name="pending" v-if="assignmentStatus != '1'">
           <div class="tab-actions">
             <el-button type="primary" @click="handleBatchAssign">+ 批量分配</el-button>
           </div>
@@ -283,11 +283,16 @@ const assignedProducts = ref<any[]>([]);
 // 分配记录
 const assignRecords = ref<any[]>([]);
 
+const assignmentStatus = ref('0');
+
 /** 打开订单分配详情抽屉 */
-const open = async (orderId: string | number) => {
+const open = async (orderId: string | number, status: string) => {
   reset();
   drawer.visible = true;
-
+  assignmentStatus.value = status;
+  if (status == '1') {
+    activeTab.value = 'assigned';
+  }
   try {
     // 获取订单详情
     const res = await getOrderMain(orderId);
@@ -494,7 +499,7 @@ const submitAssign = async () => {
     selectedAssignProducts.value = [];
 
     // 刷新抽屉数据
-    await open(orderInfo.value.id);
+    await open(orderInfo.value.id, null);
     emit('success');
   } catch (error) {
     console.error('分配失败:', error);

+ 2 - 0
src/views/order/orderMain/index.vue

@@ -658,6 +658,7 @@ const submitForm = () => {
           productUnitId: product.productUnitId,
           productUnit: product.unitName, // 产品单位
           productImage: product.productImage, // 产品图片
+          categoryName: product.categoryName,
           platformPrice: product.price, // 平台价格(单价)
           marketPrice: product.marketPrice,
           minOrderQuantity: product.minOrderQuantity, // 最小起订量
@@ -766,6 +767,7 @@ const handleProductConfirm = (product: any) => {
     id: product.id,
     productCode: product.productNo, // 产品编码
     productImage: product.productImage, // 商品图片
+    categoryName: product.categoryName,
     productName: product.itemName, // 产品信息
     taxRate: product.taxRate || 0, // 税率
     marketPrice: product.marketPrice || 0,