| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-container> |
| | | <el-header v-show="projectInfoData && projectInfoData.projectName" class="header-title">项目名称:{{ projectInfoData.projectName }} {{ projectInfoData.planTimeFlag === 0 ? '(月度计划)' : projectInfoData.planTimeFlag === 1 ? '(季度计划)' : '(年度计划)' }}</el-header> |
| | | <h4 v-show="projectInfoData && projectInfoData.projectCode" style="text-align: center">项目代码:{{ projectInfoData.projectCode }}</h4> |
| | | <el-header class="header-title">项目名称:{{ planInfoData.projectName }} ({{planInfoData.planTime}} {{ planInfoData.planTimeFlag === 0 ? '月度计划' : planInfoData.planTimeFlag === 1 ? '季度计划' : '年度计划' }})</el-header> |
| | | <h4 style="text-align: center">项目代码:{{ planInfoData.projectCode }}</h4> |
| | | <el-main> |
| | | <el-card shadow="hover"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="24" class="mb-4"> |
| | | <el-button type="primary" size="small" @click="handlePlanRecord" style="float: right; margin-bottom: 10px; margin-left: 10px">返回</el-button> |
| | | <el-button type="primary" size="small" @click="handleAdd" style="float: right; margin-bottom: 10px">新增</el-button> |
| | | <el-button |
| | | type="text" |
| | | size="medium" |
| | | icon="el-icon-plus" |
| | | @click="handleAdd" |
| | | style="float: right; |
| | | margin-bottom: 10px">新增</el-button> |
| | | <el-table :data="tableData" border stripe style="width: 100%; margin-bottom: 20px"> |
| | | <el-table-column prop="index" label="序号" width="50" align="center"> |
| | | <template #default="scope"> |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="startTime" label="计划开始时间" width="160" align="center"> |
| | | <template #default="scope"> |
| | | <el-date-picker v-model="scope.row.startTime" type="date" placeholder="选择日期" size="small" style="width: 130px" /> |
| | | <el-date-picker v-model="scope.row.startTime" |
| | | type="date" |
| | | placeholder="选择日期" |
| | | size="medium" |
| | | style="width: 130px" |
| | | value-format="yyyy-MM-dd HH:mm:ss"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="endTime" label="计划完成时间" width="160" align="center"> |
| | | <template #default="scope"> |
| | | <el-date-picker v-model="scope.row.endTime" type="date" placeholder="选择日期" size="small" style="width: 130px" /> |
| | | <el-date-picker v-model="scope.row.endTime" type="date" placeholder="选择日期" size="medium" style="width: 130px" value-format="yyyy-MM-dd HH:mm:ss"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column :label="projectInfoData.planTimeFlag === 0 ? '月度' : projectInfoData.planTimeFlag === 1 ? '季度' : '年度' " width="100" align="center"> |
| | | <el-table-column :label="planInfoData.planTimeFlag === 0 ? '月度' : planInfoData.planTimeFlag === 1 ? '季度' : '年度' " width="100" align="center"> |
| | | <template #default="scope"> |
| | | <span>{{ projectInfoData.planTime }}{{ projectInfoData.planTimeFlag === 0 ? '月度' : projectInfoData.planTimeFlag === 1 ? '季度' : '年度' }}</span> |
| | | <span>{{ planInfoData.planTime }}{{ planInfoData.planTimeFlag === 0 ? '月度' : planInfoData.planTimeFlag === 1 ? '季度' : '年度' }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="操作" align="center"> |
| | | <template #default="scope"> |
| | | <el-button size="small" @click="handleSave(scope.$index)">保存</el-button> |
| | | <el-button size="small" type="danger" @click="handleReset(scope.$index)">重置</el-button> |
| | | <el-button size="small" type="danger" @click="handleDelete(scope.$index)">删除</el-button> |
| | | <el-button |
| | | size="medium" |
| | | type="text" |
| | | icon="el-icon-check" |
| | | @click="handleSave(scope.$index)">保存</el-button> |
| | | <el-button |
| | | size="medium" |
| | | type="text" |
| | | icon="el-icon-refresh-left" |
| | | @click="handleReset(scope.$index)">重置</el-button> |
| | | <el-button |
| | | size="medium" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.$index)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div style="display: flex; align-items: center;"> |
| | | <h1 style="margin: 0;"> |
| | | 截止本计划进度完成投资(万元): |
| | | 计划投资金额(万元): |
| | | </h1> |
| | | <el-input |
| | | placeholder="请输入投资金额" |
| | |
| | | </el-input> |
| | | </div> |
| | | <div style="display: flex; justify-content: center; align-items: center; margin-top: 20px"> |
| | | <el-button type="primary" size="small" @click="handleSubmit">上报</el-button> |
| | | <el-button type="primary" size="small" @click="handleResetAll">重置</el-button> |
| | | <el-button |
| | | type="text" |
| | | size="medium" |
| | | icon="el-icon-upload2" |
| | | @click="handleSubmit">上报</el-button> |
| | | <el-button |
| | | type="text" |
| | | size="medium" |
| | | icon="el-icon-refresh-left" |
| | | @click="handleResetAll">重置</el-button> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | } |
| | | } |
| | | }, |
| | | |
| | | created() { |
| | | this.getProjectInfoData(); |
| | | }, |
| | | methods: { |
| | | // 页面加载 |
| | | search() { |
| | |
| | | // 获取传递过来的项目计划详情 |
| | | getProjectInfoData() { |
| | | // 从查询参数中获取数据 |
| | | this.projectInfoData = this.$route.query.projectInfoData |
| | | this.planInfoData = this.$route.query.data |
| | | this.projectInfoData = JSON.parse(this.$route.query.projectInfoData) |
| | | this.planInfoData = JSON.parse(this.$route.query.data) |
| | | this.search(); |
| | | }, |
| | | // 获取项目计划项 |
| | |
| | | } |
| | | addPlanInfo(this.addData).then(response => { |
| | | this.handlePlanRecord() |
| | | this.$message.success('上报成功'); |
| | | }) |
| | | }, |
| | | // 重置当前行数据 |
| | |
| | | // 保存当前行数据 |
| | | handleSave(index) { |
| | | this.tableData[index].projectPlanRecordId = this.projectInfoData.id; |
| | | savePlanInfo(this.tableData[index]).then(response => { |
| | | this.search(); |
| | | savePlanInfo(this.tableData[index], this.planInfoData.id).then(response => { |
| | | this.$message.success('保存成功'); |
| | | }); |
| | | }, |
| | |
| | | this.$router.push({ |
| | | path: '/projectManage/planRecord', |
| | | query: { |
| | | data: this.projectInfoData |
| | | data: JSON.stringify(this.projectInfoData) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | created() { |
| | | this.getProjectInfoData(); |
| | | }, |
| | | }; |
| | | </script> |