Commit ed6810c4 authored by 李晓兵's avatar 李晓兵

'问题修复'

parent 934cdafc
Pipeline #4399 canceled with stages
...@@ -11,5 +11,5 @@ module.exports = { ...@@ -11,5 +11,5 @@ module.exports = {
ocrPath:'"http://180.104.121.66:8088/r/api"', ocrPath:'"http://180.104.121.66:8088/r/api"',
fileUploadSvcPath:'"http://180.104.121.66:8088/r/api/app/fileUploadSvc?sysName=XCMG_DEV&apiName="', fileUploadSvcPath:'"http://180.104.121.66:8088/r/api/app/fileUploadSvc?sysName=XCMG_DEV&apiName="',
appId: '"com.xcmg.app.dev"', appId: '"com.xcmg.app.dev"',
currentVersion: '"1.2.6"' currentVersion: '"1.2.8"'
} }
...@@ -326,11 +326,13 @@ export default { ...@@ -326,11 +326,13 @@ export default {
window.localStorage.setItem('fromPage', 'list') window.localStorage.setItem('fromPage', 'list')
window.localStorage.setItem('project_id', item.project_id) window.localStorage.setItem('project_id', item.project_id)
window.localStorage.setItem('bp_class_tenant', item.bp_class) window.localStorage.setItem('bp_class_tenant', item.bp_class)
window.localStorage.setItem('bp_id_tenant', item.bp_id)
} else if (this.num === 2) { } else if (this.num === 2) {
window.localStorage.setItem('contractReadonly', true) window.localStorage.setItem('contractReadonly', true)
window.localStorage.setItem('fromPage', 'list') window.localStorage.setItem('fromPage', 'list')
window.localStorage.setItem('project_id', item.project_id) window.localStorage.setItem('project_id', item.project_id)
window.localStorage.setItem('bp_class_tenant', item.bp_class) window.localStorage.setItem('bp_class_tenant', item.bp_class)
window.localStorage.setItem('bp_id_tenant', item.bp_id)
} }
this.$router.push({ this.$router.push({
name: 'CreateBaseInfo', name: 'CreateBaseInfo',
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<h-view id="create-rent-info"> <h-view id="create-rent-info">
<h-header :proportion="[5,1,1]" class="bar-custom"> <h-header :proportion="[5,1,1]" class="bar-custom">
<div slot="left" class="h-header-btn"> <div slot="left" class="h-header-btn">
<img src="@/assets/userBind/arrow.png" @click="$routeGo()" > <img src="@/assets/userBind/arrow.png" @click="routeGoCustom()" >
<span>租赁信息</span> <span>租赁信息</span>
</div> </div>
</h-header> </h-header>
...@@ -152,7 +152,8 @@ ...@@ -152,7 +152,8 @@
</list-item> </list-item>
</h-content> </h-content>
<bottom-tab class="add-box"> <bottom-tab class="add-box">
<tab-button v-if="!isReadOnly" class="before" @click.native="save">计算</tab-button> <tab-button v-if="!isReadOnly && !calculeFlag" class="before" @click.native="save">计算</tab-button>
<tab-button v-if="!isReadOnly && calculeFlag" class="before" @click.native="save">重新计算</tab-button>
<tab-button class="next" @click.native="next">下一步</tab-button> <tab-button class="next" @click.native="next">下一步</tab-button>
</bottom-tab> </bottom-tab>
<h-modal ref="modal" v-model="showModalValue" class="flow" position="bottom"> <h-modal ref="modal" v-model="showModalValue" class="flow" position="bottom">
...@@ -249,6 +250,9 @@ export default { ...@@ -249,6 +250,9 @@ export default {
}, },
data () { data () {
return { return {
calculeFlag: false,
salesEnter: '', // 页面进入标识,该字段作用:第一次创建时即从销售页面进入进本信息、租赁信息、附件信息。用于判断后面页面录入数据后未保存则点击上一步,再次进入该页面数据丢失问题
saveTed: false, // 本页面数据是否保存标识
showModalValue: false, showModalValue: false,
showModalBusiness: false, showModalBusiness: false,
isComputed: false, isComputed: false,
...@@ -350,22 +354,29 @@ export default { ...@@ -350,22 +354,29 @@ export default {
vm.divisionLists = [] vm.divisionLists = []
vm.pagenum = 1 vm.pagenum = 1
vm.pagenumPolicy = 1 vm.pagenumPolicy = 1
vm.saveInfo['project_id'] = window.localStorage.project_id // 重新赋值,防止缓存
vm.productInfo['project_id'] = window.localStorage.project_id // 重新赋值,防止缓存
if (from.name === 'CreateBaseInfo') { if (from.name === 'CreateBaseInfo') {
vm.isComputed = false vm.isComputed = false
vm.calculeFlag = false
vm.salesEnter = vm.$route.params.salesEnter
vm.saveTed = false
if (vm.fromPage === 'sale') { if (vm.fromPage === 'sale') {
vm.fromList = false vm.fromList = false
} else if (vm.fromPage === 'list') { } else if (vm.fromPage === 'list') {
vm.fromList = true vm.fromList = true
vm.rentInfoQuery() vm.rentInfoQuery()
} }
console.log('****************** '+JSON.stringify(vm.saveInfo))
Object.keys(vm.saveInfo).forEach(i => { // 置空saveInfo Object.keys(vm.saveInfo).forEach(i => { // 置空saveInfo
if (i !== 'project_id') { if (i !== 'project_id') {
vm.saveInfo[i] = '' vm.saveInfo[i] = ''
} }
}) })
console.log('@@@@@@@@@@@@@@@@@@'+JSON.stringify(vm.saveInfo))
Object.keys(vm.productInfo).forEach(i => { // 置空productInfo Object.keys(vm.productInfo).forEach(i => { // 置空productInfo
if (i !== 'project_id') { if (i !== 'project_id') {
vm.saveInfo[i] = '' vm.productInfo[i] = ''
} }
}) })
setTimeout(() => { setTimeout(() => {
...@@ -377,6 +388,25 @@ export default { ...@@ -377,6 +388,25 @@ export default {
}) })
}, },
methods: { methods: {
// 自定义返回逻辑:第一次新建时返回判断是否保存数据,未保存提示保存
routeGoCustom () {
let vm = this
if (vm.salesEnter === 'SalesInfo' && !vm.saveTed) {
hlsPopup.showConfirm({
title: '提示',
content: '当前页面数据未保存,返回会导致数据丢失,是否保存?',
onConfirm: function (index) {
if (index === 1) {
vm.saveBack()
} else {
vm.$routeGo()
}
},
})
} else {
vm.$routeGo()
}
},
changeRatio () { changeRatio () {
this.saveInfo.down_payment_ratio_n = `${(this.saveInfo.down_payment / this.saveInfo.equip_price).toFixed(2) * 100}%` this.saveInfo.down_payment_ratio_n = `${(this.saveInfo.down_payment / this.saveInfo.equip_price).toFixed(2) * 100}%`
}, },
...@@ -421,15 +451,32 @@ export default { ...@@ -421,15 +451,32 @@ export default {
vm.saveInfo.penalty_rate = e.penalty_rate vm.saveInfo.penalty_rate = e.penalty_rate
vm.saveInfo.deposit_ratio = e.deposit_ratio vm.saveInfo.deposit_ratio = e.deposit_ratio
vm.saveInfo.deposit_ratio_n = e.deposit_ratio_n vm.saveInfo.deposit_ratio_n = e.deposit_ratio_n
vm.saveInfo.lease_times = e.lease_times
setTimeout(() => { setTimeout(() => {
vm.showModalBusiness = false vm.showModalBusiness = false
}, 100) }, 100)
}, },
calculateBack(){
let vm = this
let url = process.env.basePath + 'prj_lease_info_save'
vm.saveInfo.down_payment_ratio = (vm.saveInfo.down_payment_ratio_n.replace('%', '') / 100).toFixed(2)
vm.saveInfo.lease_charge_ratio = (vm.saveInfo.lease_charge_ratio_n.replace('%', '') / 100).toFixed(2)
vm.saveInfo.deposit_ratio = (vm.saveInfo.deposit_ratio_n.replace('%', '') / 100).toFixed(2)
vm.saveInfo.finance_amount = vm.finance_amount
let param = {
master: vm.saveInfo,
}
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
// vm.isComputed = true
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
save () { save () {
let vm = this let vm = this
// vm.$router.push({
// name: 'CreateEnclosureInfo',
// })
let url = process.env.basePath + 'prj_lease_info_save' let url = process.env.basePath + 'prj_lease_info_save'
vm.saveInfo.down_payment_ratio = (vm.saveInfo.down_payment_ratio_n.replace('%', '') / 100).toFixed(2) vm.saveInfo.down_payment_ratio = (vm.saveInfo.down_payment_ratio_n.replace('%', '') / 100).toFixed(2)
vm.saveInfo.lease_charge_ratio = (vm.saveInfo.lease_charge_ratio_n.replace('%', '') / 100).toFixed(2) vm.saveInfo.lease_charge_ratio = (vm.saveInfo.lease_charge_ratio_n.replace('%', '') / 100).toFixed(2)
...@@ -443,6 +490,7 @@ export default { ...@@ -443,6 +490,7 @@ export default {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
if (res.result === 'S') { if (res.result === 'S') {
vm.isComputed = true vm.isComputed = true
vm.calculeFlag = true
hlsPopup.showLongCenter('计算成功') hlsPopup.showLongCenter('计算成功')
vm.goPlan() vm.goPlan()
} else { } else {
...@@ -450,6 +498,28 @@ export default { ...@@ -450,6 +498,28 @@ export default {
} }
}) })
}, },
saveBack () {
let vm = this
vm.calculateBack() // 保存融资信息
let url = process.env.basePath + 'prj_product_info_save'
let param = {
master: {
division_n: vm.saveInfo.division_n,
bp_name: vm.$route.params.bp_name,
...vm.productInfo,
},
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
hlsPopup.showLongCenter('保存成功')
vm.$routeGo()
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
next () { next () {
let vm = this let vm = this
if (vm.isReadOnly) { if (vm.isReadOnly) {
...@@ -473,6 +543,7 @@ export default { ...@@ -473,6 +543,7 @@ export default {
vm.$post(url, param).then(function (res) { vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
if (res.result === 'S') { if (res.result === 'S') {
vm.saveTed = true
vm.$router.push({ vm.$router.push({
name: 'CreateEnclosureInfo', name: 'CreateEnclosureInfo',
}) })
...@@ -568,6 +639,8 @@ export default { ...@@ -568,6 +639,8 @@ export default {
}, },
searchBusinessPolicy () { searchBusinessPolicy () {
let vm = this let vm = this
vm.businessLists = []
vm.pagenumSearchPolicy = 1
let randomString = Math.floor(Math.random() * 21) let randomString = Math.floor(Math.random() * 21)
let url = let url =
process.env.basePath + process.env.basePath +
...@@ -606,6 +679,8 @@ export default { ...@@ -606,6 +679,8 @@ export default {
}, },
getBusinessPolicy () { getBusinessPolicy () {
let vm = this let vm = this
vm.businessLists = []
vm.pagenumPolicy = 1
let randomString = Math.floor(Math.random() * 21) let randomString = Math.floor(Math.random() * 21)
let url = let url =
process.env.basePath + process.env.basePath +
...@@ -661,6 +736,8 @@ export default { ...@@ -661,6 +736,8 @@ export default {
}, },
searchProduct () { searchProduct () {
let vm = this let vm = this
vm.divisionLists = []
vm.pagenumSearch = 1
let randomString = Math.floor(Math.random() * 21) let randomString = Math.floor(Math.random() * 21)
let url = let url =
process.env.basePath + process.env.basePath +
...@@ -702,6 +779,8 @@ export default { ...@@ -702,6 +779,8 @@ export default {
}, },
getProduct () { getProduct () {
let vm = this let vm = this
vm.divisionLists = []
vm.pagenum = 1
vm.showModalValue = true vm.showModalValue = true
let randomString = Math.floor(Math.random() * 21) let randomString = Math.floor(Math.random() * 21)
let url = let url =
...@@ -709,6 +788,7 @@ export default { ...@@ -709,6 +788,7 @@ export default {
'prd_product_list' + 'prd_product_list' +
'&index' + '&index' +
`'${randomString}'` `'${randomString}'`
console.log('++++++++++++++++++++ '+vm.saveInfo.division)
let param = { let param = {
division: vm.saveInfo.division, division: vm.saveInfo.division,
user_phone: window.localStorage.getItem('user_phone'), user_phone: window.localStorage.getItem('user_phone'),
...@@ -747,6 +827,8 @@ export default { ...@@ -747,6 +827,8 @@ export default {
}, },
selectProductLine (e) { selectProductLine (e) {
let vm = this let vm = this
vm.productInfo.product_id = ''
vm.productInfo.product_id_n = ''
vm.hlsPopup.selectList({ vm.hlsPopup.selectList({
list: vm.productLine, list: vm.productLine,
code: 'bp_type', code: 'bp_type',
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<h-view id="create-base-info"> <h-view id="create-base-info">
<h-header :proportion="[5,1,1]" class="bar-custom"> <h-header :proportion="[5,1,1]" class="bar-custom">
<div slot="left" class="h-header-btn"> <div slot="left" class="h-header-btn">
<img src="@/assets/userBind/arrow.png" @click="$routeGo()" > <img src="@/assets/userBind/arrow.png" @click="routeGoCustom()" >
<span>基本信息</span> <span>基本信息</span>
</div> </div>
</h-header> </h-header>
...@@ -310,6 +310,8 @@ export default { ...@@ -310,6 +310,8 @@ export default {
}, },
data () { data () {
return { return {
salesEnter: '', // 页面进入标识,该字段作用:第一次创建时即从销售页面进入进本信息、租赁信息、附件信息。用于判断后面页面录入数据后未保存则点击上一步,再次进入该页面数据丢失问题
saveTed: false, // 本页面数据是否保存标识
checked: false, // 农行代扣 checked: false, // 农行代扣
checkedApproved: false, // 是否特批 checkedApproved: false, // 是否特批
bp_class: '', bp_class: '',
...@@ -379,12 +381,18 @@ export default { ...@@ -379,12 +381,18 @@ export default {
}, },
beforeRouteEnter (to, from, next) { beforeRouteEnter (to, from, next) {
next(vm => { next(vm => {
vm.salesEnter = ''
vm.saveTed = false
vm.showModalValue = false vm.showModalValue = false
vm.checked = false // 农行代扣
vm.checkedApproved = false // 是否特批
vm.pageNum = 1 vm.pageNum = 1
vm.pageNumSearch = 1 vm.pageNumSearch = 1
vm.undertakeList = [] vm.undertakeList = []
vm.bp_class = window.localStorage.bp_class_tenant vm.bp_class = window.localStorage.bp_class_tenant
vm.saveInfo['project_id'] = window.localStorage.project_id // 重新赋值,防止缓存
if (from.name === 'SalesInfo') { if (from.name === 'SalesInfo') {
vm.salesEnter = 'SalesInfo'
vm.fromPutted = false vm.fromPutted = false
Object.keys(vm.saveInfo).forEach(i => { Object.keys(vm.saveInfo).forEach(i => {
if (i !== 'project_id' && i !== 'bp_id' && i !== 'bp_class' && i !== 'abc_deduction_flag' && i !== 'special_flag') { if (i !== 'project_id' && i !== 'bp_id' && i !== 'bp_class' && i !== 'abc_deduction_flag' && i !== 'special_flag') {
...@@ -394,6 +402,7 @@ export default { ...@@ -394,6 +402,7 @@ export default {
} else if (i === 'bp_id') { } else if (i === 'bp_id') {
vm.saveInfo[i] = window.localStorage.bp_id_tenant vm.saveInfo[i] = window.localStorage.bp_id_tenant
} }
// vm.saveInfo['project_id'] = window.localStorage.project_id // 重新赋值,防止缓存
}) })
vm.selectUdertake = [] vm.selectUdertake = []
setTimeout(() => { setTimeout(() => {
...@@ -421,8 +430,40 @@ export default { ...@@ -421,8 +430,40 @@ export default {
mounted () { mounted () {
}, },
methods: { methods: {
// 自定义返回逻辑:第一次新建时返回判断是否保存数据,未保存提示保存
routeGoCustom () {
let vm = this
if (vm.salesEnter === 'SalesInfo' && !vm.saveTed) {
hlsPopup.showConfirm({
title: '提示',
content: '当前页面数据未保存,返回会导致数据丢失,是否保存?',
onConfirm: function (index) {
if (index === 1) {
vm.saveBack()
} else {
vm.$routeGo()
}
},
})
} else{
vm.$routeGo()
}
},
getSaveInfo () { getSaveInfo () {
let vm = this
let url = process.env.basePath + 'prj_base_info_query'
let param = {
project_id: window.localStorage.project_id,
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
Object.assign(vm.saveInfo, res.info)
} else {
hlsPopup.showLongCenter(res.message)
}
})
}, },
addUnder (e) { addUnder (e) {
let index = this.selectUdertake.findIndex(item => { let index = this.selectUdertake.findIndex(item => {
...@@ -465,6 +506,24 @@ export default { ...@@ -465,6 +506,24 @@ export default {
} }
}) })
}, },
// 第一次新建返回保存
saveBack () {
let vm = this
let url = process.env.basePath + 'prj_base_info_save'
let param = {
master: {...vm.saveInfo, ...vm.makeData()},
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
hlsPopup.showLongCenter('保存成功')
vm.$routeGo()
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
save () { save () {
let vm = this let vm = this
if (vm.fromPutted) { if (vm.fromPutted) {
...@@ -472,6 +531,7 @@ export default { ...@@ -472,6 +531,7 @@ export default {
name: 'CreateRentInfo', name: 'CreateRentInfo',
params: { params: {
bp_agent_id: vm.bp_agent_id, bp_agent_id: vm.bp_agent_id,
salesEnter: vm.salesEnter
}, },
}) })
} else { } else {
...@@ -483,11 +543,13 @@ export default { ...@@ -483,11 +543,13 @@ export default {
vm.$post(url, param).then(function (res) { vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
if (res.result === 'S') { if (res.result === 'S') {
vm.saveTed = true
vm.$router.push({ vm.$router.push({
name: 'CreateRentInfo', name: 'CreateRentInfo',
params: { params: {
bp_agent_id: vm.bp_agent_id, bp_agent_id: vm.bp_agent_id,
bp_name: vm.NPBaseInfo.bp_name, bp_name: vm.NPBaseInfo.bp_name,
salesEnter: vm.salesEnter
}, },
}) })
} else { } else {
......
...@@ -371,7 +371,7 @@ export default { ...@@ -371,7 +371,7 @@ export default {
}, },
loadItemList () { loadItemList () {
let vm = this let vm = this
let bpId = window.localStorage.getItem('bp_id') let bp_id_tenant = window.localStorage.getItem('bp_id_tenant')
let url = process.env.basePath + 'prj_cdd_check_list' let url = process.env.basePath + 'prj_cdd_check_list'
let group = '' let group = ''
if (vm.bpClass === 'NP') { if (vm.bpClass === 'NP') {
...@@ -381,7 +381,7 @@ export default { ...@@ -381,7 +381,7 @@ export default {
} }
let param = { let param = {
master: { master: {
document_id: bpId, document_id: bp_id_tenant,
document_table: 'HLS_BP_MASTER', document_table: 'HLS_BP_MASTER',
tab_group: group, tab_group: group,
}, },
......
...@@ -163,7 +163,7 @@ export default { ...@@ -163,7 +163,7 @@ export default {
factory: '', // 主机厂id factory: '', // 主机厂id
manu_manager: '', // 办事处业务员 manu_manager: '', // 办事处业务员
dates: '请选择', dates: '请选择',
project_id: window.localStorage.project_id, project_id: '',
}, },
} }
}, },
......
...@@ -261,7 +261,14 @@ export default { ...@@ -261,7 +261,14 @@ export default {
activated () {}, activated () {},
methods: { methods: {
openTest () { openTest () {
cordova.InAppBrowser.open('http://www.baidu.com', '_blank', 'location=yes') // cordova.InAppBrowser.open('http://www.baidu.com', '_blank', 'location=yes')
var date = '2019.11.23'
var times = this.dateFormat(date)
console.log(times)
},
dateFormat(str){
// return `${str.substring(0,4)}-${str.substring(4,6)}-${str.substring(6)}`
return str.replace(/\./g,'-')
}, },
// 查询头像 // 查询头像
getHead () { getHead () {
......
...@@ -22,8 +22,7 @@ ...@@ -22,8 +22,7 @@
v-for="(item,index) in payTypeList" v-for="(item,index) in payTypeList"
:proportion="[7,1,1]" :proportion="[7,1,1]"
:key="index" :key="index"
@click.native="isSelect(`three${index}`);ischeck(item);confirmToPay(item)" @click.native="isSelect(`three${index}`);ischeck(item)"><!--;confirmToPay(item)-->
>
<div slot="name" style="flex=3"> <div slot="name" style="flex=3">
<img :src="selectImg(item)" alt class="icon" > <img :src="selectImg(item)" alt class="icon" >
{{ item.code_name }} {{ item.code_name }}
...@@ -229,7 +228,7 @@ export default { ...@@ -229,7 +228,7 @@ export default {
}, },
watch: { watch: {
'payTypeObj.payType_n' () { 'payTypeObj.payType_n' () {
this.confirmToPay() // this.confirmToPay()
}, },
}, },
beforeRouteEnter (to, from, next) { beforeRouteEnter (to, from, next) {
...@@ -320,6 +319,7 @@ export default { ...@@ -320,6 +319,7 @@ export default {
vm.$post(url, param).then(function (res) { vm.$post(url, param).then(function (res) {
if (res.result === 'S') { if (res.result === 'S') {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
vm.checkPay()
} else { } else {
hlsPopup.showLongCenter(res.message) hlsPopup.showLongCenter(res.message)
} }
...@@ -352,6 +352,7 @@ export default { ...@@ -352,6 +352,7 @@ export default {
url: res.paymentURL, url: res.paymentURL,
order_id: vm.$route.params.order_id, order_id: vm.$route.params.order_id,
text: vm.text, text: vm.text,
payType: vm.payTypeObj.payType,
}, },
}) })
} }
...@@ -361,7 +362,7 @@ export default { ...@@ -361,7 +362,7 @@ export default {
}) })
}, },
affirm () { affirm () {
this.confirm = true // this.confirm = true
this.confirmToPay() this.confirmToPay()
}, },
changePage () { changePage () {
......
...@@ -79,10 +79,14 @@ ...@@ -79,10 +79,14 @@
<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">
<span class="orderamount-item">交易金额</span>
<span class="orderamount-item font-color">{{info.orderamount|currency}}</span>
</div>
<item> <item>
<div slot="name" class="name">支付方式</div> <div slot="name" class="name">支付方式</div>
<div slot="content">{{ text }}</div> <div slot="content">{{ text }}</div>
...@@ -90,8 +94,8 @@ ...@@ -90,8 +94,8 @@
</list-item> </list-item>
</div> </div>
<div class="pay-btn"> <div class="pay-btn">
<div v-if="showpay" class="pay-btn-foot" @click="pay">立即支付</div> <div v-if="showpay" class="pay-btn-foot" @click="pay('')">立即支付</div>
<div v-if="nextPay" class="pay-btn-foot" @click="pay">继续支付</div> <div v-if="nextPay" class="pay-btn-foot" @click="pay('continue')">继续支付</div>
<div v-if="showSelect" class="pay-btn-foot" @click="searchResult">查询支付结果</div> <div v-if="showSelect" class="pay-btn-foot" @click="searchResult">查询支付结果</div>
<div v-if="isGo" class="pay-btn-foot" @click="goMyInfo">返回个人中心</div> <div v-if="isGo" class="pay-btn-foot" @click="goMyInfo">返回个人中心</div>
</div> </div>
...@@ -150,6 +154,7 @@ export default { ...@@ -150,6 +154,7 @@ export default {
vm.name = from.name vm.name = from.name
vm.url = vm.$route.params.url vm.url = vm.$route.params.url
vm.text = vm.$route.params.text vm.text = vm.$route.params.text
vm.payType = vm.$route.params.payType
vm.getInfo() vm.getInfo()
}) })
}, },
...@@ -168,16 +173,49 @@ export default { ...@@ -168,16 +173,49 @@ export default {
name: 'MyInfo', name: 'MyInfo',
}) })
}, },
pay () { pay (status) {
let vm = this let vm = this
vm.nextPay = false vm.nextPay = false
cordova.InAppBrowser.open(this.url, '_blank', 'location=yes') if(status === 'continue' && vm.payType === 'ABC_UNION'){ // 在银联模式下继续支付重新获取支付url,因为银联页面只能打开一次
// window.open(this.url) hlsPopup.showConfirm({
title: '提示',
content: '银联不支持二次支付,请重新发起支付订单',
onConfirm: function (index) {
if (index === 1) {
vm.changePage()
} else {
vm.changePage()
}
},
})
}else{
cordova.InAppBrowser.open(this.url, '_blank', 'location=yes')
// window.open(this.url)
}
setTimeout(() => { setTimeout(() => {
vm.showSelect = true vm.showSelect = true
vm.showpay = false vm.showpay = false
}, 3000) }, 3000)
}, },
getPayUrl(){
let vm = this
let url = process.env.basePath + 'merchant_payment'
let param = {
order_id: vm.$route.params.order_id,
}
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
if (res.return_code !== '0000') {
hlsPopup.showLongCenter(res.error_message)
} else {
cordova.InAppBrowser.open(res.paymentURL, '_blank', 'location=yes')
}
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
goMyInfo () { goMyInfo () {
this.$router.push({ this.$router.push({
name: 'MyInfo', name: 'MyInfo',
...@@ -269,6 +307,7 @@ export default { ...@@ -269,6 +307,7 @@ export default {
} }
</script> </script>
<style lang="less"> <style lang="less">
@import "../../styles/mixin";
#pay-page { #pay-page {
.payBtn { .payBtn {
width: 200px; width: 200px;
...@@ -297,6 +336,25 @@ export default { ...@@ -297,6 +336,25 @@ export default {
align-items: center; align-items: center;
.box-center{ .box-center{
width: 100%; width: 100%;
.orderamount-wrap{
width: 100%;
padding: 10px 20px 10px 0;
margin-left: 15px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.border-bottom();
.orderamount-item{
width: 100%;
height: 40px;
text-align: center;
line-height: 40px;
}
.font-color{
color: #666;
}
}
} }
} }
.description { .description {
......
...@@ -63,8 +63,7 @@ ...@@ -63,8 +63,7 @@
v-for="(item,index) in payTypeList" v-for="(item,index) in payTypeList"
:proportion="[7,1,1]" :proportion="[7,1,1]"
:key="index" :key="index"
@click.native="isSelect(`three${index}`);ischeck(item);confirmToPay(item)" @click.native="isSelect(`three${index}`);ischeck(item)"><!--;confirmToPay(item)-->
>
<div slot="name" style="flex=3"> <div slot="name" style="flex=3">
<img :src="selectImg(item)" alt class="icon" > <img :src="selectImg(item)" alt class="icon" >
{{ item.code_name }} {{ item.code_name }}
...@@ -259,7 +258,7 @@ export default { ...@@ -259,7 +258,7 @@ export default {
}) })
}, },
affirm () { affirm () {
this.confirm = true // this.confirm = true
this.confirmToPay() this.confirmToPay()
}, },
confirmToPay (e) { confirmToPay (e) {
...@@ -283,6 +282,7 @@ export default { ...@@ -283,6 +282,7 @@ export default {
vm.$post(url, param).then(function (res) { vm.$post(url, param).then(function (res) {
if (res.result === 'S') { if (res.result === 'S') {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
vm.checkPay()
} else { } else {
hlsPopup.showLongCenter(res.message) hlsPopup.showLongCenter(res.message)
} }
...@@ -316,6 +316,7 @@ export default { ...@@ -316,6 +316,7 @@ export default {
url: res.paymentURL, url: res.paymentURL,
order_id: vm.$route.params.order_id, order_id: vm.$route.params.order_id,
text: vm.text, text: vm.text,
payType: vm.payTypeObj.payType,
}, },
}) })
} }
......
...@@ -474,6 +474,9 @@ export default { ...@@ -474,6 +474,9 @@ export default {
}) })
}, },
methods: { methods: {
timeFormat (str) {
return `${str.substring(0, 4)}-${str.substring(4, 6)}-${str.substring(6)}`
},
deleteBP () { deleteBP () {
this.multiBpType.bp_type_n = '' this.multiBpType.bp_type_n = ''
this.multiBpType.bp_type = '' this.multiBpType.bp_type = ''
...@@ -1097,11 +1100,11 @@ export default { ...@@ -1097,11 +1100,11 @@ export default {
hlsPopup.hideLoading() hlsPopup.hideLoading()
let result = res.result.words_result let result = res.result.words_result
if (cardType === 'idCard') { if (cardType === 'idCard') {
vm.baseInfo.id_card_date_from = result.签发日期.words vm.baseInfo.id_card_date_from = vm.timeFormat(result.签发日期.words)
vm.baseInfo.id_card_date_to = result.失效日期.words vm.baseInfo.id_card_date_to = vm.timeFormat(result.失效日期.words)
} else { } else {
vm.baseInfo.id_card_date_from_sp = result.签发日期.words vm.baseInfo.id_card_date_from_sp = vm.timeFormat(result.签发日期.words)
vm.baseInfo.id_card_date_to_sp = result.失效日期.words vm.baseInfo.id_card_date_to_sp = vm.timeFormat(result.失效日期.words)
} }
}) })
}, },
......
...@@ -609,6 +609,9 @@ export default { ...@@ -609,6 +609,9 @@ export default {
next() next()
}, },
methods: { methods: {
timeFormat (str) {
return `${str.substring(0, 4)}-${str.substring(4, 6)}-${str.substring(6)}`
},
deleteBP () { deleteBP () {
this.multiBpType.bp_type_n = '' this.multiBpType.bp_type_n = ''
this.multiBpType.bp_type = '' this.multiBpType.bp_type = ''
...@@ -1277,12 +1280,12 @@ export default { ...@@ -1277,12 +1280,12 @@ export default {
let result = res.result.words_result let result = res.result.words_result
if (cardType === 'idCard') { // 法定代表人 if (cardType === 'idCard') { // 法定代表人
// 未授权 身份证有效期从,身份证有效期到 // 未授权 身份证有效期从,身份证有效期到
vm.legal_personMsg.id_card_date_from = result.签发日期.words vm.legal_personMsg.id_card_date_from = vm.timeFormat(result.签发日期.words)
vm.legal_personMsg.id_card_date_to = result.失效日期.words vm.legal_personMsg.id_card_date_to = vm.timeFormat(result.失效日期.words)
} else { } else {
// 已授权 身份证有效期从,身份证有效期到 // 已授权 身份证有效期从,身份证有效期到
vm.authMsg.auth_id_card_date_from = result.签发日期.words vm.authMsg.auth_id_card_date_from = vm.timeFormat(result.签发日期.words)
vm.authMsg.auth_id_card_date_to = result.失效日期.words vm.authMsg.auth_id_card_date_to = vm.timeFormat(result.失效日期.words)
} }
}) })
}, },
......
<!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=o7fTnpVAGzXKN7SirV8xGU2xzWQS2NrI"></script><title>徐工融租</title><link href=./static/css/app.b791cc37858b1b88ac1609dc5d532253.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.e547499500fbe65e7169.js></script><script type=text/javascript src=./static/js/app.92e19b9a3d4424b8181c.js></script></body></html> <!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=o7fTnpVAGzXKN7SirV8xGU2xzWQS2NrI"></script><title>徐工融租</title><link href=./static/css/app.891dc19da1733fc7db7071712cea81e0.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.e547499500fbe65e7169.js></script><script type=text/javascript src=./static/js/app.2ea5061d831d7ce89173.js></script></body></html>
\ No newline at end of file \ No newline at end of file
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