Commit 39bce340 authored by linxin's avatar linxin

Merge branch 'liuin' into uat

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