|
@@ -222,7 +222,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
-import { ref, reactive, onMounted } from 'vue';
|
|
|
|
|
|
|
+import { ref, reactive, onMounted, nextTick } from 'vue';
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
|
|
import { listAudit, getAudit, passAudit, rejectAudit, getPendingCount } from '@/api/fulfiller/audit';
|
|
import { listAudit, getAudit, passAudit, rejectAudit, getPendingCount } from '@/api/fulfiller/audit';
|
|
|
import type { FlfAuditVO, FlfAuditQuery } from '@/api/fulfiller/audit/types';
|
|
import type { FlfAuditVO, FlfAuditQuery } from '@/api/fulfiller/audit/types';
|
|
@@ -252,9 +252,13 @@ const getList = async () => {
|
|
|
if (searchKey.value) {
|
|
if (searchKey.value) {
|
|
|
params.keyword = searchKey.value;
|
|
params.keyword = searchKey.value;
|
|
|
}
|
|
}
|
|
|
|
|
+ // 根据标签设置状态筛选
|
|
|
if (activeTab.value !== 'all') {
|
|
if (activeTab.value !== 'all') {
|
|
|
const statusMap: Record<string, number> = { pending: 0, approved: 1, rejected: 2 };
|
|
const statusMap: Record<string, number> = { pending: 0, approved: 1, rejected: 2 };
|
|
|
params.status = statusMap[activeTab.value];
|
|
params.status = statusMap[activeTab.value];
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 清除状态筛选
|
|
|
|
|
+ delete params.status;
|
|
|
}
|
|
}
|
|
|
const res = await listAudit(params);
|
|
const res = await listAudit(params);
|
|
|
tableData.value = res.rows;
|
|
tableData.value = res.rows;
|
|
@@ -295,9 +299,16 @@ const getStatusClass = (status: number | string) => {
|
|
|
return map[String(status)] || '';
|
|
return map[String(status)] || '';
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-const handleTabClick = () => {
|
|
|
|
|
|
|
+const handleTabClick = (tab: any) => {
|
|
|
queryParams.pageNum = 1;
|
|
queryParams.pageNum = 1;
|
|
|
- getList();
|
|
|
|
|
|
|
+ // 清除之前的状态筛选
|
|
|
|
|
+ if ('status' in queryParams) {
|
|
|
|
|
+ delete (queryParams as any).status;
|
|
|
|
|
+ }
|
|
|
|
|
+ // 使用 nextTick 确保 activeTab 已经更新
|
|
|
|
|
+ nextTick(() => {
|
|
|
|
|
+ getList();
|
|
|
|
|
+ });
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const handleSearch = () => {
|
|
const handleSearch = () => {
|