更新接口路径,调整配置,优化用户及订单管理功能
This commit is contained in:
parent
4f216c4a2c
commit
818b3c27f7
|
@ -13,10 +13,10 @@ export function logout() {
|
|||
|
||||
// 用户信息
|
||||
export function getUserInfo() {
|
||||
return request.get({ url: '/auth/admin/mySelf' })
|
||||
return request.get({ url: '/auth.admin/mySelf' })
|
||||
}
|
||||
|
||||
// 编辑管理员信息
|
||||
export function setUserInfo(params: any) {
|
||||
return request.post({ url: '/auth/admin/editSelf', params })
|
||||
return request.post({ url: '/auth.admin/editSelf', params })
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ const config = {
|
|||
title: '后台管理系统', //网站默认标题
|
||||
version: '1.8.0', //版本号
|
||||
baseUrl: `${import.meta.env.VITE_APP_BASE_URL || ''}/`, //请求接口域名
|
||||
urlPrefix: 'store', //请求默认前缀
|
||||
urlPrefix: 'adminapi', //请求默认前缀
|
||||
timeout: 10 * 1000 //请求超时时长
|
||||
}
|
||||
|
||||
|
|
|
@ -1 +1,129 @@
|
|||
<!-- 员工 -->
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="商品状态">
|
||||
<el-select class="flex-1" v-model="queryParams.status" clearable placeholder="请选择商品状态">
|
||||
<el-option label="销售中" :value="0" />
|
||||
<el-option label="仓库中" :value="0" />
|
||||
<el-option label="已售罄" :value="0" />
|
||||
<el-option label="库存预警" :value="0" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="商品搜索" prop="nature">
|
||||
<el-input v-model="queryParams.status" clearable placeholder="请输入商品名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button v-perms="['dept.dept/add']" type="primary" @click="handleAdd()">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column label="id" prop="progress" show-overflow-tooltip />
|
||||
<el-table-column label="头像" prop="build_area_text" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<!-- <el-image style="width: 50px; height: 50px" :src="url" /> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="昵称" prop="project_level_text" show-overflow-tooltip />
|
||||
<el-table-column label="店员身份" prop="project_level_text" show-overflow-tooltip />
|
||||
<el-table-column label="手机号" prop="total_investment" show-overflow-tooltip />
|
||||
<el-table-column label="状态" prop="engineering_status_text" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<el-switch v-model="row.status" :active-value="1" :inactive-value="0"
|
||||
@change="changeStatus(row)"></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="170" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<!-- <el-button type="primary" link @click="handleEdit(row)">
|
||||
详情
|
||||
</el-button> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<!-- <detailPopup ref="editRef" /> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="manageProjectLists">
|
||||
import { ref, reactive } from "vue"
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { apiGoodsListLists, apiStatus, apiGoodsTypeLists } from '@/api/goodsList'
|
||||
// import detailPopup from './detail.vue'
|
||||
|
||||
// const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
// 是否显示编辑框
|
||||
// const showDetail = ref(false)
|
||||
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
status: ""
|
||||
})
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
|
||||
// 上架&下架
|
||||
const changeStatus = (data: any) => {
|
||||
apiStatus({
|
||||
// id: data.id,
|
||||
// account: data.account,
|
||||
// name: data.name,
|
||||
// role_id: data.role_id,
|
||||
// disable: data.disable,
|
||||
// org_id: data.org_id,
|
||||
// dept_id: data.dept_id,
|
||||
// job_id: data.job_id,
|
||||
// multipoint_login: data.multipoint_login
|
||||
}).finally(() => {
|
||||
getLists()
|
||||
})
|
||||
}
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiGoodsListLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
// 详情
|
||||
const handleEdit = async (data: any) => {
|
||||
// editRef.value?.open()
|
||||
}
|
||||
|
||||
// 新增
|
||||
const handleAdd = () => {
|
||||
|
||||
}
|
||||
|
||||
getLists()
|
||||
</script>
|
|
@ -47,7 +47,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品信息" prop="project_level_text" show-overflow-tooltip />
|
||||
<el-table-column label="实际支付" prop="total_investment" show-overflow-tooltip width="120" />
|
||||
<el-table-column label="实际支付" prop="total_investment" show-overflow-tooltip />
|
||||
<el-table-column label="支付方式" prop="engineering_status_text" show-overflow-tooltip />
|
||||
<el-table-column label="收银店员" prop="engineering_status_text" show-overflow-tooltip />
|
||||
<el-table-column label="下单时间" prop="engineering_status_text" show-overflow-tooltip />
|
||||
|
@ -119,4 +119,3 @@ const handleDetail = async (data: any) => {
|
|||
|
||||
getLists()
|
||||
</script>
|
||||
|
|
@ -1,43 +1,20 @@
|
|||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup
|
||||
ref="popupRef"
|
||||
:title="popupTitle"
|
||||
:async="true"
|
||||
width="550px"
|
||||
@confirm="handleSubmit"
|
||||
@close="handleClose"
|
||||
>
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit"
|
||||
@close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="84px" :rules="formRules">
|
||||
<el-form-item label="上级部门" prop="pid" v-if="formData.pid !== 0">
|
||||
<el-tree-select
|
||||
class="flex-1"
|
||||
v-model="formData.pid"
|
||||
:data="optionsData.dept"
|
||||
clearable
|
||||
node-key="id"
|
||||
:props="{
|
||||
value: 'id',
|
||||
label: 'name'
|
||||
}"
|
||||
check-strictly
|
||||
:default-expand-all="true"
|
||||
placeholder="请选择上级部门"
|
||||
/>
|
||||
<el-tree-select class="flex-1" v-model="formData.pid" :data="optionsData.dept" clearable
|
||||
node-key="id" :props="{
|
||||
value: 'id',
|
||||
label: 'name'
|
||||
}" check-strictly :default-expand-all="true" placeholder="请选择上级部门" />
|
||||
</el-form-item>
|
||||
<el-form-item label="部门名称" prop="name">
|
||||
<el-input
|
||||
v-model="formData.name"
|
||||
placeholder="请输入部门名称"
|
||||
:maxlength="100"
|
||||
/>
|
||||
<el-input v-model="formData.name" placeholder="请输入部门名称" :maxlength="100" />
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人" prop="leader">
|
||||
<el-input
|
||||
v-model="formData.leader"
|
||||
placeholder="请输入负责人姓名"
|
||||
:maxlength="30"
|
||||
/>
|
||||
<el-input v-model="formData.leader" placeholder="请输入负责人姓名" :maxlength="30" />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话" prop="mobile">
|
||||
<el-input v-model="formData.mobile" placeholder="请输入联系电话" />
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-table :data="pager.lists">
|
||||
<el-table-column label="商品信息" prop="build_area_text" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<div class="flex items-center w-[300px] ">
|
||||
<el-image class="w-[50px] h-[50px] mr-2" :src="url" />
|
||||
受到广泛接
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="价格" prop="project_level_text" show-overflow-tooltip />
|
||||
<el-table-column label="浏览时间" prop="total_investment" show-overflow-tooltip />
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="manageProjectLists">
|
||||
import { ref, reactive } from "vue"
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { apiGoodsListLists, apiStatus, apiGoodsTypeLists } from '@/api/goodsList'
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
status: ""
|
||||
})
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiGoodsListLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
|
||||
getLists()
|
||||
</script>
|
|
@ -0,0 +1,34 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-table :data="pager.lists">
|
||||
<el-table-column label="动作" prop="progress" show-overflow-tooltip />
|
||||
<el-table-column label="变动金额" prop="build_area_text" show-overflow-tooltip />
|
||||
<el-table-column label="变动后" prop="project_level_text" show-overflow-tooltip />
|
||||
<el-table-column label="创建时间" prop="total_investment" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="total_investment" show-overflow-tooltip />
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="manageProjectLists">
|
||||
import { ref, reactive } from "vue"
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { apiGoodsListLists, apiStatus, apiGoodsTypeLists } from '@/api/goodsList'
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
status: ""
|
||||
})
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiGoodsListLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
|
||||
getLists()
|
||||
</script>
|
|
@ -0,0 +1,35 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-table :data="pager.lists">
|
||||
<el-table-column label="订单id" prop="progress" show-overflow-tooltip />
|
||||
<el-table-column label="收货人" prop="build_area_text" show-overflow-tooltip />
|
||||
<el-table-column label="商品数量" prop="project_level_text" show-overflow-tooltip />
|
||||
<el-table-column label="商品总价" prop="total_investment" show-overflow-tooltip />
|
||||
<el-table-column label="实付金额" prop="total_investment" show-overflow-tooltip />
|
||||
<el-table-column label="交易完成时间" prop="total_investment" show-overflow-tooltip />
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="manageProjectLists">
|
||||
import { ref, reactive } from "vue"
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { apiGoodsListLists, apiStatus, apiGoodsTypeLists } from '@/api/goodsList'
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
status: ""
|
||||
})
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiGoodsListLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
|
||||
getLists()
|
||||
</script>
|
|
@ -0,0 +1,92 @@
|
|||
<template>
|
||||
<el-descriptions :column="3" border :title="item.title" class="mb-[30px]" v-for="(item, index) in userInfoCongig"
|
||||
:key="index">
|
||||
<el-descriptions-item :label="el.name" label-class-name="my-label" v-for="el in item.child">
|
||||
{{ el.value }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { reactive } from 'vue';
|
||||
const userInfoCongig = reactive([
|
||||
{
|
||||
title: '基本信息',
|
||||
child: [
|
||||
{
|
||||
name: "用户编号",
|
||||
value: '军哥'
|
||||
},
|
||||
{
|
||||
name: "真实姓名",
|
||||
value: '19130550023'
|
||||
},
|
||||
{
|
||||
name: "手机号码",
|
||||
value: '19130550023'
|
||||
},
|
||||
{
|
||||
name: "生日",
|
||||
value: '19130550023'
|
||||
},
|
||||
{
|
||||
name: "性别",
|
||||
value: 'sex'
|
||||
},
|
||||
{
|
||||
name: "身份证号",
|
||||
value: 'sex'
|
||||
},
|
||||
{
|
||||
name: "用户地址",
|
||||
value: 'sex'
|
||||
},
|
||||
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '密码',
|
||||
child: [
|
||||
{
|
||||
name: "登录密码",
|
||||
value: '********'
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '用户概况',
|
||||
child: [
|
||||
{
|
||||
name: "用户状态",
|
||||
value: '好天气'
|
||||
},
|
||||
{
|
||||
name: "用户等级",
|
||||
value: '19130550023'
|
||||
},
|
||||
{
|
||||
name: "用户分组",
|
||||
value: '19130550023'
|
||||
},
|
||||
{
|
||||
name: "注册时间",
|
||||
value: '好天气'
|
||||
},
|
||||
{
|
||||
name: "登录时间",
|
||||
value: '19130550023'
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '用户备注',
|
||||
child: [
|
||||
{
|
||||
name: "备注",
|
||||
value: '好天气'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
])
|
||||
</script>
|
|
@ -0,0 +1,120 @@
|
|||
<!-- 订单详情 -->
|
||||
<template>
|
||||
<el-drawer v-model="showDetail" direction="rtl" :destroy-on-close="true" title="订单详情" size="50%">
|
||||
<template #header>
|
||||
<h4>用户详情</h4>
|
||||
</template>
|
||||
<template #default>
|
||||
<!-- head -->
|
||||
<div class="flex">
|
||||
<el-image class="w-[50px] h-[50px]" :src="url" />
|
||||
<div class="flex flex-col ml-3 justify-between">
|
||||
<div style="font-size:16px">
|
||||
我是军哥
|
||||
</div>
|
||||
<div>
|
||||
究极vip
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="flex justify-between mt-[20px]">
|
||||
<li>
|
||||
<div>余额</div>
|
||||
<div>20.00</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>总计订单</div>
|
||||
<div>未核销</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>总消费金额</div>
|
||||
<div>未核销</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>积分</div>
|
||||
<div>未核销</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>用户经验</div>
|
||||
<div>未核销</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>消费次数</div>
|
||||
<div>未核销</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!-- content -->
|
||||
<el-tabs v-model="activeName" class="mt-[20px]">
|
||||
<el-tab-pane label="用户信息" name="first">
|
||||
<userInfo></userInfo>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="消费记录" name="second">
|
||||
<shoping></shoping>
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane label="积分明细" name="third">
|
||||
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="签到记录" name="four">
|
||||
|
||||
</el-tab-pane> -->
|
||||
<el-tab-pane label="余额变动" name="five">
|
||||
<money></money>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="浏览足迹" name="six">
|
||||
<histroy></histroy>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
<template #footer>
|
||||
<div style="flex: auto">
|
||||
<el-button type="primary" @click="showDetail = false">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineEmits, defineProps } from "vue"
|
||||
import userInfo from "./components/userInfo.vue"
|
||||
import shoping from "./components/shoping.vue"
|
||||
import money from "./components/money.vue"
|
||||
import histroy from "./components/histroy.vue"
|
||||
|
||||
|
||||
const showDetail = ref(false)
|
||||
const url =
|
||||
'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg'
|
||||
const props = defineProps({
|
||||
// showDetail: {
|
||||
// type: Boolean,
|
||||
// },
|
||||
})
|
||||
|
||||
const formData = reactive({
|
||||
detail: [
|
||||
{}
|
||||
],
|
||||
detail2: [],
|
||||
})
|
||||
|
||||
|
||||
|
||||
const activeName = 'first'
|
||||
|
||||
|
||||
|
||||
const open = () => {
|
||||
showDetail.value = true
|
||||
}
|
||||
|
||||
const close = () => {
|
||||
showDetail.value = false
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
close
|
||||
|
||||
})
|
||||
</script>
|
|
@ -1 +1,117 @@
|
|||
<!-- 用户 -->
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="商品状态">
|
||||
<el-select class="flex-1" v-model="queryParams.status" clearable placeholder="请选择商品状态">
|
||||
<el-option label="销售中" :value="0" />
|
||||
<el-option label="仓库中" :value="0" />
|
||||
<el-option label="已售罄" :value="0" />
|
||||
<el-option label="库存预警" :value="0" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="商品分类" prop="project_code">
|
||||
<!-- <el-select class="flex-1" v-model="queryParams.status" clearable placeholder="请选择商品分类">
|
||||
<el-option v-for="(item, index) in typeLists" :key="index" :label="item.name"
|
||||
:value="parseInt(item.value)" />
|
||||
</el-select> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="商品搜索" prop="nature">
|
||||
<el-input v-model="queryParams.status" clearable placeholder="请输入商品名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column label="id" prop="progress" show-overflow-tooltip />
|
||||
<el-table-column label="头像" prop="build_area_text" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<!-- <el-image style="width: 50px; height: 50px" :src="url" /> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="昵称" prop="project_level_text" show-overflow-tooltip />
|
||||
<el-table-column label="付费会员" prop="total_investment" show-overflow-tooltip width="120" />
|
||||
<el-table-column label="用户等级" prop="engineering_status_text" show-overflow-tooltip />
|
||||
<el-table-column label="标签" prop="engineering_status_text" show-overflow-tooltip />
|
||||
<el-table-column label="手机号" prop="engineering_status_text" show-overflow-tooltip />
|
||||
<el-table-column label="用户类型" prop="engineering_status_text" show-overflow-tooltip />
|
||||
<el-table-column label="余额" prop="engineering_status_text" show-overflow-tooltip />
|
||||
<el-table-column label="关联店员" prop="engineering_status_text" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="170" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" link @click="handleEdit(row)">
|
||||
详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<detailPopup ref="editRef" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="manageProjectLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { apiGoodsListLists, apiStatus, apiGoodsTypeLists } from '@/api/goodsList'
|
||||
import detailPopup from './detail.vue'
|
||||
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
// 是否显示编辑框
|
||||
const showDetail = ref(false)
|
||||
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
status: ""
|
||||
})
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiGoodsListLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
// 详情
|
||||
const handleEdit = async (data: any) => {
|
||||
// let res = await apiGoodsListDetail({ id: data.id })
|
||||
// showDetail.value = true
|
||||
// await nextTick()
|
||||
// editRef.value?.open('edit')
|
||||
// editRef.value?.setFormData(data)
|
||||
editRef.value?.open()
|
||||
}
|
||||
|
||||
getLists()
|
||||
</script>
|
Loading…
Reference in New Issue