htc пре 4 дана
родитељ
комит
57351b6de8

BIN
src/assets/img/dangan_hdxd.png


BIN
src/assets/img/dangan_hdzp.png


+ 57 - 15
src/views/modules/activity/info.vue

@@ -13,19 +13,19 @@
             <div class="info">
                 <div class="info-pre adf">
                     <div class="info-pre-title adf"><span>*</span>活动名称:</div>
-                    <div class="info-pre-content">{{ activityInfo.activityName || '--' }}</div>
+                    <div class="info-pre-content">{{ activityInfo.activityName || '' }}</div>
                 </div>
                 <div class="info-pre adf">
                     <div class="info-pre-title adf"><span>*</span>活动时间:</div>
-                    <div class="info-pre-content">{{ activityInfo.activityStartTime || '--' }} - {{ activityInfo.activityEndTime || '--' }}</div>
+                    <div class="info-pre-content">{{ activityInfo.activityStartTime || '' }} - {{ activityInfo.activityEndTime || '' }}</div>
                 </div>
                 <div class="info-pre adf">
                     <div class="info-pre-title adf"><span>*</span>渠道方:</div>
-                    <div class="info-pre-content">{{ activityInfo.channelName || '--' }}</div>
+                    <div class="info-pre-content">{{ activityInfo.channelName || '' }}</div>
                 </div>
                 <div class="info-pre adf">
                     <div class="info-pre-title adf"><span>*</span>活动地址:</div>
-                    <div class="info-pre-content">{{ provinceName || '' }}{{ cityName || '' }}{{ districtName || '' }}{{ activityInfo.address || '--' }}</div>
+                    <div class="info-pre-content">{{ provinceName || '' }}{{ cityName || '' }}{{ districtName || '' }}{{ activityInfo.address || '' }}</div>
                 </div>
                 <div class="info-pre adf">
                     <div class="info-pre-title adf"><span>*</span>会员等级:</div>
@@ -33,11 +33,11 @@
                 </div>
                 <div class="info-pre adf">
                     <div class="info-pre-title adf"><span>*</span>举办方:</div>
-                    <div class="info-pre-content">{{ activityInfo.organizerName || '--' }}</div>
+                    <div class="info-pre-content">{{ activityInfo.organizerName || '' }}</div>
                 </div>
                 <div class="info-pre adf">
                     <div class="info-pre-title adf"><span>*</span>报名人数:</div>
-                    <div class="info-pre-content">{{ activityInfo.signedNumber || 0 }}/{{ activityInfo.recruitmentMax || '无限制' }}</div>
+                    <div class="info-pre-content">{{ activityInfo.recruitmentNow || 0 }}/{{ activityInfo.recruitmentMax || '无限制' }}</div>
                 </div>
                 <div class="info-pre adf">
                     <div class="info-pre-title adf"><span>*</span>公益支持:</div>
@@ -46,7 +46,7 @@
                 </div>
                 <div class="info-pre adf">
                     <div class="info-pre-title adf"><span>*</span>公益支持内容:</div>
-                    <div class="info-pre-content">{{ activityInfo.loveValueContent || '--' }}</div>
+                    <div class="info-pre-content">{{ activityInfo.loveValueContent || '' }}</div>
                 </div>
             </div>
             <div class="title adfacjb">
@@ -56,18 +56,24 @@
             <el-table :data="dataList" border cell-class-name="vertical-top-cell" v-loading="loading" empty-text="暂无活动报名信息" style="margin-top: 16px;">
                 <el-table-column prop="id" label="善行少年编号" width="200"></el-table-column>
                 <el-table-column prop="welfareName" label="家庭名称" width="150"></el-table-column>
-                <el-table-column prop="contactPhone" label="手机号码" width="150"></el-table-column>
-                <el-table-column prop="xxx" label="渠道方" width="200"></el-table-column>
+                <el-table-column prop="contactPhoneJM" label="手机号码" width="150"></el-table-column>
+                <el-table-column prop="channelName" label="渠道方" width="200"></el-table-column>
                 <el-table-column prop="name" label="姓名" width="150"></el-table-column>
