Commit 80a69d0c authored by linxin's avatar linxin

租金求和

parent 2f901a02
......@@ -86,11 +86,11 @@
</item>
<item>
<div slot="name" class="font-color">首付款</div>
<input slot="content" v-model="info.down_payment" readonly>
<span slot="content">{{ info.down_payment|NumFormat }}</span>
</item>
<item>
<div slot="name" class="font-color">保证金比例</div>
<input slot="content" v-model="info.deposit_ratio" readonly>
<span slot="content">{{ info.deposit_ratio|NumFormat }}</span>
</item>
<item>
<div slot="name" class="font-color">保证金</div>
......
......@@ -253,7 +253,7 @@ export default {
params: {
bp_id: this.bp_id,
user_bp_name: this.user_bp_name,
isAGENT: this.isAGENT,
// isAGENT: this.isAGENT,
status: 'APPROVED',
},
})
......
......@@ -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="$routeGo()">
<img src="@/assets/userBind/arrow.png" @click="changePage">
<span>合同记录</span>
</div>
</h-header>
......@@ -66,14 +66,35 @@ export default {
'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_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',
......@@ -86,18 +107,39 @@ export default {
'bp_name': '李永波装甲车租赁公司',
'cf_lists': [
{
'received_amount': '7000000',
'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': 'PRJ2019082',
'due_amount': '7000000',
'project_number': 'PRJ2019078',
'due_amount': '9500000',
},
{
'received_amount': '4050000',
'cf_item_name': '咨询费',
'received_amount': '3150000',
'cf_item_name': '保险押金',
'cf_item': '15',
'project_number': 'PRJ2019082',
'due_amount': '4050000',
'project_number': 'PRJ2019078',
'due_amount': '3150000',
},
{
'received_amount': '3150000',
'cf_item_name': 'GPS费用',
'cf_item': '15',
'project_number': 'PRJ2019078',
'due_amount': '3150000',
},
],
},
......@@ -140,10 +182,16 @@ export default {
// vm.getDetail()
})
},
// activated () {
// this.money = this.$route.params.money
// },
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'
......
......@@ -116,8 +116,7 @@ export default {
name: 'ContractRecord',
params: {
money,
// bp_id: this.$route.params.bp_id,
bp_id: 7850,
bp_id: this.$route.params.bp_id,
},
})
},
......
......@@ -2,14 +2,14 @@
<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="$routeGo()">
<img src="@/assets/userBind/arrow.png" @click="changePage">
<span>合同记录</span>
</div>
</h-header>
<div class="center">
<div class="now-pay">
<div>当前应付</div>
<div><span></span>{{ money |currency }}</div>
<div><span></span>{{ sumMoney |currency }}</div>
</div>
</div>
<h-content class="pay-content">
......@@ -17,47 +17,29 @@
<img src="@/assets/payment/search.png" alt="">
<input type="text" placeholder="请输入合同号/车架号/承租人名称">
</div>
<section v-for="(item,index) in 2" :key="index" class="contract-item">
<section v-for="(item,index) in info" :key="index" class="contract-item">
<div class="header">
<img src="@/assets/payment/contract.png" alt="">
<p>合同号 &nbsp; CON201903022001</p>
<span>张三</span>
<p>合同号 &nbsp; {{ item.project_number }}</p>
<span>{{ item.bp_name }}</span>
</div>
<div class="content">
<div class="item">
<div v-for="(detail,index) in item.con_lists" :key="index" class="item">
<div class="list">
<div><span>参数项</span> <span>JC1213</span> </div>
<div><span>参数项</span> <span>{{ detail.product_code }}</span> </div>
<div class="ing"><p>还款中</p></div>
</div>
<div class="list">
<div> <span>发动机号</span> <span>JC1213210</span> </div>
<div> <span>应还金额</span> <span class="orange">60,000.00</span> </div>
<div> <span>发动机号</span> <span>{{ detail.lease_item_engine_num }}</span> </div>
<div> <span>应还金额</span> <span class="orange">{{ detail.due_amount|currency }}</span> </div>
</div>
<div class="list">
<div><span>厂商型号</span> <span>98765556</span> </div>
<div><span>已还金额</span> <span class="blue">60,000.00</span> </div>
<div><span>厂商型号</span> <span>{{ detail.lease_item_factory_num }}</span> </div>
<div><span>已还金额</span> <span class="blue">{{ detail.received_amount|currency }}</span> </div>
</div>
<div class="list">
<div><span>车牌号</span> <span>98765556</span> </div>
<div><span>本次还款</span><section><input v-model="reFund1" type="text" placeholder="请输入还款金额"></section></div>
</div>
</div>
<div class="item">
<div class="list">
<div><span>参数项</span> <span>JC1213</span> </div>
<div class="ing"/>
</div>
<div class="list">
<div> <span>发动机号</span> <span>JC1213210</span> </div>
<div> <span>应还金额</span> <span class="blue">60,000.00</span> </div>
</div>
<div class="list">
<div><span>厂商型号</span> <span>98765556</span> </div>
<div><span>已还金额</span> <span class="blue">60,000.00</span> </div>
</div>
<div class="list">
<div><span>车牌号</span> <span>98765556</span> </div>
<div/>
<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>
</div>
</div>
......@@ -65,7 +47,7 @@
<list-item :item-height="44">
<item>
<div slot="name">应还违约金</div>
<span slot="content">{{ 123|currency }}</span>
<span slot="content">{{ money|currency }}</span>
</item>
</list-item></h-content>
<div class="prompt">
......@@ -77,32 +59,173 @@
</div>
</div>
<bottom-tab>
<tab-button class="footer" @click.native="toPayEntry(money)">
<tab-button class="footer" @click.native="toPayEntry(sumMoney)">
&nbsp;&nbsp;
</tab-button>
</bottom-tab>
</h-view>
</template>
<script>
export default {
name: 'PaymentContractRecord',
components: {
},
beforeRouteEnter (to, from, next) {
next(vm => {
// vm.getRentInfo()
vm.money = vm.$route.params.money
vm.sumMoney = vm.money
})
},
data () {
return {
sumMoney: '',
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',
},
],
},
],
}
},
computed: {},
watch: {},
watch: {
'info': {
handler (newName, oldName) {
let vm = this
let sumL = []
vm.sumMoney = vm.money
for (let i of this.info) {
i.con_lists.forEach(j => {
sumL.push(j.pay)
})
let a = 0
let newSum = sumL.filter(item => {
return item !== ''
})
let notNaN = newSum.filter(item => {
return !isNaN(item)
})
if (notNaN.length !== 0) {
notNaN.forEach(i => {
a = a + parseFloat(i)
if (vm.money !== '') {
vm.sumMoney = parseFloat(a + parseFloat(vm.money))
} else {
vm.sumMoney = a
}
})
} else {
if (vm.money !== '') {
vm.sumMoney = vm.money
} else {
vm.sumMoney = 0
}
}
}
},
deep: true,
},
},
activated () {
this.money = this.$route.params.money
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,
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.info = res.prj_lists
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
toPayEntry (money) {
this.$router.push({
name: 'PaymentPayEntry',
......
......@@ -9,7 +9,7 @@
<div class="center">
<div class="now-pay">
<div>当前应付</div>
<div><span></span>{{ liquidated_damages?money:pay_rent |currency }}</div>
<div><span></span>{{ money |currency }}</div>
</div>
</div>
<h-content class="pay-content">
......@@ -52,8 +52,8 @@ export default {
},
data () {
return {
money: '',
liquidated_damages: null,
money: 0,
liquidated_damages: 0,
pay_rent: 0,
}
},
......@@ -64,9 +64,12 @@ export default {
},
computed: {},
watch: {
'liquidated_damages': function () {
this.money = parseFloat(this.pay_rent) + parseFloat(this.liquidated_damages)
if (!this.liquidated_damages) { this.money = this.pay_rent }
'liquidated_damages': {
handler () {
this.money = parseFloat(parseFloat(this.pay_rent) + parseFloat(this.liquidated_damages))
// if (!this.liquidated_damages) { this.money = this.pay_rent }
},
immediate: true,
},
},
activated () {
......@@ -83,7 +86,7 @@ export default {
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.pay_rent = res.info.commission_receivable
vm.pay_rent = res.info.rental_amount
vm.liquidated_damages = res.info.overdue_amount
} else {
hlsPopup.showLongCenter(res.message)
......@@ -99,10 +102,12 @@ export default {
})
},
toContractRecord (money) {
let vm = this
this.$router.push({
name: 'PaymentContractRecord',
params: {
money,
bp_id: vm.$route.params.bp_id,
},
})
},
......
......@@ -224,14 +224,14 @@
</div>
</div>
</div>
<div v-if="from&&isApproved&&isAGENT" class="tax" @click="changeUndertake">
<!-- <div v-if="from&&isApproved&&isAGENT" class="tax" @click="changeUndertake">
<img src="@/assets/userBind/tax.png" class="left-img">
<div>
<span>缴纳保证金</span>
<p>已缴纳:500000</p>
</div>
<img src="@/assets/userBind/arrow-right.png" class="right-img">
</div>
</div> -->
</div>
<BankInfo v-show="tabNum==1" :getBankList="getBankList" @getInfo="getInfo" @getList="getList"/>
......@@ -496,8 +496,8 @@ export default {
},
async verified () {
this.dowload_list = [] // 保存之前将图片下载列表清空,防止出现重复的图片
let bpId = await this.saveWord()
this.getBankInfo()
let bpId = await this.saveWord()
this.getBankInfo()
// 查询资料清单
this.loadItemList()
},
......
......@@ -169,7 +169,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: true}},
{path: '/payment-contract-record', component: PaymentContractRecord, name: 'PaymentContractRecord', meta: {keepAlive: false}},
// 保证金支付
{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