Commit 0ebd9ebf authored by linxin's avatar linxin

Merge branch 'liuxin' into develop

parents 87825661 8c5bd18b
......@@ -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'
......
<template>
<h-view id="addCar">
<div v-show="downNum" class="modal-show">
<div class="modal-show">
<div class="down">
<div class="top">
录入产品信息
......@@ -28,10 +28,10 @@
<div slot="name">车牌号</div>
<input slot="content" v-model="info.license_plate_number" placeholder="请输入车牌号" >
</item>
<item :showArrow="true" @click.native="showModalValue=true">
<!-- <item :showArrow="true" @click.native="showModalValue=true">
<div slot="name">产品参数</div>
<input slot="content" v-model="info.bank_branch_name" placeholder="请选择产品参数" @click="changeHeight">
</item>
</item> -->
</list-item>
</div>
<button @click="save">保存</button>
......@@ -48,35 +48,39 @@
<list-item :item-height="44">
<item :showArrow="true">
<div slot="name">合同号</div>
<input slot="content" placeholder="请选择合同号" >
<input slot="content" v-model="detail.project_number" placeholder="请选择合同号" @click="selectContruct" >
</item>
<item :showArrow="true">
<div slot="name">经销商</div>
<input slot="content" placeholder="请选择经销商" >
<input slot="content" v-model="detail.bp_agent_name" placeholder="请选择经销商" @click="selectAgent" >
</item>
<item>
<div slot="name">承租人</div>
<input slot="content" placeholder="请输入承租人姓名" >
<input slot="content" v-model="detail.bp_name" placeholder="请输入承租人姓名" >
</item>
<item :showArrow="true">
<div slot="name">产品线</div>
<input slot="content" placeholder="请选择产品线" >
<input
slot="content" v-model="detail.division_n" placeholder="请选择产品线"
@click="selectProductLine" >
</item>
<item>
<div slot="name">合同金额</div>
<input slot="content" placeholder="请输入合同金额" >
<input slot="content" v-model="detail.total_price" placeholder="请输入合同金额" >
</item>
<item :showArrow="true">
<div slot="name">商务政策</div>
<input slot="content" placeholder="请选择合同政策" >
<input
slot="content" v-model="detail.product_plan_name" placeholder="请选择合同政策"
@click="selectProductPlan" >
</item>
<item>
<div slot="name">租赁物数量</div>
<input slot="content" v-model="num" placeholder="请输入租赁物数量" >
<input slot="content" v-model="detail.product_num" placeholder="请输入租赁物数量" >
</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="trans">
<div class="left">
<span>
<img src="@/assets/contractStart/list.png" >
......@@ -144,27 +148,102 @@ export default {
num: null,
downNum: false,
show: false,
products: [],
productLine: [{
'code': '5',
'code_name': '测试3',
}, {
'code': '9',
'code_name': 'PDJ',
}, {
'code': '6',
'code_name': '测试1',
}],
productPlan: [{
'code': '5',
'code_name': '测试3',
}, {
'code': '9',
'code_name': 'PDJ',
}, {
'code': '6',
'code_name': '测试1',
}],
contract: [{
'code': '5',
'code_name': 'PRJ2019003',
}, {
'code': '9',
'code_name': 'PRJ2019025',
}, {
'code': '6',
'code_name': 'PRJ2019067',
}],
agent: [
{
'code': '7475',
'code_name': '北京去楼下科技有限公司',
}, {
'code': '7709',
'code_name': '主机厂法人',
}, {
'code': '7436',
'code_name': '北京雪族科技有限公司',
},
],
info: {
'contract_id': '',
'bank_branch_name': '',
'frame_number': '',
'engine': '',
'manufacturer': '',
'license_plate_number': '',
},
detail: {
'product_num': '',
'first_pay': '',
'gps_fee': '',
'bp_name': '',
'project_number': '',
'bp_agent_name': '',
'product_plan_id_n': '',
'division': '',
'division_n': '',
'product_plan_id': '',
'product_plan_name': '',
'project_id': '',
// 'factory_bp_id': '',
'bp_id': '',
},
equip: [],
}
},
computed: {
numInt () {
if (this.num !== null && this.num !== '') {
return parseInt(this.num)
if (this.detail.product_num !== null && this.detail.product_num !== '') {
return parseInt(this.detail.product_num)
} else {
return 0
}
},
},
beforeRouteEnter (to, from, next) {
next(vm => {
if (from.name === 'StartList') {
vm.getProductLine()
vm.getProductPlan()
vm.getContractNum()
}
if (vm.$route.params.project_id) {
vm.getDetail()
vm.getEquipment()
}
})
},
methods: {
trans () {
let down = document.querySelector('.modal-show')
down.style.display = 'block'
down.style.opacity = '1'
},
save () {
let vm = this
let url = process.env.basePath + 'leases_info_save'
......@@ -175,19 +254,189 @@ export default {
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
// vm.lists = res.lists
console.log(res)
// console.log(res)
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
getContractNum () {
let vm = this
let url = process.env.basePath + 'linked_contract_query'
let param = {
user_phone: window.localStorage.getItem('user_phone'),
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.contract = res.lists.map(item => {
return {
code: item.project_id,
code_name: item.project_number,
}
})
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
selectContruct () {
let vm = this
vm.hlsPopup.selectList({
list: vm.contract,
code: 'bp_type',
object: {},
returnItem: function (index, obj) {
vm.detail.project_id = obj.bp_type
vm.detail.project_number = obj.bp_type_n
},
})
},
getAgent () {
let vm = this
let url = process.env.basePath + 'vendor_list_query'
let param = {}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.agent = res.lists.map(item => {
return {
code: item.factory_bp_id,
code_name: item.bp_name,
}
})
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
selectAgent () {
let vm = this
vm.hlsPopup.selectList({
list: vm.agent,
code: 'bp_type',
object: {},
returnItem: function (index, obj) {
vm.detail.bp_id = obj.bp_type
vm.detail.bp_agent_name = obj.bp_type_n
},
})
},
getEquipment () {
let vm = this
let url = process.env.basePath + 'car_equip_list_query'
let param = {
project_id: vm.$route.params.project_id,
}
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)
}
})
},
getDetail () {
let obj = {
'product_plan_id': '29',
'product_num': '1',
'first_pay': '102500',
'division_n': '平地机',
'gps_fee': '500',
'bp_name': '黄冲',
'project_number': 'PJ2019050043',
'bp_agent_name': '上海汉得信息技术股份有限公司 ',
'product_plan_id_n': 'PDJ',
'total_price': '1111111111',
}
Object.assign(this.detail, obj)
// let vm = this
// let url = process.env.basePath + 'con_contract_detial'
// let param = {
// project_id: this.$route.params.project_id,
// }
// hlsPopup.showLoading('请稍候')
// vm.$post(url, param).then(function (res) {
// vm.hlsPopup.hideLoading()
// if (res.result === 'S') {
// Object.assign(vm.detail, res.info)
// } else {
// hlsPopup.showLongCenter(res.message)
// }
// })
},
changeHeight () {
let popClient = document.querySelector('.bottom-content')
let bottomPop = document.querySelector('.bottom-pop')
bottomPop.style.height = '100%'
popClient.style.height = '500px'
},
getProductLine () {
let vm = this
let url = process.env.basePath + 'division_query'
let param = {}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.productLine = res.lists.map(item => {
return {
code: item.division,
code_name: item.division_n,
}
})
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
selectProductLine () {
let vm = this
vm.hlsPopup.selectList({
list: vm.productLine,
code: 'bp_type',
object: {},
returnItem: function (index, obj) {
vm.detail.division = obj.bp_type
vm.detail.division_n = obj.bp_type_n
},
})
},
getProductPlan () {
let vm = this
let url = process.env.basePath + 'prd_plan_defintion'
let param = {}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.productPlan = res.lists.map(item => {
return {
code: item.product_plan_id,
code_name: item.product_plan_name,
}
})
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
selectProductPlan () {
let vm = this
vm.hlsPopup.selectList({
list: vm.productPlan,
code: 'bp_type',
object: {},
returnItem: function (index, obj) {
vm.detail.product_plan_id = obj.bp_type
vm.detail.product_plan_name = obj.bp_type_n
},
})
},
hideBox () {
let popClient = document.querySelector('.bottom-content')
let bottomPop = document.querySelector('.bottom-pop')
......@@ -218,16 +467,17 @@ export default {
.modal-show {
width: 100%;
height: 100%;
display: none;
position: absolute;
z-index: 900;
background-color: rgba(56, 63, 69, 0.3);
display: flex;
justify-content: center;
align-items: center;
opacity: 0;
.down {
position: relative;
width: 314px;
height: 516px;
height: 456px;
background-size: 301px 24.7px;
background-color: #fff;
}
......
......@@ -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 => {
vm.getList()
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'),
}
......
......@@ -219,7 +219,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