Kaynağa Gözat

合伙人-贷款产品、销售静态

panyong 4 yıl önce
ebeveyn
işleme
81edec0689

+ 11 - 3
htmldev/loan/src/router/index.js

@@ -75,10 +75,14 @@ const routes = [
       {
         path: '/', // 推广
         name: 'Marketing',
-        component: () => import(/* webpackChunkName: "partner_marketing" */ '../views/partner/marketing')
+        component: () => import(/* webpackChunkName: "partner_marketing" */ '../views/partner/marketing'),
+        meta: {
+          isUseCache: false,
+          keepAlive: true
+        }
       },
       {
-        path: '/mine', // 我的
+        path: 'mine', // 我的
         name: 'Mine',
         component: () => import(/* webpackChunkName: "partner_mine" */ '../views/partner/mine')
       }
@@ -87,7 +91,11 @@ const routes = [
   {
     path: '/partner/goods', // 贷款产品
     name: 'Goods',
-    component: () => import(/* webpackChunkName: "partner_goods" */ '../views/partner/goods')
+    component: () => import(/* webpackChunkName: "partner_goods" */ '../views/partner/goods'),
+    meta: {
+      isUseCache: false,
+      keepAlive: true
+    }
   },
   {
     path: '/partner/sale', // 放款总额

+ 143 - 143
htmldev/loan/src/views/loan/home/index.vue

@@ -1,32 +1,32 @@
 <template>
-    <div class="better-scroll wrapper" ref="wrapper">
-        <ul>
-            <li class="title">我的申请记录</li>
-            <li class="list fail" v-for="(item, index) in listData" :key="index" @click="funJumpDetail(item)">
-                <div class="top border-bottom-1px">
-                    <div class="left-wrap">
-                        <img src="" alt="">
-                    </div>
-                    <div class="right-wrap">
-                        <p>中行贷申请</p>
-                        <p>
-                            <span>需求金额:</span>
-                            <span>30</span>
-                            <span>万元</span>
-                        </p>
-                    </div>
-                </div>
-                <p class="bottom">
-                    <span>2020-12-23 19:23</span>
-                    <span>></span>
-                </p>
-            </li>
-            <li class="bitmap" v-if="!listData.length && booFetchData">
-                <img src="image/bitmap@2x.png" alt="">
-                <p>暂无申请记录</p>
-            </li>
-        </ul>
-    </div>
+  <div class="better-scroll wrapper" ref="wrapper">
+    <ul>
+      <li class="title">我的申请记录</li>
+      <li class="list fail" v-for="(item, index) in listData" :key="index" @click="funJumpDetail(item)">
+        <div class="top border-bottom-1px">
+          <div class="left-wrap">
+            <img src="" alt="">
+          </div>
+          <div class="right-wrap">
+            <p>中行贷申请</p>
+            <p>
+              <span>需求金额:</span>
+              <span>30</span>
+              <span>万元</span>
+            </p>
+          </div>
+        </div>
+        <p class="bottom">
+          <span>2020-12-23 19:23</span>
+          <span>></span>
+        </p>
+      </li>
+      <li class="bitmap" v-if="!listData.length && booFetchData">
+        <img src="image/bitmap@2x.png" alt="">
+        <p>暂无申请记录</p>
+      </li>
+    </ul>
+  </div>
 </template>
 
 <script>
@@ -132,147 +132,147 @@
 </script>
 
 <style lang="scss" scoped>
-    .wrapper {
-        position: relative;
-        width: 100%;
-        height: 100vh;
-        overflow: hidden;
-        background: #fff;
+  .wrapper {
+    position: relative;
+    width: 100%;
+    height: 100vh;
+    overflow: hidden;
+    background: #fff;
 
-        ul {
-            display: flex;
-            flex-direction: column;
-            align-items: center;
-            width: 100%;
-            padding: 24px 0 80px;
-        }
+    ul {
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      width: 100%;
+      padding: 24px 0 80px;
     }
+  }
 
-    .title {
-        width: 343px;
-        line-height: 33px;
-        font-size: 24px;
-        font-weight: 500;
-        color: #333;
-    }
+  .title {
+    width: 343px;
+    line-height: 33px;
+    font-size: 24px;
+    font-weight: 500;
+    color: #333;
+  }
 
-    .list {
-        display: flex;
-        flex-direction: column;
-        align-items: center;
-        width: 343px;
-        margin-top: 24px;
-        border-radius: 4px;
+  .list {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    width: 343px;
+    margin-top: 24px;
+    border-radius: 4px;
 
-        &:nth-of-type(1) {
-            margin-top: 26px;
-        }
+    &:nth-of-type(1) {
+      margin-top: 26px;
+    }
 
-        &.success {
-            background: linear-gradient(90deg, #44403B 0%, #93806B 100%);
-        }
+    &.success {
+      background: linear-gradient(90deg, #44403B 0%, #93806B 100%);
+    }
 
-        &.fail {
-            background: linear-gradient(270deg, #E2E2E2 0%, #C7C7C7 100%);
+    &.fail {
+      background: linear-gradient(270deg, #E2E2E2 0%, #C7C7C7 100%);
 
-            .right-wrap {
-                p:nth-of-type(2) {
+      .right-wrap {
+        p:nth-of-type(2) {
 
-                    span:nth-of-type(2),
-                    span:nth-of-type(3) {
-                        color: #D6BDA1;
-                    }
-                }
-            }
+          span:nth-of-type(2),
+          span:nth-of-type(3) {
+            color: #D6BDA1;
+          }
         }
+      }
     }
+  }
 
-    .top {
-        display: flex;
-        align-items: center;
-        width: 297px;
-        padding: 18px 0 12px;
-        @include border-bottom-1px(#fff);
-    }
+  .top {
+    display: flex;
+    align-items: center;
+    width: 297px;
+    padding: 18px 0 12px;
+    @include border-bottom-1px(#fff);
+  }
 
-    .left-wrap {
-        width: 60px;
-        height: 60px;
-        border-radius: 4px;
-        overflow: hidden;
-        background: pink;
+  .left-wrap {
+    width: 60px;
+    height: 60px;
+    border-radius: 4px;
+    overflow: hidden;
+    background: pink;
 
-        img {
-            display: block;
-            width: 100%;
-        }
+    img {
+      display: block;
+      width: 100%;
     }
+  }
 
-    .right-wrap {
-        margin-left: 18px;
+  .right-wrap {
+    margin-left: 18px;
 
-        p:nth-of-type(1) {
-            line-height: 25px;
-            font-size: 18px;
-            font-weight: 500;
-            color: #fff;
-        }
+    p:nth-of-type(1) {
+      line-height: 25px;
+      font-size: 18px;
+      font-weight: 500;
+      color: #fff;
+    }
 
-        p:nth-of-type(2) {
-            display: flex;
-            align-items: flex-end;
+    p:nth-of-type(2) {
+      display: flex;
+      align-items: flex-end;
 
-            span:nth-of-type(1) {
-                padding-bottom: 5px;
-                line-height: 20px;
-                font-size: 15px;
-                color: #fff;
-            }
+      span:nth-of-type(1) {
+        padding-bottom: 5px;
+        line-height: 20px;
+        font-size: 15px;
+        color: #fff;
+      }
 
-            span:nth-of-type(2) {
-                line-height: 33px;
-                font-size: 24px;
-                font-weight: bold;
-                color: #D6BDA1;
-            }
+      span:nth-of-type(2) {
+        line-height: 33px;
+        font-size: 24px;
+        font-weight: bold;
+        color: #D6BDA1;
+      }
 
-            span:nth-of-type(3) {
-                line-height: 33px;
-                font-size: 15px;
-                font-weight: bold;
-                color: #D6BDA1;
-            }
-        }
+      span:nth-of-type(3) {
+        line-height: 33px;
+        font-size: 15px;
+        font-weight: bold;
+        color: #D6BDA1;
+      }
     }
+  }
 
-    .bottom {
-        display: flex;
-        justify-content: space-between;
-        align-items: center;
-        width: 297px;
-        padding: 11px 0 12px;
+  .bottom {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    width: 297px;
+    padding: 11px 0 12px;
 
-        span {
-            line-height: 20px;
-            font-size: 15px;
-            color: #fff;
-        }
+    span {
+      line-height: 20px;
+      font-size: 15px;
+      color: #fff;
     }
+  }
 
-    .bitmap {
-        img {
-            display: block;
-            width: 168px;
-            height: 168px;
-            margin-top: 81px;
-        }
+  .bitmap {
+    img {
+      display: block;
+      width: 168px;
+      height: 168px;
+      margin-top: 81px;
+    }
 
-        p {
-            line-height: 22px;
-            font-size: 16px;
-            font-weight: 500;
-            text-align: center;
-            color: #333;
-        }
+    p {
+      line-height: 22px;
+      font-size: 16px;
+      font-weight: 500;
+      text-align: center;
+      color: #333;
     }
+  }
 </style>

+ 176 - 2
htmldev/loan/src/views/partner/goods/index.vue

@@ -1,13 +1,187 @@
 <template>
-  <div>goods</div>
+  <div class="better-scroll wrapper" ref="wrapper">
+    <ul>
+      <li class="title">贷款产品</li>
+      <li class="list" v-for="(item, index) in listData" :key="index" @click="funJumpDetail(item)">
+        <p class="name">中行贷</p>
+        <p class="description">最高:20万</p>
+      </li>
+      <li class="bitmap" v-if="!listData.length && booFetchData">
+        <p>暂无申请记录</p>
+      </li>
+    </ul>
+  </div>
 </template>
 
 <script>
+  import BScroll from 'better-scroll'
+  import { Toast } from 'vant'
+  import axios from 'axios'
+
+  const PAGESIZE = 20
   export default {
-    name: 'goods'
+    name: 'goods',
+    props: {
+      tabindex: {
+        type: Number,
+        default: 1
+      }
+    },
+    data () {
+      return {
+        pager: {
+          pagenum: 1,
+          pagesize: PAGESIZE,
+          pagecount: 1
+        },
+        listData: [],
+        scroll: null,
+        numFetchStatus: 0,
+        arrFetchStatus: ['正在加载,请稍后~', '到底了'],
+        booFetchData: false,
+        numPositionY: 0
+      }
+    },
+    activated () {
+      if (!this.$route.meta.isUseCache) {
+        this.pager = {
+          pagenum: 1,
+          pagesize: PAGESIZE,
+          pagecount: 1
+        }
+        this.listData = []
+        this.scroll = null
+        this.numFetchStatus = 0
+        this.booFetchData = false
+        this.numPositionY = 0
+        this.funFetch()
+      } else {
+        this.$nextTick(() => {
+          if (this.scroll) {
+            this.scroll.refresh()
+            this.scroll.scrollTo(0, this.numPositionY)
+          }
+        })
+      }
+    },
+    async mounted () {
+      await this.$nextTick()
+      this.$refreshTitle('进度查询')
+    },
+    methods: {
+      funFetch () {
+        const vm = this
+        axios.post('/', {
+          Page: vm.pager.pagenum,
+          PageSize: vm.pager.pagesize
+        }).then(response => {
+          if (response.Status === 1) {
+            const data = response.Data
+            vm.pager.pagecount = data.pageCount * 1
+            vm.pager.pagenum++
+            vm.booFetchData = true
+            const temp = data.List
+            if (temp.length) {
+              vm.listData = vm.listData.concat(temp)
+              vm.$nextTick(() => {
+                if (!vm.scroll) {
+                  vm.scroll = new BScroll(vm.$refs.wrapper, {
+                    click: true,
+                    pullUpLoad: {
+                      threshold: -20
+                    },
+                    scrollbar: true
+                  })
+                  vm.scroll.on('pullingUp', () => {
+                    if (vm.pager.pagenum > vm.pager.pagecount || vm.pager.pagecount === 0) {
+                      vm.numFetchStatus = 1
+                      return
+                    }
+                    vm.funFetch()
+                  })
+                } else {
+                  vm.scroll.refresh()
+                  vm.scroll.finishPullUp()
+                }
+              })
+            }
+          }
+        }).catch(() => {
+          Toast('失败了')
+        })
+      },
+      funJumpDetail (item) {
+        this.$router.push({ path: '/loan/explain' })
+      }
+    }
   }
 </script>
 
 <style lang="scss" scoped>
+  .wrapper {
+    position: relative;
+    width: 100%;
+    height: 100vh;
+    overflow: hidden;
+    background: #fff;
+
+    ul {
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      width: 100%;
+      padding: 24px 0 80px;
+    }
+  }
 
+  .title {
+    width: 343px;
+    padding-left: 8px;
+    line-height: 33px;
+    font-size: 24px;
+    font-weight: 500;
+    color: #333;
+  }
+
+  .list {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    width: 343px;
+    min-height: 130px;
+    padding-top: 35px;
+    margin-top: 37px;
+    border-radius: 4px;
+    background: #F2F2F2;
+
+    &:nth-of-type(1) {
+      margin-top: 24px;
+    }
+  }
+
+  .name {
+    width: 311px;
+    line-height: 20px;
+    font-size: 15px;
+    font-weight: 500;
+    color: #333;
+  }
+
+  .description {
+    width: 311px;
+    margin-top: 6px;
+    line-height: 20px;
+    font-size: 15px;
+    color: #333;
+  }
+
+  .bitmap {
+    p {
+      line-height: 22px;
+      font-size: 16px;
+      font-weight: 500;
+      text-align: center;
+      color: #333;
+    }
+  }
 </style>

+ 59 - 2
htmldev/loan/src/views/partner/home/index.vue

@@ -1,13 +1,70 @@
 <template>
-  <div>home</div>
+  <div class="wrapper">
+    <keep-alive>
+      <router-view v-if="$route.meta.keepAlive"></router-view>
+    </keep-alive>
+    <router-view v-if="!$route.meta.keepAlive"></router-view>
+    <div class="footer">
+      <router-link class="btn-marketing" :to="{path: '/partner'}">
+        <img src="./image/tab_xiaoshou_nor@2x.png" alt="" v-show="$route.name !== 'Marketing'">
+        <img src="./image/tab_xiaoshou_sel@2x.png" alt="" v-show="$route.name === 'Marketing'">
+        <span>销售</span>
+      </router-link>
+      <router-link class="btn-mine" :to="{path: '/partner/mine'}">
+        <img src="./image/tab_wode_nor@2x.png" alt="" v-show="$route.name !== 'Mine'">
+        <img src="./image/tab_wode_sel@2x.png" alt="" v-show="$route.name === 'Mine'">
+        <span>我的</span>
+      </router-link>
+    </div>
+  </div>
 </template>
 
 <script>
   export default {
-    name: 'home'
+    name: 'home',
+    async mounted () {
+      await this.$nextTick()
+      this.$refreshTitle('销售管理')
+    }
   }
 </script>
 
 <style lang="scss" scoped>
+  .wrapper {
+    width: 100%;
+  }
+
+  .footer {
+    position: fixed;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    z-index: 99;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    width: 100%;
+    background: #fff;
+  }
 
+  .btn-marketing,
+  .btn-mine {
+    flex: 1;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    padding: 4px 0;
+
+    img {
+      width: 29px;
+      height: 28px;
+    }
+
+    span {
+      margin-top: 1px;
+      line-height: 14px;
+      font-size: 10px;
+      color: #999;
+    }
+  }
 </style>

+ 307 - 2
htmldev/loan/src/views/partner/marketing/index.vue

@@ -1,13 +1,318 @@
 <template>
-  <div>marketing</div>
+  <div class="conatainer">
+    <div class="header">
+      <h2 class="title">您好,王名</h2>
+      <router-link :to="{path: '/partner/goods'}">
+        <img src="./image/xiaoshou_bg_tuiguang@2x.png" alt="">
+      </router-link>
+    </div>
+    <p class="my-customer">我的客户</p>
+    <div class="better-scroll wrapper" ref="wrapper">
+      <ul>
+        <li class="list" v-for="(item, index) in listData" :key="index" @click="funJumpDetail(item)">
+          <div class="name-wrap">
+            <div class="avatar">
+              <img src="" alt="">
+            </div>
+            <p class="name">蒋华华</p>
+          </div>
+          <p class="phone">手机号:182762663</p>
+          <div class="loan-info">
+            <p class="label">申请产品:信用贷</p>
+            <p>
+              <span class="label">需求金额:</span>
+              <span class="value">30万元</span>
+            </p>
+          </div>
+          <p class="create-time">申请时间:2020-09-23 9:23</p>
+          <p class="status bg-0" v-if="false">进度:提交资料</p>
+          <p class="status bg-1" v-if="false">成功放款8万</p>
+          <p class="status bg-2" v-if="true">已拒绝放款</p>
+        </li>
+        <li class="bitmap" v-if="!listData.length && booFetchData">
+          <p>暂无记录</p>
+        </li>
+      </ul>
+    </div>
+  </div>
 </template>
 
 <script>
+  import BScroll from 'better-scroll'
+  import { Toast } from 'vant'
+  import axios from 'axios'
+
+  const PAGESIZE = 20
   export default {
-    name: 'marketing'
+    name: 'marketing',
+    data () {
+      return {
+        pager: {
+          pagenum: 1,
+          pagesize: PAGESIZE,
+          pagecount: 1
+        },
+        listData: [1, 2, 3, 4],
+        scroll: null,
+        numFetchStatus: 0,
+        arrFetchStatus: ['正在加载,请稍后~', '到底了'],
+        booFetchData: false,
+        numPositionY: 0
+      }
+    },
+    activated () {
+      if (!this.$route.meta.isUseCache) {
+        this.pager = {
+          pagenum: 1,
+          pagesize: PAGESIZE,
+          pagecount: 1
+        }
+        this.listData = []
+        this.scroll = null
+        this.numFetchStatus = 0
+        this.booFetchData = false
+        this.numPositionY = 0
+        this.funFetch()
+      } else {
+        this.$nextTick(() => {
+          if (this.scroll) {
+            this.scroll.refresh()
+            this.scroll.scrollTo(0, this.numPositionY)
+          }
+        })
+      }
+    },
+    async mounted () {
+      await this.$nextTick()
+      this.$refreshTitle('进度查询')
+    },
+    methods: {
+      funFetch () {
+        const vm = this
+        axios.post('/', {
+          Page: vm.pager.pagenum,
+          PageSize: vm.pager.pagesize
+        }).then(response => {
+          if (response.Status === 1) {
+            const data = response.Data
+            vm.pager.pagecount = data.pageCount * 1
+            vm.pager.pagenum++
+            vm.booFetchData = true
+            const temp = data.List
+            if (temp.length) {
+              vm.listData = vm.listData.concat(temp)
+              vm.$nextTick(() => {
+                if (!vm.scroll) {
+                  vm.scroll = new BScroll(vm.$refs.wrapper, {
+                    click: true,
+                    pullUpLoad: {
+                      threshold: -20
+                    },
+                    scrollbar: true
+                  })
+                  vm.scroll.on('pullingUp', () => {
+                    if (vm.pager.pagenum > vm.pager.pagecount || vm.pager.pagecount === 0) {
+                      vm.numFetchStatus = 1
+                      return
+                    }
+                    vm.funFetch()
+                  })
+                } else {
+                  vm.scroll.refresh()
+                  vm.scroll.finishPullUp()
+                }
+              })
+            }
+          }
+        }).catch(() => {
+          Toast('失败了')
+        })
+      },
+      funJumpDetail (item) {
+        this.$router.push('/loan/detail')
+      }
+    }
   }
 </script>
 
 <style lang="scss" scoped>
+  .conatainer {
+    position: relative;
+    left: 0;
+    top: 0;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    width: 100%;
+  }
+
+  .header {
+    display: flex;
+    flex-direction: column;
+    width: 100%;
+    padding: 24px 0 20px;
+    background: #fff;
+
+    .title {
+      width: 100%;
+      padding-left: 24px;
+      line-height: 33px;
+      font-size: 24px;
+      font-weight: 500;
+      color: #333;
+    }
+
+    img {
+      display: block;
+      width: 343px;
+      height: 88px;
+      margin: 12px 0 0 17px;
+    }
+  }
+
+  .my-customer {
+    width: 100%;
+    padding-left: 24px;
+    margin: 24px 0 16px;
+    line-height: 25px;
+    font-size: 18px;
+    font-weight: 500;
+    color: #333;
+  }
+
+  .wrapper {
+    position: relative;
+    width: 100%;
+    height: calc(100vh - 242px);
+    overflow: hidden;
+
+    ul {
+      width: 100%;
+      padding-bottom: 100px;
+    }
+  }
+
+  .list {
+    position: relative;
+    left: 0;
+    top: 0;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    width: 100%;
+    padding: 19px 0 16px;
+    margin-top: 12px;
+    border-radius: 4px;
+    background: #FFF;
+    box-shadow: 0 2px 0px -1px rgba(224, 224, 224, 0.5);
+
+    &:nth-of-type(1) {
+      margin-top: 0;
+    }
+  }
+
+  .name-wrap {
+    display: flex;
+    align-items: center;
+    width: 331px;
+  }
+
+  .avatar {
+    width: 25px;
+    height: 25px;
+    margin-right: 13px;
+    border-radius: 50%;
+    overflow: hidden;
+    background: pink;
+
+    img {
+      display: block;
+      width: 100%;
+    }
+  }
 
+  .name,
+  .phone {
+    line-height: 20px;
+    font-size: 15px;
+    font-weight: 500;
+    color: #333;
+  }
+
+  .phone {
+    width: 331px;
+    margin-top: 14px;
+  }
+
+  .loan-info {
+    display: flex;
+    align-items: center;
+    width: 331px;
+    margin-top: 7px;
+
+    p {
+      display: flex;
+      align-items: center;
+
+      &:nth-of-type(2) {
+        margin-left: 17px;
+      }
+    }
+
+    .label {
+      line-height: 20px;
+      font-size: 15px;
+      color: #333;
+    }
+
+    .value {
+      line-height: 20px;
+      font-size: 15px;
+      font-weight: 500;
+      color: #EE0A23;
+    }
+  }
+
+  .create-time {
+    width: 331px;
+    margin-top: 7px;
+    line-height: 17px;
+    font-size: 12px;
+    color: #999;
+  }
+
+  .status {
+    position: absolute;
+    right: 16px;
+    top: 16px;
+    z-index: 1;
+    padding: 0 8px;
+    border-radius: 4px;
+    line-height: 22px;
+    font-size: 15px;
+    font-weight: 500;
+    color: #fff;
+
+    &.bg-0 {
+      background: #F39D41;
+    }
+
+    &.bg-1 {
+      background: #53DA6A;
+    }
+
+    &.bg-2 {
+      background: #EE0A23;
+    }
+  }
+
+  .bitmap {
+    p {
+      line-height: 22px;
+      font-size: 16px;
+      font-weight: 500;
+      text-align: center;
+      color: #333;
+    }
+  }
 </style>