Commit 8c5bd18b authored by linxin's avatar linxin

调接口

parent 3a05fd18
......@@ -14,19 +14,21 @@
<list-item :item-height="44">
<item>
<div slot="name">车架号</div>
<input slot="content" readonly placeholder="自动识别车架号" >
<input slot="content" v-model="rentInfo.frame_number" readonly placeholder="自动识别车架号" >
</item>
<item>
<div slot="name">发动机号</div>
<input slot="content" readonly placeholder="自动识别发动机号" >
<input slot="content" v-model="rentInfo.engine" readonly placeholder="自动识别发动机号" >
</item>
<item>
<div slot="name">厂商型号</div>
<input slot="content" readonly class="write" placeholder="请输入厂商型号" >
<input
slot="content" v-model="rentInfo.manufacturer" readonly class="write"
placeholder="请输入厂商型号" >
</item>
<item>
<div slot="name">车牌号</div>
<input slot="content" readonly placeholder="请输入车牌号" >
<input slot="content" v-model="rentInfo.license_plate_number" readonly placeholder="请输入车牌号" >
</item>
</list-item>
</div>
......@@ -73,7 +75,7 @@
</item>
</list-item>
<div class="userInfo">设备清单</div>
<div v-for="(item,index) in numInt" :key="index" class="equipment" @click="downNum=true">
<div v-for="(item,index) in numInt" :key="index" class="equipment" @click="downNum=true;getRent()">
<div class="left">
<span>
<img src="@/assets/contractStart/list.png" >
......@@ -93,7 +95,7 @@
</div>
</h-content>
<bottom-tab>
<tab-button class="approve" @click.native="goAdd">发车申请</tab-button>
<tab-button class="approve" @click.native="confirm">确定</tab-button>
</bottom-tab>
</h-view>
......@@ -116,6 +118,12 @@ export default {
'bp_agent_name': '上海汉得信息技术股份有限公司 ',
'product_plan_id_n': 'PDJ',
},
rentInfo: {
'frame_number': '',
'engine': '',
'manufacturer': '',
'license_plate_number': '',
},
products: [],
equip: [{
'product_id': '3',
......@@ -140,6 +148,24 @@ export default {
})
},
methods: {
confirm () {
let vm = this
let url = process.env.basePath + 'do_car_confirm'
let param = {
'master': {
'contract_id': '123',
'confirm_status': 'APPROVED',
}}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.equip = res.lists
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
getEquipment () {
let vm = this
let url = process.env.basePath + 'car_equip_list_query'
......@@ -156,6 +182,23 @@ export default {
}
})
},
getRent () {
let vm = this
let url = process.env.basePath + 'leases_info_query'
let param = {
contract_id: vm.equip.contract_id,
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
Object.assign(vm.rentInfo, res.info)
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
getDetail () {
let vm = this
let url = process.env.basePath + 'con_contract_detial'
......
......@@ -16,7 +16,7 @@
:updateData="[contructs]"
:pullUp="true"
>
<div v-for="(item,index) in lists" :key="index" class="item" @click="changePage(item.project_id)">
<div v-for="(item,index) in showList" :key="index" class="item" @click="changePage(item.project_id)">
<div class="left">
<span>
<img src="@/assets/contractStart/icon.png" >
......@@ -50,7 +50,7 @@
</h-view>
</template>
<script>
import Tab from '@/pages/contractStart/tab'
import Tab from '@/pages/carConfirm/tab'
export default {
components: {
Tab,
......@@ -58,26 +58,64 @@ export default {
data () {
return {
contructs: [],
tabNum: 0,
lists: [{
'project_id': '48812',
'project_number': '',
'bp_name': '张三',
'total_price': '51',
'division_n': 'PDJ',
'leases_status': '',
'confirm_status': 'SUBMIT',
},
{
'project_id': '48800',
'project_number': '',
'bp_name': '张三',
'bp_name': '李四',
'total_price': '51',
'division_n': 'PDJ',
'confirm_status': 'APPROVED',
},
{
'project_id': '48800',
'project_number': '',
'bp_name': '王五',
'total_price': '51',
'division_n': 'PDJ',
'leases_status': '',
'confirm_status': 'APPROVED',
}],
showList: [],
undo: [],
done: [],
}
},
watch: {
'tabNum': {
handler (newVal, oldVal) {
if (newVal === 0) {
this.showList = this.undo
} else if (newVal === 1) {
this.showList = this.done
}
},
immediate: true,
},
},
created () {
this.selectShowList()
},
methods: {
selectShowList () {
let vm = this
this.lists.forEach(item => {
if (item.confirm_status === 'SUBMIT') {
vm.undo.push(item)
} else if (item.confirm_status === 'APPROVED') {
vm.done.push(item)
}
})
},
getTabNum (i) {
this.tabNum = i
},
changePage (e) {
this.$router.push({
......
<!--
* @Description: In User Settings Edit
* @Author: your name
* @Date: 2019-09-25 11:10:34
* @LastEditTime: 2019-09-25 21:05:24
* @LastEditors: Please set LastEditors
-->
<template>
<div class="tab-style">
<div :class="{'tab-content-bg':tabNum == 0}" class="tab-content" @click="tabNum = 0;sendTabNum()"><img :src="tabNum == 0?signed:sign"><span
:class="{'colored':tabNum == 0}">待确认</span></div>
<div :class="{'tab-content-bg':tabNum == 1}" class="tab-content" @click="tabNum = 1;sendTabNum()"><img :src="tabNum == 1?finished:finish"><span
:class="{'colored':tabNum == 1}">已确认</span></div>
</div>
</template>
<script>
import signed from '@/assets/contractStart/noY.png'
import finished from '@/assets/contractStart/confirmY.png'
import sign from '@/assets/contractStart/noN.png'
import finish from '@/assets/contractStart/confirmN.png'
export default {
data () {
return {
tabNum: 0,
signed: signed,
finished: finished,
sign: sign,
finish: finish,
}
},
methods: {
sendTabNum () {
this.$emit('getTabNum', this.tabNum)
},
},
}
</script>
<style lang="less" scoped>
.tab-style {
position: relative;
z-index: 50;
background-color: #fff;
display: flex;
justify-content: center;
padding-top: 12px;
padding-bottom: 8px;
align-items: center;
box-shadow: 0 2px 3px 0 rgba(220, 220, 221, 0.50);
.tab-content {
display: block;
width: 45.9%;
height: 32px;
background: rgba(220, 220, 221, 0.26);
border-radius: 16px;
display: flex;
justify-content: center;
align-items: center;
span {
margin-left: 2%;
font-size: 14px;
color: #383F45;
font-weight: 600;
font-family: PingFangSC-Semibold;
}
.colored {
color: #1D3FFF
}
}
.tab-content-bg{
background: rgba(0,70,156,0.10);
}
img {
width:16px;
height: 16px;
// margin-right:5.7px;
}
.tab-content:nth-of-type(2) {
margin-left: 7px;
}
}
</style>
......@@ -19,7 +19,7 @@
<div><span>合同金额</span><p>{{ item.total_price|currency }}</p></div>
<div><span>已还金额</span><p class="bold">{{ item.recivied_amount|currency }}</p></div>
<span class="red">逾期{{ item.overdue_days }}</span>
<section @click="toRepayDetails">
<section @click="toRepayDetails(item.project_id)">
<img src="@/assets/contractRepayment/view.png" alt="">
<span>查看合同明细</span>
</section>
......@@ -75,7 +75,7 @@ export default {
beforeRouteEnter (to, from, next) {
next(vm => {
if (from.name === 'HomePage') {
// vm.getList()
vm.getList()
}
})
},
......@@ -96,9 +96,12 @@ export default {
}
})
},
toRepayDetails () {
toRepayDetails (e) {
this.$router.push({
name: 'RepayDetails',
params: {
project_id: e,
},
})
},
},
......
......@@ -81,8 +81,22 @@ export default {
},
data () {
return {
detailInfo: {},
lists: [],
detailInfo: {
project_number: '',
agent_bp_name: '',
bp_name: '',
division_n: '',
total_price: '',
product_plan_id_n: '',
product_num: '',
},
lists: [{
'lease_item_car_num': 'GH',
'product_code': 'GTC389',
'lease_item_factory_num': 'EF',
'lease_item_engine_num': 'CD',
'contract_id': '123',
}],
}
},
computed: {},
......@@ -100,7 +114,7 @@ export default {
let vm = this
let url = process.env.basePath + 'con_equip_list'
let param = {
project_id: 46002,
project_id: this.$route.params.project_id,
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
......@@ -116,7 +130,7 @@ export default {
let vm = this
let url = process.env.basePath + 'con_repayment_detial'
let param = {
project_id: 48818,
project_id: this.$route.params.project_id,
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
......
......@@ -12,8 +12,8 @@
<div class="plan-list">
<div v-for="(item,index) in lists" :key="index" class="plan-item">
<div class="left">
<p>2019</p>
<span>01-01</span>
<p>{{ selectYear(item.repayment_date) }}</p>
<span>{{ selectMonth(item.repayment_date) }}</span>
</div>
<div :class="{right:true,white:show!=='done'}">
<div :class="{number:true,blue:show==='undone',orange:show==='doing'}">{{ index + 1 }}</div>
......@@ -56,7 +56,7 @@ export default {
'cf_item_name': '手续费',
'received_amount': '400',
'pay_method': '代扣',
'repayment_date': '2019/10/12',
'repayment_date': '2020/10/12',
},
{
'due_amount': '400',
......@@ -64,7 +64,7 @@ export default {
'cf_item_name': 'gps费用',
'received_amount': '200',
'pay_method': '自主还款',
'repayment_date': '2019/10/19',
'repayment_date': '2021/10/19',
},
],
}
......@@ -73,10 +73,17 @@ export default {
watch: {},
beforeRouteEnter (to, from, next) {
next(vm => {
// vm.getRefund()
vm.getRefund()
})
},
methods: {
selectMonth (e) {
let arr = e.split('/')
return `${arr[1]}-${arr[2]}`
},
selectYear (e) {
return e.substring(0, 4)
},
getRefund () {
let vm = this
let url = process.env.basePath + 'con_equip_repayment_plan'
......
This diff is collapsed.
......@@ -16,7 +16,7 @@
:updateData="[contructs]"
:pullUp="true"
>
<div v-for="(item,index) in lists" :key="index" class="item" @click="changePage">
<div v-for="(item,index) in showList" :key="index" class="item" @click="changePage(item.project_id)">
<div class="left">
<span>
<img src="@/assets/contractStart/icon.png" >
......@@ -62,14 +62,15 @@ export default {
},
data () {
return {
tabNum: 0,
contructs: [],
lists: [{
'project_id': '48812',
'project_number': '',
'bp_name': '张三',
'bp_name': '李四',
'total_price': '51',
'division_n': 'PDJ',
'leases_status': '',
'leases_status': 'Y',
},
{
'project_id': '48800',
......@@ -77,31 +78,67 @@ export default {
'bp_name': '张三',
'total_price': '51',
'division_n': 'PDJ',
'leases_status': '',
'leases_status': 'N',
}],
showList: [],
undo: [],
done: [],
}
},
beforeRouteEnter (to, from, next) {
next(vm => {
if (from.name === 'MyInfo') {
vm.getList()
}
})
},
watch: {
'tabNum': {
handler () {
if (this.tabNum === 0) {
this.showList = this.undo
} else if (this.tabNum === 1) {
this.showList = this.done
}
},
immediate: true,
},
},
created () {
this.selectShowList()
},
methods: {
selectShowList () {
let vm = this
this.lists.forEach(item => {
if (item.leases_status === 'Y') {
vm.undo.push(item)
} else if (item.leases_status === 'N') {
vm.done.push(item)
}
})
},
getTabNum (i) {
this.tabNum = i
},
goAdd () {
this.$router.push({
name: 'AddCar',
})
hlsPopup.showLongCenter('暂不支持无关联进件的车辆发送')
// this.$router.push({
// name: 'AddCar',
// })
},
changePage () {
changePage (e) {
this.$router.push({
name: 'AddCar',
params: {
project_id: e,
},
})
},
getList () {
let vm = this
let url = process.env.basePath + 'car_confirm_list_query'
let url = process.env.basePath + 'car_apply_list_query'
let param = {
order_id: window.sessionStorage.getItem('user_phone'),
}
......
......@@ -212,7 +212,7 @@ export default new Router({
{path: '/repay-plan', component: RepayPlan, name: 'RepayPlan', meta: {keepAlive: true}},
// 发车申请
{path: '/start-List', component: StartList, name: 'StartList', meta: {keepAlive: true}},
{path: '/add-car', component: AddCar, name: 'AddCar', meta: {keepAlive: true}},
{path: '/add-car', component: AddCar, name: 'AddCar', meta: {keepAlive: false}},
// 发车确认
{path: '/confirm-detail', component: ConfirmDetail, name: 'ConfirmDetail', meta: {keepAlive: true}},
{path: '/confirm-list', component: ConfirmList, name: 'ConfirmList', 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