luohairen
2024-11-28 3b8c0eb278404db65edd818936c5d1820fdbed96
修改项目计划bug
6个文件已修改
90 ■■■■■ 已修改文件
src/api/projectManage/progress/index.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectManage/plan/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectManage/plan/planInfo.vue 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectManage/plan/planInfoCheck.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectManage/plan/planRecord.vue 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectManage/progress/progressRecord.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/projectManage/progress/index.js
@@ -41,5 +41,14 @@
    })
}
// 提交上报内容
export function recordSubmit(data) {
  return request({
    url: '/api/project-plan-progress-report',
    method: 'post',
    data: data
  })
}
src/views/projectManage/plan/index.vue
@@ -331,7 +331,7 @@
      this.$router.push({
        path: '/projectManage/planRecord',
        query: {
          data: JSON.stringify(row)
          data: row
        }
      })
    }
src/views/projectManage/plan/planInfo.vue
@@ -7,6 +7,7 @@
        <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-table :data="tableData" border stripe style="width: 100%; margin-bottom: 20px">
                <el-table-column prop="index" label="序号" width="50" align="center">
@@ -99,15 +100,13 @@
  methods: {
    // 页面加载
    search() {
      this.getPlanInfoData(this.planRecordData.id);
      this.getPlanInfoData(this.planInfoData.id);
    },
    // 获取传递过来的项目计划详情
    getPlanRecordData() {
      // 从查询参数中获取数据
      if (this.$route.query.data) {
        this.planRecordData = JSON.parse(this.$route.query.data)
      }
      this.planInfoData = this.$route.query.planInfoData
      this.planRecordData = this.$route.query.planRecordData
      this.planInfoData = this.$route.query.data
      this.search();
    },
    // 获取项目计划项
@@ -134,12 +133,12 @@
      // 遍历tableData,获得值不为空字符串的行
      const validList = this.tableData.filter(item => item.title !== '' || item.startTime !== '' || item.endTime !== '');
      this.addData = {
        projectPlanRecordId: this.planRecordData.id,
        projectPlanRecordId: this.planInfoData.id,
        actualInvest: this.actualInvest,
        addList: validList
      }
      addPlanInfo(this.addData).then(response => {
        this.handlePlanRecord(this.planInfoData)
        this.handlePlanRecord()
      })
    },
    // 重置当前行数据
