contract-details.vue 30.9 KB
Newer Older
1
<!--
786817560's avatar
786817560 committed
2 3
 * @Description: 合同详情
 * @Author: your name
4
 * @Date: 2019-09-25 15:38:21
786817560's avatar
786817560 committed
5 6
 * @LastEditTime : 2019-12-26 12:08:42
 * @LastEditors  : Please set LastEditors
7 8
 -->
<template>
9
  <h-view id="details" class="public-style" title="经销商签约">
10
    <h-header :proportion="[5,1,1]" class="bar-custom">
11 12
      <div slot="left" class="h-header-btn" @click="$routeGo()">
        <img src="@/assets/userBind/arrow.png">
13
        <span>签约详情</span>
14 15
      </div>
    </h-header>
16
    <Tab :tabNums="tabNum" @getTabNum="getTabNum" />
786817560's avatar
786817560 committed
17
    <!-- 基本信息 -->
786817560's avatar
786817560 committed
18
    <h-content v-if="tabNum === 0">
786817560's avatar
786817560 committed
19 20

      <!-- 法人信息 -->
786817560's avatar
786817560 committed
21
      <LegalPerson v-if="bp_flag" :baseInfo="baseInfo"/>
786817560's avatar
786817560 committed
22 23

      <!-- 个人信息(自然人) -->
786817560's avatar
786817560 committed
24
      <Personal v-if="!bp_flag" :baseInfo="baseInfo"/>
786817560's avatar
786817560 committed
25

786817560's avatar
786817560 committed
26
      <div class="equipment-list">担保人信息<span v-if="guarantorInfo.length === 0">(无)</span></div>
27
      <list-item v-if="guarantorInfo.length" :item-height="76">
786817560's avatar
786817560 committed
28 29 30 31 32 33 34 35 36 37
        <item v-for="(item,index) in guarantorInfo" :key="index">
          <div slot="name">
            <span class="name-box">{{ index+1 }}</span>
            <span class="name">担保人{{ index+1 }}姓名</span>
            <span class="card-num">证件号</span>
          </div>
          <div slot="content" class="right">
            <img src="@/assets/intoApproval/introduce.png" >
            <span :title="item.bp_name">{{ item.bp_name }}</span>
            <br >
38
            <span>{{ item.bp_class==='NP'? item.id_card_no: item.organization_code }}</span>
786817560's avatar
786817560 committed
39 40 41
          </div>
        </item>
      </list-item>
42

786817560's avatar
786817560 committed
43
      <!-- 联系人 -->
李晓兵's avatar
李晓兵 committed
44 45 46 47 48 49 50 51 52 53 54 55
      <div class="bottom-call-wrap">
        <div class="bottom-call">
          <div class="left">
            <img src="@/assets/distributorSign/call.png" alt="">
          </div>
          <div class="center">
            <p>业务经办:{{ baseInfo.bp_user_id_n }}</p>
            <p>联系电话:{{ baseInfo.agent_phone }}</p>
          </div>
          <div class="right1" @click="callUp(baseInfo.agent_phone)">
            <img src="@/assets/distributorSign/calls.png" alt="">
          </div>
786817560's avatar
786817560 committed
56 57 58 59
        </div>
      </div>
    </h-content>
    <h-content v-if="tabNum === 1">
60 61 62
      <list-item :item-height="44" class="second-part">
        <item>
          <div slot="name" class="font-color">商务政策</div>
786817560's avatar
786817560 committed
63
          <input slot="content" v-model="info.product_plan_id_n" readonly>
64 65 66
        </item>
        <item>
          <div slot="name" class="font-color">设备总价</div>
786817560's avatar
786817560 committed
67
          <span slot="content">{{ info.equip_price * info.product_num | currency }}</span>
68 69 70
        </item>
        <item>
          <div slot="name" class="font-color">融资金额</div>
786817560's avatar
786817560 committed
71
          <span slot="content">{{ info.finance_amount * info.product_num | currency }}</span>
72 73 74
        </item>
        <item>
          <div slot="name" class="font-color">首付款</div>
786817560's avatar
786817560 committed
75
          <span slot="content">{{ info.down_payment * info.product_num | currency }}</span>
76 77 78
        </item>
        <item>
          <div slot="name" class="font-color">保证金比例</div>
786817560's avatar
786817560 committed
79
          <span slot="content">{{ info.deposit_ratio_n }}</span>
80 81 82
        </item>
        <item>
          <div slot="name" class="font-color">保证金</div>
786817560's avatar
786817560 committed
83
          <span slot="content">{{ info.deposit * info.product_num | currency }}</span>
84 85 86
        </item>
        <item>
          <div slot="name" class="font-color">手续费比例</div>
linxin's avatar
linxin committed
87
          <input slot="content" v-model="info.lease_charge_ratio_n" readonly>
88 89 90
        </item>
        <item>
          <div slot="name" class="font-color">手续费</div>
linxin's avatar
linxin committed
91
          <span slot="content">{{ parseFloat(info.lease_charge * info.product_num).toFixed(2) | currency }}</span>
李晓兵's avatar
李晓兵 committed
92 93 94
        </item>
        <item>
          <div slot="name" class="font-color">保险押金</div>
786817560's avatar
786817560 committed
95
          <span slot="content">{{ info.insurance_fee * info.product_num | currency }}</span>
