Commit 2c97cb50 by 匡雅琴

联调

1 parent 052123a9
...@@ -8,11 +8,11 @@ ...@@ -8,11 +8,11 @@
<template> <template>
<div> <div>
<el-popover :popper-class="'search-popper'" placement="bottom-start" width="280" trigger="manual" v-model="visible"> <el-popover @blur="handleBlur" :popper-class="'search-popper'" placement="bottom-start" width="280" trigger="manual" v-model="visible">
<ul v-if="name == 'merchant'" class="el-scrollbar__view el-cascader__suggestion-list" v-infinite-scroll="load" style="overflow: auto"> <ul v-if="name == 'merchant'" class="el-scrollbar__view el-cascader__suggestion-list" v-infinite-scroll="load" style="overflow: auto">
<!-- <li class="el-cascader__suggestion-item" :class="isCheck ? 'is-checked' : ''">dafsd</li> --> <!-- <li class="el-cascader__suggestion-item" :class="isCheck ? 'is-checked' : ''">dafsd</li> -->
<template v-if="searchList.length"> <template v-if="searchList.length">
<li class="el-cascader__suggestion-item" :class="item.departmentName == searchKey.departmentName" v-for="item in searchList" :key="item.id" @click.self="selectItem(item)"> <li class="el-cascader__suggestion-item" :class="item.departmentName == searchKey.departmentName" v-for="item in searchList" :key="item.id" @click.self="selectMerchantItem(item)">
<!-- <el-radio :label="item">{{ item.departmentName }}</el-radio> --> <!-- <el-radio :label="item">{{ item.departmentName }}</el-radio> -->
<div>{{ item.merchantName }}</div> <div>{{ item.merchantName }}</div>
<div class="parent-merchant">{{ item.merchantLegalPerson }}</div> <div class="parent-merchant">{{ item.merchantLegalPerson }}</div>
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<li>无数据</li> <li>无数据</li>
</template> </template>
</ul> </ul>
<el-input slot="reference" debounce style="width: 320px" v-model="searchKey.departmentName" :size="size" @input="handleInput" @blur="handleBlur" @focus="handleFocus" :placeholder="type"> <el-input slot="reference" debounce style="width: 320px" v-model="searchKey.departmentName" :size="size" @input="handleInput" @focus="name === 'merchant' ? getMerchantSearchList() : getSearchList()" @blur="handleBlur" :placeholder="type">
<!-- <i slot="suffix" class="el-input__icon el-icon-arrow-down" :class="isOpen ? 'is-focus' : ''"></i> --> <!-- <i slot="suffix" class="el-input__icon el-icon-arrow-down" :class="isOpen ? 'is-focus' : ''"></i> -->
<template slot="append"> <template slot="append">
<div class="input_append" @click.stop="arrowClick()"> <div class="input_append" @click.stop="arrowClick()">
...@@ -122,7 +122,7 @@ export default { ...@@ -122,7 +122,7 @@ export default {
var params = JSON.parse(JSON.stringify(this.pageParams)) var params = JSON.parse(JSON.stringify(this.pageParams))
params.departmentName = val params.departmentName = val
console.log(params) console.log(params)
if (params.departmentName) { // if (params.departmentName) {
this.$apis.baseInfo.findDepartmentList(params).then(res => { this.$apis.baseInfo.findDepartmentList(params).then(res => {
console.log(res) console.log(res)
if (res.data.length) { if (res.data.length) {
...@@ -133,13 +133,12 @@ export default { ...@@ -133,13 +133,12 @@ export default {
this.searchList = this.searchList.concat(res.data) this.searchList = this.searchList.concat(res.data)
} }
} }
this.pageParams.pageNum++ // this.pageParams.pageNum++
console.log(this.searchList) console.log(this.searchList)
}) })
this.loading = false // } else {
} else { // this.searchList = []
this.searchList = [] // }
}
}, },
// 根据输入内容搜索商户账户数据 // 根据输入内容搜索商户账户数据
getMerchantSearchList(val) { getMerchantSearchList(val) {
...@@ -148,7 +147,7 @@ export default { ...@@ -148,7 +147,7 @@ export default {
params.merchantName = val params.merchantName = val
params.merchantId = this.$globalState.session.merchantId params.merchantId = this.$globalState.session.merchantId
console.log(params) console.log(params)
if (params.merchantName) { // if (params.merchantName) {
this.$apis.baseInfo.findMerchantTreeList(params).then(res => { this.$apis.baseInfo.findMerchantTreeList(params).then(res => {
console.log(res) console.log(res)
if (res.data.length) { if (res.data.length) {
...@@ -159,14 +158,24 @@ export default { ...@@ -159,14 +158,24 @@ export default {
this.searchList = this.searchList.concat(res.data) this.searchList = this.searchList.concat(res.data)
} }
} }
this.pageParams.pageNum++ // this.pageParams.pageNum++
console.log(this.searchList) console.log(this.searchList)
}) })
} else { // } else {
this.searchList = [] // this.searchList = []
} // }
this.visible = true this.visible = true
}, },
// 下拉选择商户账户
selectMerchantItem(val) {
console.log(val)
this.searchKey.id = val.merchantNo
this.searchKey.departmentName = val.merchantName
// this.searchList = [val]
this.visible = false
this.$emit('getCurMerchant', val)
},
// 下拉选择门店
selectItem(val) { selectItem(val) {
console.log(val) console.log(val)
this.searchKey = val this.searchKey = val
...@@ -192,23 +201,30 @@ export default { ...@@ -192,23 +201,30 @@ export default {
this.searchKey.departmentName = val.first.merchantName this.searchKey.departmentName = val.first.merchantName
this.$emit('getCurMerchant', val.first) this.$emit('getCurMerchant', val.first)
}, },
// 输入框失去焦点调用
handleBlur() { handleBlur() {
console.log(11111)
this.searchKey.departmentName = '' this.searchKey.departmentName = ''
this.visible = false this.visible = false
// this.searchKey = {} // this.searchKey = {}
this.searchList = [] this.searchList = []
}, },
handleFocus() { // handleFocus() {
console.log(this.name) // console.log(this.name)
// if (this.name === 'merchant') {
// this.getMerchantSearchList()
// return
// }
// this.getSearchList(this.searchKey.departmentName)
// },
load() {
// this.searchList.push(`Aaaaa${this.count++}`)
this.pageParams.pageNum++
if (this.searchList.length < this.count) {
if (this.name === 'merchant') { if (this.name === 'merchant') {
this.getMerchantSearchList() this.getMerchantSearchList()
return return
} }
this.getSearchList(this.searchKey.departmentName)
},
load() {
// this.searchList.push(`Aaaaa${this.count++}`)
if (this.searchList.length < this.count) {
this.getSearchList(this.searchValue) this.getSearchList(this.searchValue)
} }
} }
......
...@@ -293,7 +293,7 @@ export default { ...@@ -293,7 +293,7 @@ export default {
}) })
let all = [...arrpara1, ...arrpara2, ...arrpara3] let all = [...arrpara1, ...arrpara2, ...arrpara3]
let para = Object.assign({}, ...all) let para = Object.assign({}, ...all)
console.log(para)
this.$confirm(' 请确认是否关联当前信息?', '提示', { this.$confirm(' 请确认是否关联当前信息?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!