From 88fb30f552ae51cc85d969e3a5ce050628ce0b7c Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: Thu, 07 May 2026 14:30:07 +0800
Subject: [PATCH] 修改
---
src/views/work/qualityInfo/outsourcingCooperate/outsourcedProcessReview/index.vue | 48 +++++++++++++++++++++++++++++++++++++++---------
1 files changed, 39 insertions(+), 9 deletions(-)
diff --git a/src/views/work/qualityInfo/outsourcingCooperate/outsourcedProcessReview/index.vue b/src/views/work/qualityInfo/outsourcingCooperate/outsourcedProcessReview/index.vue
index e5b44a9..955bec7 100644
--- a/src/views/work/qualityInfo/outsourcingCooperate/outsourcedProcessReview/index.vue
+++ b/src/views/work/qualityInfo/outsourcingCooperate/outsourcedProcessReview/index.vue
@@ -21,9 +21,17 @@
</el-option>
</el-select>
</el-form-item>
+ <el-form-item label="年份:" style="margin-left: 20px">
+ <el-date-picker
+ v-model="data.queryParams.year"
+ type="year"
+ value-format="YYYY"
+ placeholder="请选择年份"
+ />
+ </el-form-item>
<el-form-item >
- <el-button v-if="isAdmin" type="primary" @click="getList">查询</el-button>
- <el-button v-if="isAdmin" type="primary" plain @click="reset">重置</el-button>
+ <el-button type="primary" @click="getList">查询</el-button>
+ <el-button type="primary" plain @click="reset">重置</el-button>
<!-- <el-button type="primary">导出</el-button>-->
</el-form-item>
</el-form>
@@ -31,6 +39,7 @@
<!-- 表格数据 -->
<el-table v-loading="loading" :data="dataList" :border="true">
<el-table-column type="index" label="序号"></el-table-column>
+ <el-table-column prop="applyDeptDate" align="center" label="申请日期"></el-table-column>
<el-table-column prop="reviewName" align="center" label="评审表名称">
<template #default="scope">
{{scope.row.reviewName}}
@@ -86,7 +95,8 @@
queryParams: {
pageNum: 1,
pageSize: 10,
- companyId: null
+ companyId: null,
+ year:''
},
total: 0,
dataList: [],
@@ -149,18 +159,27 @@
data.isAdmin = false
data.queryParams.companyId = userStore.companyId
}
+ await getNowYear()
await getList()
})
onUnmounted(()=>{
})
+const getNowYear = () =>{
+ data.queryParams.year = new Date().getFullYear().toString()
+}
const getList = async () => {
loading.value = true
const res = await getOutsourcedReviewList(data.queryParams)
if(res.code == 200){
- data.dataList = res.data.list || []
+ data.dataList = res.data.list.map(item => {
+ return {
+ ...item,
+ applyDeptDate: item.applyDeptDate.substring(0,10)
+ }
+ }) || []
data.total = res.data.total
}else{
ElMessage.warning(res.message)
@@ -269,12 +288,23 @@
/** 重置新增的表单以及其他数据 */
const reset= async()=> {
- data.queryParams = {
- pageNum: 1,
- pageSize: 10,
- companyId: null
+ if(data.isAdmin){
+ data.queryParams = {
+ pageNum: 1,
+ pageSize: 10,
+ companyId: null,
+ year: '',
+ }
+ await getCompanyList()
+ }else {
+ data.queryParams = {
+ pageNum: 1,
+ pageSize: 10,
+ companyId: data.queryParams.companyId,
+ year: '',
+ }
}
- await getCompanyList()
+ await getNowYear()
await getList()
}
const handleDelete = (val) => {
--
Gitblit v1.9.2