|
@@ -31,6 +31,10 @@ export default {
|
|
|
size: {
|
|
|
type: String,
|
|
|
default: 'default'
|
|
|
+ },
|
|
|
+ itemSn: {
|
|
|
+ type: String || Number,
|
|
|
+ default: undefined
|
|
|
}
|
|
|
},
|
|
|
data () {
|
|
@@ -50,7 +54,13 @@ export default {
|
|
|
const fetchId = this.lastFetchId
|
|
|
this.data = []
|
|
|
this.fetching = true
|
|
|
- custList({ 'queryWord': dealerName, pageNo: 1, pageSize: 20 }).then(res => {
|
|
|
+ const params = { pageNo: 1, pageSize: 20 }
|
|
|
+ if (this.itemSn) {
|
|
|
+ params.customerSn = this.itemSn
|
|
|
+ } else {
|
|
|
+ params.queryWord = dealerName
|
|
|
+ }
|
|
|
+ custList(params).then(res => {
|
|
|
if (fetchId !== this.lastFetchId) {
|
|
|
return
|
|
|
}
|
|
@@ -80,6 +90,12 @@ export default {
|
|
|
fetching: false
|
|
|
})
|
|
|
}
|
|
|
+ },
|
|
|
+ mounted () {
|
|
|
+ if (this.itemSn) {
|
|
|
+ this.fetchUser(this.itemSn)
|
|
|
+ this.setData({ key: this.itemSn })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|