Explorar el Código

优化改版信息采集表

cgp hace 2 semanas
padre
commit
027d5a5c14

+ 37 - 8
src/views/qw/collectionFully/index.vue

@@ -49,6 +49,14 @@
       <el-table-column label="用户姓名" align="center" prop="userName" />
       <el-table-column label="套餐包" align="center" prop="packageName" />
       <el-table-column label="订单号" align="center" prop="packageOrderCode" />
+      <el-table-column label="当前状态" align="center">
+        <template slot-scope="scope">
+          <el-tag :type="getStatusType(scope.row.personalCollectStatus)" effect="plain">
+            {{ getStatusText(scope.row.personalCollectStatus) }}
+          </el-tag>
+        </template>
+      </el-table-column>
+
       <el-table-column label="用户性别" align="center" prop="sex">
         <template slot-scope="scope">
           <span>{{ sexFormat(scope.row.sex) }}</span>
@@ -60,13 +68,6 @@
       <el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
       <el-table-column label="医生姓名" align="center" prop="doctorName" />
       <el-table-column label="销售人员" align="center" prop="companyUserName" />
-      <el-table-column label="客户类型" align="center" prop="qwTag">
-        <template slot-scope="scope">
-          <el-tag :type="scope.row.qwTag === 1 ? 'success' : ''">
-            {{ scope.row.qwTag === 1 ? '个微' : '企微' }}
-          </el-tag>
-        </template>
-      </el-table-column>
       <el-table-column label="创建时间" align="center" width="180">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
@@ -91,7 +92,7 @@
             患者和地址
           </el-button>
           <el-button
-            v-if="scope.row.qwTag === 1 && scope.row.personalCollectStatus === 4"
+            v-if="scope.row.qwTag === 1 && scope.row.packageOrderCode === null&& scope.row.personalCollectStatus === 4"
             size="mini"
             type="text"
             icon="el-icon-edit"
@@ -258,6 +259,34 @@ export default {
     this.fetchSourceList();
   },
   methods: {
+    // 获取状态文本
+    getStatusText(status) {
+      const statusMap = {
+        0: '待绑定用户',
+        1: '待生成开方数据',
+        2: '待医生开方',
+        3: '待药师审核',
+        4: '待绑定套餐包',
+        5: '待分享创建订单',
+        6: '待支付',
+        7: '已完成'
+      };
+      return statusMap[status] || '未知状态';
+    },
+    // 获取状态标签类型 (用于 el-tag 颜色)
+    getStatusType(status) {
+      const typeMap = {
+        0: 'info',
+        1: 'info',
+        2: 'warning',
+        3: 'warning',
+        4: 'warning',
+        5: 'primary',
+        6: 'danger',
+        7: 'success'
+      };
+      return typeMap[status] || 'info';
+    },
     fetchSourceList() {
       options().then((res) => {
         this.sourceList = res.data || [];

+ 7 - 0
src/views/qw/collectionPendingSales/index.vue

@@ -29,6 +29,13 @@
     <!-- 数据表格 -->
     <el-table border v-loading="loading" :data="collectionList">
       <el-table-column label="用户姓名" align="center" prop="userName" />
+      <el-table-column label="客户类型" align="center" prop="qwTag">
+        <template slot-scope="scope">
+          <el-tag :type="scope.row.qwTag === 1 ? 'success' : ''">
+            {{ scope.row.qwTag === 1 ? '个微' : '企微' }}
+          </el-tag>
+        </template>
+      </el-table-column>
       <el-table-column label="用户性别" align="center" prop="sex">
         <template slot-scope="scope">
           <span>{{ sexFormat(scope.row.sex) }}</span>