在订单预购详情页面添加商品分类筛选功能
- 在明细标签页中添加商品分类筛选组件 - 实现筛选功能,支持选择全部分类或具体分类 - 添加分类筛选参数到查询对象,并更新数据列表 - 优化导出表格功能,支持按分类筛选导出
This commit is contained in:
parent
fcbd0efb4e
commit
53ae07514b
@ -29,7 +29,20 @@
|
||||
>
|
||||
<el-tab-pane label="明细" name="second">
|
||||
<el-button type="primary" @click="beforehand_order_cart_info">导出表格 </el-button>
|
||||
|
||||
<el-radio-group v-model="queryParams.top_cate_value" style="margin-left: 30px">
|
||||
<el-radio
|
||||
:value="0"
|
||||
label="全部"
|
||||
@change="topCateChange({ name: '全部', id: 0 })"
|
||||
></el-radio>
|
||||
<el-radio
|
||||
:value="item.id"
|
||||
:label="item.name"
|
||||
v-for="item in formData.top_cate"
|
||||
:key="item.id"
|
||||
@change="topCateChange(item)"
|
||||
></el-radio>
|
||||
</el-radio-group>
|
||||
<div>
|
||||
<div>
|
||||
<el-table :data="pager.lists" v-loading="pager.loading">
|
||||
@ -413,7 +426,8 @@ const formData = ref({
|
||||
warehouse_name: '',
|
||||
system_store: '',
|
||||
financial_pm: '',
|
||||
order_sn: ''
|
||||
order_sn: '',
|
||||
top_cate: []
|
||||
})
|
||||
const generateOrderData = ref({
|
||||
id: '',
|
||||
@ -459,7 +473,9 @@ const appendAdd = () => {
|
||||
}
|
||||
const queryParams = reactive({
|
||||
bhoid: route.query.id,
|
||||
pay_type: ''
|
||||
pay_type: '',
|
||||
top_cate: '',
|
||||
top_cate_value: ''
|
||||
})
|
||||
|
||||
const getDetail = () => {
|
||||
@ -594,6 +610,19 @@ const beforehand_order_cart_info = () => {
|
||||
ElMessage.success('导出成功')
|
||||
})
|
||||
}
|
||||
|
||||
const topCateChange = (row: any) => {
|
||||
if (row.id == 0) {
|
||||
queryParams.top_cate = ''
|
||||
queryParams.top_cate_value = '全部'
|
||||
getLists()
|
||||
} else {
|
||||
queryParams.top_cate = row.id
|
||||
queryParams.top_cate_value = row.name
|
||||
|
||||
getLists()
|
||||
}
|
||||
}
|
||||
defineExpose({
|
||||
open
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user