修bug
parent
f60ff4491c
commit
ce14faf568
|
|
@ -11,7 +11,7 @@
|
|||
<uni-icons type="search" size="18" color="#999"></uni-icons>
|
||||
<input
|
||||
type="text"
|
||||
placeholder="搜索商品名称、条码"
|
||||
placeholder="搜索商品条码"
|
||||
placeholder-class="placeholder"
|
||||
v-model="searchText"
|
||||
@confirm="onSearch"
|
||||
|
|
@ -257,13 +257,14 @@
|
|||
const searchText = this.searchText.trim();
|
||||
let searchParams = {};
|
||||
|
||||
if (/^\d+$/.test(searchText)) {
|
||||
searchParams = { productName: searchText };
|
||||
console.log('商品名称模糊查询:', searchParams);
|
||||
} else {
|
||||
searchParams = { productBarCode: searchText };
|
||||
console.log('按条形码精准查询按:', searchParams);
|
||||
}
|
||||
// if (/^\d+$/.test(searchText)) {
|
||||
searchParams = { productBarCode: searchText };
|
||||
// console.log('商品名称模糊查询:', searchParams);
|
||||
// console.log('按条形码精准查询按:', searchParams);
|
||||
// } else {
|
||||
// searchParams = { productName: searchText };
|
||||
// console.log('按条形码精准查询按:', searchParams);
|
||||
// }
|
||||
|
||||
this.getProductList(searchParams);
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue