Compare commits
No commits in common. "e0bdcaee0d1b2b28850e0ef779bd8daaeea6ac71" and "24bdfa27c3b6b723dc1d6caf431fa254295a81e1" have entirely different histories.
e0bdcaee0d
...
24bdfa27c3
|
@ -7,48 +7,27 @@ export interface CabinetCellQuery extends BasePageQuery {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CabinetCellDTO {
|
export interface CabinetCellDTO {
|
||||||
/** 格口唯一ID */
|
|
||||||
cellId?: number;
|
cellId?: number;
|
||||||
/** 关联柜机ID */
|
|
||||||
cabinetId: number;
|
cabinetId: number;
|
||||||
/** 格口号 */
|
|
||||||
cellNo: number;
|
cellNo: number;
|
||||||
/** 针脚序号 */
|
|
||||||
pinNo: number;
|
pinNo: number;
|
||||||
/** 格口类型(1小格 2中格 3大格 4超大格) */
|
|
||||||
cellType: number;
|
cellType: number;
|
||||||
/** 使用状态(1空闲 2已占用) */
|
|
||||||
usageStatus: number;
|
usageStatus: number;
|
||||||
/** 可用状态(1正常 2故障) */
|
|
||||||
availableStatus: number;
|
availableStatus: number;
|
||||||
/** 操作人 */
|
|
||||||
operator?: string;
|
operator?: string;
|
||||||
/** 关联商品ID */
|
|
||||||
goodsId?: number;
|
goodsId?: number;
|
||||||
/** 商品名称 */
|
|
||||||
goodsName?: string;
|
goodsName?: string;
|
||||||
/** 商品价格 */
|
|
||||||
price?: number;
|
price?: number;
|
||||||
/** 商品封面图 */
|
|
||||||
coverImg?: string;
|
coverImg?: string;
|
||||||
/** 库存数量 */
|
|
||||||
stock?: number;
|
stock?: number;
|
||||||
/** 历史订单数量 */
|
|
||||||
orderCount?: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AddCabinetCellCommand {
|
export interface AddCabinetCellCommand {
|
||||||
/** 关联柜机ID */
|
|
||||||
cabinetId: number;
|
cabinetId: number;
|
||||||
/** 格口号 */
|
|
||||||
cellNo: number;
|
cellNo: number;
|
||||||
/** 针脚序号 */
|
|
||||||
pinNo: number;
|
pinNo: number;
|
||||||
/** 格口类型(1小格 2中格 3大格 4超大格) */
|
|
||||||
cellType: number;
|
cellType: number;
|
||||||
/** 使用状态(1空闲 2已占用) */
|
|
||||||
usageStatus: number;
|
usageStatus: number;
|
||||||
/** 可用状态(1正常 2故障) */
|
|
||||||
availableStatus: number;
|
availableStatus: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,78 +0,0 @@
|
||||||
import { http } from '@/utils/http';
|
|
||||||
|
|
||||||
export interface SearchCabinetCellOperationQuery extends BasePageQuery {
|
|
||||||
/** 关联格口ID */
|
|
||||||
cellId?: number;
|
|
||||||
/** 关联商品ID */
|
|
||||||
goodsId?: number;
|
|
||||||
/** 操作类型(1: 用户操作 2: 管理员操作) */
|
|
||||||
operationType?: number;
|
|
||||||
/** 操作状态(1: 正常 2: 操作失败) */
|
|
||||||
status?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface CabinetCellOperationDTO {
|
|
||||||
/** 操作流水号 */
|
|
||||||
operationId: number;
|
|
||||||
/** 关联格口ID */
|
|
||||||
cellId: number;
|
|
||||||
/** 关联商品ID */
|
|
||||||
goodsId: number;
|
|
||||||
/** 商品名称 */
|
|
||||||
goodsName: string;
|
|
||||||
/** 企业微信用户ID */
|
|
||||||
userid: string;
|
|
||||||
/** 是否内部用户(false: 否 true: 是) */
|
|
||||||
isInternal: boolean;
|
|
||||||
/** 成员名称 */
|
|
||||||
name: string;
|
|
||||||
/** 手机号码 */
|
|
||||||
mobile: string;
|
|
||||||
/** 操作类型(1: 用户操作 2: 管理员操作) */
|
|
||||||
operationType: number;
|
|
||||||
/** 操作状态(1: 正常 2: 操作失败) */
|
|
||||||
status: number;
|
|
||||||
/** 状态说明 */
|
|
||||||
statusDesc: string;
|
|
||||||
/** 操作人 */
|
|
||||||
operator: string;
|
|
||||||
/** 创建时间 */
|
|
||||||
createTimeStr: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface AddCabinetCellOperationCommand {
|
|
||||||
/** 关联格口ID */
|
|
||||||
cellId: number;
|
|
||||||
/** 关联商品ID */
|
|
||||||
goodsId: number;
|
|
||||||
/** 操作类型(1: 用户操作 2: 管理员操作) */
|
|
||||||
operationType: number;
|
|
||||||
/** 操作状态(1: 正常 2: 操作失败) */
|
|
||||||
status: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface UpdateCabinetCellOperationCommand extends AddCabinetCellOperationCommand {
|
|
||||||
operationId: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getCabinetCellOperationList = (params?: SearchCabinetCellOperationQuery) => {
|
|
||||||
return http.request<ResponseData<PageDTO<CabinetCellOperationDTO>>>('get', '/cabinet/cellOperations', {
|
|
||||||
params
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
export const addCabinetCellOperation = (data: AddCabinetCellOperationCommand) => {
|
|
||||||
return http.request<ResponseData<void>>('post', '/cabinet/cellOperations', {
|
|
||||||
data
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
export const updateCabinetCellOperation = (operationId: number, data: UpdateCabinetCellOperationCommand) => {
|
|
||||||
return http.request<ResponseData<void>>('put', `/cabinet/cellOperations/${operationId}`, {
|
|
||||||
data
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
export const deleteCabinetCellOperation = (ids: string) => {
|
|
||||||
return http.request<ResponseData<void>>('delete', `/cabinet/cellOperations/${ids}`);
|
|
||||||
};
|
|
|
@ -5,13 +5,6 @@ export interface SearchReturnApprovalQuery extends BasePageQuery {
|
||||||
orderId?: number;
|
orderId?: number;
|
||||||
goodsId?: number;
|
goodsId?: number;
|
||||||
status?: number;
|
status?: number;
|
||||||
approvalTime?: string;
|
|
||||||
/**
|
|
||||||
* 支付方式
|
|
||||||
* @remarks
|
|
||||||
* wechat-微信支付 | balance-余额支付
|
|
||||||
*/
|
|
||||||
paymentMethod?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 退货审批DTO */
|
/** 退货审批DTO */
|
||||||
|
@ -29,10 +22,10 @@ export interface ReturnApprovalDTO {
|
||||||
goodsPrice: number;
|
goodsPrice: number;
|
||||||
/** 退还金额 */
|
/** 退还金额 */
|
||||||
returnAmount: number;
|
returnAmount: number;
|
||||||
/** 归还图片路径(逗号分隔) */
|
/** 归还图片路径数组 */
|
||||||
returnImages: string;
|
returnImages: string[];
|
||||||
/** 审核图片路径(逗号分隔) */
|
/** 审核图片路径数组 */
|
||||||
auditImages: string;
|
auditImages: string[];
|
||||||
/** 归还说明 */
|
/** 归还说明 */
|
||||||
returnRemark?: string;
|
returnRemark?: string;
|
||||||
/** 审核说明 */
|
/** 审核说明 */
|
||||||
|
@ -44,17 +37,6 @@ export interface ReturnApprovalDTO {
|
||||||
createTime?: Date;
|
createTime?: Date;
|
||||||
updaterId?: number;
|
updaterId?: number;
|
||||||
updateTime?: Date;
|
updateTime?: Date;
|
||||||
approvalTime?: Date;
|
|
||||||
goodsName?: string;
|
|
||||||
coverImg?: string;
|
|
||||||
mobile?: string;
|
|
||||||
name?: string;
|
|
||||||
/**
|
|
||||||
* 支付方式
|
|
||||||
* @remarks
|
|
||||||
* wechat-微信支付 | balance-余额支付
|
|
||||||
*/
|
|
||||||
paymentMethod?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AddReturnApprovalCommand {
|
export interface AddReturnApprovalCommand {
|
||||||
|
@ -64,8 +46,8 @@ export interface AddReturnApprovalCommand {
|
||||||
goodsId: number;
|
goodsId: number;
|
||||||
/** 归还数量 */
|
/** 归还数量 */
|
||||||
returnQuantity: number;
|
returnQuantity: number;
|
||||||
/** 归还图片路径(逗号分隔) */
|
/** 归还图片路径数组 */
|
||||||
returnImages: string;
|
returnImages: string[];
|
||||||
/** 归还说明 */
|
/** 归还说明 */
|
||||||
returnRemark?: string;
|
returnRemark?: string;
|
||||||
}
|
}
|
||||||
|
@ -75,8 +57,8 @@ export interface UpdateReturnApprovalCommand {
|
||||||
approvalId: number;
|
approvalId: number;
|
||||||
/** 归还数量 */
|
/** 归还数量 */
|
||||||
returnQuantity: number;
|
returnQuantity: number;
|
||||||
/** 审核图片路径(逗号分隔) */
|
/** 审核图片路径数组 */
|
||||||
auditImages: string;
|
auditImages: string[];
|
||||||
/** 审核说明 */
|
/** 审核说明 */
|
||||||
auditRemark?: string;
|
auditRemark?: string;
|
||||||
/** 审批状态(1待审核 2已通过 3已驳回) */
|
/** 审批状态(1待审核 2已通过 3已驳回) */
|
||||||
|
@ -87,23 +69,10 @@ export interface UpdateReturnApprovalCommand {
|
||||||
export const getReturnApprovalListApi = (params?: SearchReturnApprovalQuery) => {
|
export const getReturnApprovalListApi = (params?: SearchReturnApprovalQuery) => {
|
||||||
return http.request<ResponseData<PageDTO<ReturnApprovalDTO>>>(
|
return http.request<ResponseData<PageDTO<ReturnApprovalDTO>>>(
|
||||||
'get',
|
'get',
|
||||||
'/shop/returnApproval', {
|
'/shop/returnApproval',
|
||||||
params: {
|
{ params }
|
||||||
...params,
|
|
||||||
approvalTime: params?.approvalTime ? params.approvalTime : undefined
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
/** 批量导出订单 */
|
|
||||||
export const exportReturnApprovalExcelApi = (params: SearchReturnApprovalQuery, fileName: string) => {
|
|
||||||
return http.download("/shop/returnApproval/excel", fileName, {
|
|
||||||
params: {
|
|
||||||
...params,
|
|
||||||
approvalTime: params?.approvalTime ? params.approvalTime : undefined
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 新增退货审批 */
|
/** 新增退货审批 */
|
||||||
export const addReturnApprovalApi = (data: AddReturnApprovalCommand) => {
|
export const addReturnApprovalApi = (data: AddReturnApprovalCommand) => {
|
||||||
|
|
|
@ -37,15 +37,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 重置 el-button 中 icon 的 margin */
|
/* 重置 el-button 中 icon 的 margin */
|
||||||
.reset-margin [class*="el-icon"]+span {
|
.reset-margin [class*="el-icon"] + span {
|
||||||
margin-left: 2px !important;
|
margin-left: 2px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 移除所有相邻按钮的左侧间距 */
|
|
||||||
.el-button+.el-button {
|
|
||||||
margin-left: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 自定义 popover 的类名 */
|
/* 自定义 popover 的类名 */
|
||||||
.pure-popper {
|
.pure-popper {
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
|
@ -98,7 +93,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-icon {
|
.el-icon {
|
||||||
|
|
||||||
&.el-dialog__close,
|
&.el-dialog__close,
|
||||||
&.el-drawer__close,
|
&.el-drawer__close,
|
||||||
&.el-message-box__close,
|
&.el-message-box__close,
|
||||||
|
|
|
@ -1,144 +0,0 @@
|
||||||
<script setup lang="ts">
|
|
||||||
import { ref } from "vue";
|
|
||||||
import { PureTableBar } from "@/components/RePureTableBar";
|
|
||||||
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
|
||||||
import { getCabinetCellOperationList, type CabinetCellOperationDTO, type SearchCabinetCellOperationQuery } from "@/api/cabinet/cell-operation";
|
|
||||||
import Search from "@iconify-icons/ep/search";
|
|
||||||
import Refresh from "@iconify-icons/ep/refresh";
|
|
||||||
import { useRoute } from 'vue-router'
|
|
||||||
import { watch } from 'vue';
|
|
||||||
|
|
||||||
defineOptions({
|
|
||||||
name: "CellOperation"
|
|
||||||
});
|
|
||||||
|
|
||||||
const formRef = ref();
|
|
||||||
const tableRef = ref();
|
|
||||||
|
|
||||||
const searchFormParams = ref<SearchCabinetCellOperationQuery>({
|
|
||||||
cellId: null,
|
|
||||||
goodsId: null,
|
|
||||||
operationType: null,
|
|
||||||
status: null
|
|
||||||
});
|
|
||||||
|
|
||||||
const pagination = ref({
|
|
||||||
pageSize: 10,
|
|
||||||
currentPage: 1,
|
|
||||||
total: 0
|
|
||||||
});
|
|
||||||
|
|
||||||
const loading = ref(false);
|
|
||||||
const dataList = ref<CabinetCellOperationDTO[]>([]);
|
|
||||||
|
|
||||||
const getList = async () => {
|
|
||||||
try {
|
|
||||||
loading.value = true;
|
|
||||||
const { data } = await getCabinetCellOperationList({
|
|
||||||
...searchFormParams.value,
|
|
||||||
pageSize: pagination.value.pageSize,
|
|
||||||
pageNum: pagination.value.currentPage
|
|
||||||
});
|
|
||||||
dataList.value = data.rows;
|
|
||||||
pagination.value.total = data.total;
|
|
||||||
} finally {
|
|
||||||
loading.value = false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const onSearch = () => {
|
|
||||||
pagination.value.currentPage = 1;
|
|
||||||
getList();
|
|
||||||
};
|
|
||||||
|
|
||||||
const resetForm = () => {
|
|
||||||
formRef.value.resetFields();
|
|
||||||
onSearch();
|
|
||||||
};
|
|
||||||
|
|
||||||
const onSizeChange = (val: number) => {
|
|
||||||
pagination.value.pageSize = val;
|
|
||||||
getList();
|
|
||||||
};
|
|
||||||
|
|
||||||
const onCurrentChange = (val: number) => {
|
|
||||||
pagination.value.currentPage = val;
|
|
||||||
getList();
|
|
||||||
};
|
|
||||||
|
|
||||||
const route = useRoute();
|
|
||||||
|
|
||||||
watch(() => route.query.cellId,
|
|
||||||
(newVal) => {
|
|
||||||
searchFormParams.value.cellId = newVal ? Number(newVal) : null;
|
|
||||||
getList();
|
|
||||||
},
|
|
||||||
{
|
|
||||||
immediate: true
|
|
||||||
});
|
|
||||||
getList();
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div class="main">
|
|
||||||
<el-form ref="formRef" :inline="true" :model="searchFormParams"
|
|
||||||
class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px]">
|
|
||||||
<el-form-item label="格口ID:" prop="cellId">
|
|
||||||
<el-input v-model="searchFormParams.cellId" placeholder="请输入格口ID" clearable class="!w-[200px]" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="操作类型:" prop="operationType">
|
|
||||||
<el-select v-model="searchFormParams.operationType" placeholder="请选择类型" clearable class="!w-[180px]">
|
|
||||||
<el-option label="用户操作" :value="1" />
|
|
||||||
<el-option label="管理员操作" :value="2" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="操作状态:" prop="status">
|
|
||||||
<el-select v-model="searchFormParams.status" placeholder="请选择状态" clearable class="!w-[180px]">
|
|
||||||
<el-option label="正常" :value="1" />
|
|
||||||
<el-option label="操作失败" :value="2" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" :icon="useRenderIcon(Search)" @click="onSearch">
|
|
||||||
搜索
|
|
||||||
</el-button>
|
|
||||||
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm">
|
|
||||||
重置
|
|
||||||
</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<PureTableBar title="格口开启记录" @refresh="getList">
|
|
||||||
<el-table ref="tableRef" v-loading="loading" :data="dataList" row-key="operationId" border>
|
|
||||||
<el-table-column label="操作ID" prop="operationId" width="120" />
|
|
||||||
<el-table-column label="操作人" prop="name" width="120" />
|
|
||||||
<el-table-column label="手机号" prop="mobile" width="120" />
|
|
||||||
<el-table-column label="商品名称" prop="goodsName" width="180" />
|
|
||||||
<el-table-column label="操作类型" prop="operationType" width="120">
|
|
||||||
<template #default="{ row }">
|
|
||||||
<el-tag :type="row.operationType === 1 ? 'success' : 'warning'">
|
|
||||||
{{ { 1: '用户', 2: '管理员' }[row.operationType] }}
|
|
||||||
</el-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作状态" prop="status" width="120">
|
|
||||||
<template #default="{ row }">
|
|
||||||
<el-tag :type="row.status === 1 ? 'success' : 'danger'">
|
|
||||||
{{ { 1: '正常', 2: '操作失败' }[row.status] }}
|
|
||||||
</el-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作时间" prop="createTimeStr" width="180" />
|
|
||||||
</el-table>
|
|
||||||
<el-pagination v-model:current-page="pagination.currentPage" v-model:page-size="pagination.pageSize"
|
|
||||||
:page-sizes="[10, 20, 50]" layout="total, sizes, prev, pager, next, jumper" :total="pagination.total"
|
|
||||||
@size-change="onSizeChange" @current-change="onCurrentChange" />
|
|
||||||
</PureTableBar>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.right-btn {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -17,7 +17,7 @@ const loginRules = reactive<FormRules>({
|
||||||
validator: (rule, value, callback) => {
|
validator: (rule, value, callback) => {
|
||||||
if (value === "") {
|
if (value === "") {
|
||||||
callback(new Error("请输入密码"));
|
callback(new Error("请输入密码"));
|
||||||
} else if (false && !REGEXP_PWD.test(value)) {
|
} else if (!REGEXP_PWD.test(value)) {
|
||||||
callback(
|
callback(
|
||||||
new Error("密码格式应为8-18位数字、字母、符号的任意两种组合")
|
new Error("密码格式应为8-18位数字、字母、符号的任意两种组合")
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { PureTableBar } from "@/components/RePureTableBar";
|
import { PureTableBar } from "@/components/RePureTableBar";
|
||||||
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
||||||
import { getReturnApprovalListApi, deleteReturnApprovalApi, exportReturnApprovalExcelApi, ReturnApprovalDTO, SearchReturnApprovalQuery } from "@/api/shop/approval";
|
import { getReturnApprovalListApi, deleteReturnApprovalApi, ReturnApprovalDTO } from "@/api/shop/approval";
|
||||||
import Delete from "@iconify-icons/ep/delete";
|
import Delete from "@iconify-icons/ep/delete";
|
||||||
import Search from "@iconify-icons/ep/search";
|
import Search from "@iconify-icons/ep/search";
|
||||||
import Refresh from "@iconify-icons/ep/refresh";
|
import Refresh from "@iconify-icons/ep/refresh";
|
||||||
|
@ -17,13 +17,11 @@ const formRef = ref();
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
|
|
||||||
// 搜索表单
|
// 搜索表单
|
||||||
const searchFormParams = ref<SearchReturnApprovalQuery>({
|
const searchFormParams = ref({
|
||||||
approvalId: null,
|
approvalId: null,
|
||||||
orderId: null,
|
orderId: null,
|
||||||
goodsId: null,
|
goodsId: null,
|
||||||
status: null,
|
status: null
|
||||||
approvalTime: null,
|
|
||||||
paymentMethod: null
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// 分页参数
|
// 分页参数
|
||||||
|
@ -34,7 +32,6 @@ const pagination = ref({
|
||||||
});
|
});
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const exportLoading = ref(false);
|
|
||||||
const dataList = ref<ReturnApprovalDTO[]>([]);
|
const dataList = ref<ReturnApprovalDTO[]>([]);
|
||||||
const multipleSelection = ref<number[]>([]);
|
const multipleSelection = ref<number[]>([]);
|
||||||
const detailVisible = ref(false);
|
const detailVisible = ref(false);
|
||||||
|
@ -51,8 +48,7 @@ const getList = async () => {
|
||||||
});
|
});
|
||||||
dataList.value = data.rows.map(item => ({
|
dataList.value = data.rows.map(item => ({
|
||||||
...item,
|
...item,
|
||||||
statusStr: { 1: '待审核', 2: '已通过', 3: '已驳回' }[item.status],
|
statusStr: { 1: '待审核', 2: '已通过', 3: '已驳回' }[item.status]
|
||||||
auditImages: item.status === 2 ? item.auditImages : ''
|
|
||||||
}));
|
}));
|
||||||
pagination.value.total = data.total;
|
pagination.value.total = data.total;
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -76,26 +72,6 @@ const resetForm = () => {
|
||||||
const handlePaginationChange = () => getList();
|
const handlePaginationChange = () => getList();
|
||||||
|
|
||||||
// 批量删除
|
// 批量删除
|
||||||
const handleExport = async () => {
|
|
||||||
try {
|
|
||||||
exportLoading.value = true;
|
|
||||||
const dateSuffix = searchFormParams.value.approvalTime
|
|
||||||
? `_${searchFormParams.value.approvalTime.split(' ')[0].replace(/-/g, '')}`
|
|
||||||
: '';
|
|
||||||
const fileName = `退货审批列表${dateSuffix}.xlsx`;
|
|
||||||
await exportReturnApprovalExcelApi({
|
|
||||||
...searchFormParams.value,
|
|
||||||
pageSize: pagination.value.pageSize,
|
|
||||||
pageNum: pagination.value.currentPage
|
|
||||||
}, fileName);
|
|
||||||
ElMessage.success('导出任务已开始,请稍后查看下载文件');
|
|
||||||
} catch (e) {
|
|
||||||
ElMessage.error('导出失败');
|
|
||||||
} finally {
|
|
||||||
exportLoading.value = false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleBulkDelete = async () => {
|
const handleBulkDelete = async () => {
|
||||||
if (multipleSelection.value.length === 0) return;
|
if (multipleSelection.value.length === 0) return;
|
||||||
|
|
||||||
|
@ -128,10 +104,6 @@ getList();
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<el-form ref="formRef" :inline="true" :model="searchFormParams"
|
<el-form ref="formRef" :inline="true" :model="searchFormParams"
|
||||||
class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px]">
|
class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px]">
|
||||||
<el-form-item label="审批时间:">
|
|
||||||
<el-date-picker v-model="searchFormParams.approvalTime" type="date" placeholder="选择审批时间"
|
|
||||||
value-format="YYYY-MM-DD HH:mm:ss" class="!w-[200px]" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="审批ID:" prop="approvalId">
|
<el-form-item label="审批ID:" prop="approvalId">
|
||||||
<el-input v-model.number="searchFormParams.approvalId" placeholder="请输入审批ID" clearable class="!w-[180px]" />
|
<el-input v-model.number="searchFormParams.approvalId" placeholder="请输入审批ID" clearable class="!w-[180px]" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -148,12 +120,6 @@ getList();
|
||||||
<el-option label="已驳回" :value="3" />
|
<el-option label="已驳回" :value="3" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="支付方式:" prop="paymentMethod">
|
|
||||||
<el-select v-model="searchFormParams.paymentMethod" placeholder="请选择支付方式" clearable class="!w-[180px]">
|
|
||||||
<el-option label="微信支付" value="wechat" />
|
|
||||||
<el-option label="余额支付" value="balance" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" :icon="useRenderIcon(Search)" @click="onSearch">
|
<el-button type="primary" :icon="useRenderIcon(Search)" @click="onSearch">
|
||||||
搜索
|
搜索
|
||||||
|
@ -161,10 +127,6 @@ getList();
|
||||||
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm">
|
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm">
|
||||||
重置
|
重置
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="success" :loading="exportLoading" :icon="useRenderIcon('vscode-icons:file-type-excel2')"
|
|
||||||
@click="handleExport">
|
|
||||||
导出Excel
|
|
||||||
</el-button>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
|
@ -177,39 +139,11 @@ getList();
|
||||||
</template>
|
</template>
|
||||||
<el-table ref="tableRef" v-loading="loading" :data="dataList" row-key="approvalId"
|
<el-table ref="tableRef" v-loading="loading" :data="dataList" row-key="approvalId"
|
||||||
@selection-change="rows => multipleSelection = rows.map(r => r.approvalId)" border>
|
@selection-change="rows => multipleSelection = rows.map(r => r.approvalId)" border>
|
||||||
<el-table-column label="审批ID" prop="approvalId" width="80" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column label="订单ID" prop="orderId" width="80" />
|
<el-table-column label="审批ID" prop="approvalId" width="120" />
|
||||||
<el-table-column label="商品ID" prop="goodsId" width="80" />
|
<el-table-column label="订单ID" prop="orderId" width="120" />
|
||||||
<el-table-column label="用户姓名" prop="name" width="100" />
|
<el-table-column label="商品ID" prop="goodsId" width="120" />
|
||||||
<el-table-column label="手机号" prop="mobile" width="120" />
|
<el-table-column label="退货数量" prop="returnQuantity" width="100" />
|
||||||
<el-table-column label="商品名称" prop="goodsName" width="120" />
|
|
||||||
<el-table-column label="商品封面" width="120">
|
|
||||||
<template #default="{ row }">
|
|
||||||
<div v-if="row.coverImg" class="flex gap-2">
|
|
||||||
<el-image v-for="(img, index) in row.coverImg.split(',')" :key="index" :src="img"
|
|
||||||
:preview-src-list="row.coverImg.split(',')" :z-index="9999" :preview-teleported="true"
|
|
||||||
:hide-on-click-modal="true" fit="cover" class="rounded" width="40" height="40" />
|
|
||||||
</div>
|
|
||||||
<span v-else>-</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="商品价格" prop="goodsPrice" width="90">
|
|
||||||
<template #default="{ row }">{{ row.goodsPrice }}元</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="支付方式" prop="paymentMethod" width="100">
|
|
||||||
<template #default="{ row }">
|
|
||||||
{{ { wechat: '微信支付', balance: '余额支付' }[row.paymentMethod] || row.paymentMethod }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="退货数量" prop="returnQuantity" width="90" />
|
|
||||||
<el-table-column label="退款金额" prop="returnAmount" width="90">
|
|
||||||
<template #default="{ row }">{{ row.returnAmount }}元</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="提交时间" prop="createTime" width="180">
|
|
||||||
<template #default="{ row }">
|
|
||||||
{{ row.createTime ? new Date(row.createTime).toLocaleString() : '-' }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="状态" prop="status" width="100">
|
<el-table-column label="状态" prop="status" width="100">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-tag :type="{ 1: 'warning', 2: 'success', 3: 'danger' }[row.status]">
|
<el-tag :type="{ 1: 'warning', 2: 'success', 3: 'danger' }[row.status]">
|
||||||
|
@ -217,34 +151,19 @@ getList();
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="审批时间" prop="approvalTime" width="180">
|
|
||||||
<template #default="{ row }">
|
|
||||||
{{ row.approvalTime ? new Date(row.approvalTime).toLocaleString() : '-' }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="退货图片" width="140">
|
|
||||||
<template #default="{ row }">
|
|
||||||
<div v-if="row.returnImages" class="flex gap-2">
|
|
||||||
<el-image v-for="(img, index) in row.returnImages.split(',')" :key="index" :src="img"
|
|
||||||
:preview-src-list="row.returnImages.split(',')" :z-index="9999" :preview-teleported="true"
|
|
||||||
:hide-on-click-modal="true" fit="cover" class="rounded" width="40" height="40" />
|
|
||||||
</div>
|
|
||||||
<span v-else>-</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" width="120" fixed="right">
|
<el-table-column label="操作" width="120" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button type="primary" link :icon="useRenderIcon(View)" @click="showDetail(row)">
|
<el-button type="primary" link :icon="useRenderIcon(View)" @click="showDetail(row)">
|
||||||
详情
|
详情
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-popconfirm :title="`确认删除审批记录#${row.approvalId}?`"
|
<el-popconfirm :title="`确认删除审批记录#${row.approvalId}?`"
|
||||||
@confirm="() => deleteReturnApprovalApi([row.approvalId])">
|
@confirm="() => deleteReturnApprovalApi([row.approvalId])">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-button type="danger" link :icon="useRenderIcon(Delete)">
|
<el-button type="danger" link :icon="useRenderIcon(Delete)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-popconfirm> -->
|
</el-popconfirm>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -256,21 +175,22 @@ getList();
|
||||||
<!-- 详情弹窗 -->
|
<!-- 详情弹窗 -->
|
||||||
<el-dialog v-model="detailVisible" title="审批详情" width="50%">
|
<el-dialog v-model="detailVisible" title="审批详情" width="50%">
|
||||||
<el-descriptions :column="2" border>
|
<el-descriptions :column="2" border>
|
||||||
<el-descriptions-item label="退货说明">{{ currentDetail?.returnRemark || '无' }}</el-descriptions-item>
|
<el-descriptions-item label="退货图片">
|
||||||
<el-descriptions-item label="审核说明">{{ currentDetail?.auditRemark || '无' }}</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="退货图片" :span="2">
|
|
||||||
<div class="flex flex-wrap gap-2">
|
<div class="flex flex-wrap gap-2">
|
||||||
<el-image v-for="(img, index) in currentDetail?.returnImages?.split(',')" :key="index" :src="img"
|
<el-image v-for="(img, index) in currentDetail?.returnImages" :key="index" :src="img"
|
||||||
:preview-src-list="currentDetail?.returnImages?.split(',')" :initial-index="index" fit="cover"
|
:preview-src-list="currentDetail?.returnImages" :initial-index="index" fit="cover"
|
||||||
class="w-20 h-20 rounded" />
|
class="w-20 h-20 rounded" />
|
||||||
</div>
|
</div>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="审核图片" :span="2" v-if="currentDetail?.auditImages?.length">
|
<el-descriptions-item label="审核图片">
|
||||||
<div class="flex flex-wrap gap-2">
|
<div class="flex flex-wrap gap-2">
|
||||||
<el-image v-for="(img, index) in currentDetail?.auditImages?.split(',')" :key="index" :src="img"
|
<el-image v-for="(img, index) in currentDetail?.auditImages" :key="index" :src="img"
|
||||||
:preview-src-list="currentDetail?.auditImages?.split(',')" fit="cover" class="w-20 h-20 rounded" />
|
:preview-src-list="currentDetail?.auditImages" :initial-index="index" fit="cover"
|
||||||
|
class="w-20 h-20 rounded" />
|
||||||
</div>
|
</div>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="退货说明">{{ currentDetail?.returnRemark || '无' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="审核说明">{{ currentDetail?.auditRemark || '无' }}</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { ref, onMounted } from "vue";
|
||||||
import { PureTableBar } from "@/components/RePureTableBar";
|
import { PureTableBar } from "@/components/RePureTableBar";
|
||||||
import { onBeforeRouteUpdate, useRoute } from "vue-router";
|
import { onBeforeRouteUpdate, useRoute } from "vue-router";
|
||||||
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
||||||
import { getCabinetCellList, deleteCabinetCell, CabinetCellDTO, changeGoodsCellsStock, clearGoodsCells, CabinetCellQuery } from "@/api/cabinet/cabinet-cell";
|
import { getCabinetCellList, deleteCabinetCell, CabinetCellDTO, changeGoodsCellsStock, clearGoodsCells } from "@/api/cabinet/cabinet-cell";
|
||||||
import { allCabinets, SmartCabinetDTO } from "@/api/cabinet/smart-cabinet";
|
import { allCabinets, SmartCabinetDTO } from "@/api/cabinet/smart-cabinet";
|
||||||
import EditPen from "@iconify-icons/ep/edit-pen";
|
import EditPen from "@iconify-icons/ep/edit-pen";
|
||||||
import Delete from "@iconify-icons/ep/delete";
|
import Delete from "@iconify-icons/ep/delete";
|
||||||
|
@ -24,7 +24,7 @@ const router = useRouter();
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
|
|
||||||
const searchFormParams = ref<CabinetCellQuery>({
|
const searchFormParams = ref({
|
||||||
cabinetId: null,
|
cabinetId: null,
|
||||||
cellNo: null,
|
cellNo: null,
|
||||||
cellType: null
|
cellType: null
|
||||||
|
@ -37,7 +37,7 @@ const pagination = ref({
|
||||||
});
|
});
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const dataList = ref<CabinetCellDTO[]>([]);
|
const dataList = ref([]);
|
||||||
const multipleSelection = ref<number[]>([]);
|
const multipleSelection = ref<number[]>([]);
|
||||||
const currentRow = ref<CabinetCellDTO>();
|
const currentRow = ref<CabinetCellDTO>();
|
||||||
const configVisible = ref(false);
|
const configVisible = ref(false);
|
||||||
|
@ -275,22 +275,17 @@ const handleClearGoods = async (row: CabinetCellDTO) => {
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="价格" prop="price" width="80" />
|
<el-table-column label="价格" prop="price" width="80" />
|
||||||
<el-table-column label="库存" prop="stock" width="80" />
|
<el-table-column label="库存" prop="stock" width="80" />
|
||||||
<el-table-column label="单元格类型" prop="cellType" width="120">
|
<el-table-column label="单元格类型" prop="cellType">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
{{ switchCellType(row.cellType) }}
|
{{ switchCellType(row.cellType) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="购买次数" prop="orderCount" width="100" />
|
|
||||||
<el-table-column label="相关信息" width="150" fixed="right">
|
<el-table-column label="相关信息" width="150" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button type="success" link :icon="useRenderIcon('document')"
|
<el-button type="primary" link :icon="useRenderIcon('document')"
|
||||||
@click="router.push({ path: '/shop/order/index', query: { cellId: row.cellId } })">
|
@click="router.push({ path: '/shop/order/index', query: { cellId: row.cellId } })">
|
||||||
购买记录
|
购买记录
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="warning" link :icon="useRenderIcon('document')"
|
|
||||||
@click="router.push({ path: '/cabinet/operation/index', query: { cellId: row.cellId } })">
|
|
||||||
开启记录
|
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="150" fixed="right">
|
<el-table-column label="操作" width="150" fixed="right">
|
||||||
|
@ -320,7 +315,7 @@ const handleClearGoods = async (row: CabinetCellDTO) => {
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped>
|
||||||
.flex {
|
.flex {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,8 +94,10 @@ export function useRole() {
|
||||||
|
|
||||||
function onChange({ row, index }) {
|
function onChange({ row, index }) {
|
||||||
ElMessageBox.confirm(
|
ElMessageBox.confirm(
|
||||||
`确认要<strong>${row.status === 0 ? "停用" : "启用"
|
`确认要<strong>${
|
||||||
}</strong><strong style='color:var(--el-color-primary)'>${row.roleName
|
row.status === 0 ? "停用" : "启用"
|
||||||
|
}</strong><strong style='color:var(--el-color-primary)'>${
|
||||||
|
row.roleName
|
||||||
}</strong>吗?`,
|
}</strong>吗?`,
|
||||||
"系统提示",
|
"系统提示",
|
||||||
{
|
{
|
||||||
|
@ -174,7 +176,7 @@ export function useRole() {
|
||||||
if (menuTree.value?.length) {
|
if (menuTree.value?.length) {
|
||||||
return menuTree.value;
|
return menuTree.value;
|
||||||
}
|
}
|
||||||
const { data } = await getMenuListApi({ isButton: undefined });
|
const { data } = await getMenuListApi({ isButton: false });
|
||||||
console.log("menu data", data);
|
console.log("menu data", data);
|
||||||
menuTree.value = toTree(data, "id", "parentId");
|
menuTree.value = toTree(data, "id", "parentId");
|
||||||
return menuTree.value;
|
return menuTree.value;
|
||||||
|
|
Loading…
Reference in New Issue