Răsfoiți Sursa

Merge branch 'feature/v1.1.15' of https://jygit.jydev.jianyu360.cn/jianyu/web into feature/v1.1.15

yuelujie 1 săptămână în urmă
părinte
comite
1efd43685e

+ 22 - 0
apps/bigmember_pc/src/assets/style/common.scss

@@ -311,3 +311,25 @@ a {
 .mt-16px {
   margin-top: 16px;
 }
+
+.custom-toast-loading{
+  background-color: transparent!important;
+  .el-loading-spinner{
+    width: 120px;
+    height: 120px;
+    left: 50%;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    border-radius: 16px;
+    background: rgba(0, 0, 0, 0.7);
+  }
+  .el-icon-loading{
+    font-size: 24px;
+    color: #fff;
+    line-height: 1.5;
+  }
+  .el-loading-text{
+    color: #fff;
+  }
+}

+ 100 - 44
apps/bigmember_pc/src/components/zhima/report-guide-banner.vue

@@ -9,12 +9,13 @@ import {
   toRef
 } from 'vue'
 import { ajaxGetReportBtnStatus, ajaxReportEquityDeduct } from '@/api/modules'
+import { debounce } from '@/utils/'
 
 const that = getCurrentInstance().proxy
 
 const props = defineProps({
   // 来源 ent: 企业画像;unit: 采购单位画像;article: 标讯详情 detail: 项目详情
-  source: {
+  from: {
     type: String,
     default: ''
   },
@@ -96,9 +97,8 @@ const buyerReportId = ref('')
 const competitorReportId = ref({})
 const discountMsg = ref('')
 const reportBtnList = ref([])
-const bubbleLeft = ref('10px')
 const bubbleTimer = ref(null)
-const bubbleText = ref('')
+const currentBubbleIndex = ref(0)
 const packageInfo = toRef({})
 
 const entNameList = computed(() => {
@@ -114,6 +114,31 @@ const isPackage = computed(() => {
   return packageInfo.value?.zmStatus && packageInfo.value?.zmStatus > 0
 })
 
+const discountText = computed(() => {
+  const packageType = packageInfo.value?.zmStatus
+  const expiredDay = packageInfo.value?.expiredDay
+  const balance = packageInfo.value?.zmNumber
+  // const total = packageInfo.value?.zmAllNumber
+  const price = packageInfo.value?.comboOne
+
+  if (packageType > 0) {
+    if (balance > 0) {
+      return `<div class="gray-text">本月剩余报告下载额度:<em class="highlight-text">${balance}</em>份</div>`
+    } else {
+      return `<div class="gray-text">本月免费额度已用完,可享权益特价:<span class="highlight-text">${price}/份</span></div>`
+    }
+  } else {
+    // packageType < 0:套餐过期天数
+    // 其他:首购优惠等
+    if (packageType < 0 && expiredDay) {
+      return `<div class="highlight-text">您的权益已过期${expiredDay}天,开通权益享特惠</div>`
+    } else {
+      return `<div class="highlight-text">${discountMsg.value}</div>`
+    }
+  }
+  return ''
+})
+
 const getReportId = (type, entName) => {
   let reportId = ''
   switch (type) {
@@ -148,7 +173,7 @@ const getReportMold = (type) => {
   return mold
 }
 
-const handleDownload = (item) => {
+const handleDownload = debounce((item) => {
   if (item.type === 'competitor' && entNameList.value.length > 1) {
     item.showPopover = !item.showPopover
     that.$forceUpdate()
@@ -166,9 +191,7 @@ const handleDownload = (item) => {
     } else {
       // 买过套餐权益则抵扣次数
       deductPackage(item, (code, data) => {
-        console.log(code, data)
-        debugger
-        if (code === 0 && data?.id) {
+        if (code === 0 && data) {
           // 抵扣成功 生成报告id
           window.open(
             `/swordfish/page_big_pc/report/analysis/detail?id=${data}`
@@ -184,10 +207,12 @@ const handleDownload = (item) => {
             window.open(`${item.url}?name=${item.name}&id=${props.bId}`)
           }
         }
+        // 重新获取报告按钮状态(查询使用次数)
+        getReportBtnStatus()
       })
     }
   }
-}
+}, 300)
 const onClickCompetitor = (ent, parent) => {
   if (!entCrnMap.value[ent]) return
   parent.showPopover = false
@@ -205,18 +230,23 @@ const onClickCompetitor = (ent, parent) => {
     deductPackage(item, (code, data) => {
       if (code === 0 && data) {
         window.open(`/swordfish/page_big_pc/report/analysis/detail?id=${data}`)
-        // 重新获取报告按钮状态
-        getReportBtnStatus()
       } else {
         // 没购买过||抵扣失败跳到购买页
         window.open(`${parent.url}?name=${ent}&id=${props.bId}`)
       }
+      // 重新获取报告按钮状态(查询使用次数)
+      getReportBtnStatus()
     })
   }
 }
 // 获取报告入口按钮状态
 const getReportBtnStatus = async () => {
   if (!props.bId && !props.buyerName && !props.winnerName) return
+  /**
+   * 项目分析报告需要bidding_id和采购单位名称,同时不是招标类型调接口时则不会传bidding_id,为了区分采购单位画像只需传采购单位的场景(采购单位分析报告),
+   * 如果是项目详情页面且不是招标类型的跳出 不再调用接口
+   */
+  if (props.from === 'detail' && props.topType !== '招标') return
   const { error_code: code, data } = await ajaxGetReportBtnStatus({
     bidding_id: props.topType === '招标' ? props.bId : '',
     buyer: props.buyerName,
@@ -271,23 +301,12 @@ const startBubbleAnimation = () => {
   const btnLen = reportBtnList.value.length
   if (btnLen === 0) return
   nextTick(() => {
-    const btnRefs = that.$refs.reportBtn
-    let currentIndex = 0
     if (bubbleTimer.value) clearInterval(bubbleTimer.value)
-    if (btnLen === 1) {
-      bubbleLeft.value = '10px'
-      bubbleText.value = reportBtnList.value[0].marketText
+    if (btnLen.length === 1) {
+      currentBubbleIndex.value = 0
     } else {
-      bubbleText.value = reportBtnList.value[0].marketText
       bubbleTimer.value = setInterval(() => {
-        currentIndex = (currentIndex + 1) % btnLen
-        const btn = btnRefs[currentIndex]
-        if (btn) {
-          bubbleLeft.value = btn?.offsetLeft - 10 + 'px'
-          setTimeout(() => {
-            bubbleText.value = reportBtnList.value[currentIndex].marketText
-          }, 300)
-        }
+        currentBubbleIndex.value = (currentBubbleIndex.value + 1) % btnLen
       }, 2500)
     }
   })
@@ -295,6 +314,12 @@ const startBubbleAnimation = () => {
 
 // 套餐扣除
 const deductPackage = async (item, callback) => {
+  const loading = that.$loading({
+    lock: true,
+    text: 'Loading',
+    spinner: 'el-icon-loading',
+    customClass: 'custom-toast-loading'
+  })
   const { type, name } = item
   const params = {
     ent_name: type === 'competitor' ? name : '',
@@ -303,8 +328,14 @@ const deductPackage = async (item, callback) => {
     project_name: type === 'project' ? props.projectName : '',
     bidding_id: props.topType === '招标' ? props.bId : ''
   }
-  const { error_code: code, data } = await ajaxReportEquityDeduct(params)
-  callback && callback(code, data)
+  try {
+    const { error_code: code, data } = await ajaxReportEquityDeduct(params)
+    loading.close()
+    callback && callback(code, data)
+  } catch (error) {
+    loading.close()
+    callback && callback()
+  }
 }
 
 onMounted(() => {
@@ -335,8 +366,8 @@ onUnmounted(() => {
           >{{ statusMap[packageInfo.zmStatus].text }}</span
         >
       </div>
-      <div v-if="discountMsg" class="discount-container">
-        <span :class="{ 'gray-text': isPackage }" v-html="discountMsg"></span>
+      <div v-if="discountText" class="discount-container">
+        <span v-html="discountText"></span>
       </div>
     </div>
     <div
@@ -365,21 +396,25 @@ onUnmounted(() => {
               <span>{{ ent }}</span>
             </li>
           </ul>
-          <button
-            class="flex flex-items-center report-btn"
-            slot="reference"
-            @click="handleDownload(item, index)"
-            :ref="'reportBtn'"
-          >
-            <span>{{ item.text }}</span>
-            <i class="j-icon j-icon-base icon-img-download"></i>
-            <i class="j-icon j-icon-base icon-img-download-white"></i>
-          </button>
+          <div class="btn-container" slot="reference">
+            <button
+              class="flex flex-items-center report-btn"
+              @click="handleDownload(item, index)"
+              :ref="'reportBtn'"
+            >
+              <span>{{ item.text }}</span>
+              <i class="j-icon j-icon-base icon-img-download"></i>
+              <i class="j-icon j-icon-base icon-img-download-white"></i>
+            </button>
+            <div
+              class="bubble-box"
+              :class="{ visible: currentBubbleIndex === index }"
+            >
+              {{ item.marketText }}
+            </div>
+          </div>
         </el-popover>
       </div>
-      <div v-show="bubbleText" class="bubble" :style="{ left: bubbleLeft }">
-        {{ bubbleText }}
-      </div>
     </div>
   </div>
 </template>
@@ -407,9 +442,6 @@ onUnmounted(() => {
     font-size: 12px;
     line-height: 18px;
     color: $color_main;
-    .gray-text {
-      color: #999999;
-    }
   }
   .member-status {
     padding: 2px 8px;
@@ -433,6 +465,27 @@ onUnmounted(() => {
   .banner-right {
     position: relative;
   }
+  .btn-container {
+    position: relative;
+  }
+  .bubble-box {
+    position: absolute;
+    top: -14px;
+    left: 10px;
+    background: linear-gradient(101.8deg, #2abed1 0%, #0a6cff 100%);
+    padding: 1px 8px;
+    border-radius: 8px 2px 8px 2px;
+    font-size: 12px;
+    line-height: 18px;
+    color: #fff;
+    opacity: 0;
+    transform: translateY(10px);
+    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
+    &.visible {
+      opacity: 1;
+      transform: translateY(0);
+    }
+  }
   .report-btn {
     margin-left: 20px;
     padding: 3px 20px;
@@ -516,6 +569,9 @@ onUnmounted(() => {
       display: flex;
       align-items: center;
     }
+    .gray-text {
+      color: #999999;
+    }
   }
 }
 </style>

+ 1 - 0
apps/bigmember_pc/src/main.js

@@ -42,6 +42,7 @@ Vue.prototype.$echarts = echarts
 Vue.prototype.$alert = MessageBox.alert
 Vue.prototype.$confirm = MessageBox.confirm
 Vue.config.productionTip = false
+Vue.prototype.$loading = Loading.service
 
 //  适配 vite-plugin-qiankun
 

+ 4 - 3
apps/bigmember_pc/src/views/project/ProjectInfo.vue

@@ -111,7 +111,7 @@
                 projectContent.isfollow ? '已监控' : '监控'
               }}</span>
             </div>
-            <div
+            <!-- <div
               class="flex-r-c center left down-report"
               v-if="showProjectReport"
               @click="goProjectReport"
@@ -119,7 +119,7 @@
               <i class="el-icon-jy-report"></i>
               <i class="el-icon-jy-report-active"></i>
               <span>项目分析报告</span>
-            </div>
+            </div> -->
             <div
               class="flex-r-c center left down-report"
               @click="goDownReport"
@@ -135,11 +135,12 @@
       </div>
       <ZhiMaReportBanner
         v-if="projectInfo.projectname"
+        from="detail"
         :buyerName="projectInfo.buyer"
         :projectName="projectInfo.projectname"
         :topType="projectInfo.bidstatus"
         :bId="sid"
-        class="mt-16px"
+        class="m-t-16px"
       />
       <div class="project-content">
         <el-card class="project-content">

+ 23 - 3
apps/bigmember_pc/src/views/reportDownload/record.vue

@@ -78,7 +78,9 @@
                 zhiMaReportInfo.firstText
               }}</span>
               <!-- <span v-if="zhiMaReportInfo.isFree" class="highlight-text">开通权益卡更优惠</span> -->
-              <span v-if="zhiMaReportInfo.endTime" class="light-gray-text"
+              <span
+                v-if="zhiMaReportInfo.packType > 0 && zhiMaReportInfo.endTime"
+                class="light-gray-text"
                 >有效期至:{{ zhiMaReportInfo.endTime }}</span
               >
             </div>
@@ -305,6 +307,10 @@
                   >{{ scope.row.buyer }}</span
                 >
               </div>
+              <div>
+                <span>获取方式:</span>
+                <span>{{ scope.row.acquisition_method | formatGetWay }}</span>
+              </div>
             </div>
             <!-- 业主采购、企业中标分析报告-->
             <el-tooltip
@@ -535,7 +541,7 @@ export default {
       },
       zhiMaReportInfo: {
         flag: 'analysis',
-        id: 4,
+        id: 5,
         firstText: '',
         expiredText: '',
         packType: 0,
@@ -670,6 +676,17 @@ export default {
           break
       }
       return result
+    },
+    formatGetWay(value) {
+      if (value === 0) {
+        return '付费购买'
+      } else if (value > 0) {
+        return '会员获取-免费下载'
+      } else if (value < 0) {
+        return '会员获取-付费购买'
+      } else {
+        return '-'
+      }
     }
   },
   computed: {
@@ -942,6 +959,7 @@ export default {
 $char_color: #1d1d1d;
 .in-app {
   .report-download-record {
+    min-width: 1240px;
     padding: 24px;
   }
 }
@@ -978,7 +996,7 @@ $char_color: #1d1d1d;
   }
   .balance-box {
     margin: 24px 0 16px;
-    padding: 12px 24px 32px;
+    padding: 12px 22px 32px;
     .card-row {
       display: flex;
       //grid-template-columns: 1fr 1fr 1fr;
@@ -1036,6 +1054,7 @@ $char_color: #1d1d1d;
           font-size: 16px;
           line-height: 24px;
           color: #1d1d1d;
+          white-space: nowrap;
         }
         .zhi-ma-desc {
           font-size: 12px;
@@ -1061,6 +1080,7 @@ $char_color: #1d1d1d;
           line-height: 18px;
           border-radius: 8px 4px 8px 2px;
           font-weight: 700;
+          white-space: nowrap;
           .vip-icon {
             font-style: italic;
           }

+ 11 - 0
apps/mobile/src/api/modules/pay.js

@@ -442,3 +442,14 @@ export function ajaxGetReportExample() {
     method: 'post'
   })
 }
+
+// 芝麻分析报告套餐扣除
+export function ajaxReportEquityDeduct(data) {
+  data = qs.stringify(data)
+  return request({
+    url: '/subscribepay/zmComboConsumption',
+    method: 'post',
+    noToast: true,
+    data
+  })
+}

BIN
apps/mobile/src/assets/image/icon/crown-month.png


BIN
apps/mobile/src/assets/image/icon/crown-season.png


BIN
apps/mobile/src/assets/image/icon/crown-year.png


+ 158 - 76
apps/mobile/src/views/article/components/ActionDownloadReport.vue

@@ -13,20 +13,16 @@
         :showCredit="showCredit"
         :btnInfo="btnInfo"
         @clickItem="onClickReportItem"
-        @btn="onBtnClick"
       />
       <template #reference>
         <TabActionItem
           showText
           :direction="direction"
           class="action-monitor"
-          @click.native.stop="changePopoverState"
+          @click="changePopoverState"
         >
-          <!-- <van-icon
-            slot="icon"
-            :name="showPopover ? 'custom-report-active' : 'custom-report'"
-          ></van-icon> -->
           <img
+            v-if="btnInfo.isNew"
             slot="tip"
             class="action-new-tip"
             src="@/assets/image/icon/new-img.png"
@@ -87,6 +83,7 @@ import TabActionItem from '@/views/article/ui/TabActionItem.vue'
 import ReportDownloadCard from '@/views/article/ui/ReportDownloadCard.vue'
 import { Popover, Dialog, Icon } from 'vant'
 import { AppIcon } from '@/ui'
+import { ajaxReportEquityDeduct } from '@/api/modules/'
 
 export default {
   name: 'ActionReport',
@@ -153,69 +150,43 @@ export default {
     }
   },
   methods: {
+    showLoading() {
+      return this.$toast.loading({
+        duration: 0,
+        forbidClick: true,
+        message: 'loading...'
+      })
+    },
     onReportRedirect(type) {
-      const {
-        ent_report_ids = {},
-        buyer_report_id = '',
-        project_report_id = ''
-      } = this.btnInfo
       // 判断是否购买过,已购买跳转报告页,未购买跳转购买页
-      if (type === 'project') {
-        const buyerName = this.buyers[0]?.name
-        if (project_report_id) {
-          this.$router.push({
-            path: '/report/analysis/detail',
-            query: {
-              id: project_report_id
-            }
-          })
-        } else {
-          // 项目分析报告 name: 项目名称(下单页展示用),buyer:采购单位名称(下单接口参数用)
-          this.$router.push({
-            path: '/order/create/analysis-report/project',
-            query: {
-              name: this.projectName,
-              id: this.id,
-              buyer: buyerName
-            }
-          })
-        }
-      } else if (type === 'unit') {
-        const buyerName = this.buyers[0]?.name
-        if (buyer_report_id) {
-          this.$router.push({
-            path: '/report/analysis/detail',
-            query: {
-              id: buyer_report_id
-            }
-          })
-        } else {
-          this.$router.push({
-            path: '/order/create/analysis-report/unit',
-            query: {
-              name: buyerName,
-              id: this.id
-            }
-          })
-        }
-      } else if (type === 'competitor') {
-        const entName = this.winners[0]?.name
-        if (Object.keys(ent_report_ids).length > 0 && ent_report_ids[entName]) {
-          this.$router.push({
-            path: '/report/analysis/detail',
-            query: {
-              id: ent_report_ids[entName]
-            }
-          })
-        } else {
-          this.$router.push({
-            path: '/order/create/analysis-report/competitor',
-            query: {
-              name: entName,
-              id: this.id
-            }
-          })
-        }
+      const reportId = this.getReportId(type)
+      if (reportId) {
+        this.$router.push({
+          path: '/report/analysis/detail',
+          query: {
+            id: reportId
+          }
+        })
+      } else {
+        const url = this.getReportOrderUrl(type)
+        const params = this.getDeductParams(type)
+        // console.log(url, params)
+        this.deductPackage(params, (code, data) => {
+          if (code === 0 && data) {
+            // 抵扣成功
+            this.$router.push({
+              path: '/report/analysis/detail',
+              query: {
+                id: data
+              }
+            })
+          } else {
+            // 抵扣失败 || 没开通权益,进购买页
+            this.$router.push({
+              path: url
+            })
+          }
+        })
       }
     },
     onClickReportItem(type) {
@@ -225,9 +196,9 @@ export default {
           // 投标企业信用报告
           location.href = `/jy_mobile/common/pdfview?buyer=${buyerName}`
           break
-        case 'unit':
+        case 'buyer':
           // 采购单位分析
-          this.onReportRedirect('unit')
+          this.onReportRedirect('buyer')
           break
         case 'competitor':
           // 供应商分析
@@ -255,17 +226,36 @@ export default {
           }
         })
       } else {
-        this.$router.push({
-          path: '/order/create/analysis-report/competitor',
-          query: {
-            name: entName,
-            id: this.id
+        this.deductPackage(
+          {
+            type: 'competitor',
+            entName,
+            bId: this.id
+          },
+          (code, data) => {
+            if (code === 0 && data) {
+              // 抵扣成功
+              this.$router.push({
+                path: '/report/analysis/detail',
+                query: {
+                  id: data
+                }
+              })
+            } else {
+              // 抵扣失败 || 没开通权益,进购买页
+              this.$router.push({
+                path: '/order/create/analysis-report/competitor',
+                query: {
+                  name: entName,
+                  id: this.id
+                }
+              })
+            }
           }
-        })
+        )
       }
       this.showDialog = false
     },
-    onBtnClick() {},
     async changePopoverState() {
       this.showPopover = true
     },
@@ -278,6 +268,98 @@ export default {
           await this.changePopoverState()
         }
       }
+    },
+    getReportMold(type) {
+      let mold = 0
+      switch (type) {
+        case 'project':
+          mold = 1
+          break
+        case 'competitor':
+          mold = 2
+          break
+        case 'buyer':
+          mold = 3
+          break
+      }
+      return mold
+    },
+    getReportId(type) {
+      let reportId = ''
+      const {
+        ent_report_ids = {},
+        buyer_report_id = '',
+        project_report_id = ''
+      } = this.btnInfo
+      if (type === 'competitor') {
+        const entName = this.winners[0]?.name
+        reportId = ent_report_ids[entName]
+      } else if (type === 'buyer') {
+        reportId = buyer_report_id
+      } else if (type === 'project') {
+        reportId = project_report_id
+      }
+      return reportId
+    },
+    getReportOrderUrl(type) {
+      let url = ''
+      const winnerName = this.winners[0]?.name
+      const buyerName = this.buyers[0]?.name
+      const projectName = this.projectName
+      const id = this.id
+      if (type === 'competitor') {
+        url = `/order/create/analysis-report/competitor?name=${winnerName}&id=${id}`
+      } else if (type === 'buyer') {
+        url = `/order/create/analysis-report/unit?name=${buyerName}&id=${id}`
+      } else if (type === 'project') {
+        url = `/order/create/analysis-report/project?name=${projectName}&id=${id}&buyer=${buyerName}`
+      }
+      return url
+    },
+    getDeductParams(type) {
+      let params = {}
+      if (type === 'competitor') {
+        params = {
+          type,
+          entName: this.winners[0]?.name,
+          bId: this.id
+        }
+      } else if (type === 'buyer') {
+        params = {
+          type,
+          buyerName: this.buyers[0]?.name,
+          bId: this.id
+        }
+      } else if (type === 'project') {
+        params = {
+          type,
+          projectName: this.projectName,
+          bId: this.id,
+          buyerName: this.buyers[0]?.name
+        }
+      }
+      return params
+    },
+    async deductPackage(
+      { entName, buyerName, projectName, bId, type },
+      callback
+    ) {
+      const params = {
+        ent_name: entName,
+        buyer: buyerName,
+        report_mold: this.getReportMold(type),
+        project_name: projectName,
+        bidding_id: bId
+      }
+      const loading = this.showLoading()
+      try {
+        const { error_code: code, data } = await ajaxReportEquityDeduct(params)
+        loading?.clear()
+        callback && callback(code, data)
+      } catch (error) {
+        loading?.clear()
+        callback && callback()
+      }
     }
   }
 }

+ 44 - 78
apps/mobile/src/views/article/components/ContentAbstract.vue

@@ -31,21 +31,6 @@
       <div v-if="summaryMap.buyer?.value" class="abstract-line">
         <div class="flex flex-items-center justify-between abstract-line-label">
           <span>业主单位</span>
-          <div
-            v-if="showBuyerReportBtn"
-            class="flex flex-items-center report-entry"
-            @click="onReportClick('unit', summaryMap.buyer?.value)"
-          >
-            <AppIcon
-              slot="icon"
-              name="xiazaixiangmubaogao"
-              color="#2ABED1"
-              svg
-              size="20"
-            ></AppIcon>
-            <span>采购单位分析报告</span>
-            <van-icon name="arrow" />
-          </div>
         </div>
         <div class="abstract-line-value">
           <span
@@ -58,6 +43,15 @@
             {{ summaryMap.buyer?.value }}
           </span>
         </div>
+        <ReportModuleEntry
+          v-if="showBuyerReportBtn"
+          class="m-t-8px"
+          type="buyer"
+          :buyerName="summaryMap.buyer?.value"
+          :info="reportBtn"
+          :id="content?.id"
+        >
+        </ReportModuleEntry>
       </div>
       <div class="abstract-line-container">
         <div v-if="summaryMap.totalInvestment?.value" class="abstract-line">
@@ -141,21 +135,6 @@
       <div v-if="summaryMap.buyer?.value" class="abstract-line">
         <div class="flex flex-items-center justify-between abstract-line-label">
           <span>采购单位</span>
-          <div
-            v-if="showBuyerReportBtn"
-            class="flex flex-items-center report-entry"
-            @click="onReportClick('unit', summaryMap.buyer?.value)"
-          >
-            <AppIcon
-              slot="icon"
-              name="xiazaixiangmubaogao"
-              color="#2ABED1"
-              svg
-              size="20"
-            ></AppIcon>
-            <span>采购单位分析报告</span>
-            <van-icon name="arrow" />
-          </div>
         </div>
         <div class="abstract-line-value">
           <span v-if="yyszbContent" class="ellipsis-2">{{
@@ -174,6 +153,15 @@
             {{ summaryMap.buyer?.value }}
           </span>
         </div>
+        <ReportModuleEntry
+          v-if="showBuyerReportBtn"
+          class="m-t-8px"
+          type="buyer"
+          :buyerName="summaryMap.buyer?.value"
+          :info="reportBtn"
+          :id="content?.id"
+        >
+        </ReportModuleEntry>
       </div>
       <div v-if="summaryMap.buyerContactInfo?.value" class="abstract-line">
         <div class="abstract-line-label">采购联系人 / 联系电话</div>
@@ -305,26 +293,7 @@
             class="flex flex-(items-center justify-between) abstract-line-label"
           >
             <span>{{ winner.isCandidate ? '中标候选人' : '中标单位' }}</span>
-            <div
-              v-if="
-                showEntReportBtn &&
-                Object.keys(entCrnMap).length > 0 &&
-                entCrnMap[winner.name]
-              "
-              class="flex flex-items-center report-entry"
-              @click="onReportClick('competitor', winner.name)"
-            >
-              <AppIcon
-                name="xiazaixiangmubaogao"
-                color="#2ABED1"
-                svg
-                size="20"
-              ></AppIcon>
-              <span>供应商分析报告</span>
-              <van-icon name="arrow" />
-            </div>
           </div>
-
           <div
             v-if="IsCustomTopNet || yyszbContent"
             class="abstract-line-value"
@@ -346,6 +315,19 @@
               {{ winner.name }}
             </span>
           </div>
+          <ReportModuleEntry
+            v-if="
+              showEntReportBtn &&
+              Object.keys(entCrnMap).length > 0 &&
+              entCrnMap[winner.name]
+            "
+            class="m-t-8px"
+            type="competitor"
+            :winnerName="winner.name"
+            :info="reportBtn"
+            :id="content?.id"
+          >
+          </ReportModuleEntry>
         </div>
         <div v-if="winner.personTel?.value" class="abstract-line">
           <div class="abstract-line-label">中标联系人 / 联系电话</div>
@@ -386,7 +368,9 @@
         </div>
       </section>
       <div v-if="summaryMap.bidAmount?.value" class="abstract-line">
-        <div class="abstract-line-label">{{hasWaitWinnerState ? '投标' : '中标'}}金额(元)</div>
+        <div class="abstract-line-label">
+          {{ hasWaitWinnerState ? '投标' : '中标' }}金额(元)
+        </div>
         <div class="abstract-line-value">
           <span class="abstract-line-value-text">
             {{ summaryMap.bidAmount?.value || ' ' }}
@@ -408,11 +392,15 @@
       class="abstract-bottom-desc"
       :class="{ transparent: IsSunPublishContent }"
     >
-      <span v-if='hasWaitWinnerState'>*该信息为<span class='highlight-strong-label'>候选人公示</span>,具体<span class='highlight-strong-label'>中标信息未确认</span>,请以实际中标通知为准!如有误差,请</span>
+      <span v-if="hasWaitWinnerState"
+        >*该信息为<span class="highlight-strong-label">候选人公示</span
+        >,具体<span class="highlight-strong-label">中标信息未确认</span
+        >,请以实际中标通知为准!如有误差,请</span
+      >
       <span v-else>*以上摘要信息由剑鱼标讯智能提取。如有误差,请</span>
 
       <span class="highlight-text underline" @click="concatKf">联系客服</span>
-      <span v-if='hasWaitWinnerState'>处理。</span>
+      <span v-if="hasWaitWinnerState">处理。</span>
       <span v-else>进行处理。</span>
     </div>
 
@@ -435,6 +423,7 @@ import { LINKS } from '@/data'
 import { openAppOrWxPage } from '@/utils/'
 import { callPhone } from '@/utils/callFn'
 import { AppIcon } from '@/ui'
+import ReportModuleEntry from './ReportModuleEntry.vue'
 
 export default {
   name: 'ContentAbstract',
@@ -442,7 +431,8 @@ export default {
     ContentSummaryPurchaseList,
     [ActionSheet.name]: ActionSheet,
     [Icon.name]: Icon,
-    AppIcon
+    AppIcon,
+    ReportModuleEntry
   },
   props: {
     customSkip: {
@@ -598,30 +588,6 @@ export default {
           from: encodeURIComponent(location.href)
         }
       })
-    },
-    onReportClick(type, name) {
-      const { ent_report_ids = {}, buyer_report_id = '' } = this.reportBtn
-      if (type === 'unit') {
-        if (buyer_report_id) {
-          this.$router.push({
-            path: `/report/analysis/detail?id=${buyer_report_id}`
-          })
-        } else {
-          this.$router.push({
-            path: `/order/create/analysis-report/unit?name=${name}&id=${this.content?.id}`
-          })
-        }
-      } else if (type === 'competitor') {
-        if (Object.keys(ent_report_ids).length > 0 && ent_report_ids[name]) {
-          this.$router.push({
-            path: `/report/analysis/detail?id=${ent_report_ids[name]}`
-          })
-        } else {
-          this.$router.push({
-            path: `/order/create/analysis-report/competitor?name=${name}&id=${this.content?.id}`
-          })
-        }
-      }
     }
   }
 }
@@ -688,7 +654,7 @@ export default {
     white-space: nowrap;
   }
   .highlight-strong-label {
-    color: #FF3A20;
+    color: #ff3a20;
   }
 }
 .report-entry {

+ 15 - 3
apps/mobile/src/views/article/components/ContentProjectTimeline.vue

@@ -13,14 +13,14 @@
           :name="projectName"
           :beforeLeavePage="beforeLeavePage"
         />
-        <div
+        <!-- <div
           v-if="showProjectButton"
           class="flex items-center action-item"
           @click="onProjectReport"
         >
           <i class="iconfont icon-xiazaixiangmubaogao font-size-20px"></i>
           <span class="action-text">项目分析报告</span>
-        </div>
+        </div> -->
       </div>
       <span class="action-item clickable follow-project">
         <QuickMonitor
@@ -33,6 +33,16 @@
         />
       </span>
     </div>
+    <ReportModuleEntry
+      class="m-r-16px m-l-16px"
+      v-if="showProjectButton"
+      type="project"
+      :info="reportBtn"
+      :id="content?.id"
+      :projectName="projectName"
+      :buyerName="content?._summary.buyers[0]?.name"
+    >
+    </ReportModuleEntry>
     <div class="bg-white">
       <h5 class="project-title">{{ projectName }}</h5>
       <ProjectTimeline :stepList="stepList2" @itemClick="itemClick" />
@@ -57,6 +67,7 @@ import { mapState, mapGetters } from 'vuex'
 import { replaceKeyword, openAppOrWxPage, formatMoney } from '@/utils'
 import { LINKS } from '@/data'
 import LocationMixin from '@/utils/mixins/modules/location-to'
+import ReportModuleEntry from './ReportModuleEntry.vue'
 
 export default {
   name: 'ContentProjectTimeline',
@@ -66,7 +77,8 @@ export default {
     QuickMonitor,
     DownProjectReport,
     ProjectTimeline,
-    ContentModuleCard
+    ContentModuleCard,
+    ReportModuleEntry
   },
   props: {
     beforeLeavePage: Function

+ 222 - 0
apps/mobile/src/views/article/components/ReportModuleEntry.vue

@@ -0,0 +1,222 @@
+<template>
+  <section class="report-module-entry">
+    <div class="flex items-center justify-center report-module-container">
+      <div class="marketing">{{ marketText }}</div>
+      <div
+        class="flex items-center report-module-action"
+        :data-mold="type | formatMold"
+        @click="goReportTarget"
+      >
+        <AppIcon
+          name="xiazaixiangmubaogao"
+          color="#2ABED1"
+          svg
+          size="20"
+        ></AppIcon>
+        <span>{{ type | formatType }}</span>
+        <van-icon name="arrow" />
+      </div>
+    </div>
+  </section>
+</template>
+<script>
+import { Icon } from 'vant'
+import { AppIcon } from '@/ui'
+import { ajaxReportEquityDeduct } from '@/api/modules/'
+export default {
+  name: 'ReportModuleEntry',
+  components: {
+    [Icon.name]: Icon,
+    AppIcon
+  },
+  props: {
+    type: {
+      type: String,
+      default: ''
+    },
+    // 采购单位名称
+    buyerName: {
+      type: String,
+      default: ''
+    },
+    // 供应商/中标单位名称
+    winnerName: {
+      type: String,
+      default: ''
+    },
+    // 项目名称
+    projectName: {
+      type: String,
+      default: ''
+    },
+    // 报告信息
+    info: {
+      type: Object,
+      default: () => ({})
+    },
+    // 标讯id
+    id: {
+      type: String,
+      default: ''
+    }
+  },
+  filters: {
+    formatType(type) {
+      if (type === 'competitor') {
+        return '供应商分析报告'
+      }
+      if (type === 'buyer') {
+        return '采购单位分析报告'
+      }
+      if (type === 'project') {
+        return '项目分析报告'
+      }
+    },
+    formatMold(type) {
+      if (type === 'project') {
+        return 1
+      }
+      if (type === 'competitor') {
+        return 2
+      }
+      if (type === 'buyer') {
+        return 3
+      }
+    }
+  },
+  computed: {
+    // 营销文案
+    marketText() {
+      const { guidingCopy } = this.info
+      const { buyer, ent, project } = guidingCopy
+      guidingCopy['project'] = project
+      guidingCopy['buyer'] = buyer
+      guidingCopy['competitor'] = ent
+      return guidingCopy[this.type]
+    }
+  },
+  methods: {
+    showLoading() {
+      return this.$toast.loading({
+        duration: 0,
+        forbidClick: true,
+        message: 'loading...'
+      })
+    },
+    getReportId() {
+      let reportId = ''
+      const type = this.type
+      const {
+        ent_report_ids = {},
+        buyer_report_id = '',
+        project_report_id = ''
+      } = this.info
+      if (type === 'competitor') {
+        const name = this.winnerName
+        reportId = ent_report_ids[name] || ''
+      } else if (type === 'buyer') {
+        reportId = buyer_report_id
+      } else if (type === 'project') {
+        reportId = project_report_id
+      }
+      return reportId
+    },
+    getReportOrderUrl() {
+      let url = ''
+      const type = this.type
+      if (type === 'competitor') {
+        url = `/order/create/analysis-report/competitor?name=${this.winnerName}&id=${this.id}`
+      } else if (type === 'buyer') {
+        url = `/order/create/analysis-report/unit?name=${this.buyerName}&id=${this.id}`
+      } else if (type === 'project') {
+        url = `/order/create/analysis-report/project?name=${this.projectName}&id=${this.id}&buyer=${this.buyerName}`
+      }
+      return url
+    },
+    goReportTarget() {
+      const reportId = this.getReportId()
+      if (reportId) {
+        this.$router.push({
+          path: `/report/analysis/detail?id=${reportId}`
+        })
+      } else {
+        // 套餐抵扣
+        this.deductPackage((code, data) => {
+          if (code === 0 && data) {
+            this.$router.push({
+              path: `/report/analysis/detail?id=${data}`
+            })
+          } else {
+            const url = this.getReportOrderUrl()
+            this.$router.push({
+              path: url
+            })
+          }
+        })
+      }
+    },
+    async deductPackage(callback) {
+      const params = {
+        ent_name: this.winnerName,
+        buyer: this.buyerName,
+        report_mold: this.getReportMold(),
+        project_name: this.projectName,
+        bidding_id: this.id
+      }
+      console.log(params, 'params')
+      const loading = this.showLoading()
+      try {
+        const { error_code: code, data } = await ajaxReportEquityDeduct(params)
+        loading?.clear()
+        callback && callback(code, data)
+      } catch (error) {
+        loading?.clear()
+        callback && callback()
+      }
+    },
+    getReportMold() {
+      const type = this.type
+      let mold = 0
+      switch (type) {
+        case 'project':
+          mold = 1
+          break
+        case 'competitor':
+          mold = 2
+          break
+        case 'buyer':
+          mold = 3
+          break
+      }
+      return mold
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.report-module-entry {
+  .report-module-container {
+    padding: 7px 0;
+    border: 0.5px solid #87dfea;
+    background: #2abed11f;
+    border-radius: 8px;
+  }
+  .marketing {
+    margin-right: 4px;
+    padding: 2px 8px;
+    border-radius: 8px 2px 8px 2px;
+    background: linear-gradient(101.8deg, #2abed1 0%, #0a6cff 100%);
+    font-size: 11px;
+    line-height: 14px;
+    color: #fff;
+  }
+  .report-module-action {
+    color: $color_main;
+    span {
+      margin: 0 4px;
+      font-size: 14px;
+      line-height: 20px;
+    }
+  }
+}
+</style>

+ 129 - 15
apps/mobile/src/views/article/ui/ReportDownloadCard.vue

@@ -5,10 +5,19 @@
     </div> -->
     <div class="menu-action-item">
       <p class="menu-action-item-title">芝麻信用共建分析报告</p>
+      <p
+        v-if="packageStatus"
+        class="flex items-center justify-center member-container"
+        :class="packageClass"
+      >
+        <span class="member-icon" :class="'member-icon-' + packageClass" />
+        <span class="member-type">{{ packageText }}</span>
+        <span class="member-vip">VIP</span>
+      </p>
       <p
         v-if="showBuyer"
         class="menu-action-item-content clickable"
-        @click="toClickReport('unit')"
+        @click="toClickReport('buyer')"
       >
         采购单位分析报告
       </p>
@@ -26,15 +35,13 @@
       >
         项目分析报告
       </p>
-      <div class="report-tips">{{ tips }}</div>
-      <div
-        v-if="discountText"
-        class="highlight-text inline-flex flex-items-center clickable report-buy-btn"
-        @click.stop="onClickBtn"
-      >
-        <slot name="btnText">{{ discountText }}</slot>
+      <template v-if="discountText">
+        <div
+          class="flex flex-items-center justify-center m-t-12px"
+          v-html="discountText"
+        ></div>
         <!-- <AppIcon name="youbian" svg size="18"></AppIcon> -->
-      </div>
+      </template>
     </div>
   </section>
 </template>
@@ -53,10 +60,6 @@ export default {
       type: Boolean,
       default: false
     },
-    tips: {
-      type: String,
-      default: ''
-    },
     btnInfo: {
       type: Object,
       default: () => ({})
@@ -73,7 +76,60 @@ export default {
       return this.btnInfo?.buyer_report_button
     },
     discountText() {
-      return this.btnInfo?.discount_msg
+      const packageType = this.packageInfo?.zmStatus
+      const balance = this.packageInfo?.zmNumber
+      const total = this.packageInfo?.zmAllNumber
+      const price = this.packageInfo?.comboOne
+      const expiredDay = this.packageInfo?.expiredDay
+      const discountMsg = this.btnInfo?.discount_msg
+      if (packageType > 0) {
+        if (balance > 0) {
+          return `<span class="gray-text">本月报告下载额度:<em class="highlight-text">${balance}</em>/${total}</span>`
+        } else {
+          return `<p class="gray-text">本月免费额度已用完<br>享受会员特价:<span class="highlight-text">${price}/份</span></p>`
+        }
+      } else {
+        // packageType < 0:套餐过期天数
+        // 其他:首购优惠等
+        if (packageType < 0 && expiredDay) {
+          return `<div class="gray-text">您的权益已过期${expiredDay}天,<br>开通权益享特惠</div>`
+        } else {
+          return `<span class="highlight-text report-buy-btn">${discountMsg}</span>`
+        }
+      }
+    },
+    packageType() {
+      return this.packageInfo?.zmStatus
+    },
+    packageInfo() {
+      return this.btnInfo?.zmAnalysis
+    },
+    packageStatus() {
+      return this.packageInfo?.zmStatus && this.packageInfo?.zmStatus > 0
+    },
+    packageText() {
+      const type = this.packageType
+      if (type === 1) {
+        return '月卡'
+      } else if (type === 2) {
+        return '季卡'
+      } else if (type === 3) {
+        return '年卡'
+      } else {
+        return ''
+      }
+    },
+    packageClass() {
+      const type = this.packageType
+      if (type === 1) {
+        return 'month'
+      } else if (type === 2) {
+        return 'season'
+      } else if (type === 3) {
+        return 'year'
+      } else {
+        return ''
+      }
     }
   },
   methods: {
@@ -108,9 +164,62 @@ export default {
 .menu-action-item-content {
   margin-top: 12px;
 }
+.member-container {
+  width: 120px;
+  height: 22px;
+  margin: 12px auto 0;
+  border-radius: 8px 2px 8px 2px;
+  font-weight: 600;
+  .member-icon {
+    width: 12px;
+    height: 10px;
+    background-repeat: no-repeat;
+    background-position: center center;
+    background-size: 100% 100%;
+    margin-right: 4px;
+    &.member-icon-month {
+      background-image: url(@/assets/image/icon/crown-month.png);
+    }
+    &.member-icon-season {
+      background-image: url(@/assets/image/icon/crown-season.png);
+    }
+    &.member-icon-year {
+      background-image: url(@/assets/image/icon/crown-year.png);
+    }
+  }
+  .member-type {
+    margin-right: 4px;
+    font-size: 13px;
+  }
+  .member-vip {
+    font-size: 12px;
+    font-style: italic;
+  }
+  &.month {
+    background: $color_main;
+    color: #fff;
+  }
+  &.season {
+    background: #f1d090;
+    color: #33323a;
+    .member-vip {
+      color: #1b1a2a;
+    }
+  }
+  &.year {
+    background: #1b1a2a;
+    color: #f1d090;
+    .member-vip {
+      color: #fae7ca;
+    }
+  }
+}
+</style>
+<style lang="scss">
 .report-buy-btn {
+  display: inline-block;
   min-width: 106px;
-  margin: 12px auto 0;
+  margin: 0 auto;
   white-space: nowrap;
   background: rgba(42, 190, 209, 0.12);
   padding: 1px 12px;
@@ -118,4 +227,9 @@ export default {
   font-size: 12px;
   line-height: 18px;
 }
+.gray-text {
+  color: #9b9ca3;
+  font-size: 11px;
+  line-height: 16px;
+}
 </style>

+ 20 - 1
apps/mobile/src/views/reportAnalysis/components/listItem.vue

@@ -157,7 +157,7 @@
           class="jy-zhima-logo"
           src="@/assets/image/reportanalysis/jy-zhima-logo.png"
         />
-        <div class="item" v-if="data.biddingId">
+        <div class="item" v-if="data.biddingId && data.biddingTitle">
           <p class="label">目标公告:</p>
           <p
             class="value ellipsis"
@@ -197,6 +197,14 @@
             {{ data.buyer || '-' }}
           </p>
         </div>
+        <div class="item">
+          <p class="label">获取方式:</p>
+          <p
+            class="value ellipsis"
+          >
+            {{ data.acquisition_method | formatGetWay }}
+          </p>
+        </div>
       </div>
     </div>
     <div class="foot_btn" @click="$emit('download', data)">
@@ -295,6 +303,17 @@ export default {
       const end = new Date(rangeTimeArr[1] * 1000).getTime()
       console.log(start)
       return `${dateFormatter(start, fmt)}至${dateFormatter(end, fmt)}`
+    },
+    formatGetWay(value) {
+      if(value === 0) {
+        return '付费购买'
+      } else if(value > 0){
+        return '会员获取-免费下载'
+      } else if (value < 0) {
+        return '会员获取-付费购买'
+      } else {
+        return '-'
+      }
     }
   },
   props: {

+ 137 - 7
apps/mobile/src/views/reportAnalysis/reportDownload.vue

@@ -80,12 +80,37 @@
             class="jy-zhima-logo"
             src="@/assets/image/reportanalysis/jy-zhima-logo.png"
           />
-          <div class="credit_report_btn" @click="goBuy('analysis')">去购买</div>
+          <div
+            v-if="zhiMaInfo.pack_type > 0"
+            class="member-container"
+            :class="zhiMaInfo.pack_type | packageTypeClass"
+          >
+            <span class="member-type">{{
+              zhiMaInfo.pack_type | packageTypeText
+            }}</span>
+            <span class="member-vip">VIP</span>
+          </div>
+          <div v-else class="credit_report_btn" @click="goBuy('analysis')">
+            去购买
+          </div>
         </div>
         <div class="analysis-report-main">
-          <div class="flex credit_report_title mt8px">
-            <span>芝麻共建分析报告</span>
-            <div class="flex-1 justify-between credit_report_action">
+          <div class="flex items-center mt8px">
+            <span class="report-title">芝麻共建分析报告</span>
+            <span
+              class="end-time"
+              v-if="zhiMaInfo.pack_type > 0 && zhiMaInfo.minEndTime"
+              >有效期至:{{
+                dateFormatter(zhiMaInfo.minEndTime, 'yyyy-MM-dd')
+              }}</span
+            >
+            <span v-if="zhiMaInfo.firstMsg" class="report-first">{{
+              zhiMaInfo.firstMsg
+            }}</span>
+            <div
+              v-if="zhiMaInfo.firstMsg"
+              class="flex-1 justify-between credit_report_action"
+            >
               <select-report-example>
                 <span class="credit_report_example">
                   报告样例 <i class="texticon" />
@@ -93,11 +118,28 @@
               </select-report-example>
             </div>
           </div>
-          <!-- <div class="credit_report_content">
+          <div class="credit_report_content">
             <span
               >信用报告通过信用背书、风险预警、政策适配,三大核心作用,成为投标企业参与市场竞争的关键工具‌。</span
             >
-          </div> -->
+          </div>
+          <div
+            v-if="zhiMaInfo.pack_type > 0"
+            class="flex items-center justify-between m-t-8px"
+          >
+            <div class="balance-container">
+              <span class="balance-value"
+                >本月剩余额度:<strong>{{ zhiMaInfo.balance }}</strong></span
+              >
+              <span class="balance-label">份/{{ zhiMaInfo.total }}份</span>
+            </div>
+            <span
+              class="credit_report_example"
+              @click="goDetail('芝麻共建分析报告')"
+            >
+              查明细 <i class="texticon" />
+            </span>
+          </div>
         </div>
       </div>
       <!-- S 投标企业信用报告入口 S -->
@@ -220,7 +262,8 @@ export default {
         emailSendDialog: false,
         fileUrl: '',
         id: ''
-      }
+      },
+      zhiMaInfo: {}
     }
   },
   computed: {
@@ -243,12 +286,35 @@ export default {
       } else if (val === '4' || val === '6') {
         return 'blue2'
       }
+    },
+    packageTypeText(val) {
+      if (val === 1) {
+        return '月卡'
+      } else if (val === 2) {
+        return '季卡'
+      } else if (val === 3) {
+        return '年卡'
+      } else {
+        return ''
+      }
+    },
+    packageTypeClass(val) {
+      if (val === 1) {
+        return 'month'
+      } else if (val === 2) {
+        return 'season'
+      } else if (val === 3) {
+        return 'year'
+      } else {
+        return ''
+      }
     }
   },
   created() {
     this.getcount()
   },
   methods: {
+    dateFormatter,
     viewReportExample() {
       this.$router.push({
         path: '/common/pdfview'
@@ -271,6 +337,7 @@ export default {
         this.market = data.market
         this.buyer = data.buyer
         this.winner = data.winner
+        this.zhiMaInfo = data.zhima
       }
     },
     onLoad() {
@@ -709,6 +776,7 @@ export default {
       font-size: 12px;
       line-height: 18px;
       color: #2abed1;
+      white-space: nowrap;
     }
     .credit_report_btn {
       padding: 2px 17px;
@@ -738,6 +806,68 @@ export default {
         width: 235px;
         height: 24px;
       }
+      .report-title {
+        font-size: 16px;
+        line-height: 24px;
+        color: #171826;
+        flex-shrink: 0;
+      }
+      .report-first {
+        color: $color_main;
+        font-size: 12px;
+        line-height: 18px;
+      }
+      .end-time {
+        margin-left: 8px;
+        font-size: 11px;
+        line-height: 16px;
+        color: #9b9ca3;
+        flex-shrink: 0;
+      }
+      .member-container {
+        padding: 4px 8px;
+        border-radius: 8px 2px 8px 2px;
+        font-weight: 600;
+        .member-type {
+          margin-right: 1px;
+          font-size: 13px;
+        }
+        .member-vip {
+          font-size: 12px;
+          font-style: italic;
+        }
+        &.month {
+          background: $color_main;
+          color: #fff;
+        }
+        &.season {
+          background: #f1d090;
+          color: #33323a;
+          .member-vip {
+            color: #1b1a2a;
+          }
+        }
+        &.year {
+          background: #1b1a2a;
+          color: #f1d090;
+          .member-vip {
+            color: #fae7ca;
+          }
+        }
+      }
+      .balance-container {
+        .balance-value {
+          margin-right: 4px;
+          font-size: 14px;
+          line-height: 20px;
+          color: #171826;
+        }
+        .balance-label {
+          font-size: 12px;
+          line-height: 18px;
+          color: #9b9ca3;
+        }
+      }
     }
   }
 

+ 13 - 3
apps/mobile/src/views/reportAnalysis/reportdownloadDetails.vue

@@ -12,7 +12,12 @@
         <div class="item" v-for="(item, index) in list.value" :key="index">
           <div class="toptitle">
             <div class="time">{{ item.createTime | timeFilter }}</div>
-            <!-- <div class="balance">余额:<span>9份</span></div> -->
+            <div
+              class="balance"
+              v-if="getproductCode === 5 && item.deductionNumb"
+            >
+              余额:<span>{{ item.deductionNumb }}份</span>
+            </div>
           </div>
           <div class="content">
             <!-- 0使用5作废7回收 6分配 1购买 -->
@@ -36,7 +41,10 @@
               <div class="title">
                 {{ nameF(item) }}
               </div>
-              <div class="desc" v-if="item.userType === 1">
+              <div
+                class="desc"
+                v-if="item.userType === 1 && JSON.parse(item.remarks).endTime"
+              >
                 有效期至<span>{{ JSON.parse(item.remarks).endTime }}</span>
               </div>
             </div>
@@ -101,8 +109,10 @@ export default {
         return 1
       } else if (this.type === '业主采购分析报告') {
         return 2
-      } else {
+      } else if (this.type === '市场分析定制报告') {
         return 3
+      } else if (this.type === '芝麻共建分析报告') {
+        return 5
       }
     }
   },