李晓兵's avatar
李晓兵 committed
96 97 98
        </item>
        <item>
          <div slot="name" class="font-color">GPS费用</div>
786817560's avatar
786817560 committed
99
          <span slot="content">{{ info.gps_fee * info.product_num | currency }}</span>
100
        </item>
linxin's avatar
linxin committed
101 102
        <item>
          <div slot="name">首次付款合计</div>
linxin's avatar
linxin committed
103
          <span slot="content">{{ parseFloat(info.first_pay).toFixed(2) | currency }}</span>
linxin's avatar
linxin committed
104
        </item>
105 106
        <item>
          <div slot="name" class="font-color">预计付款日</div>
786817560's avatar
786817560 committed
107
          <span slot="content">{{ dateConverse(info.lease_start_date) }}</span>
108 109 110
        </item>
        <item>
          <div slot="name" class="font-color">还款周期</div>
111
          <input slot="content" v-model="info.annual_pay_times_n" readonly>
112 113 114
        </item>
        <item>
          <div slot="name" class="font-color">租赁期数</div>
786817560's avatar
786817560 committed
115
          <input slot="content" v-model="info.lease_times" readonly>
116 117 118
        </item>
        <item>
          <div slot="name" class="font-color">年利率</div>
786817560's avatar
786817560 committed
119
          <input slot="content" v-model="info.int_rate_n" readonly>
120 121 122
        </item>
      </list-item>
      <div class="repay-plan">
786817560's avatar
786817560 committed
123
        <p @click="repayPlan">查看还款计划</p>
124
      </div>
李晓兵's avatar
李晓兵 committed
125
      <div class="equipment-list-fund">
李晓兵's avatar
李晓兵 committed
126 127
        <span/>
      <p>设备清单</p></div>
128 129
      <list-item :item-height="44" class="second-part">
        <item>
786817560's avatar
786817560 committed
130
          <div slot="name" class="font-color">设备识别号</div>
131
          <input slot="content" v-model="info.product_code" readonly>
132 133
        </item>
        <item>
786817560's avatar
786817560 committed
134
          <div slot="name" class="font-color">产品名称</div>
135
          <input slot="content" v-model="info.product_name" readonly>
136 137 138
        </item>
        <item>
          <div slot="name" class="font-color">产品数量</div>
786817560's avatar
786817560 committed
139
          <input slot="content" v-model="info.product_num" readonly>
140 141
        </item>
      </list-item>
李晓兵's avatar
李晓兵 committed
142 143 144 145 146 147 148 149 150 151 152 153
      <div class="bottom-call-wrap">
        <div class="bottom-call">
          <div class="left">
            <img src="@/assets/distributorSign/call.png" alt="">
          </div>
          <div class="center">
            <p>业务经办:{{ baseInfo.bp_user_id_n }}</p>
            <p>联系电话:{{ baseInfo.agent_phone }}</p>
          </div>
          <div class="right1" @click="callUp(baseInfo.agent_phone)">
            <img src="@/assets/distributorSign/calls.png" alt="">
          </div>
154 155 156
        </div>
      </div>
    </h-content>
786817560's avatar
786817560 committed
157
    <h-content v-if="tabNum === 2">
Jennie Shi's avatar
Jennie Shi committed
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
      <list-item :item-height="56" class="contract-text" style="background-color:rgb(250,250,250);">
        <item v-for="(item,index) in attachArray" :proportion="[7,1]" :key="index+'attach'">
          <div slot="name" class="aguremrnt-list">
            <img src="@/assets/constractSigning/npack.png" alt class="pics" >
            <p class="second first">{{ item.attachment_file }}</p>
            <img
              v-if="item.read_status === 'N'"
              class="unread"
              src="@/assets/constractSigning/unread.png"
            >
            <img
              v-if="item.read_status === 'Y'"
              class="unread"
              src="@/assets/constractSigning/read.png"
            >
            <div
              v-if="item.template_code === 'PRE_ABC_PAYMENT'"
              class="wrap-img"
              @click="entryInfo"
            >
              <img src="@/assets/constractSigning/scan.png" >
            </div>
          </div>
          <div slot="content" class="in-detail" @click="goContent(item,index)">
            <img src="@/assets/constractSigning/detail.png" alt >
          </div>
        </item>
      </list-item>
    </h-content>
    <!-- <h-content v-if="tabNum === 2">
188
      <list-item :item-height="56">
李晓兵's avatar
李晓兵 committed
189
        <item :proportion="[7,1]">
190
          <div slot="name" class="aguremrnt-list">
786817560's avatar
786817560 committed
191
            <img src="@/assets/distributorSign/gray.png" alt="" class="pics">
192
            <p class="second">经销商担保协议</p>
786817560's avatar
786817560 committed
193
            <img :src="agentPic" alt="" class="read">
194
          </div>
786817560's avatar
786817560 committed
195
          <div slot="content" class="in-detail" @click="goContractContent('经销商担保协议')"><img src="@/assets/constractSigning/detail.png" alt=""></div>
196 197
        </item>
      </list-item>
786817560's avatar
786817560 committed
198

Jennie Shi's avatar
Jennie Shi committed
199
    </h-content> -->
李晓兵's avatar
李晓兵 committed
200 201 202
    <bottom-tab v-if="confirm_status!=='APPROVED'" class="add-box">
      <tab-button class="before" @click.native="takePhonto">
        <img src="@/assets/constractSigning/certification.png" >认证