-                <el-table-column prop="idCard" label="身份证号" width="300"></el-table-column>
+                <el-table-column prop="idCardJM" label="身份证号" width="300"></el-table-column>
                 <el-table-column prop="volunteerNo" label="义工号" width="100"></el-table-column>
-                <el-table-column prop="gender" label="性别" width="100"></el-table-column>
-                <el-table-column prop="xxx" label="年龄" width="100"></el-table-column>
-                <el-table-column prop="xxx" label="参会情况" width="120"></el-table-column>
-                <el-table-column prop="currentSchool" label="就读学校" width="200"></el-table-column>
+                <el-table-column prop="gender" label="性别" width="100">
+                    <template slot-scope="scope">{{ genderDict[scope.row.gender] || '' }}</template>
+                </el-table-column>
+                <el-table-column prop="age" label="年龄" width="100">
+                    <template slot-scope="scope">{{ scope.row.age||0 }}岁</template>
+                </el-table-column>
+                <!-- <el-table-column prop="xxx" label="参会情况" width="120"></el-table-column> -->
+                <el-table-column prop="currentSchool" label="就读学校" width="200">
+                    <template slot-scope="scope">{{ scope.row.currentSchool || '/' }}</template>
+                </el-table-column>
                 <el-table-column prop="createDate" label="报名时间" width="240"></el-table-column>
                 <el-table-column prop="signupState" label="状态" width="150" fixed="right">
-                    <template slot-scope="scope">{{ statusCfg[scope.row.signupState] || '--' }}</template>
+                    <template slot-scope="scope"><div :class="{'statered':scope.row.signupState==-1}">{{ statusCfg[scope.row.signupState] || '--' }}</div></template>
                 </el-table-column>
             </el-table>
             <el-pagination
@@ -98,6 +104,11 @@ export default {
         2: '专享券',
         3: '免费'
       },
