Commit dd6eb8d9 authored by linxin's avatar linxin

接口调整

parent 9a0505b4
......@@ -164,19 +164,11 @@ export default {
changePay () {
this.$router.push({
name: 'FirstPay',
params: {
// bp_id: this.bp_id,
bp_id: 7850,
},
})
},
changeRent () {
this.$router.push({
name: 'PaymentFirstPay',
params: {
// bp_id: this.bp_id,
bp_id: 7850,
},
})
},
updateVersion () {
......@@ -325,6 +317,7 @@ export default {
vm.user_bp_status = res.info.user_bp_status
vm.user_bp_class = res.info.user_bp_class
vm.bp_id = res.info.user_bp_id
window.sessionStorage.setItem('bp_id', 7850)
vm.user_bp_name = res.info.user_bp_name
vm.user_bp_type = res.info.user_bp_type
vm.user_phone = res.info.user_phone
......
......@@ -2,7 +2,7 @@
<h-view id="contract-record" class="public-style">
<h-header :proportion="[5,1,1]" class="bar-custom">
<div slot="left" class="h-header-btn">
<img src="@/assets/userBind/arrow.png" @click="changePage">
<img src="@/assets/userBind/arrow.png" @click="$routeGo()">
<span>合同记录</span>
</div>
</h-header>
......@@ -59,92 +59,7 @@ export default {
return {
money: 0,
inputNum: 0,
prj_lists: [
{
'project_id': '48792',
'project_number': 'PRJ2019078',
'bp_name': '李永波装甲车租赁公司',
'cf_lists': [
{
'received_amount': '9500000',
'cf_item_name': '首付款',
'cf_item': '51',
'project_number': 'PRJ2019078',
'due_amount': '9500000',
},
{
'received_amount': '3150000',
'cf_item_name': '保证金',
'cf_item': '15',
'project_number': 'PRJ2019078',
'due_amount': '3150000',
},
{
'received_amount': '9500000',
'cf_item_name': '手续费',
'cf_item': '51',
'project_number': 'PRJ2019078',
'due_amount': '9500000',
},
{
'received_amount': '3150000',
'cf_item_name': '保险押金',
'cf_item': '15',
'project_number': 'PRJ2019078',
'due_amount': '3150000',
},
{
'received_amount': '3150000',
'cf_item_name': 'GPS费用',
'cf_item': '15',
'project_number': 'PRJ2019078',
'due_amount': '3150000',
},
],
},
{
'project_id': '48800',
'project_number': 'PRJ2019082',
'bp_name': '李永波装甲车租赁公司',
'cf_lists': [
{
'received_amount': '9500000',
'cf_item_name': '首付款',
'cf_item': '51',
'project_number': 'PRJ2019078',
'due_amount': '9500000',
},
{
'received_amount': '3150000',
'cf_item_name': '保证金',
'cf_item': '15',
'project_number': 'PRJ2019078',
'due_amount': '3150000',
},
{
'received_amount': '9500000',
'cf_item_name': '手续费',
'cf_item': '51',
'project_number': 'PRJ2019078',
'due_amount': '9500000',
},
{
'received_amount': '3150000',
'cf_item_name': '保险押金',
'cf_item': '15',
'project_number': 'PRJ2019078',
'due_amount': '3150000',
},
{
'received_amount': '3150000',
'cf_item_name': 'GPS费用',
'cf_item': '15',
'project_number': 'PRJ2019078',
'due_amount': '3150000',
},
],
},
],
prj_lists: [],
}
},
......@@ -185,21 +100,11 @@ export default {
},
methods: {
changePage () {
this.$router.replace({
name: 'FirstPay',
params: {
bp_id: this.$route.params.bp_id,
},
})
this.$router.go(-1)
},
getDetail () {
let vm = this
let url = process.env.basePath + 'payment_prj_list_query'
let param = {
bp_id: this.$route.params.bp_id,
bp_id: window.sessionStorage.getItem('bp_id'),
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
......@@ -224,7 +129,7 @@ export default {
delete i.due_amount
delete i.received_amount
delete i.project_number
i.bp_id = this.$route.params.bp_id
i.bp_id = window.sessionStorage.getItem('bp_id')
})
return data
},
......
......@@ -61,7 +61,7 @@ export default {
let vm = this
let url = process.env.basePath + 'initial_payment_query'
let param = {
bp_id: vm.$route.params.bp_id,
bp_id: window.sessionStorage.getItem('bp_id'),
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
......@@ -89,15 +89,16 @@ export default {
let vm = this
let url = process.env.basePath + 'create_order_0_amount'
let param = {
bp_id: vm.$route.params.bp_id,
amount: vm.money,
info: {
bp_id: window.sessionStorage.getItem('bp_id'),
amount: vm.money,
},
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
console.log(res)
this.toPayEntry(vm.money)
vm.toPayEntry(vm.money)
} else {
hlsPopup.showLongCenter(res.message)
}
......@@ -108,25 +109,22 @@ export default {
name: 'PayEntry',
params: {
money,
bp_id: this.$route.params.bp_id,
},
})
},
createOrder () {
let vm = this
// window.sessionStorage.setItem('order_id', 123)
// vm.toContractRecord(vm.money)
let url = process.env.basePath + 'do_order_0_prj'
let param = {
bp_id: vm.$route.params.bp_id,
info: {
bp_id: window.sessionStorage.getItem('bp_id'),
},
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
console.log(res)
window.sessionStorage.setItem('order_id', res.info.order_id)
window.sessionStorage.setItem('order_id', res.order_id)
vm.toContractRecord(vm.money)
} else {
hlsPopup.showLongCenter(res.message)
......@@ -138,7 +136,6 @@ export default {
name: 'ContractRecord',
params: {
money,
bp_id: this.$route.params.bp_id,
},
})
},
......
......@@ -2,7 +2,7 @@
<h-view id="pay-entry" class="public-style">
<h-header :proportion="[5,1,1]" class="bar-custom">
<div slot="left" class="h-header-btn">
<img src="@/assets/userBind/arrow.png" @click="changePage">
<img src="@/assets/userBind/arrow.png" @click="$routeGo()">
<span>支付中心</span>
</div>
</h-header>
......@@ -63,11 +63,17 @@ export default {
return {
money: '',
select: 'one',
name: '',
}
},
computed: {},
watch: {},
beforeRouteEnter (to, from, next) {
next(vm => {
vm.name = from.name
})
},
activated () {
this.money = this.$route.params.money
},
......@@ -75,17 +81,6 @@ export default {
isSelect (way) {
this.select = way
},
changePage () {
this.$router.replace(
{
name: 'FirstPay',
params: {
bp_id: this.$route.params.bp_id,
},
}
)
this.$router.go(-1)
},
},
}
</script>
......
......@@ -2,7 +2,7 @@
<h-view id="payment-contract-record" class="public-style">
<h-header :proportion="[5,1,1]" class="bar-custom">
<div slot="left" class="h-header-btn">
<img src="@/assets/userBind/arrow.png" @click="changePage">
<img src="@/assets/userBind/arrow.png" @click="$routeGo()">
<span>合同记录</span>
</div>
</h-header>
......@@ -39,7 +39,7 @@
</div>
<div class="list">
<div><span>车牌号</span> <span>{{ detail.lease_item_car_num }}</span> </div>
<div><span>本次还款</span><section><input v-model="detail.pay" type="text" placeholder="请输入还款金额"></section></div>
<div><span>本次还款</span><section><input v-model="detail.amount" type="text" placeholder="请输入还款金额"></section></div>
</div>
</div>
</div>
......@@ -59,7 +59,7 @@
</div>
</div>
<bottom-tab>
<tab-button class="footer" @click.native="toPayEntry(sumMoney)">
<tab-button class="footer" @click.native="payDetail()">
&nbsp;&nbsp;
</tab-button>
</bottom-tab>
......@@ -84,77 +84,7 @@ export default {
money: '',
reFund1: '',
reFund2: '',
info: [
{
'project_id': '48792',
'project_number': 'PRJ2019078',
'bp_name': '李永波装甲车租赁公司',
'con_lists': [
{
'project_id': '48792',
'contract_id': '410',
'due_amount': '400320',
'received_amount': '13171',
'overdue_amount': '0',
'lease_item_car_num': 'CD',
'lease_item_factory_num': 'EF',
'lease_item_engine_num': 'GH',
'product_code': 'AB',
},
{
'project_id': '48792',
'contract_id': '396',
'due_amount': '8358890',
'received_amount': '170729',
'overdue_amount': '0',
'lease_item_car_num': 'CD',
'lease_item_factory_num': 'EF',
'lease_item_engine_num': 'GH',
'product_code': 'AB',
},
{
'project_id': '48792',
'contract_id': '411',
'due_amount': '27722013.76',
'received_amount': '4562996.48',
'overdue_amount': '0',
'lease_item_car_num': 'CD',
'lease_item_factory_num': 'EF',
'lease_item_engine_num': 'GH',
'product_code': 'AB',
},
],
},
{
'project_id': '48800',
'project_number': 'PRJ2019082',
'bp_name': '李永波装甲车租赁公司',
'con_lists': [
{
'project_id': '48800',
'contract_id': '431',
'due_amount': '31814456',
'received_amount': '0',
'overdue_amount': '0',
'lease_item_car_num': 'CD',
'lease_item_factory_num': 'EF',
'lease_item_engine_num': 'GH',
'product_code': 'AB',
},
{
'project_id': '48800',
'contract_id': '371',
'due_amount': '699530',
'received_amount': '0',
'overdue_amount': '0',
'lease_item_car_num': 'CD',
'lease_item_factory_num': 'EF',
'lease_item_engine_num': 'GH',
'product_code': 'AB',
},
],
},
],
info: [],
}
},
computed: {},
......@@ -198,23 +128,13 @@ export default {
},
activated () {
debugger
},
methods: {
changePage () {
this.$router.replace({
name: 'PaymentFirstPay',
params: {
bp_id: this.$route.params.bp_id,
},
})
this.$router.go(-1)
},
getRentInfo () {
let vm = this
let url = process.env.basePath + 'payment_con_list_query'
let param = {
bp_id: vm.$route.params.bp_id,
bp_id: window.sessionStorage.getItem('bp_id'),
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
......@@ -226,6 +146,37 @@ export default {
}
})
},
createData () {
let obj = {}
let pushList = []
this.info.forEach(i => {
i.con_lists.forEach(j => {
obj.bp_id = window.sessionStorage.getItem('bp_id')
obj.amount = j.amount
obj.contract_id = j.contract_id
pushList.push(obj)
})
})
return pushList
},
payDetail () {
let vm = this
let url = process.env.basePath + 'create_detail_1_part'
let payLists = vm.createData()
let param = {
order_id: window.sessionStorage.getItem('order_id'),
pay_lists: payLists,
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.toPayEntry(vm.sumMoney)
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
toPayEntry (money) {
this.$router.push({
name: 'PaymentPayEntry',
......
......@@ -79,7 +79,7 @@ export default {
let vm = this
let url = process.env.basePath + 'rent_repayment_query'
let param = {
bp_id: vm.$route.params.bp_id,
bp_id: window.sessionStorage.getItem('bp_id'),
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
......@@ -96,7 +96,7 @@ export default {
let vm = this
let url = process.env.basePath + 'create_order_1_amount'
let param = {
bp_id: vm.$route.params.bp_id,
bp_id: window.sessionStorage.getItem('bp_id'),
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
......@@ -111,39 +111,36 @@ export default {
},
createOrder () {
let vm = this
// vm.toContractRecord(vm.liquidated_damages)
let url = process.env.basePath + 'do_order_1_con'
let param = {
bp_id: vm.$route.params.bp_id,
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
console.log(res)
vm.toContractRecord(vm.liquidated_damages)
} else {
hlsPopup.showLongCenter(res.message)
}
})
vm.toContractRecord(vm.liquidated_damages)
window.sessionStorage.setItem('order_id', 123)
// let url = process.env.basePath + 'do_order_1_con'
// let param = {
// bp_id: vm.$route.params.bp_id,
// }
// hlsPopup.showLoading('请稍候')
// vm.$post(url, param).then(function (res) {
// vm.hlsPopup.hideLoading()
// if (res.result === 'S') {
// window.sessionStorage.setItem('order_id', res.info.order_id)
// vm.toContractRecord(vm.liquidated_damages)
// } else {
// hlsPopup.showLongCenter(res.message)
// }
// })
},
toPayEntry (money) {
this.$router.push({
name: 'PaymentPayEntry',
params: {
money,
bp_id: this.$route.params.bp_id,
},
})
},
toContractRecord (money) {
let vm = this
this.$router.push({
name: 'PaymentContractRecord',
params: {
money,
bp_id: vm.$route.params.bp_id,
},
})
},
......
......@@ -2,7 +2,7 @@
<h-view id="payment-pay-entry" class="public-style">
<h-header :proportion="[5,1,1]" class="bar-custom">
<div slot="left" class="h-header-btn">
<img src="@/assets/userBind/arrow.png" @click="changePage">
<img src="@/assets/userBind/arrow.png" @click="$routeGo()">
<span>支付中心</span>
</div>
</h-header>
......@@ -75,17 +75,6 @@ export default {
isSelect (way) {
this.select = way
},
changePage () {
this.$router.replace(
{
name: 'PaymentFirstPay',
params: {
bp_id: this.$route.params.bp_id,
},
}
)
this.$router.go(-1)
},
},
}
</script>
......
......@@ -296,7 +296,7 @@
</list-item>
</div>
</h-view>
<bottom-tab v-if="!from" class="add-box">
<bottom-tab v-if="!isApproved" class="add-box">
<tab-button class="add-card" @click.native="addBankInfo">添加</tab-button>
</bottom-tab>
</h-modal>
......
......@@ -171,7 +171,7 @@ export default new Router({
// 款项支付
{path: '/payment-first-pay', component: PaymentFirstPay, name: 'PaymentFirstPay', meta: {keepAlive: true}},
{path: '/payment-pay-entry', component: PaymentPayEntry, name: 'PaymentPayEntry', meta: {keepAlive: true}},
{path: '/payment-contract-record', component: PaymentContractRecord, name: 'PaymentContractRecord', meta: {keepAlive: false}},
{path: '/payment-contract-record', component: PaymentContractRecord, name: 'PaymentContractRecord', meta: {keepAlive: true}},
// 保证金支付
{path: '/margin-first-pay', component: MarginFirstPay, name: 'MarginFirstPay', meta: {keepAlive: true}},
{path: '/margin-pay-entry', component: MarginPayEntry, name: 'MarginPayEntry', meta: {keepAlive: true}},
......
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