786817560's avatar
786817560 committed
203
      </tab-button>
李晓兵's avatar
李晓兵 committed
204 205
      <tab-button class="next" @click.native="contractConfirm()">
        <img src="@/assets/intoApproval/approve.png" >确认签约
206 207
      </tab-button>
    </bottom-tab>
linxin's avatar
linxin committed
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
    <h-modal
      v-if="confirm_status!=='APPROVED'"
      ref="modal"
      v-model="showModalValue"
      position="bottom"
      cus-class="sign-modal"
    >
      <h-view>
        <h-content class="approveContent">
          <div class="approveBottom">
            <span>
              审批意见
              <img src="@/assets/intoApproval/close1.png" @click="showModalValue=false" >
            </span>
            <textarea v-model="confirm_note" cols="8" rows="20" placeholder="请输入" />
          </div>
        </h-content>
        <bottom-tab>
          <tab-button class="reject" @click.native="showModalValue=true;charge('拒绝','REJECTED')">
            <img src="@/assets/intoApproval/reject.png" >拒绝
          </tab-button>
          <tab-button class="same" @click.native="showModalValue=true;charge('同意','APPROVED')">
            <img src="@/assets/intoApproval/approve.png" >同意
          </tab-button>
        </bottom-tab>
      </h-view>
    </h-modal>
李晓兵's avatar
李晓兵 committed
235
    <!--活体检测-->
JingChao's avatar
JingChao committed
236
    <body-check ref="body" :check_id="$route.params.check_id" :confirm_id="confirm_id"/>
237 238 239 240
  </h-view>
</template>

