优化店铺商品及分类管理
This commit is contained in:
@@ -10,6 +10,12 @@
|
||||
<a-button class="ele-btn-icon" @click="openUrl(`/shop/index`)">
|
||||
<span>店铺管理</span>
|
||||
</a-button>
|
||||
<a-button class="ele-btn-icon" @click="openUrl(`/shop/index`)">
|
||||
<span>门店职员</span>
|
||||
</a-button>
|
||||
<a-button class="ele-btn-icon" @click="openUrl(`/goods/category/:id`)">
|
||||
<span>商品分类</span>
|
||||
</a-button>
|
||||
<a-button class="ele-btn-icon" @click="openUrl(`/shop/apply`)">
|
||||
<span>入驻申请</span>
|
||||
</a-button>
|
||||
@@ -28,6 +34,7 @@
|
||||
import { watch } from 'vue';
|
||||
import { openUrl } from '@/utils/common';
|
||||
import router from '@/router';
|
||||
import { getMerchant } from '@/api/shop/merchant';
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
@@ -52,7 +59,7 @@
|
||||
watch(
|
||||
() => router.currentRoute,
|
||||
(route) => {
|
||||
console.log(route,'route');
|
||||
console.log(route, 'route');
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
@@ -30,8 +30,12 @@
|
||||
</template>
|
||||
<template v-if="column.key === 'action'">
|
||||
<a-space>
|
||||
<a @click="openUrl(`/shop/account/${record.merchantId}`)"
|
||||
>门店用户</a
|
||||
<a @click="openUrl(`/goods/category/${record.merchantId}`)"
|
||||
>分类</a
|
||||
>
|
||||
<a-divider type="vertical" />
|
||||
<a @click="openUrl(`/goods/index/${record.merchantId}`)"
|
||||
>商品</a
|
||||
>
|
||||
<a-divider type="vertical" />
|
||||
<a @click="openEdit(record)">修改</a>
|
||||
@@ -55,7 +59,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { createVNode, ref } from 'vue';
|
||||
import { createVNode, ref, watch } from 'vue';
|
||||
import { message, Modal } from 'ant-design-vue';
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
import type { EleProTable } from 'ele-admin-pro';
|
||||
@@ -72,7 +76,8 @@
|
||||
removeBatchMerchant
|
||||
} from '@/api/shop/merchant';
|
||||
import type { Merchant, MerchantParam } from '@/api/shop/merchant/model';
|
||||
import { openNew, openPreview, openUrl } from '@/utils/common';
|
||||
import { openUrl } from '@/utils/common';
|
||||
import router from '@/router';
|
||||
|
||||
// 表格实例
|
||||
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
|
||||
@@ -85,8 +90,8 @@
|
||||
const showEdit = ref(false);
|
||||
// 是否显示批量移动弹窗
|
||||
const showMove = ref(false);
|
||||
// 加载状态
|
||||
const loading = ref(true);
|
||||
// 商户ID
|
||||
const merchantId = ref(0);
|
||||
|
||||
// 表格数据源
|
||||
const datasource: DatasourceFunction = ({
|
||||
@@ -169,7 +174,7 @@
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
width: 180,
|
||||
width: 240,
|
||||
fixed: 'right',
|
||||
align: 'center',
|
||||
hideInSetting: true
|
||||
@@ -235,11 +240,6 @@
|
||||
});
|
||||
};
|
||||
|
||||
/* 查询 */
|
||||
const query = () => {
|
||||
loading.value = true;
|
||||
};
|
||||
|
||||
/* 自定义行属性 */
|
||||
const customRow = (record: Merchant) => {
|
||||
return {
|
||||
@@ -253,7 +253,20 @@
|
||||
}
|
||||
};
|
||||
};
|
||||
query();
|
||||
|
||||
watch(
|
||||
() => router.currentRoute.value.params.id,
|
||||
(id) => {
|
||||
if (id) {
|
||||
if (id == ':id') {
|
||||
merchantId.value = 0;
|
||||
} else {
|
||||
merchantId.value = Number(id);
|
||||
}
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
||||
Reference in New Issue
Block a user