|
@@ -78,7 +78,7 @@
|
|
|
<!-- <dict-tag :type="DICT_TYPE.SYSTEM_ROLE_TYPE" :value="scope.row.type" />-->
|
|
|
<!-- </template>-->
|
|
|
<!-- </el-table-column>-->
|
|
|
- <el-table-column align="center" label="备注" prop="remark" />
|
|
|
+ <el-table-column align="center" label="产品简介" prop="introduction" />
|
|
|
<el-table-column align="center" label="状态" prop="status">
|
|
|
<template #default="scope">
|
|
|
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
|
|
@@ -122,7 +122,7 @@
|
|
|
</ContentWrap>
|
|
|
|
|
|
<!-- 表单弹窗:添加/修改 -->
|
|
|
- <SupplierDetailForm ref="formRef" @success="getList" />
|
|
|
+ <SupplierDetailForm ref="formRef" @success="getList" :categoryId="queryParams.categoryId"/>
|
|
|
</template>
|
|
|
<script lang="ts" setup>
|
|
|
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
|
@@ -146,8 +146,7 @@ const exportLoading = ref(false) // 导出的加载中
|
|
|
const getList = async () => {
|
|
|
loading.value = true
|
|
|
try {
|
|
|
- debugger;
|
|
|
- const data = await SupplierDetailApi.getSupplierProductPage(queryParams)
|
|
|
+ const data = await SupplierDetailApi.getSupplierProductPage(queryParams.value)
|
|
|
list.value = data.list
|
|
|
total.value = data.total
|
|
|
} finally {
|
|
@@ -157,7 +156,7 @@ const getList = async () => {
|
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
const handleQuery = () => {
|
|
|
- queryParams.pageNo = 1
|
|
|
+ queryParams.value.pageNo = 1
|
|
|
getList()
|
|
|
}
|
|
|
|
|
@@ -173,18 +172,6 @@ const openForm = (type: string, id?: number) => {
|
|
|
formRef.value.open(type, id)
|
|
|
}
|
|
|
|
|
|
-/** 数据权限操作 */
|
|
|
-const dataPermissionFormRef = ref()
|
|
|
-const openDataPermissionForm = async (row: SupplierDetailApi.SupplierProductVoVO) => {
|
|
|
- dataPermissionFormRef.value.open(row)
|
|
|
-}
|
|
|
-
|
|
|
-/** 菜单权限操作 */
|
|
|
-const assignMenuFormRef = ref()
|
|
|
-const openAssignMenuForm = async (row: SupplierDetailApi.SupplierProductVo) => {
|
|
|
- assignMenuFormRef.value.open(row)
|
|
|
-}
|
|
|
-
|
|
|
/** 删除按钮操作 */
|
|
|
const handleDelete = async (id: number) => {
|
|
|
try {
|
|
@@ -197,7 +184,14 @@ const handleDelete = async (id: number) => {
|
|
|
await getList()
|
|
|
} catch {}
|
|
|
}
|
|
|
-
|
|
|
+const queryParams = ref({
|
|
|
+ pageNo: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ name: '',
|
|
|
+ categoryId: undefined,
|
|
|
+ createTime: undefined,
|
|
|
+ status: undefined
|
|
|
+}) // 查询参数
|
|
|
/** 导出按钮操作 */
|
|
|
const handleExport = async () => {
|
|
|
try {
|
|
@@ -205,25 +199,20 @@ const handleExport = async () => {
|
|
|
await message.exportConfirm()
|
|
|
// 发起导出
|
|
|
exportLoading.value = true
|
|
|
- const data = await SupplierDetailApi.exportSupplierProduct(queryParams)
|
|
|
+ debugger;
|
|
|
+ const data = await SupplierDetailApi.exportSupplierProduct(queryParams.value)
|
|
|
+ debugger
|
|
|
download.excel(data, '产品列表.xls')
|
|
|
} catch {
|
|
|
} finally {
|
|
|
exportLoading.value = false
|
|
|
}
|
|
|
}
|
|
|
-const queryParams = ref({
|
|
|
- pageNo: 1,
|
|
|
- pageSize: 10,
|
|
|
- name: '',
|
|
|
- categoryId: undefined,
|
|
|
- createTime: undefined
|
|
|
-}) // 查询参数
|
|
|
/** 初始化 **/
|
|
|
onMounted(() => {
|
|
|
// 解析路由的 categoryId
|
|
|
if (route.query.categoryId) {
|
|
|
- queryParams.value.categoryId = Number(route.query.categoryId)
|
|
|
+ queryParams.value.categoryId = route.query.categoryId
|
|
|
}
|
|
|
getList()
|
|
|
})
|