<script>
786817560's avatar
786817560 committed
241
import Tab from '@/pages/distributorSign/details-tab'
786817560's avatar
786817560 committed
242 243
import LegalPerson from '@/pages/distributorSign/legal-person'
import Personal from '@/pages/distributorSign/personal'
李晓兵's avatar
李晓兵 committed
244
import bodyCheck from './body-check'
245 246 247 248
export default {
  name: 'ContractDetails',
  components: {
    Tab,
786817560's avatar
786817560 committed
249 250
    Personal,
    LegalPerson,
李晓兵's avatar
李晓兵 committed
251
    bodyCheck,
252 253 254
  },
  data () {
    return {
255
      showModalValue: false,
256
      info: {}, // 租赁信息
257
      tabNum: 0,
Jennie Shi's avatar
Jennie Shi committed
258
      num: 0,
259 260
      baseInfo: {}, // 基本信息
      project_id: '',
786817560's avatar
786817560 committed
261
      bp_flag: false,
262
      guarantorInfo: [], // 担保人信息
Jennie Shi's avatar
Jennie Shi committed
263
      attachArray: [], // 附件数组
264 265
      bp_class: '', // 商业伙伴类型
      confirm_status: '', // 签约状态
786817560's avatar
786817560 committed
266
      faceListUpload: [], // 自拍照上传
267 268
      confirm_note: '', // 审批意见
      confirm_id: '',
786817560's avatar
786817560 committed
269 270 271
      agentPic: '', // 经销商担保协议图片
      readed: require('@/assets/constractSigning/read.png'), // 已读
      unRead: require('@/assets/constractSigning/unread.png'), // 未读
李晓兵's avatar
李晓兵 committed
272
      signCheckFlag: false, // 签约校验,为true已认证通过可进行签约,否则不可签约
273 274 275
    }
  },
  computed: {},
276
  watch: {
李晓兵's avatar
李晓兵 committed
277 278 279
    $route (to, from) {
      hlsPopup.hideConfirm()
    },
786817560's avatar
786817560 committed
280 281 282
    bp_class () {
      if (this.bp_class === 'NP') {
        this.bp_flag = false
786817560's avatar
786817560 committed
283
        // this.getBseMsg()
786817560's avatar
786817560 committed
284 285 286 287
      } else {
        this.bp_flag = true
      }
    },
288
  },
786817560's avatar
786817560 committed
289 290
  beforeRouteEnter (to, from, next) {
    next(vm => {
291
      if (from.name === 'ContractList') {
linxin's avatar
linxin committed
292
        vm.$refs.body.hideBody()
293 294 295 296
        vm.tabNum = 0
        vm.baseInfo = {}
        vm.info = {}
        vm.bp_flag = false
李晓兵's avatar
李晓兵 committed
297
        vm.signCheckFlag = false
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315
        vm.guarantorInfo = []
        vm.faceListUpload = []
        vm.confirm_note = ''
        vm.bp_class = vm.$route.params.item.bp_class
        vm.project_id = vm.$route.params.item.project_id
        vm.confirm_id = vm.$route.params.item.confirm_id
        vm.confirm_status = vm.$route.params.item.confirm_status
        vm.agentPic = vm.unRead
        if (vm.bp_class === 'NP') {
          vm.bp_flag = false
          vm.getBseMsg()
          vm.getGuarantor()
        } else {
          vm.bp_flag = true
          vm.getBseMsg()
          vm.getGuarantor()
        }
        vm.getLease()
Jennie Shi's avatar
Jennie Shi committed
316
        vm.getAttachment()
317
      } else if (from.name === 'ContractContent') {
786817560's avatar
786817560 committed
318 319 320 321 322
        vm.tabNum = 2
        vm.agentPic = vm.readed
      }
    })
  },
323
  created () {},
李晓兵's avatar
李晓兵 committed
324
  methods: {
linxin's avatar
linxin committed
325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348
    // 跳转银行信息录入
    // entryInfo () {
    //   let idCard = ''
    //   if (this.baseInfo.auth_flag) {
    //     this.baseInfo.auth_flag === '是'
    //       ? (idCard = this.baseInfo.auth_person_id_card)
    //       : this.baseInfo.id_card_no
    //     console.log(',,,,,,,,,,,', idCard)
    //   } else {
    //     idCard = this.baseInfo.id_card_no
    //   }
    //   this.$router.push({
    //     name: 'EntryInfo',
    //     params: {
    //       id_card_no: idCard,
    //       bp_name: this.bp_name,
    //       project_id: this.project_id,
    //       confirm_status: this.con_confirm_status,
    //       entry_info_flag: this.entry_info_flag,
    //       user_bp_type: this.user_bp_type,
    //       bp_id: this.baseInfo.bp_id,
    //     },
    //   })
    // },
linxin's avatar
linxin committed
349 350 351 352 353 354 355 356 357 358 359 360 361
    charge (val, status) {
      let vm = this
      this.hlsPopup.showConfirm({
        title: '提示',
        content: `您确认${val}吗?`,
        onConfirm: data => {
          if (data) {
            // 需要先校验是否认证通过
            vm.issure(status)
          }
        },
      })
    },
Jennie Shi's avatar
Jennie Shi committed
362 363 364 365 366 367 368
    // 合同文本详情附件查询
    getAttachment () {
      let vm = this
      let url = process.env.basePath + 'get_content_app'
      let param = {
        confirm_id: vm.confirm_id,
        data_class: 'PRJ_PREVIEW',
369
        bp_id: JSON.parse(window.localStorage.getItem('now_user_bp_bind_id')).bp_id,
Jennie Shi's avatar
Jennie Shi committed
370 371 372 373 374 375 376 377 378 379 380
      }
      hlsPopup.showLoading('请稍候')
      vm.hlsHttp.post(url, param).then(res => {
        hlsPopup.hideLoading()
        if (res.result === 'S') {
          vm.attachArray = res.attachments
        } else {
          vm.hlsPopup.showLongCenter(res.message)
        }
      })
    },
李晓兵's avatar
李晓兵 committed
381
    // 签约校验
李晓兵's avatar
李晓兵 committed
382
    async signCheck () {
李晓兵's avatar
李晓兵 committed
383 384 385 386
      let vm = this
      let url = process.env.basePath + 'sign_check'
      let param = {
        confirm_id: vm.confirm_id,
李晓兵's avatar
李晓兵 committed
387 388
        data_class: 'PRJ_PROJECT',
      }
Jennie Shi's avatar
Jennie Shi committed
389
      vm.hlsPopup.showLoading('请稍候!')
李晓兵's avatar
李晓兵 committed
390
      let res = await vm.hlsHttp.post(url, param)
李晓兵's avatar
李晓兵 committed
391 392 393 394
      vm.hlsPopup.hideLoading()
      if (res.result === 'S') {
        return true
      } else {
linxin's avatar
linxin committed
395 396
        vm.hlsPopup.showLongCenter(res.message)
        return false
李晓兵's avatar
李晓兵 committed
397 398
      }
    },
JingChao's avatar
JingChao committed
399
    goBodyCheck () { // 活体检测
李晓兵's avatar
李晓兵 committed
400
      this.$refs.body.show()
JingChao's avatar
JingChao committed
401
      /* this.$router.push({
李晓兵's avatar
李晓兵 committed
402 403 404 405 406
        name: 'BodyCheck',
        params: {
          check_id: this.$route.params.check_id,
          confirm_id: confirm_id,
        },
JingChao's avatar
JingChao committed
407
      }) */
李晓兵's avatar
李晓兵 committed
408 409
    },
    /*  goElectronicSign () { // 电子签
786817560's avatar
786817560 committed
410 411 412 413 414 415
     let vm = this
     let url = process.env.basePath + 'get_sign_url'
     let param = {
       confirm_id: vm.confirm_id,
       data_class: 'PRJ_PROJECT',
     }
Jennie Shi's avatar
Jennie Shi committed
416
     vm.hlsPopup.showLoading('请稍候')
786817560's avatar
786817560 committed
417 418 419 420 421 422 423 424 425 426 427 428 429
     vm.hlsHttp.post(url, param).then(function (res) {
       vm.hlsPopup.hideLoading()
       if (res.info.msg === 'success') {
         vm.$router.push({
           name: 'ElectronicSign',
           params: {
             url: res.info.data.url,
           },
         })
       } else {
         vm.hlsPopup.showLongCenter(res.info.msg)
       }
     })
李晓兵's avatar
李晓兵 committed
430 431
   }, */
    // 签约确认
李晓兵's avatar
李晓兵 committed
432
    async contractConfirm () {
李晓兵's avatar
李晓兵 committed
433
      let vm = this
李晓兵's avatar
李晓兵 committed
434 435
      let flag = await this.signCheck()
      if (flag) { // 只有认证通过后方可进行签约操作
linxin's avatar
linxin committed
436
        this.showModalValue = true // 审批内容框显示
李晓兵's avatar
李晓兵 committed
437 438
      }
    },
Jennie Shi's avatar
Jennie Shi committed
439 440 441 442 443 444 445 446 447 448 449
    async goContent (item, index) {
      // 详情
      // 合同状态更新保存
      let vm = this
      vm.attachFlag = true
      vm.attachUrl = item.attachment_file_path
      let url = process.env.basePath + 'prj_content_status_save'
      let param = {
        master: {
          content_id: item.content_id,
          read_status: 'Y',
450
          bp_id: JSON.parse(window.localStorage.getItem('now_user_bp_bind_id')).bp_id,
Jennie Shi's avatar
Jennie Shi committed
451 452 453 454 455 456 457 458 459 460 461 462
        },
      }
      hlsPopup.showLoading('请稍候')
      let res = await vm.hlsHttp.post(url, param)
      hlsPopup.hideLoading()
      if (res.result === 'S') {
        let temp = vm.attachArray[index]
        temp.read_status = 'Y'
        vm.$router.push({
          name: 'previewPdf',
          params: { attachUrl: vm.attachUrl },
        })
linxin's avatar
linxin committed
463
        vm.attachArray.splice(index, 1, temp)
Jennie Shi's avatar
Jennie Shi committed
464 465 466 467
      } else {
        vm.hlsPopup.showLongCenter(res.message)
      }
    },
李晓兵's avatar
李晓兵 committed
468 469
    takePhonto () {
      let vm = this
李晓兵's avatar
李晓兵 committed
470
      hlsPopup.showConfirm({
李晓兵's avatar
李晓兵 committed
471
        title: '提示',
李晓兵's avatar
李晓兵 committed
472 473 474 475 476 477 478
        content: '请自拍一张',
        onConfirm: function (index) {
          if (index === 1) {
            vm.takePhontoOpenCamera()
          } else {

          }
李晓兵's avatar
李晓兵 committed
479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539
        },
      })
    },
    // 打开相机自拍
    takePhontoOpenCamera () {
      let vm = this
      vm.faceListUpload = []
      let obj = {
        'pkvalue': vm.$route.params.check_id,
        'source_type': 'PRJ_CDD_ITEM_CHECK',
        'picture': '',
        'filePath': '',
        'attachment_id': '',
        'user_id': 1,
        'fileName': 'face',
      }
      let cameraoptions = {
        quality: 100,
        cameraDirection: 1,
      }
      let success = function (imgdata) {
        obj.filePath = imgdata
        vm.confirmContractSign(imgdata)
        vm.faceListUpload.push(obj)
      }
      let error = function () {
        hlsPopup.showLongCenter('请拍照')
      }
      hlsUtil.openCamera(cameraoptions, success, error)
    },
    // 执行同意的逻辑(查询对应的身份证正面图片->人脸识别->确认签约)
    async confirmContractSign (faceImg) {
      let idCardImgUrl = await this.idCardImgUrlGet()
      if (idCardImgUrl) {
        this.faceIdentify(faceImg, idCardImgUrl)
      }
    },
    // 获取身份证照片
    async idCardImgUrlGet () {
      let vm = this
      let url = $config.basePath + 'prj_id_card_query'
      let param = {
        confirm_id: vm.confirm_id,
      }
      hlsPopup.showLoading('请稍候')
      let res = await vm.$post(url, param)
      hlsPopup.hideLoading()
      if (res.result === 'S' && res.info) {
        let cardUrl = process.env.filePath + 'attachment_id=' + res.info.attachment_id + '&access_token=' + window.localStorage.access_token
        return cardUrl
      } else if (res.result === 'S' && !res.info) {
        hlsPopup.showLongCenter('未找到身份证照片')
        return null
      } else {
        hlsPopup.showLongCenter(res.message)
        return null
      }
    },
    // 人脸比对
    faceIdentify (faceImg, idCardImgUrl) {
      let vm = this
JingChao's avatar
JingChao committed
540
      let obj = {
李晓兵's avatar
李晓兵 committed
541 542 543
        'fileUrl': faceImg,
        'idCardImgUrl': idCardImgUrl,
      }
JingChao's avatar
JingChao committed
544
      vm.hlsPopup.showLoading('正在比对')
李晓兵's avatar
李晓兵 committed
545
      let url = process.env.ocrPath + '/baidu/ocr/face'
JingChao's avatar
JingChao committed
546 547
      vm.hlsUtil.baiduOcrFace(obj, url, function (res) {
        vm.hlsPopup.hideLoading()
linxin's avatar
linxin committed
548
        if (res.success && res.result.result.score) {
李晓兵's avatar
李晓兵 committed
549 550
          vm.save_picture(vm.faceListUpload)
          let identifyScore = res.result.result.score.toFixed(0)
Jennie Shi's avatar
Jennie Shi committed
551 552 553 554 555
          if (identifyScore >= 50) {
            vm.hlsPopup.showPopup({
              title: '提示',
              content: `识别分数为${identifyScore},请进行活体检测`,
              onConfirm: () => {
李晓兵's avatar
李晓兵 committed
556
              // 进入活体检测页面
Jennie Shi's avatar
Jennie Shi committed
557 558 559 560 561 562
                vm.goBodyCheck()
              },
            })
          } else {
            vm.hlsPopup.showLongCenter('比对失败,请保证和绑定时是同一个人')
          }
李晓兵's avatar
李晓兵 committed
563
        } else {
JingChao's avatar
JingChao committed
564
          vm.hlsPopup.showLongCenter('比对失败,请保证和绑定时是同一个人')
李晓兵's avatar
李晓兵 committed
565
        }
JingChao's avatar
JingChao committed
566
      })
李晓兵's avatar
李晓兵 committed
567
    },
786817560's avatar
786817560 committed
568

李晓兵's avatar
李晓兵 committed
569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604
    // 确认逻辑
    issure (status) {
      let vm = this
      let url = process.env.basePath + 'do_confrim_bp'
      let param = {
        'master': {
          confirm_id: vm.confirm_id,
          confirm_status: status,
          confirm_note: vm.confirm_note,
        },
      }
      vm.hlsPopup.showLoading('提交数据中!')
      vm.hlsHttp.post(url, param).then(function (res) {
        vm.hlsPopup.hideLoading()
        if (res.result === 'S') {
          vm.save_picture(vm.faceListUpload)
          vm.hlsPopup.showSuccess('签约成功')
          window.localStorage.setItem('backflag', true)
          vm.$routeGo()
        } else {
          vm.hlsPopup.showSuccess(res.message)
        }
      })
    },
    // 图片保存
    save_picture (list) {
      // alert('list' + JSON.stringify(list))
      let vm = this
      if (list.length) {
        // hlsPopup.showLoading('图片上传请稍候')
        var alreadyUploadNum = 0
        var attLength = 0
        var recordUploadInterval = setInterval(function () {
          if (alreadyUploadNum === attLength) {
            clearInterval(recordUploadInterval)
            /* hlsPopup.hideLoading()
786817560's avatar
786817560 committed
605
            hlsPopup.showLongCenter('图片上传成功') */
李晓兵's avatar
李晓兵 committed
606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654
          }
        }, 500)
        for (var i = 0; i < list.length; i++) {
          let uploadSuccess = function (res) {
            if (res.result === 'S') {
              alreadyUploadNum++
              for (var j = 0; j < list.length; j++) {
                if (list[j].filePath === res.response.filePath) {
                  list[j].attachment_id = res.response.attachment_id
                  vm.faceListUpload.push(list[j])
                  // alert('faceListUpload' + JSON.stringify(vm.faceListUpload))
                  break
                }
              }
            } else {
              hlsPopup.hideLoading()
            }
          }
          if (!list[i].attachment_id) {
            attLength++
            hlsUtil.fileUploadSvc(list[i], uploadSuccess)
          }
        }
      } else {
        hlsPopup.hideLoading()
      }
    },
    // 基本信息
    getBseMsg () {
      let vm = this
      let url = ''
      let url1 = $config.basePath + 'prj_np_info_query'
      let url2 = $config.basePath + 'prj_org_info_query'
      vm.bp_class === 'NP' ? url = url1 : url = url2
      let param = {
        project_id: vm.project_id,
      }
      vm.hlsPopup.showLoading('数据加载中')
      vm.hlsHttp.post(url, param).then(function (res) {
        vm.hlsPopup.hideLoading()
        if (res.result === 'S') {
          //  vm.lists = res.lists
          vm.baseInfo = res.info
          if (res.info.auth_flag) {
            window.localStorage.setItem('auth_flag', res.info.auth_flag)
          }
        }
      })
    },
786817560's avatar
786817560 committed
655

李晓兵's avatar
李晓兵 committed
656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713
    // 担保人
    getGuarantor () {
      let vm = this
      let url = $config.basePath + 'prj_guarantor_list_query'
      let param = {
        project_id: vm.project_id,
      }
      vm.hlsPopup.showLoading('数据加载中')
      vm.hlsHttp.post(url, param).then(function (res) {
        vm.hlsPopup.hideLoading()
        if (res.result === 'S') {
          vm.guarantorInfo = res.lists
        }
      })
    },
    getLease () {
      let vm = this
      let url = $config.basePath + 'prj_lease_query'
      let param = {
        project_id: vm.project_id,
      }
      // 租赁信息
      vm.hlsPopup.showLoading('数据加载中')
      vm.hlsHttp.post(url, param).then(function (res) {
        vm.hlsPopup.hideLoading()
        if (res.result === 'S') {
          vm.info = res.info
        }
      })
    },
    getTabNum (i) {
      this.tabNum = i
    },
    dateConverse (date) {
      return date.replace(/\//g, '-')
    },
    callUp (phonenumber) {
      window.open('tel:' + phonenumber)
    },
    // 跳转合同详情
    goContractContent (name) {
      this.$router.push({
        name: 'ContractContent',
        params: {
          name,
        },
      })
    },
    repayPlan () {
      this.$router.push({
        name: 'FinancDetails',
        params: {
          project_id: this.project_id,
          product_num: this.info.product_num,
        },
      })
    },
  },
714 715
}
</script>
716
<style lang='less'>
717 718 719 720 721 722 723 724 725 726 727 728 729 730 731
#details {
    .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;
      }
}
786817560's avatar
786817560 committed
732 733 734 735 736 737 738 739 740 741 742
.in-detail{
          background-color: rgba(0,70,156,0.08);
          width: 48px;
          height: 56px;
          text-align: center;
          line-height: 65px;

          img{
              width: 16px;
          }
      }
