Commit 454980de authored by Tyh's avatar Tyh

'tyh'

parent 2adc4c9f
Pipeline #4851 canceled with stages
{
"presets": [
["env", {
"modules": false
}],
"stage-2"
],
"plugins": ["transform-runtime"]
}
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
build/
config/
static/
test/
dist/
src/assets/
src/libs/
!src/data/config/
// https://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint'
},
// 指定环境
env: {
browser: true,
node: true,
jest: true,
es6: true,
},
// 全局变量
"globals": {
navigator: false,
cordova: false,
HandBridge: false,
process: true,
$config: true,
JMessagePlugin:true,
vum:true,
hlsPopup:true,
hlsHttp:true,
hlsUtil:true,
wx:true
},
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
extends: ['plugin:vue/recommended', 'standard'],
// required to lint *.vue files
plugins: ['vue', 'import'],
// check if imports actually resolve
settings: {
'import/resolver': {
webpack: {
config: 'build/webpack.base.conf.js'
}
}
},
// add your custom rules here
// "off" 或 0 - 关闭规则
// "warn" 或 1 - 开启规则,使用警告级别的错误:warn (不会导致程序退出)
// "error" 或 2 - 开启规则,使用错误级别的错误:error (当被触发的时候,程序会退出)
rules: {
// 以下为自定义的 javascript 规则:
// 箭头函数当只有一个参数时允许省略圆括号
'arrow-parens': 0,
// 允许生成器
'generator-star-spacing': 0,
// 对象和数组结尾强制分号
"comma-dangle": [2, {
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "ignore",
}],
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
"no-array-constructor": 0,
"no-irregular-whitespace": 0,
"no-new-wrappers": 0,
"no-alert": 0,
"no-eq-null": 2,
// 以下为自定义的 plugin-vue 规则:
// 单行中允许多个属性
"vue/max-attributes-per-line": ['error', {
"singleline": 4,
"multiline": {
"max": 4,
"allowFirstLine": false
}
}],
// 关闭属性名必须是 '-' 连接
"vue/attribute-hyphenation": 0,
"vue/require-v-for-key": 0,
// 以下为自定义的 plugin-import 规则:
// https://github.com/benmosher/eslint-plugin-import
// don't require .vue extension when importing
'import/extensions': ['error', 'always', {
js: 'never',
vue: 'never'
}],
// allow optionalDependencies
'import/no-extraneous-dependencies': ['error', {
optionalDependencies: ['test/unit/index.js']
}],
// 关闭必须默认输出
'import/prefer-default-export': ['off'],
}
}
.DS_Store
node_modules/
platforms/
www/
.idea/
/dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*~
*.sw[mnpcod]
*.log
*.tmp
*.tmp.*
log.txt
*.sublime-project
*.sublime-workspace
Thumbs.db
UserInterfaceState.xcuserstate
# OS X
.DS_Store
// https://github.com/michael-ciniawsky/postcss-load-config
module.exports = {
"plugins": {
// to edit target browsers: use "browserslist" field in package.json
"postcss-import": {},
"autoprefixer": {}
}
}
*.min.css
iconfont.css
// https://stylelint.io/user-guide/configuration
module.exports = {
defaultSeverity: 'warning',
extends: 'stylelint-config-standard',
rules: {
'rule-empty-line-before': null,
'selector-list-comma-newline-after': 'always-multi-line',
},
};
readme
\ No newline at end of file
......@@ -32,7 +32,7 @@ export default {
this.pathList.push(to.path)
this.$router.isBack = false
}
if (to.path === '/home') {
if (to.path === '/ContractSignList') {
this.$router.isBack = true
this.pathList = []
}
......
src/assets/image/icon.png

55 KB | W: | H:

src/assets/image/icon.png

931 Bytes | W: | H:

src/assets/image/icon.png
src/assets/image/icon.png
src/assets/image/icon.png
src/assets/image/icon.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -2,42 +2,11 @@
<h-view class="public-style contract-sign-list" title="合同签约">
<h-content class="">
<s-tab @tabClick="switchTab">
<tab-item>本年</tab-item>
<tab-item>本季</tab-item>
<tab-item>本月</tab-item>
<tab-item>待签约</tab-item>
<tab-item>已签约</tab-item>
</s-tab>
<div class="info-board">
<div class="board-line">
<div class="ionic-img">
<img src="../../../assets/image/contractMainten/total@2x.png">
</div>
<div class="text">合同总计</div>
</div>
<div class="board-line"><span>{{ infoShow.contract_count }}</span><span></span></div>
<div class="board-line">
<div class="board-block">
<div class="type">新建</div>
<div class="number"><span>{{ infoShow.new_count }}</span></div>
</div>
<div class="board-block">
<div class="type">签约</div>
<div class="number"><span>{{ infoShow.sign_count }}</span></div>
</div>
<div class="board-block">
<div class="type">审批中</div>
<div class="number"><span>{{ infoShow.incept_count }}</span></div>
</div>
<div class="board-block">
<div class="type">拒绝</div>
<div class="number"><span>{{ infoShow.overdue_count }}</span></div>
</div>
</div>
</div>
<div class="search">
<div class="searchInput">
<div class="img-box"><img src="../../../assets/image/contractMainten/search@2x.png"></div>
<input
v-model="searchCondition.input"
placeholder="请输入合同编号/承租人名称"
......@@ -49,18 +18,24 @@
:updateData="[con_list]"
:pullUp="true"
@pullingUp="loadMore">
<list-item :item-height="80">
<div v-for="(list,index) in con_list" :key="index" :proportion="[5,1]" :show-arrow="true">
<div class="con-num">合同编号: <span style="font-weight: 600">201821023721847</span></div>
<item
v-for="(list,index) in con_list" :key="index" :proportion="[5,1]" :show-arrow="true"
@click.native="goContractMainten(list)">
<img slot="left-icon" src="../../../assets/image/contractMainten/item@2x.png" class="left-icon">
<div slot="name" class="text">
<div class="cont-name" style="font-size: 16px;color: #5D98F6">合同编号:{{ list.contract_number }}</div>
<div class="cont-type" style="color: #8C8C8C;">承租人名称:{{ list.bp_id_tenant_n }}</div>
<div class="cont-type" style="color: #8C8C8C;">单据类别:{{ list.document_type_n }}</div>
<div class="cont-type" style="color: #8C8C8C;">合同创建日期:{{ list.creation_date }}</div>
<div slot="name" class="text" style="width: 70%;font-size: 12px;">
<div class="cont-type" style="color: #5a5959;font-size: 14px">合同金额&nbsp;&nbsp;<span style="font-weight: 600;">12333333</span></div>
<div class="cont-type" style="color: #5a5959;font-size: 14px">承租人&nbsp;&nbsp;&nbsp;&nbsp;张三</div>
</div>
<div slot="name" class="text" style="width: 30%;font-size: 12px;">
<div class="cont-type" style="color: #5a5959;">申请时间</div>
<div class="cont-type" style="color: #5a5959;">2020-01-23</div>
</div>
<img slot="right-icon" src="../../../assets/image/right-arrow@2x.png" class="right-icon">
</item>
</div>
</list-item>
</scroll>
</h-content>
......@@ -90,7 +65,7 @@ export default {
methods: {
switchTab: function (index) {
let vm = this
vm.index = [0, 0, 0]
vm.index = [0, 0]
vm.index[index] = 1
vm.changeData()
},
......@@ -202,127 +177,98 @@ export default {
}
.hls-switch-tab .tab-content .h-tab-item .h-item {
width: 100%;
border: 1px solid #cccccc;
color: black;
border-radius: 10px;
}
.hls-switch-tab .tab-content .h-tab-item.activated .h-item {
color: white;
background-color: blue;
border-radius: 10px;
}
.hls-switch-tab .tab-content {
width: 90%;
margin-left: 5%;
}
.con-num{
width: 90%;
margin-left: 5%;
font-size: 15px;
color: #424242;
margin-top: 15px;
margin-bottom: 12px;
}
.hls-switch-tab .tab-content .h-tab-item {
width: 50%;
height: 0.7rem;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
position: relative;
}
.hls-switch-tab .tab-content .h-tab-item.activated .h-item {
background-color: blue;
color: white;
height: 0.7rem;
border-radius: 5px;
}
.hls-switch-tab .tab-content .h-tab-item .h-item {
color: black;
height: 0.7rem;
border-radius: 5px;
border: 1px solid #cccccc;
}
.hls-switch-tab .tab-content .h-tab-item.activated .h-item .bottom-border {
border-bottom:none;
}
.hls-switch-tab {
position: relative;
}
.info-board {
background-color: #FFF;
.board-line {
display: flex;
display: -webkit-flex;
padding-top: 10px;
justify-content: space-between;
-webkit-justify-content: space-between;
font-size: 13px;
line-height: 18px;
padding-bottom: 6px;
&:before {
content: '';
}
&:after {
content: '';
}
&:first-child {
justify-content: flex-start;
-webkit-justify-content: flex-start;
}
&:nth-child(2) {
justify-content: center;
-webkit-justify-content: center;
}
.ionic-img {
margin-left: 11px;
margin-right: 4px;
width: 17px;
height: 15px;
img {
height: 100%;
width: 100%;
border: none;
}
}
.text {
font-size: @font-size-middle;
}
span {
font-size: 26px;
color: #FF8877;
margin-right: 2px;
&:nth-child(2) {
font-size: @font-size-small;
color: #313131;
margin-top: 5px;
margin-left: 2px;
}
}
.board-block {
height: 100%;
width: 100%;
text-align: center;
.number {
span {
font-size: @font-size-middle;
margin-right: 2px;
}
}
}
}
.content{
background-color: white;
}
.hls-switch-tab {
margin-top: 10px;
}
.search {
display: flex;
height: 50px;
//height: 50px;
background-color: #FFF;
margin-top: 10px;
// margin-bottom: 10px;
.searchInput {
display: flex;
margin-left: 5%;
display: -webkit-flex;
height: 33px;
border: 1px solid #5D98F6; /*no*/
margin: 7px 10px;
width: 100%;
border: 1px solid #cccccc;
/* margin: 0.14rem 0.2rem; */
width: 80%;
height: 0.56rem;
border-radius: 20px;
display: -webkit-box;
display: flex;
-webkit-box-align: center;
align-items: center;
-webkit-align-items: center;
.img-box {
height: 17px;
border-right: 1px solid #5D98F6; /*no*/
padding: 2px 0;
margin-left: 10px;
img {
margin-right: 5px;
width: 15px;
}
}
input {
width: 100%;
text-align: center;
width: 90%;
margin-left: 5%;
font-size: 13px;
height: 17px;
line-height: 17px;
border: none;
margin-top: 3px;
margin-bottom: 4px;
padding-left: 11px;
//padding-left: 11px;
}
}
}
......@@ -334,20 +280,37 @@ export default {
.vue-better-scroll__wrapper {
margin-top: 10px;
}
.hls-list-item {
margin-bottom: 0;
padding-bottom: 10px;
}
.hls-item {
padding: 0;
border-radius: 20px;
box-shadow: 0px 4px 0px 0px #cac9c9;
&:nth-child(odd) {
background-color: #EFF1F3;
background-color: #f1f1f1;
}
&:nth-child(even) {
background-color: #fff;
background-color: #f1f1f1;
}
.add-name{
flex: 9 1 0% !important;
}
.contents{
width: 98%;
margin-left: 1%;
}
.contents .add-name {
.left-icon {
width: 34px;
width: 14px;
margin-right: 0;
}
.right-icon{
margin-left: 20%;
}
.text {
......
......@@ -6,75 +6,85 @@
<div>
<list-item :item-height="45">
<item>
<div slot="name">主承租人</div>
<div slot="name">合同类型</div>
<div slot="content">{{ contract.bp_id_tenant_n }}</div>
</item>
<item>
<div slot="name">项目编号</div>
<div slot="name">销售金额</div>
<div slot="content">{{ contract.project_number }}</div>
</item>
<item>
<div slot="name">合同编号</div>
<div slot="name">主机金额</div>
<div slot="content">{{ contract.contract_number }}</div>
</item>
<item>
<div slot="name">公司名称</div>
<div slot="name">首付款</div>
<div slot="content">{{ contract.company_id_n }}</div>
</item>
<item>
<div slot="name">业务类型</div>
<div slot="name">管理费</div>
<div slot="content">{{ contract.business_type_n }}</div>
</item>
<item>
<div slot="name">产品线</div>
<div slot="name">保证金</div>
<div slot="content">{{ contract.division_n }}</div>
</item>
<item>
<div slot="name">留购金</div>
<div slot="content">{{ contract.division_n }}</div>
</item>
<item>
<div slot="name">基准利率</div>
<div slot="content">{{ contract.division_n }}</div>
</item>
</list-item>
<!--银行信息-->
<list-item v-if="readOnly === 'mainten'">
<item>
<div slot="name">自动扣款银行</div>
<input
slot="content" v-model="contract.direct_debit_bank_id_n" readonly type="text"
placeholder="请输入"
@click="selectDebitBank">
<img slot="right-icon" src="../../../../assets/image/arrow-down@2x.png" class="right-icon">
<div slot="name">租赁开始日</div>
<div slot="content">{{ contract.division_n }}</div>
</item>
<item>
<div slot="name">账户名</div>
<input slot="content" v-model="contract.dd_bank_account_name" type="text" placeholder="请输入">
<div slot="name">支付开始日</div>
<div slot="content">{{ contract.division_n }}</div>
</item>
<item>
<div slot="name">账户号</div>
<input slot="content" v-model="contract.dd_bank_account_num" type="text" placeholder="请输入">
<div slot="name">租赁本金</div>
<div slot="content">{{ contract.division_n }}</div>
</item>
<item>
<div slot="name">账户类型</div>
<input
slot="content" v-model="contract.ebank_account_prop_n" readonly type="text"
placeholder="请输入"
@click="selectEbankAccount">
<img slot="right-icon" src="../../../../assets/image/arrow-down@2x.png" class="right-icon">
<div slot="name">租赁期间</div>
<div slot="content">{{ contract.division_n }}</div>
</item>
<item>
<div slot="name">利率</div>
<div slot="content">{{ contract.division_n }}</div>
</item>
</list-item>
<list-item v-if="readOnly === 'sign'">
<!--银行信息-->
<list-item >
<item>
<div slot="name">自动扣款银行</div>
<div slot="content">{{ contract.direct_debit_bank_id_n }}</div>
<img slot="left-icon" src="../../../../assets/image/icon.png" class="left-icon">
<div slot="name">物件名称</div>
</item>
<item>
<div slot="name">账户名</div>
<div slot="content">{{ contract.dd_bank_account_name }}</div>
<div slot="name">机种名称</div>
<div slot="content">{{ contract.project_number }}</div>
</item>
<item>
<div slot="name">账户号</div>
<div slot="content">{{ contract.dd_bank_account_num }}</div>
<div slot="name">机型</div>
<div slot="content">{{ contract.project_number }}</div>
</item>
<item>
<div slot="name">账户类型</div>
<div slot="content">{{ contract.ebank_account_prop_n }}</div>
<div slot="name">型号</div>
<div slot="content">{{ contract.project_number }}</div>
</item>
<item>
<div slot="name">机号</div>
<div slot="content">{{ contract.project_number }}</div>
</item>
</list-item>
</div>
</template>
......@@ -153,4 +163,8 @@ export default {
.right-icon{
width: 12px;
}
.hls-item .contents .add-name .left-icon {
margin-right: 0.1rem;
width: 0.6rem;
}
</style>
......@@ -4,41 +4,17 @@
*/
<template>
<div>
<div class="pad">
<div class="public-style file-info">
<list-item v-for="(item_list,index) in cdd_item" :key="index">
<div class="attach-item-title">
<div class="contents">
<div class="attach-icon-box">
<div class="attach-icon"/>
</div>
<div class="attach-name">
<div>{{ item_list.cdd_item_desc }}</div>
</div>
<item>
<img slot="left-icon" src="../../../../assets/image/contractMainten/item@2x.png" class="left-icon">
<div slot="name" style="width: 70%;font-size: 12px">
<div class="cont-text" style="color: #5a5959;font-size: 14px">合同金额&nbsp;&nbsp;<span style="font-weight: 600;">12333333</span></div>
<div class="cont-text" style="color: #5a5959;font-size: 14px">承租人&nbsp;&nbsp;&nbsp;&nbsp;张三</div>
</div>
</div>
<div class="item attach-item">
<div class="attach-hint">请上传照片</div>
<div class="contents">
<div class="attach-content">
<div class="add-button">
<!--待上传图片列表-->
<div v-for="(pic,index) in upload_list" v-if="pic.check_id==item_list.check_id" class="picture">
<img :src="pic.picture" @click="showBigPicture(pic.picture,true)">
<div class="close"><i class="icon ion-close-circled" @click="remove_pic(index)"/></div>
</div>
<!--从服务器上下载的图片-->
<div v-for="list in dowload_list">
<div v-for="pic in list" v-if="pic.check_id==item_list.check_id" class="picture">
<img :src="pic.dataBase64String" @click="showBigPicture(pic.dataBase64String)">
<div class="close"><i class="icon ion-close-circled" @click="delete_pic(pic.attachment_id)"/></div>
</div>
</div>
<!--上传图片的加号-->
<img src="../../../../assets/image/contractMainten/plus.png" @click="show(item_list.check_id)">
</div>
</div>
</div>
</div>
<img src="../../../../assets/image/right-arrow@2x.png" class="right-icon">
<img src="../../../../assets/image/right-arrow@2x.png" class="right-icon">
</item>
</list-item>
</div>
</div>
......@@ -210,104 +186,11 @@ export default {
</script>
<style scoped lang="less" rel="stylesheet">
.hls-list-item {
.attach-item-title {
padding: 0 0 0 15px;
height: 40px;
display: flex;
display: -webkit-flex;
justify-content: center;
-webkit-justify-content: center;
align-items: center;
-webkit-align-items: center;
.contents {
width: 100%;
height: 100%;
border-bottom: 1px solid rgba(0, 0, 0, .1);
display: flex;
display: -webkit-flex;
justify-content: flex-start;
-webkit-justify-content: flex-start;
align-items: center;
-webkit-align-items: center;
.attach-icon-box {
width: 5%;
.attach-icon {
width: 10px;
height: 10px;
background-color: @headerColor;
border-radius: 5px;
float: left;
}
}
.attach-name {
width: 95%;
display: -webkit-flex;
display: flex;
justify-content: flex-start;
align-items: center;
-webkit-justify-content: flex-start;
-webkit-align-items: center;
font-size: 14px;
color: @headerColor;
}
}
.file-info {
.hls-item .contents .add-name {
flex: 9 1 0% !important;
width: 90%!important;
}
.attach-item {
padding: 0 0 0 15px;
min-height: 80px;
height: auto;
padding-bottom: 10px;
.attach-hint {
color: @hintColor;
font-size: @font-size-small;
margin: 14px 0;
white-space: normal;
}
.contents {
width: 100%;
height: 100%;
border-bottom: none;
display: flex;
display: -webkit-flex;
justify-content: flex-start;
-webkit-justify-content: flex-start;
align-items: center;
-webkit-align-items: center;
.attach-content {
width: 100%;
.add-button {
.picture {
float: left;
.close {
position: absolute;
font-size: @font-size-big;
color: #F96F68;
margin-top: -3px;
margin-left: 40px;
}
}
img {
margin-right: 15px;
width: 50px;
height: 50px;
float: left;
margin-bottom: 10px
}
}
}
}
}
}
</style>
export default {
calc: {
balloon_ratio_from: null,
customer_ratio: null,
deposit_ratio_from: null,
discount_method: null,
down_payment_ratio_from: null,
down_payment_ratio_to: null,
gps_install_flag: null,
lease_charge_ratio: null,
pay_type: null,
price_list: null,
product_code: null,
product_name: null,
product_name_write: null,
product_plan_id: null,
product_type: null,
special_note: null,
times: null,
times_from: null,
times_to: null,
to_grant: null,
invoice_price: null,
annual_pay_times_n: '月', // 还款频率
annual_pay_times: 12, // 还款频率
lease_charge: 0, // 手续费
insurance_price: 0, // 保险费
gps_amount: 0, // GPS费
travel_tax: 0, // 车船税
purchase_tax: 0, // 购置税
result: {}, // 全部结果集
},
setCalc (calc) {
this.calc = Object.assign(this.calc, calc)
},
getCalc () {
return this.calc
},
cleanCalc () {
for (let key in this.calc) {
this.calc[key] = ''
}
},
setResult (result) {
this.calc.result = result
},
getResult () {
return this.calc.result
},
/**
*
* @param invoic 车价款
* @param pay_times 还款频率
* @param lease_times 期限
* @param int_rato 年利率
* @param down_payment_ratio 首付比例
* @param balloon_ratio 尾款比例
* @param deposit_ratio 保证金比例
* @param lease_charge 手续费
* @param insurance_price 保险费
* @param gps_amount GPS费
* @param travel_tax 车船税
* @param gz 购置税
* @param pay_type 付款方式
*/
calcQuotation: function (invoic, payTimes, leaseTimes, intRato, downPaymentRatio, balloonRatio, depositRatio, leaseCharge, insurancePrice, gpsAmount, travelTax,
gz, payType) {
invoic = parseFloat(invoic)
leaseCharge = parseFloat(leaseCharge)
insurancePrice = parseFloat(insurancePrice)
gpsAmount = parseFloat(gpsAmount)
travelTax = parseFloat(travelTax)
gz = parseFloat(gz)
if (!leaseCharge) {
leaseCharge = 0
} else if (!insurancePrice) {
insurancePrice = 0
} else if (!gpsAmount) {
gpsAmount = 0
} else if (!travelTax) {
travelTax = 0
} else if (!gz) {
gz = 0
}
// 首付金额 融资额 尾付款 保证金 月供 首次支付
let result = {
down_payment: 0, finance_amount: 0, balloon: 0, deposit: 0, mouth_rental: 0, first_amount: 0, cash_flows: [],
}
let cashFlows = result.cash_flows
result.lease_charge = leaseCharge
result.down_payment = hlsUtil.toDecimal((invoic * downPaymentRatio))
result.finance_amount = hlsUtil.toDecimal((invoic - result.down_payment + leaseCharge + insurancePrice + gpsAmount + travelTax + gz))
result.balloon = hlsUtil.toDecimal((invoic * balloonRatio))
result.deposit = hlsUtil.toDecimal(((invoic + leaseCharge + insurancePrice + gpsAmount + travelTax + gz) * depositRatio))
result.mouth_rental = hlsUtil.toDecimal(hlsUtil.PMT(intRato / payTimes, leaseTimes, -(result.finance_amount), 0, 0))
// result.mouth_rental = 2113.9;
result.first_amount = hlsUtil.toDecimal((result.down_payment + result.deposit + leaseCharge + insurancePrice + gpsAmount + travelTax))
// 剩余本金
let outstandingPrincipal
for (let i = 0; i <= leaseTimes; i++) {
// 每期现金流
let cashFlow = {
time: 0,
due_amount: 0,
principal: 0,
interest: 0,
outstanding_principal: 0,
}
// 期数
cashFlow.time = i
if (i === 0) {
outstandingPrincipal = result.finance_amount
cashFlow.outstanding_principal = outstandingPrincipal
} else if (i > 0 && i < leaseTimes) {
// 租金
cashFlow.due_amount = result.mouth_rental
// 利息
cashFlow.interest = hlsUtil.toDecimal(outstandingPrincipal * (intRato / payTimes))
// 本金
cashFlow.principal = hlsUtil.toDecimal((cashFlow.due_amount - cashFlow.interest))
outstandingPrincipal = hlsUtil.toDecimal((outstandingPrincipal - cashFlow.principal))
cashFlow.outstanding_principal = outstandingPrincipal
} else {
cashFlow.due_amount = result.mouth_rental
cashFlow.principal = outstandingPrincipal
cashFlow.interest = hlsUtil.toDecimal((cashFlow.due_amount - cashFlow.principal))
}
cashFlows.push(cashFlow)
}
return result
},
}
/**
* @Author think
* @Date 2019-06-12 16:35
*/
<template>
<h-view class="public-style calculatEnter" title="融资试算">
<!--<h-header :has-border="false" class="bar-custom">
<div slot="left" class="h-header-btn" @click="$hlsExit()">
<i class="ion-ios-arrow-back"/>
</div>
<div slot="center">融资试算</div>
</h-header>-->
<h-content>
<list-item :item-height="96">
<item v-for="(list,index) in proList" :key="index" :has-border="false" @click.native="goNext(list)">
<div class="finaning-contents">
<div class="contents-info">
<div class="contents-info-type">{{ list.product_name_write }}</div>
<div class="contents-info-description">{{ list.special_note }}</div>
<div class="contents-info-time">租期:{{ list.times_from }}</div>
</div>
<div class="next-icon">
<div class="next-icon-img">
<img src="@/assets/image/finaning/nextIcon@2x.png">
</div>
</div>
</div>
</item>
</list-item>
</h-content>
</h-view>
</template>
<script>
import calService from './calculateService'
export default {
name: 'CalculationEnter',
data () {
return {
proList: [],
}
},
mounted: function () {
calService.cleanCalc()
this.initLoad()
},
methods: {
initLoad () {
let vm = this
let url = $config.basePath + 'product_main' // 产品方案查询
let param = {}
vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) {
if (res.result === 'S') {
vm.proList = res.product_main
vm.hlsPopup.hideLoading()
}
})
},
goNext (list) {
list.annual_pay_times_n = '月' // 还款频率
list.annual_pay_times = 12 // 还款频率
list.lease_charge = 0 // 手续费
list.insurance_price = 0 // 保险费
list.gps_amount = 0 // GPS费
list.travel_tax = 0 // 车船税
list.purchase_tax = 0 // 购置税
calService.setCalc(list)
this.$router.push({
name: 'CalculationMain',
})
},
},
}
</script>
<style scoped lang="less">
.calculatEnter{
.content{
background-color:#F7F7F8;
.hls-list-item {
background-color:#F7F7F8;
display: -webkit-flex;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.hls-item {
margin-top: 10px;
border-radius: 10px;
width: 95%;
padding: 0;
height: 96px;
border-bottom: 1px solid #ccc; /*no*/
background-color:#fff;
display: flex;
justify-content: center;
align-items: center;
&.activated {
opacity: 0.9;
-webkit-transform: scale(0.95);
transform: scale(0.95)
}
.finaning-contents {
height: 100%;
width: 93%;
display: flex;
justify-content: space-between;
align-items: center;
.contents-info{
height: 100%;
width: 90%;
padding-top: 5px;
padding-bottom: 5px;
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: flex-start;
.contents-info-type{
color: #556B78;
font-size: 15px;
height: 25px;
display: flex;
justify-content: center;
align-items: center;
}
.contents-info-description{
width: 100%;
line-height: 15px;
color: #99AFC6;
font-size: 14px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.contents-info-time{
color: #99AFC6;
font-size: 14px;
}
}
.next-icon{
padding-right: 5px;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
.next-icon-img{
width: 28px;
height: 28px;
img{
width: 28px;
}
}
}
}
}
}
}
}
</style>
<template>
<h-view class="public-style calculate" title="融资试算">
<!--<h-header :has-border="false" class="bar-custom">
<div slot="left" class="h-header-btn" @click="$routeGo()">
<i class="ion-ios-arrow-back"/>
</div>
<div slot="center">融资试算</div>
</h-header>-->
<h-content class=" has-footer">
<list-item>
<item :show-arrow="true">
<div slot="name">方案名称</div>
<input
slot="content" v-model="calc.product_name_write" type="text" placeholder="方案名称"
readonly>
</item>
<item>
<div slot="name" class="required">汽车销售价</div>
<input slot="content" v-model="calc.invoice_price" type="number" placeholder="请输入销售价">
</item>
<item>
<div slot="name" class="required">首付款比例</div>
<input
slot="content" v-model="calc.down_payment_ratio_from" type="number" min="0.00"
inputmode="numeric" pattern="[0-9]*" placeholder="请输入"><div slot="right-icon">%</div>
</item>
<item>
<div slot="name" class="required">保证金比例</div>
<input
slot="content" v-model="calc.deposit_ratio_from" type="number" min="0.00"
inputmode="numeric" pattern="[0-9]*" placeholder="请输入"><div slot="right-icon">%</div>
</item>
<item>
<div slot="name" class="required">尾付款比例</div>
<input
slot="content" v-model="calc.balloon_ratio_from" type="number" min="0.00"
inputmode="numeric" pattern="[0-9]*" placeholder="请输入"><div slot="right-icon">%</div>
</item>
<item :show-arrow="true">
<div slot="name" class="required">还款频率</div>
<input
slot="content" v-model="calc.annual_pay_times_n" type="text" placeholder="请选择"
readonly @click="selectAnnualPayTimes()">
</item>
<item>
<div slot="name" class="required">还款期数</div>
<input
slot="content" v-model="calc.times_from" type="number" min="0.00"
inputmode="numeric" pattern="[0-9]*"
placeholder="请输入">
</item>
</list-item>
<list-item>
<item>
<div slot="name" class="required">手续费</div>
<input slot="content" v-model="calc.lease_charge" type="number" placeholder="请输入">
</item>
<item>
<div slot="name" class="required">保险费</div>
<input slot="content" v-model="calc.insurance_price" type="number" placeholder="请输入">
</item>
<item>
<div slot="name" class="required">GPS费</div>
<input slot="content" v-model="calc.gps_amount" type="number" placeholder="请输入">
</item>
<item>
<div slot="name" class="required">车船税</div>
<input slot="content" v-model="calc.travel_tax" type="number" placeholder="请输入">
</item>
<item>
<div slot="name" class="required">购置税</div>
<input slot="content" v-model="calc.purchase_tax" type="number" placeholder="请输入">
</item>
</list-item>
</h-content>
<bottom-tab :show-divider="false">
<tab-button @click.native="calculate">计算</tab-button>
</bottom-tab>
</h-view>
</template>
<script>
import calService from './calculateService'
export default {
name: 'CalculationMain',
data () {
return {
calc: calService.getCalc(),
payTimes: [{
'code': '1',
'code_name': '年',
},
{
'code': '12',
'code_name': '月',
},
{
'code': '2',
'code_name': '半年',
},
{
'code': '4',
'code_name': '季',
}],
}
},
methods: {
/**
* 还款频率
*/
selectAnnualPayTimes () {
let vm = this
vm.hlsPopup.selectList({
title: '还款频率',
list: vm.payTimes,
code: 'annual_pay_times',
object: vm.calc,
returnItem: function (index, obj) {
vm.calc = obj
},
})
},
isEmpty (obj) {
if (typeof obj === 'undefined' || obj === null || obj === '') {
return true
} else {
return false
}
},
/**
* 融资试算
*/
calculate () {
let vm = this
if (!vm.isEmpty(vm.calc.invoice_price) && !vm.isEmpty(vm.calc.down_payment_ratio_from) && !vm.isEmpty(vm.calc.deposit_ratio_from) && !vm.isEmpty(vm.calc.balloon_ratio_from) && !vm.isEmpty(vm.calc.annual_pay_times_n) && !vm.isEmpty(vm.calc.times_from) && !vm.isEmpty(vm.calc.lease_charge) && !vm.isEmpty(vm.calc.insurance_price) && !vm.isEmpty(vm.calc.gps_amount) && !vm.isEmpty(vm.calc.travel_tax) && !vm.isEmpty(vm.calc.purchase_tax)) {
let result = calService.calcQuotation(vm.calc.invoice_price, Number(vm.calc.annual_pay_times), vm.calc.times_from, (vm.calc.customer_ratio / 100), (vm.calc.down_payment_ratio_from / 100), (vm.calc.balloon_ratio_from / 100), (vm.calc.deposit_ratio_from / 100), vm.calc.lease_charge, vm.calc.insurance_price, vm.calc.gps_amount, vm.calc.travel_tax, vm.calc.purchase_tax, 0)
result.times_from = vm.calc.times_from
calService.setResult(result)
vm.$router.push({
name: 'ResultMain',
})
} else {
vm.hlsPopup.showLongBottom('必输字段不可为空')
}
},
},
}
</script>
<style lang="less">
.calculate{
.hls-item .contents .add-content .right-icon{
//width: 10px;
}
}
</style>
<template>
<h-view class="public-style resultDetail" title="试算结果">
<!--<h-header :has-border="false" class="bar-custom">
<div slot="left" class="h-header-btn" @click="$routeGo()">
<i class="ion-ios-arrow-back"/>
</div>
<div slot="center">试算结果</div>
</h-header>-->
<h-content class="">
<list-item>
<item :proportion="[5,1]" :item-height="47" class="total">
<div slot="name"><span>融资额:</span><span>&nbsp;{{ detailInfo.finance_amount | currency }}</span></div>
</item>
<item :proportion="[5,1]" class="times">
<div slot="name">还款明细&nbsp;&nbsp;<span>(共{{ detailInfo.times_from }}期)</span></div>
</item>
</list-item>
<div v-for="(list,index) in detailInfo.cash_flows" v-show="index>0" :key="index" class="general">
<div class="time">
{{ list.time }}
</div>
<div class="right">
<list-item>
<item :proportion="[2,3]">
<div slot="name"><span>租金:</span><span style="color:#FF777C;">&nbsp;{{ list.due_amount | currency }}</span></div>
<div slot="content"><span>本金:</span><span>&nbsp;{{ list.principal | currency }}</span></div>
</item>
<item :proportion="[2,3]">
<div slot="name"><span>利息:</span><span>&nbsp;{{ list.interest | currency }}</span></div>
<div slot="content"><span>剩余本金:</span><span>&nbsp;{{ list.outstanding_principal | currency }}</span></div>
</item>
</list-item>
</div>
</div>
</h-content>
</h-view>
</template>
<script>
import calService from './calculateService'
export default {
name: 'ResultDetail',
data () {
return {
detailInfo: calService.getResult(),
}
},
methods: {
},
}
</script>
<style lang="less">
.resultDetail{
.hls-list-item{
.hls-item{
.add-name{
color: #555B70;
}
.add-content{
color: #555B70;
}
}
.total .add-name{
font-size: 20px;
color: #555B70;
line-height: 0.56rem;
font-weight: 500;
}
.times .add-name{
font-size: 16px;
color: #535D7F;
line-height: 22px;
font-weight: bold;
padding:5px 0;
span{
font-size: 13px;
color: rgba(85,91,112,0.60);
line-height: 18px;
font-weight: normal;
}
}
}
.general{
display:flex;
align-items: center;
width: 100%;
height: 80px; /*no*/
margin-bottom:15px;
.time{
width: 14%;
padding-left: 15px;
color: #555B70;
font-size:@font-size-middle;
}
.right{
background-color: #ffffff;
margin-left:2.7%;
width: 88%;
height: 100%;
border-radius: 5px;
.hls-list-item{
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
.hls-item{
padding: 0 0 0 10px;
}
}
}
}
}
// iPhoneX适配
@media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) {
.platform-ios {
.resultDetail {
padding-bottom: @bottomSafeArea;
}
}
}
// iPhoneX Max适配
@media (device-width: 414px) and (device-height: 896px) {
.platform-ios {
.h-view{
padding-bottom: @bottomSafeArea;
}
}
}
</style>
<template>
<h-view class="public-style result" title="试算结果">
<!--<h-header :has-border="false" class="bar-custom">
<div slot="left" class="h-header-btn" @click="$routeGo()">
<i class="ion-ios-arrow-back"/>
</div>
<div slot="center">试算结果</div>
</h-header>-->
<h-content class=" has-footer">
<div class="top">
<div class="top-content">
<div class="leasing">融资额(元)</div>
<div class="amount">{{ calc.result.finance_amount | currency }}</div>
<div class="bottom-row">
<div class="installment">
<div> 月供(元)</div>
<div>{{ calc.result.mouth_rental | currency }}</div>
</div>
<div class="installment">
<div>首次支付(元)</div>
<div>{{ calc.result.first_amount | currency }}</div>
</div>
<div class="installment">
<div>合同期数</div>
<div>{{ calc.result.times_from }}</div>
</div>
</div>
</div>
</div>
<list-item>
<item>
<div slot="name" class="">首付款(元)</div>
<div slot="content">{{ calc.result.down_payment |currency }}</div>
</item>
<item>
<div slot="name" class="">保证金(元)</div>
<div slot="content">{{ calc.result.deposit |currency }}</div>
</item>
<item>
<div slot="name" class="">手续费(元)</div>
<div slot="content">{{ calc.result.lease_charge |currency }}</div>
</item>
<item>
<div slot="name" class="">尾付款(元)</div>
<div slot="content">{{ calc.result.balloon |currency }}</div>
</item>
</list-item>
</h-content>
<bottom-tab>
<tab-button class="left-button" @click.native="$routeGo()">重算</tab-button>
<tab-button class="right-button" @click.native="goDetails">融资明细</tab-button>
</bottom-tab>
</h-view>
</template>
<script>
import calService from './calculateService'
export default {
name: 'ResultMain',
data () {
return {
calc: calService.getCalc(),
}
},
methods: {
goDetails () {
this.$router.push({
name: 'ResultDetails',
})
},
},
}
</script>
<style lang="less">
.result{
.content {
.top {
width: 100%;
height: 160px;
display: flex;
align-items: center;
justify-content: center;
margin: 10px 0;
background-color: #F7F7F8;
.top-content {
width: 92%;
height: 160px;
margin: 15px 0;
background-color: @headerColor;
border-radius: 5px;
.bottom-row {
color: #ffffff;
margin-top: 15px;
display: flex;
justify-content: space-between;
.installment {
width: 33%;
height: 45px;
margin-left: 15px;
font-size: 14px;
line-height: 25px;
border-right: 1px solid #FFFFFF; /*no*/
display: flex;
flex-direction: column;
&:last-child{
border-right: none
}
}
}
.leasing {
font-size: 15px;
color: #FFFFFF;
margin-left: 15px;
padding-top: 20px;
}
.amount {
font-size: 22px;
color: #FFFFFF;
margin-left: 15px;
padding-top: 15px;
}
}
}
}
.h-bottom-tab {
.left-button{
background-color: @headerColor;
color: #fff;
}
.right-button{
background-color: #E55F5F;
color: #fff;
}
}
}
</style>
/**
* @Author Sean
* @Date 2019/4/23
*/
<template>
<h-view class="public-style" style="height: 100%" title="名片识别">
<h-content>
<list-item>
<item>
<div slot="name">姓名</div>
<div slot="content">{{ bp_info.bp_name }}</div>
</item>
</list-item>
<list-item>
<item>
<div slot="name">手机号</div>
<div slot="content">{{ bp_info.cell_phone }}</div>
</item>
<item>
<div slot="name">职务</div>
<div slot="content">{{ bp_info.position }}</div>
</item>
<item>
<div slot="name">单位</div>
<div slot="content">{{ bp_info.work_unit }}</div>
</item>
<item>
<div slot="name">单位地址</div>
<div slot="content">{{ bp_info.work_unit_address }}</div>
</item>
<item>
<div slot="name">单位电话</div>
<div slot="content">{{ bp_info.work_unit_phone }}</div>
</item>
<item>
<div slot="name">邮箱</div>
<div slot="content">{{ bp_info.email }}</div>
</item>
</list-item>
</h-content>
<bottom-tab>
<tab-button @click.native="openShow" >
识别
</tab-button>
</bottom-tab>
</h-view>
</template>
<script>
export default {
data() {
return {
bp_info: {
bp_name: '',
cell_phone: '',
position: '',
work_unit: '',
work_unit_address: '',
work_unit_phone: '',
email: ''
},
}
},
created: function () {
},
mounted: function () {
},
updated: function () {
},
destroyed: function () {
},
methods: {
// 打开sheet操作
openShow (checkId) {
let vm = this
wx.chooseImage({
count: 1, // 微信最多能选择9张图片
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success: function (data) {
hlsPopup.showLoading('请稍候')
vm.localIds = data.localIds // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
/* data.localIds.forEach((localId, index) => {
wx.getLocalImgData({
localId: localId, // 图片的localID
alert('localId '+ localId)
success: function (res) {
vm.getHanwanyun(res.localData);
alert('路径 '+res.localData)
},
})
})*/
vm.wxImageUpload()
},
})
},
// 图片上传到微信服务器
wxImageUpload () {
let vm = this
let localId = vm.localIds.pop()
wx.uploadImage({
localId: localId, // 需要上传的图片的本地ID,由chooseImage接口获得
isShowProgressTips: 0, // 默认为1,显示进度提示
success: function (res) {
/* else {
hlsPopup.hideLoading()
hlsPopup.showLongCenter('图片上传成功')
}*/
vm.getHanwanyun(res.serverId)
},
})
},
//识别
getHanwanyun(serverId) {
let vm = this
let url = process.env.rootPath + '/havon/media' + '?index=' + serverId
let param = {
'wechatCode': process.env.wxCode,
'mediaId': serverId,
'sysName': 'HLS_HANVON',
'apiName': 'hanvon_bcard',
}
hlsHttp.post(url, param).then(function (res) {
hlsPopup.hideLoading();
if (res.name) {
vm.bp_info.bp_name = res.name[0]
}
if (res.mobile) {
vm.bp_info.cell_phone = res.mobile[0];
}
if (res.title) {
vm.bp_info.position = res.title[0];
}
if (res.addr) {
vm.bp_info.work_unit_address = res.addr[0];
}
if (res.comp) {
vm.bp_info.work_unit = res.comp[0];
}
if (res.email) {
vm.bp_info.email = res.email[0];
}
if (res.tel) {
vm.bp_info.work_unit_phone = res.tel[0];
}
});
},
}
}
</script>
<style scoped lang="less" rel="stylesheet">
.public-style {
.content {
}
}
</style>
/**
* @Author Sean
* @Date 2019/4/23
*/
<template>
<h-view class="public-style" style="height: 100%" title="营业执照识别">
<h-content>
<list-item>
<item>
<div slot="name">名称</div>
<div slot="content">{{ licenseList.name }}</div>
</item>
</list-item>
<list-item>
<item>
<div slot="name">法定代表人</div>
<div slot="content">{{ licenseList.person }}</div>
</item>
<item>
<div slot="name">注册资本</div>
<div slot="content">{{ licenseList.capital }}</div>
</item>
<item>
<div slot="name">住所</div>
<div slot="content">{{ licenseList.address }}</div>
</item>
<item>
<div slot="name">营业期限</div>
<div slot="content">{{ licenseList.valid_period }}</div>
</item>
<item>
<div slot="name">注册号</div>
<div slot="content">{{ licenseList.reg_num }}</div>
</item>
</list-item>
</h-content>
<bottom-tab>
<tab-button @click.native="openShow" >
识别
</tab-button>
</bottom-tab>
</h-view>
</template>
<script>
export default {
data() {
return {
licenseList : {
name: "",
person: "",
address: "",
capital: "",
reg_num: "",
valid_period: ""
}
}
},
created: function () {
},
mounted: function () {
},
updated: function () {
},
destroyed: function () {
},
methods: {
// 打开sheet操作
openShow (checkId) {
let vm = this
wx.chooseImage({
count: 1, // 微信最多能选择9张图片
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success: function (data) {
hlsPopup.showLoading('请稍候')
vm.localIds = data.localIds // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
/* data.localIds.forEach((localId, index) => {
wx.getLocalImgData({
localId: localId, // 图片的localID
alert('localId '+ localId)
success: function (res) {
vm.getHanwanyun(res.localData);
alert('路径 '+res.localData)
},
})
})*/
vm.wxImageUpload()
},
})
},
// 图片上传到微信服务器
wxImageUpload () {
let vm = this
let localId = vm.localIds.pop()
wx.uploadImage({
localId: localId, // 需要上传的图片的本地ID,由chooseImage接口获得
isShowProgressTips: 0, // 默认为1,显示进度提示
success: function (res) {
/* else {
hlsPopup.hideLoading()
hlsPopup.showLongCenter('图片上传成功')
}*/
vm.getHanwanyun(res.serverId)
},
})
},
//识别
//识别
getHanwanyun(serverId) {
let vm = this
let url = process.env.rootPath + '/havon/media' + '?index=' + serverId
let param = {
'wechatCode': process.env.wxCode,
'mediaId': serverId,
'sysName': 'HLS_HANVON',
'apiName': 'hanvon_businesslicense',
}
hlsHttp.post(url, param).then(function (res) {
hlsPopup.hideLoading();
if (res.businessLicense.address) {
vm.licenseList.address = res.businessLicense.address;
}
if (res.businessLicense.capital) {
vm.licenseList.capital = res.businessLicense.capital;
}
if (res.businessLicense.name) {
vm.licenseList.name = res.businessLicense.name;
}
if (res.businessLicense.person) {
vm.licenseList.person = res.businessLicense.person;
}
if (res.businessLicense.reg_num) {
vm.licenseList.reg_num = res.businessLicense.reg_num;
}
if (res.businessLicense.valid_period) {
vm.licenseList.valid_period = res.businessLicense.valid_period;
}
});
},
}
}
</script>
<style scoped lang="less" rel="stylesheet">
.public-style {
.content {
}
}
</style>
/**
* @Author Sean
* @Date 2019/4/23
*/
<template>
<h-view class="public-style" style="height: 100%" title="驾驶证识别">
<h-content>
<list-item>
<item>
<div slot="name">姓名</div>
<div slot="content">{{ licenseList.name }}</div>
</item>
</list-item>
<list-item>
<item>
<div slot="name">性别</div>
<div slot="content">{{ licenseList.gender }}</div>
</item>
<item>
<div slot="name">国籍</div>
<div slot="content">{{ licenseList.nation }}</div>
</item>
<item>
<div slot="name">证号</div>
<div slot="content">{{ licenseList.cardno }}</div>
</item>
<item>
<div slot="name">住址</div>
<div slot="content">{{ licenseList.address }}</div>
</item>
<item>
<div slot="name">出生日期</div>
<div slot="content">{{ licenseList.birthdate }}</div>
</item>
<item>
<div slot="name">初次领证日期</div>
<div slot="content">{{ licenseList.issuedate }}</div>
</item>
<item>
<div slot="name">准驾车型</div>
<div slot="content">{{ licenseList.driverclass }}</div>
</item>
<item>
<div slot="name">有效期限</div>
<div slot="content">{{ licenseList.validdate }}</div>
</item>
</list-item>
</h-content>
<bottom-tab>
<tab-button @click.native="openShow" >
识别
</tab-button>
</bottom-tab>
</h-view>
</template>
<script>
export default {
data() {
return {
licenseList : {
name: "",
gender: "",
nation: "",
cardno: "",
address: "",
birthdate: "",
issuedate: "",
driverclass: "",
validdate :"",
cropped_image : "",
created_by : "",
last_updated_by : ""
}
}
},
created: function () {
},
mounted: function () {
},
updated: function () {
},
destroyed: function () {
},
methods: {
// 打开sheet操作
openShow (checkId) {
let vm = this
wx.chooseImage({
count: 1, // 微信最多能选择9张图片
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success: function (data) {
hlsPopup.showLoading('请稍候')
vm.localIds = data.localIds // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
/* data.localIds.forEach((localId, index) => {
wx.getLocalImgData({
localId: localId, // 图片的localID
alert('localId '+ localId)
success: function (res) {
vm.getHanwanyun(res.localData);
alert('路径 '+res.localData)
},
})
})*/
vm.wxImageUpload()
},
})
},
// 图片上传到微信服务器
wxImageUpload () {
let vm = this
let localId = vm.localIds.pop()
wx.uploadImage({
localId: localId, // 需要上传的图片的本地ID,由chooseImage接口获得
isShowProgressTips: 0, // 默认为1,显示进度提示
success: function (res) {
/* else {
hlsPopup.hideLoading()
hlsPopup.showLongCenter('图片上传成功')
}*/
vm.getHanwanyun(res.serverId)
},
})
},
//识别
getHanwanyun(serverId) {
let vm = this
let url = process.env.rootPath + '/havon/media' + '?index=' + serverId
let param = {
'wechatCode': process.env.wxCode,
'mediaId': serverId,
'sysName': 'HLS_HANVON',
'apiName': 'hanvon_drivercard',
}
hlsHttp.post(url, param).then(function (res) {
hlsPopup.hideLoading();
if (res.driverCard.name) {
vm.licenseList.name = res.driverCard.name;
}if (res.driverCard.gender) {
vm.licenseList.gender = res.driverCard.gender;
}if (res.driverCard.nation) {
vm.licenseList.nation = res.driverCard.nation;
}if (res.driverCard.cardno) {
vm.licenseList.cardno = res.driverCard.cardno;
}if (res.driverCard.address) {
vm.licenseList.address = res.driverCard.address;
}if (res.driverCard.birthdate) {
vm.licenseList.birthdate = res.driverCard.birthdate;
}if (res.driverCard.issuedate) {
vm.licenseList.issuedate = res.driverCard.issuedate;
}if (res.driverCard.driverclass) {
vm.licenseList.driverclass = res.driverCard.driverclass;
}if (res.driverCard.validdate) {
vm.licenseList.validdate = res.driverCard.validdate;
}if (res.driverCard.cropped_image) {
vm.licenseList.cropped_image = res.driverCard.cropped_image;
}
});
},
}
}
</script>
<style scoped lang="less" rel="stylesheet">
.public-style {
.content {
}
}
</style>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment