Commit 39bce340 authored by linxin's avatar linxin

Merge branch 'liuin' into uat

parents 11928ff1 e8c5d09e
......@@ -13,7 +13,7 @@ export default {
name: 'CurrencyInput',
props: {
value: {
default: '',
default: '4',
},
// disable: {
// type: Boolean,
......@@ -65,9 +65,13 @@ export default {
},
onInput (value) {
// if (this.disable) return
let uncurrency = this.$options.filter['uncurrency']
this.newVal = uncurrency(this.value)
this.newVal += ('' + value)
// let uncurrency = this.$options.filter['uncurrency']
// this.newVal = uncurrency(this.value)
this.newVal = this.value
if (this.newVal.includes('.') && value === '.') {
} else {
this.newVal += ('' + value)
}
this.$emit('input', this.newVal)
},
onDelete () {
......@@ -88,7 +92,7 @@ export default {
let newVal = uncurrency(value)
event.target.value = newVal
setTimeout(function () {
event.target.type = 'number'
event.target.type = 'text'
event.target.value = newVal
// event.target.focus()
}, 0)
......
......@@ -544,6 +544,7 @@ export default {
vm.saveInfo.product_plan_name = res.info.product_plan_id_n
vm.saveInfo.division_n = res.info.product_name
vm.saveInfo.down_payment = res.info.down_payment
vm.saveInfo.int_rate_n = vm.saveInfo.int_rate_n.replace('%', '')
vm.saveInfo.down_payment_ratio_n = vm.saveInfo.down_payment_ratio_n.replace('%', '')
vm.saveInfo.deposit_ratio_n = vm.saveInfo.deposit_ratio_n.replace('%', '')
vm.saveInfo.lease_charge_ratio_n = vm.saveInfo.lease_charge_ratio_n.replace('%', '')
......@@ -561,7 +562,7 @@ export default {
vm.saveInfo.lease_charge_ratio = e.lease_charge_ratio
vm.saveInfo.lease_charge_ratio_n = e.lease_charge_ratio_n.replace('%', '')
vm.saveInfo.int_rate = e.int_rate
vm.saveInfo.int_rate_n = e.int_rate_n
vm.saveInfo.int_rate_n = e.int_rate_n.replace('%', '')
vm.saveInfo.penalty_rate_n = e.penalty_rate_n
vm.saveInfo.penalty_rate = e.penalty_rate
vm.saveInfo.deposit_ratio = e.deposit_ratio
......
......@@ -32,8 +32,8 @@
</item>
<item>
<div slot="name" class="font-color required">经销商</div>
<input v-if="user_bp_type === 'AGENT'" slot="content" v-model="bp_agent_name" readonly>
<input v-if="user_bp_type === 'OFFICE'" slot="content" placeholder="直销" readonly>
<input v-if="(user_bp_type === 'AGENT'&&!multiple)||(multiple==='AGENT')" slot="content" v-model="bp_agent_name" readonly>
<input v-if="(user_bp_type === 'OFFICE'&&!multiple)||(multiple==='OFFICE')" slot="content" placeholder="直销" readonly>
</item>
<item :showArrow="true">
<div slot="name" class="font-color required">销售人员</div>
......@@ -72,17 +72,17 @@
<div slot="name" class="font-color required">主机厂业务员</div>
<input slot="content" v-model="salesInfo.manu_manager" placeholder="请输入业务员姓名">
</item>
<item v-if="user_bp_type === 'AGENT'">
<item v-if="(user_bp_type === 'AGENT'&&!multiple)||(multiple==='AGENT')">
<div slot="name" class="font-color required">授信额度</div>
<!-- <CurrencyInput slot="content" v-model="inflow_line" readonly placeholder="授信额度"/> -->
<span slot="content">{{ inflow_line|currency }}</span>
</item>
<item v-if="user_bp_type === 'AGENT'">
<item v-if="(user_bp_type === 'AGENT'&&!multiple)||(multiple==='AGENT')">
<div slot="name" class="font-color required">已使用授信额度</div>
<span slot="content">{{ inflow_used|currency }}</span>
<!-- <CurrencyInput slot="content" v-model="inflow_used" readonly placeholder="已使用授信额度"/> -->
</item>
<item v-if="user_bp_type === 'AGENT'">
<item v-if="(user_bp_type === 'AGENT'&&!multiple)||(multiple==='AGENT')">
<div slot="name" class="font-color required">剩余授信额度</div>
<span slot="content">{{ inflow_reset|currency }}</span>
<!-- <CurrencyInput slot="content" v-model="inflow_reset" readonly placeholder="剩余授信额度"/> -->
......@@ -154,6 +154,7 @@ export default {
business: '',
factoty: '', // 主机厂列表
showModal: false,
multiple: '',
showLists: [],
user_bp_type: '', // 客户类型
businessLists: [], // 业务人员查询结果
......@@ -220,6 +221,7 @@ export default {
vm.inflow_reset = '' // 剩余授信额度
vm.user_bp_type = window.localStorage.bp_type
vm.sales = window.localStorage.bp_name
vm.multiple = window.localStorage.multipleRole
vm.salesInfo = {
bp_id_tenant: '', // 承租人id
business_type: '', // 业务类型
......
......@@ -178,6 +178,23 @@ export default {
}
vm.recordQuery('全部', vm.lists)
} else if (from.name === 'MyInfo') {
vm.selected = 'all'
vm.pagenum = 1
vm.unSigned_pagenum = 1
vm.unRepay_pagenum = 1
vm.repaying_pagenum = 1
vm.repayed_pagenum = 1
vm.searchInput = ''
vm.contract_status_n = '全部'
vm.lists = []
vm.unSignedLists = []
vm.unRepayLists = []
vm.repayingLists = []
vm.repayedLists = []
vm.unSigned_flag = false
vm.unRepay_flag = false
vm.repaying_flag = false
vm.repayed_flag = false
vm.bp_type = vm.$route.params.bp_type
vm.recordQuery('全部', vm.lists)
}
......@@ -336,19 +353,35 @@ export default {
},
// 搜索
async searchs () {
let resAll = await this.searchAll()
if (resAll) {
let res = await this.searchUnsign() // 待首付结果
if (res) {
let resUnrepay = await this.searchUnrepay() // 首付还款中结果
if (resUnrepay) {
let resRepaying = await this.searchRepaying() // 还款中结果
if (resRepaying) {
this.searchRepayed()
}
}
}
let vm = this
if (vm.selected === 'all') {
this.searchAll()
} else if (vm.selected === 'one') {
this.searchUnsign()
} else if (vm.selected === 'two') {
this.searchUnrepay()
} else if (vm.selected === 'three') {
this.searchRepaying()
} else if (vm.selected === 'four') {
this.searchRepayed()
}
vm.unSigned_flag = false
vm.unRepay_flag = false
vm.repaying_flag = false
vm.repayed_flag = false
// let resAll = await this.searchAll()
// if (resAll) {
// let res = await this.searchUnsign() // 待首付结果
// if (res) {
// let resUnrepay = await this.searchUnrepay() // 首付还款中结果
// if (resUnrepay) {
// let resRepaying = await this.searchRepaying() // 还款中结果
// if (resRepaying) {
// this.searchRepayed()
// }
// }
// }
// }
},
async searchAll () {
let vm = this
......@@ -357,6 +390,7 @@ export default {
contract_status_n: '全部',
user_phone: window.localStorage.user_phone,
searchInput: vm.searchInput,
bp_type: vm.bp_type,
pagenum: 1,
pagesize: 10,
}
......@@ -387,6 +421,7 @@ export default {
contract_status_n: '待首付',
user_phone: window.localStorage.user_phone,
searchInput: vm.searchInput,
bp_type: vm.bp_type,
pagenum: 1,
pagesize: 10,
}
......@@ -417,10 +452,13 @@ export default {
contract_status_n: '首付还款中',
user_phone: window.localStorage.user_phone,
searchInput: vm.searchInput,
bp_type: vm.bp_type,
pagenum: 1,
pagesize: 10,
}
vm.hlsPopup.showLoading('请稍后')
let res = await vm.$post(url, param)
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.unRepayLists = res.lists
if (vm.selected === 'two') {
......@@ -445,10 +483,13 @@ export default {
contract_status_n: '还款中',
user_phone: window.localStorage.user_phone,
searchInput: vm.searchInput,
bp_type: vm.bp_type,
pagenum: 1,
pagesize: 10,
}
vm.hlsPopup.showLoading('请稍后')
let res = await vm.$post(url, param)
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.repayingLists = res.lists
if (vm.selected === 'three') {
......@@ -473,10 +514,13 @@ export default {
contract_status_n: '已结清',
user_phone: window.localStorage.user_phone,
searchInput: vm.searchInput,
bp_type: vm.bp_type,
pagenum: 1,
pagesize: 10,
}
vm.hlsPopup.showLoading('请稍后')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
vm.repayedLists = res.lists
if (vm.selected === 'four') {
vm.showLists = vm.repayedLists
......
......@@ -48,8 +48,8 @@
<span>{{ item.int_rate_n }}</span>
</p>
<p>
<!-- <span>&nbsp;&nbsp;&nbsp;</span>
<span>{{ item.lease_times }}</span> -->
<span>首付款比例</span>
<span>{{ item.down_payment_ratio_n }}</span>
</p>
</div>
</div>
......
......@@ -55,6 +55,7 @@
</h-view>
</template>
<script>
import noImg from '../../assets/productQuery/none.png'
export default {
name: 'ProductList',
data () {
......@@ -72,9 +73,9 @@ export default {
if (vm.timeout) {
clearTimeout(vm.timeout)
}
vm.timeout = setTimeout(() => {
vm.search()
}, 1000)
// vm.timeout = setTimeout(() => {
vm.search()
// }, 1000)
},
},
beforeRouteEnter (to, from, next) {
......@@ -111,12 +112,12 @@ export default {
vm.$refs.scroll.update(true)
} else if (vm.lists.length > 0 && vm.lists.length < 10) {
vm.lists.forEach(item => {
item['url'] = process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token
item['url'] = item.product_attachment_id ? process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token : noImg
})
vm.$refs.scroll.update(true)
} else if (vm.lists.length === 10) {
vm.lists.forEach(item => {
item['url'] = process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token
item['url'] = item.product_attachment_id ? process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token : noImg
})
vm.$refs.scroll.update(false)
}
......@@ -131,7 +132,7 @@ export default {
vm.pagenum = vm.pagenum + 1
let url = $config.basePath + 'prd_product_list'
let param = {
division: window.localStorage.division,
division: vm.division,
user_phone: window.localStorage.user_phone,
searchInput: vm.searchInput,
pagenum: vm.pagenum,
......@@ -147,7 +148,7 @@ export default {
vm.$refs.scroll.update(true)
} else if (returnData.length > 0 && returnData.length < 10) {
returnData.forEach(item => {
item['url'] = process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token
item['url'] = item.product_attachment_id ? process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token : noImg
})
returnData.forEach((data, index, array) => {
vm.lists.push(array[index])
......@@ -155,7 +156,7 @@ export default {
vm.$refs.scroll.update(true)
} else if (returnData.length === 10) {
returnData.forEach(item => {
item['url'] = process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token
item['url'] = item.product_attachment_id ? process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token : noImg
})
returnData.forEach((data, index, array) => {
vm.lists.push(array[index])
......@@ -172,13 +173,14 @@ export default {
search () {
let vm = this
vm.pagenum = 1
let num = Math.random() * 10
// vm.bpList = []
let url = $config.basePath + 'prd_product_list'
let url = $config.basePath + 'prd_product_list' + '&index' + `${num}`
let param = {
pagesize: 10,
pagenum: 1,
searchInput: vm.searchInput,
division: window.localStorage.division,
division: vm.division,
user_phone: window.localStorage.user_phone,
}
vm.hlsPopup.showLoading('数据加载中')
......@@ -186,7 +188,7 @@ export default {
vm.hlsPopup.hideLoading()
vm.lists = res.lists
vm.lists.forEach(item => {
item['url'] = process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token
item['url'] = item.product_attachment_id ? process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token : noImg
})
if (vm.lists.length >= 0 && vm.lists.length < 10) {
vm.$refs.scroll.update(true)
......
......@@ -88,7 +88,7 @@ axios.interceptors.response.use(response => {
err.message = `连接错误${err.response.status}`
}
} else {
err.message = '连接到服务器失败'
// err.message = '连接到服务器失败'
}
if (err.response && err.response.status === 401) {
hlsPopup.hideLoading()
......
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