|
|
|
|
@ -80,6 +80,17 @@
|
|
|
|
|
<!-- >修改-->
|
|
|
|
|
<!-- </el-button>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
plain
|
|
|
|
|
icon="Setting"
|
|
|
|
|
:disabled="single"
|
|
|
|
|
@click="openMaintainFromSelection()"
|
|
|
|
|
v-hasPermi="['oa/erp:projectInfo:update']"
|
|
|
|
|
>项目信息维护
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['oa/erp:projectInfo:remove']"
|
|
|
|
|
>删除
|
|
|
|
|
@ -136,6 +147,18 @@
|
|
|
|
|
<el-table-column label="分管副总" align="center" prop="deputyName" width="100" v-if="columns[13].visible" />
|
|
|
|
|
<el-table-column label="抄送人员" align="center" prop="peopleId" v-if="columns[14].visible" />
|
|
|
|
|
<el-table-column label="金额" align="center" prop="amount" width="110" v-if="columns[15].visible" />
|
|
|
|
|
<el-table-column label="产品数量" align="center" prop="productQty" width="100" v-if="columns[28].visible" />
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="项目进度状态"
|
|
|
|
|
align="center"
|
|
|
|
|
prop="projectProgressStatus"
|
|
|
|
|
min-width="120"
|
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
v-if="columns[32].visible"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column label="项目阶段" align="center" prop="projectPhase" min-width="120" show-overflow-tooltip v-if="columns[29].visible" />
|
|
|
|
|
<el-table-column label="情况说明" align="center" prop="situationDesc" min-width="140" show-overflow-tooltip v-if="columns[30].visible" />
|
|
|
|
|
<el-table-column label="需要开展工作" align="center" prop="requiredWork" min-width="140" show-overflow-tooltip v-if="columns[31].visible" />
|
|
|
|
|
<el-table-column label="流程状态" align="center" prop="flowStatus" v-if="columns[17].visible">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<dict-tag :options="wf_business_status" :value="scope.row.flowStatus" />
|
|
|
|
|
@ -174,12 +197,48 @@
|
|
|
|
|
</el-card>
|
|
|
|
|
<!-- 审批记录 -->
|
|
|
|
|
<ApprovalRecord ref="approvalRecordRef" />
|
|
|
|
|
|
|
|
|
|
<el-dialog v-model="maintainOpen" title="项目信息维护(项目台账使用)" width="560px" append-to-body destroy-on-close @closed="resetMaintainForm">
|
|
|
|
|
<el-form ref="maintainFormRef" :model="maintainForm" :rules="maintainRules" label-width="110px">
|
|
|
|
|
<el-form-item label="项目编号">
|
|
|
|
|
<el-input v-model="maintainForm.projectCode" disabled />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="项目名称">
|
|
|
|
|
<el-input v-model="maintainForm.projectName" disabled />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="产品数量" prop="productQty">
|
|
|
|
|
<el-input-number v-model="maintainForm.productQty" :min="0" :precision="0" controls-position="right" class="w-full" placeholder="产品数量" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="项目进度状态" prop="projectProgressStatus">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="maintainForm.projectProgressStatus"
|
|
|
|
|
maxlength="500"
|
|
|
|
|
show-word-limit
|
|
|
|
|
placeholder="请输入项目进度状态"
|
|
|
|
|
clearable
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="项目阶段" prop="projectPhase">
|
|
|
|
|
<el-input v-model="maintainForm.projectPhase" maxlength="500" show-word-limit placeholder="请输入项目阶段" clearable />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="情况说明" prop="situationDesc">
|
|
|
|
|
<el-input v-model="maintainForm.situationDesc" type="textarea" :rows="3" maxlength="2000" show-word-limit placeholder="请输入情况说明" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="需要开展工作" prop="requiredWork">
|
|
|
|
|
<el-input v-model="maintainForm.requiredWork" type="textarea" :rows="3" maxlength="2000" show-word-limit placeholder="请输入需要开展工作" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<el-button @click="maintainOpen = false">取 消</el-button>
|
|
|
|
|
<el-button type="primary" :loading="maintainSubmitting" @click="submitMaintain">确 定</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup name="ProjectInfo" lang="ts">
|
|
|
|
|
import { listProjectInfo, delProjectInfo } from '@/api/oa/erp/projectInfo';
|
|
|
|
|
import { ProjectInfoVO, ProjectInfoQuery } from '@/api/oa/erp/projectInfo/types';
|
|
|
|
|
import { listProjectInfo, delProjectInfo, getProjectInfo, maintainProjectInfo } from '@/api/oa/erp/projectInfo';
|
|
|
|
|
import { ProjectInfoVO, ProjectInfoQuery, ProjectInfoForm } from '@/api/oa/erp/projectInfo/types';
|
|
|
|
|
import { cancelProcessApply } from '@/api/workflow/instance';
|
|
|
|
|
import ApprovalRecord from '@/components/Process/approvalRecord.vue';
|
|
|
|
|
import { useUserStore } from '@/store/modules/user';
|
|
|
|
|
@ -237,7 +296,12 @@ const columns = ref<FieldOption[]>([
|
|
|
|
|
{ key: 24, label: `创建人`, visible: false },
|
|
|
|
|
{ key: 25, label: `创建时间`, visible: false },
|
|
|
|
|
{ key: 26, label: `更新人`, visible: false },
|
|
|
|
|
{ key: 27, label: `更新时间`, visible: false }
|
|
|
|
|
{ key: 27, label: `更新时间`, visible: false },
|
|
|
|
|
{ key: 28, label: `产品数量`, visible: true },
|
|
|
|
|
{ key: 29, label: `项目阶段`, visible: true },
|
|
|
|
|
{ key: 30, label: `情况说明`, visible: true },
|
|
|
|
|
{ key: 31, label: `需要开展工作`, visible: true },
|
|
|
|
|
{ key: 32, label: `项目进度状态`, visible: true }
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
const data = reactive<{ queryParams: ProjectInfoQuery }>({
|
|
|
|
|
@ -269,6 +333,90 @@ const data = reactive<{ queryParams: ProjectInfoQuery }>({
|
|
|
|
|
|
|
|
|
|
const { queryParams } = toRefs(data);
|
|
|
|
|
|
|
|
|
|
const maintainOpen = ref(false);
|
|
|
|
|
const maintainSubmitting = ref(false);
|
|
|
|
|
const maintainFormRef = ref<ElFormInstance>();
|
|
|
|
|
|
|
|
|
|
type MaintainFormModel = ProjectInfoForm & { projectCode?: string; projectName?: string };
|
|
|
|
|
|
|
|
|
|
const maintainForm = reactive<MaintainFormModel>({
|
|
|
|
|
projectId: '',
|
|
|
|
|
projectCode: '',
|
|
|
|
|
projectName: '',
|
|
|
|
|
productQty: undefined,
|
|
|
|
|
projectProgressStatus: '',
|
|
|
|
|
projectPhase: '',
|
|
|
|
|
situationDesc: '',
|
|
|
|
|
requiredWork: ''
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const maintainRules = {
|
|
|
|
|
projectPhase: [{ required: true, message: '请输入项目阶段', trigger: 'blur' }],
|
|
|
|
|
situationDesc: [{ required: true, message: '请输入情况说明', trigger: 'blur' }]
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const resetMaintainForm = () => {
|
|
|
|
|
maintainForm.projectId = '';
|
|
|
|
|
maintainForm.projectCode = '';
|
|
|
|
|
maintainForm.projectName = '';
|
|
|
|
|
maintainForm.productQty = undefined;
|
|
|
|
|
maintainForm.projectProgressStatus = '';
|
|
|
|
|
maintainForm.projectPhase = '';
|
|
|
|
|
maintainForm.situationDesc = '';
|
|
|
|
|
maintainForm.requiredWork = '';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const openMaintainFromSelection = () => {
|
|
|
|
|
const id = ids.value[0];
|
|
|
|
|
const row = projectInfoList.value.find((item) => item.projectId === id);
|
|
|
|
|
if (row) {
|
|
|
|
|
openMaintain(row);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const openMaintain = async (row: ProjectInfoVO) => {
|
|
|
|
|
proxy?.$modal.loading('加载中...');
|
|
|
|
|
try {
|
|
|
|
|
const res = await getProjectInfo(row.projectId);
|
|
|
|
|
const data = res.data as ProjectInfoVO;
|
|
|
|
|
maintainForm.projectId = data.projectId;
|
|
|
|
|
maintainForm.projectCode = data.projectCode;
|
|
|
|
|
maintainForm.projectName = data.projectName;
|
|
|
|
|
maintainForm.productQty = data.productQty ?? undefined;
|
|
|
|
|
maintainForm.projectProgressStatus = data.projectProgressStatus ?? '';
|
|
|
|
|
maintainForm.projectPhase = data.projectPhase ?? '';
|
|
|
|
|
maintainForm.situationDesc = data.situationDesc ?? '';
|
|
|
|
|
maintainForm.requiredWork = data.requiredWork ?? '';
|
|
|
|
|
maintainOpen.value = true;
|
|
|
|
|
nextTick(() => maintainFormRef.value?.clearValidate());
|
|
|
|
|
} finally {
|
|
|
|
|
proxy?.$modal.closeLoading();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const submitMaintain = () => {
|
|
|
|
|
maintainFormRef.value?.validate(async (valid: boolean) => {
|
|
|
|
|
if (!valid) return;
|
|
|
|
|
maintainSubmitting.value = true;
|
|
|
|
|
try {
|
|
|
|
|
const payload: ProjectInfoForm = {
|
|
|
|
|
projectId: maintainForm.projectId,
|
|
|
|
|
productQty: maintainForm.productQty ?? null,
|
|
|
|
|
projectProgressStatus: maintainForm.projectProgressStatus,
|
|
|
|
|
projectPhase: maintainForm.projectPhase,
|
|
|
|
|
situationDesc: maintainForm.situationDesc,
|
|
|
|
|
requiredWork: maintainForm.requiredWork
|
|
|
|
|
};
|
|
|
|
|
await maintainProjectInfo(payload);
|
|
|
|
|
proxy?.$modal.msgSuccess('保存成功');
|
|
|
|
|
maintainOpen.value = false;
|
|
|
|
|
await getList();
|
|
|
|
|
} finally {
|
|
|
|
|
maintainSubmitting.value = false;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** 查询项目信息列表 */
|
|
|
|
|
const getList = async () => {
|
|
|
|
|
loading.value = true;
|
|
|
|
|
|