786817560's avatar
786817560 committed
743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773
.name-box {
      display: inline-block;
      text-align: center;
      line-height: 16px;
      color: #00469c;
      width: 16px;
      height: 16px;
      background: #cddbec;
      border-radius: 4px;
    }
    .name {
      font-family: PingFangSC-Regular;
      font-size: 14px;
      color: #383f45;
      letter-spacing: 0;
      margin-left: 10px;
    }
    .card-num {
      font-family: PingFangSC-Regular;
      font-size: 14px;
      color: #383f45;
      letter-spacing: 0;
      display: block;
      margin-left: 31px;
      margin-top: 7px;
    }
    .right {
      position: relative;
    }
    .right span {
      float: right;
786817560's avatar
786817560 committed
774 775
      margin-right: 48px;
      display: block;
786817560's avatar
786817560 committed
776 777 778 779 780
      font-family: PingFangSC-Regular;
      font-size: 14px;
      color: rgba(56, 63, 69, 0.6);
      letter-spacing: 0;
      line-height: 18px;
786817560's avatar
786817560 committed
781 782 783 784 785
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      width: 150px;
      margin-top: -10px;
786
      text-align: right
786817560's avatar
786817560 committed
787 788 789 790 791 792 793
    }
    .right span:last-child {
      margin-top: 7px;
    }
    .right img {
      position: absolute;
      top: 30%;
786817560's avatar
786817560 committed
794
      left: 88%;
786817560's avatar
786817560 committed
795 796 797
      width: 14px;
      height: 16px;
    }
