Quellcode durchsuchen

合伙人bug修改

xuqiang vor 3 Monaten
Ursprung
Commit
ba9ccdf34d

+ 2 - 1
src/views/partnerManagement/modules/addPartner.vue

@@ -36,9 +36,10 @@
                 </el-form-item>
               </el-col>
               <el-col :span="10">
+                <!--   去掉手机号带出人员信息数据    @input="mobileInput"   -->
                 <el-form-item prop="mobile" label="手机号">
                   <el-input type="text" :maxlength="11" :disabled="editId" show-word-limit v-model="operationForm.mobile"
-                    placeholder="请填写手机号" @input="mobileInput"></el-input>
+                    placeholder="请填写手机号" ></el-input>
                 </el-form-item>
               </el-col>
             </el-row>

+ 35 - 9
src/views/partnerManagement/upgradeDowngradeRecord.vue

@@ -2,15 +2,17 @@
 <template>
   <div>
     <PageMain class="vh100 flex-1 overflow-hidden flex flex-col">
-      <el-tabs v-model="formInline.auditStatus" @tab-click="handleClick">
+      <el-tabs v-model="activeTab" @tab-click="handleClick">
         <el-tab-pane :label="`待审核 (${pendingReview})`" name="0"></el-tab-pane>
         <el-tab-pane :label="`审核通过(${isApproved})`" name="1"></el-tab-pane>
         <el-tab-pane :label="`审核不通过(${isNotApproved})`" name="2"></el-tab-pane>
+        <el-tab-pane :label="`待解锁(${toBeUnlocked})`" name="3" ></el-tab-pane>
+        <el-tab-pane :label="`已解锁(${unlocked})`" name="4" ></el-tab-pane>
       </el-tabs>
       <SearchForm :fields="fields" :formInline="formInline" :onSearch="findpage" :onReset="resetForm" />
       <div class="flex-1 overflow-auto">
         <ComplexTable :tableData="tableData" :columns="columns" :showIndex="false" :columnwidth="250"
-          :showOperation="formInline.auditStatus == '0' ? true : false" :showSelect="false" :pageInfo="pageInfo"
+                      :showOperation="['0', '3'].includes(activeTab)"  :showSelect="false" :pageInfo="pageInfo"
           @getList="getList">
           <!-- 自定义操作插槽 -->
           <template v-slot:operation="scope">
@@ -90,7 +92,8 @@
     <el-dialog v-model="unlockLevelVisible" title="解锁等级" width="500">
       <el-form :model="unlockLevelInfo" label-width="180px" label-position="top">
         <el-form-item label="支付金额">
-          <el-input v-model="unlockLevelInfo.paymentAmount">
+          <el-input v-model="unlockLevelInfo.paymentAmount" readonly>
+            <template #append>元</template>
           </el-input>
         </el-form-item>
         <el-form-item label="收款凭证">
@@ -136,6 +139,8 @@ const id = ref("");//选中的id
 const pendingReview = ref(0);//待审核条数
 const isApproved = ref(0);//已审核条数
 const isNotApproved = ref(0);//审核不通过条数
+const toBeUnlocked = ref(0);//待解锁
+const unlocked = ref(0);//已解锁
 const upgradeReviewVisible = ref(false);//升级审核弹窗是否显示
 const OperationVisible = ref(false);//拒绝操作弹窗是否显示
 const auditCommissionshow = ref(true);//是否显示佣金比例
@@ -162,10 +167,11 @@ const formInline = reactive({
   name: "",//姓名
   mobile: "",//手机号
   userId: "",//工号
-  type: "",//类型
   applyTimes: [],//申请时间
   auditStatus: '0',
+  type: '0'
 })
+const activeTab = ref('0')
 const pageInfo = ref({
   pageNum: 1,
   pageSize: 20,
@@ -340,8 +346,7 @@ const handleChange = (file: any, FileList: any) => {
 };
 // 处理点击事件
 const handleClick = (tab: any) => {
-  formInline.auditStatus = tab.props.name;
-  console.log(formInline.auditStatus);
+  activeTab.value = tab.props.name;
   findpage();
 };
 //分页事件
@@ -364,15 +369,36 @@ const resetForm = () => {
 }
 //数据查询
 function findpage() {
-  api.partnerApi.liftingRecordQueryPage({ pages: pageInfo.value.pageNum, size: pageInfo.value.pageSize, ...formInline }).then((res: any) => {
+  const currentTab = activeTab.value;
+  let queryAuditStatus = currentTab;
+  let queryType: string;
+  if (currentTab === '3' || currentTab === '4') {
+    queryType = '1';
+    queryAuditStatus = currentTab === '4' ? '3' : '0';
+  } else {
+    queryType = '0';
+  }
+  api.partnerApi.liftingRecordQueryPage({ pages: pageInfo.value.pageNum, size: pageInfo.value.pageSize, ...formInline, type: queryType, auditStatus: queryAuditStatus }).then((res: any) => {
     if (res.code == '200') {
       tableData.value = res.data.records;
       pageInfo.value.pageNum = res.data.current;
       pageInfo.value.pageSize = res.data.size;
       pageInfo.value.total = res.data.total;
-    } else {
+      const groupArr = res.data.groupCount || [];
+      // 待审核:auditStatus = 0
+      pendingReview.value = groupArr.find(item => item.auditStatus === '00')?.count || 0;
+      // 已审核:auditStatus = 1
+      isApproved.value = groupArr.find(item => item.auditStatus === '01')?.count || 0;
+      // 审核不通过:auditStatus = 2
+      isNotApproved.value = groupArr.find(item => item.auditStatus === '02')?.count || 0;
+      // 待解锁:
+      toBeUnlocked.value = groupArr.find(item => item.auditStatus === '10')?.count || 0;
+      // 已解锁
+      unlocked.value = groupArr.find(item => item.auditStatus === '13')?.count || 0;
     }
-  });
+  }).catch((err) => {
+    console.error('分页查询失败:', err)
+  })
 }
 // 获取人员等级列表
 const userGradeList = ref()