Commit 61e173c5 authored by linxin's avatar linxin

add

parent 0f844997
......@@ -338,11 +338,20 @@ export default {
this.approvedearch()
}
},
changePage () {
window.localStorage.setItem('contractReadonly', false)
window.localStorage.setItem('formPage', 'sale')
this.$router.push({
name: 'SalesInfo',
})
},
changeBase () {
if (this.num === 1) {
window.localStorage.setItem('contractReadonly', false)
window.localStorage.setItem('formPage', 'list')
} else if (this.num === 2) {
window.localStorage.setItem('contractReadonly', true)
window.localStorage.setItem('formPage', 'list')
}
this.$router.push({
name: 'CreateBaseInfo',
......
......@@ -222,8 +222,11 @@ export default {
showModalValue: false,
showModalBusiness: false,
isComputed: false,
fromPage: window.localStorage.fromPage,
keyWordProduct: '',
policyKeyWord: '',
fromPutted: false,
fromList: false, // 判断是否从列表过来
pagenum: 1, // 产品型号页码
pagenumSearch: 1, // 产品型号查询时的页码
pagenumPolicy: 1, // 商务政策没有查询时的页码
......@@ -309,14 +312,20 @@ export default {
vm.divisionLists = []
vm.pagenum = 1
vm.pagenumPolicy = 1
if (vm.fromPage === 'sale') {
vm.fromList = false
} else if (vm.status === 'list') {
vm.fromList = true
vm.rentInfoQuery()
}
if (from.name === 'CreateBaseInfo') {
vm.isComputed = false
Object.keys(vm.saveInfo).forEach(i => {
Object.keys(vm.saveInfo).forEach(i => { // 置空saveInfo
if (i !== 'project_id') {
vm.saveInfo[i] = ''
}
})
Object.keys(vm.productInfo).forEach(i => {
Object.keys(vm.productInfo).forEach(i => { // 置空productInfo
if (i !== 'project_id') {
vm.saveInfo[i] = ''
}
......@@ -339,6 +348,22 @@ export default {
changeLeaseCharge () {
this.saveInfo.lease_charge_ratio_n = `${(this.saveInfo.lease_charge / (this.saveInfo.equip_price - this.saveInfo.equip_price * this.saveInfo.down_payment_ratio_n.replace('%', '') / 100)).toFixed(2) * 100}%`
},
rentInfoQuery () { // 租赁信息查询
let vm = this
let url = process.env.basePath + 'prj_lease_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)
}
})
},
selectBusinessPolicy (e) {
let vm = this
vm.saveInfo.product_plan_id = e.product_plan_id
......
......@@ -163,6 +163,7 @@ export default {
factory: '', // 主机厂id
manu_manager: '', // 办事处业务员
dates: '请选择',
project_id: window.localStorage.project_id,
},
}
},
......@@ -199,10 +200,13 @@ export default {
manu_manager: '', // 办事处业务员
dates: '请选择',
bp_type: window.localStorage.bp_type,
project_id: '',
}
vm.businessQuery()
vm.agentQuery()
vm.factoryQuery()
} else if (from.name === 'CreateBaseInfo') {
vm.salesInfo.project_id = window.localStorage.project_id
}
})
},
......
......@@ -213,9 +213,27 @@ export default {
vm.isSuccess = false
hlsPopup.showLongCenter(res.error_message)
} else {
vm.isSuccess = true
vm.isFaild = false
hlsPopup.showLongCenter('交易成功')
if (res.status === '01') {
vm.isSuccess = false
vm.isFaild = false
hlsPopup.showLongCenter('可再次提交')
} else if (res.status === '02') {
vm.isSuccess = false
vm.isFaild = false
hlsPopup.showLongCenter('正在支付...')
} else if (res.status === '03') {
vm.isSuccess = true
vm.isFaild = false
hlsPopup.showLongCenter('交易成功')
} else if (res.status === '04') {
vm.isSuccess = true
vm.isFaild = false
hlsPopup.showLongCenter('交易完成')
} else {
vm.isSuccess = false
vm.isFaild = true
hlsPopup.showLongCenter('交易失败')
}
}
} else {
hlsPopup.showLongCenter(res.message)
......
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