798 799 800 801 802 803 804 805 806
.font-color {
    font-family: PingFangSC-Regular;
    font-size: 14px;
    color: #656464;
    letter-spacing: 0;
}
.repay-plan {
    height: 44px;
    width: 100%;
李晓兵's avatar
李晓兵 committed
807
  margin-top: -10px;
李晓兵's avatar
李晓兵 committed
808 809
   // background: rgba(0,70,156,0.03);
  background: #F2F2F2;
810 811 812 813 814 815 816 817 818 819 820 821 822
    p {
        font-family: PingFangSC-Semibold;
        font-size: 14px;
        color: #00469C;
        letter-spacing: 0;
        height: 44px;
        width: 84px;
        line-height: 44px;
        font-weight: bold;
        text-decoration: underline;
        margin-left: 16px;
    }
}
李晓兵's avatar
李晓兵 committed
823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842
  .equipment-list-fund{
    height: 40px;
    line-height: 40px;
    background-color: #fafafa;
    display: flex;
    align-items: center;
    color: #00469c;
    font-size: 15px;
    //margin-left: 16px;
    position: relative;
    margin-top: -10px;
    span{
      width: 4px;
      height: 20px;
      background: #00469c;
    }
    p{
      padding-left: 10px;
    }
  }
843 844 845 846
.equipment-list {
      height: 40px;
      line-height: 40px;
      background-color: #fafafa;
李晓兵's avatar
李晓兵 committed
847 848
      display: flex;
      align-items: center;
849 850 851 852
      color: #00469c;
      font-size: 15px;
      margin-left: 16px;
      position: relative;
786817560's avatar
786817560 committed
853
      margin-top: -10px;
854 855 856 857 858 859 860 861 862 863
}
.equipment-list::before {
      content: "";
      display: block;
      width: 4px;
      height: 20px;
      background-color: #00469c;
      position: absolute;
      left: -15px;
      top: 10px;
786817560's avatar
786817560 committed
864 865 866
}
.equipment-list:nth-of-type(3) {
  margin-top: 0
867 868 869 870 871 872 873 874 875 876
}
    // .left {
    //     width: 60px;
    //     height: 60px;
    //     background: rgba(0,70,156,0.03);
    //     margin-left: -15px;
    //     display: flex;
    //     justify-content: center;
    //     align-items: center
    // }
