repay-detail.vue 7.97 KB
Newer Older
786817560's avatar
786817560 committed
1 2 3 4 5 6 7 8
<!--
 * @Author: your name
 * @Date: 2019-10-31 09:49:57
 * @LastEditTime: 2019-10-31 16:17:39
 * @LastEditors: Please set LastEditors
 * @Description: 合同查询--明细
 * @FilePath:
 -->
24776's avatar
24776 committed
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
<template>
  <h-view id="repay-detail" class="public-style">
    <h-header :proportion="[5,1,1]" class="bar-custom">
      <div slot="left" class="h-header-btn">
        <img src="@/assets/userBind/arrow.png" @click="$routeGo()">
        <span>合同明细</span>
      </div>
    </h-header>

    <h-content class="repay-content">
      <div class="header">
        合同单据
        <div class="download">电子版下载 <img src="@/assets/contractInquire/download.png" alt=""></div>
      </div>
      <list-item :item-height="44" class="invoice">
        <item>
          <div slot="name">合同号</div>
786817560's avatar
786817560 committed
26
          <div slot="content">{{ detailInfo.project_number }}</div>
24776's avatar
24776 committed
27 28 29
        </item>
        <item>
          <div slot="name">经销商</div>
786817560's avatar
786817560 committed
30
          <div slot="content">{{ detailInfo.bp_agent_name }}</div>
24776's avatar
24776 committed
31 32 33
        </item>
        <item>
          <div slot="name">承租人</div>
786817560's avatar
786817560 committed
34
          <div slot="content">{{ detailInfo.bp_name }}</div>
24776's avatar
24776 committed
35 36 37
        </item>
        <item>
          <div slot="name">产品线</div>
786817560's avatar
786817560 committed
38
          <div slot="content">{{ detailInfo.division_n }}</div>
24776's avatar
24776 committed
39 40 41
        </item>
        <item>
          <div slot="name">合同金额</div>
786817560's avatar
786817560 committed
42
          <div slot="content">{{ detailInfo.total_price | currency }}</div>
24776's avatar
24776 committed
43 44 45 46 47 48 49
        </item>
        <item>
          <div slot="name">商务政策</div>
          <div slot="content">零手续费产品</div>
        </item>
        <item>
          <div slot="name">租赁物数量</div>
786817560's avatar
786817560 committed
50
          <div slot="content">{{ detailInfo.product_num }}</div>
24776's avatar
24776 committed
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
        </item>

      </list-item>
      <div class="header">设备清单</div>
      <list-item :item-height="104" class="equipment-list">
        <item v-for="(item,index) in 4" :proportion="[2,1]" :key="index">
          <div slot="name" class="parameters">
            <div class="list">
              <p>参数项</p>
              <span class="bold">JC1213</span>
            </div>
            <div class="list">
              <p>发动机号</p>
              <span>JC12131111</span>
            </div>
            <div class="list">
              <p>厂商型号</p>
              <span>****</span>
            </div>
            <div class="list">
              <p>车牌号</p>
              <span>********</span>
            </div>
          </div>
          <div slot="content">
            <div class="plan" @click="toRepayPlans">
              <img src="@/assets/contractRepayment/plan.png" alt="">
              <span>还款计划</span>
            </div>
          </div>
        </item>
      </list-item>
    </h-content>

  </h-view>
</template>

<script>

