|
@@ -1330,7 +1330,7 @@ const queryVenderList = function (keyword: string, index: number) {
|
|
|
getVendorList({ keywords }).then((response: any) => {
|
|
|
const defaultCreateOption = {
|
|
|
name: keywords,
|
|
|
- id: '',
|
|
|
+ id: keywords,
|
|
|
}
|
|
|
if (Array.isArray(response.result)) {
|
|
|
const tempStr = keywords.replace(/\S_-/g, '').toLowerCase()
|
|
@@ -1345,6 +1345,8 @@ const queryVenderList = function (keyword: string, index: number) {
|
|
|
// 结果里面没找到输入的搜索字符串, 就把它加入到结果里面当成‘新增的’
|
|
|
result = [cloneDeep(defaultCreateOption)].concat(response.result)
|
|
|
}
|
|
|
+ } else if (keywords.length) {
|
|
|
+ result = [cloneDeep(defaultCreateOption)]
|
|
|
}
|
|
|
if (manualVendor.value.id) {
|
|
|
vendorList.value.splice(index, 1, [manualVendor.value].concat(result))
|