李晓兵's avatar
李晓兵 committed
877 878 879 880 881 882 883 884 885
.bottom-call-wrap{
  width: 100%;
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: #ffffff;
  margin-top: -10px;
  .bottom-call {
李晓兵's avatar
李晓兵 committed
886
    margin-top: 10px;
李晓兵's avatar
李晓兵 committed
887
   width: 100%;
李晓兵's avatar
李晓兵 committed
888
    height: 58%;
李晓兵's avatar
李晓兵 committed
889 890 891
    display: flex;
    justify-content: center;
    align-items: center;
892
    .left {
李晓兵's avatar
李晓兵 committed
893 894 895
      width: 16%;
      height: 60px;
      // background: rgba(0,70,156,0.03);
李晓兵's avatar
李晓兵 committed
896
      background: #F2F2F2;
李晓兵's avatar
李晓兵 committed
897 898 899
      display: flex;
      justify-content: center;
      align-items: center
900 901
    }
    .center {
李晓兵's avatar
李晓兵 committed
902 903 904 905
      height: 100%;
      width: 66%;
      margin-left: 2px;
      // background: rgba(0,70,156,0.03);
李晓兵's avatar
李晓兵 committed
906
      background: #F2F2F2;
李晓兵's avatar
李晓兵 committed
907 908 909 910 911 912 913 914 915
      p {
        height: 30px;
        line-height: 30px;
        margin-left: 10px;
        font-family: PingFangSC-Regular;
        font-size: 14px;
        color: #656464;
        letter-spacing: 0.43px;
      }
916
    }
786817560's avatar
786817560 committed
917
    .right1 {
李晓兵's avatar
李晓兵 committed
918 919 920
      height: 100%;
      width: 16%;
      //background: rgba(0,70,156,0.20);
李晓兵's avatar
李晓兵 committed
921
      background: #CCCCCC;
李晓兵's avatar
李晓兵 committed
922 923 924
      display: flex;
      justify-content: center;
      align-items: center
925
    }
李晓兵's avatar
李晓兵 committed
926
  }
927 928 929
}
.aguremrnt-list {
    display: flex;
Jennie Shi's avatar
Jennie Shi committed
930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954
    display: -webkit-flex;
    align-items: center;
    -webkit-align-items: center;
    width: 100%;
    height: 100%;
    .unread {
      width: 34px;
      height: 20px;
      margin: 0 10px;
    }
    .wrap-img {
      width: 12%;
      height: 100%;
      display: flex;
      display: -webkit-flex;
      align-items: center;
      -webkit-align-items: center;
      justify-content: center;
      -webkit-justify-content:center;
      background: rgb(254, 251, 233);
      img {
        width: 22px;
        height: 20px;
      }
    }
955
    .pic {
Jennie Shi's avatar
Jennie Shi committed
956
      margin-left: -3px;
957
    }
Jennie Shi's avatar
Jennie Shi committed
958

959
    .pics {
Jennie Shi's avatar
Jennie Shi committed
960 961 962 963
      //    width: 21px;
      height: 30px;
    }

964
    .read {
Jennie Shi's avatar
Jennie Shi committed
965 966 967
      height: 16px;
      margin-top: 8px;
      margin-left: 6px;
968
    }
Jennie Shi's avatar
Jennie Shi committed
969

970
    .second {
Jennie Shi's avatar
Jennie Shi committed
971 972 973 974 975 976 977
      // height: 32px;
      // line-height: 32px;
      font-family: PingFangSC-Regular;
      font-size: 14px;
      margin-left: 16px;
      color: #383f45;
      letter-spacing: 0.43px;
978
    }
Jennie Shi's avatar
Jennie Shi committed
979

980
    .first {
Jennie Shi's avatar
Jennie Shi committed
981 982
      margin-left: 13px;
      width: 60%;
983
    }
Jennie Shi's avatar
Jennie Shi committed
984 985
  }