+      genderDict: {
+        0: '男',
+        1: '女',
+        2: '保密'
+      },
       loading: false,
       queryParams: {
         activityId: this.$route.query.id,
@@ -140,10 +151,37 @@ export default {
       this.$http.get('/core/activity/signup/getSignupList', { params: this.queryParams }).then(({ data: res }) => {
         if (res.code !== 0) return this.$message.error(res.msg)
         this.dataList = res.data.list
+        this.dataList.forEach(d => {
+          d.contactPhoneJM = d.contactPhone.replace(/^(.{3})(?:\d+)(.{4})$/, '$1****$2')
+          d.idCardJM = d.idCard.replace(/^(\d{6})(\d{8})(\d{3}[\dX])$/i, '$1********$3')
+          d.age = this.getAge(d.idCard)
+        })
         this.total = res.data.total
         this.loading = false
       })
     },
+    isValid (idCard) {
+      const regex = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
+		  return typeof idCard === 'string' && regex.test(idCard)
+    },
+    getAge (idCard) {
+      if (!this.isValid(idCard)) return 0
+      const birthDateStr = idCard.substring(6, 14)
+      const birthYear = parseInt(birthDateStr.substring(0, 4), 10)
+      const birthMonth = parseInt(birthDateStr.substring(4, 6), 10)
+      const birthDay = parseInt(birthDateStr.substring(6, 8), 10)
+      const today = new Date()
+      const currentYear = today.getFullYear()
+      const currentMonth = today.getMonth() + 1
+      const currentDay = today.getDate()
+      // 计算周岁
+      let age = currentYear - birthYear
+      // 如果当前月份小于出生月份,或者月份相同但日期小于出生日期,说明今年的生日还没过
+      if (currentMonth < birthMonth || (currentMonth === birthMonth && currentDay < birthDay)) {
+        age--
+      }
+      return age < 0 ? 0 : age
+    },
     pageSizeChangeHandle (val) {
       this.queryParams.limit = val
       this.getList()
@@ -165,6 +203,10 @@ export default {
 </script>
 
 <style scoped lang="scss">
+.statered{
+  color: #F4657A;
+}
+
 .top {
     padding-bottom: 13px;
     box-shadow: inset 0px -1px 0px 0px #F0F1F7;

+ 97 - 19
src/views/modules/member/components/activityRecord.vue

@@ -1,24 +1,30 @@
 <template>
   <div class="page">
     <el-table :data="dataList" border cell-class-name="vertical-top-cell" v-loading="loading" empty-text="暂无活动记录">
-      <el-table-column prop="xxx" label="序号">
+      <el-table-column prop="xxx" label="序号" width="70">
         <template slot-scope="scope">{{ scope.$index + 1 }}</template>
       </el-table-column>
-      <el-table-column prop="memberName" label="会员姓名"></el-table-column>
-      <el-table-column prop="memberAge" label="会员年龄"></el-table-column>
-      <el-table-column prop="activityId" label="活动ID"></el-table-column>
-      <el-table-column prop="typeName" label="活动类型"></el-table-column>
-      <el-table-column prop="activityName" label="活动名称"></el-table-column>
-      <el-table-column prop="loveValueContent" label="公益支持内容"></el-table-column>
-      <el-table-column prop="activityStartTime" label="活动时间"></el-table-column>
-      <el-table-column prop="xxx" label="活动地点"></el-table-column>
-      <el-table-column prop="signupState" label="活动状态">
+      <el-table-column prop="memberName" label="会员姓名" width="100"></el-table-column>
+      <el-table-column prop="age" label="会员年龄" width="100">
+        <template slot-scope="scope">{{ scope.row.age }}岁</template>
+      </el-table-column>
+      <el-table-column prop="activityId" label="活动ID" width="200"></el-table-column>
+      <el-table-column prop="typeName" label="活动类型" width="120"></el-table-column>
+      <el-table-column prop="activityName" label="活动名称" width="200"></el-table-column>
+      <el-table-column prop="loveValueContent" label="公益支持内容" width="300"></el-table-column>
+      <el-table-column prop="activityStartTime" label="活动时间" width="200"></el-table-column>
+      <el-table-column label="活动地点" width="150">
+        <template slot-scope="scope">{{ scope.row.provinceName }}{{ scope.row.cityName }}</template>
+      </el-table-column>
+      <el-table-column prop="signupState" label="活动状态" width="100">
         <template slot-scope="scope">{{ statusDict[scope.row.signupState] }}</template>
       </el-table-column>
-      <el-table-column prop="loveValue" label="捐献爱心值"></el-table-column>
-      <el-table-column label="操作">
+      <el-table-column prop="loveValue" label="捐献爱心值" width="120">
+        <template slot-scope="scope">{{ scope.row.valueLimit==2?0:(scope.row.loveValue||0) }}</template>
+      </el-table-column>
+      <el-table-column label="操作" fixed="right" width="120">
         <template slot-scope="scope">
-          <el-button type="text">查看档案</el-button>
+          <el-button type="text" v-if="scope.row.signupState==3" @click="handleReview(scope.row)">查看档案</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -31,6 +37,19 @@
       @size-change="pageSizeChangeHandle"
       @current-change="pageCurrentChangeHandle">
     </el-pagination>
+    <el-dialog width="700px" :visible.sync="show" title="查看档案" @close="show=false">
+      <div class="dangan" v-if="danganInfo">
+          <img class="dangan-img" src="@/assets/img/dangan_hdxd.png" alt="">
+          <p class="dangan-p">{{ danganInfo.experience||'' }}</p>
+          <img class="dangan-img" src="@/assets/img/dangan_hdzp.png" alt="">
+          <div class="adffc">
+            <img class="dangan-photo" v-for="(item,index) in danganInfo.photos" :key="index" :src="item"/>
+          </div>
+      </div>
+      <div class="demo-drawer__footer" style="display: flex;justify-content: end;margin-top: 30px;">
+        <el-button type="primary" @click="show=false">关 闭</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -48,12 +67,18 @@ export default {
       total: 0,
       loading: false,
       statusDict: {
-        0: '未报名',
+        // 0: '未报名',
+        // 1: '已报名',
+        // 2: '未签到',
+        // 3: '已签到',
+        // 4: '已填档案'
+        '-1': '已取消',
         1: '已报名',
-        2: '未签到',
-        3: '已签到',
-        4: '已填档案'
-      }
+        2: '已签到',
+        3: '已填档案'
+      },
+      show: false,
+      danganInfo: null
     }
   },
   mounted () {
@@ -63,14 +88,39 @@ export default {
   methods: {
     getList () {
       this.loading = true
-      this.$http.get('/core/activity/signup/page', { params: this.queryParams }).then(({ data: res }) => {
+      this.$http.get('/core/activity/signup/myActivityList', { params: this.queryParams }).then(({ data: res }) => {
         if (res.code === 0) {
           this.dataList = res.data.list
+          this.dataList.forEach(d => {
+            d.age = this.getAge(d.idCard)
+          })
           this.total = res.data.total
         }
         this.loading = false
       })
     },
+    isValid (idCard) {
+      const regex = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
+		  return typeof idCard === 'string' && regex.test(idCard)
+    },
+    getAge (idCard) {
+      if (!this.isValid(idCard)) return 0
+      const birthDateStr = idCard.substring(6, 14)
+      const birthYear = parseInt(birthDateStr.substring(0, 4), 10)
+      const birthMonth = parseInt(birthDateStr.substring(4, 6), 10)
+      const birthDay = parseInt(birthDateStr.substring(6, 8), 10)
+      const today = new Date()
+      const currentYear = today.getFullYear()
+      const currentMonth = today.getMonth() + 1
+      const currentDay = today.getDate()
+      // 计算周岁
+      let age = currentYear - birthYear
+      // 如果当前月份小于出生月份,或者月份相同但日期小于出生日期,说明今年的生日还没过
+      if (currentMonth < birthMonth || (currentMonth === birthMonth && currentDay < birthDay)) {
+        age--
+      }
+      return age < 0 ? 0 : age
+    },
     pageSizeChangeHandle (val) {
       this.queryParams.limit = val
       this.getList()
@@ -78,10 +128,38 @@ export default {
     pageCurrentChangeHandle (val) {
       this.queryParams.page = val
       this.getList()
+    },
+    handleReview (row) {
+      this.show = true
+      this.$http.get(`/core/member/archive/getMemberProfile/${row.activityId}/${row.memberId}`).then(({ data: res }) => {
+        if (res.code !== 0) return this.$message.error(res.msg)
+        this.danganInfo = res.data
+        this.danganInfo.photos = res.data.activityFile && res.data.activityFile.split(';')
+      })
     }
   }
 }
 </script>
 
 <style scoped lang="scss">
+.dangan{
+  &-img{
+    width: 80px;
+    height: 24px;
+    margin-top: 0;
+  }
+  &-p{
+    font-family: PingFangSC, PingFang SC;
+    font-weight: 400;
+    font-size: 16px;
+    color: #252525;
+    line-height: 28px;
+    margin-top: 12px;
+  }
+  &-photo{
+    width: 100%;
+    height: auto;
+    margin-top: 14px;
+  }
+}
 </style>

+ 43 - 14
src/views/modules/member/components/familyMember.vue

@@ -2,22 +2,20 @@
   <div class="page">
     <el-table :data="dataList" border cell-class-name="vertical-top-cell" v-loading="loading" empty-text="暂无家庭成员">
       <el-table-column prop="xxx" label="善行少年编号"></el-table-column>
-      <el-table-column prop="xxx" label="姓名"></el-table-column>
-      <el-table-column prop="xxx" label="身份证">
-        <template slot-scope="scope"></template>
+      <el-table-column prop="name" label="姓名"></el-table-column>
+      <el-table-column prop="idCard" label="身份证"></el-table-column>
+      <el-table-column prop="volunteerNo" label="义工号"></el-table-column>
+      <el-table-column prop="age" label="年龄">
+        <template slot-scope="scope">{{ scope.row.age||0 }}岁</template>
       </el-table-column>
-      <el-table-column prop="xxx" label="义工号"></el-table-column>
-      <el-table-column prop="xxx" label="年龄">
-        <template slot-scope="scope"></template>
+      <el-table-column prop="gender" label="性别">
+        <template slot-scope="scope">{{ genderDict[scope.row.gender] }}</template>
       </el-table-column>
-      <el-table-column prop="xxx" label="性别">
-        <template slot-scope="scope"></template>
-      </el-table-column>
-      <el-table-column prop="xxx" label="就读学校"></el-table-column>
+      <el-table-column prop="currentSchool" label="就读学校"></el-table-column>
       <el-table-column prop="xxx" label="义工时长">
-        <template slot-scope="scope"></template>
+        <template slot-scope="scope">{{ scope.row.volunteerHours||0 }}h</template>
       </el-table-column>
-      <el-table-column prop="xxx" label="参与活动次数"></el-table-column>
+      <el-table-column prop="welfareCount" label="参与活动次数"></el-table-column>
     </el-table>
     <el-pagination
       :current-page="queryParams.page"
@@ -43,7 +41,12 @@ export default {
       },
       dataList: [],
       total: 0,
-      loading: false
+      loading: false,
+      genderDict: {
+        0: '男',
+        1: '女',
+        2: '保密'
+      }
     }
   },
   mounted () {
@@ -54,13 +57,39 @@ export default {
     getList () {
       this.loading = true
       this.$http.get('/core/family/member/page', { params: this.queryParams }).then(({ data: res }) => {
-        if (res.code === 200) {
+        if (res.code === 0) {
           this.dataList = res.data.list
+          this.dataList.forEach(d => {
+            d.age = this.getAge(d.idCard)
+            d.idCard = d.idCard && d.idCard.replace(/^(\d{6})\d{8}(\w{4})$/, '$1********$2')
+          })
           this.total = res.data.total
         }
         this.loading = false
       })
     },
+    isValid (idCard) {
+      const regex = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
+		  return typeof idCard === 'string' && regex.test(idCard)
+    },
+    getAge (idCard) {
+      if (!this.isValid(idCard)) return 0
+      const birthDateStr = idCard.substring(6, 14)
+      const birthYear = parseInt(birthDateStr.substring(0, 4), 10)
+      const birthMonth = parseInt(birthDateStr.substring(4, 6), 10)
+      const birthDay = parseInt(birthDateStr.substring(6, 8), 10)
+      const today = new Date()
+      const currentYear = today.getFullYear()
+      const currentMonth = today.getMonth() + 1
+      const currentDay = today.getDate()
+      // 计算周岁
+      let age = currentYear - birthYear
+      // 如果当前月份小于出生月份,或者月份相同但日期小于出生日期,说明今年的生日还没过
+      if (currentMonth < birthMonth || (currentMonth === birthMonth && currentDay < birthDay)) {
+        age--
+      }
+      return age < 0 ? 0 : age
+    },
     pageSizeChangeHandle (val) {
       this.queryParams.limit = val
       this.getList()

+ 19 - 6
src/views/modules/member/components/heartRecorrd.vue

@@ -1,22 +1,26 @@
 <template>
   <div class="page">
     <el-table :data="dataList" border cell-class-name="vertical-top-cell" v-loading="loading" empty-text="暂无爱心值记录">
-      <el-table-column prop="xxx" label="序号">
+      <el-table-column prop="xxx" label="序号" width="70">
         <template slot-scope="scope">{{ scope.$index + 1 }}</template>
       </el-table-column>
-      <!-- <el-table-column prop="xxx" label="订单编号"></el-table-column> -->
+      <el-table-column prop="id" label="订单编号"></el-table-column>
       <el-table-column prop="createDate" label="操作时间"></el-table-column>
       <el-table-column prop="xxx" label="爱心值数值">
         <template slot-scope="scope">
-          <div class="loveValue" :class="{'green':scope.row.capitalFlow==1,'red':scope.row.capitalFlow==2}">{{ scope.row.capitalFlow==1?'+':'-' }}{{ scope.row.loveQuantity||0 }}</div>
+          <div class="loveValue" :class="{'green':scope.row.capitalFlow==1,'red':scope.row.capitalFlow==2}">{{ scope.row.capitalFlow==1?'+':'' }}{{ scope.row.loveQuantity||0 }}</div>
         </template>
       </el-table-column>
       <el-table-column prop="transactionType" label="类型">
         <template slot-scope="scope">{{ transactionTypeDict[scope.row.transactionType] }}</template>
       </el-table-column>
-      <!-- <el-table-column prop="xxx" label="状态">
-        <template slot-scope="scope"></template>
-      </el-table-column> -->
+      <el-table-column label="状态">
+        <template slot-scope="scope">
+          <div class="status" v-if="scope.row.transactionType==1">导入成功</div>
+          <div class="status" v-else-if="scope.row.transactionType==2&&scope.row.capitalFlow==1">取消报名</div>
+          <div class="status" v-else-if="scope.row.transactionType==2&&scope.row.capitalFlow==2">报名成功</div>
+        </template>
+      </el-table-column>
       <el-table-column prop="creatorName" label="操作人员"></el-table-column>
       <el-table-column prop="remark" label="备注"></el-table-column>
     </el-table>
@@ -83,4 +87,13 @@ export default {
 </script>
 
 <style scoped lang="scss">
+.loveValue.green,.status{
+  color: #00AE57;
+}
+.status{
+  color: #00AE57;
+}
+.loveValue.red{
+  color: #F4657A;
+}
 </style>

+ 18 - 8
src/views/modules/member/components/onlySelfTicket.vue

@@ -1,16 +1,18 @@
 <template>
   <div class="page">
     <el-table :data="dataList" border cell-class-name="vertical-top-cell" v-loading="loading" empty-text="暂无专享券">
-      <el-table-column prop="xxx" label="序号">
+      <el-table-column prop="xxx" label="序号" width="70">
         <template slot-scope="scope">{{ scope.$index + 1 }}</template>
       </el-table-column>
-      <el-table-column prop="xxx" label="指定活动"></el-table-column>
-      <el-table-column prop="xxx" label="渠道方"></el-table-column>
+      <el-table-column prop="activityName" label="指定活动"></el-table-column>
+      <el-table-column prop="channelName" label="渠道方"></el-table-column>
       <el-table-column prop="xxx" label="专享券状态">
-        <template slot-scope="scope"></template>
+        <template slot-scope="scope">
+          <div :class="{'stategreen':scope.row.state===0}">{{ stateDict[scope.row.state] }}</div>
+        </template>
       </el-table-column>
-      <el-table-column prop="xxx" label="使用时间"></el-table-column>
-      <el-table-column prop="xxx" label="备注"></el-table-column>
+      <el-table-column prop="updateDate" label="使用时间"></el-table-column>
+      <el-table-column prop="remark" label="备注"></el-table-column>
     </el-table>
     <el-pagination
       :current-page="queryParams.page"
@@ -36,7 +38,12 @@ export default {
       },
       dataList: [],
       total: 0,
-      loading: false
+      loading: false,
+      stateDict: {
+        '-1': '已过期',
+        '0': '未使用',
+        '1': '已使用'
+      }
     }
   },
   mounted () {
@@ -47,7 +54,7 @@ export default {
     getList () {
       this.loading = true
       this.$http.get('/core/activity/coupon/page', { params: this.queryParams }).then(({ data: res }) => {
-        if (res.code === 200) {
+        if (res.code === 0) {
           this.dataList = res.data.list
           this.total = res.data.total
         }
@@ -67,4 +74,7 @@ export default {
 </script>
 
 <style scoped lang="scss">
+.stategreen{
+  color: #00AE57;
+}
 </style>

+ 35 - 27
src/views/modules/member/detail.vue

@@ -83,23 +83,23 @@
                     </div>
                     <div class="nums-pre adffcac">
                         <p>累计导入爱心值</p>
-                        <p class="num">{{ assetInfo.loveValue||0 }}</p>
+                        <p class="num">{{ assetInfo.totalImportValue||0 }}</p>
                     </div>
                 </div>
             </div>
         </el-card>
         <el-card shadow="never" class="aui-card--fill" style="flex: 1;">
-            <div class="mod-home">
-                <div class="tab adfac">
-                    <div class="tab-pre" v-for="(item,index) in tabList" :key="index" :class="{'active':tabIndex===index}" @click="changeTab(index)">{{ item }}</div>
-                </div>
-                <div class="table" v-if="userId">
-                    <activity-record v-if="tabIndex===0" :userId="userId"></activity-record>
-                    <heart-recorrd v-else-if="tabIndex===1" :userId="userId"></heart-recorrd>
-                    <only-self-ticket v-else-if="tabIndex===2" :userId="userId"></only-self-ticket>
-                    <family-member v-else-if="tabIndex===3" :userId="userId"></family-member>
-                </div>
+          <div class="mod-home adffc">
+            <div class="tab adfac">
+                <div class="tab-pre" v-for="(item,index) in tabList" :key="index" :class="{'active':tabIndex===index}" @click="changeTab(index)">{{ item }}</div>
+            </div>
+            <div class="table" v-if="userId" style="flex: 1;overflow-y: auto;">
+                <activity-record v-if="tabIndex===0" :userId="userId"></activity-record>
+                <heart-recorrd v-else-if="tabIndex===1" :userId="userId"></heart-recorrd>
+                <only-self-ticket v-else-if="tabIndex===2" :userId="userId"></only-self-ticket>
+                <family-member v-else-if="tabIndex===3" :userId="userId"></family-member>
             </div>
+          </div>
         </el-card>
         <el-dialog width="800px" :visible.sync="show" title="编辑会员资料" @close="cancel">
           <el-form ref="memberRef" :model="form" :rules="rules" label-width="120px" style="width: 70%;margin: 0 auto;">
@@ -123,7 +123,7 @@
             <el-form-item label="家庭公益口号" prop="welfareSlogan">
               <el-input v-model="form.welfareSlogan" placeholder="请输入"></el-input>
             </el-form-item>
-            <el-form-item label="累计捐献爱心值" prop="totalInvoicedAmount">
+            <!-- <el-form-item label="累计捐献爱心值" prop="totalInvoicedAmount">
               <el-input type="number" v-model="form.totalInvoicedAmount" disabled placeholder="请输入"></el-input>
             </el-form-item>
             <el-form-item label="累计导入爱心值" prop="loveValue">
@@ -134,7 +134,7 @@
             </el-form-item>
             <el-form-item label="会员等级" prop="userLevel">
               <el-input type="number" v-model="form.userLevel" placeholder="请输入"></el-input>
-            </el-form-item>
+            </el-form-item> -->
           </el-form>
           <div class="demo-drawer__footer" style="display: flex;justify-content: end;margin-top: 30px;">
             <el-button :loading="buttonLoading" type="primary" @click="submitForm">保 存</el-button>
@@ -196,19 +196,19 @@ export default {
         ],
         welfareSlogan: [
           { required: true, message: '请输入家庭公益口号', trigger: 'blur' }
-        ],
-        totalInvoicedAmount: [
-          { required: true, message: '请输入累计捐献爱心值', trigger: 'blur' }
-        ],
-        loveValue: [
-          { required: true, message: '请输入累计导入爱心值', trigger: 'blur' }
-        ],
-        welfareCount: [
-          { required: true, message: '请输入参与公益次数', trigger: 'blur' }
-        ],
-        userLevel: [
-          { required: true, message: '请输入会员等级', trigger: 'blur' }
         ]
+        // totalInvoicedAmount: [
+        //   { required: true, message: '请输入累计捐献爱心值', trigger: 'blur' }
+        // ],
+        // loveValue: [
+        //   { required: true, message: '请输入累计导入爱心值', trigger: 'blur' }
+        // ],
+        // welfareCount: [
+        //   { required: true, message: '请输入参与公益次数', trigger: 'blur' }
+        // ],
+        // userLevel: [
+        //   { required: true, message: '请输入会员等级', trigger: 'blur' }
+        // ]
       },
       genderCfg: {
         '0': '男',
@@ -240,8 +240,8 @@ export default {
         this.form.userLevel = res.data.userLevel || 1
 
         this.userInfo = res.data
-        this.userInfo.phoneCopy = this.userInfo.phone.replace(/(\d{3})\d*(\d{4})/, '$1****$2')
-        this.userInfo.idCardCopy = this.userInfo.idCard.replace(/^(\d{6})\d{8}(\w{4})$/, '$1********$2')
+        this.userInfo.phoneCopy = this.userInfo.phone && this.userInfo.phone.replace(/(\d{3})\d*(\d{4})/, '$1****$2')
+        this.userInfo.idCardCopy = this.userInfo.idCard && this.userInfo.idCard.replace(/^(\d{6})\d{8}(\w{4})$/, '$1********$2')
         this.userInfo.genderText = this.genderCfg[this.userInfo.gender]
       })
     },
@@ -249,6 +249,7 @@ export default {
       this.$http.get('/core/app/user/getUserAsset/' + this.$route.query.id).then(({ data: res }) => {
         if (res.code !== 0) return this.$message.error(res.msg)
         this.assetInfo = res.data
+        this.assetInfo.totalDonationValue = Math.abs(this.assetInfo.totalDonationValue)
       })
     },
     handleBack () {
@@ -301,6 +302,13 @@ export default {
 </script>
 
 <style scoped lang="scss">
+::v-deep .el-card__body{
+  height: 100% !important;
+}
+::v-deep .mod-home{
+  height: 100% !important;
+}
+
 .top {
     padding-bottom: 13px;
     box-shadow: inset 0px -1px 0px 0px #F0F1F7;

+ 5 - 3
src/views/modules/member/query.vue

@@ -28,6 +28,8 @@
           <div class="table-title adfacjb">
             <div class="table-title-left">会员列表共({{ total }})人</div>
             <div class="table-title-right">
+              <el-button type="primary" icon="el-icon-plus" @click="handleExportTicket">导入专享券</el-button>
+              <el-button type="primary" icon="el-icon-plus" @click="handleExportHeart">导入爱心值</el-button>
               <el-button type="primary" icon="el-icon-plus" @click="handleAdd" v-if="$hasPermission('core:appuser:save')">新增会员</el-button>
               <el-button type="default" @click="handleExcel" v-if="$hasPermission('core:appuser:export')">导出Excel</el-button>
             </div>
@@ -50,10 +52,10 @@
             <el-table-column prop="phoneCopy" label="手机号" width="120"></el-table-column>
             <!-- <el-table-column prop="welfareName" label="家庭公益名称" width="130"></el-table-column>
             <el-table-column prop="welfareSlogan" label="家庭公益口号" width="130"></el-table-column> -->
-            <el-table-column prop="usedLoves" label="累计捐献爱心值" width="140">
-              <template #default="{ row }">{{ row.usedLoves||0 }}</template>
+            <el-table-column prop="totalConsumeLove" label="累计捐献爱心值" width="140">
+              <template #default="{ row }">{{ row.totalConsumeLove||0 }}</template>
             </el-table-column>
-            <el-table-column prop="loveValue" label="累计导入爱心值" width="140"></el-table-column>
+            <el-table-column prop="totalImportLove" label="累计导入爱心值" width="140"></el-table-column>
             <el-table-column prop="welfareCount" label="参与公益次数" width="130">
               <template #default="{ row }">{{ row.welfareCount||0 }}次</template>
             </el-table-column>