| | |
| | | this.currentCategory = this.list[0] || {} |
| | | } |
| | | }, |
| | | async updateParamsAndSearch() { |
| | | //todo 设置参数并查询 |
| | | await this.refreshList() |
| | | this.$refs.popup_param.close() |
| | | }, |
| | | openParamPop() { |
| | | //todo 同时设置查询参数为空吧 |
| | | this.$refs.popup_param.open() |
| | | }, |
| | | closeParamPop() { |
| | | this.$refs.popup_param.close() |
| | | }, |
| | | buttonSearchFlow() { |
| | | |
| | | if (this.type == 'category') { |
| | | //根据分类名称查询 |
| | | this.$message.showLoading() |
| | | this.$http.request('get', '/api/customer/flower/category/tree', { |
| | | params: { |
| | | name: this.query.name || '' |
| | | } |
| | | }).then(res => { |
| | | var data = res.data |
| | | this.list = data || [] |
| | | if (this.list.length > 0) { |
| | | this.query.categoryId = this.list[0].id || '' |
| | | this.currentCategory = this.list[0] || {} |
| | | } else { |
| | | this.query.categoryId = '' |
| | | this.currentCategory = {} |
| | | } |
| | | }).finally(() => { |
| | | this.$message.hideLoading() |
| | | }) |
| | | } else { |
| | | uni.navigateTo({ |
| | | url: '/sub_pages/customer/trade/list?' + 'supplierName=' + this.query.name |
| | | }) |
| | | |
| | | } |
| | | }, |
| | | |
| | | toDetailList(item) { |
| | | //去商品列表页面 |
| | | console.log('toDetailList', this.supplierId) |
| | |
| | | changeType(item) { |
| | | this.query.categoryId = item.id || '' |
| | | this.currentCategory = item |
| | | //拼接二级分类,然后查询商品列表 |
| | | }, |
| | | |
| | | |