@@ -167,11 +166,11 @@
      });
    },
    /** 返回项目计划记录 */
    handlePlanRecord(planInfoData) {
    handlePlanRecord() {
      this.$router.push({
        name: '/projectManage/planRecord',
        path: '/projectManage/planRecord',
        query: {
          data: JSON.stringify(planInfoData)
          data: this.planRecordData
        }
      })
    }
src/views/projectManage/plan/planInfoCheck.vue
@@ -7,6 +7,7 @@
        <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;">返回</el-button>
              <!--项目计划项-->
              <el-table :data="tableData" border stripe style="width: 100%; margin-bottom: 20px">
                <el-table-column prop="index" label="序号" width="50" align="center">
@@ -176,9 +177,7 @@
    // 获取传递过来的项目计划详情
    getPlanRecordData() {
      // 从查询参数中获取数据
      if (this.$route.query.data) {
        this.planRecordData = JSON.parse(this.$route.query.data)
      }
      this.planRecordData = this.$route.query.data
      this.planInfoData = this.$route.query.planInfoData
      this.search();
    },
@@ -226,15 +225,15 @@
      this.tableData[index].startTime = '';
      this.tableData[index].endTime = '';
    },
    /** 返回项目计划记录页面 */
    handlePlanRecord(planInfoData) {
    /** 返回项目计划记录 */
    handlePlanRecord() {
      this.$router.push({
        name: '/projectManage/planRecord',
        path: '/projectManage/planRecord',
        query: {
          data: JSON.stringify(planInfoData)
          data: this.planRecordData
        }
      })
    },
    }
  },
  created() {
    this.getPlanRecordData();
src/views/projectManage/plan/planRecord.vue
@@ -1,8 +1,8 @@
<template>
  <div class="app-container">
    <el-container>
      <el-header v-show="planInfoData && planInfoData.projectName" class="header-title">项目名称:{{ planInfoData.projectName }}</el-header>
      <h4 v-show="planInfoData && planInfoData.projectCode" style="text-align: center">项目代码:{{ planInfoData.projectCode }}</h4>
      <el-header v-show="planRecordData && planRecordData.projectName" class="header-title">项目名称:{{ planRecordData.projectName }}</el-header>
      <h4 v-show="planRecordData && planRecordData.projectCode" style="text-align: center">项目代码:{{ planRecordData.projectCode }}</h4>
      <el-main>
        <el-card shadow="hover">
          <el-row :gutter="20">
@@ -102,7 +102,7 @@
  data() {
    return {
      // 接收传递过来的项目计划数据
      planInfoData: {},
      planRecordData: {},
      // 月度计划数据
      monthRecords: [],
      // 季度计划数据
@@ -114,15 +114,13 @@
  methods: {
    // 页面加载
    search() {
      this.getPlanRecordData(this.planInfoData.id);
      this.getPlanRecordData(this.planRecordData.id);
    },
    // 获取传递过来的项目计划详情
    getPlanInfoData() {
      // 从查询参数中获取数据
      if (this.$route.query.data) {
        this.planInfoData = JSON.parse(this.$route.query.data);
        this.getPlanRecordData(this.planInfoData.id);
      }
      this.planRecordData = this.$route.query.data
      this.getPlanRecordData(this.planRecordData.id);
    },
    // 获取项目计划记录数据
    getPlanRecordData(id) {
@@ -138,7 +136,7 @@
    handleAddMonthPlan() {
      let planRecordData = {
        id: undefined,
        projectInfoId: this.planInfoData.id,
        projectInfoId: this.planRecordData.id,
        planTimeFlag: 0
      }
      // 判断月度计划是否为空
@@ -156,7 +154,7 @@
    handleAddSeasonPlan() {
      let planRecordData = {
        id: undefined,
        projectInfoId: this.planInfoData.id,
        projectInfoId: this.planRecordData.id,
        planTimeFlag: 1
      }
      // 判断季度计划是否为空
@@ -174,7 +172,7 @@
    handleAddYearPlan() {
      let planRecordData = {
        id: undefined,
        projectInfoId: this.planInfoData.id,
        projectInfoId: this.planRecordData.id,
        planTimeFlag: 2
      }
      // 判断年度计划是否为空
@@ -191,10 +189,10 @@
    /** 修改项目计划项 */
    handlePlanInfo(row) {
      this.$router.push({
        name: 'PlanInfo',
        path: '/projectManage/planInfo',
        query: {
          data: JSON.stringify(row),
          planInfoData: this.planInfoData
          data: row,
          planRecordData: this.planRecordData
        }
      })
    },
@@ -209,7 +207,8 @@
      this.$router.push({
        path: '/projectManage/planInfoCheck',
        query: {
          data: JSON.stringify(row),
          data: row,
          planRecordData: this.planRecordData
        }
      })
    }
src/views/projectManage/progress/progressRecord.vue
@@ -161,7 +161,7 @@
                <el-input v-model="progressReportData.actualInvest" type="number" />
              </el-form-item>
              <el-form-item label="上级审核:" :label-width="formLabelWidth">
                <el-input :value="progressReportData.departmentExamine === 0 ? '同意' : '驳回'" disabled />
                <el-input :value="progressReportData.departmentExamine === 0 ? '同意' : progressReportData.departmentExamine === 1 ? '驳回' : '未审核'" disabled />
              </el-form-item>
              <el-form-item label="上级批复:" :label-width="formLabelWidth">
                <el-input v-model="progressReportData.departmentApproval" disabled />
@@ -170,7 +170,7 @@
                <el-input type="textarea" v-model="progressReportData.departmentApprovalReply" placeholder="请输入" rows="3" />
              </el-form-item>
              <el-form-item label="主管部门审核:" :label-width="formLabelWidth">
                <el-input :value="progressReportData.manageExamine === 0 ? '同意' : '驳回'" disabled />
                <el-input :value="progressReportData.manageExamine === 0 ? '同意' : progressReportData.manageExamine === 1 ? '驳回' : '未审核'" disabled />
              </el-form-item>
              <el-form-item label="主管部门审核批复:" :label-width="formLabelWidth">
                <el-input v-model="progressReportData.manageApproval" disabled />
@@ -180,7 +180,7 @@
              </el-form-item>
            </el-form>
            <div slot="footer" class="dialog-footer">
              <el-button type="primary" @click="dialogFormVisible = false">上 报</el-button>
              <el-button type="primary" @click="handleRecordSubmit">上 报</el-button>
              <el-button @click="dialogFormVisible = false">取 消</el-button>
            </div>
          </el-dialog>
@@ -191,7 +191,7 @@
</template>
<script>
import { getProgressInfoList, getProgressReport } from "@/api/projectManage/progress/index";
import { getProgressInfoList, getProgressReport, recordSubmit } from "@/api/projectManage/progress/index";
export default {
  name: "progressRecord",
@@ -235,6 +235,14 @@
      this.dialogFormVisible = true;
      getProgressReport(row.id).then(res => {
        this.progressReportData = res.data;
        console.log(this.progressReportData)
      })
    },
    // 上报提交
    handleRecordSubmit() {
      recordSubmit(this.progressReportData).then(res => {
        this.dialogFormVisible = false;
        this.$message.success('上报成功');
      })
    }
  },