Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-xcmg-vue-app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xugong
hls-xcmg-vue-app
Commits
31f82198
Commit
31f82198
authored
Oct 20, 2020
by
邹骏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
审核待办模块
parent
26084c4c
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
4649 additions
and
18 deletions
+4649
-18
todo@2x.png
src/assets/functionCenter/todo@2x.png
+0
-0
approval-info.vue
src/pages/functionCenter/approval-info.vue
+192
-0
appendInfo.vue
src/pages/functionCenter/component/appendInfo.vue
+1108
-0
baseInfo.vue
src/pages/functionCenter/component/baseInfo.vue
+1758
-0
billInfo.vue
src/pages/functionCenter/component/billInfo.vue
+271
-0
creditInfo.vue
src/pages/functionCenter/component/creditInfo.vue
+516
-0
input-num.vue
src/pages/functionCenter/component/input-num.vue
+179
-0
function-list.vue
src/pages/functionCenter/function-list.vue
+22
-3
to-do-list.vue
src/pages/functionCenter/to-do-list.vue
+583
-0
home-page.vue
src/pages/home/home-page.vue
+14
-12
index.js
src/router/index.js
+5
-2
index.html
www/index.html
+1
-1
No files found.
src/assets/functionCenter/todo@2x.png
0 → 100644
View file @
31f82198
946 Bytes
src/pages/functionCenter/approval-info.vue
0 → 100644
View file @
31f82198
<
template
>
<h-view
id=
"np-base-info"
>
<h-header
:proportion=
"[5,1,1]"
class=
"bar-custom"
>
<div
slot=
"left"
class=
"h-header-btn"
@
click=
"$routeGo()"
>
<img
src=
"@/assets/userBind/arrow.png"
>
<span>
用户审批
</span>
</div>
</h-header>
<h-content>
<div
class=
"tab"
>
<p><span
:class=
"
{'selected':activedCom === 'base-info'}" @click="isSelected(0)">基本信息
</span></p>
<p><span
:class=
"
{'selected':activedCom === 'bill-info'}" @click="isSelected(1)">开票信息
</span></p>
<p><span
:class=
"
{'selected':activedCom === 'append-info'}" @click="isSelected(2)">附件信息
</span></p>
<p><span
:class=
"
{'selected':activedCom === 'credit-info'}" @click="isSelected(3)">银行卡
</span></p>
</div>
<div
style=
"padding-top:45px;"
>
<div
:is=
'activedCom'
:document_id=
"document_id"
:document_name=
"document_name"
:record_id=
"record_id"
></div>
<!--
<base-info
v-if=
"selected === 'base'"
:document_id=
"document_id"
:document_name=
"document_name"
:record_id=
"record_id"
></base-info>
<bill-info
v-if=
"selected === 'bill'"
:document_id=
"document_id"
:document_name=
"document_name"
:record_id=
"record_id"
></bill-info>
<append-info
v-if=
"selected === 'appe'"
:document_id=
"document_id"
:document_name=
"document_name"
:record_id=
"record_id"
></append-info>
<credit-info
v-if=
"selected === 'cred'"
:document_id=
"document_id"
:document_name=
"document_name"
:record_id=
"record_id"
></credit-info>
-->
</div>
</h-content>
<bottom-tab
class=
"footer-button"
>
<tab-button
class=
"save"
@
click
.
native=
"approv('0')"
>
审批
</tab-button>
</bottom-tab>
<h-modal
ref=
"modal"
v-model=
"showModalValue"
>
<div
class=
"modal_header"
>
审批意见
<img
src=
"@/assets/userBind/close.png"
@
click=
"hideModal()"
>
</div>
<div
class=
"modal_content"
>
<textarea
v-model=
"comment_text"
></textarea>
</div>
<div
class=
"modal_footer"
>
<bottom-tab
class=
"footer-button"
>
<tab-button
class=
"refuse"
@
click
.
native=
"approv('2')"
>
拒绝
</tab-button>
<tab-button
class=
"comfirm"
@
click
.
native=
"approv('1')"
>
同意
</tab-button>
</bottom-tab>
</div>
</h-modal>
</h-view>
</
template
>
<
script
>
import
baseInfo
from
'./component/baseInfo'
import
billInfo
from
'./component/billInfo'
import
appendInfo
from
'./component/appendInfo'
import
creditInfo
from
'./component/creditInfo'
export
default
{
components
:
{
baseInfo
,
billInfo
,
appendInfo
,
creditInfo
,
},
data
()
{
return
{
selected
:
''
,
document_id
:
''
,
document_name
:
''
,
record_id
:
''
,
comment_text
:
''
,
showModalValue
:
false
,
activedCom
:
''
,
comArr
:
[
'base-info'
,
'bill-info'
,
'append-info'
,
'credit-info'
],
}
},
watch
:
{
},
mounted
()
{
this
.
activedCom
=
'base-info'
},
activated
()
{
this
.
document_id
=
this
.
$route
.
params
.
document_id
this
.
document_name
=
this
.
$route
.
params
.
document_name
this
.
record_id
=
this
.
$route
.
params
.
record_id
},
methods
:
{
isSelected
(
index
)
{
this
.
activedCom
=
this
.
comArr
[
index
]
},
hideModal
()
{
this
.
showModalValue
=
false
},
approv
(
action_type
)
{
if
(
action_type
==
'0'
)
{
this
.
showModalValue
=
true
}
else
{
let
param
=
{
master
:
{
record_id
:
this
.
record_id
,
action_type
:
action_type
,
user_id
:
this
.
document_id
,
comment_text
:
this
.
comment_text
,
}
}
let
url
if
(
action_type
==
'1'
)
{
url
=
$config
.
basePath
+
'action_agree'
}
else
if
(
action_type
==
'2'
)
{
url
=
$config
.
basePath
+
'action_refuse'
}
this
.
hlsHttp
.
post
(
url
,
param
).
then
((
res
)
=>
{
this
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
}
else
{
}
this
.
showModalValue
=
false
})
}
},
},
}
</
script
>
<
style
lang=
"less"
scoped
>
.refuse {
color: #fff;
border-radius: 4px;
background-color: yellow;
width: 150px;
}
.save,.comfirm {
color: #fff;
border-radius: 4px;
background-color: @headerColor;
width: 150px;
}
.modal_header {
width: 100%;
height: 50px;
line-height: 30px;
padding: 10px 20px;
background: white;
position: fixed;
bottom: 300px;
vertical-align: middle;
img {
width: 30px;
height: 30px;
float: right;
}
}
.modal_content {
width: 100%;
height: 250px;
padding: 0 20px;
background: white;
position: fixed;
bottom: 50px;
textarea{
width: 100%;
height: 200px;
color: #666;
resize: none;
border: 1px solid #999;
}
}
.modal_footer {
width: 100%;
height: 50px;
background: white;
position: fixed;
bottom: 0;
}
.tab {
display: flex;
background-color: #fff;
padding: 6px 8px 4px 6px;
position: fixed;
width: 100%;
z-index: 50;
p {
text-align: center;
flex: auto;
span {
display: block;
padding: 6px 0;
background-color: #fff;
font-family: PingFangSC-Regular;
font-size: 15px;
color: #656464;
}
span.selected {
border-bottom: 3px solid #1D3FFF;
font-family: PingFangSC-Semibold;
font-weight: 700;
}
}
}
</
style
>
src/pages/functionCenter/component/appendInfo.vue
0 → 100644
View file @
31f82198
<
template
>
<h-view
id=
"accessory"
class=
"public-style"
>
<h-content>
<div
v-for=
"(list, index) in cddItemList"
:key=
"index"
class=
"card"
>
<span
class=
"card-desc"
style=
"color:#1D3FFF"
>
{{
list
.
description
}}
</span>
<div
class=
"img-content"
>
<!--待上传图片列表-->
<div
v-if=
"list.cdd_item==='ASSETS_CARD'||list.cdd_item==='MARITAL STATUS'||list.cdd_item==='FAMILY_REGISTER'"
>
<div
v-for=
"(item, index) in upload_list"
v-if=
"item.check_id==list.check_id"
:key=
"index"
class=
"card-upload"
>
<img
:src=
"item.picture"
@
click=
"showBigPicture(item.picture)"
>
<div
class=
"close"
@
click=
"remove_pic(item.attachment_id,index)"
>
<img
src=
"@/assets/userBind/deleteIcon.png"
>
</div>
</div>
<!--从服务器上下载的图片-->
<div
v-for=
"(pic, index) in dowload_list"
:key=
"index"
>
<div
v-if=
"pic.check_id==list.check_id"
:key=
"index"
class=
"card-upload"
>
<img
:src=
"pic.url"
@
click=
"showBigPicture(pic.url)"
>
<div
class=
"close"
@
click=
"delete_pic(pic.attachment_id)"
>
<img
src=
"@/assets/userBind/deleteIcon.png"
>
</div>
</div>
</div>
<div
class=
"card-upload plus"
@
click=
"imgUploadShow(list.description,list.check_id)"
>
<img
src=
"@/assets/userBind/camera.png"
class=
"upload-btn"
>
</div>
</div>
<div
v-if=
"list.cdd_item==='HOUSE_CARD'"
>
<div
v-if=
"!houseImg"
class=
"card-upload plus"
>
<img
src=
"@/assets/userBind/camera.png"
class=
"upload-btn"
>
</div>
<div
v-if=
"houseImg&&!isApproved"
class=
"card-upload plus"
>
<img
:src=
"houseImg"
style=
"width:100%;height:100%"
>
</div>
<div
v-if=
"houseImg&&isApproved"
class=
"card-upload plus"
@
click=
"showBigPicture(houseImg)"
>
<img
:src=
"houseImg"
style=
"width:100%;height:100%"
>
</div>
<list-item
:item-height=
"44"
class=
"card-Info"
>
<item>
<div
slot=
"name"
>
房屋所有权人
</div>
<input
slot=
"content"
v-model=
"hauseInfo.house_owner"
readonly
placeholder=
"识别房产证自动填充"
>
</item>
<item>
<div
slot=
"name"
>
共有情况
</div>
<input
slot=
"content"
v-model=
"hauseInfo.public_situation"
readonly
placeholder=
"识别房产证自动填充"
>
</item>
<item>
<div
slot=
"name"
>
房屋坐落
</div>
<textarea
slot=
"content"
v-model=
"hauseInfo.house_located"
cols=
"22"
rows=
"1"
readonly
placeholder=
"识别房产证自动填充"
@
input=
"addRow(hauseInfo.house_located,$event)"
/>
</item>
<item>
<div
slot=
"name"
>
登记时间
</div>
<input
slot=
"content"
v-model=
"hauseInfo.regist_date"
readonly
placeholder=
"识别房产证自动填充"
>
</item>
<item>
<div
slot=
"name"
>
房屋性质
</div>
<input
slot=
"content"
v-model=
"hauseInfo.house_property"
readonly
placeholder=
"识别房产证自动填充"
>
</item>
<item>
<div
slot=
"name"
>
规划用途
</div>
<input
slot=
"content"
v-model=
"hauseInfo.plan_purpose"
readonly
placeholder=
"识别房产证自动填充"
>
</item>
<item>
<div
slot=
"name"
>
总层数
</div>
<input
slot=
"content"
v-model=
"hauseInfo.house_layers"
readonly
placeholder=
"识别房产证自动填充"
>
</item>
<item>
<div
slot=
"name"
>
建筑面积
</div>
<input
slot=
"content"
v-model=
"hauseInfo.built_area"
readonly
placeholder=
"识别房产证自动填充"
>
</item>
<item>
<div
slot=
"name"
>
套内建筑面积
</div>
<input
slot=
"content"
v-model=
"hauseInfo.built_in_area"
readonly
placeholder=
"识别房产证自动填充"
>
</item>
<item>
<div
slot=
"name"
>
其他
</div>
<input
slot=
"content"
v-model=
"hauseInfo.others"
readonly
placeholder=
"识别房产证自动填充"
>
</item>
<item>
<div
slot=
"name"
>
地号
</div>
<input
slot=
"content"
v-model=
"hauseInfo.land_number"
readonly
placeholder=
"识别房产证自动填充"
>
</item>
<item
:proportion=
"[1,1]"
>
<div
slot=
"name"
>
土地使用权取得方式
</div>
<input
slot=
"content"
v-model=
"hauseInfo.land_get_method"
readonly
placeholder=
"识别房产证自动填充"
>
</item>
<item>
<div
slot=
"name"
>
土地使用年限
</div>
<input
slot=
"content"
v-model=
"hauseInfo.land_use_limit"
readonly
placeholder=
"识别房产证自动填充"
>
</item>
</list-item>
</div>
<div
v-if=
"list.cdd_item==='CAR_CARD'"
>
<div
v-if=
"list.cdd_item==='CAR_CARD'"
>
<div
v-if=
"!carImg"
class=
"card-upload plus"
>
<img
src=
"@/assets/userBind/camera.png"
class=
"upload-btn"
>
</div>
<div
v-if=
"carImg&&!isApproved"
class=
"card-upload plus"
>
<img
:src=
"carImg"
style=
"width:100%;height:100%"
>
</div>
<div
v-if=
"carImg&&isApproved"
class=
"card-upload plus"
@
click=
"showBigPicture(carImg)"
>
<img
:src=
"carImg"
style=
"width:100%;height:100%"
>
</div>
</div>
<list-item
:item-height=
"44"
class=
"card-Info"
>
<item>
<div
slot=
"name"
>
车辆识别代号
</div>
<input
slot=
"content"
readonly
v-model=
"carInfo.vehicle_identify_num"
placeholder=
"识别行驶证自动填充"
>
</item>
<item>
<div
slot=
"name"
>
住址
</div>
<textarea
slot=
"content"
v-model=
"carInfo.address"
cols=
"22"
rows=
"1"
readonly
placeholder=
"识别行驶证自动填充"
@
input=
"addRow(carInfo.address,$event)"
/>
</item>
<item>
<div
slot=
"name"
>
品牌型号
</div>
<input
slot=
"content"
v-model=
"carInfo.brand_model_number"
readonly
placeholder=
"识别行驶证自动填充"
>
</item>
<item>
<div
slot=
"name"
>
发证日期
</div>
<input
slot=
"content"
v-model=
"carInfo.start_date"
readonly
placeholder=
"识别行驶证自动填充"
>
</item>
<item>
<div
slot=
"name"
>
车辆类型
</div>
<input
slot=
"content"
v-model=
"carInfo.vehicle_type"
readonly
placeholder=
"识别行驶证自动填充"
>
</item>
<item>
<div
slot=
"name"
>
所有人
</div>
<input
slot=
"content"
v-model=
"carInfo.owner"
readonly
placeholder=
"识别行驶证自动填充"
>
</item>
<item>
<div
slot=
"name"
>
使用性质
</div>
<input
slot=
"content"
v-model=
"carInfo.use_nature"
readonly
placeholder=
"识别行驶证自动填充"
>
</item>
<item>
<div
slot=
"name"
>
发动机号码
</div>
<input
slot=
"content"
v-model=
"carInfo.engine_number"
readonly
placeholder=
"识别行驶证自动填充"
>
</item>
<item>
<div
slot=
"name"
>
号牌号码
</div>
<input
slot=
"content"
v-model=
"carInfo.plate_number"
readonly
placeholder=
"识别行驶证自动填充"
>
</item>
<item>
<div
slot=
"name"
>
注册日期
</div>
<input
slot=
"content"
v-model=
"carInfo.regist_date"
readonly
placeholder=
"识别行驶证自动填充"
>
</item>
</list-item>
</div>
<div
v-if=
"list.cdd_item==='REAL_EST_CERTIFICATE'"
>
<div
v-if=
"list.cdd_item==='REAL_EST_CERTIFICATE'"
>
<div
v-if=
"!estateImg"
class=
"card-upload plus"
>
<img
src=
"@/assets/userBind/camera.png"
class=
"upload-btn"
>
</div>
<div
v-if=
"estateImg&&!isApproved"
class=
"card-upload plus"
>
<img
:src=
"estateImg"
style=
"width:100%;height:100%"
>
</div>
<div
v-if=
"estateImg&&isApproved"
class=
"card-upload plus"
@
click=
"showBigPicture(estateImg)"
>
<img
:src=
"estateImg"
style=
"width:100%;height:100%"
>
</div>
</div>
<list-item
:item-height=
"44"
class=
"card-Info"
>
<item>
<div
slot=
"name"
>
权利人
</div>
<input
slot=
"content"
readonly
v-model=
"propertyInfo.right_person"
placeholder=
"识别不动产权证自动填充"
>
</item>
<item>
<div
slot=
"name"
>
共有情况
</div>
<input
slot=
"content"
v-model=
"propertyInfo.public_situation"
readonly
placeholder=
"识别不动产权证自动填充"
>
</item>
<item>
<div
slot=
"name"
>
坐落
</div>
<textarea
slot=
"content"
v-model=
"propertyInfo.house_located"
cols=
"22"
rows=
"1"
contenteditable=
"true"
readonly
placeholder=
"识别不动产权证自动填充"
@
input=
"addRow(propertyInfo.house_located,$event)"
/>
</item>
<item>
<div
slot=
"name"
>
不动产单元号
</div>
<textarea
slot=
"content"
v-model=
"propertyInfo.real_unit_number"
cols=
"22"
rows=
"1"
readonly
placeholder=
"识别不动产权证自动填充"
@
input=
"addRow(propertyInfo.real_unit_number,$event)"
/>
</item>
<item>
<div
slot=
"name"
>
权利类型
</div>
<textarea
slot=
"content"
v-model=
"propertyInfo.right_type"
cols=
"22"
rows=
"1"
readonly
placeholder=
"识别不动产权证自动填充"
@
input=
"addRow(propertyInfo.right_type,$event)"
/>
</item>
<item>
<div
slot=
"name"
>
权利性质
</div>
<textarea
slot=
"content"
v-model=
"propertyInfo.right_property"
cols=
"22"
rows=
"1"
readonly
placeholder=
"识别不动产权证自动填充"
@
input=
"addRow(propertyInfo.right_property,$event)"
/>
</item>
<item>
<div
slot=
"name"
>
用途
</div>
<textarea
slot=
"content"
v-model=
"propertyInfo.house_purpose"
cols=
"22"
rows=
"1"
readonly
placeholder=
"识别不动产权证自动填充"
@
input=
"addRow(propertyInfo.house_purpose,$event)"
/>
</item>
<item>
<div
slot=
"name"
>
面积
</div>
<textarea
slot=
"content"
v-model=
"propertyInfo.house_area"
cols=
"22"
rows=
"1"
readonly
placeholder=
"识别不动产权证自动填充"
@
input=
"addRow(propertyInfo.house_area,$event)"
/>
</item>
<item>
<div
slot=
"name"
>
使用期限
</div>
<textarea
slot=
"content"
v-model=
"propertyInfo.land_use_limit"
cols=
"22"
rows=
"1"
readonly
placeholder=
"识别不动产权证自动填充"
@
input=
"addRow(propertyInfo.land_use_limit,$event)"
/>
</item>
<item>
<div
slot=
"name"
>
权利其他状况
</div>
<textarea
slot=
"content"
v-model=
"propertyInfo.right_others"
cols=
"22"
rows=
"1"
readonly
placeholder=
"识别不动产权证自动填充"
@
input=
"addRow(propertyInfo.right_others,$event)"
/>
</item>
</list-item>
</div>
</div>
</div>
</h-content>
</h-view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
bp_type
:
''
,
list
:
{},
houseImg
:
''
,
carImg
:
''
,
estateImg
:
''
,
house_id
:
''
,
car_id
:
''
,
estate_id
:
''
,
houseImgUpload
:
''
,
carImgUpload
:
''
,
estateImgUpload
:
''
,
houseFlag
:
false
,
// 房产证查看标识,为false则用查询出来的,为true则用拍照出来的
carFlag
:
false
,
// 行驶证查看标识,为false则用查询出来的,为true则用拍照出来的
estateFlag
:
false
,
// 不动产权证查看标识,为false则用查询出来的,为true则用拍照出来的
isUploadHouse
:
false
,
// 房产证修改标识
isUploadCar
:
false
,
// 行驶证修改标识
isUploadEstate
:
false
,
// 不动产权证修改标识
estateAttachmentId
:
''
,
houseAttachmentId
:
''
,
carAttachmentId
:
''
,
propertyInfo
:
{
bp_id
:
this
.
document_id
,
right_person
:
''
,
public_situation
:
''
,
house_located
:
''
,
real_unit_number
:
''
,
right_type
:
''
,
right_property
:
''
,
house_purpose
:
''
,
house_area
:
''
,
land_use_limit
:
''
,
right_others
:
''
,
},
hauseInfo
:
{
bp_id
:
this
.
document_id
,
house_owner
:
''
,
public_situation
:
''
,
house_located
:
''
,
regist_date
:
''
,
house_property
:
''
,
plan_purpose
:
''
,
house_layers
:
''
,
built_area
:
''
,
built_in_area
:
''
,
others
:
''
,
land_number
:
''
,
land_get_method
:
''
,
land_use_limit
:
''
,
},
carInfo
:
{
bp_id
:
this
.
document_id
,
vehicle_identify_num
:
''
,
address
:
''
,
brand_model_number
:
''
,
start_date
:
''
,
vehicle_type
:
''
,
owner
:
''
,
use_nature
:
''
,
engine_number
:
''
,
plate_number
:
''
,
regist_date
:
''
,
words_result_num
:
''
,
success
:
''
,
},
upload_list
:
[],
cddItemList
:
[],
// 资料清单列表
dowload_list
:
[],
}
},
props
:
{
document_id
:
String
,
document_name
:
String
,
},
computed
:
{
isApproved
()
{
return
window
.
localStorage
.
user_bp_status
===
'APPROVED'
},
},
created
()
{
this
.
getHouseInfo
()
this
.
getEstateInfo
()
this
.
getCarInfo
()
this
.
loadItemList
(
true
)
},
beforeRouteEnter
(
to
,
from
,
next
)
{
next
(
vm
=>
{
if
(
from
.
name
===
'NPInvoiceInfo'
&&
window
.
localStorage
.
from
===
'true'
)
{
vm
.
propertyInfo
=
{
bp_id
:
this
.
document_id
,
right_person
:
''
,
public_situation
:
''
,
house_located
:
''
,
real_unit_number
:
''
,
right_type
:
''
,
right_property
:
''
,
house_purpose
:
''
,
house_area
:
''
,
land_use_limit
:
''
,
right_others
:
''
,
}
vm
.
hauseInfo
=
{
house_owner
:
''
,
public_situation
:
''
,
house_located
:
''
,
regist_date
:
''
,
house_property
:
''
,
plan_purpose
:
''
,
house_layers
:
''
,
built_area
:
''
,
built_in_area
:
''
,
others
:
''
,
land_number
:
''
,
land_get_method
:
''
,
land_use_limit
:
''
,
bp_id
:
this
.
document_id
,
}
vm
.
carInfo
=
{
vehicle_identify_num
:
''
,
address
:
''
,
brand_model_number
:
''
,
start_date
:
''
,
vehicle_type
:
''
,
owner
:
''
,
use_nature
:
''
,
engine_number
:
''
,
plate_number
:
''
,
regist_date
:
''
,
words_result_num
:
''
,
success
:
''
,
bp_id
:
this
.
document_id
,
}
vm
.
houseImgUpload
=
''
vm
.
carImgUpload
=
''
vm
.
estateImgUpload
=
''
vm
.
houseImg
=
''
vm
.
carImg
=
''
vm
.
estateImg
=
''
vm
.
houseFlag
=
false
,
// 房产证查看标识,为false则用查询出来的,为true则用拍照出来的
vm
.
carFlag
=
false
,
// 行驶证查看标识,为false则用查询出来的,为true则用拍照出来的
vm
.
estateFlag
=
false
,
// 不动产权证查看标识,为false则用查询出来的,为true则用拍照出来的
vm
.
isUploadHouse
=
false
,
// 房产证修改标识
vm
.
isUploadCar
=
false
,
// 行驶证修改标识
vm
.
isUploadEstate
=
false
,
// 不动产权证修改标识
vm
.
bp_type
=
window
.
localStorage
.
bp_type
setTimeout
(()
=>
{
vm
.
loadItemList
(
true
)
vm
.
getCarInfo
()
// vm.getHouseInfo()
// vm.getEstateInfo()
},
0
)
}
else
if
(
from
.
name
===
'NPInvoiceInfo'
&&
window
.
localStorage
.
from
===
'false'
)
{
vm
.
propertyInfo
=
{
bp_id
:
this
.
document_id
,
right_person
:
''
,
public_situation
:
''
,
house_located
:
''
,
real_unit_number
:
''
,
right_type
:
''
,
right_property
:
''
,
house_purpose
:
''
,
house_area
:
''
,
land_use_limit
:
''
,
right_others
:
''
,
}
vm
.
hauseInfo
=
{
house_owner
:
''
,
public_situation
:
''
,
house_located
:
''
,
regist_date
:
''
,
house_property
:
''
,
plan_purpose
:
''
,
house_layers
:
''
,
built_area
:
''
,
built_in_area
:
''
,
others
:
''
,
land_number
:
''
,
land_get_method
:
''
,
land_use_limit
:
''
,
bp_id
:
this
.
document_id
,
}
vm
.
carInfo
=
{
vehicle_identify_num
:
''
,
address
:
''
,
brand_model_number
:
''
,
start_date
:
''
,
vehicle_type
:
''
,
owner
:
''
,
use_nature
:
''
,
engine_number
:
''
,
plate_number
:
''
,
regist_date
:
''
,
words_result_num
:
''
,
success
:
''
,
bp_id
:
this
.
document_id
,
}
vm
.
houseImgUpload
=
''
vm
.
carImgUpload
=
''
vm
.
estateImgUpload
=
''
vm
.
houseImg
=
''
vm
.
carImg
=
''
vm
.
estateImg
=
''
vm
.
houseFlag
=
false
,
// 房产证查看标识,为false则用查询出来的,为true则用拍照出来的
vm
.
carFlag
=
false
,
// 行驶证查看标识,为false则用查询出来的,为true则用拍照出来的
vm
.
estateFlag
=
false
,
// 不动产权证查看标识,为false则用查询出来的,为true则用拍照出来的
vm
.
isUploadHouse
=
false
,
// 房产证修改标识
vm
.
isUploadCar
=
false
,
// 行驶证修改标识
vm
.
isUploadEstate
=
false
,
// 不动产权证修改标识
vm
.
bp_type
=
window
.
localStorage
.
bp_type
vm
.
loadItemList
(
false
)
}
})
},
updated
()
{
let
myArea
=
document
.
querySelectorAll
(
'textarea'
)
myArea
.
forEach
(
i
=>
{
let
num
=
Math
.
ceil
((
i
.
scrollHeight
-
42
)
/
20
)
if
(
num
>
0
)
{
i
.
rows
=
num
+
2
}
})
},
methods
:
{
addRow
(
e
,
event
)
{
// let num = Math.ceil((el.target.scrollHeight - 42) / 20)
// if (num > 0) {
// el.target.rows = num + 2
// }
if
(
e
)
{
let
addNum
=
Math
.
ceil
(
e
.
length
/
16
)
if
(
addNum
===
0
)
{
event
.
target
.
rows
=
1
}
else
if
(
addNum
>=
addNum
-
1
&&
addNum
<
addNum
+
1
)
{
event
.
target
.
rows
=
addNum
+
1
}
}
},
async
saveEstateInfo
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'bp_real_estate_save'
let
isSaveCar
=
await
vm
.
saveCarInfo
()
let
param
=
{
master
:
vm
.
propertyInfo
,
}
if
(
isSaveCar
)
{
hlsPopup
.
showLoading
(
'请稍候'
)
let
res
=
await
vm
.
$post
(
url
,
param
)
if
(
res
.
result
===
'S'
)
{
vm
.
hlsPopup
.
hideLoading
()
return
true
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
}
}
},
async
saveCarInfo
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'bp_vehicleLicense_save'
let
param
=
{
master
:
vm
.
carInfo
,
}
hlsPopup
.
showLoading
(
'请稍候'
)
let
res
=
await
vm
.
$post
(
url
,
param
)
if
(
res
.
result
===
'S'
)
{
vm
.
hlsPopup
.
hideLoading
()
return
true
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
}
},
async
getCarInfo
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'bp_vehicleLicense_query'
let
flag
=
await
vm
.
getEstateInfo
()
let
param
=
{
bp_id
:
this
.
document_id
,
}
// hlsPopup.showLoading('请稍候')
if
(
flag
)
{
let
res
=
await
vm
.
$post
(
url
,
param
)
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
Object
.
assign
(
vm
.
carInfo
,
res
.
info
)
return
true
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
return
false
}
}
},
async
getEstateInfo
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'bp_real_estate_query'
let
flag
=
await
vm
.
getHouseInfo
()
let
param
=
{
bp_id
:
this
.
document_id
,
}
// hlsPopup.showLoading('请稍候')
if
(
flag
)
{
let
res
=
await
vm
.
$post
(
url
,
param
)
// vm.hlsPopup.hideLoading()
if
(
res
.
result
===
'S'
)
{
Object
.
assign
(
vm
.
propertyInfo
,
res
.
info
)
return
true
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
return
false
}
}
},
async
saveHouseInfo
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'bp_house_info_save'
let
isSaveEstate
=
await
vm
.
saveEstateInfo
()
let
param
=
{
master
:
vm
.
hauseInfo
,
}
hlsPopup
.
showLoading
(
'请稍候'
)
if
(
isSaveEstate
)
{
vm
.
$post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
/* vm.$router.push({
name: 'NPBankInfo',
}) */
vm
.
attachmentCheck
()
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
}
})
}
},
attachmentCheck
()
{
// let vm = this
// let url = process.env.basePath + 'bp_attachment_check'
// let param = {
// bp_id: window.localStorage.getItem('bp_id'),
// }
// vm.hlsPopup.showLoading('正在校验数据')
// vm.hlsHttp.post(url, param).then(function (res) {
// vm.hlsPopup.hideLoading()
// if (res.result === 'S') {
this
.
$router
.
push
({
name
:
'NPBankInfo'
,
})
// } else {
// hlsPopup.showError(res.message)
// }
// })
},
async
getHouseInfo
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'bp_house_info_query'
let
param
=
{
bp_id
:
this
.
document_id
,
}
hlsPopup
.
showLoading
(
'请稍候'
)
let
res
=
await
vm
.
$post
(
url
,
param
)
// vm.hlsPopup.hideLoading()
if
(
res
.
result
===
'S'
)
{
Object
.
assign
(
vm
.
hauseInfo
,
res
.
info
)
return
true
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
return
false
}
},
houseIdentify
(
fileUrl
)
{
let
vm
=
this
hlsPopup
.
showLoading
(
'正在识别'
)
let
url
=
process
.
env
.
ocrPath
+
'/baidu/ocr/house'
hlsUtil
.
baiduOcr
(
fileUrl
,
url
,
function
(
res
)
{
hlsPopup
.
hideLoading
()
let
result
=
res
.
result
.
data
vm
.
hauseInfo
.
house_owner
=
result
.
house_owner
.
word
vm
.
hauseInfo
.
public_situation
=
result
.
public_situation
.
word
vm
.
hauseInfo
.
house_located
=
result
.
house_located
.
word
vm
.
hauseInfo
.
regist_date
=
result
.
regist_date
.
word
vm
.
hauseInfo
.
house_property
=
result
.
house_property
.
word
vm
.
hauseInfo
.
plan_purpose
=
result
.
plan_purpose
.
word
vm
.
hauseInfo
.
house_layers
=
result
.
house_layers
.
word
vm
.
hauseInfo
.
built_area
=
result
.
built_area
.
word
vm
.
hauseInfo
.
built_in_area
=
result
.
built_in_area
.
word
vm
.
hauseInfo
.
others
=
result
.
others
.
word
vm
.
hauseInfo
.
land_number
=
result
.
land_number
.
word
vm
.
hauseInfo
.
land_get_method
=
result
.
land_get_method
.
word
vm
.
hauseInfo
.
land_use_limit
=
result
.
land_use_limit
.
word
})
},
carIdentify
(
fileUrl
)
{
let
vm
=
this
hlsPopup
.
showLoading
(
'正在识别'
)
let
url
=
process
.
env
.
ocrPath
+
'/baidu/ocr/vehicleLicense'
hlsUtil
.
baiduOcr
(
fileUrl
,
url
,
function
(
res
)
{
hlsPopup
.
hideLoading
()
let
result
=
res
.
result
.
words_result
vm
.
carInfo
.
vehicle_identify_num
=
result
.
车辆识别代号
.
words
vm
.
carInfo
.
address
=
result
.
住址
.
words
vm
.
carInfo
.
brand_model_number
=
result
.
品牌型号
.
words
vm
.
carInfo
.
start_date
=
result
.
发证日期
.
words
vm
.
carInfo
.
vehicle_type
=
result
.
车辆类型
.
words
vm
.
carInfo
.
owner
=
result
.
所有人
.
words
vm
.
carInfo
.
use_nature
=
result
.
使用性质
.
words
vm
.
carInfo
.
engine_number
=
result
.
发动机号码
.
words
vm
.
carInfo
.
regist_date
=
result
.
注册日期
.
words
vm
.
carInfo
.
plate_number
=
result
.
号牌号码
.
words
vm
.
carInfo
.
success
=
res
.
success
})
},
estateIdentify
(
fileUrl
)
{
let
vm
=
this
hlsPopup
.
showLoading
(
'正在识别'
)
let
url
=
process
.
env
.
ocrPath
+
'/baidu/ocr/houseRight'
hlsUtil
.
baiduOcr
(
fileUrl
,
url
,
function
(
res
)
{
hlsPopup
.
hideLoading
()
let
result
=
res
.
result
.
data
vm
.
propertyInfo
.
right_person
=
result
.
right_person
.
word
vm
.
propertyInfo
.
public_situation
=
result
.
public_situation
.
word
vm
.
propertyInfo
.
house_located
=
result
.
house_located
.
word
vm
.
propertyInfo
.
real_unit_number
=
result
.
real_unit_number
.
word
vm
.
propertyInfo
.
right_type
=
result
.
right_type
.
word
vm
.
propertyInfo
.
right_property
=
result
.
right_property
.
word
vm
.
propertyInfo
.
house_purpose
=
result
.
house_purpose
.
word
vm
.
propertyInfo
.
house_area
=
result
.
house_area
.
word
vm
.
propertyInfo
.
land_use_limit
=
result
.
land_use_limit
.
word
vm
.
propertyInfo
.
right_others
=
result
.
right_others
.
word
})
},
takePicture
(
ocrType
,
type
)
{
let
vm
=
this
var
cameraoptions
=
{
quality
:
70
,
width
:
1843
,
height
:
1382
,
maxCount
:
1
,
}
let
success
=
function
(
imgUrl
)
{
if
(
imgUrl
.
length
===
0
)
{
hlsPopup
.
showLongCenter
(
'请选择一张图片'
)
}
else
{
if
(
ocrType
===
'HOUSE_CARD'
)
{
vm
.
houseImg
=
hlsUtil
.
convertImageUrl
(
imgUrl
[
0
])
vm
.
houseImgUpload
=
imgUrl
[
0
]
vm
.
isUploadHouse
=
true
vm
.
houseIdentify
(
imgUrl
[
0
])
}
else
if
(
ocrType
===
'CAR_CARD'
)
{
vm
.
carImg
=
hlsUtil
.
convertImageUrl
(
imgUrl
[
0
])
vm
.
carImgUpload
=
imgUrl
[
0
]
vm
.
isUploadCar
=
true
vm
.
carIdentify
(
imgUrl
[
0
])
}
else
if
(
ocrType
===
'REAL_EST_CERTIFICATE'
)
{
vm
.
isUploadEstate
=
true
vm
.
estateImg
=
hlsUtil
.
convertImageUrl
(
imgUrl
[
0
])
vm
.
estateImgUpload
=
imgUrl
[
0
]
vm
.
estateIdentify
(
imgUrl
[
0
])
}
}
}
let
error
=
function
()
{
hlsPopup
.
showLongCenter
(
error
)
}
vm
.
hlsUtil
.
takePicture
(
cameraoptions
,
success
,
error
)
},
imgUploadOpenCamera
(
description
,
check_id
)
{
let
vm
=
this
let
obj
=
{
pkvalue
:
check_id
,
source_type
:
'PRJ_CDD_ITEM_CHECK'
,
picture
:
''
,
check_id
:
check_id
,
filePath
:
''
,
attachment_id
:
''
,
user_id
:
1
,
fileName
:
description
+
'_'
+
new
Date
().
getTime
(),
}
let
cameraoptions
=
{
quality
:
100
,
}
let
success
=
function
(
imgdata
)
{
obj
.
picture
=
hlsUtil
.
convertImageUrl
(
imgdata
)
obj
.
filePath
=
imgdata
let
list
=
[]
list
.
push
(
obj
)
// vm.upload_list.push(obj)
// 拍完一张立马执行保存图片逻辑
vm
.
save_picture
(
list
)
}
let
error
=
function
()
{
hlsPopup
.
showLongCenter
(
'请拍照'
)
}
hlsUtil
.
openCamera
(
cameraoptions
,
success
,
error
)
},
imgUploadTakePicture
(
description
,
check_id
)
{
let
vm
=
this
let
cameraoptions
=
{
quality
:
100
,
}
let
success
=
function
(
imgUrl
)
{
var
list
=
[]
for
(
let
i
=
0
;
i
<
imgUrl
.
length
;
i
++
)
{
let
obj
=
{
pkvalue
:
check_id
,
source_type
:
'PRJ_CDD_ITEM_CHECK'
,
picture
:
''
,
check_id
:
check_id
,
filePath
:
''
,
attachment_id
:
''
,
user_id
:
1
,
fileName
:
description
+
'_'
+
new
Date
().
getTime
(),
}
obj
.
picture
=
hlsUtil
.
convertImageUrl
(
imgUrl
[
i
])
obj
.
filePath
=
imgUrl
[
i
]
list
.
push
(
obj
)
}
// 拍完一张立马执行保存图片逻辑
vm
.
save_picture
(
list
)
}
let
error
=
function
()
{}
vm
.
hlsUtil
.
takePicture
(
cameraoptions
,
success
,
error
)
},
// 图片保存
save_picture
(
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()
hlsPopup.showLongCenter('图片上传成功') */
}
},
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
.
upload_list
.
push
(
list
[
j
])
break
}
}
}
else
{
hlsPopup
.
hideLoading
()
}
}
if
(
!
list
[
i
].
attachment_id
)
{
attLength
++
hlsUtil
.
fileUploadSvc
(
list
[
i
],
uploadSuccess
)
}
}
}
else
{
hlsPopup
.
hideLoading
()
}
},
// 移除图片
remove_pic
(
attachment_id
,
index
)
{
let
vm
=
this
var
delete_list
=
[]
let
obj
=
{
attachment_id
:
attachment_id
}
delete_list
.
push
(
obj
)
let
url
=
process
.
env
.
basePath
+
'app_delete_attment'
// 附件删除
let
param
=
{
picturelist
:
delete_list
,
}
hlsPopup
.
showLoading
(
'请稍候'
)
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
hlsPopup
.
showLongCenter
(
'删除成功!'
)
vm
.
remove_upload_list
(
attachment_id
,
index
)
}
else
if
(
res
.
result
===
'E'
)
{
hlsPopup
.
showShortCenter
(
res
.
message
)
}
})
},
remove_upload_list
(
attachment_id
,
index
)
{
let
vm
=
this
vm
.
upload_list
.
remove
(
index
)
vm
.
upload_list
.
sort
()
},
// 图片上传入口
imgUploadShow
(
description
,
check_id
)
{
let
vm
=
this
// vm.upload_list = []
hlsPopup
.
showActionSheet
({
titleText
:
'请选择照片'
,
buttonArray
:
[
'拍照'
,
'从相册取'
],
callback
:
index
=>
{
if
(
index
===
0
)
{
vm
.
imgUploadOpenCamera
(
description
,
check_id
)
}
else
{
vm
.
imgUploadTakePicture
(
description
,
check_id
)
}
},
})
},
// 查看大图
showBigPicture
(
pic
)
{
let
vm
=
this
vm
.
hlsPopup
.
showBigPicture
({
imgUrl
:
pic
,
width
:
'100% !important'
,
})
},
delete_pic
(
attachment_id
)
{
let
vm
=
this
var
delete_list
=
[]
let
obj
=
{
attachment_id
:
attachment_id
}
delete_list
.
push
(
obj
)
let
url
=
process
.
env
.
basePath
+
'app_delete_attment'
// 附件删除
let
param
=
{
picturelist
:
delete_list
,
}
hlsPopup
.
showLoading
(
'请稍候'
)
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
hlsPopup
.
showLongCenter
(
'删除成功!'
)
vm
.
remove_dowload_list
(
attachment_id
)
}
else
if
(
res
.
result
===
'E'
)
{
hlsPopup
.
showShortCenter
(
res
.
message
)
}
})
},
loadItemList
(
flag
)
{
let
vm
=
this
vm
.
dowload_list
=
[]
let
bpId
=
this
.
document_id
if
(
bpId
===
'undefined'
)
{
bpId
=
null
}
let
url
=
process
.
env
.
basePath
+
'prj_cdd_check_list'
let
param
=
{
master
:
{
document_id
:
bpId
,
document_table
:
'HLS_BP_MASTER'
,
tab_group
:
'HLS_NP'
,
},
}
vm
.
hlsPopup
.
showLoading
(
'请稍候'
)
// if (flag) {
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
var
listTemp
=
[...
res
.
lists
]
listTemp
.
forEach
(
item
=>
{
switch
(
item
.
cdd_item
)
{
case
'HOUSE_CARD'
:
// 房产证
vm
.
house_id
=
item
.
check_id
break
case
'CAR_CARD'
:
// 承租人身份证背面
vm
.
car_id
=
item
.
check_id
break
case
'REAL_EST_CERTIFICATE'
:
// 承租人身份证背面
vm
.
estate_id
=
item
.
check_id
break
default
:
break
}
})
vm
.
cddItemList
=
res
.
lists
.
filter
(
i
=>
{
return
i
.
description
.
indexOf
(
'身份证'
)
===
-
1
})
// 查询图片
if
(
flag
)
{
vm
.
cddItemList
.
forEach
((
item
,
index
)
=>
{
vm
.
load_picture
(
item
.
check_id
,
index
,
item
.
cdd_item
)
})
}
}
})
// }
},
delete_pic_to_ocr
(
attachment_id
)
{
let
vm
=
this
var
delete_list
=
[]
let
obj
=
{
attachment_id
:
attachment_id
}
delete_list
.
push
(
obj
)
let
url
=
process
.
env
.
basePath
+
'app_delete_attment'
// 附件删除
let
param
=
{
picturelist
:
delete_list
,
}
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
}
else
if
(
res
.
result
===
'E'
)
{
}
})
},
load_picture
(
check_id
,
index
,
cdd_item
)
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'attachment_list_query'
+
'&index'
+
index
// 附件查询
let
param
=
{
check_id
:
check_id
,
}
hlsPopup
.
showLoading
(
'请稍候'
)
vm
.
$post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
res
.
lists
.
forEach
(
item
=>
{
item
[
'url'
]
=
process
.
env
.
filePath
+
'attachment_id='
+
item
.
attachment_id
+
'&access_token='
+
window
.
localStorage
.
access_token
})
switch
(
cdd_item
)
{
case
'HOUSE_CARD'
:
// 房产证
if
(
!
vm
.
houseFlag
)
{
vm
.
houseImg
=
res
.
lists
[
0
].
url
}
vm
.
houseAttachmentId
=
res
.
lists
[
0
].
attachment_id
console
.
log
(
vm
.
houseAttachmentId
)
break
case
'CAR_CARD'
:
// 行驶证
if
(
!
vm
.
carFlag
)
{
vm
.
carImg
=
res
.
lists
[
0
].
url
}
vm
.
carAttachmentId
=
res
.
lists
[
0
].
attachment_id
break
case
'REAL_EST_CERTIFICATE'
:
// 行驶证
if
(
!
vm
.
estateFlag
)
{
vm
.
estateImg
=
res
.
lists
[
0
].
url
}
vm
.
estateAttachmentId
=
res
.
lists
[
0
].
attachment_id
break
default
:
vm
.
dowload_list
.
push
(
res
.
lists
)
}
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
}
})
},
},
}
</
script
>
<
style
lang=
"less"
>
#accessory {
textarea{
color: #666;
resize: none;
}
textarea::placeholder{
text-align: right;
}
.userInfo {
height: 45px;
line-height: 45px;
color: @headerColor;
margin-top: -10px;
font-size: 15px;
margin-left: 16px;
position: relative;
}
.userInfo::before {
content: "";
display: block;
width: 4px;
height: 20px;
background-color: @headerColor;
position: absolute;
left: -15px;
top: 12px;
}
.card {
padding-bottom: 8px;
height: auto;
background-color: #fff;
margin-bottom: 10px;
display: flex;
flex-direction: column;
.card-desc {
color: #656464;
font-size: 13px;
line-height: 18px;
padding-top: 8px;
display: block;
margin-left: 16px;
}
.img-content {
/*display: flex;
flex-flow: row wrap;
justify-content: flex-start;
align-items: center;*/
}
.plus {
display: flex;
justify-content: center;
align-items: center;
}
.card-upload {
position: relative;
width: 80px;
height: 80px;
border: 1px dashed #dcdcdd;
/* display: flex;
justify-content: center;
align-items: center;*/
margin-top: 12px;
margin-left: 16px;
float: left;
.close {
/* position: relative;
color: #F96F68;
margin-top: -100%;
margin-left: -10%;*/
position: absolute;
color: #f96f68;
top: -6px;
right: -6px;
img {
width: 14px;
height: 14px;
margin-left: 5px;
}
}
img {
/*width: 88px;
height: 88px;*/
width: 100%;
height: 100%;
}
.upload-btn {
width: 24px;
height: 24px;
}
}
}
.save {
color: #fff;
border-radius: 4px;
background-color: @headerColor;
}
}
</
style
>
src/pages/functionCenter/component/baseInfo.vue
0 → 100644
View file @
31f82198
<
template
>
<h-view
id=
"np-base-info"
>
<h-content>
<list-item
:item-height=
"44"
>
<item
v-if=
"!isApproved"
:showArrow=
"true"
>
<div
slot=
"name"
class=
"required"
>
客户类型
</div>
<input
slot=
"content"
v-model=
"baseInfo.bp_type_n"
placeholder=
"请选择"
type=
"text"
readonly
onfocus=
"this.blur()"
@
click=
"selectIdTypeOnly()"
>
</item>
<item
v-if=
"isApproved&&!isMultiRole"
>
<div
slot=
"name"
class=
"required"
>
客户类型
</div>
<span
slot=
"content"
>
{{
baseInfo
.
bp_type_n
}}
</span>
</item>
<item
v-if=
"isApproved&&isMultiRole&&!hasMultiRole"
:showArrow=
"true"
@
click
.
native=
"selectIdType"
>
<div
slot=
"name"
class=
"required"
>
客户类型
</div>
<div
slot=
"content"
class=
"typeBP"
>
<span>
{{
baseInfo
.
bp_type_n
}}
</span>
<span
v-for=
"(item,index) in multiRoleList"
:key=
"index"
>
{{
item
.
bp_type_n
}}
</span>
<span
v-for=
"(item,index) in multiBpTypeSelectList"
:key=
"item.bp_type"
>
{{
item
.
bp_type_n
}}
<img
v-if=
"item.bp_type_n"
src=
"@/assets/userBind/deleteTag.png"
@
click
.
stop
@
click=
"deleteBP(item)"
>
</span>
</div>
</item>
<item
v-if=
"isApproved&&isMultiRole&&hasMultiRole"
:showArrow=
"true"
>
<div
slot=
"name"
class=
"required"
>
客户类型
</div>
<div
slot=
"content"
class=
"typeBP"
>
<span>
{{
baseInfo
.
bp_type_n
}}
</span>
<span
v-for=
"(item,index) in multiRoleList"
:key=
"index"
>
{{
item
.
bp_type_n
}}
</span>
</div>
</item>
<item
v-if=
"(((isPaople&&from)||(isPaople&&isSelected)))||(multipleRole==='GUTA'||multipleRole==='TENANT')||searchPeople"
:proportion=
"[3,7]"
>
<div
slot=
"name"
class=
"required"
>
业务经办人
</div>
<input
slot=
"content"
v-model=
"baseInfo.agent_username"
readonly
placeholder=
"请输入业务经办员工代码"
>
<!--
<div
slot=
"content"
class=
"add-people"
><input
v-model=
"baseInfo.agent_username"
><img
src=
"@/assets/contractCreate/add1.png"
@
click=
"inputNum=true"
></div>
-->
<!--
<div
slot=
"content"
class=
"add-people"
><div
class=
"people-list"
><span
v-for=
"(item,index) in peopleList"
:key=
"index"
>
{{
item
}}
</span></div>
<div><img
src=
"@/assets/contractCreate/add1.png"
@
click=
"inputNum=true"
></div></div>
-->
</item>
<item
v-if=
"(((isLesons&&from)||(isLesons&&isSelected)))||multipleRole==='AGENT'||searchLecens"
>
<div
slot=
"name"
class=
"required"
>
营业执照
</div>
<input
slot=
"content"
v-model=
"baseInfo.business_license_num"
readonly
placeholder=
"请输入营业执照号"
>
</item>
<item
v-if=
"(isMatter&&from)||(isMatter&&isSelected)"
>
<div
slot=
"name"
class=
"required"
>
办事处代码
</div>
<input
slot=
"content"
v-model=
"baseInfo.business_license_num"
readonly
placeholder=
"请输入办事处代码"
>
</item>
<button
v-if=
"isAddNewType"
class=
"type-save"
@
click=
"addNewRole"
>
新增角色
</button>
</list-item>
<div
class=
"userInfo"
>
客户信息
</div>
<div
class=
"upload-id-card"
>
<span>
身份证照片
</span>
<div
class=
"upload-box"
>
<div
v-if=
"!idCardFront"
>
<img
src=
"@/assets/userBind/front.png"
>
<p>
正面
</p>
</div>
<div
v-if=
"idCardFront && !isApproved"
>
<img
:src=
"idCardFront"
style=
"width: 100%;height: 100%;margin: 0"
@
click=
"showBigPicture(idCardFront)"
>
</div>
<div
v-if=
"isApproved && idCardFront"
>
<img
v-if=
"idCardFront"
:src=
"idCardFront"
style=
"width: 100%;height: 100%;margin: 0"
@
click=
"showBigPicture(idCardFront)"
>
</div>
<div
v-if=
"!idCardBack"
>
<img
src=
"@/assets/userBind/back.png"
>
<p>
反面
</p>
</div>
<div
v-if=
"idCardBack && !isApproved"
>
<img
:src=
"idCardBack"
style=
"width: 100%;height: 100%;margin: 0"
@
click=
"showBigPicture(idCardBack)"
>
</div>
<div
v-if=
"isApproved && idCardBack"
>
<img
v-if=
"idCardBack"
:src=
"idCardBack"
style=
"width: 100%;height: 100%;margin: 0"
@
click=
"showBigPicture(idCardBack)"
>
</div>
</div>
</div>
<list-item
:item-height=
"44"
class=
"second-part"
>
<item>
<div
slot=
"name"
class=
"required"
>
姓名
</div>
<input
slot=
"content"
v-model=
"baseInfo.bp_name"
readonly
placeholder=
"上传身份证自动填充"
class=
"auto"
>
</item>
<item>
<div
slot=
"name"
class=
"required"
>
身份证号码
</div>
<input
slot=
"content"
v-model=
"baseInfo.id_card_no"
readonly
placeholder=
"上传身份证自动填充"
class=
"auto"
>
</item>
<item>
<div
slot=
"name"
class=
"required"
>
户籍地址
</div>
<textarea
slot=
"content"
ref=
"myTestarea"
v-model=
"baseInfo.address_on_resident_booklit"
readonly
cols=
"30"
rows=
"1"
placeholder=
"上传身份证自动填充"
class=
"auto"
@
input=
"addRows(baseInfo.address_on_resident_booklit)"
/>
</item>
<item>
<div
slot=
"name"
class=
"required"
>
身份证有效期从
</div>
<input
slot=
"content"
v-model=
"baseInfo.id_card_date_from"
readonly
placeholder=
"上传身份证自动填充"
class=
"auto"
>
<!--
<span
class=
"auto"
>
{{
baseInfo
.
id_card_date_from
|
dateFormat
}}
</span>
-->
</item>
<item>
<div
slot=
"name"
class=
"required"
>
身份证有效期到
</div>
<input
slot=
"content"
v-model=
"baseInfo.id_card_date_to"
readonly
placeholder=
"上传身份证自动填充"
class=
"auto"
>
</item>
<item>
<div
slot=
"name"
class=
"required"
>
手机号码
</div>
<input
slot=
"content"
v-model=
"baseInfo.cell_phone"
readonly
placeholder=
"请输入手机号码"
>
</item>
<item
:showArrow=
"true"
>
<div
slot=
"name"
class=
"required"
>
业务办理省
</div>
<input
slot=
"content"
v-model=
"baseInfo.province_name"
placeholder=
"请选择"
type=
"text"
readonly
onfocus=
"this.blur()"
>
</item>
<item
:showArrow=
"true"
>
<div
slot=
"name"
class=
"required"
>
业务办理市
</div>
<input
slot=
"content"
v-model=
"baseInfo.city_name"
placeholder=
"请选择"
type=
"text"
readonly
onfocus=
"this.blur()"
>
</item>
<item
:showArrow=
"true"
>
<div
slot=
"name"
class=
"required"
>
业务办理区/县
</div>
<input
slot=
"content"
v-model=
"baseInfo.district_name"
placeholder=
"请选择"
type=
"text"
readonly
onfocus=
"this.blur()"
>
</item>
<item>
<div
slot=
"name"
class=
"required"
>
联系地址
</div>
<textarea
slot=
"content"
ref=
"myTestareaLive"
v-model=
"baseInfo.living_address"
readonly
rows=
"1"
cols=
"30"
placeholder=
"请输入联系地址"
@
input=
"addRowsLive(baseInfo.living_address)"
/>
</item>
<item
:showArrow=
"true"
>
<div
slot=
"name"
class=
"required"
>
学历
</div>
<input
slot=
"content"
v-model=
"baseInfo.academic_background_n"
placeholder=
"请选择学历"
readonly
onfocus=
"this.blur()"
@
click=
"selectBackType"
>
</item>
<item
v-if=
"((baseInfo.bp_type === 'TENANT' || baseInfo.bp_type === 'GUTA')&&!multipleRole)||multipleRole=== 'TENANT' || multipleRole === 'GUTA'"
:showArrow=
"true"
>
<div
slot=
"name"
class=
"required"
>
婚姻状况
</div>
<input
slot=
"content"
v-model=
"baseInfo.marital_status_n"
placeholder=
"请选择"
readonly
onfocus=
"this.blur()"
@
click=
"selectMarital"
>
</item>
</list-item>
<div
v-if=
"(hasSP && (((baseInfo.bp_type === 'TENANT'||baseInfo.bp_type === 'GUTA')&&!multipleRole)||multipleRole=== 'TENANT' || multipleRole === 'GUTA'))"
>
<!-- 主承租人活担保人为已婚显示-->
<div
class=
"userInfo"
>
配偶信息
</div>
<div
class=
"upload-id-card"
>
<span>
身份证照片
</span>
<div
class=
"upload-box"
>
<div
v-if=
"!idCardFrontSp"
>
<img
src=
"@/assets/userBind/front.png"
>
<p>
正面
</p>
</div>
<div
v-if=
"idCardFrontSp && !isApproved"
>
<img
:src=
"idCardFrontSp"
style=
"width: 100%;height: 100%;margin: 0"
@
click=
"showBigPicture(idCardFrontSp)"
>
</div>
<div
v-if=
"isApproved && idCardFrontSp"
>
<img
v-if=
"idCardFrontSp"
:src=
"idCardFrontSp"
style=
"width: 100%;height: 100%;margin: 0"
@
click=
"showBigPicture(idCardFrontSp)"
>
</div>
<div
v-if=
"!idCardBackSp"
>
<img
src=
"@/assets/userBind/back.png"
>
<p>
反面
</p>
</div>
<div
v-if=
"idCardBackSp && !isApproved"
>
<img
:src=
"idCardBackSp"
style=
"width: 100%;height: 100%;margin: 0"
@
click=
"showBigPicture(idCardBackSp)"
>
</div>
<div
v-if=
"isApproved && idCardBackSp"
>
<img
v-if=
"idCardBackSp"
:src=
"idCardBackSp"
style=
"width: 100%;height: 100%;margin: 0"
@
click=
"showBigPicture(idCardBackSp)"
>
</div>
</div>
</div>
<list-item
:item-height=
"44"
>
<item>
<div
slot=
"name"
class=
"required"
>
姓名
</div>
<input
slot=
"content"
v-model=
"baseInfo.bp_name_sp"
readonly
placeholder=
"上传身份证自动填充"
>
</item>
<item>
<div
slot=
"name"
class=
"required"
>
配偶身份证号
</div>
<input
slot=
"content"
v-model=
"baseInfo.id_card_no_sp"
readonly
placeholder=
"上传身份证自动填充"
>
</item>
<item>
<div
slot=
"name"
class=
"required"
>
身份证有效期从
</div>
<input
slot=
"content"
v-model=
"baseInfo.id_card_date_from_sp"
readonly
placeholder=
"上传身份证自动填充"
>
</item>
<item>
<div
slot=
"name"
class=
"required"
>
身份证有效期到
</div>
<input
slot=
"content"
v-model=
"baseInfo.id_card_date_to_sp"
readonly
placeholder=
"上传身份证自动填充"
>
</item>
<item>
<div
slot=
"name"
class=
"required"
>
手机号码
</div>
<input
slot=
"content"
v-model=
"baseInfo.spouse_phone"
readonly
placeholder=
"请输入手机号码"
>
</item>
<item>
<div
slot=
"name"
class=
"required"
>
工作单位
</div>
<input
slot=
"content"
v-model=
"baseInfo.working_place_sp"
readonly
placeholder=
"请输入工作单位"
>
</item>
<item>
<div
slot=
"name"
class=
"required"
>
联系地址
</div>
<input
slot=
"content"
v-model=
"baseInfo.address_sp"
readonly
placeholder=
"请输入联系地址"
>
</item>
</list-item>
</div>
</h-content>
<!--
<InputNum
v-show=
"inputNum"
ref=
"inputtNum"
@
roleCancle=
"roleCancle"
@
roleConfirm=
"roleConfirm"
/>
-->
</h-view>
</
template
>
<
script
>
import
InputNum
from
'./input-num'
export
default
{
components
:
{
InputNum
,
},
data
()
{
return
{
list
:
{},
idCardFrontUpload
:
''
,
idCardBackUpload
:
''
,
idCardFrontSpUpload
:
''
,
idCardBackSptSpUpload
:
''
,
isAddNewType
:
false
,
hasSP
:
false
,
isPaople
:
false
,
isLesons
:
false
,
isMatter
:
false
,
isApproved
:
false
,
searchPeople
:
false
,
searchLecens
:
false
,
inputNum
:
false
,
// 填写业务经办
isSave
:
false
,
isAGENT
:
this
.
$route
.
params
.
isAGENT
,
isMultiRole
:
false
,
// 能否选择多角色
isSelected
:
false
,
hasMultiRole
:
false
,
// 是否有第二个角色
multipleRole
:
''
,
// 切换的角色
from
:
false
,
multiBpType
:
{
bp_type_n
:
''
,
bp_type
:
''
,
},
// peopleList: [],
cityList
:
[],
provinceList
:
[],
upload_list
:
[],
// 上传图片列表
dowload_list
:
[],
// 下载图片列表
typeList
:
[],
backList
:
[],
bankList
:
[],
maritalList
:
[],
districtList
:
[],
multiBpTypeSelectList
:
[],
// 添加的角色
img_url
:
{},
multiRole
:
{
bp_type_n
:
''
,
bp_type
:
''
,
},
// 查询出来的第二个角色
multiRoleList
:
[],
// 查询出来的多角色
baseInfo
:
{
bp_type_n
:
''
,
academic_background_n
:
''
,
marital_status_n
:
''
,
bp_type
:
''
,
bp_class
:
this
.
$route
.
params
.
bp_class
,
bp_name
:
''
,
province_name
:
''
,
province_id
:
''
,
city_name
:
''
,
city_id
:
''
,
id_card_no
:
null
,
id_card_date_from
:
''
,
// 身份证有效期从
id_card_date_to
:
''
,
// 身份证有效期到
cell_phone
:
window
.
localStorage
.
getItem
(
'user_phone'
),
living_address
:
''
,
address_on_resident_booklit
:
''
,
marital_status
:
''
,
academic_background
:
''
,
bp_name_sp
:
''
,
id_card_no_sp
:
''
,
// 配偶身份证号
id_card_date_from_sp
:
''
,
// 配偶身份证有效期从
id_card_date_to_sp
:
''
,
// 配偶身份证有效期到
district_id
:
''
,
district_name
:
''
,
spouse_phone
:
''
,
working_place_sp
:
''
,
address_sp
:
''
,
user_phone
:
window
.
localStorage
.
user_phone
,
},
idCardFront
:
''
,
// 身份证正面图片
idCardBack
:
''
,
// 身份证反面图片
idCardFrontSp
:
''
,
// 配偶身份证正面图片
idCardBackSp
:
''
,
// 配偶身份证反面图片
idCardFrontUrlFlag
:
false
,
// 身份证正面图片查看标识,为false则用查询出来的,为true则用拍照出来的
idCardBackUrlFlag
:
false
,
// 身份证反面图片,为false则用查询出来的,为true则用拍照出来的
idCardFrontSpUrlFlag
:
false
,
// 配偶身份证正面图片,为false则用查询出来的,为true则用拍照出来的
idCardBackSpUrlFlag
:
false
,
// 配偶身份证反面图片,为false则用查询出来的,为true则用拍照出来的
bankImg
:
''
,
// 银行卡图片
cddItemList
:
[],
// 资料清单列表
idCardFrontCheck_id
:
''
,
// 身份证正面check_id
idCardBackCheck_id
:
''
,
// 身份证反面check_id
idCardFrontSpCheck_id
:
''
,
// 配偶身份证正面check_id
idCardBackSpCheck_id
:
''
,
// 配偶身份证反面check_id
idCardFrontAttachmentId
:
''
,
// 身份证正面AttachmentId
idCardBackAttachmentId
:
''
,
// 身份证反面AttachmentId
idCardFrontSpAttachmentId
:
''
,
// 配偶身份证正面AttachmentId
idCardBackSpAttachmentId
:
''
,
// 配偶身份证反面AttachmentId
// idCardImgList: [], // 存身份证图片列表
idCardFrontEditFlag
:
false
,
// 身份证正面修改标识,为true则标识已修改,后续需要重新上传此照片
idCardBackEditFlag
:
false
,
// 身份证反面修改标识,为true则标识已修改,后续需要重新上传此照片
idCardFrontSpEditFlag
:
false
,
// 配偶身份证正面修改标识,为true则标识已修改,后续需要重新上传此照片
idCardBackSpEditFlag
:
false
,
// 配偶身份证反面修改标识,为true则标识已修改,后续需要重新上传此照片
isClear
:
false
,
}
},
props
:
{
document_id
:
String
,
document_name
:
String
,
},
watch
:
{
'baseInfo.bp_type_n'
(
newVal
,
oldVal
)
{
let
vm
=
this
if
(
vm
.
baseInfo
.
bp_type
===
'TENANT'
||
vm
.
baseInfo
.
bp_type
===
'GUTA'
)
{
vm
.
isPaople
=
true
vm
.
isMatter
=
false
vm
.
isLesons
=
false
}
else
if
(
vm
.
baseInfo
.
bp_type
===
'AGENT'
||
vm
.
baseInfo
.
bp_type
===
'FACTORY'
)
{
vm
.
isPaople
=
false
vm
.
isMatter
=
false
vm
.
isLesons
=
true
}
else
if
(
vm
.
baseInfo
.
bp_type
===
'OFFICE'
)
{
vm
.
isMatter
=
true
vm
.
isPaople
=
false
vm
.
isLesons
=
false
}
},
'baseInfo.marital_status_n'
:
{
handler
:
function
(
newVal
,
oldVal
)
{
if
(
newVal
===
'已婚'
)
{
this
.
hasSP
=
true
}
else
{
this
.
hasSP
=
false
this
.
baseInfo
.
bp_name_sp
=
''
this
.
baseInfo
.
spouse_phone
=
''
this
.
baseInfo
.
working_place_sp
=
''
this
.
baseInfo
.
address_sp
=
''
}
},
deep
:
true
,
immediate
:
true
,
},
},
created
()
{
this
.
getBpType
()
this
.
getEducationBackground
()
this
.
getMarital
()
this
.
basicInfoQuery
()
this
.
loadItemList
(
true
)
// 附件查询
this
.
getMultipleRole
()
// 获取第二角色
},
actived
()
{
this
.
getBpType
()
this
.
getEducationBackground
()
this
.
getMarital
()
this
.
basicInfoQuery
()
this
.
loadItemList
(
true
)
// 附件查询
this
.
getMultipleRole
()
// 获取第二角色
},
beforeRouteEnter
(
to
,
from
,
next
)
{
// 绑定查询入口
next
(
vm
=>
{
vm
.
isAddNewType
=
false
if
(
from
.
fullPath
===
'/tab/my-info'
||
from
.
fullPath
===
'/tab/function-center'
)
{
if
(
vm
.
$route
.
params
.
status
===
'APPROVED'
)
{
vm
.
isApproved
=
true
}
else
{
vm
.
isApproved
=
false
}
vm
.
isMultiRole
=
vm
.
$route
.
params
.
isMultiRole
vm
.
multipleRole
=
window
.
localStorage
.
getItem
(
'multipleRole'
)
vm
.
list
=
{}
vm
.
multiBpType
=
{}
vm
.
multiBpTypeSelectList
=
[]
// 选择的角色
vm
.
multiRoleList
=
[]
// 查询的角色
vm
.
upload_list
=
[]
// 上传图片列表
vm
.
dowload_list
=
[]
// 下载图片列表
vm
.
img_url
=
{}
vm
.
baseInfo
=
{
bp_type_n
:
''
,
academic_background_n
:
''
,
marital_status_n
:
''
,
bp_type
:
''
,
bp_class
:
vm
.
$route
.
params
.
bp_class
,
bp_name
:
''
,
province_name
:
''
,
province_id
:
''
,
city_name
:
''
,
city_id
:
''
,
id_card_no
:
null
,
id_card_date_from
:
''
,
// 身份证有效期从
id_card_date_to
:
''
,
// 身份证有效期到
cell_phone
:
window
.
localStorage
.
getItem
(
'user_phone'
),
living_address
:
''
,
address_on_resident_booklit
:
''
,
marital_status
:
''
,
academic_background
:
''
,
bp_name_sp
:
''
,
id_card_no_sp
:
''
,
// 配偶身份证号
id_card_date_from_sp
:
''
,
// 配偶身份证有效期从
id_card_date_to_sp
:
''
,
// 配偶身份证有效期到
district_id
:
''
,
district_name
:
''
,
spouse_phone
:
''
,
working_place_sp
:
''
,
address_sp
:
''
,
user_phone
:
window
.
localStorage
.
user_phone
}
vm
.
idCardFront
=
''
// 身份证正面图片
vm
.
idCardBack
=
''
// 身份证反面图片
vm
.
idCardFrontSp
=
''
// 配偶身份证正面图片
vm
.
idCardBackSp
=
''
// 配偶身份证反面图片
vm
.
searchPeople
=
false
vm
.
searchLecens
=
false
vm
.
idCardFrontUpload
=
''
vm
.
idCardBackUpload
=
''
vm
.
idCardFrontSpUpload
=
''
vm
.
idCardBackSptSpUpload
=
''
vm
.
idCardFrontUrlFlag
=
false
// 身份证正面图片查看标识,为false则用查询出来的,为true则用拍照出来的
vm
.
idCardBackUrlFlag
=
false
// 身份证反面图片,为false则用查询出来的,为true则用拍照出来的
vm
.
idCardFrontSpUrlFlag
=
false
// 配偶身份证正面图片,为false则用查询出来的,为true则用拍照出来的
vm
.
idCardBackSpUrlFlag
=
false
// 配偶身份证反面图片,为false则用查询出来的,为true则用拍照出来的
vm
.
cddItemList
=
[]
// 资料清单列表
vm
.
idCardFrontCheck_id
=
''
// 身份证正面check_id
vm
.
idCardBackCheck_id
=
''
// 身份证反面check_id
vm
.
idCardFrontSpCheck_id
=
''
// 配偶身份证正面check_id
vm
.
idCardBackSpCheck_id
=
''
// 配偶身份证反面check_id
vm
.
idCardFrontAttachmentId
=
''
// 身份证正面AttachmentId
vm
.
idCardBackAttachmentId
=
''
// 身份证反面AttachmentId
vm
.
idCardFrontSpAttachmentId
=
''
// 配偶身份证正面AttachmentId
vm
.
idCardBackSpAttachmentId
=
''
// 配偶身份证反面AttachmentId
vm
.
idCardFrontEditFlag
=
false
// 身份证正面修改标识,为true则标识已修改,后续需要重新上传此照片
vm
.
idCardBackEditFlag
=
false
// 身份证反面修改标识,为true则标识已修改,后续需要重新上传此照片
vm
.
idCardFrontSpEditFlag
=
false
// 配偶身份证正面修改标识,为true则标识已修改,后续需要重新上传此照片
vm
.
idCardBackSpEditFlag
=
false
// 配偶身份证反面修改标识,为true则标识已修改,后续需要重新上传此照片
vm
.
isClear
=
false
vm
.
from
=
true
window
.
localStorage
.
setItem
(
'from'
,
true
)
vm
.
basicInfoQuery
()
vm
.
loadItemList
(
true
)
// 附件查询
vm
.
getMultipleRole
()
// 获取第二角色
}
else
if
(
from
.
name
===
'UserBind'
)
{
vm
.
list
=
{}
window
.
localStorage
.
setItem
(
'from'
,
false
)
vm
.
isApproved
=
false
vm
.
from
=
false
vm
.
searchPeople
=
false
vm
.
searchLecens
=
false
vm
.
multiBpType
=
{
bp_type_n
:
''
,
bp_type
:
''
,
}
vm
.
multiBpTypeSelectList
=
[]
// 选择的角色
vm
.
multiRoleList
=
[]
// 查询的角色
vm
.
upload_list
=
[]
// 上传图片列表
vm
.
dowload_list
=
[]
// 下载图片列表
vm
.
img_url
=
{}
vm
.
baseInfo
=
{
bp_type_n
:
''
,
academic_background_n
:
''
,
marital_status_n
:
''
,
bp_type
:
''
,
bp_class
:
vm
.
$route
.
params
.
bp_class
,
bp_name
:
''
,
province_name
:
''
,
province_id
:
''
,
city_name
:
''
,
city_id
:
''
,
id_card_no
:
null
,
id_card_date_from
:
''
,
// 身份证有效期从
id_card_date_to
:
''
,
// 身份证有效期到
cell_phone
:
window
.
localStorage
.
getItem
(
'user_phone'
),
living_address
:
''
,
address_on_resident_booklit
:
''
,
marital_status
:
''
,
academic_background
:
''
,
bp_name_sp
:
''
,
id_card_no_sp
:
''
,
// 配偶身份证号
id_card_date_from_sp
:
''
,
// 配偶身份证有效期从
id_card_date_to_sp
:
''
,
// 配偶身份证有效期到
district_id
:
''
,
district_name
:
''
,
spouse_phone
:
''
,
working_place_sp
:
''
,
address_sp
:
''
,
user_phone
:
window
.
localStorage
.
user_phone
,
}
vm
.
idCardFrontUpload
=
''
vm
.
idCardBackUpload
=
''
vm
.
idCardFrontSpUpload
=
''
vm
.
idCardBackSptSpUpload
=
''
vm
.
idCardFront
=
''
// 身份证正面图片
vm
.
idCardBack
=
''
// 身份证反面图片
vm
.
idCardFrontSp
=
''
// 配偶身份证正面图片
vm
.
idCardBackSp
=
''
// 配偶身份证反面图片
vm
.
idCardFrontUrlFlag
=
false
// 身份证正面图片查看标识,为false则用查询出来的,为true则用拍照出来的
vm
.
idCardBackUrlFlag
=
false
// 身份证反面图片,为false则用查询出来的,为true则用拍照出来的
vm
.
idCardFrontSpUrlFlag
=
false
// 配偶身份证正面图片,为false则用查询出来的,为true则用拍照出来的
vm
.
idCardBackSpUrlFlag
=
false
// 配偶身份证反面图片,为false则用查询出来的,为true则用拍照出来的
vm
.
cddItemList
=
[]
// 资料清单列表
vm
.
idCardFrontCheck_id
=
''
// 身份证正面check_id
vm
.
idCardBackCheck_id
=
''
// 身份证反面check_id
vm
.
idCardFrontSpCheck_id
=
''
// 配偶身份证正面check_id
vm
.
idCardBackSpCheck_id
=
''
// 配偶身份证反面check_id
vm
.
idCardFrontAttachmentId
=
''
// 身份证正面AttachmentId
vm
.
idCardBackAttachmentId
=
''
// 身份证反面AttachmentId
vm
.
idCardFrontSpAttachmentId
=
''
// 配偶身份证正面AttachmentId
vm
.
idCardBackSpAttachmentId
=
''
// 配偶身份证反面AttachmentId
vm
.
idCardFrontEditFlag
=
false
// 身份证正面修改标识,为true则标识已修改,后续需要重新上传此照片
vm
.
idCardBackEditFlag
=
false
// 身份证反面修改标识,为true则标识已修改,后续需要重新上传此照片
vm
.
idCardFrontSpEditFlag
=
false
// 配偶身份证正面修改标识,为true则标识已修改,后续需要重新上传此照片
vm
.
idCardBackSpEditFlag
=
false
// 配偶身份证反面修改标识,为true则标识已修改,后续需要重新上传此照片
vm
.
isClear
=
false
// vm.baseInfo.bp_class = vm.$route.params.bp_class
}
})
},
methods
:
{
// roleCancle () {
// this.inputNum = false
// },
// roleConfirm (e) {
// if (this.peopleList.includes(e)) {
// hlsPopup.showLongCenter('您已添加了该业务经办')
// } else {
// this.peopleList.push(e)
// }
// this.inputNum = false
// },
timeFormat
(
str
)
{
return
`
${
str
.
substring
(
0
,
4
)}
-
${
str
.
substring
(
4
,
6
)}
-
${
str
.
substring
(
6
)}
`
},
deleteBP
(
e
)
{
let
deleteIndex
this
.
multiBpTypeSelectList
.
forEach
((
i
,
index
,
arr
)
=>
{
if
(
arr
[
index
].
bp_type
.
indexOf
(
e
.
bp_type
)
!==
-
1
)
{
deleteIndex
=
index
}
})
this
.
multiBpTypeSelectList
.
splice
(
deleteIndex
,
1
)
this
.
isAddNewType
=
false
},
addNewRole
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'bp_type_save'
let
param
=
{
master
:
{
bp_id
:
vm
.
document_id
,
bp_type
:
vm
.
multiBpType
.
bp_type
,
},
}
hlsPopup
.
showLoading
(
'请稍候'
)
vm
.
$post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
hlsPopup
.
showLongCenter
(
'新增成功'
)
vm
.
isAddNewType
=
false
let
item
=
vm
.
multiBpTypeSelectList
.
pop
()
vm
.
multiRoleList
.
push
(
item
)
vm
.
searchLecens
=
true
vm
.
searchPeople
=
true
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
}
})
},
basicInfoQuery
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'bp_np_info_query'
let
param
=
{
bp_id
:
vm
.
document_id
,
}
hlsPopup
.
showLoading
(
'请稍候'
)
vm
.
$post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
Object
.
assign
(
vm
.
baseInfo
,
res
.
info
)
// vm.baseInfo = res.info
vm
.
from
=
true
vm
.
addRows
(
vm
.
baseInfo
.
address_on_resident_booklit
)
vm
.
addRowsLive
(
vm
.
baseInfo
.
living_address
)
// vm.peopleList = res.info.agent_username.split(',')
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
}
})
},
load_picture
(
check_id
,
index
,
cdd_item
)
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'attachment_list_query'
+
'&index'
+
index
// 附件查询
let
param
=
{
check_id
:
check_id
,
}
hlsPopup
.
showLoading
(
'请稍候'
)
vm
.
$post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
res
.
lists
.
forEach
(
item
=>
{
item
[
'url'
]
=
process
.
env
.
filePath
+
'attachment_id='
+
item
.
attachment_id
+
'&access_token='
+
window
.
localStorage
.
access_token
})
switch
(
cdd_item
)
{
case
'NP_ID_CARD_F'
:
// 承租人身份证正面
if
(
!
vm
.
idCardFrontUrlFlag
)
{
vm
.
idCardFront
=
res
.
lists
[
0
].
url
}
vm
.
idCardFrontAttachmentId
=
res
.
lists
[
0
].
attachment_id
break
case
'NP_ID_CARD_B'
:
// 承租人身份证背面
if
(
!
vm
.
idCardBackUrlFlag
)
{
vm
.
idCardBack
=
res
.
lists
[
0
].
url
}
vm
.
idCardBackAttachmentId
=
res
.
lists
[
0
].
attachment_id
break
case
'MATE_ID_CARD_F'
:
// 配偶身份证正面
if
(
!
vm
.
idCardFrontSpUrlFlag
)
{
vm
.
idCardFrontSp
=
res
.
lists
[
0
].
url
}
vm
.
idCardFrontSpAttachmentId
=
res
.
lists
[
0
].
attachment_id
break
case
'MATE_ID_CARD_B'
:
// 配偶身份证背面
if
(
!
vm
.
idCardBackSpUrlFlag
)
{
vm
.
idCardBackSp
=
res
.
lists
[
0
].
url
}
vm
.
idCardBackSpAttachmentId
=
res
.
lists
[
0
].
attachment_id
break
default
:
vm
.
dowload_list
.
push
(
res
.
lists
)
}
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
}
})
},
async
verified
(
flag
)
{
this
.
dowload_list
=
[]
// 保存之前将图片下载列表清空,防止出现重复的图片
this
.
upload_list
=
[]
// 保存之前将待上传列表清空,防止出现重复的图片
let
res
=
await
this
.
saveWord
()
if
(
res
)
{
// 查询资料清单
this
.
loadItemList
(
flag
)
}
},
loadItemList
(
flag
)
{
// flag用来判断是否需要加载图片文件
let
vm
=
this
let
bpId
=
this
.
document_id
if
(
bpId
===
'undefined'
)
{
bpId
=
null
}
let
url
=
process
.
env
.
basePath
+
'prj_cdd_check_list'
let
param
=
{
master
:
{
document_id
:
bpId
,
document_table
:
'HLS_BP_MASTER'
,
tab_group
:
'HLS_NP'
,
},
}
// vm.hlsPopup.showLoading('请稍候')
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
// vm.hlsPopup.hideLoading()
if
(
res
.
result
===
'S'
)
{
vm
.
cddItemList
=
[]
var
listTemp
=
[...
res
.
lists
]
listTemp
.
forEach
(
item
=>
{
switch
(
item
.
cdd_item
)
{
case
'NP_ID_CARD_F'
:
// 承租人身份证正面
vm
.
idCardFrontCheck_id
=
item
.
check_id
break
case
'NP_ID_CARD_B'
:
// 承租人身份证背面
vm
.
idCardBackCheck_id
=
item
.
check_id
break
case
'MATE_ID_CARD_F'
:
// 配偶身份证正面
vm
.
idCardFrontSpCheck_id
=
item
.
check_id
break
case
'MATE_ID_CARD_B'
:
// 配偶身份证背面
vm
.
idCardBackSpCheck_id
=
item
.
check_id
break
case
'BANK_CARD'
:
break
default
:
vm
.
cddItemList
.
push
(
item
)
}
})
// 查询图片
if
(
flag
)
{
listTemp
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
cdd_item
!==
'HOUSE_CARD'
||
item
.
cdd_item
!==
'REAL_EST_CERTIFICATE'
||
item
.
cdd_item
!==
'CAR_CARD'
||
item
.
cdd_item
!==
'ASSETS_CARD'
||
item
.
cdd_item
!==
'FAMILY_REGISTER'
||
item
.
cdd_item
!==
'MARITAL STATUS'
)
{
vm
.
load_picture
(
item
.
check_id
,
index
,
item
.
cdd_item
)
}
})
}
if
(
vm
.
idCardFrontEditFlag
)
{
vm
.
idCardFrontUrlFlag
=
true
vm
.
delete_pic_to_ocr
(
vm
.
idCardFrontAttachmentId
)
// 先删除之前识别的图片
// 身份证正面图片已修改,重新上传
let
list
=
[]
let
obj
=
{
pkvalue
:
vm
.
idCardFrontCheck_id
,
source_type
:
'PRJ_CDD_ITEM_CHECK'
,
picture
:
''
,
check_id
:
vm
.
idCardFrontCheck_id
,
filePath
:
vm
.
idCardFrontUpload
,
attachment_id
:
''
,
user_id
:
1
,
fileName
:
'自然人身份证正面'
,
}
list
.
push
(
obj
)
vm
.
save_picture
(
list
)
vm
.
idCardFrontEditFlag
=
false
// 置为false,防止再次保存重复上传,只有重新识别才会重新上传
}
if
(
vm
.
idCardBackEditFlag
)
{
vm
.
idCardBackUrlFlag
=
true
vm
.
delete_pic_to_ocr
(
vm
.
idCardBackAttachmentId
)
// 先删除之前识别的图片
// 身份证反面图片已修改,重新上传
let
list
=
[]
let
obj
=
{
pkvalue
:
vm
.
idCardBackCheck_id
,
source_type
:
'PRJ_CDD_ITEM_CHECK'
,
picture
:
''
,
check_id
:
vm
.
idCardBackCheck_id
,
filePath
:
vm
.
idCardBackUpload
,
attachment_id
:
''
,
user_id
:
1
,
fileName
:
'自然人身份证背面'
,
}
list
.
push
(
obj
)
vm
.
save_picture
(
list
)
vm
.
idCardBackEditFlag
=
false
// 置为false,防止再次保存重复上传,只有重新识别才会重新上传
}
if
(
vm
.
idCardFrontSpEditFlag
)
{
vm
.
idCardFrontSpUrlFlag
=
true
vm
.
delete_pic_to_ocr
(
vm
.
idCardFrontSpAttachmentId
)
// 先删除之前识别的图片
// 配偶身份证正面图片已修改,重新上传
let
list
=
[]
let
obj
=
{
pkvalue
:
vm
.
idCardFrontSpCheck_id
,
source_type
:
'PRJ_CDD_ITEM_CHECK'
,
picture
:
''
,
check_id
:
vm
.
idCardFrontSpCheck_id
,
filePath
:
vm
.
idCardFrontSpUpload
,
attachment_id
:
''
,
user_id
:
1
,
fileName
:
'配偶身份证正面'
,
}
list
.
push
(
obj
)
vm
.
save_picture
(
list
)
vm
.
idCardFrontSpEditFlag
=
false
// 置为false,防止再次保存重复上传,只有重新识别才会重新上传
}
if
(
vm
.
idCardBackSpEditFlag
)
{
vm
.
idCardBackSpUrlFlag
=
true
vm
.
delete_pic_to_ocr
(
vm
.
idCardBackSpAttachmentId
)
// 先删除之前识别的图片
// 配偶身份证背面图片已修改,重新上传
let
list
=
[]
let
obj
=
{
pkvalue
:
vm
.
idCardBackSpCheck_id
,
source_type
:
'PRJ_CDD_ITEM_CHECK'
,
picture
:
''
,
check_id
:
vm
.
idCardBackSpCheck_id
,
filePath
:
vm
.
idCardBackSptSpUpload
,
attachment_id
:
''
,
user_id
:
1
,
fileName
:
'配偶身份证背面'
,
}
list
.
push
(
obj
)
vm
.
save_picture
(
list
)
vm
.
idCardBackSpEditFlag
=
false
// 置为false,防止再次保存重复上传,只有重新识别才会重新上传
}
}
})
},
async
getMultipleRole
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'bp_role_query'
let
flag
=
vm
.
checkHasmultiple
()
let
param
=
{
master
:
{
bp_id
:
vm
.
document_id
,
bp_type
:
window
.
localStorage
.
getItem
(
'bp_type'
),
},
}
if
(
flag
)
{
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
if
(
res
.
result
===
'S'
)
{
vm
.
multiRoleList
=
res
.
lists
if
(
res
.
lists
.
length
===
0
||
res
.
lists
.
length
===
1
)
{
vm
.
hasMultiRole
=
false
}
else
if
(
res
.
lists
.
length
===
2
)
{
vm
.
hasMultiRole
=
true
}
if
(
res
.
lists
.
length
!==
0
)
{
vm
.
searchPeople
=
res
.
lists
.
some
(
item
=>
{
return
item
.
bp_type
===
'TENANT'
||
item
.
bp_type
===
'GUTA'
})
vm
.
searchLecens
=
res
.
lists
.
some
(
item
=>
{
return
item
.
bp_type
===
'AGENT'
})
}
}
})
}
},
async
checkHasmultiple
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'bp_role_check'
let
param
=
{
bp_id
:
vm
.
document_id
,
}
let
res
=
await
vm
.
hlsHttp
.
post
(
url
,
param
)
if
(
res
.
result
===
'S'
)
{
// vm.hasMultiRole = true
return
true
}
else
{
vm
.
hasMultiRole
=
false
return
false
}
},
// 基本信息保存前校验
bindCheck
()
{
let
vm
=
this
var
business_num
=
''
if
(
vm
.
baseInfo
.
bp_type
===
'TENANT'
||
vm
.
baseInfo
.
bp_type
===
'GUTA'
)
{
business_num
=
vm
.
baseInfo
.
agent_username
}
else
if
(
vm
.
baseInfo
.
bp_type
===
'AGENT'
||
vm
.
baseInfo
.
bp_type
===
'FACTORY'
)
{
business_num
=
vm
.
baseInfo
.
business_license_num
}
else
if
(
vm
.
baseInfo
.
bp_type
===
'OFFICE'
)
{
business_num
=
vm
.
baseInfo
.
business_license_num
}
window
.
localStorage
.
setItem
(
'business_num'
,
business_num
)
let
url
=
process
.
env
.
basePath
+
'bp_bind_check'
let
param
=
{
'master'
:
{
bp_class
:
'NP'
,
bp_type
:
vm
.
baseInfo
.
bp_type
,
business_num
:
business_num
,
},
}
vm
.
hlsPopup
.
showLoading
(
'正在校验数据有效性'
)
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
vm
.
$router
.
push
({
name
:
'NPInvoiceInfo'
,
})
}
else
{
hlsPopup
.
showError
(
res
.
message
)
}
})
},
async
saveProtocol
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'bp_np_bind_save'
let
param
=
{
master
:
this
.
baseInfo
,
}
vm
.
hlsPopup
.
showLoading
(
'保存中!'
)
let
res
=
await
vm
.
hlsHttp
.
post
(
url
,
param
)
if
(
res
.
result
===
'S'
)
{
hlsPopup
.
hideLoading
()
// vm.hlsPopup.showSuccess('保存成功,请去维护附件信息')
vm
.
isSave
=
true
window
.
localStorage
.
setItem
(
'user_id'
,
res
.
bp_id
)
window
.
localStorage
.
setItem
(
'bp_id'
,
res
.
bp_id
)
window
.
localStorage
.
setItem
(
'bp_name'
,
vm
.
baseInfo
.
bp_name
)
window
.
localStorage
.
setItem
(
'bp_type'
,
vm
.
baseInfo
.
bp_type
)
vm
.
bindCheck
()
return
res
.
bp_id
}
else
{
hlsPopup
.
hideLoading
()
vm
.
hlsPopup
.
showLongCenter
(
res
.
message
)
}
},
async
saveWord
()
{
let
vm
=
this
if
(
!
vm
.
baseInfo
.
bp_type
)
{
vm
.
hlsPopup
.
showLongCenter
(
'客户类型不能为空!'
)
}
else
if
(
vm
.
isPaople
&&
!
vm
.
baseInfo
.
agent_username
)
{
vm
.
hlsPopup
.
showLongCenter
(
'业务经办员工代码不能为空!'
)
}
else
if
(
!
vm
.
isPaople
&&
!
vm
.
baseInfo
.
business_license_num
)
{
vm
.
hlsPopup
.
showLongCenter
(
'营业执照号不能为空!'
)
}
else
if
(
!
vm
.
baseInfo
.
bp_name
)
{
vm
.
hlsPopup
.
showLongCenter
(
'客户姓名不能为空!'
)
}
else
if
(
!
vm
.
baseInfo
.
id_card_no
)
{
vm
.
hlsPopup
.
showLongCenter
(
'身份证号不能为空!'
)
}
else
if
(
!
vm
.
baseInfo
.
id_card_date_from
)
{
vm
.
hlsPopup
.
showLongCenter
(
'身份证有效期从不能为空!'
)
}
else
if
(
!
vm
.
baseInfo
.
id_card_date_to
)
{
vm
.
hlsPopup
.
showLongCenter
(
'身份证有效期到不能为空!'
)
}
else
if
(
!
vm
.
baseInfo
.
cell_phone
)
{
vm
.
hlsPopup
.
showLongCenter
(
'手机号不能为空!'
)
}
else
if
(
!
vm
.
baseInfo
.
living_address
)
{
vm
.
hlsPopup
.
showLongCenter
(
'联系地址不能为空!'
)
}
else
if
(
!
vm
.
baseInfo
.
address_on_resident_booklit
)
{
vm
.
hlsPopup
.
showLongCenter
(
'户籍地址不能为空!'
)
}
else
if
(
!
vm
.
baseInfo
.
academic_background
)
{
vm
.
hlsPopup
.
showLongCenter
(
'学历不能为空!'
)
}
else
if
(
!
vm
.
baseInfo
.
marital_status
&&
(((
vm
.
baseInfo
.
bp_type
===
'TENANT'
||
vm
.
baseInfo
.
bp_type
===
'GUTA'
)
&&
!
vm
.
multipleRole
)
||
vm
.
multipleRole
===
'TENANT'
||
vm
.
multipleRole
===
'GUTA'
))
{
vm
.
hlsPopup
.
showLongCenter
(
'婚姻状况不能为空!'
)
}
else
if
(
vm
.
baseInfo
.
marital_status_n
===
'已婚'
&&
!
vm
.
baseInfo
.
bp_name_sp
)
{
vm
.
hlsPopup
.
showLongCenter
(
'配偶姓名不能为空!'
)
}
else
if
(
vm
.
baseInfo
.
marital_status_n
===
'已婚'
&&
!
vm
.
baseInfo
.
id_card_no_sp
)
{
vm
.
hlsPopup
.
showLongCenter
(
'配偶身份证号不能为空!'
)
}
else
if
(
vm
.
baseInfo
.
marital_status_n
===
'已婚'
&&
!
vm
.
baseInfo
.
id_card_date_from_sp
)
{
vm
.
hlsPopup
.
showLongCenter
(
'配偶身份证有效期从不能为空!'
)
}
else
if
(
vm
.
baseInfo
.
marital_status_n
===
'已婚'
&&
!
vm
.
baseInfo
.
id_card_date_to_sp
)
{
vm
.
hlsPopup
.
showLongCenter
(
'配偶身份证有效期到不能为空!'
)
}
else
if
(
vm
.
baseInfo
.
marital_status_n
===
'已婚'
&&
!
vm
.
baseInfo
.
spouse_phone
)
{
vm
.
hlsPopup
.
showLongCenter
(
'配偶手机号不能为空!'
)
}
else
if
(
vm
.
baseInfo
.
marital_status_n
===
'已婚'
&&
!
vm
.
baseInfo
.
working_place_sp
)
{
vm
.
hlsPopup
.
showLongCenter
(
'配偶工作单位不能为空!'
)
}
else
if
(
vm
.
baseInfo
.
marital_status_n
===
'已婚'
&&
!
vm
.
baseInfo
.
address_sp
)
{
vm
.
hlsPopup
.
showLongCenter
(
'配偶联系地址不能为空!'
)
}
else
if
(
!
vm
.
hlsUtil
.
phoneNumber
(
vm
.
baseInfo
.
cell_phone
))
{
vm
.
hlsPopup
.
showLongCenter
(
'手机号码有误!'
)
}
else
{
let
bpId
=
await
vm
.
saveProtocol
()
return
true
}
},
// 图片上传入口
imgUploadShow
(
description
,
check_id
)
{
let
vm
=
this
// vm.upload_list = []
hlsPopup
.
showActionSheet
({
titleText
:
'请选择照片'
,
buttonArray
:
[
'拍照'
,
'从相册取'
],
callback
:
index
=>
{
if
(
index
===
0
)
{
vm
.
imgUploadOpenCamera
(
description
,
check_id
)
}
else
{
vm
.
imgUploadTakePicture
(
description
,
check_id
)
}
},
})
},
imgUploadOpenCamera
(
description
,
check_id
)
{
let
vm
=
this
let
obj
=
{
pkvalue
:
check_id
,
source_type
:
'PRJ_CDD_ITEM_CHECK'
,
picture
:
''
,
check_id
:
check_id
,
filePath
:
''
,
attachment_id
:
''
,
user_id
:
1
,
fileName
:
description
+
'_'
+
new
Date
().
getTime
(),
}
let
cameraoptions
=
{
quality
:
100
,
}
let
success
=
function
(
imgdata
)
{
obj
.
picture
=
hlsUtil
.
convertImageUrl
(
imgdata
)
obj
.
filePath
=
imgdata
let
list
=
[]
list
.
push
(
obj
)
// vm.upload_list.push(obj)
// 拍完一张立马执行保存图片逻辑
vm
.
save_picture
(
list
)
}
let
error
=
function
()
{
hlsPopup
.
showLongCenter
(
'请拍照'
)
}
hlsUtil
.
openCamera
(
cameraoptions
,
success
,
error
)
},
imgUploadTakePicture
(
description
,
check_id
)
{
let
vm
=
this
let
cameraoptions
=
{
quality
:
100
,
}
let
success
=
function
(
imgUrl
)
{
var
list
=
[]
for
(
let
i
=
0
;
i
<
imgUrl
.
length
;
i
++
)
{
let
obj
=
{
pkvalue
:
check_id
,
source_type
:
'PRJ_CDD_ITEM_CHECK'
,
picture
:
''
,
check_id
:
check_id
,
filePath
:
''
,
attachment_id
:
''
,
user_id
:
1
,
fileName
:
description
+
'_'
+
new
Date
().
getTime
(),
}
obj
.
picture
=
hlsUtil
.
convertImageUrl
(
imgUrl
[
i
])
obj
.
filePath
=
imgUrl
[
i
]
list
.
push
(
obj
)
}
// 拍完一张立马执行保存图片逻辑
vm
.
save_picture
(
list
)
}
let
error
=
function
()
{}
vm
.
hlsUtil
.
takePicture
(
cameraoptions
,
success
,
error
)
},
// 图片保存
save_picture
(
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()
hlsPopup.showLongCenter('图片上传成功') */
}
},
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
.
upload_list
.
push
(
list
[
j
])
break
}
}
}
else
{
hlsPopup
.
hideLoading
()
}
}
if
(
!
list
[
i
].
attachment_id
)
{
attLength
++
hlsUtil
.
fileUploadSvc
(
list
[
i
],
uploadSuccess
)
}
}
}
else
{
hlsPopup
.
hideLoading
()
}
},
// 移除图片
remove_pic
(
attachment_id
,
index
)
{
let
vm
=
this
var
delete_list
=
[]
let
obj
=
{
attachment_id
:
attachment_id
}
delete_list
.
push
(
obj
)
let
url
=
process
.
env
.
basePath
+
'app_delete_attment'
// 附件删除
let
param
=
{
picturelist
:
delete_list
,
}
hlsPopup
.
showLoading
(
'请稍候'
)
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
hlsPopup
.
showLongCenter
(
'删除成功!'
)
vm
.
remove_upload_list
(
attachment_id
,
index
)
}
else
if
(
res
.
result
===
'E'
)
{
hlsPopup
.
showShortCenter
(
res
.
message
)
}
})
},
remove_upload_list
(
attachment_id
,
index
)
{
let
vm
=
this
vm
.
upload_list
.
remove
(
index
)
vm
.
upload_list
.
sort
()
},
// 删除图片
delete_pic
(
attachment_id
)
{
let
vm
=
this
var
delete_list
=
[]
let
obj
=
{
attachment_id
:
attachment_id
}
delete_list
.
push
(
obj
)
let
url
=
process
.
env
.
basePath
+
'app_delete_attment'
// 附件删除
let
param
=
{
picturelist
:
delete_list
,
}
hlsPopup
.
showLoading
(
'请稍候'
)
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
hlsPopup
.
showLongCenter
(
'删除成功!'
)
vm
.
remove_dowload_list
(
attachment_id
)
}
else
if
(
res
.
result
===
'E'
)
{
hlsPopup
.
showShortCenter
(
res
.
message
)
}
})
},
// 身份证重新识别后,先删除之前的照片
delete_pic_to_ocr
(
attachment_id
)
{
let
vm
=
this
var
delete_list
=
[]
let
obj
=
{
attachment_id
:
attachment_id
}
delete_list
.
push
(
obj
)
let
url
=
process
.
env
.
basePath
+
'app_delete_attment'
// 附件删除
let
param
=
{
picturelist
:
delete_list
,
}
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
}
else
if
(
res
.
result
===
'E'
)
{
}
})
},
remove_dowload_list
(
attachment_id
)
{
let
vm
=
this
for
(
let
i
=
0
;
i
<
vm
.
dowload_list
.
length
;
i
++
)
{
let
list
=
vm
.
dowload_list
[
i
]
for
(
let
j
=
0
;
j
<
list
.
length
;
j
++
)
{
let
li
=
list
[
j
]
if
(
parseFloat
(
li
.
attachment_id
)
===
parseFloat
(
attachment_id
))
{
list
.
remove
(
j
)
break
}
}
}
vm
.
dowload_list
.
sort
()
},
addRows
(
e
)
{
if
(
e
)
{
let
addNum
=
Math
.
ceil
(
e
.
length
/
16
)
// if (addNum === 0) {
// this.$refs.myTestarea.rows = 1
// } else if (addNum >= addNum - 1 && addNum
<
addNum
+
1
)
{
// this.$refs.myTestarea.rows = addNum + 1
// }
this
.
$refs
.
myTestarea
.
rows
=
addNum
}
},
addRowsLive
(
e
)
{
if
(
e
)
{
let
addNum
=
Math
.
ceil
(
e
.
length
/
16
)
// if (addNum === 0) {
// this.$refs.myTestareaLive.rows = 1
// } else if (addNum >= addNum - 1 && addNum
<
addNum
+
1
)
{
// this.$refs.myTestareaLive.rows = addNum + 1
// }
this
.
$refs
.
myTestareaLive
.
rows
=
addNum
}
},
selectIdType
()
{
let
vm
=
this
let
List
if
(
vm
.
baseInfo
.
bp_type
===
'TENANT'
)
{
List
=
vm
.
typeList
.
filter
(
i
=>
{
return
i
.
code
===
'GUTA'
||
i
.
code
===
'AGENT'
})
}
else
if
(
vm
.
baseInfo
.
bp_type
===
'GUTA'
)
{
List
=
vm
.
typeList
.
filter
(
i
=>
{
return
i
.
code
===
'TENANT'
||
i
.
code
===
'AGENT'
})
}
else
if
(
vm
.
baseInfo
.
bp_type
===
'AGENT'
)
{
List
=
vm
.
typeList
.
filter
(
i
=>
{
return
i
.
code
===
'TENANT'
||
i
.
code
===
'GUTA'
})
}
vm
.
hlsPopup
.
selectList
({
list
:
List
,
code
:
'bp_type'
,
object
:
{},
returnItem
:
function
(
index
,
obj
)
{
vm
.
multiBpType
.
bp_type
=
obj
.
bp_type
vm
.
multiBpType
.
bp_type_n
=
obj
.
bp_type_n
let
selectList
=
false
let
queryList
=
false
let
baseInfo
=
false
vm
.
multiBpTypeSelectList
.
forEach
((
item
,
index
,
arr
)
=>
{
if
(
item
.
bp_type
===
vm
.
multiBpType
.
bp_type
)
{
selectList
=
true
}
})
vm
.
multiRoleList
.
forEach
((
item
,
index
,
arr
)
=>
{
if
(
item
.
bp_type
===
vm
.
multiBpType
.
bp_type
)
{
queryList
=
true
}
})
if
(
vm
.
baseInfo
.
bp_type
===
vm
.
multiBpType
.
bp_type
)
{
baseInfo
=
true
}
if
(
baseInfo
||
queryList
||
selectList
)
{
hlsPopup
.
showLongCenter
(
'您已经添加了该角色'
)
vm
.
isAddNewType
=
false
vm
.
isSelected
=
false
}
else
{
vm
.
multiBpTypeSelectList
.
push
(
vm
.
multiBpType
)
vm
.
isAddNewType
=
true
vm
.
isSelected
=
true
}
},
})
},
selectIdTypeOnly
(
e
)
{
let
vm
=
this
vm
.
hlsPopup
.
selectList
({
list
:
vm
.
typeList
,
code
:
'bp_type'
,
object
:
{},
returnItem
:
function
(
index
,
obj
)
{
vm
.
baseInfo
.
bp_type
=
obj
.
bp_type
vm
.
baseInfo
.
bp_type_n
=
obj
.
bp_type_n
},
})
vm
.
isSelected
=
true
},
selectBackType
(
e
)
{
let
vm
=
this
vm
.
hlsPopup
.
selectList
({
list
:
vm
.
backList
,
code
:
'bp_type'
,
object
:
{},
returnItem
:
function
(
index
,
obj
)
{
vm
.
baseInfo
.
academic_background
=
obj
.
bp_type
vm
.
baseInfo
.
academic_background_n
=
obj
.
bp_type_n
},
})
},
selectMarital
(
e
)
{
let
vm
=
this
vm
.
hlsPopup
.
selectList
({
list
:
vm
.
maritalList
,
code
:
'bp_type'
,
object
:
{},
returnItem
:
function
(
index
,
obj
)
{
vm
.
baseInfo
.
marital_status
=
obj
.
bp_type
vm
.
baseInfo
.
marital_status_n
=
obj
.
bp_type_n
},
})
},
getMarital
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'bp_marital_status_query'
let
param
=
{}
vm
.
hlsPopup
.
showLoading
(
'请稍候'
)
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
vm
.
maritalList
=
res
.
lists
.
map
(
item
=>
{
return
{
code
:
item
.
marital_status
,
code_name
:
item
.
marital_status_n
,
}
})
}
})
},
getEducationBackground
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'bp_academic_bg_query'
let
param
=
{}
vm
.
hlsPopup
.
showLoading
(
'请稍候'
)
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
vm
.
backList
=
res
.
lists
.
map
(
item
=>
{
return
{
code
:
item
.
academic_bg
,
code_name
:
item
.
academic_bg_n
,
}
})
}
})
},
fileSuccess
(
fileList
,
result
)
{
this
.
fileList
=
fileList
this
.
fileList
.
forEach
((
itemFile
,
index
)
=>
{
if
(
result
.
response
&&
itemFile
.
file
&&
!
itemFile
.
attachment_id
&&
result
.
response
.
fileName
===
itemFile
.
file
.
name
)
{
itemFile
.
attachment_id
=
result
.
response
.
attachment_id
}
})
},
getBpType
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'bp_type_select'
let
param
=
{}
vm
.
hlsPopup
.
showLoading
(
'请稍候'
)
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
vm
.
typeList
=
res
.
lists
.
map
(
item
=>
{
return
{
code
:
item
.
bp_type
,
code_name
:
item
.
bp_type_n
,
}
})
}
})
},
// 查看大图
showBigPicture
(
pic
)
{
console
.
log
(
123123123123
)
let
vm
=
this
vm
.
hlsPopup
.
showBigPicture
({
imgUrl
:
pic
,
width
:
'100% !important'
,
})
},
},
}
</
script
>
<
style
lang=
"less"
scoped
>
#np-base-info{
font-family: PingFangSC-Regular;
input::placeholder {
color: #b4b4b5;
}
textarea::placeholder {
color: #b4b4b5;
}
textarea {
text-align: right;
color: #666;
resize: none;
}
.add-people{
display: flex;
justify-content: flex-start;
align-items: center;
img{
// width:23px;
flex-shrink:0;
// margin-left:10px;
float: right;
}
.people-list{
width:100%;
display: flex;
justify-content: flex-start;
flex-flow: row wrap;
}
span {
// display: inline-block;
padding: 1px 5px;
border-radius: 5px;
text-align: center;
line-height: 20px;
background-color: rgba(220, 220, 221, 0.26);
color: #666;
margin-right: 5px;
margin-top: 3px;
font-size: 14px;
}
}
.type-save{
color: #fff;
width:80px;
height: 25px;
font-size:10px;
border-radius: 5px;
margin:5px 15px 5px 0px;
float: right;
background-color: @headerColor;
}
.typeBP {
span {
display: inline-block;
padding: 1px 5px;
border-radius: 5px;
text-align: center;
line-height: 20px;
background-color: rgba(220, 220, 221, 0.26);
color: #666;
margin-right: 5px;
margin-top: 3px;
}
img {
width: 10px;
height: 10px;
margin-left: 1px;
}
}
.tax {
width: 351px;
height: 78px;
background: #fff;
margin: 0 auto;
margin-bottom: 30px;
display: flex;
align-items: center;
.left-img {
width: 24px;
height: 28px;
flex: 2.5;
padding-left: 24px;
}
div {
flex: 25;
padding-left: 24px;
span {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #383f45;
letter-spacing: 0;
line-height: 22px;
}
p {
font-family: PingFangSC-Regular;
font-size: 12px;
color: rgba(56, 63, 69, 0.5);
letter-spacing: 0;
line-height: 22px;
}
}
.right-img {
width: 10px;
height: 16px;
flex: 1;
padding-right: 21px;
}
}
.content {
height: 76%;
.userInfo {
height: 45px;
line-height: 45px;
color: @headerColor;
margin-top: -10px;
font-size: 15px;
margin-left: 16px;
position: relative;
}
.userInfo::before {
content: "";
display: block;
width: 4px;
height: 20px;
background-color: @headerColor;
position: absolute;
left: -15px;
top: 12px;
}
.upload-id-card {
height: 176px;
background-color: #fff;
span {
display: block;
color: #656464;
margin-left: 16px;
padding-top: 16px;
font-size: 13px;
}
.upload-box {
display: flex;
justify-content: center;
margin-top: 15px;
div {
width: 172px;
height: 120px;
border: 1px dashed #dcdcdd;
text-align: center;
font-size: 14px;
color: #b4b4b5;
.front,
.back {
width: 172px;
height: 120px;
}
}
div:nth-of-type(2) {
margin-left: 7px;
}
img {
margin-top: 32px;
width: 58px;
height: 45px;
}
p {
margin-top: 12px;
font-size: 13px;
}
}
}
.second-part {
margin-top: 9px;
.auto {
color: #b4b4b5;
}
}
.card {
padding-bottom: 8px;
height: auto;
background-color: #fff;
margin-bottom: 10px;
display: flex;
flex-direction: column;
span {
color: #656464;
font-size: 13px;
line-height: 18px;
padding-top: 8px;
display: block;
margin-left: 16px;
}
.img-content {
/*display: flex;
flex-flow: row wrap;
justify-content: flex-start;
align-items: center;*/
}
.plus {
display: flex;
justify-content: center;
align-items: center;
}
.card-upload {
position: relative;
width: 80px;
height: 80px;
border: 1px dashed #dcdcdd;
/* display: flex;
justify-content: center;
align-items: center;*/
margin-top: 12px;
margin-left: 16px;
float: left;
.close {
/* position: relative;
color: #F96F68;
margin-top: -100%;
margin-left: -10%;*/
position: absolute;
color: #f96f68;
top: -6px;
right: -6px;
img {
width: 14px;
height: 14px;
}
}
img {
/*width: 88px;
height: 88px;*/
width: 100%;
height: 100%;
}
.upload-btn {
width: 24px;
height: 24px;
}
}
}
}
.put {
width: 175px;
height: 45px;
color: #fdb62f;
border-radius: 4px;
border: 1px solid #fdb62f;
background-color: #fafafa;
}
.put-approved {
width: 90%;
height: 45px;
color: #fff;
border-radius: 4px;
background-color: @headerColor;
}
.save {
color: #fff;
border-radius: 4px;
background-color: @headerColor;
}
.front,
.photo,
.backphoto,
.back {
display: none;
}
.modal-content {
width: 100%;
height: 75%;
position: absolute;
top: 25%;
background-color: #fff;
overflow-y: scroll;
.modal-content-add-top {
width: 320px;
height: 34px;
line-height: 34px;
padding-top: 10px;
background-color: #fff;
padding-bottom: 40px;
position: fixed;
left: 28px;
span {
font-family: PingFangSC-Semibold;
font-size: 15px;
color: @headerColor;
letter-spacing: 0.47px;
}
img {
width: 34px;
height: 34px;
float: right;
}
}
.addBack {
display: block;
width: 320px;
margin: 0 auto;
margin-top: 50px;
border-radius: 6px;
margin-bottom: 17px;
}
.card-Info {
margin-bottom: 220px;
}
}
.add-card {
width: 358px;
height: 40px;
background: @headerColor;
border-radius: 4px;
color: #fff;
}
}
.modal {
background-color: rgba(0, 0, 0, 0) !important;
}
.hls-notify-wrap {
height: 50px;
line-height: 34px !important;
}
</
style
>
src/pages/functionCenter/component/billInfo.vue
0 → 100644
View file @
31f82198
<
template
>
<h-view
id=
"np-invoice"
>
<h-content>
<list-item
:item-height=
"44"
>
<item
:showArrow=
"true"
>
<div
slot=
"name"
>
纳税人类型
</div>
<input
slot=
"content"
v-model=
"invoiceInfo.taxpayer_type_n"
type=
"text"
readonly
placeholder=
"请选择"
onfocus=
"this.blur()"
@
click=
"selectTaxpayer"
>
</item>
<item
:showArrow=
"true"
>
<div
slot=
"name"
>
发票类型
</div>
<input
slot=
"content"
v-model=
"invoiceInfo.invoice_kind_n"
type=
"text"
readonly
placeholder=
"请选择"
onfocus=
"this.blur()"
@
click=
"selectInvoiceType"
>
</item>
<item>
<div
slot=
"name"
>
发票抬头
</div>
<input
slot=
"content"
v-model=
"invoiceInfo.invoice_title"
type=
"text"
placeholder=
""
>
</item>
<item>
<div
slot=
"name"
>
发票地址
</div>
<textarea
slot=
"content"
ref=
"myTestarea"
readonly
v-model=
"invoiceInfo.invoice_adds"
cols=
"22"
rows=
"1"
type=
"text"
placeholder=
""
@
input=
"addRows(invoiceInfo.invoice_adds)"
/>
</item>
<item>
<div
slot=
"name"
>
开户电话
</div>
<input
slot=
"content"
v-model=
"invoiceInfo.invoice_tel"
type=
"text"
readonly
placeholder=
""
>
</item>
<item>
<div
slot=
"name"
>
发票开户行
</div>
<textarea
slot=
"content"
ref=
"myTestareaLive"
v-model=
"invoiceInfo.open_bank"
readonly
cols=
"22"
rows=
"1"
type=
"text"
placeholder=
""
@
input=
"addRowsLive(invoiceInfo.open_bank)"
/>
</item>
<item>
<div
slot=
"name"
>
开户行账号
</div>
<input
slot=
"content"
v-model=
"invoiceInfo.open_account"
type=
"number"
pattern=
"\d*"
readonly
placeholder=
""
>
</item>
</list-item>
</h-content>
</h-view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
value
:
''
,
invoicList
:
[],
taxpayerList
:
[],
invoiceInfo
:
{
bp_id
:
null
,
bp_class
:
null
,
taxpayer_type_n
:
''
,
invoice_kind_n
:
''
,
taxpayer_type
:
''
,
invoice_kind
:
''
,
invoice_title
:
''
,
invoice_adds
:
''
,
invoice_tel
:
''
,
open_bank
:
''
,
open_account
:
''
,
},
}
},
beforeRouteEnter
(
to
,
from
,
next
)
{
next
(
vm
=>
{
if
(
from
.
name
===
'NPBaseInfo'
)
{
vm
.
invoiceInfo
=
{
bp_id
:
null
,
bp_class
:
null
,
taxpayer_type_n
:
''
,
invoice_kind_n
:
''
,
taxpayer_type
:
''
,
invoice_kind
:
''
,
invoice_title
:
''
,
invoice_adds
:
''
,
invoice_tel
:
''
,
open_bank
:
''
,
open_account
:
''
,
}
vm
.
getInvoice
()
}
})
},
props
:
{
document_id
:
String
,
document_name
:
String
,
},
created
()
{
this
.
getInvoiceType
()
this
.
getTaxpayer
()
this
.
getInvoice
()
},
methods
:
{
getInvoice
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'bp_invoice_query'
let
param
=
{
bp_id
:
this
.
document_id
,
}
vm
.
hlsPopup
.
showLoading
(
'请稍候'
)
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
vm
.
invoiceInfo
=
res
.
info
if
(
res
.
info
.
invoice_title
==
''
||
res
.
info
.
invoice_title
==
null
||
res
.
info
.
invoice_title
==
undefined
)
{
vm
.
invoiceInfo
.
invoice_title
=
window
.
localStorage
.
bp_name
}
vm
.
addRows
(
vm
.
invoiceInfo
.
invoice_adds
)
vm
.
addRowsLive
(
vm
.
invoiceInfo
.
open_bank
)
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
}
})
},
addRows
(
e
)
{
if
(
e
)
{
// let addNum = Math.ceil(e.length / 16)
// if (addNum === 0) {
// this.$refs.myTestarea.rows = 1
// } else if (addNum >= addNum - 1 && addNum
<
addNum
+
1
)
{
// this.$refs.myTestarea.rows = addNum + 1
// }
let
len
=
0
for
(
let
i
=
0
;
i
<
e
.
length
;
i
++
)
{
var
c
=
e
.
charCodeAt
(
i
)
// 统计字符串的字符长度
if
((
c
>=
0x0001
&&
c
<=
0x007e
)
||
(
c
>=
0xff60
&&
c
<=
0xff9f
))
{
len
+=
1
}
else
{
len
+=
2
}
}
let
addNum
=
Math
.
ceil
(
len
/
21
)
this
.
$refs
.
myTestarea
.
rows
=
addNum
}
},
addRowsLive
(
e
)
{
if
(
e
)
{
// let addNum = Math.ceil(e.length / 16)
// if (addNum === 0) {
// this.$refs.myTestareaLive.rows = 1
// } else if (addNum >= addNum - 1 && addNum
<
addNum
+
1
)
{
// this.$refs.myTestareaLive.rows = addNum + 1
// }
let
len
=
0
for
(
let
i
=
0
;
i
<
e
.
length
;
i
++
)
{
var
c
=
e
.
charCodeAt
(
i
)
// 统计字符串的字符长度
if
((
c
>=
0x0001
&&
c
<=
0x007e
)
||
(
c
>=
0xff60
&&
c
<=
0xff9f
))
{
len
+=
1
}
else
{
len
+=
2
}
}
let
addNum
=
Math
.
ceil
(
len
/
21
)
this
.
$refs
.
myTestareaLive
.
rows
=
addNum
}
},
getInvoiceType
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'bp_invoice_kind_query'
let
param
=
{}
vm
.
hlsPopup
.
showLoading
(
'请稍候'
)
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
vm
.
invoicList
=
res
.
lists
.
map
(
item
=>
{
return
{
code
:
item
.
invoice_kind
,
code_name
:
item
.
invoice_kind_n
,
}
})
}
})
},
getTaxpayer
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'bp_taxpayer_type_query'
let
param
=
{}
vm
.
hlsPopup
.
showLoading
(
'请稍候'
)
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
vm
.
taxpayerList
=
res
.
lists
.
map
(
item
=>
{
return
{
code
:
item
.
taxpayer_type
,
code_name
:
item
.
taxpayer_type_n
,
}
})
}
})
},
selectInvoiceType
(
e
)
{
let
vm
=
this
vm
.
hlsPopup
.
selectList
({
list
:
vm
.
invoicList
,
code
:
'bp_type'
,
object
:
{},
returnItem
:
function
(
index
,
obj
)
{
vm
.
$set
(
vm
.
invoiceInfo
,
'invoice_kind'
,
obj
.
bp_type
)
vm
.
$set
(
vm
.
invoiceInfo
,
'invoice_kind_n'
,
obj
.
bp_type_n
)
/* vm.invoiceInfo.invoice_kind = obj.bp_type
vm.invoiceInfo.invoice_kind_n = obj.bp_type_n */
},
})
},
selectTaxpayer
(
e
)
{
let
vm
=
this
vm
.
hlsPopup
.
selectList
({
list
:
vm
.
taxpayerList
,
code
:
'bp_type'
,
object
:
{},
returnItem
:
function
(
index
,
obj
)
{
vm
.
$set
(
vm
.
invoiceInfo
,
'taxpayer_type'
,
obj
.
bp_type
)
vm
.
$set
(
vm
.
invoiceInfo
,
'taxpayer_type_n'
,
obj
.
bp_type_n
)
/* vm.invoiceInfo.taxpayer_type = obj.bp_type
vm.invoiceInfo.taxpayer_type_n = obj.bp_type_n */
},
})
},
},
}
</
script
>
<
style
lang=
"less"
scoped
>
input::placeholder{
color: #B4B4B5;
}
textarea::placeholder {
color: #b4b4b5;
}
textarea {
text-align: right;
color:#666;
resize: none;
}
.save {
color: #fff;
border-radius: 4px;
background-color: @headerColor;
}
</
style
>
src/pages/functionCenter/component/creditInfo.vue
0 → 100644
View file @
31f82198
<
template
>
<h-view
id=
"np-bank-card"
>
<h-content>
<div
id=
"bank-card"
>
<div
class=
"info"
>
<div
class=
"info-icon"
>
<img
src=
"@/assets/userBind/info.png"
>
<span>
温馨提示
</span>
</div>
<p>
推荐使用农行卡,农行卡支付免收手续费!
</p>
</div>
<div
class=
"my-card"
>
<div
class=
"top"
>
<div
class=
"left"
>
<img
src=
"@/assets/userBind/bankIcon.png"
class=
"icon"
>
<span
class=
"top-word"
>
我的卡
<span
class=
"sum"
>
(共
{{
getBankList
.
length
}}
张)
</span>
</span>
</div>
</div>
<div
class=
"clear"
/>
<div
class=
"card-content"
>
<ul>
<li
v-for=
"(item,index) in getBankList"
:key=
"index"
>
<item-option
class=
"slider"
>
<div
:style=
"'background-image: url('+ changeBgImg (item) +')'"
class=
"my-bank-card"
@
click=
"showModalInfo(item)"
>
<div
class=
"card-info"
>
<span
class=
"name"
>
{{
item
.
bank_full_name
}}
</span>
<span
class=
"card-type"
>
{{
selectType
(
item
.
bank_card_type
)
}}
</span>
<span
class=
"number"
>
卡号
</span>
<span
class=
"card-number"
>
**** **** ****
{{
selectLast
(
item
)
}}
</span>
</div>
</div>
</item-option>
</li>
</ul>
</div>
</div>
</div>
</h-content>
<h-modal
ref=
"modal"
v-model=
"showModalValue"
position=
"bottom"
>
<h-view>
<div
class=
"modal-content"
>
<div
class=
"modal-content-add-top"
>
<span>
银行卡信息
</span>
<img
src=
"@/assets/userBind/close.png"
@
click=
"hideModal"
>
</div>
<img
v-if=
"!bankImg && !isApproved"
src=
"@/assets/userBind/addBack.png"
class=
"addBack"
>
<img
v-if=
"bankImg"
:src=
"bankImg"
class=
"addBack"
style=
"height: 38%;"
>
<img
v-if=
"isClear && isApproved && !bankImg"
src=
"@/assets/userBind/addBack.png"
class=
"addBack"
>
<img
v-if=
"!bankImg && isApproved && !isClear"
src=
"@/assets/userBind/addBack.png"
class=
"addBack"
>
<list-item
:item-height=
"44"
class=
"card-Info"
>
<item>
<div
slot=
"name"
>
银行卡卡号
</div>
<input
slot=
"content"
v-model=
"bank.bank_account_num"
readonly
placeholder=
""
>
</item>
<item>
<div
slot=
"name"
>
账户姓名
</div>
<input
slot=
"content"
v-model=
"bank.bank_account_name"
readonly
placeholder=
""
>
</item>
<item>
<div
slot=
"name"
>
银行名称
</div>
<input
slot=
"content"
v-model=
"bank.bank_full_name"
readonly
placeholder=
""
>
</item>
<item>
<div
slot=
"name"
>
支行名称
</div>
<input
slot=
"content"
v-model=
"bank.bank_branch_name"
readonly
placeholder=
""
>
</item>
</list-item>
</div>
</h-view>
</h-modal>
</h-view>
</
template
>
<
script
>
import
backImg1
from
'@/assets/userBind/nong.png'
import
backImg2
from
'@/assets/userBind/unNong.png'
export
default
{
data
()
{
return
{
backImg
:
null
,
showModalValue
:
false
,
bankList
:
[],
isClear
:
false
,
certification_status
:
''
,
authUrl
:
''
,
bank
:
{
bank_account_num
:
''
,
bank_account_name
:
''
,
bank_card_type
:
''
,
bank_full_name
:
''
,
bank_branch_name
:
''
,
},
bankImg
:
''
,
// 银行卡图片
getBankList
:
[],
}
},
props
:
{
document_id
:
String
,
document_name
:
String
,
},
computed
:
{
isApproved
()
{
return
window
.
localStorage
.
user_bp_status
===
'APPROVED'
},
},
beforeRouteEnter
(
to
,
from
,
next
)
{
next
(
vm
=>
{
vm
.
getBankInfo
()
// vm.getNpCertificationUrl()
})
},
created
()
{
this
.
getBankInfo
()
},
methods
:
{
successCall
()
{
this
.
hideModal
()
this
.
getBankInfo
()
this
.
bank
.
bank_account_num
=
''
this
.
bank
.
bank_account_name
=
''
this
.
bank
.
bank_full_name
=
''
this
.
bank
.
bank_branch_name
=
''
},
hideModal
()
{
this
.
showModalValue
=
false
this
.
isClear
=
true
this
.
bank
.
bank_account_num
=
''
this
.
bank
.
bank_account_name
=
window
.
localStorage
.
bp_name
this
.
bank
.
bank_card_type
=
''
this
.
bank
.
bank_full_name
=
''
this
.
bank
.
bank_branch_name
=
''
},
showModal
()
{
this
.
showModalValue
=
true
this
.
bankImg
=
''
},
async
checkElectonic
()
{
let
vm
=
this
let
id
=
vm
.
document_id
let
url
=
process
.
env
.
basePath
+
'bp_elec_check'
let
param
=
{
bp_id
:
id
,
}
vm
.
hlsPopup
.
showLoading
(
'请稍候'
)
let
res
=
await
vm
.
$post
(
url
,
param
)
if
(
res
.
result
===
'S'
)
{
vm
.
hlsPopup
.
hideLoading
()
vm
.
certification_status
=
res
.
info
.
certification_status
return
true
}
else
{
vm
.
hlsPopup
.
hideLoading
()
this
.
hlsPopup
.
showLongCenter
(
res
.
message
)
}
},
async
putData
()
{
let
vm
=
this
let
bp_id
=
vm
.
document_id
let
isCheck
=
await
vm
.
checkElectonic
()
let
urlTemp
=
await
vm
.
getNpCertificationUrl
()
if
(
urlTemp
)
{
this
.
hlsPopup
.
showConfirm
({
title
:
'提示'
,
content
:
'您确认提交吗?'
,
onConfirm
:
data
=>
{
if
(
data
)
{
let
url
=
process
.
env
.
basePath
+
'bp_bind_submit'
let
param
=
{
master
:
{
bp_id
:
bp_id
,
company_id
:
'2145'
,
bp_class
:
'NP'
,
bp_type
:
window
.
localStorage
.
getItem
(
'bp_type'
),
business_num
:
window
.
localStorage
.
getItem
(
'business_num'
),
},
}
vm
.
hlsPopup
.
showLoading
(
'请稍候'
)
if
(
isCheck
)
{
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
vm
.
hlsPopup
.
showSuccess
(
'提交成功'
)
if
(
vm
.
certification_status
===
'Y'
)
{
vm
.
$router
.
push
({
name
:
'MyInfo'
,
})
}
else
if
(
vm
.
certification_status
===
'N'
)
{
// vm.$router.push({
// name: 'Certification',
// params: {
// authUrl: vm.authUrl,
// },
// })
const
u
=
navigator
.
userAgent
const
isiOS
=
!!
u
.
match
(
/
\(
i
[^
;
]
+;
(
U;
)?
CPU.+Mac OS X/
)
if
(
isiOS
)
{
cordova
.
InAppBrowser
.
open
(
vm
.
authUrl
,
'_blank'
,
'location=yes'
)
console
.
log
(
'ios'
)
}
else
{
vm
.
$router
.
push
({
name
:
'Certification'
,
params
:
{
authUrl
:
vm
.
authUrl
,
},
})
console
.
log
(
'android'
)
}
}
else
{
vm
.
$router
.
push
({
name
:
'MyInfo'
,
})
}
}
else
if
(
res
.
result
===
'P'
)
{
vm
.
hlsPopup
.
showLongCenter
(
res
.
message
)
vm
.
$router
.
push
({
name
:
'MyInfo'
,
})
}
else
{
vm
.
hlsPopup
.
showLongCenter
(
res
.
message
)
}
})
}
}
},
})
}
else
{
this
.
hlsPopup
.
showLongCenter
(
'电子签认证出错'
)
}
},
async
getNpCertificationUrl
()
{
let
vm
=
this
let
url
=
$config
.
basePath
+
'auth_user_sign'
let
param
=
{
phone
:
window
.
localStorage
.
user_phone
,
}
hlsPopup
.
showLoading
(
'请稍候'
)
let
res
=
await
vm
.
$post
(
url
,
param
)
hlsPopup
.
hideLoading
()
if
((
res
.
info
.
code
===
0
)
&&
(
res
.
info
.
data
.
authUrl
))
{
vm
.
authUrl
=
res
.
info
.
data
.
authUrl
return
vm
.
authUrl
}
else
if
((
res
.
info
.
code
===
0
)
&&
(
res
.
info
.
data
.
openId
))
{
vm
.
authUrl
=
res
.
info
.
data
.
openId
return
vm
.
authUrl
}
else
{
hlsPopup
.
showError
(
res
.
info
.
msg
)
return
''
}
},
selectType
(
e
)
{
if
(
e
===
'0'
)
{
return
'未知类型'
}
else
if
(
e
===
'1'
)
{
return
'借记卡'
}
else
if
(
e
===
'2'
)
{
return
'信用卡'
}
},
showModalInfo
(
item
)
{
Object
.
assign
(
this
.
bank
,
item
)
this
.
showModalValue
=
true
},
getBankInfo
()
{
let
vm
=
this
let
id
=
vm
.
document_id
let
url
=
process
.
env
.
basePath
+
'bp_bank_query'
let
param
=
{
bp_id
:
id
,
}
vm
.
hlsPopup
.
showLoading
(
'请稍候'
)
vm
.
hlsHttp
.
post
(
url
,
param
)
.
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
vm
.
getBankList
=
res
.
lists
}
})
.
catch
(()
=>
{
this
.
hlsPopup
.
showLongCenter
(
'传入参数异常'
)
})
},
changeBgImg
(
item
)
{
if
(
item
.
bank_full_name
.
indexOf
(
'农业银行'
)
!==
-
1
)
{
return
backImg1
}
else
{
return
backImg2
}
},
selectLast
(
item
)
{
let
num
=
item
.
bank_account_num
return
num
.
substring
(
num
.
length
-
4
)
},
},
}
</
script
>
<
style
lang=
"less"
>
#np-bank-card {
.info {
height: 70px;
background-color: rgba(142, 195, 30, 0.1);
.info-icon {
height: 20px;
padding-top: 20px;
display: flex;
align-items: center;
img {
width: 15.8px;
height: 15.8px;
margin-left: 17.1px;
}
span {
font-family: PingFangSC-Semibold;
font-size: 14px;
color: #8ec31e;
margin-left: 9px;
letter-spacing: 0.5px;
line-height: 20px;
}
}
p {
font-family: PingFangSC-Regular;
font-size: 13px;
color: #656464;
width: 310px;
margin-left: 42px;
letter-spacing: 0.4px;
line-height: 18px;
margin-top: 8px;
}
}
.my-card {
.top {
width: 320px;
margin: 0 auto;
margin-top: 13px;
.left {
height: 32px;
display: flex;
align-items: center;
float: left;
.icon {
width: 18px;
height: 20px;
margin-right: 4px;
}
.top-word {
font-family: PingFangSC-Semibold;
font-size: 15px;
color: @headerColor;
letter-spacing: 0.46px;
.sum {
font-family: PingFangSC-Semibold;
font-size: 15px;
color: #4d5d6c;
letter-spacing: 0.46px;
}
}
}
.icon-right {
width: 34px;
height: 34px;
float: right;
}
}
.clear {
clear: both;
}
.card-content {
width: 350px;
padding-left: 28px;
overflow: hidden;
margin-top: 16px;
li {
margin-bottom: 10px;
.slider {
height: 100%;
margin-left: -14px;
}
}
.my-bank-card {
width: 320px;
height: 190px;
box-shadow: 0 5px 20px 0 rgba(101, 101, 101, 0.25);
border-radius: 6px;
background-size: 370px 240px;
background-position: -20px;
.card-info {
font-family: PingFangSC-Medium;
color: #ffffff;
margin-left: 18px;
padding-top: 15px;
.name,
.card-type {
font-size: 16px;
letter-spacing: 5.5px;
line-height: 24px;
}
.card-type {
display: block;
margin-top: 9px;
}
.number {
font-size: 12px;
letter-spacing: 0;
line-height: 16px;
margin-top: 33px;
display: block;
margin-top: 33px;
}
.card-number {
display: block;
font-family: Avenir-Heavy;
font-size: 16px;
color: #ffffff;
letter-spacing: 6px;
line-height: 24px;
}
}
}
}
}
.swipeout-list .item .function {
left: 330px;
border-radius: 6px;
width: 54px;
height: 190px;
background: url("../../../assets/userBind/delete.png") 16px 84.9px #fde5e8
no-repeat;
background-size: 20px 20px;
}
.save {
color: #fdb62f;
border-radius: 4px;
border: 1px solid #fdb62f;
background-color: #fafafa;
}
.modal-content {
width: 100%;
height: 75%;
position: absolute;
top: 25%;
background-color: #fff;
overflow-y: scroll;
.modal-content-add-top {
width: 320px;
height: 34px;
line-height: 34px;
padding-top: 10px;
background-color: #fff;
padding-bottom: 40px;
position: fixed;
left: 28px;
span {
font-family: PingFangSC-Semibold;
font-size: 15px;
color: @headerColor;
letter-spacing: 0.47px;
}
img {
width: 34px;
height: 34px;
float: right;
}
}
.addBack {
display: block;
width: 320px;
margin: 0 auto;
margin-top: 50px;
border-radius: 6px;
margin-bottom: 17px;
}
.card-Info {
margin-bottom: 220px;
}
}
.add-card {
width: 358px;
height: 40px;
background: @headerColor;
border-radius: 4px;
color: #fff;
}
}
.modal {
background-color: rgba(0, 0, 0, 0) !important;
}
</
style
>
src/pages/functionCenter/component/input-num.vue
0 → 100644
View file @
31f82198
/**
* @Author Sean
* @Date 2019/11/27
*/
<
template
>
<transition
name=
"role"
>
<div
v-show=
"showFlag"
class=
"role-switch-wrap"
>
<div
class=
"role-switch-content"
>
<div
class=
"content-header"
>
<span>
请输入业务经办代码
</span>
<img
src=
"@/assets/myInfo/modalClose.png"
@
click=
"roleCancle"
>
</div>
<div
class=
"content-wrap"
>
<div
class=
"input-text"
>
<input
v-model=
"business_num"
type=
"text"
placeholder=
"请输入业务经办代码"
>
</div>
<div
class=
"content-btn-active content-btn"
@
click=
"roleConfirm"
><span>
确定
</span></div>
</div>
</div>
</div>
</transition>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
showFlag
:
false
,
business_num
:
''
,
}
},
created
:
function
()
{
},
mounted
:
function
()
{
},
updated
:
function
()
{
},
methods
:
{
roleConfirm
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'bp_relation_insert'
let
param
=
{
bp_id
:
window
.
localStorage
.
getItem
(
'bp_id'
),
business_num
:
vm
.
business_num
,
}
vm
.
hlsPopup
.
showLoading
(
'正在添加'
)
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
vm
.
hlsPopup
.
showLongCenter
(
'添加成功'
)
if
(
res
.
result
===
'S'
)
{
vm
.
showFlag
=
false
vm
.
$emit
(
'roleConfirm'
,
vm
.
business_num
)
vm
.
business_num
=
''
}
else
{
hlsPopup
.
showError
(
res
.
message
)
vm
.
business_num
=
''
}
})
},
roleCancle
()
{
this
.
showFlag
=
false
this
.
$emit
(
'roleCancle'
)
},
},
}
</
script
>
<
style
scoped
lang=
"less"
>
.role-enter-active, .role-leave-active {
transition: opacity .5s;
}
.role-enter, .role-leave-to /* .fade-leave-active below version 2.1.8 */ {
opacity: 0;
}
.role-switch-wrap {
width: 100%;
height: 100%;
position: absolute;
top: 0;
z-index: 999;
background: rgba(56, 63, 69, 0.30);
display: flex;
justify-content: center;
align-items: center;
.role-switch-content {
width: 80%;
margin: 0 auto;
.content-header {
width: 100%;
height: 44px;
background-color: @headerColor;
font-family: PingFangSC-Semibold;
font-size: 16px;
color: #FFFFFF;
letter-spacing: 0;
text-align: center;
line-height: 44px;
border-top-left-radius: 14px;
border-top-right-radius: 14px;
img {
width: 26px;
float: right;
}
}
.content-wrap {
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-color: #FFF;
padding: 10px 0;
border-bottom-left-radius: 14px;
border-bottom-right-radius: 14px;
.input-text{
border: 1px solid @headerColor;
margin:30px auto;
height:40px;
line-height: 40px;
border-radius: 5px;
input{
text-indent: 5px;
}
}
.role-item {
width: 90%;
height: 44px;
background: #FFFFFF;
border: 1px solid #CFCFCF;
border-radius: 4px;
display: flex;
justify-content: center;
align-items: center;
margin: 4px 0;
span {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #656464;
letter-spacing: 0;
line-height: 18px;
}
}
.item-active{
background: rgba(29,63,255,0.10);
border: 1px solid #1D3FFF;
border-radius: 4px;
}
}
.content-btn {
margin-top: 10px;
width: 84%;
height: 40px;
background: rgba(56, 63, 69, 0.50);
border-radius: 4px;
display: flex;
justify-content: center;
align-items: center;
span {
font-family: PingFangSC-Semibold;
font-size: 15px;
color: #FAFAFA;
line-height: 20px;
}
}
.content-btn-active{
background: #1D3FFF;
border-radius: 4px;
}
}
}
</
style
>
src/pages/functionCenter/function-list.vue
View file @
31f82198
...
...
@@ -19,6 +19,15 @@
<img
src=
"@/assets/functionCenter/in@2x.png"
alt=
""
>
</div>
</div>
<div
class=
"info-content"
>
<div
class=
"add-name"
>
<img
src=
"@/assets/functionCenter/todo@2x.png"
alt=
""
>
<div
class=
"name-title"
>
待办审批
</div>
</div>
<div
class=
"add-content"
@
click=
"todoList()"
>
<img
src=
"@/assets/functionCenter/in@2x.png"
alt=
""
>
</div>
</div>
</div>
<div
class=
"fun-item-before"
>
...
...
@@ -323,10 +332,20 @@ export default {
hlsPopup
.
showLongCenter
(
'您的用户绑定申请正在审批中!'
)
}
},
todoList
()
{
if
(
this
.
bp_id
)
{
if
(
window
.
localStorage
.
multipleRole
!==
'OFFICE'
&&
window
.
localStorage
.
multipleRole
!==
'AGENT'
){
hlsPopup
.
showLongCenter
(
'仅经销商/办事处业务员角色可使用该功能!'
)
}
else
{
this
.
$router
.
push
({
name
:
'ToDoList'
,
})
}
}
else
{
hlsPopup
.
showLongCenter
(
'请先进行用户绑定'
)
}
}
},
}
</
script
>
...
...
src/pages/functionCenter/to-do-list.vue
0 → 100644
View file @
31f82198
<!--
* @Descrip: 主页
* @Author: your name
* @Date: 2019-10-10 14:25:15
* @LastEditTime: 2019-11-14 09:56:22
* @LastEditors: Please set LastEditors
-->
<
template
>
<h-view
id=
"homePage"
class=
"public-style"
title=
"待办审批"
>
<h-header
:proportion=
"[7,10,0]"
class=
"bar-custom"
>
<div
slot=
"left"
class=
"h-header-btn"
>
<!--
<i
class=
"ion-ios-arrow-back"
/>
-->
</div>
<div
slot=
"center"
>
待办审批
</div>
</h-header>
<div
class=
"wrap has-header"
>
<div
class=
"tab"
>
<p><span
:class=
"
{'selected':selected === 'todo'}" @click="isSelected('todo')">待办
</span></p>
<p><span
:class=
"
{'selected':selected === 'done'}" @click="isSelected('done')">已办
</span></p>
</div>
<div
class=
"search"
>
<input
v-model=
"searchInput"
type=
"text"
v-on:input=
"searchList()"
placeholder=
"请输入用户名称"
>
</div>
</div>
<scroll
v-if=
"selected === 'todo'"
ref=
"scroll"
:updateData=
"todoList"
:pullUp=
"true"
:pullDown=
"true"
:autoUpdate=
"true"
:listenScroll=
"true"
@
pullingUp=
"loadMore()"
@
pullingDown=
"getTodoList()"
>
<div
class=
"pay-content"
>
<div
v-for=
"(item,index) in todoList"
:key=
"index"
class=
"contract-item"
>
<div
class=
"header"
>
<img
src=
"@/assets/contractRepayment/contract.png"
alt=
""
>
<h2>
客户准入审批
</h2>
<p><img
src=
"@/assets/functionCenter/in@2x.png"
alt=
""
@
click=
"approvalInfo(item.document_id, item.document_name, item.record_id)"
></p>
</div>
<div
class=
"center"
>
<h2>
客户名称
</h2>
<p>
{{
item
.
document_name
}}
</p>
</div>
</div>
</div>
</scroll>
<scroll
v-if=
"selected === 'done'"
ref=
"scroll"
:updateData=
"doneList"
:pullUp=
"true"
:pullDown=
"true"
@
pullingUp=
"loadMore()"
@
pullingDown=
"getDoneList()"
>
<div
class=
"pay-content"
>
<div
v-for=
"(item,index) in doneList"
:key=
"index"
class=
"contract-item"
>
<div
class=
"header"
>
<img
src=
"@/assets/contractRepayment/contract.png"
alt=
""
>
<h2>
客户准入审批
</h2>
<p><img
src=
"@/assets/functionCenter/in@2x.png"
alt=
""
@
click=
"approvalInfo(item.document_id, item.document_name, item.record_id)"
></p>
</div>
<div
class=
"center"
>
<h2>
客户名称
</h2>
<p>
{{
item
.
document_name
}}
</p>
</div>
</div>
</div>
</scroll>
</h-view>
</
template
>
<
script
>
import
noImg
from
'../../assets/productQuery/none.png'
export
default
{
name
:
'ToDoList'
,
data
()
{
return
{
selected
:
'todo'
,
searchInput
:
''
,
todoList
:
[],
doneList
:
[],
pageNum
:
1
,
pageNum_1
:
1
,
ifPull
:
true
,
mysetTimeout
:
null
}
},
watch
:
{
},
created
()
{
this
.
getTodoList
()
this
.
getDoneList
()
},
activated
()
{
this
.
getTodoList
()
this
.
getDoneList
()
},
methods
:
{
// tab切换
isSelected
(
name
)
{
this
.
selected
=
name
},
searchList
()
{
if
(
this
.
mysetTimeout
!==
null
)
{
clearTimeout
(
this
.
mysetTimeout
)
this
.
mysetTimeout
=
setTimeout
(()
=>
{
this
.
loadMore
()
},
1000
)
}
else
{
this
.
mysetTimeout
=
setTimeout
(()
=>
{
this
.
loadMore
()
},
1000
)
}
},
getTodoList
()
{
let
param
=
{
document_name
:
''
,
pagenum
:
1
,
pagesize
:
10
,
}
let
url
=
$config
.
basePath
+
'to_do_list'
this
.
hlsPopup
.
showLoading
(
'请稍后'
)
this
.
hlsHttp
.
post
(
url
,
param
).
then
((
res
)
=>
{
this
.
hlsPopup
.
hideLoading
()
let
returnData
=
[]
if
(
res
.
result
===
'S'
)
{
returnData
=
res
.
lists
returnData
.
forEach
((
data
,
index
,
array
)
=>
{
this
.
todoList
.
push
(
data
)
})
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
}
})
},
getDoneList
()
{
let
param
=
{
document_name
:
''
,
pagenum
:
1
,
pagesize
:
10
,
}
let
url
=
$config
.
basePath
+
'done_list'
this
.
hlsPopup
.
showLoading
(
'请稍后'
)
this
.
hlsHttp
.
post
(
url
,
param
).
then
((
res
)
=>
{
this
.
hlsPopup
.
hideLoading
()
let
returnData
=
[]
if
(
res
.
result
===
'S'
)
{
returnData
=
res
.
lists
returnData
.
forEach
((
data
,
index
,
array
)
=>
{
this
.
doneList
.
push
(
data
)
})
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
}
})
},
loadMore
()
{
let
url
let
param
if
(
this
.
selected
===
"todo"
)
{
this
.
pageNum
++
url
=
$config
.
basePath
+
'to_do_list'
param
=
{
document_name
:
this
.
searchInput
,
pagenum
:
this
.
pageNum
,
pagesize
:
10
,
}
}
else
if
(
this
.
selected
===
"done"
)
{
this
.
pageNum_1
++
url
=
$config
.
basePath
+
'done_list'
param
=
{
document_name
:
this
.
searchInput
,
pagenum
:
this
.
pageNum_1
,
pagesize
:
10
,
}
}
this
.
hlsPopup
.
showLoading
(
'请稍后'
)
this
.
hlsHttp
.
post
(
url
,
param
).
then
((
res
)
=>
{
this
.
hlsPopup
.
hideLoading
()
this
.
ifPull
=
false
let
returnData
=
[]
if
(
res
.
result
===
'S'
)
{
returnData
=
res
.
lists
if
(
returnData
.
length
===
0
)
{
this
.
$refs
.
scroll
.
update
(
true
)
}
else
if
(
returnData
.
length
>
0
&&
returnData
.
length
<
10
)
{
this
.
$refs
.
scroll
.
update
(
true
)
}
else
if
(
returnData
.
length
===
10
)
{
this
.
$refs
.
scroll
.
update
(
true
)
}
this
.
showLists
=
returnData
if
(
this
.
selected
===
'todo'
)
{
returnData
.
forEach
((
data
,
index
,
array
)
=>
{
this
.
todoList
.
push
(
data
)
})
}
else
if
(
this
.
selected
===
'done'
)
{
returnData
.
forEach
((
data
,
index
,
array
)
=>
{
this
.
doneList
.
push
(
data
)
})
}
this
.
ifPull
=
true
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
}
})
},
approvalInfo
(
document_id
,
document_name
,
record_id
)
{
this
.
$router
.
push
({
name
:
'approvalInfo'
,
params
:
{
document_id
:
document_id
,
document_name
:
document_name
,
record_id
:
record_id
,
},
})
}
},
}
</
script
>
<
style
lang=
'less'
>
@import "../../styles/vue-1px";
#homePage {
.wrap {
width: 100%;
position: absolute;
z-index: 100
}
.tab {
display: flex;
background-color: #fff;
padding: 6px 8px 4px 6px;
p {
text-align: center;
flex: auto;
span {
display: block;
padding: 6px 0;
background-color: #fff;
font-family: PingFangSC-Regular;
font-size: 15px;
color: #656464;
}
span.selected {
background: rgba(29,63,255,.2);
border-radius: 20px;
color: #1D3FFF;
font-family: PingFangSC-Semibold;
font-weight: 700;
}
}
}
.search {
background-color: #fff;
padding: 8px 12px;
position: relative;
input {
background: url("../../assets/contractStart/search1.png") 320px no-repeat;
background-size: 16px 16px;
background-color: rgba(239,239,239,0.55);
padding-left: 12px;
border-radius: 4px;
height: 36px;
line-height: 36px;
width: 100%;
font-family: PingFangSC-Regular;
font-size: 14px;
color: #888C8F;
}
input::placeholder {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #888C8F;
letter-spacing: 0;
}
input:focus {
background: url("../../assets/contractStart/search2.png") 320px no-repeat;
background-size: 16px 16px;
background-color: rgba(239, 239, 239, 0.55);
border: 2px solid #bcc6ff;
}
}
.pay-content {
padding: 8px 8px;
.contract-item {
background-color: #fff;
margin-bottom: 8px;
.header {
position: relative;
height: 44px;
img {
position: absolute;
width: 30px;
height: 30px;
left: 10px;
top: 8px;
}
h2 {
position: absolute;
top: 14px;
left: 50px;
font-family: PingFangSC-Semibold;
font-size: 14px;
color: #4B4A4B;
letter-spacing: 0;
margin: 0px;
}
p {
img {
position: relative;
top: 0;
left: 0;
}
position: absolute;
right: 10px;
top: 8px;
// width: 57px;
padding: 2px 4px;
// height: 21px;
// line-height: 19px;
text-align: center;
border-radius: 2px;
font-family: PingFangSC-Regular;
font-size: 14px;
}
}
.center {
position: relative;
height: 44px;
background: rgba(239, 239, 239, 0.55);
h2 {
position: absolute;
top: 13px;
left: 15px;
font-size: 14px;
color: #4B4A4B;
letter-spacing: 0;
margin: 0px;
}
p {
position: absolute;
right: 20px;
top: 13px;
// width: 57px;
padding: 2px 4px;
// height: 21px;
// line-height: 19px;
text-align: center;
border-radius: 2px;
font-family: PingFangSC-Regular;
font-size: 14px;
}
}
}
}
.content{
background-color: #EFEFEF;
}
.top-wrap {
width: 100%;
height: 100px;
background-color: @headerColor;
border-bottom-right-radius: 30%;
border-bottom-left-radius: 30%;
position: absolute;
top: 0;
}
.top-wrap-white {
width: 100%;
height: 100px;
position: absolute;
top: 100px;
}
.home-city {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.h-header .h-header-left .h-header-btn:first-of-type {
padding-left: 0.2rem;
}
.functions {
height: 108px;
width: 96%;
margin: -6px auto 10px;
border-radius: 10px;
background: #fff;
padding-top: 10px;
display: flex;
justify-content: space-between;
&:before {
content: ''
}
&:after {
content: ''
}
.function-item {
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
img{
margin: 0;
}
div{
margin-bottom: 14px;
ont-family: PingFangSC-Regular;
font-size: 13px;
color: #3C3D48;
letter-spacing: 0;
}
}
}
.h-header .h-header-center div {
text-align: left !important;
}
.locations {
height: 24px;
width: 24px;
}
.hls-swipe {
width: 100vw;
img {
width: 100vw;
// height: 100%;
}
.hls-swipe-indicators{
left: 54%;
bottom: 20px;
.hls-swipe-indicators-item{
width: 10px;
height: 2px;
border-radius: 0;
}
.hls-swipe-indicators-item--active{
background-color: #FFF;
}
}
}
.center-pic {
margin-top: 10px;
width: 100%;
display: flex;
flex-direction: row;
padding: 0 1% 0 1%;
.left-pic {
width: 41.6%;
margin-left: 4px;
img {
width: 100%;
height: 100%;
}
}
.right-pic {
width: 55.2%;
display: flex;
flex-direction: column;
margin-left: 4px;
img {
max-width: 100%;
height: auto;
}
img:nth-of-type(2) {
margin-top: 4px;
}
}
}
.guessing {
display: flex;
align-items: center;
height: 22px;
font-family: PingFangSC-Semibold;
font-size: 16px;
color: #00469C;
font-weight: 600;
letter-spacing: 0.57px;
height: 40px;
padding-left: 2%;
span{
padding-top: 2px;
margin-left: 4px;
}
img{
width: 14px;
height: 14px;
}
}
.guessing-wrap{
position: relative;
width: 96%;
margin: 0 auto;
.hls-list-item{
border-radius: 10px;
.contents{
padding: 8px 6px 8px 0;
.add-content{
justify-content: flex-start;
}
}
}
}
.item-pic {
width: 110px;
height: 110px;
display: flex;
justify-content: center;
align-items: center;
img {
width: 100%;
// height: 100%;
}
}
.item-content {
.top {
font-family: PingFangSC-Semibold;
font-size: 16px;
color: #3B3B3B;
letter-spacing: 0.54px;
margin-top: 10px;
font-weight: 600;
}
.hot {
position: absolute;
top: 0;
right: 0;
width: 45px;
}
.center {
margin-top: 6px;
display: flex;
.firsts {
width: 76px;
font-family: PingFangSC-Regular;
font-size: 14px;
color: rgba(56,63,69,0.60);
letter-spacing: 0.5px;
}
.seconds {
flex: 1;
text-align: left;
font-weight: 600;
font-family: PingFangSC-Semibold;
font-size: 14px;
color: #4B4A4B;
letter-spacing: 0.5px;
}
}
}
}
</
style
>
src/pages/home/home-page.vue
View file @
31f82198
...
...
@@ -124,6 +124,7 @@ export default {
// }, {enableHighAccuracy: true})
// } else { // ios使用插件定位
console
.
log
(
'&&&&&&&&&&&&___ios'
)
if
(
!
$config
.
isMobilePlatform
)
{
baidumap_location
.
getCurrentPosition
(
function
(
result
)
{
if
(
window
.
localStorage
.
getItem
(
'province'
))
{
vm
.
city
=
window
.
localStorage
.
getItem
(
'city'
)
...
...
@@ -136,6 +137,7 @@ export default {
}
},
function
(
error
)
{
})
}
// }
// setTimeout(vm.guessingQuery(), 0)
},
...
...
src/router/index.js
View file @
31f82198
...
...
@@ -134,7 +134,9 @@ import PrivacyPolicy from '@/pages/myInfo/PrivacyPolicy'
// 业务办理
import
FunctionCenter
from
'@/pages/functionCenter/function-list'
// 待办审批
import
ToDoList
from
'@/pages/functionCenter/to-do-list'
import
approvalInfo
from
'@/pages/functionCenter/approval-info'
// 我的发票
import
MyInvoice
from
'@/pages/invoice/invoice'
Vue
.
use
(
Router
)
...
...
@@ -164,9 +166,10 @@ export default new Router({
{
path
:
'/tab/my-info'
,
component
:
MyInfo
,
name
:
'MyInfo'
,
meta
:
{
keepAlive
:
true
}},
{
path
:
'/tab/message-center'
,
component
:
MessageCenter
,
name
:
'MessageCenter'
,
meta
:
{
keepAlive
:
true
}},
{
path
:
'/tab/function-center'
,
component
:
FunctionCenter
,
name
:
'FunctionCenter'
,
meta
:
{
keepAlive
:
true
}},
{
path
:
'/tab/ToDoList'
,
component
:
ToDoList
,
name
:
'ToDoList'
,
meta
:
{
keepAlive
:
true
}},
],
},
{
path
:
'/tab/approvalInfo'
,
component
:
approvalInfo
,
name
:
'approvalInfo'
,
meta
:
{
keepAlive
:
true
}},
{
path
:
'/home-page'
,
component
:
HomePage
,
...
...
www/index.html
View file @
31f82198
<!DOCTYPE html>
<html><head><meta
charset=
utf-8
><meta
name=
viewport
content=
"initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,width=device-width,viewport-fit=cover"
><meta
name=
format-detection
content=
"telephone=no"
><meta
name=
format-detection
content=
"email=no"
><meta
name=
apple-mobile-web-app-capable
content=
yes
><meta
name=
apple-mobile-web-app-status-bar-style
content=
black
><script
type=
text/javascript
src=
./static/vuePlatform.js
></script><script
type=
text/javascript
src=
./static/prototype.js
></script><script
type=
text/javascript
src=
./cordova.js
></script><script
type=
text/javascript
src=
"http://api.map.baidu.com/api?v=2.0&ak=Eoo0EtfjYCdAy7r8D19gZ0vMojdZpHqU"
></script><title>
徐工金服
</title><link
href=
./static/css/app.dd7832c0b9f688086087e80d2a12ea7a.css
rel=
stylesheet
></head><body><div
id=
app-box
></div><script
type=
text/javascript
src=
./static/js/manifest.df7ef04eb2f9b87348bc.js
></script><script
type=
text/javascript
src=
./static/js/vendor.62027bd56a192b5fe7ba.js
></script><script
type=
text/javascript
src=
./static/js/app.cc68bbe27bc74ca6bc8f.js
></script></body></html>
\ No newline at end of file
<!DOCTYPE html>
<html><head><meta
charset=
utf-8
><meta
name=
viewport
content=
"initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,width=device-width,viewport-fit=cover"
><meta
name=
format-detection
content=
"telephone=no"
><meta
name=
format-detection
content=
"email=no"
><meta
name=
apple-mobile-web-app-capable
content=
yes
><meta
name=
apple-mobile-web-app-status-bar-style
content=
black
><script
type=
text/javascript
src=
./static/vuePlatform.js
></script><script
type=
text/javascript
src=
./static/prototype.js
></script><script
type=
text/javascript
src=
./cordova.js
></script><script
type=
text/javascript
src=
"http://api.map.baidu.com/api?v=2.0&ak=Eoo0EtfjYCdAy7r8D19gZ0vMojdZpHqU"
></script><title>
徐工金服
</title><link
href=
./static/css/app.039170d820a8558db6e0d2b704020095.css
rel=
stylesheet
></head><body><div
id=
app-box
></div><script
type=
text/javascript
src=
./static/js/manifest.3ad1d5771e9b13dbdad2.js
></script><script
type=
text/javascript
src=
./static/js/vendor.1457c8353aa3e36618de.js
></script><script
type=
text/javascript
src=
./static/js/app.b3cbc800531f0cbbfdaf.js
></script></body></html>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment