|
@@ -34,7 +34,8 @@ export default {
|
|
|
return {
|
|
|
data: [],
|
|
|
dealerName: undefined,
|
|
|
- fetching: false
|
|
|
+ fetching: false,
|
|
|
+ lastData: []
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -43,6 +44,9 @@ export default {
|
|
|
if (dealerName == '') return
|
|
|
this.lastFetchId += 1
|
|
|
const fetchId = this.lastFetchId
|
|
|
+ if (this.dealerName) {
|
|
|
+ this.lastData = JSON.parse(JSON.stringify(this.dealerName))
|
|
|
+ }
|
|
|
this.data = []
|
|
|
this.fetching = true
|
|
|
productCodeQueryList({ 'productCode': dealerName, pageNo: 1, pageSize: 20 }).then(res => {
|
|
@@ -65,6 +69,10 @@ export default {
|
|
|
const ind = _this.data.findIndex(item => item.productSn == value[value.length - 1].key)
|
|
|
value[value.length - 1].row = ind != -1 ? _this.data[ind] : undefined
|
|
|
}
|
|
|
+ if (this.lastData && this.lastData.length > 0) {
|
|
|
+ this.lastData = this.lastData.concat(value[value.length - 1])
|
|
|
+ value = this.lastData
|
|
|
+ }
|
|
|
}
|
|
|
Object.assign(this, {
|
|
|
dealerName: value,
|