62 Commits

Author SHA1 Message Date
65a852d380 Merge pull request 'prod' (#1105) from prod into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/1105
2025-08-22 08:51:55 +00:00
dj
0efd2a7db2 feat(project-demand): 优化需求提交按钮显示逻辑
- 在 routerName 为 Requirement/add 且 formData.state 为 '3' 时显示提交按钮
- 在 routerName为 Requirement/edit 且 formData.state为 '3' 时显示重新提交按钮
- 为 formData 添加 state 字段初始化为 ''
2025-08-22 16:19:41 +08:00
dj
83c01575e6 style:优化日期选择器样式
- 调整年份选择器的宽度为 100%,以适应页面布局
2025-08-20 09:22:49 +08:00
dj
5808145c01 fix(views): 修改日期选择器的格式为单月显示
- 在 expense-management 模块下的 cost-detail 和 expend-detail 页面中
- 将日期选择器的 format 和 valueFormat 属性从 'MM' 修改为 'M'
- 这个修改使得日期选择器显示单个月份,而不是两位数的月份
2025-08-20 00:02:29 +08:00
dj
e1543e05b4 refactor(expense-management):恢复并优化日期选择功能
- 在成本详情、支出详情和分摊详情页面中重新启用年份和月份选择功能
-优化日期选择器的格式和价值格式
- 在搜索时去除月份参数的前置0,确保正确传递参数
- 调整搜索表单的样式,移除多余的样式属性
2025-08-20 00:00:44 +08:00
dj
d20b968307 feat(expense-management): 为成本明细页面添加年份和月份筛选功能
- 在成本明细、支出明细和分摊明细页面的搜索表单中添加了年份和月份选择器
- 优化了搜索表单的样式和布局- 注释掉了部分未使用的代码
2025-08-19 16:14:23 +08:00
dj
7735d20021 feat(expense-management): 添加项目名称搜索的本地存储功能
- 在成本明细、支出明细和共享明细页面中,为大师项目名称和子项目名称的搜索框添加本地存储功能
- 当用户输入搜索值时,从本地存储中获取已保存的项目名称选项
- 当用户清空搜索框时,将当前加载的项目名称选项保存到本地存储
- 优化了项目名称搜索的用户体验,减少了重复请求服务器的次数
2025-08-19 16:07:29 +08:00
831f017482 Merge pull request 'refactor(plan): 将年度计划相关文案统一修改为项目计划' (#1104) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/1104
2025-08-06 14:08:49 +00:00
dj
827978f7bd refactor(plan): 将年度计划相关文案统一修改为项目计划
- 修改了多个组件和 API 中的年度计划名称、提示文本等
- 统一使用项目计划替代年度计划,提高文案一致性
2025-08-06 22:06:17 +08:00
b16893955d Merge pull request 'master' (#1103) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/1103
2025-08-06 14:02:48 +00:00
dj
41830600bf feat(project-demand): 添加需求汇总行键值
在项目需求汇总视图中添加了行键值属性,以优化数据展示和操作。
2025-08-06 22:02:27 +08:00
76a5ebbeb9 Merge pull request 'prod' (#1102) from prod into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/1102
2025-08-04 02:03:30 +00:00
dj
a26088a756 feat(expense-management): 优化项目名称远程搜索功能
- 在项目需求概览页面添加主项目列表缓存到本地存储
-重构费用管理模块中项目名称远程搜索方法,提高代码复用性
- 优化主项目和子项目名称的加载和搜索逻辑
2025-08-04 10:02:50 +08:00
4229cb9d74 Merge pull request 'refactor(expense-management): 优化费用管理三个模块中搜索配置的选项处理' (#1101) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/1101
2025-08-03 11:41:45 +00:00
dj
a64715717b refactor(expense-management): 优化费用管理三个模块中搜索配置的选项处理
- 移除了 cost-detail、expend-detail 和 share-detail 组件中不必要的条件判断
-简化了选项对象的创建和添加到 Map 中的逻辑
- 提高了代码的可读性和维护性
2025-08-03 19:41:29 +08:00
f18ae8b1ee Merge pull request 'feat(project-demand): 实现主子项目名称模糊查询功能' (#1100) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/1100
2025-08-03 10:56:46 +00:00
dj
19c566cd0d feat(project-demand): 实现主子项目名称模糊查询功能
- 在项目需求汇总、成本明细、支出明细和共享明细页面添加主子项目名称模糊查询功能
- 新增相关 API 接口和方法以支持模糊查询
- 优化 fvSelect 组件以适配远程搜索功能
2025-08-03 18:55:53 +08:00
3c459f4be2 Merge pull request 'fix(filling): 修改用户管理归属部门显示' (#1099) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/1099
2025-08-01 15:14:10 +00:00
dj
1ad6e021a1 fix(filling): 修改用户管理归属部门显示 2025-08-01 22:50:59 +08:00
6cbc3f83e6 Merge pull request 'master' (#1098) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/1098
2025-07-27 12:40:09 +00:00
dj
9560a964e7 fix(filling): 修改下属公司归档状态 2025-07-27 20:39:21 +08:00
94bd9930b6 Merge pull request 'prod' (#1097) from prod into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/1097
2025-07-22 16:24:29 +00:00
f2e80e4874 Merge pull request 'fix : 需求上报部分字段默认null' (#1096) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/1096
2025-07-22 16:23:07 +00:00
dj
62e98b9e3f fix : 需求上报部分字段默认null 2025-07-23 00:21:28 +08:00
zhangkaihuai
a620b248f4 更新 .drone.yml 2025-07-22 07:52:07 +00:00
zhangkaihuai
e2e4d3226f 更新 .drone.yml 2025-07-22 07:45:47 +00:00
zhangkaihuai
af2788583f 更新 .drone.yml 2025-07-22 07:42:40 +00:00
zhangkaihuai
ba58089e94 更新 .drone.yml 2025-07-22 07:29:18 +00:00
zhangkaihuai
88dcbf3196 更新 .drone.yml 2025-07-22 07:26:24 +00:00
9092b1e960 Merge pull request 'master' (#1095) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/1095
2025-07-22 07:13:45 +00:00
dj
3ddd24cc70 fix : 修复支出明细-项目类型字段 2025-07-22 15:13:22 +08:00
1fb3345afe Merge pull request 'fix : 屏蔽账号编辑' (#1094) from prod into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/1094
2025-07-11 02:27:43 +00:00
dj
d1fe0faad1 fix : 屏蔽账号编辑 2025-07-11 10:24:32 +08:00
64d10a711d Merge pull request 'fix : 修复角色修改权限' (#1093) from prod into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/1093
2025-07-11 02:19:47 +00:00
dj
1d5e8a23ed fix : 修复角色修改权限 2025-07-11 10:12:48 +08:00
2973bbe6a7 Merge pull request 'prod' (#1092) from prod into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/1092
2025-07-10 03:34:00 +00:00
zhangkaihuai
8974282b44 更新 docker.sh 2025-07-10 03:26:55 +00:00
zhangkaihuai
81705482a8 更新 docker.sh 2025-07-10 03:22:00 +00:00
9cc8d337be Merge pull request 'fix : 修复实施图片' (#1091) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/1091
2025-07-09 14:59:44 +00:00
973dc0f2e4 fix : 修复实施图片 2025-07-09 22:56:09 +08:00
db696ca389 Merge pull request 'feat(components): 调整分页组件默认页码和每页条数' (#1090) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/1090
2025-07-03 15:30:50 +00:00
dj
64e2ff0647 feat(components): 调整分页组件默认页码和每页条数
- 将 fvPagination 组件的默认每页条数从 10 调整为 20
- 在 pageSizes 数组中添加 100 选项
- 更新 fvTable 组件中的默认每页条数和 pageSizes 配置
- 修改首页专项资金项目和研发投入资金的相关文案
2025-07-03 23:30:22 +08:00
53b0e4b240 Merge pull request 'master' (#1089) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/1089
2025-07-03 15:08:34 +00:00
dj
17010a15a3 fix : 修复首页数量 2025-07-03 23:08:16 +08:00
f74743c00f Merge pull request 'fix : 修复首页数量' (#1088) from prod into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/1088
2025-07-03 15:01:37 +00:00
dj
e14b6d676c fix : 修复首页数量 2025-07-03 18:41:57 +08:00
3ecea87de8 Merge pull request 'prod' (#1087) from prod into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/1087
2025-06-25 10:05:41 +00:00
dj
cb290acf09 test : ci/cd 2025-06-25 17:52:27 +08:00
f6cabee345 Merge pull request 'feat(upload): 优化文件上传组件逻辑' (#1086) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/1086
2025-06-25 09:41:38 +00:00
dj
8b03d62a75 feat(upload): 优化文件上传组件逻辑
- 在删除文件时,将删除的文件信息存储到本地存储中
- 在选择文件时,检查本地存储中是否有删除的文件信息,并从选择的文件中移除
- 优化了文件上传流程,提高了用户体验
2025-06-25 17:41:15 +08:00
1674d1acd0 Merge pull request 'fix(ProjectAttachment): 优化附件删除逻辑' (#1085) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/1085
2025-06-25 07:38:49 +00:00
dj
41a455338f fix(ProjectAttachment): 优化附件删除逻辑
- 在删除其他附件时,同时从 allFiles 中移除对应文件
- 移除删除附件后不必要的重新获取附件列表操作
2025-06-25 15:38:22 +08:00
5b67f97021 Merge pull request 'master' (#1084) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/1084
2025-06-20 01:57:33 +00:00
dj
a451f7481e style(fvTable): 移除表格单元格悬停时的宽度限制
- 注释掉 .fv-table :deep(.el-tooltip) 中的 width: 100% !important 样式
-此修改解决了单元格内容过长时导致的表格布局问题
2025-06-20 09:57:06 +08:00
2400660b1f Merge pull request 'prod' (#1083) from prod into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/1083
2025-06-14 16:37:37 +00:00
dj
26e0009ebd test : ci/cd 2025-06-15 00:36:56 +08:00
dj
34b0b88f07 test : ci/cd 2025-06-15 00:31:01 +08:00
dj
37a3cd75a2 test : ci/cd 2025-06-15 00:25:25 +08:00
dj
81d4002034 test : ci/cd 2025-06-15 00:10:47 +08:00
dj
5c000cdba3 test : ci/cd 2025-06-15 00:06:42 +08:00
zhangkaihuai
5dcdbe9ae1 Merge pull request 'zhangkaihuai-patch-1' (#1082) from zhangkaihuai-patch-1 into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/1082
2025-06-14 15:25:46 +00:00
zhangkaihuai
bf2f28960f Merge pull request '更新 .drone.yml' (#1081) from zhangkaihuai-patch-1 into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/1081
2025-06-14 14:56:58 +00:00
338 changed files with 62433 additions and 61994 deletions

View File

@@ -29,8 +29,9 @@ steps:
- npm config set registry https://registry.npmmirror.com
- set NODE_OPTIONS=--openssl-legacy-provider
- npm install --legacy-peer-deps
- npm install patch-package
- npx patch-package
- npm install codemirror
# - npm install patch-package
# - npx patch-package
# - npm info unplugin-icons
- npm list package-manager-detector
# - npm install unplugin-icons@latest @antfu/install-pkg@latest package-manager-detector@latest

View File

@@ -8,6 +8,7 @@ app_version=$DRONE_COMMIT
echo ${app_version}
# 打包编译docker镜像
echo '----build image start----'
echo ${group_name}/${app_name}
docker build -t ${group_name}/${app_name} .
echo '----build image success----'
docker tag ${group_name}/${app_name} $REGISTRY/$REGISTRY_NAMESPACE/${app_name}:${app_version}

View File

@@ -1,10 +1,11 @@
{
"name": "mosr-web",
"version": "0.0.0",
"type": "module",
"private": true,
"scripts": {
"dev": "vite",
"build": "vite build",
"build": "vite build --config vite.config.mjs",
"preview": "vite preview"
},
"overrides": {

View File

@@ -71,7 +71,7 @@ export const uploadCollectAttachment= (data) => {
data: data
});
};
// 年度计划
// 项目计划
export const addPlan= (data) => {
return request({
url: '/workflow/annual/plan',
@@ -107,10 +107,72 @@ export const approvePlan= (data) => {
};
export const getProjectOption = () => {
export const getProjectOption = (projectName) => {
return request({
url: '/workflow/mosr/requirement/master',
method: "get"
method: "get",
params:{
projectName:projectName
}
});
};
export const getMasterProjectNameOption = (masterProjectName) => {
return request({
url: '/workflow/mosr/payment/master/option',
method: "get",
params:{
masterProjectName:masterProjectName
}
});
};
export const getSubprojectNameOption = (subProjectName) => {
return request({
url: '/workflow/mosr/payment/sub/option',
method: "get",
params:{
subProjectName:subProjectName
}
});
};
export const getExpenseMasterProjectNameOption = (masterProjectName) => {
return request({
url: '/workflow/mosr/rd/expense/master/option',
method: "get",
params:{
masterProjectName:masterProjectName
}
});
};
export const getExpenseSubprojectNameOption = (subProjectName) => {
return request({
url: '/workflow/mosr/rd/expense/sub/option',
method: "get",
params:{
subProjectName:subProjectName
}
});
};
export const getCostMasterProjectNameOption = (masterProjectName) => {
return request({
url: '/workflow/mosr/cost/share/master/option',
method: "get",
params:{
masterProjectName:masterProjectName
}
});
};
export const getCostSubprojectNameOption = (subProjectName) => {
return request({
url: '/workflow/mosr/cost/share/sub/option',
method: "get",
params:{
subProjectName:subProjectName
}
});
};

View File

@@ -13,6 +13,9 @@ a {
html, body, #app, .el-container, .el-aside, .el-main {
height: 100%;
}
.el-date-editor--year{
width: 100%!important;
}
.el-breadcrumb__item {
line-height: 65px;

View File

@@ -426,6 +426,7 @@ const handleDelete = (row, type) => {
allFileList.value.splice(allFileList.value.findIndex((item) => item.fileId === row.fileId), 1);
isHaveOneFile.value = !(allFileList.value && allFileList.value?.length == 0);
console.log('allFileList.value',allFileList.value)
localStorage.setItem('deleteFileRow', JSON.stringify(row))
if (localStorage.getItem('collectData')) {
let collectData = JSON.parse(localStorage.getItem('collectData'))
collectData.fileList = allFileList.value
@@ -462,6 +463,7 @@ const getOtherFile = (val) => {
} else {
allFileList.value = _otherFileListValue.value
}
isHaveOneFile.value = true
emit('getOtherFile', val)
}

View File

@@ -173,7 +173,8 @@ const handleDownload = (row) => {
})
}
const deleteSingleFile = (row) => {
console.log("🚀 ~ file: ", row)
console.log("🚀 ~ file: ", row,otherAttachmentList.value)
console.log("🚀 row.newFile ", row.newFile)
deleteFile(row.fileId).then(res => {
ElNotification({
title: '提示',
@@ -183,13 +184,14 @@ const deleteSingleFile = (row) => {
if (res.code === 1000) {
if (row.newFile) {
const finalList = getLocalList().filter(item => item.fileId !== row.fileId);
otherAttachmentList.value.splice(otherAttachmentList.value.findIndex((item) => item.fileId === row.fileId), 1);
localStorage.setItem(`implementAllFileList-${route.query.projectId}`, JSON.stringify(finalList))
} else {
otherAttachmentList.value.splice(otherAttachmentList.value.findIndex((item) => item.fileId === row.fileId), 1);
allFiles.value.splice(allFiles.value.findIndex((item) => item.fileId === row.fileId), 1);
}
getAttachmentList()
activeName.value = 'all'
// getAttachmentList()
}
});
}

View File

@@ -188,8 +188,8 @@
@cancelOrClear="carbonCopyUserPickerOk"/>
<div class="oper-page-btn" v-perm="['annual:plan:approve']" v-if="data.state==='4'">
<el-button type="danger" @click="handleRejectPlan">驳回年度计划</el-button>
<el-button color="#DED0B2" @click="handleAgreePlan">通过年度计划</el-button>
<el-button type="danger" @click="handleRejectPlan">驳回项目计划</el-button>
<el-button color="#DED0B2" @click="handleAgreePlan">通过项目计划</el-button>
</div>
</div>
</template>

View File

@@ -10,11 +10,11 @@
:show-file-list="showFileList"
:auto-upload="false"
:before-upload="beforeUpload"
:on-success="handleUploadSuccess"
:on-error="uploadError"
:before-remove="beforeRemove"
:on-remove="handleRemove"
>
<!-- :on-success="handleUploadSuccess"-->
<el-button color="#DED0B2" :loading="loading" :disabled="disabled">上传文件</el-button>
</el-upload>
</template>
@@ -61,7 +61,7 @@ const props = defineProps({
})
const uploadRef = ref(null); // el-upload 的 ref
const uploadPromises = ref([]); // 跟踪每个文件的上传状态
const emit = defineEmits(["input", "beforeUpload","getFile", "delete"])
const emit = defineEmits(["input", "beforeUpload", "getFile", "delete"])
const fileList = ref([])
const _value = computed({
get() {
@@ -87,14 +87,29 @@ const handleRemove = (file) => {
// 文件选择变化时触发
const handleChange = (file, files) => {
console.log(file, files,'files')
const deleteFileRow = JSON.parse(localStorage.getItem('deleteFileRow'));
console.log("🚀 ~ file:deleteFileRow ", deleteFileRow, uploadFile.value)
let deleteIndex = null
if (deleteFileRow) {
deleteIndex = uploadFile.value.findIndex((item) => item.name === deleteFileRow.originalFileName && item.size === deleteFileRow.size)
console.log("🚀 ~ file:deleteIndex ", deleteIndex)
if (deleteIndex != -1) {
uploadFile.value.splice(deleteIndex, 1);
}
}
console.log(file, files, 'files')
uploadIndex.value++
uploadFile.value.push(file)
console.log("🚀 ~ file:uploadFile.value ", uploadFile.value)
localStorage.removeItem('deleteFileRow')
};
watch(() => uploadIndex.value, (newVal) => {
console.log('newVal',newVal)
console.log('newVal', newVal)
startUpload(uploadFile.value); // 自动触发上传
},{
}, {
deep: true
})
// 自定义上传逻辑
@@ -117,7 +132,7 @@ const customUpload = async (options) => {
// 触发所有文件上传
const startUpload = (files) => {
uploadLoading.value= ElLoading.service({
uploadLoading.value = ElLoading.service({
fullscreen: true,
text: '文件上传中...',
})
@@ -144,9 +159,10 @@ const startUpload = (files) => {
})
files = []; // 清空文件列表
uploadRef.value.clearFiles(); // 清空上传组件
uploadFile.value = [] // 清空文件列表
nextTick(() => {
uploadLoading.value.close()
uploadLoading.value=null
uploadLoading.value = null
})
})
@@ -157,6 +173,7 @@ const beforeUpload = () => {
return true
}
const handleUploadSuccess = (res) => {
ElNotification({
title: '提示',
message: res.code === 1000 ? '上传成功' : '上传失败',
@@ -166,7 +183,7 @@ const handleUploadSuccess = (res) => {
showTable.value = true
let data = res.data
fileList.value.push(data)
emit("getFile", res.data)
// emit("getFile", res.data)
}
const uploadError = () => {
loading.value = false

View File

@@ -30,12 +30,12 @@ const props = defineProps({
},
pageSize: {
type: Number,
default: 10,
default: 20,
},
pageSizes: {
type: Object,
default(rawProps) {
return [10, 15, 20, 30, 50]
return [10, 15, 20, 30, 50,100]
},
},
small: {
@@ -58,7 +58,7 @@ const total = ref(0)
//对应页数
const currentPage = ref(1)
//每页多少条
const pageSize = ref(10)
const pageSize = ref(20)
//默认每页多少条的数组
const pageSizes = ref([])
//是否使用小型分页样式

View File

@@ -1,6 +1,7 @@
<template>
<div class="fv-table-container">
<el-button v-if="tableConfig.export && tableConfig.export.open&&changeExportPosition" @click="exportTable" color="#DED0B2"
<el-button v-if="tableConfig.export && tableConfig.export.open&&changeExportPosition" @click="exportTable"
color="#DED0B2"
style="float: left;margin-right: 10px">导出
</el-button>
<!-- 表格头部按钮 -->
@@ -18,7 +19,8 @@
</el-button>
</div>
</div>
<el-button v-if="tableConfig.export && tableConfig.export.open&&!changeExportPosition" @click="exportTable" color="#DED0B2"
<el-button v-if="tableConfig.export && tableConfig.export.open&&!changeExportPosition" @click="exportTable"
color="#DED0B2"
style="margin-bottom: 10px">导出
</el-button>
<!-- 列显示配置 -->
@@ -93,7 +95,7 @@
v-if="pagination"
:current-page="localData.query.pageNum"
:page-size="localData.query.pageSize"
:page-sizes="[10, 20, 30, 40,50]"
:page-sizes="[10, 20, 30, 40,50,100]"
:total="localData.total"
@changeSize="handleSizeChange"
@goPage="handleCurrentChange"
@@ -157,7 +159,7 @@ const exportTable = () => {
const localData = reactive({
list: [], // 表格数据
query: {
pageSize: 10,
pageSize: 20,
pageNum: 1
},
total: 0,
@@ -227,7 +229,7 @@ const getList = async () => {
if (api) {
localData.loading = true
try {
const {code, data, msg} = await requestList(api, queryParmas).then(res=>{
const {code, data, msg} = await requestList(api, queryParmas).then(res => {
// console.log(res)
return res
})
@@ -250,8 +252,8 @@ const getList = async () => {
localData.loading = false
}
} catch (error) {
console.log("error",error)
if (!error){
console.log("error", error)
if (!error) {
return
}
ElNotification({
@@ -347,7 +349,7 @@ onMounted(() => {
.fv-table {
:deep(.el-tooltip) {
width: 100% !important;
//width: 100% !important;
}
}
</style>

View File

@@ -1,9 +1,10 @@
<template>
<fvSearchForm :searchConfig="searchConfig" @search="search" style="margin-left: 15px"></fvSearchForm>
<div style="float: left">
<import-cost-excel @success="importTheExpenseLedger"/>
<import-cost-excel @success="importTheExpenseLedger"/>
</div>
<fvTable ref="tableIns" class="tablte" :tableConfig="tableConfig" @headBtnClick="headBtnClick" :changeExportPosition="true">
<fvTable ref="tableIns" class="tablte" :tableConfig="tableConfig" @headBtnClick="headBtnClick"
:changeExportPosition="true">
<template #empty>
<el-empty description="暂无数据"/>
</template>
@@ -15,31 +16,81 @@ import {reactive, ref} from "vue";
import {useRoute, useRouter} from "vue-router";
import {costTemplateDownload, exportExcel, ledgerTemplateDownload} from "../../../api/project-manage";
import ImportCostExcel from "@/components/ImportCostExcel.vue";
import fvSelect from "@/fvcomponents/fvSelect/index.vue";
import {
getExpenseMasterProjectNameOption, getExpenseSubprojectNameOption,
getMasterProjectNameOption,
getSubprojectNameOption
} from "@/api/project-demand/summary/index.js";
const router = useRouter()
const route = useRoute()
const searchConfig = ref([
{
label: '年份',
prop: 'rdYear',
component: 'el-date-picker',
props: {
placeholder: '请选择年份',
clearable: true,
type: 'year',
format: 'YYYY',
valueFormat: 'YYYY',
},
colProps: {}
},
{
label: '月份',
prop: 'rdMonth',
component: 'el-date-picker',
props: {
placeholder: '请选择月份',
clearable: true,
type: 'month',
format: 'M',
valueFormat: 'M',
},
colProps: {}
},
{
label: '主项目',
prop: 'masterProjectName',
component: 'el-input',
component: shallowRef(fvSelect),
props: {
placeholder: '请输入主项目查询',
placeholder: '请输入主项目',
clearable: true,
filterable: true,
checkStrictly: true
}
options: [],
remote: true,
remoteMethod: async (val) => {
console.log('val', val)
searchConfig.value.find(item => item.prop == 'masterProjectName').props.options = JSON.parse(localStorage.getItem("masterProjectNameOption"))
if (val) {
await getMasterProjectName(val)
}
}
},
},
{
label: '子项目',
prop: 'subProjectName',
component: 'el-input',
component: shallowRef(fvSelect),
props: {
placeholder: '请输入子项目查询',
placeholder: '请输入子项目',
clearable: true,
filterable: true,
checkStrictly: true
}
options: [],
remote: true,
remoteMethod: async (val) => {
searchConfig.value.find(item => item.prop == 'subProjectName').props.options = JSON.parse(localStorage.getItem("subprojectNameOption"))
if (val) {
await getSubprojectName(val)
}
}
},
},
{
label: '会计凭证记载金额(元)',
@@ -76,19 +127,7 @@ const searchConfig = ref([
// },
// colProps: {}
// },
// {
// label: '归档时间',
// prop: 'filingTime',
// component: 'el-date-picker',
// props: {
// placeholder: '请选择归档时间',
// clearable: true,
// type:'date',
// format: 'YYYY-MM-DD HH:mm',
// valueFormat:'YYYY-MM-DD HH:mm',
// },
// colProps: {}
// },
])
const tableIns = ref()
const tableConfig = reactive({
@@ -197,13 +236,63 @@ const tableConfig = reactive({
{name: '模板下载', key: 'down', color: '#DED0B2'},
// {name: '导入', key: 'import', color: '#DED0B2'}
],
export:{
open :true,
fileName:`研发费用明细表`
export: {
open: true,
fileName: `研发费用明细表`
}
})
const getMasterProjectName = async (val) => {
const res = await getExpenseMasterProjectNameOption(val)
if (res.code == 1000) {
let optionObj = {}
let optionsMap = new Map();
res.data.forEach(item => {
optionObj = {
value: item.label,
label: item.label
}
optionsMap.set(optionObj.value, optionObj);
})
if (!val) {
localStorage.setItem('masterProjectNameOption', JSON.stringify(Array.from(optionsMap.values())))
}
// 将 Map 转换为数组
searchConfig.value.find(item => item.prop == 'masterProjectName').props.options = Array.from(optionsMap.values())
}
}
const getSubprojectName = async (val) => {
const res = await getExpenseSubprojectNameOption(val)
if (res.code == 1000) {
let optionObj = {}
let optionsMap = new Map();
res.data.forEach(item => {
optionObj = {
value: item.label,
label: item.label
}
optionsMap.set(optionObj.value, optionObj);
})
if (!val) {
localStorage.setItem('subprojectNameOption', JSON.stringify(Array.from(optionsMap.values())))
}
// 将 Map 转换为数组
searchConfig.value.find(item => item.prop == 'subProjectName').props.options = Array.from(optionsMap.values())
}
}
getMasterProjectName()
getSubprojectName()
const search = (val) => {
tableConfig.params = {...val}
// 去除 rdMonth 前置0
let param={
...val
}
if (param.rdMonth) {
param.rdMonth = parseInt(param.rdMonth, 10).toString();
}
tableConfig.params = {...param}
tableIns.value.refresh()
}
@@ -226,23 +315,23 @@ const exportTable = () => {
exportExcel($table, (5 + (Object.keys(tableData.value[0]).length - 5) * 5), "四川省国有资产经营投资管理有限责任公司科技创新项目人工成本分摊明细表", 2)
}
//导入模板下载
const handleImportTemplateDownload=()=>{
const handleImportTemplateDownload = () => {
costTemplateDownload().then(res => {
let link = document.createElement('a')
try {
let blob = new Blob([res.data],{type: 'application/vnd.ms-excel'});
let blob = new Blob([res.data], {type: 'application/vnd.ms-excel'});
let _fileName = "研发费用明细表模板.xlsx"//文件名,中文无法解析的时候会显示 _(下划线),生产环境获取不到
link.style.display='none';
link.style.display = 'none';
// 兼容不同浏览器的URL对象
const url = window.URL || window.webkitURL || window.moxURL;
link.href=url.createObjectURL(blob);
link.setAttribute('download', _fileName.substring(_fileName.lastIndexOf('_')+1))
link.href = url.createObjectURL(blob);
link.setAttribute('download', _fileName.substring(_fileName.lastIndexOf('_') + 1))
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
url.revokeObjectURL(link.href);//销毁url对象
}catch (e) {
console.log('下载的文件出错',e)
} catch (e) {
console.log('下载的文件出错', e)
}
})
}
@@ -251,9 +340,10 @@ const importTheExpenseLedger = () => {
}
</script>
<style scoped lang="scss">
:deep(.el-form-item__label-wrap){
margin-left: 0!important;
:deep(.el-form-item__label-wrap) {
margin-left: 0 !important;
}
:deep(.el-table__header) {
.is-leaf:first-child {
.cell {
@@ -269,7 +359,8 @@ const importTheExpenseLedger = () => {
}
}
}
:deep(.el-date-editor--month){
:deep(.el-date-editor--month) {
width: 100%;
}
</style>

View File

@@ -11,32 +11,78 @@
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import {toThousands} from '@/utils/changePrice.js'
import { getSubCompOpt } from '@/api/user/user.js';
import {
getMasterProjectNameOption,
getRequirementName,
getSubprojectNameOption
} from "@/api/project-demand/summary/index.js";
const router = useRouter()
const route = useRoute()
const searchConfig = ref(
[
{
label: '年份',
prop: 'paymentYear',
component: 'el-date-picker',
props: {
placeholder: '请选择年份',
clearable: true,
type: 'year',
format: 'YYYY',
valueFormat: 'YYYY',
},
colProps: {}
},
{
label: '月份',
prop: 'paymentMonth',
component: 'el-date-picker',
props: {
placeholder: '请选择月份',
clearable: true,
type: 'month',
format: 'M',
valueFormat: 'M',
},
colProps: {}
},
{
label: '主项目',
prop: 'masterProjectName',
component: 'el-input',
component: shallowRef(fvSelect),
props: {
placeholder: '请输入主项目查询',
placeholder: '请输入主项目',
clearable: true,
filterable: true,
checkStrictly: true
}
options: [],
remote: true,
remoteMethod:async (val)=>{
console.log('val',val)
searchConfig.value.find(item => item.prop == 'masterProjectName').props.options= JSON.parse(localStorage.getItem("masterProjectNameOption"))
if(val){
await getMasterProjectName( val)
}
}
},
},
{
label: '子项目',
prop: 'subProjectName',
component: 'el-input',
component: shallowRef(fvSelect),
props: {
placeholder: '请输入子项目查询',
placeholder: '请输入子项目',
clearable: true,
filterable: true,
checkStrictly: true
}
options: [],
remote: true,
remoteMethod:async (val)=>{
searchConfig.value.find(item => item.prop == 'subProjectName').props.options= JSON.parse(localStorage.getItem("subprojectNameOption"))
if(val){
await getSubprojectName(val)
}
}
},
},
{
label: '项目类型',
@@ -108,13 +154,13 @@ const tableConfig = reactive({
align: 'center',
width: 120,
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.projectType&&row.projectType !== null&&row.projectType!==undefined) {
return (<Tag dictType={'project_type'} value={row.projectType}/>)
} else {
return '--'
}
}
// currentRender: ({row, index}) => {
// if (row.projectType&&row.projectType !== null&&row.projectType!==undefined) {
// return (<Tag dictType={'project_type'} value={row.projectType}/>)
// } else {
// return '--'
// }
// }
},
{
prop: 'rdType',
@@ -198,8 +244,55 @@ const tableConfig = reactive({
fileName:`科研项日现金支出明细表`
}
})
const getMasterProjectName =async (val) => {
const res=await getMasterProjectNameOption(val)
if(res.code==1000){
let optionObj={}
let optionsMap = new Map();
res.data.forEach(item=>{
optionObj={
value:item.label,
label:item.label
}
optionsMap.set(optionObj.value, optionObj);
})
if(!val){
localStorage.setItem('masterProjectNameOption', JSON.stringify(Array.from(optionsMap.values())))
}
// 将 Map 转换为数组
searchConfig.value.find(item => item.prop == 'masterProjectName').props.options = Array.from(optionsMap.values())
}
}
const getSubprojectName =async (val) => {
const res=await getSubprojectNameOption(val)
if(res.code==1000){
let optionObj={}
let optionsMap = new Map();
res.data.forEach(item=>{
optionObj={
value:item.label,
label:item.label
}
optionsMap.set(optionObj.value, optionObj);
})
if(!val){
localStorage.setItem('subprojectNameOption', JSON.stringify(Array.from(optionsMap.values())))
}
// 将 Map 转换为数组
searchConfig.value.find(item => item.prop == 'subProjectName').props.options = Array.from(optionsMap.values())
}
}
getMasterProjectName()
getSubprojectName()
const search = (val) => {
tableConfig.params = {...val}
let param={
...val
}
if (param.paymentMonth) {
param.paymentMonth = parseInt(param.paymentMonth, 10).toString();
}
tableConfig.params = {...param}
tableIns.value.refresh()
}
const init = async () => {

View File

@@ -1,8 +1,8 @@
<template>
<fvSearchForm :searchConfig="searchConfig" @search="search" style="margin-left: 16px"></fvSearchForm>
<fvSearchForm :searchConfig="searchConfig" @search="search" ></fvSearchForm>
<!-- <el-button color="#DED0B2" style="float: left;margin: 0 10px 10px 0" @click="exportTable">导出</el-button>-->
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick" style="margin-top: 15px" @selectionChange="selectionChange">
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick" @selectionChange="selectionChange">
<template #empty>
<el-empty description="暂无数据"/>
</template>
@@ -16,19 +16,80 @@ import { getSubCompOpt } from '@/api/user/user.js';
import {reactive, ref} from "vue";
import {shareDetailExport, shareExportExcel} from "@/api/expense-manage";
import {ElMessage} from "element-plus";
import {
getCostMasterProjectNameOption, getCostSubprojectNameOption,
getMasterProjectNameOption,
getSubprojectNameOption
} from "@/api/project-demand/summary/index.js";
const router = useRouter()
const route = useRoute()
const searchConfig = reactive([
const searchConfig = ref([
{
label: '年份',
prop: 'paymentYear',
component: 'el-date-picker',
props: {
placeholder: '请选择年份',
clearable: true,
type: 'year',
format: 'YYYY',
valueFormat: 'YYYY',
},
colProps: {}
},
{
label: '月份',
prop: 'paymentMonth',
component: 'el-date-picker',
props: {
placeholder: '请选择月份',
clearable: true,
type: 'month',
format: 'M',
valueFormat: 'M',
},
colProps: {}
},
{
label: '主项目',
prop: 'masterProjectName',
component: shallowRef(fvSelect),
props: {
placeholder: '请输入主项目',
clearable: true,
filterable: true,
options: [],
remote: true,
remoteMethod:async (val)=>{
console.log('val',val)
searchConfig.value.find(item => item.prop == 'masterProjectName').props.options= JSON.parse(localStorage.getItem("masterProjectNameOption"))
if(val){
await getMasterProjectName( val)
}
}
},
},
{
label: '子项目',
prop: 'subProjectName',
component: 'el-input',
component: shallowRef(fvSelect),
props: {
placeholder: '请输入子项目查询',
placeholder: '请输入子项目',
clearable: true,
filterable: true,
checkStrictly: true
}
options: [],
remote: true,
remoteMethod:async (val)=>{
searchConfig.value.find(item => item.prop == 'subProjectName').props.options= JSON.parse(localStorage.getItem("subprojectNameOption"))
if(val){
await getSubprojectName(val)
}
}
},
},
// {
// label: '支付月份',
@@ -146,10 +207,55 @@ const tableConfig = reactive({
open :false,
}
})
const getMasterProjectName =async (val) => {
const res=await getCostMasterProjectNameOption(val)
if(res.code==1000){
let optionObj={}
let optionsMap = new Map();
res.data.forEach(item=>{
optionObj={
value:item.label,
label:item.label
}
optionsMap.set(optionObj.value, optionObj);
})
if(!val){
localStorage.setItem('masterProjectNameOption', JSON.stringify(Array.from(optionsMap.values())))
}
// 将 Map 转换为数组
searchConfig.value.find(item => item.prop == 'masterProjectName').props.options = Array.from(optionsMap.values())
}
}
const getSubprojectName =async (val) => {
const res=await getCostSubprojectNameOption(val)
if(res.code==1000){
let optionObj={}
let optionsMap = new Map();
res.data.forEach(item=>{
optionObj={
value:item.label,
label:item.label
}
optionsMap.set(optionObj.value, optionObj);
})
if(!val){
localStorage.setItem('subprojectNameOption', JSON.stringify(Array.from(optionsMap.values())))
}
// 将 Map 转换为数组
searchConfig.value.find(item => item.prop == 'subProjectName').props.options = Array.from(optionsMap.values())
}
}
getMasterProjectName()
getSubprojectName()
const search = (val) => {
tableConfig.params = {...val}
let param={
...val
}
if (param.paymentMonth) {
param.paymentMonth = parseInt(param.paymentMonth, 10).toString();
}
tableConfig.params = {...param}
tableIns.value.refresh()
}
const headBtnClick = (key) => {

View File

@@ -26,13 +26,13 @@
<div style="width: 31px"></div>
</div>
</template>
<el-tab-pane :label="'待办('+(todoList?.length||0) +''" name="first">
<el-tab-pane :label="'待办('+(todoNum||0) +''" name="first">
<div class="todo-top">
<div class="bell">
<el-icon size="16" color="#F55815">
<BellFilled/>
</el-icon>
<span>您有{{ todoList?.length || 0 }}条待办需要处理</span>
<span>您有{{ todoNum || 0 }}条待办需要处理</span>
</div>
<div class="todo-more" @click="handleTodoList(1)">
<span>查看更多</span>
@@ -70,13 +70,13 @@
</div>
</div>
</el-tab-pane>
<el-tab-pane :label="'已办(' + (doneList?.length||0) + ''" name="second">
<el-tab-pane :label="'已办(' + (doneNum||0) + ''" name="second">
<div class="todo-top">
<div class="bell">
<el-icon size="16" color="#F55815">
<BellFilled/>
</el-icon>
<span>您有{{ todoList.length }}条待办需要处理</span>
<span>您有{{ todoNum }}条待办需要处理</span>
</div>
<div class="todo-more" @click="handleTodoList(2)">
<span>查看更多</span>
@@ -156,7 +156,7 @@
<div class="title-block">
<div class="title">
<div class="tag"></div>
<span>专项资金项目</span>
<span>资金类型</span>
</div>
<div class="more" @click="goToSpecialFund">
<span>更多</span>
@@ -170,7 +170,7 @@
<div id="fundPie" ref="fundPie"></div>
</div>
</div>
<div class="fund-pie">专项资金项目统计图</div>
<div class="fund-pie">资金类型统计图</div>
</div>
</div>
</el-col>
@@ -180,7 +180,7 @@
<div class="title-block">
<div class="title">
<div class="tag"></div>
<span>研发投入资金</span>
<span>研发投入</span>
</div>
<div class="more" @click="goToResearchFund">
<span>更多</span>
@@ -201,7 +201,7 @@
/>
</div>
<div v-if="moneyData&&moneyData.length==0" style="margin-top: 30px">
<el-empty image-size="135" description="暂无研发投入资金信息~"/>
<el-empty image-size="135" description="暂无研发投入信息~"/>
</div>
<div class="money-block" v-else>
<div class="money-container">
@@ -219,7 +219,7 @@
</div>
</div>
<div class="fund-pie" v-if="totalMoney" style="text-align: left;margin-left: 70px;margin-top: 10px">
研发投入资金统计图
研发投入统计图
</div>
</div>
</div>
@@ -359,6 +359,8 @@ const taskTabList = ref([
}
])
const todoList = ref([])
const doneNum = ref(0)
const todoNum = ref(0)
const noticeList = ref([])
const rulesList = ref([])
const helpDocList = ref([])
@@ -631,7 +633,7 @@ const getTodoList = () => {
getHomeTaskInfo().then(res => {
if (res.code === 1000) {
todoList.value = res.data.rows
// todoNum.value=res.data.total
todoNum.value = res.data.total > 99 ? '99+' : res.data.total
} else {
ElNotification({
title: '提示',
@@ -645,7 +647,7 @@ const getDoneList = () => {
getDoneTaskInfo().then(res => {
if (res.code === 1000) {
doneList.value = res.data.rows
// todoNum.value=res.data.total
doneNum.value = res.data.total > 99 ? '99+' : res.data.total
} else {
ElNotification({
title: '提示',

View File

@@ -3,9 +3,9 @@
<el-form :model="formData" style="margin-top: 18px">
<el-row>
<el-col :span="6">
<el-form-item label="年度计划名称" prop="annualPlanName">
<el-form-item label="项目计划名称" prop="annualPlanName">
<div v-if="isEdit">
<el-input v-model="formData.annualPlanName" placeholder="请输入年度计划名称" clearable>
<el-input v-model="formData.annualPlanName" placeholder="请输入项目计划名称" clearable>
</el-input>
<el-button color="#DED0B2" style="margin-left: 10px" @click="editName">提交</el-button>
</div>
@@ -22,7 +22,7 @@
<div class="query-btn">
<el-button color="#DED0B2" style="float: right;margin: 0 10px 10px 0" @click="exportTable">导出</el-button>
<el-popover :visible="editVisible" placement="top" :width="160">
<p>点击编辑可以修改年度计划名称</p>
<p>点击编辑可以修改项目计划名称</p>
<div style="text-align: right; margin: 0">
<el-button size="small" color="#DED0B2" @click="editVisible = false">
确认
@@ -37,7 +37,7 @@
</div>
<el-table ref="table" :data="formData.projectList" border :header-cell-style="{background:'#f5f7fa'}">
<el-table-column label="四川省国有资产经营投资管理有限责任公司科技创新项目年度计划表" align="center">
<el-table-column label="四川省国有资产经营投资管理有限责任公司科技创新项目计划表" align="center">
<template #default="scope">
<el-table-column type="index" label="序号" align="center" width="60"/>
<el-table-column prop="projectName" label="项目名称" align="center" width="100"/>
@@ -193,7 +193,7 @@ const exportTable = () => {
if (!$table) {
$table = $e
}
exportExcel($table, (5 + (Object.keys(formData.value.projectList[0]).length - 5) * 5), "四川省国有资产经营投资管理有限责任公司科技创新项目年度计划表", 2)
exportExcel($table, (5 + (Object.keys(formData.value.projectList[0]).length - 5) * 5), "四川省国有资产经营投资管理有限责任公司科技创新项目计划表", 2)
}
const editName = () => {
let param = {

View File

@@ -1,6 +1,6 @@
<template>
<div >
<!-- <baseTitle title="年度计划" style="margin-left: -15px;margin-bottom: -2px"></baseTitle>-->
<!-- <baseTitle title="项目计划" style="margin-left: -15px;margin-bottom: -2px"></baseTitle>-->
<fvSearchForm :searchConfig="searchConfig" @search="search" style="margin-left: 16px;margin-bottom: -18px"></fvSearchForm>
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick"></fvTable>
</div>
@@ -15,11 +15,11 @@ const router = useRouter()
const route = useRoute()
const searchConfig = ref([
{
label: '年度计划名称',
label: '项目计划名称',
prop: 'annualPlanName',
component: 'el-input',
props: {
placeholder: '请输入年度计划名称',
placeholder: '请输入项目计划名称',
clearable: true
},
}
@@ -42,7 +42,7 @@ const tableConfig = reactive({
},
{
prop: 'annualPlanName',
label: '年度计划名称',
label: '项目计划名称',
align: 'center'
},
{

View File

@@ -121,8 +121,8 @@
</div>
<div style="width: 100%;height: 30px"></div>
<div class="oper-page-btn">
<el-button color="#DED0B2" v-if="routerName==='Requirement/add'" @click="handleSubmit(demandForm)">提交</el-button>
<el-button color="#DED0B2" v-else @click="handleResubmit(demandForm)">重新提交</el-button>
<el-button color="#DED0B2" v-if="routerName==='Requirement/add'&&formData.state=='3'" @click="handleSubmit(demandForm)">提交</el-button>
<el-button color="#DED0B2" v-else-if="routerName==='Requirement/edit'&&formData.state=='3'" @click="handleResubmit(demandForm)">重新提交</el-button>
<el-button @click="handleBack">返回</el-button>
</div>
<company-picker :multiple="true" ref="companyRef" title="请选择征集公司" @ok="sureSelectedCompany" @cancelOrClear="cancelSelectedCompany"
@@ -180,6 +180,7 @@ const formData = ref({
collectType: '科技创新与信息化系统建设',
deadline: '',
collectExplain: '',
state: '',
fileList: [],
isSpecialFund: false
})

View File

@@ -221,7 +221,7 @@
:style="{marginLeft:!formData.isSpecialFund?route.query.id?'-10px':'-10px':route.query.id?'0':'-40px'}">
<el-form-item label="主项目" prop="masterProjectId">
<el-select v-model="formData.masterProjectId" clearable placeholder="请选择主项目"
@change="changeCollectData">
@change="changeCollectData" remote filterable :remote-method="filterMasterProject">
<el-option
v-for="item in masterProjectList"
:key="item.value"
@@ -462,10 +462,10 @@ const showSingleTable = ref(false)
const otherFileList = ref([])
const singleList = ref([])
const formData = ref({
isWithinBudget: false,
isSpecialFund: false,
industryUniversityResearch: '1',
governmentDeclaration: '1',
isWithinBudget: null,
isSpecialFund: null,
industryUniversityResearch: null,
governmentDeclaration: null,
other: '无',
resultForm: []
})
@@ -567,6 +567,14 @@ const changeCollectData = () => {
localStorage.setItem('collectData', JSON.stringify(params))
}
}
const filterMasterProject= (val)=>{
masterProjectList.value= JSON.parse(localStorage.getItem("projectOption"))
if(val){
getProjectList(val)
}
}
const handleShowOptionalChargeLeadershipPicker = () => {
optionalChargeLeadershipPickerRef.value.showUserPicker()
}
@@ -584,13 +592,17 @@ const disabledDate = (time) => {
return time.getTime() < new Date(formData.value.startTime).getTime();
}
const getProjectList = () => {
getProjectOption().then(res => {
const getProjectList = (val) => {
getProjectOption(val).then(res => {
if (res.code === 1000) {
if(name.value === 'Summary/edit'){
masterProjectList.value = res.data.filter(item => item.value!=route.query.projectId)
}else{
masterProjectList.value = res.data
if(!val){
localStorage.setItem("projectOption", JSON.stringify(res.data))
}
}
}
})

View File

@@ -380,11 +380,12 @@ const tableConfig = reactive({
}
}
],
rowKey: 'projectId',
api: '/workflow/mosr/requirement/collect',
params: {},
btns: [
{name: '新增上报', key: 'add', color: '#DED0B2', auth: auths.report},
{name: '创建年度计划', key: 'export', color: '#DED0B2', auth: auths.planAdd},
{name: '创建项目计划', key: 'export', color: '#DED0B2', auth: auths.planAdd},
// {name: '经费预算生成', key: 'preMonty', auth: ''},
]
})

View File

@@ -12,7 +12,7 @@ import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import {toThousands} from '@/utils/changePrice.js'
import {switchAttachmentState} from "@/api/project-manage/attachment";
import {ElMessageBox, ElNotification} from "element-plus";
import { getSubCompOpt } from '@/api/user/user.js';
import {getSubCompOpt} from '@/api/user/user.js';
import {filterProjectName} from "@/api/project-manage";
import {filterRequirementName} from "@/api/project-demand";
@@ -57,16 +57,16 @@ const searchConfig = ref([
filterable: true,
options: [],
remote: true,
remoteMethod:async (val)=>{
if(val){
const res=await filterRequirementName(val)
if(res.code==1000){
let optionObj={}
let options=[]
res.data.forEach(item=>{
optionObj={
value:item,
label:item
remoteMethod: async (val) => {
if (val) {
const res = await filterRequirementName(val)
if (res.code == 1000) {
let optionObj = {}
let options = []
res.data.forEach(item => {
optionObj = {
value: item,
label: item
}
options.push(optionObj)
})
@@ -86,7 +86,7 @@ const searchConfig = ref([
data: [],
filterable: true,
checkStrictly: true,
remote:true
remote: true
}
},
{
@@ -99,16 +99,16 @@ const searchConfig = ref([
filterable: true,
options: [],
remote: true,
remoteMethod:async (val)=>{
if(val){
const res=await filterProjectName(val,'50')
if(res.code==1000){
let optionObj={}
let options=[]
res.data.forEach(item=>{
optionObj={
value:item,
label:item
remoteMethod: async (val) => {
if (val) {
const res = await filterProjectName(val, '50')
if (res.code == 1000) {
let optionObj = {}
let options = []
res.data.forEach(item => {
optionObj = {
value: item,
label: item
}
options.push(optionObj)
})
@@ -211,7 +211,7 @@ const tableConfig = reactive({
type: 'index',
label: '序号',
align: 'center',
width:85,
width: 85,
index: index => {
return (tableIns.value.getQuery().pageNum - 1) * tableIns.value.getQuery().pageSize + index + 1
}
@@ -284,7 +284,7 @@ const tableConfig = reactive({
label: '预估经费预算(元)',
align: 'center',
width: 150,
currentRender:({row})=>{
currentRender: ({row}) => {
return <span>{toThousands(row.economicEstimate)}</span>
}
},
@@ -302,11 +302,11 @@ const tableConfig = reactive({
align: 'center',
width: 120,
currentRender: ({row, index}) => {
if(row.state=='3'||row.state=='4'){
if (row.state == '3' || row.state == '4') {
return <span>{row.taskNode}</span>
}else if(row.state=='1'){
} else if (row.state == '1') {
return <span>{row.approveName}</span>
}else {
} else {
return <span>--</span>
}
}
@@ -319,12 +319,17 @@ const tableConfig = reactive({
showOverflowTooltip: false,
currentRender: ({row, index}) => {
let buttons = new Set(Array.from(row.buttons))
if (!buttons.has("openFileSwitch")&&row.state!=1) {
console.log('row',row)
return (<Tag dictType={'project_filing'} value={'0'}/>)
}else if (buttons.has("openFileSwitch")) {
if (!buttons.has("openFileSwitch") && row.state != 1) {
console.log('row', row)
if (!buttons.has("openFileSwitch") && !buttons.has("closeFileSwitch") && row.state == 4) {
//下属公司, 没这两个按钮时, 状态为4
return (<Tag dictType={'project_filing'} value={'4'}/>)
} else {
return (<Tag dictType={'project_filing'} value={'0'}/>)
}
} else if (buttons.has("openFileSwitch")) {//科创部, 有这权限时
return (<Tag dictType={'project_filing'} value={'4'}/>)
}else{
} else {
if (row.state !== null) {
return (<Tag dictType={'project_filing'} value={row.state}/>)
} else {
@@ -337,29 +342,59 @@ const tableConfig = reactive({
prop: 'oper',
label: '操作',
align: 'center',
fixed:'right',
fixed: 'right',
width: 150,
showOverflowTooltip: false,
currentRender: ({row, index}) => {
let btn = []
let buttons = new Set(Array.from(row.buttons))
if (buttons.has("details")) {
btn.push({label: '详情', prem: ['project:management:filing:detail'], func: () => handleDetail(row), type: 'primary'})
btn.push({
label: '详情',
prem: ['project:management:filing:detail'],
func: () => handleDetail(row),
type: 'primary'
})
}
if (buttons.has("attachments")) {
btn.push({label: '附件', prem: ['project:management:filing:attachment'], func: () => handleAttachment(row), type: 'primary'})
btn.push({
label: '附件',
prem: ['project:management:filing:attachment'],
func: () => handleAttachment(row),
type: 'primary'
})
}
if (buttons.has("entry")) {
btn.push({label: '结项', prem: ['project:management:filing:conclusion'], func: () => handleConclusion(row), type: 'primary'})
btn.push({
label: '结项',
prem: ['project:management:filing:conclusion'],
func: () => handleConclusion(row),
type: 'primary'
})
}
if (buttons.has("edit")) {
btn.push({label: '编辑', prem: ['project:management:filing:conclusion'], func: () => handleEdit(row), type: 'primary'})
btn.push({
label: '编辑',
prem: ['project:management:filing:conclusion'],
func: () => handleEdit(row),
type: 'primary'
})
}
if (buttons.has("openFileSwitch")) {
btn.push({label: '开启上传', prem: ['filing:attachment:switch'], func: () => handleOpenUpload(row,true), type: 'primary'})
btn.push({
label: '开启上传',
prem: ['filing:attachment:switch'],
func: () => handleOpenUpload(row, true),
type: 'primary'
})
}
if (buttons.has("closeFileSwitch")) {
btn.push({label: '关闭上传', prem: ['filing:attachment:switch'], func: () => handleOpenUpload(row,false), type: 'primary'})
btn.push({
label: '关闭上传',
prem: ['filing:attachment:switch'],
func: () => handleOpenUpload(row, false),
type: 'primary'
})
}
return (
<div style={{width: '100%'}}>
@@ -411,7 +446,7 @@ const handleAttachment = (row) => {
name: 'Filing/attachment',
query: {
id: row.projectId,
requirementId:row.requirementId
requirementId: row.requirementId
}
})
}
@@ -433,21 +468,21 @@ const handleEdit = (row) => {
}
})
}
const handleOpenUpload=(row,flag)=>{
console.log('tableIns',tableIns.value)
ElMessageBox.confirm(`是否确认${flag?'开启':'关闭'}上传文件?`, '提示', {
const handleOpenUpload = (row, flag) => {
console.log('tableIns', tableIns.value)
ElMessageBox.confirm(`是否确认${flag ? '开启' : '关闭'}上传文件?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let params={
let params = {
open: flag,
projectId: row.projectId
projectId: row.projectId
}
switchAttachmentState(params).then(res=>{
if(res.code==1000){
switchAttachmentState(params).then(res => {
if (res.code == 1000) {
tableIns.value.refresh()
}else{
} else {
ElNotification({
title: '提示',
message: res.msg,
@@ -459,7 +494,7 @@ const handleOpenUpload=(row,flag)=>{
}
const init = async () => {
const res = await getSubCompOpt()
searchConfig.value.find(item=>item.prop == 'affiliatedCompanyId').props.data = res.data
searchConfig.value.find(item => item.prop == 'affiliatedCompanyId').props.data = res.data
}
init()

View File

@@ -182,8 +182,8 @@
</div>
</el-form>
<div class="oper-page-btn" v-perm="['annual:plan:approve']" v-if="data.state==='4'">
<el-button type="danger" @click="handleRejectPlan">驳回年度计划</el-button>
<el-button color="#DED0B2" @click="handleAgreePlan">通过年度计划</el-button>
<el-button type="danger" @click="handleRejectPlan">驳回项目计划</el-button>
<el-button color="#DED0B2" @click="handleAgreePlan">通过项目计划</el-button>
</div>
</div>
</template>

View File

@@ -50,6 +50,8 @@ const openChangeRoleDialog = (selectRoleId, data) => {
}
})
}
console.log("🚀 ~ file: ", authStore.roles.includes('superAdmin'))
const schame = computed(() => {
let arr = [
{
@@ -62,7 +64,7 @@ const schame = computed(() => {
filterable: true,
checkStrictly: true,
data: localData.subCompanyIdOpt,
disabled: route.query.userType == 0 ? true : false
disabled: route.query.userType == 0 ? true : !authStore.roles.includes('superAdmin') ? true : false
},
on: {
change: async (val) => {
@@ -73,15 +75,15 @@ const schame = computed(() => {
},
{
label: '归属部门',
prop: 'departmentId',
component: 'el-tree-select',
prop:!authStore.roles.includes('superAdmin') ?'departmentName': 'departmentId',
component: !authStore.roles.includes('superAdmin') ?'el-input':'el-tree-select',
props: {
placeholder: '请选择',
clearable: true,
data: localData.departmentIdOpt,
filterable: true,
checkStrictly: true,
disabled: route.query.userType == 0 ? true : false
disabled: route.query.userType == 0 ? true : !authStore.roles.includes('superAdmin') ? true : false
}
},
{
@@ -90,7 +92,7 @@ const schame = computed(() => {
component: 'el-input',
props: {
placeholder: '请输入',
disabled: route.query.userType == 0 ? true : false
disabled: true
}
},
{
@@ -99,7 +101,7 @@ const schame = computed(() => {
component: 'el-input',
props: {
placeholder: '请输入',
disabled: route.query.userType == 0 ? true : false
disabled: route.query.userType == 0 ? true : !authStore.roles.includes('superAdmin') ? true : false
}
},
{
@@ -120,7 +122,7 @@ const schame = computed(() => {
filterable: true,
checkStrictly: true,
data: localData.jobOpt,
disabled: route.query.userType == 0 ? true : false
disabled: route.query.userType == 0 ? true : !authStore.roles.includes('superAdmin') ? true : false
}
},
{
@@ -130,7 +132,8 @@ const schame = computed(() => {
props: {
placeholder: '请选择',
multiple: true,
data: localData.roleOpt
data: localData.roleOpt,
disabled:!authStore.roles.includes('superAdmin') ? true : false
},
on: {
change: async (val) => {
@@ -173,7 +176,7 @@ const schame = computed(() => {
props: {
placeholder: '请选择',
data: cacheStore.getDict('user_sex'),
disabled: route.query.userType == 0 ? true : false
disabled: route.query.userType == 0 ? true : !authStore.roles.includes('superAdmin') ? true : false
}
},
{
@@ -183,7 +186,7 @@ const schame = computed(() => {
props: {
placeholder: '请选择',
data: cacheStore.getDict('normal_disable'),
disabled: route.query.userType == 0 ? true : false
disabled: route.query.userType == 0 ? true : !authStore.roles.includes('superAdmin') ? true : false
}
},
{
@@ -192,7 +195,7 @@ const schame = computed(() => {
component: 'el-input',
props: {
placeholder: '请输入',
disabled: route.query.userType == 0 ? true : false
disabled: route.query.userType == 0 ? true : !authStore.roles.includes('superAdmin') ? true : false
}
},
{
@@ -201,7 +204,7 @@ const schame = computed(() => {
component: 'el-input',
props: {
placeholder: '请输入',
disabled: route.query.userType == 0 ? true : false
disabled: route.query.userType == 0 ? true : !authStore.roles.includes('superAdmin') ? true : false
}
},
]
@@ -244,6 +247,7 @@ const init = async () => {
getJobOpt()
]
const resAll = await Promise.all(reqList)
console.log('resAll',resAll)
localData.departmentIdOpt = resAll[0].data
localData.subCompanyIdOpt = resAll[1].data
localData.roleOpt = resAll[2].data
@@ -254,10 +258,11 @@ const getInfo = async () => {
if (!route.query.id) return
// 获取详情数据
const {data} = await getUserDetail(route.query.id)
if (data.subCompanyId) {
const res = await getDeptOpt({subCompanyId: data.subCompanyId})
localData.departmentIdOpt = res.data
}
// if (data.subCompanyId) {
// const res = await getDeptOpt({subCompanyId: data.subCompanyId})
// console.log('getInfo',res)
// localData.departmentIdOpt = res.data
// }
nextTick(() => {
form.value.setValues(data)
currentRoleArray.value = form.value.getValues().roleIds

View File

@@ -43,7 +43,7 @@
<el-button type="primary" v-perm="auths.agentSetting"
@click="handleAgentSetting(scope.row)" link>设置代理
</el-button>
<el-button type="danger" v-if="scope.row.userType != 0" v-perm="auths.del"
<el-button type="danger" v-if="scope.row.userType != 0&&!authStore.roles.includes('superAdmin')" v-perm="auths.del"
@click="handleDel(scope.row)" link>删除
</el-button>
<el-button type="primary" v-if="scope.row.accountType == 0" v-perm="auths.bindUser"

View File

@@ -136,7 +136,7 @@ const init = () => {
timeline.value = {
color: '#f78f5f',
icon: 'MoreFilled',
context: '年度计划审批中'
context: '项目计划审批中'
}
}
break
@@ -159,7 +159,7 @@ const init = () => {
timeline.value = {
color: '#0bbd87',
icon: 'CircleCheckFilled',
context: '年度计划审批通过'
context: '项目计划审批通过'
}
break
default:

View File

@@ -8,8 +8,10 @@ import IconsResolver from 'unplugin-icons/resolver'
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
import Inspect from 'vite-plugin-inspect'
import viteSvgIcons from 'vite-plugin-svg-icons'
// import viteSvgIcons from 'vite-plugin-svg-icons'
import path from 'path'
import pkg from 'vite-plugin-svg-icons'
const viteSvgIcons = pkg.default
// https://vitejs.dev/config/
export default defineConfig({