Commit 4389dbf8 authored by 李晓兵's avatar 李晓兵

Merge branch 'develop' of https://hel.hand-china.com/xugong/hls-xcmg-vue-app into develop

parents eb7f8489 183817a3
Pipeline #3128 canceled with stages
......@@ -78,6 +78,9 @@ export default {
},
immediate: true,
},
keyWord (newVal, oldVal) {
this.search()
},
},
created () {
},
......@@ -87,6 +90,23 @@ export default {
})
},
methods: {
search () {
let vm = this
let randomString = Math.floor(Math.random() * 21)
let url = process.env.basePath + 'car_confirm_list_query' + '&index' + `'${randomString}'`
let param = {
user_phone: window.localStorage.getItem('user_phone'),
searchInput: vm.keyWord,
}
vm.$post(url, param).then(function (res) {
if (res.result === 'S') {
vm.lists = res.lists
vm.selectShowList()
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
selectShowList () {
let vm = this
vm.undo = []
......@@ -115,7 +135,8 @@ export default {
},
getList () {
let vm = this
let url = process.env.basePath + 'car_confirm_list_query'
let randomString = Math.floor(Math.random() * 21)
let url = process.env.basePath + 'car_confirm_list_query' + '&index' + `'${randomString}'`
let param = {
user_phone: window.localStorage.getItem('user_phone'),
pagesize: 10,
......@@ -126,22 +147,22 @@ export default {
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
// let returnData = []
// returnData = res.lists
// if (returnData.length === 0) {
// vm.$refs.scroll.update(true)
// } else if (returnData.length > 0 && returnData.length < 10) {
// vum.forEach(returnData, function (data, index, array) {
// vm.lists.push(array[index])
// })
// vm.$refs.scroll.update(true)
// } else if (returnData.length === 10) {
// vum.forEach(returnData, function (data, index, array) {
// vm.lists.push(array[index])
// })
// vm.$refs.scroll.update(false)
// }
vm.lists = res.lists
let returnData = []
returnData = res.lists
if (returnData.length === 0) {
vm.$refs.scroll.update(true)
} else if (returnData.length > 0 && returnData.length < 10) {
vum.forEach(returnData, function (data, index, array) {
vm.lists.push(array[index])
})
vm.$refs.scroll.update(true)
} else if (returnData.length === 10) {
vum.forEach(returnData, function (data, index, array) {
vm.lists.push(array[index])
})
vm.pagenum++
vm.$refs.scroll.update(false)
}
vm.selectShowList()
} else {
hlsPopup.showLongCenter(res.message)
......
......@@ -19,7 +19,7 @@
<div class="center">
<div><span>合同金额</span><p>{{ item.total_price|currency }}</p></div>
<div><span>已还金额</span><p class="bold">{{ item.recivied_amount|currency }}</p></div>
<span v-if="item.overdue_status==='Y'" class="red">已逾期</span>
<span v-if="item.overdue_status==='已逾期'" class="red">已逾期</span>
<section @click="toRepayDetails(item)">
<img src="@/assets/contractRepayment/view.png" alt="">
<span>查看合同明细</span>
......
......@@ -321,21 +321,6 @@ export default {
.green {
background-color: rgba(27, 162, 97, 0.5);
}
// .top {
// font-family: PingFangSC-Regular;
// font-size: 13px;
// color: rgba(56, 63, 69, 0.6);
// letter-spacing: 0;
// display: flex;
// justify-content: space-between;
// span {
// // margin-left: 20px;
// font-family: PingFangSC-Regular;
// font-size: 13px;
// color: #4b4a4b;
// letter-spacing: 0;
// }
// }
.time {
flex: 3;
height: 85%;
......
......@@ -62,7 +62,7 @@
</div>
</div>
<div slot="content">
<span v-if="item.overdue_times!=undefined" :class="['status','red']">逾期{{ item.overdue_times }}</span>
<span v-if="item.overdue_times!=0" :class="['status','red']">逾期{{ item.overdue_times }}</span>
<div class="plan" @click="toRepayPlan(item.contract_id)">
<img src="@/assets/contractRepayment/plan.png" alt="">
<span>还款计划</span>
......
......@@ -11,7 +11,7 @@
<input v-model="keyWord" placeholder="请输入合同号/产品线/承租人名称" >
</div>
<h-content class="my-content">
<scroll ref="scroll" :updateData="[lists]" :pullUp="true">
<scroll ref="scroll" :updateData="[lists]" :pullUp="true" @pullingUp="getList">
<div
v-for="(item,index) in showList"
:key="index"
......@@ -73,6 +73,8 @@ export default {
beforeRouteEnter (to, from, next) {
next(vm => {
// if (from.name === 'MyInfo') {
vm.pagenum = 1
vm.lists = []
vm.getList()
// }
})
......@@ -88,10 +90,30 @@ export default {
},
immediate: true,
},
keyWord (newVal, oldVal) {
this.search()
},
},
created () {
},
methods: {
search () {
let vm = this
let randomString = Math.floor(Math.random() * 21)
let url = process.env.basePath + 'car_apply_list_query' + '&index' + `'${randomString}'`
let param = {
user_phone: window.localStorage.getItem('user_phone'),
searchInput: vm.keyWord,
}
vm.$post(url, param).then(function (res) {
if (res.result === 'S') {
vm.lists = res.lists
vm.selectShowList()
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
selectShowList () {
let vm = this
vm.undo = []
......@@ -126,7 +148,8 @@ export default {
},
getList () {
let vm = this
let url = process.env.basePath + 'car_apply_list_query'
let randomString = Math.floor(Math.random() * 21)
let url = process.env.basePath + 'car_apply_list_query' + '&index' + `'${randomString}'`
let param = {
user_phone: window.localStorage.getItem('user_phone'),
pagesize: 10,
......@@ -137,23 +160,22 @@ export default {
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
// vm.pagenum += 1
// let returnData = []
// returnData = res.lists
// if (returnData.length === 0) {
// vm.$refs.scroll.update(true)
// } else if (returnData.length > 0 && returnData.length < 10) {
// vum.forEach(returnData, function (data, index, array) {
// vm.lists.push(array[index])
// })
// vm.$refs.scroll.update(true)
// } else if (returnData.length === 10) {
// vum.forEach(returnData, function (data, index, array) {
// vm.lists.push(array[index])
// })
// vm.$refs.scroll.update(false)
// }
vm.lists = res.lists
let returnData = []
returnData = res.lists
if (returnData.length === 0) {
vm.$refs.scroll.update(true)
} else if (returnData.length > 0 && returnData.length < 10) {
vum.forEach(returnData, function (data, index, array) {
vm.lists.push(array[index])
})
vm.$refs.scroll.update(true)
} else if (returnData.length === 10) {
vum.forEach(returnData, function (data, index, array) {
vm.lists.push(array[index])
})
vm.pagenum++
vm.$refs.scroll.update(false)
}
vm.selectShowList()
} else {
hlsPopup.showLongCenter(res.message)
......
......@@ -234,7 +234,7 @@ export default new Router({
{path: '/repay-details', component: RepayDetails, name: 'RepayDetails', meta: {keepAlive: true}},
{path: '/repay-plan', component: RepayPlan, name: 'RepayPlan', meta: {keepAlive: true}},
// 发车申请
{path: '/start-List', component: StartList, name: 'StartList', meta: {keepAlive: true}},
{path: '/start-List', component: StartList, name: 'StartList', meta: {keepAlive: false}},
{path: '/add-car', component: AddCar, name: 'AddCar', meta: {keepAlive: false}},
// 发车确认
{path: '/confirm-detail', component: ConfirmDetail, name: 'ConfirmDetail', meta: {keepAlive: true}},
......
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
let store = new Vuex.Store({
state: {
routerHistory: [],
userInfo: void 0,
allSystemUser: void 0,
locationSearch: void 0,
},
getters: {
getRouterHistory: (state) => {
return state.routerHistory
},
getUserInfo: (state) => {
return state.userInfo
},
getAllSystemUser: (state) => {
return state.allSystemUser
},
getLocationSearch: (state) => {
return state.locationSearch
},
},
mutations: {
setRouterHistory: (state, value) => {
state.routerHistory = value
},
setUserInfo: (state, value) => {
state.userInfo = value
},
setAllSystemUser: (state, value) => {
state.allSystemUser = value
},
setLocationSearch: (state, value) => {
state.locationSearch = value
},
},
})
export default store
const createGetter = (state) => {
let getters = {}
for (let key in state) {
let getter = `get${key.replace(key.charAt(0), key.charAt(0).toUpperCase())}`
getters[getter] = (state) => {
return state[key]
}
}
return getters
}
const createMutations = (state) => {
let mutations = {}
for (let key in state) {
let mutation = `set${key.replace(key.charAt(0), key.charAt(0).toUpperCase())}`
mutations[mutation] = (state, value) => {
state[key] = value
}
}
return mutations
}
export {
createGetter,
createMutations,
}
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