Commit d06d56e7 authored by linxin's avatar linxin

多角色

parent ad689303
Pipeline #4526 canceled with stages
...@@ -276,6 +276,9 @@ export default { ...@@ -276,6 +276,9 @@ export default {
}, },
getTabNum (i) { getTabNum (i) {
this.tabNum = i this.tabNum = i
},
getImg () {
}, },
takePhonto () { takePhonto () {
let vm = this let vm = this
...@@ -284,7 +287,7 @@ export default { ...@@ -284,7 +287,7 @@ export default {
content: '请自拍一张', content: '请自拍一张',
onConfirm: function (index) { onConfirm: function (index) {
if (index === 1) { if (index === 1) {
vm.takePhontoOpenCamera() vm.takePhontoOpenCamera()
} else { } else {
} }
...@@ -376,13 +379,13 @@ export default { ...@@ -376,13 +379,13 @@ export default {
}, },
goBodyCheck (confirm_id) { // 活体检测 goBodyCheck (confirm_id) { // 活体检测
this.$refs.body.show() this.$refs.body.show()
/*this.$router.push({ /* this.$router.push({
name: 'BodyCheck', name: 'BodyCheck',
params: { params: {
check_id: this.$route.params.check_id, check_id: this.$route.params.check_id,
confirm_id: confirm_id, confirm_id: confirm_id,
}, },
})*/ }) */
}, },
// 图片保存 // 图片保存
save_picture (list) { save_picture (list) {
......
...@@ -130,7 +130,8 @@ export default { ...@@ -130,7 +130,8 @@ export default {
contractList () { contractList () {
let vm = this let vm = this
if (vm.num === 1) { if (vm.num === 1) {
let url = $config.basePath + 'prj_submit_list' let randomString = Math.floor(Math.random() * 21)
let url = $config.basePath + 'prj_submit_list' + '&index' + `'${randomString}'`
let param = { let param = {
user_phone: window.localStorage.user_phone, user_phone: window.localStorage.user_phone,
pagesize: 10, pagesize: 10,
...@@ -154,7 +155,8 @@ export default { ...@@ -154,7 +155,8 @@ export default {
} }
}) })
} else if (vm.num === 2) { } else if (vm.num === 2) {
let url = $config.basePath + 'prj_submit_list' let randomString = Math.floor(Math.random() * 21)
let url = $config.basePath + 'prj_submit_list' + '&index' + `'${randomString}'`
let param = { let param = {
pagesize: 10, pagesize: 10,
pagenum: vm.approvedPagenum, pagenum: vm.approvedPagenum,
...@@ -185,7 +187,8 @@ export default { ...@@ -185,7 +187,8 @@ export default {
let vm = this let vm = this
if (vm.num === 1) { if (vm.num === 1) {
vm.submitPagenum++ vm.submitPagenum++
let url = $config.basePath + 'prj_submit_list' let randomString = Math.floor(Math.random() * 21)
let url = $config.basePath + 'prj_submit_list' + '&index' + `'${randomString}'`
let param = { let param = {
user_phone: window.localStorage.user_phone, user_phone: window.localStorage.user_phone,
pagesize: 10, pagesize: 10,
...@@ -219,7 +222,8 @@ export default { ...@@ -219,7 +222,8 @@ export default {
}) })
} else if (vm.num === 2) { } else if (vm.num === 2) {
vm.approvedPagenum++ vm.approvedPagenum++
let url = $config.basePath + 'prj_submit_list' let randomString = Math.floor(Math.random() * 21)
let url = $config.basePath + 'prj_submit_list' + '&index' + `'${randomString}'`
let param = { let param = {
user_phone: window.localStorage.user_phone, user_phone: window.localStorage.user_phone,
pagesize: 10, pagesize: 10,
...@@ -256,7 +260,8 @@ export default { ...@@ -256,7 +260,8 @@ export default {
async submitSearch () { async submitSearch () {
let vm = this let vm = this
vm.submitPagenum = 1 vm.submitPagenum = 1
let url = $config.basePath + 'prj_submit_list' let randomString = Math.floor(Math.random() * 21)
let url = $config.basePath + 'prj_submit_list' + '&index' + `'${randomString}'`
let param = { let param = {
user_phone: window.localStorage.user_phone, user_phone: window.localStorage.user_phone,
pagesize: 10, pagesize: 10,
...@@ -286,7 +291,8 @@ export default { ...@@ -286,7 +291,8 @@ export default {
}, },
approvedearch () { approvedearch () {
let vm = this let vm = this
let url = $config.basePath + 'prj_submit_list' let randomString = Math.floor(Math.random() * 21)
let url = $config.basePath + 'prj_submit_list' + '&index' + `'${randomString}'`
vm.approvedPagenum = 1 vm.approvedPagenum = 1
let param = { let param = {
user_phone: window.localStorage.user_phone, user_phone: window.localStorage.user_phone,
......
...@@ -456,7 +456,7 @@ export default { ...@@ -456,7 +456,7 @@ export default {
if (res.result === 'S') { if (res.result === 'S') {
return true return true
} else { } else {
// vm.hlsPopup.showLongCenter(res.message) // vm.hlsPopup.showLongCenter(res.message)
} }
}, },
// 征信查询 // 征信查询
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div class="down-content"> <div class="down-content">
<span>请上传照片</span> <span>请上传照片</span>
<div class="photo" @click="ocrShow()"> <div class="photo" @click="ocrShow()">
<img v-if="vehicleImg" :src="vertifyImg" alt=""> <img v-if="vehicleImg" :src="vehicleImg" alt="">
</div> </div>
<list-item :item-height="44"> <list-item :item-height="44">
<item> <item>
...@@ -244,6 +244,8 @@ export default { ...@@ -244,6 +244,8 @@ export default {
read: false, // 表示只读 read: false, // 表示只读
showDate: '', showDate: '',
flag: false, flag: false,
isUpload: false, // 是否上传
upload_list: [], // 上传列表
productLine: [ productLine: [
{ {
code: '5', code: '5',
...@@ -400,6 +402,7 @@ export default { ...@@ -400,6 +402,7 @@ export default {
if (!imgdata) { if (!imgdata) {
hlsPopup.showLongCenter('请拍照') hlsPopup.showLongCenter('请拍照')
} else { } else {
vm.isUpload = true
vm.vehicleImg = imgdata vm.vehicleImg = imgdata
vm.vehicleIdentify(imgdata) vm.vehicleIdentify(imgdata)
} }
...@@ -421,6 +424,7 @@ export default { ...@@ -421,6 +424,7 @@ export default {
if (imgUrl.length === 0) { if (imgUrl.length === 0) {
hlsPopup.showLongCenter('请选择一张图片') hlsPopup.showLongCenter('请选择一张图片')
} else { } else {
vm.isUpload = true
vm.vehicleImg = imgUrl[0] vm.vehicleImg = imgUrl[0]
vm.vehicleIdentify(imgUrl[0]) vm.vehicleIdentify(imgUrl[0])
} }
...@@ -441,10 +445,48 @@ export default { ...@@ -441,10 +445,48 @@ export default {
let result = res.result.words_result let result = res.result.words_result
vm.info.frame_number = result.VinNo // 车架号 vm.info.frame_number = result.VinNo // 车架号
vm.info.engine = result.EngineNo // 发动机号 vm.info.engine = result.EngineNo // 发动机号
// vm.vehicle_model = result.VinNo // 车辆型号 vm.vehicle_model = result.VinNo // 车辆型号
vm.info.certificate_number = result.CertificationNo // 合格证编号 vm.info.certificate_number = result.CertificationNo // 合格证编号
}) })
}, },
// 图片保存
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()
}
},
showTime (format) { showTime (format) {
this.hlsPopup.showTime({ this.hlsPopup.showTime({
nowDate: `${this.carDate}`, nowDate: `${this.carDate}`,
...@@ -474,6 +516,7 @@ export default { ...@@ -474,6 +516,7 @@ export default {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
if (res.code === '00') { if (res.code === '00') {
vm.hlsPopup.showSuccess('保存成功') vm.hlsPopup.showSuccess('保存成功')
vm.savePicture()
setTimeout(() => { setTimeout(() => {
vm.downNum = false vm.downNum = false
vm.getEquipment() vm.getEquipment()
...@@ -483,6 +526,22 @@ export default { ...@@ -483,6 +526,22 @@ export default {
} }
}) })
}, },
savePicture () {
let vm = this
let list = []
let obj = {
pkvalue: 'contract_lease_item_id',
source_type: 'CON_CONTRACT_LEASE_ITEM',
picture: '',
check_id: '',
filePath: vm.vehicleImg,
attachment_id: '',
user_id: 1,
fileName: '合格证',
}
list.push(obj)
vm.save_picture(list)
},
isSave () { isSave () {
this.hlsPopup.showConfirm({ this.hlsPopup.showConfirm({
title: '提示', title: '提示',
......
...@@ -33,11 +33,11 @@ ...@@ -33,11 +33,11 @@
<img src="@/assets/myInfo/car.png" > <img src="@/assets/myInfo/car.png" >
<p>发车申请</p> <p>发车申请</p>
</div> </div>
<div v-if="(user_bp_type==='TENANT')||(user_bp_type==='GUTA')" @click="changePay"> <div v-if="(user_bp_type==='TENANT')&&(multipleRole!=='GUTA')" @click="changePay">
<img src="@/assets/myInfo/pay.png" > <img src="@/assets/myInfo/pay.png" >
<p>首付还款</p> <p>首付还款</p>
</div> </div>
<div v-if="(user_bp_type==='TENANT')||(user_bp_type==='GUTA')" @click="changeRent"> <div v-if="(user_bp_type==='TENANT')&&(multipleRole!=='GUTA')" @click="changeRent">
<img src="@/assets/myInfo/refund.png" > <img src="@/assets/myInfo/refund.png" >
<p>租金还款</p> <p>租金还款</p>
</div> </div>
...@@ -147,14 +147,14 @@ ...@@ -147,14 +147,14 @@
</h-content> </h-content>
<role-switch <role-switch
v-show="roleSwitchFlag" v-show="roleSwitchFlag"
ref="roleSwitch" ref="roleSwitchRoleList"
:roleList="roleList" :roleList="roleList"
@roleConfirm="roleConfirm" @roleConfirm="roleConfirm"
@roleCancle="roleCancle" @roleCancle="roleCancle"
/> />
<role-switch <role-switch
v-show="popSetectBox" v-show="popSetectBox"
ref="roleSwitch" ref="roleSwitchType"
:roleList="type" :roleList="type"
@roleConfirm="typeConfirm" @roleConfirm="typeConfirm"
@roleCancle="typeCancle" @roleCancle="typeCancle"
...@@ -171,6 +171,7 @@ export default { ...@@ -171,6 +171,7 @@ export default {
data () { data () {
return { return {
currentVersion: process.env.currentVersion, currentVersion: process.env.currentVersion,
multipleRole: '',
upLoadObj: defaultImg, // 上传的图片 upLoadObj: defaultImg, // 上传的图片
flag: true, flag: true,
isAGENT: false, isAGENT: false,
...@@ -277,6 +278,7 @@ export default { ...@@ -277,6 +278,7 @@ export default {
created () {}, created () {},
beforeRouteEnter (to, from, next) { beforeRouteEnter (to, from, next) {
next(vm => { next(vm => {
vm.multipleRole = window.localStorage.getItem('multipleRole')
vm.userQuery() vm.userQuery()
vm.numQuery() vm.numQuery()
}) })
...@@ -323,6 +325,13 @@ export default { ...@@ -323,6 +325,13 @@ export default {
// 选择角色后确定 // 选择角色后确定
roleConfirm (role) { roleConfirm (role) {
this.roleSwitchFlag = false this.roleSwitchFlag = false
if (role.bp_type === 'TENANT') {
window.localStorage.setItem('multipleRole', 'TENANT')
this.multipleRole = 'TENANT'
} else if (role.bp_type === 'GUTA') {
window.localStorage.setItem('multipleRole', 'GUTA')
this.multipleRole = 'GUTA'
}
console.log('选择后的角色为:' + role) console.log('选择后的角色为:' + role)
}, },
typeConfirm (e) { // 选择操作方式后 typeConfirm (e) { // 选择操作方式后
...@@ -624,7 +633,7 @@ export default { ...@@ -624,7 +633,7 @@ export default {
} else if (index === 1) { } else if (index === 1) {
this.changePageHead() this.changePageHead()
} else if (index === 2) { } else if (index === 2) {
this.$refs.roleSwitch.show() this.$refs.roleSwitchRoleList.show()
} }
}, },
}) })
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<div v-show="showFlag" class="role-switch-wrap"> <div v-show="showFlag" class="role-switch-wrap">
<div class="role-switch-content"> <div class="role-switch-content">
<div class="content-header"> <div class="content-header">
<span>请选择要切换的角色</span> <span>请选择要切换的内容</span>
<img src="@/assets/myInfo/modalClose.png" @click="roleCancle"> <img src="@/assets/myInfo/modalClose.png" @click="roleCancle">
</div> </div>
<div class="content-wrap"> <div class="content-wrap">
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
</div> </div>
</div> </div>
<div v-if="isShowpayInfo" class="box-wrap"> <div v-if="isShowpayInfo" class="box-wrap">
<!-- <div class="box-top"> <!-- <div class="box-top">
<img src="@/assets/payment/bank-title.png" > <img src="@/assets/payment/bank-title.png" >
</div>--> </div>-->
<div class="box-center"> <div class="box-center">
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<div slot="name" class="name">订单编号</div> <div slot="name" class="name">订单编号</div>
<div slot="content">{{ info.order_number }}</div> <div slot="content">{{ info.order_number }}</div>
</item> </item>
<!-- <item> <!-- <item>
<div slot="name" class="name">付款人</div> <div slot="name" class="name">付款人</div>
<div slot="content">{{ info.pay_amount_name }}</div> <div slot="content">{{ info.pay_amount_name }}</div>
</item> </item>
...@@ -79,13 +79,13 @@ ...@@ -79,13 +79,13 @@
<div slot="name" class="name">付款账号</div> <div slot="name" class="name">付款账号</div>
<div slot="content">{{ info.pay_amount }}</div> <div slot="content">{{ info.pay_amount }}</div>
</item>--> </item>-->
<!-- <item> <!-- <item>
<div slot="name" class="name">交易金额</div> <div slot="name" class="name">交易金额</div>
<div slot="content">{{ info.orderamount|currency }}</div> <div slot="content">{{ info.orderamount|currency }}</div>
</item>--> </item>-->
<div class="orderamount-wrap"> <div class="orderamount-wrap">
<span class="orderamount-item">交易金额</span> <span class="orderamount-item">交易金额</span>
<span class="orderamount-item font-color">{{info.orderamount|currency}}</span> <span class="orderamount-item font-color">{{ info.orderamount|currency }}</span>
</div> </div>
<item> <item>
<div slot="name" class="name">支付方式</div> <div slot="name" class="name">支付方式</div>
...@@ -105,13 +105,13 @@ ...@@ -105,13 +105,13 @@
<p>手机K码支付需要您开通我行消息服务。</p> <p>手机K码支付需要您开通我行消息服务。</p>
<p>掌上银行支付需要您首先开通我行掌上银行,</p> <p>掌上银行支付需要您首先开通我行掌上银行,</p>
<p>且支付账户已添加到掌上银行;</p> <p>且支付账户已添加到掌上银行;</p>
<!-- <p>www.abchina. com</p> <!-- <p>www.abchina. com</p>
<p>全国24小时服务热线:95599</p> <p>全国24小时服务热线:95599</p>
<p>中国农业银行版权所有</p>--> <p>中国农业银行版权所有</p>-->
</div> </div>
</div> </div>
</h-content> </h-content>
<!-- <bottom-tab> <!-- <bottom-tab>
<tab-button v-if="showpay" class="foot" @click.native="pay">立即支付</tab-button> <tab-button v-if="showpay" class="foot" @click.native="pay">立即支付</tab-button>
<tab-button v-if="nextPay" class="foot" @click.native="pay">继续支付</tab-button> <tab-button v-if="nextPay" class="foot" @click.native="pay">继续支付</tab-button>
<tab-button v-if="showSelect" class="foot" @click.native="searchResult">查询支付结果</tab-button> <tab-button v-if="showSelect" class="foot" @click.native="searchResult">查询支付结果</tab-button>
...@@ -176,7 +176,7 @@ export default { ...@@ -176,7 +176,7 @@ export default {
pay (status) { pay (status) {
let vm = this let vm = this
vm.nextPay = false vm.nextPay = false
if(status === 'continue' && vm.payType === 'ABC_UNION'){ // 在银联模式下继续支付重新获取支付url,因为银联页面只能打开一次 if (status === 'continue' && vm.payType === 'ABC_UNION') { // 在银联模式下继续支付重新获取支付url,因为银联页面只能打开一次
hlsPopup.showConfirm({ hlsPopup.showConfirm({
title: '提示', title: '提示',
content: '银联不支持二次支付,请重新发起支付订单', content: '银联不支持二次支付,请重新发起支付订单',
...@@ -188,16 +188,16 @@ export default { ...@@ -188,16 +188,16 @@ export default {
} }
}, },
}) })
}else{ } else {
cordova.InAppBrowser.open(this.url, '_blank', 'location=yes') cordova.InAppBrowser.open(this.url, '_blank', 'location=yes')
// window.open(this.url) // window.open(this.url)
} }
setTimeout(() => { setTimeout(() => {
vm.showSelect = true vm.showSelect = true
vm.showpay = false vm.showpay = false
}, 3000) }, 3000)
}, },
getPayUrl(){ getPayUrl () {
let vm = this let vm = this
let url = process.env.basePath + 'merchant_payment' let url = process.env.basePath + 'merchant_payment'
let param = { let param = {
...@@ -209,7 +209,7 @@ export default { ...@@ -209,7 +209,7 @@ export default {
if (res.return_code !== '0000') { if (res.return_code !== '0000') {
hlsPopup.showLongCenter(res.error_message) hlsPopup.showLongCenter(res.error_message)
} else { } else {
cordova.InAppBrowser.open(res.paymentURL, '_blank', 'location=yes') cordova.InAppBrowser.open(res.paymentURL, '_blank', 'location=yes')
} }
} else { } else {
hlsPopup.showLongCenter(res.message) hlsPopup.showLongCenter(res.message)
......
...@@ -151,7 +151,7 @@ export default { ...@@ -151,7 +151,7 @@ export default {
beforeRouteEnter (to, from, next) { beforeRouteEnter (to, from, next) {
next(vm => { next(vm => {
vm.getBankInfo() vm.getBankInfo()
// vm.getNpCertificationUrl() // vm.getNpCertificationUrl()
}) })
}, },
methods: { methods: {
...@@ -222,7 +222,7 @@ export default { ...@@ -222,7 +222,7 @@ export default {
vm.$router.push({ vm.$router.push({
name: 'HomePage', name: 'HomePage',
}) })
} else { } else if (vm.certification_status === 'N') {
vm.$router.push({ vm.$router.push({
name: 'Certification', name: 'Certification',
params: { params: {
...@@ -254,7 +254,7 @@ export default { ...@@ -254,7 +254,7 @@ export default {
if ((res.info.code === 0) && (res.info.data.authUrl)) { if ((res.info.code === 0) && (res.info.data.authUrl)) {
vm.authUrl = res.info.data.authUrl vm.authUrl = res.info.data.authUrl
return vm.authUrl return vm.authUrl
} else if((res.info.code === 0) && (res.info.data.openId)){ } else if ((res.info.code === 0) && (res.info.data.openId)) {
vm.authUrl = res.info.data.openId vm.authUrl = res.info.data.openId
return vm.authUrl return vm.authUrl
} else { } else {
......
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