pyt
2025-03-17 956d1d6e32b3c7a8c40101a42a2855fb5c22bc63
H5/pages/certificationAudit/certificationAudit.vue
@@ -1,6 +1,6 @@
<template>
   <view>
      <view v-if="list.length == 0 && status == 'noMore'" class="mt-200">
      <view v-if="list.length == 0" class="mt-200">
         <image src="../../static/空空如也@2x.png" mode="widthFix" class="w100"></image>
         <view class="txt-center mt-94 fs-27 color9">
            暂无数据
@@ -10,8 +10,8 @@
         <view class="mt-38 br-19 bgColor3 shadow2 oh pb-31" v-for="(item,index) in list" :key="item.id">
            <view class="pt-21 px-31 flex a-center j-between font-bold">
               <view class="flex a-center">
                  <view class="fs-31 mr-23">习婕海</view>
                  <view v-if="!index" class="flex a-center pr-19 border3">
                  <view class="fs-31 lh-38 mr-23">{{item.name}}</view>
                  <view v-if="!item.gender" class="flex a-center pr-19 border3">
                     <image src="@/static/man.png" class="w-38 h-38 shrink0" />
                     <view class="fs-23 ml-12">
                        男
@@ -25,32 +25,39 @@
                  </view>
               </view>
               <view class="color3 flex a-center fs-31">
                  待审核
                  {{['待审核','审核通过','审核不通过'][item.auditStatus]}}
               </view>
            </view>
            <view class="mt-38 mx-31 pt-12 pb-23 px-31 br-19 bgColor8">
               <view class="flex a-center j-between lh-38 mt-19 fs-27 color11">
                  <view class="font-w400">身份证号</view>
                  <view class="font-bold">500000000000000000</view>
                  <view class="font-bold">{{item.idNumber}}</view>
               </view>
               <view class="flex a-center j-between lh-38 mt-19 fs-27 color11">
                  <view class="font-w400">联系电话</view>
                  <view class="font-bold">15729765305</view>
                  <view class="font-bold">{{item.phone}}</view>
               </view>
               <view class="flex j-between lh-38 mt-19 fs-27 color11">
                  <view class="font-w400">服务社区</view>
                  <view class="font-bold">仁和区-仁和镇-仁和街社区</view>
                  <view class="font-bold">
                     {{item.districts}}
                     <span v-if="item.street">-</span>
                     {{item.street}}
                     <span v-if="item.community">-</span>
                     {{item.community}}
                  </view>
               </view>
               <view class="flex j-between lh-38 mt-19 fs-27 color11">
                  <view class="font-w400">服务对象</view>
                  <view class="font-bold">文化小区一栋一单元</view>
                  <view class="font-bold">{{item.serviceTarget}}</view>
               </view>
               <view class="flex j-between lh-38 mt-19 fs-27 color11">
                  <view class="font-w400">所在党组织</view>
                  <view class="font-bold max-w1">中共攀枝花市委组织部机关中共11攀枝花市委组织部机关</view>
                  <view class="font-bold max-w1 txt-aligin-r">{{item.partyOrganization}}</view>
               </view>
               <view class="flex wrap mt-19">
                  <image src="/static/logo.png" class="w-142 h-142 mr-12 shrink0 br-19 mb-12" />
                  <image @tap="viewImage(item.avatar)" :src="item.avatar"
                     class="w-142 h-142 mr-12 shrink0 br-19 mb-12" />
               </view>
            </view>
            <view class="mt-37 border1">
@@ -60,10 +67,11 @@
                  申请时间:{{ item.createTime | formatTime }}
               </view>
               <view class="flex a-center j-center fs-23 mt-29 txt-center">
                  <view @click.stop="refuse" class="h-58 lh-58 bgColor5 w-192 br-29 color10 border2">
                  <view @click.stop="auditPopup(item.id,2)"
                     class="h-58 lh-58 bgColor5 w-192 br-29 color10 border2">
                     拒绝
                  </view>
                  <view @click.stop="pass" class="ml-38 h-58 lh-58 bgColor6 w-192 br-29 color8">
                  <view @click.stop="auditPopup(item.id,1)" class="ml-38 h-58 lh-58 bgColor6 w-192 br-29 color8">
                     通过
                  </view>
               </view>
@@ -71,17 +79,17 @@
         </view>
      </view>
      <view class="h-safe-b"></view>
      <CustomPopup ref="tipPoput" @close="closePopup" @comfirm="comfirmPopup">
         <view class="mt-50" :class="suditStatus ? 'mb-38' : 'mb-60'">
            <view class="txt-center fs-31 lh-42 color12">确认审核{{suditStatus ? '拒绝' : '通过'}}所选信息吗?</view>
            <view v-if="suditStatus" class="mt-38">
         <view class="mt-50" :class="form.result == 2 ? 'mb-38' : 'mb-60'">
            <view class="txt-center fs-31 lh-42 color12">确认审核{{form.result == 2 ? '拒绝' : '通过'}}所选信息吗?</view>
            <view v-if="form.result == 2" class="mt-38">
               <view class="flex">
                  <image src="/static/required.png" class="w-10 h-10 mt-12 mr-15 shrink0" />
                  <view class="fs-31 lh-42 font-bold">拒绝理由:</view>
               </view>
               <view class="border5 br-19 mt-13 px-35 py-27 ">
                  <textarea v-model="reasonsRefusal" placeholder="请输入拒绝理由" class="fs-27 h-178 w100"></textarea>
                  <textarea v-model="form.reason" placeholder="请输入拒绝理由" class="fs-27 h-178 w100"></textarea>
                  <view v-if="showRequiredTip" class="fs-23 lh-33 color3">拒绝理由必填</view>
               </view>
            </view>
