diff --git a/src/api/oa/erp/projectInfo/types.ts b/src/api/oa/erp/projectInfo/types.ts index b0b2992..ee68741 100644 --- a/src/api/oa/erp/projectInfo/types.ts +++ b/src/api/oa/erp/projectInfo/types.ts @@ -34,6 +34,11 @@ export interface ProjectInfoVO { */ spareFlag: string; + /** + * 单合同标识(1是 0否) + */ + singleContractFlag: string; + /** * 项目类型ID */ @@ -94,6 +99,11 @@ export interface ProjectInfoVO { */ contractId: string | number; + /** + * 合同跟进人 + */ + contractUserId?: string | number; + /** * 备注 */ @@ -164,6 +174,11 @@ export interface ProjectInfoForm extends BaseEntity { */ spareFlag?: string; + /** + * 单合同标识(1是 0否) + */ + singleContractFlag?: string; + /** * 项目类型ID */ @@ -224,6 +239,11 @@ export interface ProjectInfoForm extends BaseEntity { */ contractId?: string | number; + /** + * 合同跟进人 + */ + contractUserId?: string | number; + /** * 备注 */ @@ -271,6 +291,11 @@ export interface ProjectInfoForm extends BaseEntity { * 合同名称 */ contractName?: string; + + /** + * 合同跟进人名称 + */ + contractUserName?: string; } export interface ProjectInfoQuery extends PageQuery { @@ -304,6 +329,11 @@ export interface ProjectInfoQuery extends PageQuery { */ spareFlag?: string; + /** + * 单合同标识(1是 0否) + */ + singleContractFlag?: string; + /** * 项目类型ID */ @@ -364,6 +394,11 @@ export interface ProjectInfoQuery extends PageQuery { */ contractId?: string | number; + /** + * 合同跟进人 + */ + contractUserId?: string | number; + /** * 激活标识(1是 0否) */ diff --git a/src/views/oa/erp/projectInfo/edit.vue b/src/views/oa/erp/projectInfo/edit.vue index ac439d9..7b0abae 100644 --- a/src/views/oa/erp/projectInfo/edit.vue +++ b/src/views/oa/erp/projectInfo/edit.vue @@ -14,6 +14,51 @@ /> + + + + + + + + + + + + + + + + + + + + + + + + @@ -24,9 +69,16 @@ + + + + {{ dict.label }} + + + - + @@ -52,13 +104,13 @@ - - - - {{ dict.label }} - - - + + + + + + + - - - - - + + + + + @@ -103,6 +155,13 @@ + + + + + + + @@ -133,51 +192,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -278,8 +292,8 @@ const router = useRouter(); // 路由参数 const routeParams = ref>({}); -const { business_direction, project_status, contract_flag, project_category, spare_flag, contract_status } = toRefs( - proxy?.useDict('business_direction', 'project_status', 'contract_flag', 'project_category', 'spare_flag', 'contract_status') +const { business_direction, project_status, contract_flag, project_category, spare_flag, single_contract_flag, contract_status } = toRefs( + proxy?.useDict('business_direction', 'project_status', 'contract_flag', 'project_category', 'spare_flag', 'single_contract_flag', 'contract_status') ); const buttonLoading = ref(false); @@ -347,6 +361,7 @@ const initFormData: ProjectInfoFormEx = { businessDirection: undefined, projectCategory: undefined, spareFlag: undefined, + singleContractFlag: '1', projectTypeId: undefined, paymentMethod: undefined, deptId: undefined, @@ -359,6 +374,7 @@ const initFormData: ProjectInfoFormEx = { flowStatus: undefined, sortOrder: 0, contractId: undefined, + contractUserId: undefined, remark: undefined, activeFlag: '1', flowCode: undefined, @@ -593,6 +609,7 @@ const contractLoading = ref(false); const projectContractsList = computed(() => { return (form.value as any).projectContractsList || []; }); +const isSingleContract = computed(() => form.value.singleContractFlag === '1'); const contractDialog = reactive({ visible: false }); const contractTableRef = ref(); const contractSelectLoading = ref(false); @@ -627,6 +644,10 @@ const getProjectContractsList = async () => { /** 打开添加合同关联对话框 */ const handleAddContract = () => { + if (isSingleContract.value && projectContractsList.value.length >= 1) { + proxy?.$modal.msgWarning('单合同项目仅允许关联一个合同。'); + return; + } contractDialog.visible = true; contractQueryParams.value.pageNum = 1; getContractList(); @@ -691,6 +712,11 @@ const submitContractRelation = () => { (form.value as any).projectContractsList.push(newContract); }); + if (isSingleContract.value && form.value.projectContractsList.length > 0) { + form.value.businessDirection = form.value.projectContractsList[0].businessDirection; + form.value.amount = form.value.projectContractsList[0].totalPrice; + } + proxy?.$modal.msgSuccess('添加关联成功'); contractDialog.visible = false; selectedContracts.value = []; diff --git a/src/views/oa/erp/projectInfo/index.vue b/src/views/oa/erp/projectInfo/index.vue index f0e7b90..cf8a344 100644 --- a/src/views/oa/erp/projectInfo/index.vue +++ b/src/views/oa/erp/projectInfo/index.vue @@ -75,11 +75,11 @@ - - 修改 - - + + + + + 删除