986 987 988 989
  .footer-button {
    .approve {
      width: 358.6px;
      height: 44px;
990
      background: @headerColor;
991 992 993 994 995
      border-radius: 4px;
      color: #fff;
      font-family: PingFangSC-Semibold;
      font-size: 15px;
      line-height: 20px;
786817560's avatar
786817560 committed
996
      //letter-spacing: 10px;
997 998 999 1000 1001 1002
      img {
        width: 16.8px;
        height: 16.8px;
      }
    }
  }
786817560's avatar
786817560 committed
1003
  .footer-button:nth-of-type(1) {
李晓兵's avatar
李晓兵 committed
1004
    //bottom: 92px;
786817560's avatar
786817560 committed
1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028
    .approve {
      width: 358.6px;
      height: 44px;
      background: @headerColor;
      border-radius: 4px;
      color: #fff;
      font-family: PingFangSC-Semibold;
      font-size: 15px;
      line-height: 20px;
    }
  }
  .footer-button:nth-of-type(2) {
    bottom: 46px;
    .approve {
      width: 358.6px;
      height: 44px;
      background: @headerColor;
      border-radius: 4px;
      color: #fff;
      font-family: PingFangSC-Semibold;
      font-size: 15px;
      line-height: 20px;
    }
  }
1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089
  .approveContent {
    position: absolute;
    top: 50%;
    background-color: #fafafa;
    overflow-y: scroll;
  }
  .approveBottom {
    width: 343px;
    margin: 0 auto;
    span {
      display: block;
      width: 100%;
      font-family: PingFangSC-Semibold;
      font-size: 15px;
      color: #00469c;
      height: 21px;
      line-height: 21px;
      margin: 16px 0;
      img {
        float: right;
      }
    }
    textarea {
      width: 343px;
      height: 178px;
      border-radius: 2px;
      padding: 10px;
    }
    span::after {
      content: "";
      display: block;
      position: relative;
      left: 70px;
      top: -17px;
      width: 14px;
      height: 14px;
      background: url("../../assets/intoApproval/approv.png");
      background-size: 14px 14px;
    }
  }
  .reject,
  .same {
    width: 175px;
    height: 40px;
    border-radius: 4px;
    font-family: PingFangSC-Semibold;
    font-size: 15px;
    img {
      width: 13px;
      height: 13px;
    }
  }
  .reject {
    color: #656464;
    border: 1px solid #656464;
  }
  .same {
    color: #ffffff;
    background: #00469c;
    border: 1px solid #00469c;
  }
李晓兵's avatar
李晓兵 committed
1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107
  .add-box {
    .before {
      border: 1px solid #fdb62f;
      border-radius: 4px;
      color: #fdb62f;
      img{
        width: 18px;
      }
    }
    .next {
      background: #1d3fff;
      border-radius: 4px;
      color: #fff;
      img{
        width: 18px;
      }
    }
  }
1108 1109 1110
}
.modal {
  background-color: rgba(0, 0, 0, 0) !important;
1111 1112
}
</style>