@@ -93,7 +101,8 @@
<script>
   import dayjs from '@/uni_modules/uview-ui/libs/util/dayjs.js'
   import {
      getList
      getList,
      audit
   } from './service.js'
   export default {
      data() {
@@ -102,11 +111,15 @@
               pageNum: 1,
               pageSize: 10,
            },
            list: [{}, {}],
            status: 'loadMore',
            suditStatus: false,
            reasonsRefusal: '',
            showRequiredTip: false,
            list: [],
            isLoading: false,
            showRequiredTip: false, //必填校验状态
            form: {
               id: '', //党员id
               reason: '', //原因
               result: null, //1 通过 2 不通过
            },
            clickAgain: false,
         }
      },
      filters: {
@@ -116,61 +129,81 @@
         }
      },
      onReachBottom() {
         if (this.status == 'loadMore') {
            this.searchParams.pageNum += 1
            this.fetchList(this.searchParams, (e) => {
               this.list = [...this.list, ...e.records]
               if (this.list.length == e.total) {
                  this.status = 'noMore'
               } else {
                  this.status = 'loadMore'
               }
            })
         if (!this.isLoading) {
            this.searchParams.pageNum = this.searchParams.pageNum + 1;
            this.fetchList();
         } else {
            return uni.showToast({
               title: "没有更多了",
               duration: 2000,
               icon: "none",
            });
         }
      },
      onShow() {
         this.searchParams.pageNum = 1
         this.list = []
         this.fetchList()
      },
      onReady() {},
      methods: {
         comfirmPopup() {
            if (this.suditStatus) {
               if (!this.reasonsRefusal) {
                  this.showRequiredTip = true
                  return
               }
            if (this.clickAgain) return
            if (this.form.result == 2 && !this.form.reason) {
               this.showRequiredTip = true
               return
            }
            this.closePopup()
            this.clickAgain = true
            audit(this.form).then(res => {
               this.searchParams.pageNum = 1
               this.list = []
               this.fetchList()
               this.closePopup()
               uni.showToast({
                  title: this.form.result == 1 ? '当前党员信息审核已通过。' : '当前党员信息审核已拒绝。',
                  icon: 'none',
                  mask: true,
               })
            }).catch(err => {
               this.clickAgain = false
            })
         },
         refuse() {
            this.suditStatus = true
         auditPopup(id, type) {
            this.form.id = id
            this.form.result = type
            this.$refs.tipPoput.showPopup()
         },
         pass() {
            this.$refs.tipPoput.showPopup()
         },
         fetchList(params, callback) {
            if (this.status == 'loading') return
            this.status = 'loading'
            getList(params).then(res => {
         fetchList() {
            getList(this.searchParams).then(res => {
               if (res.code == 200) {
                  res.data.records.map(item => {
                     if (item.images) {
                        item.images = item.images.split(',')
                     }
                  })
                  callback(res.data)
                  if (res.data.records.length < 10) {
                     this.isLoading = true;
                  } else {
                     this.isLoading = false;
                  }
                  this.list = [...this.list, ...res.data.records];
                  if (res.data.total == this.list.length) {
                     this.isLoading = true
                  }
               }
            })
         },
         closePopup() {
            this.$refs.tipPoput.closePopup()
            this.$nextTick(() => {
               this.suditStatus = false
               this.showRequiredTip = false
               this.reasonsRefusal = ''
               this.form = {
                  id: '', //党员id
                  reason: '', //原因
                  result: null, //1 通过 2 不通过
               }
               this.showRequiredTip = false //必填校验状态
               this.clickAgain = false
            })
         },
         viewImage(item) {
            uni.previewImage({
               urls: [item]
            })
         },
      }
   }
@@ -185,16 +218,8 @@
      color: #4C4C4C;
   }
   .color2 {
      color: #232323;
   }
   .color3 {
      color: #FF4948;
   }
   .color4 {
      color: #929191;
   }
   .color5 {
@@ -203,10 +228,6 @@
   .color6 {
      color: #666666;
   }
   .color7 {
      color: #727272;
   }
   .color8 {
@@ -229,28 +250,8 @@
      color: rgba(0, 0, 0, 0.6);
   }
   .bgColor1 {
      background: linear-gradient(270deg, #FFB318 0%, #FF330D 100%);
      width: 58rpx;
      height: 12rpx;
      border-radius: 6rpx;
      position: absolute;
      left: 0;
      right: 0;
      bottom: -5rpx;
      margin: auto;
   }
   .bgColor2 {
      background-color: #fff;
   }
   .bgColor3 {
      background: linear-gradient(180deg, #FFDCDB 0%, rgba(255, 255, 255, 0) 138rpx, #fff 100%);
   }
   .bgColor4 {
      background: linear-gradient( 270deg, rgba(255,241,0,0.5) 0%, rgba(255,249,172,0.25) 48%, rgba(255,255,255,0.2) 100%, #FFFFFF 100%);
   }
   .bgColor5 {
@@ -259,10 +260,6 @@
   .bgColor6 {
      background: linear-gradient(270deg, #FC8D55 0%, #FF4948 100%);
   }
   .bgColor7 {
      background: #FF4948;
   }
   .bgColor8 {