Bläddra i källkod

Merge branch 'dev/v1.1.15_yf' of jianyu/web into feature/v1.1.15

yangfeng 1 vecka sedan
förälder
incheckning
e3e32cb04b

+ 1 - 0
apps/bigmember_pc/src/components/zhima/select-example.vue

@@ -81,6 +81,7 @@ export default {
     font-size: 14px;
     line-height: 22px;
     color: #1d1d1d;
+    white-space: nowrap;
     cursor: pointer;
     i {
       margin-right: 8px;

+ 51 - 40
apps/bigmember_pc/src/views/reportDownload/balance.vue

@@ -4,48 +4,57 @@
       <h1>{{ titleText }}下载余额明细</h1>
     </div>
     <section class="box-container" v-loading="listState.loading">
-      <el-table
-        :data="listState.list"
-        empty-text=""
-        v-show="!showEmpty"
-      >
+      <el-table :data="listState.list" empty-text="" v-show="!showEmpty">
         <el-table-column label="时间" width="170">
           <template slot-scope="scope">
             <span class="max-line-3">
-              {{(scope.row.createTime * 1000) | formatTime('yyyy-MM-dd HH:mm') }}
+              {{
+                (scope.row.createTime * 1000) | formatTime('yyyy-MM-dd HH:mm')
+              }}
             </span>
           </template>
         </el-table-column>
         <el-table-column label="类型">
           <template slot-scope="scope">
-            {{scope.row.userType | formatType }}
+            {{ scope.row.userType | formatType }}
           </template>
         </el-table-column>
-        <el-table-column label="余额变化(份)"  >
+        <el-table-column label="余额变化(份)">
           <template slot-scope="scope">
-            <span v-if="scope.row.userType === 0 || scope.row.userType === 5 ||  scope.row.userType === 7">-{{scope.row.number}}</span>
-            <span class="highlight" v-else>+{{scope.row.number}}</span>
+            <span
+              v-if="
+                scope.row.userType === 0 ||
+                scope.row.userType === 5 ||
+                scope.row.userType === 7
+              "
+              >-{{ scope.row.number }}</span
+            >
+            <span class="highlight" v-else>+{{ scope.row.number }}</span>
           </template>
         </el-table-column>
         <el-table-column label="原因描述" min-width="230" align="center">
           <template slot-scope="scope">
             <div v-if="scope.row.remarks">
               <div v-if="scope.row.userType === 1">
-                <div>{{scope.row.remarks.source}}</div>
-                <div v-if="scope.row.remarks.endTime">有效期至:<span class="highlight">{{ scope.row.remarks.endTime }}</span></div>
+                <div>{{ scope.row.remarks.source }}</div>
+                <div v-if="scope.row.remarks.endTime">
+                  有效期至:<span class="highlight">{{
+                    scope.row.remarks.endTime
+                  }}</span>
+                </div>
               </div>
               <div v-else-if="scope.row.userType === 0">
                 <span>下载报告</span>
               </div>
               <div v-else>
-                <span>{{scope.row.remarks.describe}}</span>
+                <span>{{ scope.row.remarks.describe }}</span>
               </div>
             </div>
             <div v-else>--</div>
           </template>
         </el-table-column>
       </el-table>
-      <empty style="margin-top:0;"  v-show="showEmpty">
+      <empty style="margin-top: 0" v-show="showEmpty">
         <div class="flex-c-c center">
           <div>暂无数据</div>
         </div>
@@ -76,12 +85,13 @@ export default {
   components: {
     Empty
   },
-  data () {
+  data() {
     return {
       typeObj: {
         ent: '企业中标分析报告',
         prop: '业主采购分析报告',
-        market: '市场分析定制报告'
+        market: '市场分析定制报告',
+        analysis: '芝麻信用共建分析报告'
       },
       listState: {
         loaded: false, // 是否已经搜索过
@@ -131,15 +141,15 @@ export default {
     }
   },
   computed: {
-    pageType () {
+    pageType() {
       let type = 'market'
-      const { active }  = this.$route.query
-      if( active && active.indexOf('balance') > -1) {
+      const { active } = this.$route.query
+      if (active && active.indexOf('balance') > -1) {
         type = active.split('_')[1] || 'market'
       }
       return type
     },
-    titleText () {
+    titleText() {
       return this.typeObj[this.pageType]
     },
     showEmpty() {
@@ -150,22 +160,23 @@ export default {
     this.getList()
   },
   methods: {
-    async getList () {
+    async getList() {
       const query = {
         productCode: this.$route.query.id || 1,
         pageNum: this.listState.pageNum, // 当前页
-        pageSize: this.listState.pageSize, // 每页多少条数据
+        pageSize: this.listState.pageSize // 每页多少条数据
       }
       this.listState.loading = true
       this.listState.loaded = false
       const { data, error_code: code } = await getPDFPackDetail(query)
-      if(code === 0 && data) {
+      if (code === 0 && data) {
         this.listState.loading = false
         this.listState.loaded = true
-        this.listState.list = data.list?.map(item => {
-          item.remarks = JSON.parse(item.remarks)
-          return item
-        }) || []
+        this.listState.list =
+          data.list?.map((item) => {
+            item.remarks = JSON.parse(item.remarks)
+            return item
+          }) || []
         this.listState.total = data.total || 0
       }
     },
@@ -177,7 +188,7 @@ export default {
       this.listState.pageNum = 1
       this.listState.pageSize = size
       this.getList()
-    },
+    }
   }
 }
 </script>
@@ -189,29 +200,29 @@ $char_color: #1d1d1d;
     padding: 24px;
   }
 }
-.report-download-balance{
+.report-download-balance {
   margin: 0 auto;
-  .page-header{
+  .page-header {
     height: 40px;
-    line-height:40px;
+    line-height: 40px;
     vertical-align: text-bottom;
-    h1{
+    h1 {
       display: inline-block;
       font-size: 24px;
-      line-height:38px;
+      line-height: 38px;
       color: $char_color;
       margin-right: 12px;
     }
   }
 
-  .box-container{
+  .box-container {
     border-radius: 4px;
     background: #fff;
-    padding:20px;
-    .box-title{
-      font-size:16px;
+    padding: 20px;
+    .box-title {
+      font-size: 16px;
       color: $char_color;
-      line-height:24px;
+      line-height: 24px;
       margin-bottom: 12px;
     }
   }
@@ -220,7 +231,7 @@ $char_color: #1d1d1d;
   }
   .el-pagination-container {
     margin-right: 0;
-    margin-top:38px;
+    margin-top: 38px;
     padding-bottom: 18px;
   }
 
@@ -239,7 +250,7 @@ $char_color: #1d1d1d;
       border-bottom-color: transparent;
     }
     .empty-content-position .empty-main {
-      margin-top:0;
+      margin-top: 0;
     }
   }
 }

+ 9 - 9
apps/bigmember_pc/src/views/reportDownload/index.vue

@@ -18,7 +18,7 @@ export default {
     balancePage,
     recordPage
   },
-  data () {
+  data() {
     return {
       // record报告下载记录,balance_ent 企业中标分析, balance_prop 业主采购分析,balance_market 市场分析
       active: 'record',
@@ -26,23 +26,24 @@ export default {
     }
   },
   computed: {
-    showRecord () {
+    showRecord() {
       const active = this.$route.query?.active
       return !active || active === 'record'
     },
-    showBalance () {
+    showBalance() {
       const active = this.$route.query?.active
       return active && active.indexOf('balance') > -1
     },
-    title () {
+    title() {
       const active = this.$route.query?.active
       const obj = {
         ent: '企业中标分析报告',
         prop: '业主采购分析报告',
-        market: '市场分析定制报告'
+        market: '市场分析定制报告',
+        analysis: '芝麻信用共建分析报告'
       }
       let str = '报告下载记录'
-      if(active && active.indexOf('balance') > -1) {
+      if (active && active.indexOf('balance') > -1) {
         const type = active.split('_')[1]
         str = obj[type] + '下载余额明细'
       }
@@ -50,7 +51,7 @@ export default {
     }
   },
   created() {
-    if(this.timer) clearTimeout(this.timer)
+    if (this.timer) clearTimeout(this.timer)
     this.timer = setTimeout(() => {
       this.setPageTdkToView({
         title: this.title,
@@ -60,9 +61,8 @@ export default {
     })
   },
   beforeDestroy() {
-    if(this.timer) clearTimeout(this.timer)
+    if (this.timer) clearTimeout(this.timer)
     this.timer = null
   }
 }
 </script>
-

+ 201 - 9
apps/bigmember_pc/src/views/reportDownload/record.vue

@@ -10,7 +10,7 @@
         >
       </div>
       <div class="card-row">
-        <div class="card-col" v-for="item in cardList">
+        <div class="card-col" v-for="item in cardList" :key="item.type">
           <p class="title">{{ item.title }}</p>
           <div class="num">
             <span
@@ -26,14 +26,80 @@
           </div>
           <p class="date">
             <span v-if="item.total">最近有效期至:{{ item.minEndTime }}</span>
+          </p>
+          <p>
             <span class="text-button" @click="goBalance(item)"
               >查明细<i class="iconfont icon-more"></i
             ></span>
           </p>
         </div>
+        <div class="card-col card-zhi-ma">
+          <img
+            class="jy-zhima-logo"
+            src="@/assets/images/logo/jy-zhima-logo.png"
+            height="20"
+          />
+          <p class="flex items-center justify-between">
+            <span class="zhi-ma-title">芝麻信用共建分析报告</span>
+            <!-- <template>
+              <span v-if="zhiMaReportInfo.isFree" class="free-buy-btn">去开通</span>
+            </template> -->
+            <span
+              v-if="zhiMaReportInfo.packType"
+              class="member-type"
+              :class="packageClassName"
+              >{{ packageText }}<i class="vip-icon">VIP</i></span
+            >
+            <span v-else class="free-buy-btn" @click="goBuyAnalysisReport"
+              >去购买</span
+            >
+          </p>
+          <p
+            v-if="!zhiMaReportInfo.packType || zhiMaReportInfo.packType < 0"
+            class="zhi-ma-desc m-t-8px"
+          >
+            信用报告通过信用背书、风险预警、政策适配,三大核心作用。
+          </p>
+          <div class="package-num" v-if="zhiMaReportInfo.packType">
+            <span>
+              本月余额
+              <strong>{{ zhiMaReportInfo.balance }}</strong>
+              份/{{ zhiMaReportInfo.total }}份
+            </span>
+          </div>
+          <div class="flex items-center justify-between m-t-10px">
+            <div class="zhi-ma-tip">
+              <span
+                v-if="zhiMaReportInfo.expiredText"
+                class="light-gray-text"
+                >{{ zhiMaReportInfo.expiredText }}</span
+              >
+              <span v-if="zhiMaReportInfo.firstText" class="highlight-text">{{
+                zhiMaReportInfo.firstText
+              }}</span>
+              <!-- <span v-if="zhiMaReportInfo.isFree" class="highlight-text">开通权益卡更优惠</span> -->
+              <span v-if="zhiMaReportInfo.endTime" class="light-gray-text"
+                >有效期至:{{ zhiMaReportInfo.endTime }}</span
+              >
+            </div>
+            <div>
+              <ReportExample v-if="zhiMaReportInfo.firstText">
+                <span slot="reference" class="view-report-sample"
+                  >查看报告样例<i class="iconfont icon-more"></i
+                ></span>
+              </ReportExample>
+              <span
+                v-else
+                class="text-button"
+                @click="goBalance(zhiMaReportInfo)"
+                >查明细<i class="iconfont icon-more"></i
+              ></span>
+            </div>
+          </div>
+        </div>
       </div>
     </section>
-    <section
+    <!-- <section
       class="flex flex-(justify-between items-center) analysis-report-box"
     >
       <div class="flex flex-items-center analysis-report-content">
@@ -44,7 +110,6 @@
         />
         <img class="zhima-logo" src="@/assets/images/logo/zhima-logo.png" />
         <p class="analysis-report-name">芝麻信用共建分析报告</p>
-        <!-- <p class="analysis-report-desc">简介</p> -->
       </div>
       <div class="flex flex-items-center report-action">
         <ReportExample>
@@ -55,7 +120,7 @@
           去购买
         </button>
       </div>
-    </section>
+    </section> -->
     <section class="flex flex-(justify-between items-center) credit-report-box">
       <div class="flex flex-items-center credit-report-content">
         <p class="credit-report-title">投标企业信用报告</p>
@@ -414,7 +479,8 @@ import {
   formatIndustry,
   formatBuyerClass,
   scrollTargetView,
-  openLinkInWorkspace
+  openLinkInWorkspace,
+  dateFormatter
 } from '@/utils/'
 
 export default {
@@ -466,6 +532,16 @@ export default {
         5: '项目分析报告',
         6: '供应商分析报告',
         7: '采购单位分析报告'
+      },
+      zhiMaReportInfo: {
+        flag: 'analysis',
+        id: 4,
+        firstText: '',
+        expiredText: '',
+        packType: 0,
+        total: 20,
+        balance: 0,
+        endTime: ''
       }
     }
   },
@@ -600,6 +676,38 @@ export default {
     ...mapGetters('user', ['isMember']),
     showEmpty() {
       return this.listState.list.length === 0 && this.listState.loaded
+    },
+    packageText() {
+      let text = ''
+      const type = this.zhiMaReportInfo.packType
+      switch (type) {
+        case 1:
+          text = '月卡'
+          break
+        case 2:
+          text = '季卡'
+          break
+        case 3:
+          text = '年卡'
+          break
+      }
+      return text
+    },
+    packageClassName() {
+      let className = ''
+      const type = this.zhiMaReportInfo.packType
+      switch (type) {
+        case 1:
+          className = 'member-month'
+          break
+        case 2:
+          className = 'member-season'
+          break
+        case 3:
+          className = 'member-year'
+          break
+      }
+      return className
     }
   },
   created() {
@@ -732,6 +840,22 @@ export default {
             item.minEndTime = data[item.type].minEndTime
           }
         }
+        if (data?.zhima) {
+          const {
+            balance,
+            total,
+            pack_type,
+            minEndTime,
+            firstMsg,
+            expiredMsg
+          } = data.zhima
+          this.zhiMaReportInfo.balance = balance
+          this.zhiMaReportInfo.total = total
+          this.zhiMaReportInfo.packType = pack_type
+          this.zhiMaReportInfo.firstText = firstMsg
+          this.zhiMaReportInfo.expiredText = expiredMsg
+          this.zhiMaReportInfo.endTime = dateFormatter(minEndTime, 'yyyy-MM-dd')
+        }
       }
     },
     // 立即充值
@@ -856,14 +980,15 @@ $char_color: #1d1d1d;
     margin: 24px 0 16px;
     padding: 12px 24px 32px;
     .card-row {
-      display: grid;
-      grid-template-columns: 1fr 1fr 1fr;
-      grid-column-gap: 24px;
+      display: flex;
+      //grid-template-columns: 1fr 1fr 1fr;
+      grid-column-gap: 16px;
     }
     .card-col {
+      flex: 1;
       background: url(~@/assets/images/report/balance-bg.png) no-repeat center;
       background-size: cover;
-      padding: 24px 32px;
+      padding: 16px 20px;
       border-radius: 8px;
       box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
       font-size: 16px;
@@ -879,16 +1004,83 @@ $char_color: #1d1d1d;
           margin-right: 11px;
         }
       }
+      .package-num {
+        strong {
+          font-size: 40px;
+          color: #1d1d1d;
+        }
+        > span {
+          color: #686868;
+          margin-right: 11px;
+        }
+      }
 
       .date {
         font-size: 14px;
         color: #999;
         line-height: 22px;
+        white-space: nowrap;
 
         span:nth-of-type(1) {
           margin-right: 12px;
         }
       }
+      &.card-zhi-ma {
+        background: linear-gradient(180deg, #e4fcff 0%, #ffffff 122.96%);
+        border: 2px solid #ffffff;
+        box-shadow: 0px 4px 8px 0px #00000014;
+        .jy-zhima-logo {
+          margin-bottom: 8px;
+        }
+        .zhi-ma-title {
+          font-size: 16px;
+          line-height: 24px;
+          color: #1d1d1d;
+        }
+        .zhi-ma-desc {
+          font-size: 12px;
+          line-height: 18px;
+          color: #686868;
+        }
+        .zhi-ma-tip {
+          font-size: 14px;
+          line-height: 22px;
+        }
+        .free-buy-btn {
+          padding: 2px 8px;
+          background: $color_main;
+          border-radius: 4px;
+          font-size: 12px;
+          line-height: 18px;
+          color: #fff;
+          cursor: pointer;
+        }
+        .member-type {
+          padding: 4px 8px;
+          font-size: 13px;
+          line-height: 18px;
+          border-radius: 8px 4px 8px 2px;
+          font-weight: 700;
+          .vip-icon {
+            font-style: italic;
+          }
+          &.member-month {
+            color: #fff;
+            background: $color_main;
+          }
+          &.member-season {
+            color: #1b1a2a;
+            background: #f1d090;
+          }
+          &.member-year {
+            color: #fae7ca;
+            background: #1b1a2a;
+          }
+        }
+        .light-gray-text {
+          color: #999999;
+        }
+      }
     }
   }
   .record-box {