Commit f583df7a authored by wangjiancheng's avatar wangjiancheng

fix:项目管理修改

parent bd0c790a
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<div class="content"> <div class="content">
<div style="padding-left: 10px"> <div style="padding-left: 10px">
<span class="bold-text" style="border-bottom: 3px solid #0062FF;">项目立项</span> <span class="bold-text">项目立项</span>
</div> </div>
<div style="padding-top: 40px"> <div style="padding-top: 40px">
<el-form ref="formRef" :model="form" :rules="rules" label-width="auto"> <el-form ref="formRef" :model="form" :rules="rules" label-width="auto">
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
:auto-upload="false" :auto-upload="false"
:on-success="handleSuccess" :on-success="handleSuccess"
> >
<el-button size="large" type="text"> <el-button size="large" type="primary" link>
<img src="../../assets/icons/common/upl.png" height="16" width="16" alt="上传" <img src="../../assets/icons/common/upl.png" height="16" width="16" alt="上传"
style="margin-right: 10px"/> style="margin-right: 10px"/>
点击上传附件 点击上传附件
...@@ -344,8 +344,9 @@ const reset = () => { ...@@ -344,8 +344,9 @@ const reset = () => {
proxy.$router.push({path: '/project'}) proxy.$router.push({path: '/project'})
resetForm() resetForm()
} }
// 更新回款输入框数量
const updateRepaymentInputs = () => { const updateRepaymentInputs = () => {
// 根据用户输入的回款笔数更新百分比输入框的数量 // 根据用户输入的回款笔数-新增输入框的数量
if (form.repaymentCount > 0) { if (form.repaymentCount > 0) {
form.repaymentDetails = Array.from({length: form.repaymentCount}, () => ({ form.repaymentDetails = Array.from({length: form.repaymentCount}, () => ({
repaymentPercentage: null, // 回款百分比 repaymentPercentage: null, // 回款百分比
...@@ -355,7 +356,7 @@ const updateRepaymentInputs = () => { ...@@ -355,7 +356,7 @@ const updateRepaymentInputs = () => {
form.repaymentDetails = []; form.repaymentDetails = [];
} }
} }
// 检查回款百分比 // 校验回款百分比
const checkPercentage = (value, index) => { const checkPercentage = (value, index) => {
let newValue = parseFloat(value); // 确保值是浮点数 let newValue = parseFloat(value); // 确保值是浮点数
if (isNaN(newValue)) { if (isNaN(newValue)) {
...@@ -369,8 +370,8 @@ const checkPercentage = (value, index) => { ...@@ -369,8 +370,8 @@ const checkPercentage = (value, index) => {
} }
}; };
// 删除附件相关事件 // 删除附件相关事件
const handleRemove = (file, fileList) => { const handleRemove = (file) => {
console.log(file, fileList) return this.$confirm(`确定移除 ${file.name}?`);
} }
// 预览附件相关事件 // 预览附件相关事件
...@@ -381,13 +382,14 @@ const handlePreview = (file) => { ...@@ -381,13 +382,14 @@ const handlePreview = (file) => {
const handleExceed = (files, fileList) => { const handleExceed = (files, fileList) => {
this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`); this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
} }
// 上传附件删除相关事件
const beforeRemove = (file, fileList) => {
return this.$confirm(`确定移除 ${file.name}?`);
}
// 上传附件成功相关事件 // 上传附件成功相关事件
const handleSuccess = (response, file, fileList) => { const handleSuccess = (response, file, fileList) => {
form.projectAnnexList = fileList.map(item => {
return {
fileName: item.fileName,
fileUrl: item.fileUrl
}
})
console.log(response, file, fileList) console.log(response, file, fileList)
} }
...@@ -396,13 +398,10 @@ getUserList() ...@@ -396,13 +398,10 @@ getUserList()
<style scoped lang="scss"> <style scoped lang="scss">
.bold-text { .bold-text {
width: 72px;
height: 15px;
font-family: PingFangSC-Medium; font-family: PingFangSC-Medium;
font-weight: 900; font-weight: 900;
font-size: 18px; font-size: 19px;
color: #0D162A; color: #0D162A;
letter-spacing: 0; border-bottom: 4px solid #0062FF;
line-height: 15px;
} }
</style> </style>
...@@ -59,7 +59,8 @@ ...@@ -59,7 +59,8 @@
<el-button <el-button
size="large" size="large"
icon="ArrowDown" icon="ArrowDown"
type="text" type="primary"
link
v-show="!isExpanded" v-show="!isExpanded"
@click="toggleSearch" @click="toggleSearch"
> >
...@@ -67,7 +68,8 @@ ...@@ -67,7 +68,8 @@
</el-button> </el-button>
<el-button <el-button
size="large" size="large"
type="text" type="primary"
link
icon="ArrowUp" icon="ArrowUp"
v-show="isExpanded" v-show="isExpanded"
@click="toggleSearch" @click="toggleSearch"
...@@ -114,8 +116,8 @@ ...@@ -114,8 +116,8 @@
</div> </div>
<div class="contentTable"> <div class="contentTable">
<div style="padding-left: 8px ;padding-bottom: 25px"> <div style="padding-left: 8px ;padding-bottom: 25px">
<span class="bold-text" style="border-bottom: 3px solid #0062FF;">项目草稿箱</span> <span class="bold-text">项目草稿箱</span>
<span style="padding-left: 85%"> <span style="padding-left: 86%">
<el-button <el-button
icon="ArrowLeft" icon="ArrowLeft"
class="el-button-primary-pain" class="el-button-primary-pain"
...@@ -155,7 +157,7 @@ ...@@ -155,7 +157,7 @@
<template #default="scope"> <template #default="scope">
<el-popover placement="right" :width="400" trigger="click"> <el-popover placement="right" :width="400" trigger="click">
<template #reference> <template #reference>
<el-button type="text">查看详情</el-button> <el-button type="primary" link>查看详情</el-button>
</template> </template>
<el-table :data="scope.row.repaymentDetails" border style="width: 100%"> <el-table :data="scope.row.repaymentDetails" border style="width: 100%">
<el-table-column label="回款百分比" align="center" prop="repaymentPercentage"> <el-table-column label="回款百分比" align="center" prop="repaymentPercentage">
...@@ -185,12 +187,12 @@ ...@@ -185,12 +187,12 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="150"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="150">
<template #default="scope"> <template #default="scope">
<el-tooltip content="编辑" placement="top"> <el-tooltip content="编辑" placement="top">
<el-button link type="text" @click="handleUpdate(scope.row)" v-hasPermi="['system:project:edit']"> <el-button link @click="handleUpdate(scope.row)" v-hasPermi="['system:project:edit']">
<img src="../../assets/icons/common/edit.png" height="32" width="32"/> <img src="../../assets/icons/common/edit.png" height="32" width="32"/>
</el-button> </el-button>
</el-tooltip> </el-tooltip>
<el-tooltip content="删除" placement="top"> <el-tooltip content="删除" placement="top">
<el-button link type="text" @click="handleDelete(scope.row)" v-hasPermi="['system:project:logicRemove']"> <el-button link @click="handleDelete(scope.row)" v-hasPermi="['system:project:logicRemove']">
<img src="../../assets/icons/common/delete.png" height="32" width="32"/> <img src="../../assets/icons/common/delete.png" height="32" width="32"/>
</el-button> </el-button>
</el-tooltip> </el-tooltip>
...@@ -314,14 +316,11 @@ getList(); ...@@ -314,14 +316,11 @@ getList();
<style scoped lang="scss"> <style scoped lang="scss">
.bold-text { .bold-text {
width: 72px;
height: 15px;
font-family: PingFangSC-Medium; font-family: PingFangSC-Medium;
font-weight: 900; font-weight: 900;
font-size: 18px; font-size: 19px;
color: #0D162A; color: #0D162A;
letter-spacing: 0; border-bottom: 4px solid #0062FF;
line-height: 15px;
} }
.pagination-containerA { .pagination-containerA {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<div class="content"> <div class="content">
<div style="padding-left: 10px"> <div style="padding-left: 10px">
<span class="bold-text" style="border-bottom: 3px solid #0062FF;">项目编辑</span> <span class="bold-text">项目编辑</span>
</div> </div>
<div style="padding-top: 40px"> <div style="padding-top: 40px">
<el-form ref="formRef" :model="form" :rules="rules" label-width="auto"> <el-form ref="formRef" :model="form" :rules="rules" label-width="auto">
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="项目成员" prop="projectMemberIds"> <el-form-item label="项目成员" prop="projectMemberIds">
<div v-for="(member, index) in form.projectMemberIds" :key="index" class="member-select"> <div v-for="(index) in form.projectMemberIds" :key="index" class="member-select">
<el-select <el-select
v-model="form.projectMemberIds[index]" v-model="form.projectMemberIds[index]"
:placeholder="'成员' + (index + 1)" :placeholder="'成员' + (index + 1)"
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
:on-exceed="handleExceed" :on-exceed="handleExceed"
:auto-upload="false" :auto-upload="false"
:on-success="handleSuccess"> :on-success="handleSuccess">
<el-button size="large" type="text"> <el-button size="large" type="primary" link>
<img src="../../assets/icons/common/upl.png" height="16" width="16" style="margin-right: 10px"/> <img src="../../assets/icons/common/upl.png" height="16" width="16" style="margin-right: 10px"/>
点击上传附件 点击上传附件
</el-button> </el-button>
...@@ -203,7 +203,7 @@ ...@@ -203,7 +203,7 @@
</el-form> </el-form>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<el-button type="text" @click="addMember" style="margin-top: 492px;margin-left: 0">+ 添加成员</el-button> <el-button type="primary" link @click="addMember" style="margin-top: 492px;margin-left: 0">+ 添加成员</el-button>
</el-col> </el-col>
</el-row> </el-row>
<el-form-item style="padding-left: 82%"> <el-form-item style="padding-left: 82%">
...@@ -258,7 +258,20 @@ const rules = ref({ ...@@ -258,7 +258,20 @@ const rules = ref({
{required: true, message: '预计开始时间不能为空', trigger: 'blur'} {required: true, message: '预计开始时间不能为空', trigger: 'blur'}
], ],
endDate: [ endDate: [
{required: true, message: '预计结束时间不能为空', trigger: 'blur'} {required: true, message: '预计结束时间不能为空', trigger: 'blur'},
// 预计结束时间必须大于预计开始时间
{
validator: (rule, value, callback) => {
if (value === '') {
callback(new Error('请选择预计结束时间'));
} else if (value <= form.startDate) {
callback(new Error('预计结束时间必须大于预计开始时间'));
} else {
callback();
}
},
trigger: 'blur'
}
], ],
departmentLeadId: [ departmentLeadId: [
{required: true, message: '事业部负责人不能为空', trigger: 'blur'} {required: true, message: '事业部负责人不能为空', trigger: 'blur'}
...@@ -388,6 +401,12 @@ const handleRemove = (file, fileList) => { ...@@ -388,6 +401,12 @@ const handleRemove = (file, fileList) => {
// 上传成功 // 上传成功
const handleSuccess = (response, file, fileList) => { const handleSuccess = (response, file, fileList) => {
form.value.projectAnnexList = fileList.map(item => {
return {
fileName: item.fileName,
fileUrl: item.fileUrl
}
})
console.log(response, file, fileList) console.log(response, file, fileList)
} }
// 上传后预览 // 上传后预览
...@@ -412,14 +431,11 @@ getUserList() ...@@ -412,14 +431,11 @@ getUserList()
<style scoped lang="scss"> <style scoped lang="scss">
.bold-text { .bold-text {
width: 72px;
height: 15px;
font-family: PingFangSC-Medium; font-family: PingFangSC-Medium;
font-weight: 900; font-weight: 900;
font-size: 18px; font-size: 19px;
color: #0D162A; color: #0D162A;
letter-spacing: 0; border-bottom: 4px solid #0062FF;
line-height: 15px;
} }
.member-select { .member-select {
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
<div class="formSearch"> <div class="formSearch">
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="120px"> <el-form :model="queryParams" ref="queryRef" :inline="true" label-width="120px">
<!-- 默认显示的查询条件 --> <!-- 默认显示的查询条件 -->
<el-row :gutter="25">
<el-col :span="6">
<el-form-item label="项目名称" prop="projectName"> <el-form-item label="项目名称" prop="projectName">
<el-select <el-select
v-model="queryParams.id" v-model="queryParams.id"
...@@ -19,6 +21,8 @@ ...@@ -19,6 +21,8 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="项目经理" prop="projectManagerId"> <el-form-item label="项目经理" prop="projectManagerId">
<el-select <el-select
v-model="queryParams.projectManagerId" v-model="queryParams.projectManagerId"
...@@ -35,6 +39,8 @@ ...@@ -35,6 +39,8 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="项目状态" prop="projectStatus"> <el-form-item label="项目状态" prop="projectStatus">
<el-select <el-select
v-model="queryParams.projectStatus" v-model="queryParams.projectStatus"
...@@ -50,8 +56,10 @@ ...@@ -50,8 +56,10 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col>
<!-- 操作按钮 --> <!-- 操作按钮 -->
<el-form-item style="padding-left: 5.4%"> <el-col :span="6">
<el-form-item style="margin-left: 30px">
<el-button @click="resetQuery" class="el-button-defalut"> <el-button @click="resetQuery" class="el-button-defalut">
<template #icon> <template #icon>
<img src="../../assets/icons/common/reset.png" height="25" width="24"/> <img src="../../assets/icons/common/reset.png" height="25" width="24"/>
...@@ -67,7 +75,8 @@ ...@@ -67,7 +75,8 @@
<el-button <el-button
size="large" size="large"
icon="ArrowDown" icon="ArrowDown"
type="text" link
type="primary"
v-show="!isExpanded" v-show="!isExpanded"
@click="toggleSearch" @click="toggleSearch"
> >
...@@ -75,7 +84,8 @@ ...@@ -75,7 +84,8 @@
</el-button> </el-button>
<el-button <el-button
size="large" size="large"
type="text" type="primary"
link
icon="ArrowUp" icon="ArrowUp"
v-show="isExpanded" v-show="isExpanded"
@click="toggleSearch" @click="toggleSearch"
...@@ -83,17 +93,15 @@ ...@@ -83,17 +93,15 @@
收起 收起
</el-button> </el-button>
</el-form-item> </el-form-item>
</el-col>
</el-row>
<!-- 可折叠的查询条件 --> <!-- 可折叠的查询条件 -->
<transition> <transition>
<div v-if="isExpanded"> <div v-if="isExpanded">
<el-row :gutter="25">
<el-col :span="6">
<el-form-item label="事业部负责人" prop="departmentLeaderId"> <el-form-item label="事业部负责人" prop="departmentLeaderId">
<!-- <el-input
v-model="queryParams.departmentLeaderId"
placeholder="请输入事业部负责人"
clearable
@keyup.enter="handleQuery"
style="width: 220px"
/>-->
<el-select <el-select
v-model="queryParams.departmentLeaderId" v-model="queryParams.departmentLeaderId"
filterable filterable
...@@ -109,6 +117,8 @@ ...@@ -109,6 +117,8 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="项目类型" prop="projectType"> <el-form-item label="项目类型" prop="projectType">
<el-select <el-select
v-model="queryParams.projectType" v-model="queryParams.projectType"
...@@ -124,13 +134,15 @@ ...@@ -124,13 +134,15 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col>
</el-row>
</div> </div>
</transition> </transition>
</el-form> </el-form>
</div> </div>
<div class="contentTable"> <div class="contentTable">
<div class="title"> <div class="title">
<div style="display: flex; align-items: center; justify-content: space-between;"> <div class="contentBt">
<span class="bold-text">项目列表</span> <span class="bold-text">项目列表</span>
<div style="display: flex; gap: 10px; align-items: center;"> <div style="display: flex; gap: 10px; align-items: center;">
<el-button <el-button
...@@ -210,7 +222,7 @@ ...@@ -210,7 +222,7 @@
<template #default="scope"> <template #default="scope">
<el-popover placement="right" :width="400" trigger="click"> <el-popover placement="right" :width="400" trigger="click">
<template #reference> <template #reference>
<el-button type="text">查看详情</el-button> <el-button link type="primary">查看详情</el-button>
</template> </template>
<el-table :data="scope.row.repaymentDetails" border style="width: 100%"> <el-table :data="scope.row.repaymentDetails" border style="width: 100%">
<!-- 项目回款笔数 --> <!-- 项目回款笔数 -->
...@@ -248,17 +260,17 @@ ...@@ -248,17 +260,17 @@
min-width="200"> min-width="200">
<template #default="scope"> <template #default="scope">
<el-tooltip content="编辑" placement="top"> <el-tooltip content="编辑" placement="top">
<el-button link type="text" @click="handleUpdate(scope.row)" v-hasPermi="['system:project:edit']"> <el-button link @click="handleUpdate(scope.row)" v-hasPermi="['system:project:edit']">
<img src="../../assets/icons/common/edit.png" height="32" width="32"/> <img src="../../assets/icons/common/edit.png" height="32" width="32"/>
</el-button> </el-button>
</el-tooltip> </el-tooltip>
<el-tooltip content="详情" placement="top"> <el-tooltip content="详情" placement="top">
<el-button link type="text" @click="handleView(scope.row)" v-hasPermi="['system:project:view']"> <el-button link @click="handleView(scope.row)" v-hasPermi="['system:project:view']">
<img src="../../assets/icons/common/check.png" height="32" width="32"/> <img src="../../assets/icons/common/check.png" height="32" width="32"/>
</el-button> </el-button>
</el-tooltip> </el-tooltip>
<el-tooltip content="删除" placement="top"> <el-tooltip content="删除" placement="top">
<el-button link type="text" @click="handleDelete(scope.row)" v-hasPermi="['system:project:logicRemove']"> <el-button link @click="handleDelete(scope.row)" v-hasPermi="['system:project:logicRemove']">
<img src="../../assets/icons/common/delete.png" height="32" width="32"/> <img src="../../assets/icons/common/delete.png" height="32" width="32"/>
</el-button> </el-button>
</el-tooltip> </el-tooltip>
...@@ -443,7 +455,7 @@ getUserList() ...@@ -443,7 +455,7 @@ getUserList()
.bold-text { .bold-text {
font-family: PingFangSC-Medium; font-family: PingFangSC-Medium;
font-weight: 900; font-weight: 900;
font-size: 20px; font-size: 19px;
color: #0D162A; color: #0D162A;
border-bottom: 4px solid #0062FF; border-bottom: 4px solid #0062FF;
} }
...@@ -454,6 +466,12 @@ getUserList() ...@@ -454,6 +466,12 @@ getUserList()
position: relative; position: relative;
} }
.contentBt {
display: flex;
align-items: center;
justify-content: space-between;
}
// 表格的标头 // 表格的标头
:deep(.el-table th.el-table__cell) { :deep(.el-table th.el-table__cell) {
line-height: 35px; line-height: 35px;
...@@ -470,12 +488,12 @@ getUserList() ...@@ -470,12 +488,12 @@ getUserList()
} }
.el-alert { .el-alert {
margin: 23px 0 23px; //margin: 23px 0 23px;
margin-bottom: 23px;
} }
.custom-blue-bg { .custom-blue-bg {
background-color: #E6F7FF !important; background-color: #E6F7FF !important;
/* 可能还需要调整文字颜色以便于阅读 */
color: #1890FF !important; color: #1890FF !important;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<div class="content" style="position: relative"> <div class="content" style="position: relative">
<div style="padding-left: 15px ;padding-top: 15px"> <div style="padding-left: 15px ;padding-top: 15px">
<span class="bold-text" style="border-bottom: 3px solid blue;">项目详情</span> <span class="bold-text">项目详情</span>
</div> </div>
<div style="padding-top: 28px ;padding-left: 10px; "> <div style="padding-top: 28px ;padding-left: 10px; ">
<el-form :model="form" label-width="auto"> <el-form :model="form" label-width="auto">
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
</el-col> </el-col>
<el-col :span="2"> <el-col :span="2">
<span v-for="(file, index) in form.projectAnnexList" :key="index" class="file-item"> <span v-for="(file, index) in form.projectAnnexList" :key="index" class="file-item">
<el-link :href="file.fileUrl" target="_blank">{{ file.fileName }}</el-link> <el-link :href="file.fileUrl" type="primary" target="_blank">{{ file.fileName }}</el-link>
</span> </span>
</el-col> </el-col>
</el-row> </el-row>
...@@ -208,7 +208,6 @@ const form = ref({ ...@@ -208,7 +208,6 @@ const form = ref({
repaymentDetails: [], repaymentDetails: [],
draft: '', draft: '',
}) })
const headOptions = ref([]) const headOptions = ref([])
const managerOptions = ref([]) const managerOptions = ref([])
const getUserList = () => { const getUserList = () => {
...@@ -259,14 +258,11 @@ getUserList() ...@@ -259,14 +258,11 @@ getUserList()
<style scoped lang="scss"> <style scoped lang="scss">
.bold-text { .bold-text {
width: 72px;
height: 15px;
font-family: PingFangSC-Medium; font-family: PingFangSC-Medium;
font-weight: 900; font-weight: 900;
font-size: 18px; font-size: 19px;
color: #0D162A; color: #0D162A;
letter-spacing: 0; border-bottom: 4px solid #0062FF;
line-height: 15px;
} }
.label-title { .label-title {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment