|
@@ -393,6 +393,7 @@ export default {
|
|
|
return _this.getList(params)
|
|
|
} else {
|
|
|
_this.vinInfoData = null
|
|
|
+ _this.isVinSearch = false
|
|
|
_this.$refs.table.localLoading = false
|
|
|
_this.$refs.table.clearTable()
|
|
|
}
|
|
@@ -400,6 +401,7 @@ export default {
|
|
|
} else if (_this.queryParam.vinCode && _this.queryParam.vinCode.length < 17 && !this.onlyList) { // 输入vin,但vin码不符合标准,不查vin码信息,不请求列表数据
|
|
|
_this.$refs.table.localLoading = false
|
|
|
_this.$refs.table.clearTable()
|
|
|
+ _this.isVinSearch = false
|
|
|
_this.pageSize = 20
|
|
|
} else if (this.onlyList) {
|
|
|
_this.disabled = true
|
|
@@ -420,7 +422,8 @@ export default {
|
|
|
zdPrice: false, // 终端价
|
|
|
openCarInfoModal: false, // 打开车辆信息弹框
|
|
|
onlyList: false, // 是否重置条件查询
|
|
|
- vinProductTypeSn: undefined
|
|
|
+ vinProductTypeSn: undefined,
|
|
|
+ isVinSearch: false
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -502,29 +505,29 @@ export default {
|
|
|
},
|
|
|
getList (params) {
|
|
|
const _this = this
|
|
|
- console.log(_this.vinProductTypeSn)
|
|
|
- if (params.productCodeList && params.productCodeList.length) {
|
|
|
+ const vinSearch = params.productCodeList && params.productCodeList.length
|
|
|
+ if (vinSearch) {
|
|
|
params.pageSize = 200
|
|
|
this.pageSize = 200
|
|
|
- } else {
|
|
|
- params.pageSize = 20
|
|
|
- this.pageSize = 20
|
|
|
- }
|
|
|
- if (params.productCodeList && params.productCodeList.length) {
|
|
|
params.productTypeSn1 = undefined
|
|
|
params.productTypeSn2 = undefined
|
|
|
params.productTypeSn3 = undefined
|
|
|
+ } else {
|
|
|
+ params.pageSize = 20
|
|
|
+ this.pageSize = 20
|
|
|
}
|
|
|
+
|
|
|
+ console.log(_this.vinProductTypeSn, '000')
|
|
|
// 如果有vin识别的分类
|
|
|
- if (_this.vinProductTypeSn) {
|
|
|
+ if (_this.vinProductTypeSn || this.isVinSearch) {
|
|
|
const typeSn = _this.vinProductTypeSn
|
|
|
const asyncTask = new Promise((resolve, reject) => {
|
|
|
- const list = typeSn.length ? _this.dataSorce.filter(item => item && typeSn.includes(item.productTypeSn2)) : _this.dataSorce
|
|
|
+ _this.disabled = false
|
|
|
+ const list = typeSn && typeSn.length ? _this.dataSorce.filter(item => item && typeSn.includes(item.productTypeSn2)) : _this.dataSorce
|
|
|
resolve(list)
|
|
|
})
|
|
|
return asyncTask
|
|
|
.then(result => {
|
|
|
- _this.disabled = false
|
|
|
const ret = result.filter((a) => {
|
|
|
return (
|
|
|
(params.productCode === undefined || a.productCode.includes(params.productCode)) &&
|
|
@@ -536,7 +539,6 @@ export default {
|
|
|
(params.existStockFlag === undefined || a.existStockFlag === params.existStockFlag)
|
|
|
)
|
|
|
})
|
|
|
-
|
|
|
return {
|
|
|
list: ret,
|
|
|
pageNo: 1,
|
|
@@ -544,7 +546,6 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
} else {
|
|
|
- console.log(11)
|
|
|
return querySumByProductLocation(params).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
@@ -561,6 +562,9 @@ export default {
|
|
|
if (!params.vinCode) {
|
|
|
_this.vinInfoData = null
|
|
|
_this.vinProductTypeSn = undefined
|
|
|
+ _this.isVinSearch = false
|
|
|
+ } else {
|
|
|
+ _this.isVinSearch = true
|
|
|
}
|
|
|
_this.dataSorce = data.list
|
|
|
} else {
|
|
@@ -617,6 +621,7 @@ export default {
|
|
|
this.vinInfoData = null
|
|
|
this.showTable = false
|
|
|
this.onlyList = false
|
|
|
+ this.isVinSearch = false
|
|
|
if (!flag) {
|
|
|
this.$refs.table && this.$refs.table.refresh(true)
|
|
|
}
|