Commit e79b6e54 authored by linxin's avatar linxin

add

parent 05aa1ae4
......@@ -90,11 +90,29 @@ export default {
// },
onFocus (event) {
// if (this.disable) return
let vm = this
this.focused = true
let value = event.target.value
event.target.value = ''
event.target.value = value
setTimeout(function () {
const u = navigator.userAgent
if (u.indexOf('Android') > -1 || u.indexOf('Linux') > -1) { // 安卓手机
window.addEventListener('resize', function () {
// Document 对象的activeElement 属性返回文档中当前获得焦点的元素。
if (document.activeElement.tagName === 'INPUT' || document.activeElement.tagName === 'TEXTAREA') {
console.log('安卓触发', document.activeElement.tagName)
window.setTimeout(function () {
document.activeElement.scrollIntoView(true)
}, 50)
}
})
} else { // ios
setTimeout(() => {
document.getElementsByTagName('body')[0].style.height = '400px'
this.$refs.ttextarea.scrollIntoView(false)
}, 50)
}
event.target.type = 'text'
event.target.focus()
}, 0)
......@@ -111,6 +129,27 @@ export default {
event.target.blur()
this.focused = false
},
// 取窗口可视范围的高度
getClientHeight () {
var clientHeight = 0
if (document.body.clientHeight && document.documentElement.clientHeight) {
clientHeight = (document.body.clientHeight < document.documentElement.clientHeight) ? document.body.clientHeight : document.documentElement.clientHeight
} else {
clientHeight = (document.body.clientHeight > document.documentElement.clientHeight) ? document.body.clientHeight : document.documentElement.clientHeight
}
return clientHeight
},
// 取窗口滚动条高度
getOffsetTop (obj) {
var tmp = obj.offsetTop
var node = obj.offsetParent
while (node != null) {
tmp += node.offsetTop
node = node.offsetParent
}
return tmp
},
},
}
</script>
......
......@@ -263,7 +263,7 @@ export default {
let url = $config.basePath + 'abc_bank_sign'
let param = {
project_id: vm.bank_lists.project_id,
trans_type: 0,
trans_type: '0',
}
vm.hlsPopup.showLoading('请稍后')
vm.hlsHttp.post(url, param).then(function (res) {
......
......@@ -394,8 +394,8 @@ export default {
vm.isUploadEstate = false, // 不动产权证修改标识
vm.bp_type = window.localStorage.bp_type
setTimeout(() => {
vm.loadItemList()
// vm.getCarInfo()
vm.loadItemList(true)
vm.getCarInfo()
// vm.getHouseInfo()
// vm.getEstateInfo()
}, 0)
......@@ -454,6 +454,7 @@ export default {
vm.isUploadCar = false, // 行驶证修改标识
vm.isUploadEstate = false, // 不动产权证修改标识
vm.bp_type = window.localStorage.bp_type
vm.loadItemList(false)
}
})
},
......@@ -524,7 +525,7 @@ export default {
// hlsPopup.showLoading('请稍候')
if (flag) {
let res = await vm.$post(url, param)
// vm.hlsPopup.hideLoading()
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
Object.assign(vm.carInfo, res.info)
return true
......@@ -972,11 +973,10 @@ export default {
}
})
},
async loadItemList () {
loadItemList (flag) {
let vm = this
vm.dowload_list = []
let bpId = window.localStorage.getItem('bp_id')
let flag = await vm.getCarInfo()
if (bpId === 'undefined') {
bpId = null
}
......@@ -989,36 +989,38 @@ export default {
},
}
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.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
......@@ -1039,9 +1041,8 @@ export default {
},
load_picture (check_id, index, cdd_item) {
let vm = this
let randomString = Math.floor(Math.random() * 50)
let url =
process.env.basePath + 'attachment_list_query' + '&index' + randomString // 附件查询
process.env.basePath + 'attachment_list_query' + '&index' + index // 附件查询
let param = {
check_id: check_id,
}
......
......@@ -913,7 +913,6 @@ export default {
title: '提示',
content: '您确认提交吗?',
onConfirm: data => {
console.log(data)
if (data) {
let url = $config.basePath + 'bp_bind_submit'
let param = {
......@@ -1218,6 +1217,8 @@ export default {
if (res.result === 'S') {
// vm.hlsPopup.showSuccess('保存成功,请去维护附件信息')
vm.bp_id = res.bp_id
window.localStorage.setItem('bp_type', vm.baseInfo.bp_type)
window.localStorage.setItem('bp_id', res.bp_id)
vm.bindCheck()
// 查询资料清单
vm.loadItemList(flag)
......
......@@ -476,8 +476,8 @@ export default {
vm.cddItemList = []
vm.isApproved = window.localStorage.isApproved
vm.bp_id = vm.$route.params.bp_id
vm.loadItemList()
// vm.houseQuery()
vm.loadItemList(true)
vm.houseQuery()
// vm.carQuery()
// vm.propertyQuery() // 不动产权证查询
} else if (from.name === 'Invoice' && window.localStorage.from === 'false') {
......@@ -539,6 +539,7 @@ export default {
vm.cddItemList = []
vm.isApproved = window.localStorage.isApproved
vm.bp_id = vm.$route.params.bp_id
vm.loadItemList(false)
}
})
},
......@@ -595,7 +596,7 @@ export default {
if (flag) {
// hlsPopup.showLoading('请稍候')
let res = await vm.$post(url, param)
// vm.hlsPopup.hideLoading()
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
Object.assign(vm.hauseInfo, res.info)
// vm.hauseInfo = res.info
......@@ -931,11 +932,11 @@ export default {
vm.propertyInfo.right_others = result.right_others.word
})
},
async loadItemList () {
loadItemList (flag) {
let vm = this
let url = process.env.basePath + 'prj_cdd_check_list'
let flag = await vm.houseQuery()
let bpId = vm.bp_id
vm.dowload_list = []
let bpId = window.localStorage.getItem('bp_id')
if (bpId === 'undefined') {
bpId = null
}
......@@ -946,36 +947,36 @@ export default {
'tab_group': window.localStorage.authFlag ? 'HLS_ORG_NAUTH' : 'HLS_ORG_AUTH',
},
}
if (flag) {
vm.hlsHttp.post(url, param).then(function (res) {
hlsPopup.hideLoading()
if (res.result === 'S') {
vm.cddItemList = []
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.property_id = item.check_id
break
default:
break
}
})
vm.cddItemList = res.lists.filter(item => { return item.cdd_item === 'HOUSE_CARD' || item.cdd_item === 'CAR_CARD' || item.cdd_item === 'ASSETS_CARD' || item.cdd_item === 'REAL_EST_CERTIFICATE' })
// 查询图片
console.log('cddItemList.........', vm.cddItemList)
hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) {
hlsPopup.hideLoading()
if (res.result === 'S') {
vm.cddItemList = []
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.property_id = item.check_id
break
default:
break
}
})
vm.cddItemList = res.lists.filter(item => { return item.cdd_item === 'HOUSE_CARD' || item.cdd_item === 'CAR_CARD' || item.cdd_item === 'ASSETS_CARD' || item.cdd_item === 'REAL_EST_CERTIFICATE' })
// 查询图片
if (flag) {
vm.cddItemList.forEach((item, index) => {
vm.load_picture(item.check_id, index, item.cdd_item)
})
}
})
}
}
})
},
load_picture (check_id, index, cdd_item) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment