Pārlūkot izejas kodu

优化跟进会员页面展示信息

cgp 2 nedēļas atpakaļ
vecāks
revīzija
42b4b242c1
2 mainītis faili ar 89 papildinājumiem un 22 dzēšanām
  1. 57 8
      src/views/memberSales/index.vue
  2. 32 14
      src/views/task/unprocessed.vue

+ 57 - 8
src/views/memberSales/index.vue

@@ -10,6 +10,33 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item label="真实姓名" prop="realName">
+        <el-input
+          v-model="queryParams.realName"
+          placeholder="请输入客户真实姓名"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="销售姓名" prop="companyUserName">
+        <el-input
+          v-model="queryParams.companyUserName"
+          placeholder="请输入销售姓名"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="会员ID" prop="exId">
+        <el-input
+          v-model="queryParams.exId"
+          placeholder="请输入企微会员ID"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -19,6 +46,7 @@
     <el-table border v-loading="loading" :data="memberSalesList" @selection-change="handleSelectionChange">
       <el-table-column label="企微会员ID" align="center" prop="exId" />
       <el-table-column label="客户名称" align="center" prop="userName" />
+      <el-table-column label="真实姓名" align="center" prop="realName" />
       <el-table-column label="客户电话" align="center" prop="phone" />
       <el-table-column label="待处理条数" align="center" prop="unprocessed" />
       <el-table-column label="销售名称" align="center" prop="companyUserName" />
@@ -168,6 +196,16 @@
               style="width: 200px;"
             />
           </el-form-item>
+
+          <!-- 新增:商品名称搜索 -->
+          <el-form-item label="商品名称">
+            <el-input
+              v-model="historyQueryParams.packageName"
+            placeholder="请输入商品名称"
+            clearable
+            style="width: 200px;"
+            />
+          </el-form-item>
           <el-form-item>
             <el-button type="primary" @click="loadHistoryOrders">搜索</el-button>
             <el-button @click="resetHistoryQuery">重置</el-button>
@@ -241,14 +279,18 @@ export default {
       // 是否显示弹出层
       open: false,
       // 查询参数
+      // 修改点:在 queryParams 中增加了 companyUserName, realName, exId 字段
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        exId: null,
+        exId: null, // 企微会员ID
         fsUserId: null,
         companyUserId: null,
         companyId: null,
-        doctorId: null
+        doctorId: null,
+        userName: null, // 客户名称
+        companyUserName: null, // 销售姓名
+        realName: null // 客户真实姓名
       },
       // 表单参数
       form: {},
@@ -272,11 +314,13 @@ export default {
       historyLoading: false,
       historyList: [],
       historyTotal: 0,
+      // 修改点:在 historyQueryParams 中添加了 packageName 字段
       historyQueryParams: {
         pageNum: 1,
         pageSize: 10,
         userId: null, // 用于查询,由打开弹窗时注入
-        orderCode: null
+        orderCode: null,
+        packageName: '' // 新增:商品名称,默认为空字符串
       },
 
     };
@@ -335,8 +379,11 @@ export default {
       this.getList();
     },
     /** 重置按钮操作 */
+    // 修改点:重置按钮操作,确保新增的字段也被清空
     resetQuery() {
+      // 重置整个表单
       this.resetForm("queryForm");
+      // 触发一次搜索,以刷新列表(此时查询参数已为空)
       this.handleQuery();
     },
     // 多选框选中数据
