|
|
|
|
@ -78,6 +78,11 @@
|
|
|
|
|
<el-input v-model="form.informationNote" type="textarea" placeholder="请说明情况" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
|
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入备注" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12" v-show="false">
|
|
|
|
|
<el-form-item label="项目ID" prop="projectId">
|
|
|
|
|
<el-input v-model="form.projectId" placeholder="请点击右侧图标选择项目" />
|
|
|
|
|
@ -134,16 +139,67 @@
|
|
|
|
|
<template #header>
|
|
|
|
|
<div style="text-align: left; font-weight: bold; font-size: 18px">项目周报具体信息</div>
|
|
|
|
|
</template>
|
|
|
|
|
<el-card shadow="never">
|
|
|
|
|
<template #header>
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
type="success"
|
|
|
|
|
plain
|
|
|
|
|
icon="Edit"
|
|
|
|
|
:disabled="single"
|
|
|
|
|
@click="handleUpdate()"
|
|
|
|
|
v-if="routeParams.type === 'view' && routeParams.reportData"
|
|
|
|
|
v-hasPermi="['oa/erp:projectReportDetail:edit']"
|
|
|
|
|
>修改</el-button
|
|
|
|
|
>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
type="danger"
|
|
|
|
|
plain
|
|
|
|
|
icon="Delete"
|
|
|
|
|
:disabled="multiple"
|
|
|
|
|
@click="handleDelete()"
|
|
|
|
|
v-if="routeParams.type === 'view' && routeParams.reportData"
|
|
|
|
|
v-hasPermi="['oa/erp:projectReportDetail:remove']"
|
|
|
|
|
>删除</el-button
|
|
|
|
|
>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
type="warning"
|
|
|
|
|
plain
|
|
|
|
|
icon="Download"
|
|
|
|
|
@click="handleExport"
|
|
|
|
|
v-hasPermi="['oa/erp:projectReportDetail:export']"
|
|
|
|
|
v-if="routeParams.type === 'view'"
|
|
|
|
|
>导出</el-button
|
|
|
|
|
>
|
|
|
|
|
</el-col>
|
|
|
|
|
<right-toolbar v-model:showSearch="showSearch" :columns="columns" :search="false" @queryTable="getProjectDetail"></right-toolbar>
|
|
|
|
|
</el-row>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<!-- 项目周报具体信息表格 -->
|
|
|
|
|
<div style="margin-bottom: 16px">
|
|
|
|
|
<!-- 项目周报具体信息表格 -->
|
|
|
|
|
<!-- <div style="margin-bottom: 16px">
|
|
|
|
|
<el-button
|
|
|
|
|
type="success"
|
|
|
|
|
plain
|
|
|
|
|
icon="Edit"
|
|
|
|
|
:disabled="single"
|
|
|
|
|
@click="handleUpdate()"
|
|
|
|
|
v-if="routeParams.type === 'view' && routeParams.reportData"
|
|
|
|
|
v-hasPermi="['oa/erp:projectReportDetail:edit']"
|
|
|
|
|
>修改</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
type="danger"
|
|
|
|
|
plain
|
|
|
|
|
icon="Delete"
|
|
|
|
|
:disabled="multiple"
|
|
|
|
|
@click="handleDelete()"
|
|
|
|
|
v-if="routeParams.type === 'view'"
|
|
|
|
|
v-if="routeParams.type === 'view' && routeParams.reportData"
|
|
|
|
|
v-hasPermi="['oa/erp:projectReportDetail:remove']"
|
|
|
|
|
>删除</el-button
|
|
|
|
|
>
|
|
|
|
|
@ -156,62 +212,63 @@
|
|
|
|
|
v-if="routeParams.type === 'view'"
|
|
|
|
|
>导出</el-button
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
<el-table
|
|
|
|
|
v-loading="buttonLoading"
|
|
|
|
|
border
|
|
|
|
|
:data="projectReportDetailList"
|
|
|
|
|
v-if="routeParams.type !== 'add' && routeParams.type !== 'approval'"
|
|
|
|
|
@selection-change="handleSelectionChange"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
<el-table-column label="项目周报明细ID" align="center" prop="reportDetailId" v-if="columns[0].visible" />
|
|
|
|
|
<el-table-column label="项目周报ID" align="center" prop="reportId" v-if="columns[1].visible" />
|
|
|
|
|
<el-table-column label="项目ID" align="center" prop="projectId" v-if="columns[2].visible" />
|
|
|
|
|
<el-table-column label="填写日期" align="center" prop="fillTime" width="180" v-if="columns[3].visible">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<span>{{ parseTime(scope.row.fillTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="所在的工作周" align="center" prop="currentWorkWeek" v-if="columns[4].visible" />
|
|
|
|
|
<el-table-column label="所属里程碑" align="center" prop="milestonePlan" v-if="columns[5].visible" />
|
|
|
|
|
<el-table-column label="二级进度阶段" align="center" prop="secondaryPhase" v-if="columns[6].visible" />
|
|
|
|
|
<el-table-column label="本周完成工作" align="center" prop="tasksCompleted" v-if="columns[7].visible" />
|
|
|
|
|
<el-table-column label="下周计划" align="center" prop="nextPlan" v-if="columns[8].visible" />
|
|
|
|
|
<el-table-column label="风险及解决措施" align="center" prop="riskResolution" v-if="columns[9].visible" />
|
|
|
|
|
<el-table-column label="项目状态" align="center" prop="scheduleStatus" v-if="columns[12].visible">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<dict-tag :options="project_risk_status" :value="scope.row.scheduleStatus" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="计划完成率" align="center" prop="plannedCompletionRate" v-if="columns[10].visible" />
|
|
|
|
|
<el-table-column label="周报情况说明" align="center" prop="informationNote" v-if="columns[11].visible" />
|
|
|
|
|
<el-table-column label="周报状态(1暂存 2审批中 3可用)" align="center" prop="projectReportStatus" v-if="columns[13].visible">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<dict-tag :options="project_report_status" :value="scope.row.projectReportStatus" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="流程状态" align="center" prop="flowStatus" v-if="columns[14].visible" />
|
|
|
|
|
<el-table-column label="排序号" align="center" prop="sortOrder" v-if="columns[15].visible" />
|
|
|
|
|
<el-table-column label="项目阶段(预留)" align="center" prop="projectPhases" v-if="columns[16].visible" />
|
|
|
|
|
<el-table-column label="合同ID(预留)" align="center" prop="contractId" v-if="columns[17].visible" />
|
|
|
|
|
<el-table-column label="附件ID" align="center" prop="ossId" v-if="columns[18].visible" />
|
|
|
|
|
<el-table-column label="备注" align="center" prop="remark" v-if="columns[19].visible" />
|
|
|
|
|
<el-table-column label="激活标识" align="center" prop="activeFlag" v-if="columns[20].visible" />
|
|
|
|
|
<el-table-column label="操作" align="center" fixed="right" width="150" v-if="routeParams.type !== 'view' && routeParams.type != 'approval'">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-button link type="primary" icon="Edit" @click="handleEditMaterial(scope.row)">编辑</el-button>
|
|
|
|
|
<el-button link type="danger" icon="Delete" @click="handleDeleteMaterial(scope.row)">删除</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
<pagination
|
|
|
|
|
v-show="total > 0 && routeParams.type === 'view'"
|
|
|
|
|
:total="total"
|
|
|
|
|
v-model:page="projectReportFormQuery.pageNum"
|
|
|
|
|
v-model:limit="projectReportFormQuery.pageSize"
|
|
|
|
|
@pagination="getProjectDetail"
|
|
|
|
|
/>
|
|
|
|
|
</div> -->
|
|
|
|
|
<el-table
|
|
|
|
|
v-loading="loading"
|
|
|
|
|
border
|
|
|
|
|
:data="projectReportDetailList"
|
|
|
|
|
v-if="routeParams.type !== 'add' && routeParams.type !== 'approval'"
|
|
|
|
|
@selection-change="handleSelectionChange"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
<el-table-column label="项目周报明细ID" align="center" prop="reportDetailId" v-if="columns[0].visible" />
|
|
|
|
|
<el-table-column label="项目周报ID" align="center" prop="reportId" v-if="columns[1].visible" />
|
|
|
|
|
<el-table-column label="项目ID" align="center" prop="projectId" v-if="columns[2].visible" />
|
|
|
|
|
<el-table-column label="填写日期" align="center" prop="fillTime" width="180" v-if="columns[3].visible">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<span>{{ parseTime(scope.row.fillTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="所在的工作周" align="center" prop="currentWorkWeek" v-if="columns[4].visible" />
|
|
|
|
|
<el-table-column label="所属里程碑" align="center" prop="milestonePlan" v-if="columns[5].visible" />
|
|
|
|
|
<el-table-column label="二级进度阶段" align="center" prop="secondaryPhase" v-if="columns[6].visible" />
|
|
|
|
|
<el-table-column label="本周完成工作" align="center" prop="tasksCompleted" v-if="columns[7].visible" />
|
|
|
|
|
<el-table-column label="下周计划" align="center" prop="nextPlan" v-if="columns[8].visible" />
|
|
|
|
|
<el-table-column label="风险及解决措施" align="center" prop="riskResolution" v-if="columns[9].visible" />
|
|
|
|
|
<el-table-column label="项目状态" align="center" prop="scheduleStatus" v-if="columns[12].visible">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<dict-tag :options="project_risk_status" :value="scope.row.scheduleStatus" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="计划完成率" align="center" prop="plannedCompletionRate" v-if="columns[10].visible" />
|
|
|
|
|
<el-table-column label="周报情况说明" align="center" prop="informationNote" v-if="columns[11].visible" />
|
|
|
|
|
<el-table-column label="周报状态(1暂存 2审批中 3可用)" align="center" prop="projectReportStatus" v-if="columns[13].visible">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<dict-tag :options="project_report_status" :value="scope.row.projectReportStatus" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="流程状态" align="center" prop="flowStatus" v-if="columns[14].visible" />
|
|
|
|
|
<el-table-column label="排序号" align="center" prop="sortOrder" v-if="columns[15].visible" />
|
|
|
|
|
<el-table-column label="项目阶段(预留)" align="center" prop="projectPhases" v-if="columns[16].visible" />
|
|
|
|
|
<el-table-column label="合同ID(预留)" align="center" prop="contractId" v-if="columns[17].visible" />
|
|
|
|
|
<el-table-column label="附件ID" align="center" prop="ossId" v-if="columns[18].visible" />
|
|
|
|
|
<el-table-column label="备注" align="center" prop="remark" v-if="columns[19].visible" />
|
|
|
|
|
<el-table-column label="激活标识" align="center" prop="activeFlag" v-if="columns[20].visible" />
|
|
|
|
|
<el-table-column label="操作" align="center" fixed="right" width="150" v-if="routeParams.type !== 'view' && routeParams.type != 'approval'">
|
|
|
|
|
<!-- <template #default="scope">
|
|
|
|
|
<el-button link type="primary" icon="Edit" @click="handleEditMaterial(scope.row)">编辑</el-button>
|
|
|
|
|
<el-button link type="danger" icon="Delete" @click="handleDeleteMaterial(scope.row)">删除</el-button>
|
|
|
|
|
</template> -->
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
<pagination
|
|
|
|
|
v-show="total > 0 && routeParams.type === 'view'"
|
|
|
|
|
:total="total"
|
|
|
|
|
v-model:page="projectReportFormQuery.pageNum"
|
|
|
|
|
v-model:limit="projectReportFormQuery.pageSize"
|
|
|
|
|
@pagination="getProjectDetail"
|
|
|
|
|
/>
|
|
|
|
|
</el-card>
|
|
|
|
|
<el-form
|
|
|
|
|
ref="projectReportDetailFormRef"
|
|
|
|
|
:model="projectReportForm"
|
|
|
|
|
@ -224,12 +281,12 @@
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="12" v-show="false">
|
|
|
|
|
<el-form-item label="项目周报ID" prop="reportId">
|
|
|
|
|
<el-input v-model="projectReportForm.reportId" placeholder="请输入项目周报ID" clearable @keyup.enter="console.log(1)" />
|
|
|
|
|
<el-input v-model="projectReportForm.reportId" placeholder="请输入项目周报ID" clearable />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12" v-show="false">
|
|
|
|
|
<el-form-item label="项目ID" prop="projectId">
|
|
|
|
|
<el-input v-model="projectReportForm.projectId" placeholder="请输入项目ID" clearable @keyup.enter="console.log(1)" />
|
|
|
|
|
<el-input v-model="projectReportForm.projectId" placeholder="请输入项目ID" clearable />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
@ -328,66 +385,157 @@
|
|
|
|
|
</el-card>
|
|
|
|
|
|
|
|
|
|
<!-- 添加或修改项目周报明细对话框 -->
|
|
|
|
|
<el-dialog :title="ReportDialog.title" v-model="ReportDialog.visible" width="500px" append-to-body>
|
|
|
|
|
<el-form ref="projectReportDetailFormRef" :model="projectReportForm" :rules="rules" label-width="120px">
|
|
|
|
|
<el-form-item label="项目周报ID" prop="reportId">
|
|
|
|
|
<el-input v-model="projectReportForm.reportId" placeholder="请输入项目周报ID" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="项目ID" prop="projectId">
|
|
|
|
|
<el-input v-model="projectReportForm.projectId" placeholder="请输入项目ID" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="填写日期" prop="fillTime">
|
|
|
|
|
<el-date-picker
|
|
|
|
|
clearable
|
|
|
|
|
v-model="projectReportForm.fillTime"
|
|
|
|
|
type="datetime"
|
|
|
|
|
value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
|
|
placeholder="请选择填写日期"
|
|
|
|
|
>
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="所在的工作周" prop="currentWorkWeek">
|
|
|
|
|
<el-input v-model="projectReportForm.currentWorkWeek" placeholder="请输入所在的工作周" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="所属里程碑" prop="milestonePlan">
|
|
|
|
|
<el-input v-model="projectReportForm.milestonePlan" placeholder="请输入所属里程碑" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="二级进度阶段" prop="secondaryPhase">
|
|
|
|
|
<el-input v-model="projectReportForm.secondaryPhase" placeholder="请输入二级进度阶段" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="本周完成工作" prop="tasksCompleted">
|
|
|
|
|
<el-input v-model="projectReportForm.tasksCompleted" type="textarea" placeholder="请输入内容" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="下周计划" prop="nextPlan">
|
|
|
|
|
<el-input v-model="projectReportForm.nextPlan" type="textarea" placeholder="请输入内容" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="风险及解决措施" prop="riskResolution">
|
|
|
|
|
<el-input v-model="projectReportForm.riskResolution" type="textarea" placeholder="请输入内容" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="计划完成率" prop="plannedCompletionRate">
|
|
|
|
|
<el-input v-model="projectReportForm.plannedCompletionRate" placeholder="请输入计划完成率" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="周报情况说明" prop="informationNote">
|
|
|
|
|
<el-input v-model="projectReportForm.informationNote" type="textarea" placeholder="请输入内容" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="排序号" prop="sortOrder">
|
|
|
|
|
<el-input v-model="projectReportForm.sortOrder" placeholder="请输入排序号" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="项目阶段(预留)" prop="projectPhases">
|
|
|
|
|
<el-input v-model="projectReportForm.projectPhases" placeholder="请输入项目阶段(预留)" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="合同ID(预留)" prop="contractId">
|
|
|
|
|
<el-input v-model="projectReportForm.contractId" placeholder="请输入合同ID(预留)" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="附件ID" prop="ossId">
|
|
|
|
|
<el-input v-model="projectReportForm.ossId" placeholder="请输入附件ID" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
|
|
<el-input v-model="projectReportForm.remark" placeholder="请输入备注" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="激活标识" prop="activeFlag">
|
|
|
|
|
<el-input v-model="projectReportForm.activeFlag" placeholder="请输入激活标识" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-dialog :title="ReportDialog.title" v-model="ReportDialog.visible" width="800px" append-to-body>
|
|
|
|
|
<el-form ref="projectReportDetailDialogFormRef" :model="detailForm" :rules="rules" label-width="120px">
|
|
|
|
|
<el-row :gutter="10" class="form-row">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="项目周报ID" prop="reportId">
|
|
|
|
|
<el-input v-model="detailForm.reportId" placeholder="请输入项目周报ID" :disabled="true" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="项目ID" prop="projectId">
|
|
|
|
|
<el-input v-model="detailForm.projectId" placeholder="请输入项目ID" :disabled="true" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="10" class="form-row">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="填写日期" prop="fillTime">
|
|
|
|
|
<el-date-picker
|
|
|
|
|
clearable
|
|
|
|
|
v-model="detailForm.fillTime"
|
|
|
|
|
type="datetime"
|
|
|
|
|
value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
|
|
placeholder="请选择填写日期"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="所在的工作周" prop="currentWorkWeek">
|
|
|
|
|
<el-input v-model="detailForm.currentWorkWeek" placeholder="请输入所在的工作周" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="10" class="form-row">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="所属里程碑" prop="milestonePlan">
|
|
|
|
|
<el-input v-model="detailForm.milestonePlan" placeholder="请输入所属里程碑" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="二级进度阶段" prop="secondaryPhase">
|
|
|
|
|
<el-input v-model="detailForm.secondaryPhase" placeholder="请输入二级进度阶段" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="10" class="form-row">
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="本周完成工作" prop="tasksCompleted">
|
|
|
|
|
<el-input v-model="detailForm.tasksCompleted" type="textarea" placeholder="请输入内容" :rows="4" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="10" class="form-row">
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="下周计划" prop="nextPlan">
|
|
|
|
|
<el-input v-model="detailForm.nextPlan" type="textarea" placeholder="请输入内容" :rows="4" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="10" class="form-row">
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="风险及解决措施" prop="riskResolution">
|
|
|
|
|
<el-input v-model="detailForm.riskResolution" type="textarea" placeholder="请输入内容" :rows="4" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="10" class="form-row">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="计划完成率" prop="plannedCompletionRate">
|
|
|
|
|
<el-input v-model="detailForm.plannedCompletionRate" placeholder="请输入计划完成率">
|
|
|
|
|
<template #append>%</template>
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="项目状态" prop="scheduleStatus">
|
|
|
|
|
<el-select v-model="detailForm.scheduleStatus" placeholder="请选择项目状态">
|
|
|
|
|
<el-option label="正常" value="1" />
|
|
|
|
|
<el-option label="拖期风险" value="2" />
|
|
|
|
|
<el-option label="已拖期" value="3" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="10" class="form-row">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="周报状态" prop="projectReportStatus">
|
|
|
|
|
<el-select v-model="detailForm.projectReportStatus" placeholder="请选择周报状态" :disabled="true">
|
|
|
|
|
<el-option label="暂存" value="1" />
|
|
|
|
|
<el-option label="审批中" value="2" />
|
|
|
|
|
<el-option label="可用" value="3" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="流程状态" prop="flowStatus">
|
|
|
|
|
<el-input v-model="detailForm.flowStatus" placeholder="流程状态" :disabled="true" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="10" class="form-row">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="项目阶段" prop="projectPhases">
|
|
|
|
|
<el-input v-model="detailForm.projectPhases" placeholder="请输入项目阶段(预留)" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="合同ID" prop="contractId">
|
|
|
|
|
<el-input v-model="detailForm.contractId" placeholder="请输入合同ID(预留)" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="10" class="form-row">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="排序号" prop="sortOrder">
|
|
|
|
|
<el-input v-model="detailForm.sortOrder" placeholder="请输入排序号" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="附件" prop="ossId">
|
|
|
|
|
<el-button type="primary" plain icon="Upload" @click="handleFile">上传附件</el-button>
|
|
|
|
|
<span v-if="detailForm.ossId" style="margin-left: 10px; color: #409eff">已上传</span>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="10" class="form-row">
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="周报情况说明" prop="informationNote">
|
|
|
|
|
<el-input v-model="detailForm.informationNote" type="textarea" placeholder="请输入内容" :rows="3" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="10" class="form-row">
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
|
|
<el-input v-model="detailForm.remark" type="textarea" placeholder="请输入备注" :rows="3" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<!-- 隐藏字段 -->
|
|
|
|
|
<el-row :gutter="10" class="form-row" v-show="false">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="激活标识" prop="activeFlag">
|
|
|
|
|
<el-input v-model="detailForm.activeFlag" placeholder="请输入激活标识" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-form>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<div class="dialog-footer">
|
|
|
|
|
@ -421,20 +569,12 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup name="ProjectReportEdit" lang="ts">
|
|
|
|
|
import { ContractMaterialVO, ContractprojectReportForm } from '@/api/oa/erp/contractMaterial/types';
|
|
|
|
|
import { getBaseUnitInfoList } from '@/api/oa/base/unitInfo';
|
|
|
|
|
import { getRuleGenerateCode } from '@/api/system/codeRule';
|
|
|
|
|
import { startWorkFlow } from '@/api/workflow/task';
|
|
|
|
|
import { StartProcessBo } from '@/api/workflow/workflowCommon/types';
|
|
|
|
|
import SubmitVerify from '@/components/Process/submitVerify.vue';
|
|
|
|
|
import ApprovalRecord from '@/components/Process/approvalRecord.vue';
|
|
|
|
|
import ApprovalButton from '@/components/Process/approvalButton.vue';
|
|
|
|
|
import { ref } from 'vue';
|
|
|
|
|
import { allListDept, listDept } from '@/api/system/dept';
|
|
|
|
|
import { getCrmCustomerInfoList } from '@/api/oa/crm/customerInfo';
|
|
|
|
|
import { getBasePrintTemplateList } from '@/api/oa/base/printTemplate';
|
|
|
|
|
import { CodeRuleEnum, FlowCodeEnum } from '@/enums/OAEnum';
|
|
|
|
|
import { getInfo } from '@/api/login';
|
|
|
|
|
import { ProjectReportVO, ProjectReportQuery, ProjectReportForm } from '@/api/oa/erp/projectReport/types';
|
|
|
|
|
import { listProjectReport, getProjectReport, delProjectReport, addProjectReport, updateProjectReport } from '@/api/oa/erp/projectReport';
|
|
|
|
|
import {
|
|
|
|
|
@ -451,7 +591,6 @@ import {
|
|
|
|
|
ProjectReportDetailForm,
|
|
|
|
|
ProjectReportDetailFormEx
|
|
|
|
|
} from '@/api/oa/erp/projectReportDetail/types';
|
|
|
|
|
import { fa, tr } from 'element-plus/es/locale/index.mjs';
|
|
|
|
|
import ProjectSelect from '@/components/ProjectSelect/index.vue';
|
|
|
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
|
|
@ -485,7 +624,7 @@ const flowInstanceBizExtBo = ref<Record<string, any>>({});
|
|
|
|
|
|
|
|
|
|
const type = ref(0);
|
|
|
|
|
const total = ref(0);
|
|
|
|
|
|
|
|
|
|
const loading = ref(false);
|
|
|
|
|
// 定义缓存键
|
|
|
|
|
const CACHE_KEYS = {
|
|
|
|
|
PROJECT_REPORT_DRAFT: 'project_report_draft_data',
|
|
|
|
|
@ -550,6 +689,61 @@ const data = reactive<PageData<ProjectReportForm, ProjectReportQuery>>({
|
|
|
|
|
|
|
|
|
|
const { form, queryParams, rules } = toRefs(data);
|
|
|
|
|
|
|
|
|
|
const initProjectReportDetailFormData: ProjectReportDetailForm = {
|
|
|
|
|
reportDetailId: undefined,
|
|
|
|
|
reportId: undefined,
|
|
|
|
|
projectId: undefined,
|
|
|
|
|
fillTime: undefined,
|
|
|
|
|
currentWorkWeek: undefined,
|
|
|
|
|
milestonePlan: undefined,
|
|
|
|
|
secondaryPhase: undefined,
|
|
|
|
|
tasksCompleted: undefined,
|
|
|
|
|
nextPlan: undefined,
|
|
|
|
|
riskResolution: undefined,
|
|
|
|
|
plannedCompletionRate: undefined,
|
|
|
|
|
informationNote: undefined,
|
|
|
|
|
scheduleStatus: undefined,
|
|
|
|
|
projectReportStatus: undefined,
|
|
|
|
|
flowStatus: undefined,
|
|
|
|
|
sortOrder: undefined,
|
|
|
|
|
projectPhases: undefined,
|
|
|
|
|
contractId: undefined,
|
|
|
|
|
ossId: undefined,
|
|
|
|
|
remark: undefined,
|
|
|
|
|
activeFlag: undefined
|
|
|
|
|
};
|
|
|
|
|
const projectReportDetailData = reactive<PageData<ProjectReportDetailForm, ProjectReportDetailQuery>>({
|
|
|
|
|
form: { ...initProjectReportDetailFormData },
|
|
|
|
|
queryParams: {
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
reportId: undefined,
|
|
|
|
|
projectId: undefined,
|
|
|
|
|
fillTime: undefined,
|
|
|
|
|
currentWorkWeek: undefined,
|
|
|
|
|
milestonePlan: undefined,
|
|
|
|
|
secondaryPhase: undefined,
|
|
|
|
|
tasksCompleted: undefined,
|
|
|
|
|
nextPlan: undefined,
|
|
|
|
|
riskResolution: undefined,
|
|
|
|
|
plannedCompletionRate: undefined,
|
|
|
|
|
informationNote: undefined,
|
|
|
|
|
scheduleStatus: undefined,
|
|
|
|
|
projectReportStatus: undefined,
|
|
|
|
|
flowStatus: undefined,
|
|
|
|
|
sortOrder: undefined,
|
|
|
|
|
projectPhases: undefined,
|
|
|
|
|
contractId: undefined,
|
|
|
|
|
ossId: undefined,
|
|
|
|
|
activeFlag: undefined,
|
|
|
|
|
params: {}
|
|
|
|
|
},
|
|
|
|
|
rules: {}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 解构明细数据
|
|
|
|
|
const { form: detailForm, queryParams: detailQueryParams, rules: detailRules } = toRefs(projectReportDetailData);
|
|
|
|
|
|
|
|
|
|
// OSS功能
|
|
|
|
|
const dialog = reactive<DialogOption>({
|
|
|
|
|
visible: false,
|
|
|
|
|
@ -562,45 +756,20 @@ const projectReportList = ref<ProjectReportVO[]>([]);
|
|
|
|
|
const openProjectSelect = () => {
|
|
|
|
|
projectSelectRef.value.open();
|
|
|
|
|
};
|
|
|
|
|
/** 查询项目周报信息列表 */
|
|
|
|
|
const getList = async () => {
|
|
|
|
|
// loading.value = true;
|
|
|
|
|
const res = await listProjectReport(queryParams.value);
|
|
|
|
|
projectReportList.value = res.rows;
|
|
|
|
|
// loading.value = false;
|
|
|
|
|
};
|
|
|
|
|
//根据项目名称回调项目信息
|
|
|
|
|
const projectInfoSelectCallBack = (data: any) => {
|
|
|
|
|
if (data.length > 0) {
|
|
|
|
|
setFromProjectInfo(data);
|
|
|
|
|
getList();
|
|
|
|
|
Object.assign(form.value, data[0]);
|
|
|
|
|
} else {
|
|
|
|
|
projectFormRef.value?.resetFields();
|
|
|
|
|
proxy?.$modal.msgWarning('请选择项目信息');
|
|
|
|
|
getList();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
// 根据项目信息设置表格内容
|
|
|
|
|
const setFromProjectInfo = (data: any) => {
|
|
|
|
|
const projectInfoList = data;
|
|
|
|
|
form.value.projectId = projectInfoList[0].projectId;
|
|
|
|
|
form.value.projectName = projectInfoList[0].projectName;
|
|
|
|
|
form.value.projectCode = projectInfoList[0].projectCode;
|
|
|
|
|
form.value.managerId = projectInfoList[0].managerId;
|
|
|
|
|
form.value.milestonePlan = projectInfoList[0].milestonePlan;
|
|
|
|
|
form.value.deptId = projectInfoList[0].deptId;
|
|
|
|
|
form.value.chargeId = projectInfoList[0].chargeId;
|
|
|
|
|
form.value.deputyId = projectInfoList[0].deputyId;
|
|
|
|
|
form.value.managerName = projectInfoList[0].managerName;
|
|
|
|
|
form.value.deptName = projectInfoList[0].deptName;
|
|
|
|
|
form.value.chargeName = projectInfoList[0].chargeName;
|
|
|
|
|
form.value.deputyName = projectInfoList[0].deputyName;
|
|
|
|
|
};
|
|
|
|
|
/** 文件按钮操作 */
|
|
|
|
|
const handleFile = () => {
|
|
|
|
|
type.value = 0;
|
|
|
|
|
dialog.visible = true;
|
|
|
|
|
dialog.title = '上传合同附件';
|
|
|
|
|
dialog.title = '上传周报附件';
|
|
|
|
|
// 打开时回显已有附件
|
|
|
|
|
ossFileModel.value = form.value.ossId as any;
|
|
|
|
|
};
|
|
|
|
|
@ -634,21 +803,6 @@ const handleSelectionChange = (selection: ProjectReportDetailVO[]) => {
|
|
|
|
|
single.value = selection.length != 1;
|
|
|
|
|
multiple.value = !selection.length;
|
|
|
|
|
};
|
|
|
|
|
// 计算属性:检查项目周报明细列表的第一行是否有数据
|
|
|
|
|
const hasReportDetails = computed(() => {
|
|
|
|
|
return (
|
|
|
|
|
projectReportDetailList.value &&
|
|
|
|
|
projectReportDetailList.value.length > 0 &&
|
|
|
|
|
projectReportDetailList.value[0] &&
|
|
|
|
|
Object.keys(projectReportDetailList.value[0]).some(
|
|
|
|
|
(key) =>
|
|
|
|
|
projectReportDetailList.value[0][key] !== null &&
|
|
|
|
|
projectReportDetailList.value[0][key] !== undefined &&
|
|
|
|
|
projectReportDetailList.value[0][key] !== ''
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 列显隐信息
|
|
|
|
|
const columns = ref<FieldOption[]>([
|
|
|
|
|
{ key: 0, label: `项目周报明细ID`, visible: false },
|
|
|
|
|
@ -682,9 +836,10 @@ const columns = ref<FieldOption[]>([
|
|
|
|
|
|
|
|
|
|
// 项目周报明细表单引用
|
|
|
|
|
const projectReportFormRef = ref<ElFormInstance>();
|
|
|
|
|
const projectReportDetailDialogFormRef = ref<ElFormInstance>();
|
|
|
|
|
|
|
|
|
|
// 项目周报明细表单数据
|
|
|
|
|
const initprojectReportFormData: ProjectReportDetailFormEx = {
|
|
|
|
|
const initProjectReportFormData: ProjectReportDetailFormEx = {
|
|
|
|
|
reportDetailId: undefined,
|
|
|
|
|
reportId: undefined,
|
|
|
|
|
projectId: undefined,
|
|
|
|
|
@ -711,7 +866,8 @@ const initprojectReportFormData: ProjectReportDetailFormEx = {
|
|
|
|
|
variables: undefined
|
|
|
|
|
} as any;
|
|
|
|
|
|
|
|
|
|
const projectReportForm = ref<ProjectReportDetailFormEx>({ ...initprojectReportFormData });
|
|
|
|
|
const projectReportForm = ref<ProjectReportDetailFormEx>({ ...initProjectReportFormData });
|
|
|
|
|
|
|
|
|
|
const projectReportFormQuery = ref<ProjectReportDetailQuery>({
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
@ -809,7 +965,20 @@ const formattedPlannedCompletionRate = computed(() => {
|
|
|
|
|
// 转换为百分比显示(保留2位小数)
|
|
|
|
|
return `${(value * 100).toFixed(2)}%`;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
/** 表单重置 */
|
|
|
|
|
const reset = () => {
|
|
|
|
|
detailForm.value = { ...initProjectReportDetailFormData };
|
|
|
|
|
projectReportDetailDialogFormRef.value?.resetFields();
|
|
|
|
|
};
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
const handleUpdate = async (row?: ProjectReportDetailVO) => {
|
|
|
|
|
reset();
|
|
|
|
|
const _reportDetailId = row?.reportDetailId || ids.value[0];
|
|
|
|
|
const res = await getProjectReportDetail(_reportDetailId);
|
|
|
|
|
Object.assign(detailForm.value, res.data);
|
|
|
|
|
ReportDialog.visible = true;
|
|
|
|
|
ReportDialog.title = '修改项目周报明细';
|
|
|
|
|
};
|
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
|
const handleDelete = async (row?: ProjectReportDetailVO) => {
|
|
|
|
|
const _reportDetailIds = row?.reportDetailId || ids.value;
|
|
|
|
|
@ -819,48 +988,20 @@ const handleDelete = async (row?: ProjectReportDetailVO) => {
|
|
|
|
|
await getProjectDetail();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 编辑物料
|
|
|
|
|
const handleEditMaterial = (row: ContractMaterialVO) => {
|
|
|
|
|
resetProjectReportForm();
|
|
|
|
|
projectReportForm.value = { ...row };
|
|
|
|
|
ReportDialog.visible = true;
|
|
|
|
|
ReportDialog.title = '编辑合同物料';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 删除物料
|
|
|
|
|
const handleDeleteMaterial = async (row: ContractMaterialVO) => {
|
|
|
|
|
await proxy?.$modal.confirm('是否确认删除该合同物料?');
|
|
|
|
|
try {
|
|
|
|
|
// 确保contractMaterialList存在
|
|
|
|
|
if (!(form.value as any).contractMaterialList) {
|
|
|
|
|
(form.value as any).contractMaterialList = [];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 从本地数据中删除
|
|
|
|
|
const index = (form.value as any).contractMaterialList.findIndex((item: any) => item.contractMaterialId === row.contractMaterialId);
|
|
|
|
|
if (index !== -1) {
|
|
|
|
|
(form.value as any).contractMaterialList.splice(index, 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
proxy?.$modal.msgSuccess('删除成功');
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.error('删除合同物料失败:', error);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
|
const handleExport = () => {
|
|
|
|
|
proxy?.download(
|
|
|
|
|
'oa/erp/projectReportDetail/export',
|
|
|
|
|
{
|
|
|
|
|
...queryParams.value
|
|
|
|
|
reportId: form.value.reportId
|
|
|
|
|
},
|
|
|
|
|
`projectReportDetail_${new Date().getTime()}.xlsx`
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
// 重置项目周报添加对话框
|
|
|
|
|
const resetProjectReportForm = () => {
|
|
|
|
|
projectReportForm.value = { ...initprojectReportFormData };
|
|
|
|
|
projectReportFormRef.value?.resetFields();
|
|
|
|
|
detailForm.value = { ...initProjectReportDetailFormData };
|
|
|
|
|
projectReportDetailDialogFormRef.value?.resetFields();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 取消项目周报添加对话框
|
|
|
|
|
@ -869,34 +1010,18 @@ const cancelProjectReportForm = () => {
|
|
|
|
|
ReportDialog.visible = false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 提交项目周报添加对话框 - 直接保存到本地数组
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
const submitProjectReportForm = () => {
|
|
|
|
|
projectReportFormRef.value?.validate((valid: boolean) => {
|
|
|
|
|
projectReportDetailDialogFormRef.value?.validate(async (valid: boolean) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
// 确保contractMaterialList存在
|
|
|
|
|
if (!(form.value as any).contractMaterialList) {
|
|
|
|
|
(form.value as any).contractMaterialList = [];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (projectReportForm.value.contractMaterialId) {
|
|
|
|
|
// 编辑模式:更新现有物料
|
|
|
|
|
const index = (form.value as any).contractMaterialList.findIndex(
|
|
|
|
|
(item: any) => item.contractMaterialId === projectReportForm.value.contractMaterialId
|
|
|
|
|
);
|
|
|
|
|
if (index !== -1) {
|
|
|
|
|
(form.value as any).contractMaterialList[index] = { ...projectReportForm.value };
|
|
|
|
|
}
|
|
|
|
|
if (detailForm.value.reportDetailId) {
|
|
|
|
|
await updateProjectReportDetail(detailForm.value).finally(() => (buttonLoading.value = false));
|
|
|
|
|
} else {
|
|
|
|
|
// 新增模式:添加新物料
|
|
|
|
|
const newMaterial = {
|
|
|
|
|
...projectReportForm.value,
|
|
|
|
|
contractMaterialId: Date.now() // 临时ID
|
|
|
|
|
};
|
|
|
|
|
(form.value as any).contractMaterialList.push(newMaterial);
|
|
|
|
|
await addProjectReportDetail(detailForm.value).finally(() => (buttonLoading.value = false));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
proxy?.$modal.msgSuccess('操作成功');
|
|
|
|
|
ReportDialog.visible = false;
|
|
|
|
|
await getProjectDetail();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
@ -1071,8 +1196,6 @@ const saveToDraftCache = () => {
|
|
|
|
|
|
|
|
|
|
// 保存明细表单数据
|
|
|
|
|
proxy?.$cache.local.setJSON(CACHE_KEYS.PROJECT_REPORT_DETAIL_DRAFT, projectReportForm.value);
|
|
|
|
|
|
|
|
|
|
console.log('草稿数据已保存到缓存');
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.error('保存草稿到缓存失败:', error);
|
|
|
|
|
}
|
|
|
|
|
@ -1113,7 +1236,6 @@ const clearDraftCache = () => {
|
|
|
|
|
try {
|
|
|
|
|
proxy?.$cache.local.remove(CACHE_KEYS.PROJECT_REPORT_DRAFT);
|
|
|
|
|
proxy?.$cache.local.remove(CACHE_KEYS.PROJECT_REPORT_DETAIL_DRAFT);
|
|
|
|
|
console.log('草稿缓存已清除');
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.error('清除草稿缓存失败:', error);
|
|
|
|
|
}
|
|
|
|
|
@ -1130,11 +1252,11 @@ const handleClearDraft = () => {
|
|
|
|
|
initDefaultDate();
|
|
|
|
|
};
|
|
|
|
|
const getProjectDetail = async () => {
|
|
|
|
|
const res = await listProjectReportDetail(projectReportFormQuery.value);
|
|
|
|
|
buttonLoading.value = true;
|
|
|
|
|
loading.value = true;
|
|
|
|
|
const res = await listProjectReportDetail({ pageNum: 1, pageSize: 10, reportId: form.value.reportId });
|
|
|
|
|
projectReportDetailList.value = res.rows;
|
|
|
|
|
total.value = res.total;
|
|
|
|
|
buttonLoading.value = false;
|
|
|
|
|
loading.value = false;
|
|
|
|
|
};
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
const submitForm = async (status: string, mode: boolean) => {
|
|
|
|
|
@ -1188,8 +1310,7 @@ const submitForm = async (status: string, mode: boolean) => {
|
|
|
|
|
const msg = await generateCode();
|
|
|
|
|
// 流程变量
|
|
|
|
|
projectReportForm.value.variables = {
|
|
|
|
|
projectId: projectReportForm.value.projectId,
|
|
|
|
|
reportId: projectReportForm.value.reportId
|
|
|
|
|
projectId: form.value.projectId
|
|
|
|
|
};
|
|
|
|
|
// 流程实例业务扩展字段
|
|
|
|
|
projectReportForm.value.bizExt = {
|
|
|
|
|
@ -1197,6 +1318,7 @@ const submitForm = async (status: string, mode: boolean) => {
|
|
|
|
|
businessCode: msg
|
|
|
|
|
};
|
|
|
|
|
// 直接使用现有的两个表单数据
|
|
|
|
|
projectReportForm.value.projectId = form.value.projectId;
|
|
|
|
|
const requestData = {
|
|
|
|
|
projectReport: form.value, // 项目周报数据
|
|
|
|
|
projectDetailReport: projectReportForm.value // 项目周报明细数据
|
|
|
|
|
@ -1246,12 +1368,7 @@ onMounted(async () => {
|
|
|
|
|
Object.assign(projectReportForm.value, reportData);
|
|
|
|
|
projectReportForm.value.informationNote = '';
|
|
|
|
|
} else if (routeParams.value.type === 'view') {
|
|
|
|
|
Object.assign(projectReportFormQuery.value, reportData.reportId);
|
|
|
|
|
const res = await listProjectReportDetail(projectReportFormQuery.value);
|
|
|
|
|
buttonLoading.value = true;
|
|
|
|
|
projectReportDetailList.value = res.rows;
|
|
|
|
|
total.value = res.total;
|
|
|
|
|
buttonLoading.value = false;
|
|
|
|
|
await getProjectDetail();
|
|
|
|
|
}
|
|
|
|
|
proxy?.$modal.closeLoading();
|
|
|
|
|
} else if (routeParams.value.type === 'add') {
|
|
|
|
|
|