|
|
@@ -23,8 +23,8 @@
|
|
|
|
|
|
<view class="input-wrap">
|
|
|
<view>
|
|
|
- <button class="admin-button-com middle blue" style="width:100upx;margin-right:8upx;" @click="">名称</button>
|
|
|
- <button class="admin-button-com middle default" style="width:100upx;margin-right:8upx;" @click="">编号</button>
|
|
|
+ <button class="admin-button-com middle " :class="[searchType == 0 ? 'blue' : 'default']" style="width:100upx;margin-right:8upx;" @click="searchType=0">名称</button>
|
|
|
+ <button class="admin-button-com middle " :class="[searchType == 1 ? 'blue' : 'default']" style="width:100upx;margin-right:8upx;" @click="searchType=1">编号</button>
|
|
|
</view>
|
|
|
<view class="search-bar">
|
|
|
<app-search-module v-model="searchText" placeholder="输入内容" @input="searchFn" />
|
|
|
@@ -202,6 +202,7 @@ export default {
|
|
|
catId: "",
|
|
|
flowerNum:0,
|
|
|
searchText:'',
|
|
|
+ searchType:0,
|
|
|
lastSearchText:'', // 上次的搜索内容
|
|
|
searchTimer: null, // 搜索防抖定时器
|
|
|
riseData: {}, // 价格上涨配置
|
|
|
@@ -411,7 +412,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
getGoodsList() {
|
|
|
- return getCategoryToGoods({page: this.list.page,searchText:this.lastSearchText,catId:this.catId, flowerNum:this.flowerNum, priceType:this.priceType, hasStock:this.hasStock,requestType:'goodsList'}).then(res => {
|
|
|
+ return getCategoryToGoods({page: this.list.page,searchText:this.lastSearchText,searchType:this.searchType,catId:this.catId, flowerNum:this.flowerNum, priceType:this.priceType, hasStock:this.hasStock,requestType:'goodsList'}).then(res => {
|
|
|
this.completes(res)
|
|
|
})
|
|
|
},
|