@@ -470,8 +517,9 @@ export default {
       this.historyQueryParams = {
         pageNum: 1,
         pageSize: 10,
-        userId: row.fsUserId, // 使用当前行的 fsUserId
-        orderCode: null
+        userId: row.fsUserId,
+        orderCode: null,
+        packageName: ''
       };
       // 打开弹窗
       this.historyDialogVisible = true;
@@ -511,12 +559,13 @@ export default {
      * 重置历史订单查询条件
      */
     resetHistoryQuery() {
-      const userId = this.historyQueryParams.userId;
+      const userId = this.historyQueryParams.userId; // 保存当前 userId
       this.historyQueryParams = {
         pageNum: 1,
         pageSize: 10,
-        userId: userId,
-        orderCode: null
+        userId: userId, // 重置时恢复 userId
+        orderCode: null,
+        packageName: '' // 重置时也设置为 ''
       };
       // 重置后重新查询
       this.loadHistoryOrders();

+ 32 - 14
src/views/task/unprocessed.vue

@@ -2,45 +2,63 @@
   <div class="app-container">
     <div style="margin-bottom: 10px">
       <el-card>
-        <!-- 第一行 -->
+        <!-- 第一行 - 基础信息 (4列) -->
         <el-row :gutter="20">
           <el-col :span="6">
             <div class="info-item">
-              <span class="info-label">会员名称:</span>
+              <span class="info-label">会员姓名:</span>
+              <span class="info-value">{{ userName || '-' }}</span>
+            </div>
+          </el-col>
+          <el-col :span="6">
+            <div class="info-item">
+              <span class="info-label">真实姓名:</span>
               <span class="info-value">{{ formData.userName || '-' }}</span>
             </div>
           </el-col>
+          <el-col :span="6">
+            <div class="info-item">
+              <span class="info-label">客户年龄:</span>
+              <span class="info-value">{{ formData.age || '-' }}</span>
+            </div>
+          </el-col>
           <el-col :span="6">
             <div class="info-item">
               <span class="info-label">性别:</span>
               <span class="info-value">{{ displaySex }}</span>
             </div>
           </el-col>
+        </el-row>
+
+        <!-- 第二行 - 基础信息 (4列) -->
+        <el-row :gutter="20" style="margin-top: 10px;">
           <el-col :span="6">
             <div class="info-item">
               <span class="info-label">会员电话:</span>
               <span class="info-value">{{ phone || '-' }}</span>
             </div>
           </el-col>
+          <el-col :span="6">
+            <div class="info-item">
+              <span class="info-label">过敏情况:</span>
+              <span class="info-value">{{ formData.allergy || '-' }}</span>
+            </div>
+          </el-col>
+          <!-- 如果还有其他基础信息可以放在这里,或者留空 -->
           <el-col :span="6">
             <div class="info-item">
               <span class="info-label">推送销售:</span>
               <span class="info-value">{{ companyUserName || '-' }}</span>
             </div>
           </el-col>
-        </el-row>
-
-        <!-- 第二行 -->
-        <el-row :gutter="20" style="margin-top: 10px;">
-          <el-col :span="24">
+          <el-col :span="6">
             <div class="info-item">
-              <span class="info-label">过敏情况:</span>
-              <span class="info-value">{{ formData.allergy || '-' }}</span>
+
             </div>
           </el-col>
         </el-row>
 
-        <!-- 第三行 -->
+        <!-- 第三行 - 备注 -->
         <el-row :gutter="20" style="margin-top: 10px;">
           <el-col :span="24">
             <div class="info-item">
@@ -50,7 +68,6 @@
           </el-col>
         </el-row>
 
-
         <!-- 第四行 - 采集信息 -->
         <el-row :gutter="20" style="margin-top: 10px;">
           <el-col :span="24">
@@ -366,7 +383,6 @@ export default {
         return;
       }
       getCollectionInfo(this.fsUserId).then(response => {
-        console.log('获取采集信息成功:', response.data);
         if (response.data) {
           this.formData = response.data;
         } else {
@@ -436,7 +452,8 @@ export default {
       }).then(() => {
         this.getList();
         this.msgSuccess("删除成功");
-      }).catch(() => { });
+      }).catch(() => {
+      });
     },
     /** 导出按钮操作 */
     handleExport() {
@@ -451,7 +468,8 @@ export default {
       }).then(response => {
         // this.download(response.msg);
         this.exportLoading = false;
-      }).catch(() => { });
+      }).catch(() => {
+      });
     },
     /** 打开修改对话框 */
     handleUpdate(row) {