export default {
  name: 'RepayDetail',
  components: {
  },
  data () {
    return {
      detailInfo: {},
    }
  },
  computed: {},
  watch: {},
786817560's avatar
786817560 committed
101 102 103 104 105 106 107 108
  beforeRouteEnter (to, from, next) {
    next(vm => {
      if (from.name === 'ContractRecords') {
        vm.detailQuery()
        vm.equipQuery()
      }
    })
  },
24776's avatar
24776 committed
109 110 111 112 113 114 115
  methods: {

    toRepayPlans () {
      this.$router.push({
        name: 'RepayPlans',
      })
    },
786817560's avatar
786817560 committed
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
    detailQuery () {
      let vm = this
      let url = $config.basePath + 'con_contract_detial'
      let param = {
        project_id: vm.$route.params.project_id,
      }
      vm.hlsPopup.showLoading('数据加载中')
      vm.hlsHttp.post(url, param).then(function (res) {
        vm.hlsPopup.hideLoading()
        if (res.result === 'S') {
          vm.detailInfo = res.info
        } else {
          hlsPopup.showLongCenter(res.message)
        }
      })
    },
    equipQuery () {
      let vm = this
      let url = $config.basePath + 'con_equip_list'
      let param = {
        project_id: vm.$route.params.project_id,
      }
      vm.hlsPopup.showLoading('数据加载中')
      vm.hlsHttp.post(url, param).then(function (res) {
        vm.hlsPopup.hideLoading()
        // if (res.result === 'S') {
        //   vm.detailInfo = res.info
        // } else {
        //   hlsPopup.showLongCenter(res.message)
        // }
      })
    },
24776's avatar
24776 committed
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190
  },
}
</script>
<style lang='less' >
#repay-detail {
  .h-header {
    background-color: #1D3FFF;
    .h-header-btn {
      img {
        width: 16px;
        height: 16px;
        margin-left: 4px;
      }

      span {
        font-family: PingFangSC-Semibold;
        margin-left: 16px;
        font-size: 17px;
        letter-spacing: 0.61px;
        line-height: 24px;
      }
    }
  }

  .repay-content {
    .header {
      position: relative;
      height: 40px;
      line-height: 40px;
      font-size: 14px;
      color: #1D3FFF;
      text-indent: 1em;
      border-bottom: 1px solid #F1F0F5;

      .download {
        position: absolute;
        padding-left: 12px;
        right: 12px;
        top: 8px;
        background: #FFFFFF;
        border-radius: 5px;
        height: 24px;
        line-height: 24px;
786817560's avatar
786817560 committed
191
       // width: 93px;
24776's avatar
24776 committed
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319
        font-family: PingFangSC-Regular;
        font-size: 11px;
        color: #1D3FFF;
        letter-spacing: 0.34px;

        img {
          position: absolute;
          height: 15px;
          left: 6px;
          top: 6px;
        }
      }

      &:before {
        content: "";
        position: absolute;
        top: 12px;
        left: 0;
        width: 4px;
        height: 16px;
        background: #1D3FFF;
      }
    }

    .invoice {
      margin-bottom: 0px;

      .hls-item{
        .contents{
          .add-name {
            font-family: PingFangSC-Regular;
            font-size: 14px;
            color: #656464;
          }

          .add-content {
            font-family: PingFangSC-Regular;
            font-size: 14px;
            color: rgba(56,63,69,0.60);
          }
        }
      }
    }

    .equipment-list {
      border-top: none;
      background-color: transparent;

      .hls-item {
        border-top: 1px solid #D9DBDF;
        border-bottom: 1px solid #D9DBDF;
        background-color: #fff;
        margin-bottom: 10px;

        .contents {
          padding-top: 8px;
          .add-name{
            display: flex;
            flex-direction: column;

            .parameters {
              width: 100%;
              margin-left: -40px;

              .list {
                display: flex;
                margin-bottom:0;

                p {
                  font-family: PingFangSC-Regular;
                  font-size: 13px;
                  color: rgba(56,63,69,0.60);
                  letter-spacing: 0.4px;
                  text-align: right;
                  flex: 1;
                }

                span {
                  flex:1;
                  margin-left: 15px;
                  font-family: PingFangSC-Regular;
                  font-size: 13px;
                  color: #383F45;
                  letter-spacing: 0.4px;
                }

                span.bold {
                  font-family: PingFangSC-Semibold;
                  font-weight: 700;
                }
              }
            }
          }

          .add-content {
            .plan {
              position: relative;
              width: 100px;
              height: 30px;
              background: rgba(29, 63, 255,.2);
              border-radius: 4px;

              img {
                height: 14px;
                position: absolute;
                top: 8px;
                left: 12px;
              }

              span {
                font-family: PingFangSC-Regular;
                font-size: 13px;
                color: #1D3FFF;
                letter-spacing: 0.4px;
                position: absolute;
                top: 5px;
                left: 32px;
              }
            }
          }

        }
      }
    }
  }

}
</style>