|
@@ -50,20 +50,23 @@ export class ProjectManageArchivesUpdateComponent implements OnInit {
|
|
) {}
|
|
) {}
|
|
|
|
|
|
ngOnInit(): void {
|
|
ngOnInit(): void {
|
|
- this.isLoadingSave=true;
|
|
|
|
|
|
+ this.isLoadingSave = true;
|
|
//计划类型
|
|
//计划类型
|
|
- this.getPlanType().then(()=>{
|
|
|
|
- //人员下拉
|
|
|
|
- return this.getPersonnelList();
|
|
|
|
- }).then(()=>{
|
|
|
|
- //里程碑类型
|
|
|
|
- return this.getTypeList();
|
|
|
|
- }).then(()=>{
|
|
|
|
- return this.getById();
|
|
|
|
- }).then(()=>{
|
|
|
|
- this.isLoadingSave=false;
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
|
|
+ this.getPlanType()
|
|
|
|
+ .then(() => {
|
|
|
|
+ //人员下拉
|
|
|
|
+ return this.getPersonnelList();
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ //里程碑类型
|
|
|
|
+ return this.getTypeList();
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ return this.getById();
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ this.isLoadingSave = false;
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
isLoadingSave = false; //保存加载
|
|
isLoadingSave = false; //保存加载
|
|
@@ -161,13 +164,12 @@ export class ProjectManageArchivesUpdateComponent implements OnInit {
|
|
* 获取里程碑类型到基本信息中
|
|
* 获取里程碑类型到基本信息中
|
|
*/
|
|
*/
|
|
getTypeList() {
|
|
getTypeList() {
|
|
- return new Promise((resolve)=>{
|
|
|
|
|
|
+ return new Promise(resolve => {
|
|
this.dictService.getByDictCode('base_archives_milestone_type').then(response => {
|
|
this.dictService.getByDictCode('base_archives_milestone_type').then(response => {
|
|
this.essentialInformation.milestoneList = response.result;
|
|
this.essentialInformation.milestoneList = response.result;
|
|
resolve();
|
|
resolve();
|
|
});
|
|
});
|
|
- })
|
|
|
|
-
|
|
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -220,57 +222,58 @@ export class ProjectManageArchivesUpdateComponent implements OnInit {
|
|
*/
|
|
*/
|
|
save() {
|
|
save() {
|
|
return new Promise(resolve => {
|
|
return new Promise(resolve => {
|
|
- this.isLoadingSave=true;
|
|
|
|
//基本信息中的
|
|
//基本信息中的
|
|
- this.essentialInformation.submitForm();
|
|
|
|
- //基本信息
|
|
|
|
- let projectManageArchives = this.essentialInformation.projectManageArchivesa;
|
|
|
|
- //组织
|
|
|
|
- projectManageArchives.pkOrg = sessionStorage.getItem('pkOrg');
|
|
|
|
- ////////////商务页签的计划表格数据
|
|
|
|
- //已回款金额
|
|
|
|
- projectManageArchives.received=this.businessAffairs.projectManageArchives.received;
|
|
|
|
- let bsInfo: any = {};
|
|
|
|
- bsInfo.coPlanList = this.businessAffairs.collectionPlanList; //收款计划
|
|
|
|
- bsInfo.coSituationList = this.businessAffairs.paymentCollectionList; //收款情况
|
|
|
|
- bsInfo.payPlanList = this.businessAffairs.paymentPlanList; //付款计划
|
|
|
|
- bsInfo.paySituationList = this.businessAffairs.paymentStatusList; //付款情况
|
|
|
|
- projectManageArchives.bsInfo = bsInfo;
|
|
|
|
- ////////////实施页签的计划树形表格数据
|
|
|
|
- let ipInfo: any = {};
|
|
|
|
- let implementation = [];
|
|
|
|
- //获取计划里程碑明细
|
|
|
|
- this.getMileItem(this.implementation, implementation);
|
|
|
|
- ipInfo.planList = implementation;
|
|
|
|
- projectManageArchives.ipInfo = ipInfo;
|
|
|
|
- ////////////实施页签的计划树形表格数据
|
|
|
|
- let deInfo: any = {};
|
|
|
|
- let development = [];
|
|
|
|
- //获取计划里程碑明细
|
|
|
|
- this.getMileItem(this.development, development);
|
|
|
|
- deInfo.planList = development;
|
|
|
|
- projectManageArchives.deInfo = deInfo;
|
|
|
|
- ////////////实施页签的计划树形表格数据
|
|
|
|
- let seInfo: any = {};
|
|
|
|
- let serviceta = [];
|
|
|
|
- //获取计划里程碑明细
|
|
|
|
- this.getMileItem(this.serviceta, serviceta);
|
|
|
|
- seInfo.planList = serviceta;
|
|
|
|
- projectManageArchives.seInfo = seInfo;
|
|
|
|
- console.log(JSON.stringify(projectManageArchives))
|
|
|
|
- this.projectManageArchivesService.update(projectManageArchives).then(response => {
|
|
|
|
- if (response.success) {
|
|
|
|
- //保存成功
|
|
|
|
- this.isLoadingSave=false;
|
|
|
|
- this.nzNotificationService.success(this.i18NService.fanyi('save.ok'), '');
|
|
|
|
- this.drawerRef.close(true);
|
|
|
|
- resolve();
|
|
|
|
- } else {
|
|
|
|
- //保存失败
|
|
|
|
- this.isLoadingSave=false;
|
|
|
|
- this.nzNotificationService.error(this.i18NService.fanyi('save.not'), '');
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ if (this.essentialInformation.submitForm()) {
|
|
|
|
+ this.isLoadingSave = true;
|
|
|
|
+ //基本信息
|
|
|
|
+ let projectManageArchives = this.essentialInformation.projectManageArchivesa;
|
|
|
|
+ //组织
|
|
|
|
+ projectManageArchives.pkOrg = sessionStorage.getItem('pkOrg');
|
|
|
|
+ ////////////商务页签的计划表格数据
|
|
|
|
+ //已回款金额
|
|
|
|
+ projectManageArchives.received = this.businessAffairs.projectManageArchives.received;
|
|
|
|
+ let bsInfo: any = {};
|
|
|
|
+ bsInfo.coPlanList = this.businessAffairs.collectionPlanList; //收款计划
|
|
|
|
+ bsInfo.coSituationList = this.businessAffairs.paymentCollectionList; //收款情况
|
|
|
|
+ bsInfo.payPlanList = this.businessAffairs.paymentPlanList; //付款计划
|
|
|
|
+ bsInfo.paySituationList = this.businessAffairs.paymentStatusList; //付款情况
|
|
|
|
+ projectManageArchives.bsInfo = bsInfo;
|
|
|
|
+ ////////////实施页签的计划树形表格数据
|
|
|
|
+ let ipInfo: any = {};
|
|
|
|
+ let implementation = [];
|
|
|
|
+ //获取计划里程碑明细
|
|
|
|
+ this.getMileItem(this.implementation, implementation);
|
|
|
|
+ ipInfo.planList = implementation;
|
|
|
|
+ projectManageArchives.ipInfo = ipInfo;
|
|
|
|
+ ////////////实施页签的计划树形表格数据
|
|
|
|
+ let deInfo: any = {};
|
|
|
|
+ let development = [];
|
|
|
|
+ //获取计划里程碑明细
|
|
|
|
+ this.getMileItem(this.development, development);
|
|
|
|
+ deInfo.planList = development;
|
|
|
|
+ projectManageArchives.deInfo = deInfo;
|
|
|
|
+ ////////////实施页签的计划树形表格数据
|
|
|
|
+ let seInfo: any = {};
|
|
|
|
+ let serviceta = [];
|
|
|
|
+ //获取计划里程碑明细
|
|
|
|
+ this.getMileItem(this.serviceta, serviceta);
|
|
|
|
+ seInfo.planList = serviceta;
|
|
|
|
+ projectManageArchives.seInfo = seInfo;
|
|
|
|
+ console.log(JSON.stringify(projectManageArchives));
|
|
|
|
+ this.projectManageArchivesService.update(projectManageArchives).then(response => {
|
|
|
|
+ if (response.success) {
|
|
|
|
+ //保存成功
|
|
|
|
+ this.isLoadingSave = false;
|
|
|
|
+ this.nzNotificationService.success(this.i18NService.fanyi('save.ok'), '');
|
|
|
|
+ this.drawerRef.close(true);
|
|
|
|
+ resolve();
|
|
|
|
+ } else {
|
|
|
|
+ //保存失败
|
|
|
|
+ this.isLoadingSave = false;
|
|
|
|
+ this.nzNotificationService.error(this.i18NService.fanyi('save.not'), '');
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
@@ -332,39 +335,39 @@ export class ProjectManageArchivesUpdateComponent implements OnInit {
|
|
///////////////基本信息页签
|
|
///////////////基本信息页签
|
|
this.essentialInformation.projectManageArchivesa = projectManageArchives;
|
|
this.essentialInformation.projectManageArchivesa = projectManageArchives;
|
|
//业务员多选数据
|
|
//业务员多选数据
|
|
- this.essentialInformation.saleManIds=this.getPeronnelIds(projectManageArchives.saleManId);
|
|
|
|
|
|
+ this.essentialInformation.saleManIds = this.getPeronnelIds(projectManageArchives.saleManId);
|
|
//实施顾问多选数据
|
|
//实施顾问多选数据
|
|
- this.essentialInformation.impConsultantIds=this.getPeronnelIds(projectManageArchives.impConsultantId);
|
|
|
|
|
|
+ this.essentialInformation.impConsultantIds = this.getPeronnelIds(projectManageArchives.impConsultantId);
|
|
//开发工程师多选数据
|
|
//开发工程师多选数据
|
|
- this.essentialInformation.deEngineerIds=this.getPeronnelIds(projectManageArchives.deEngineerId);
|
|
|
|
|
|
+ this.essentialInformation.deEngineerIds = this.getPeronnelIds(projectManageArchives.deEngineerId);
|
|
//服务工程师多选数据
|
|
//服务工程师多选数据
|
|
- this.essentialInformation.seEngineerIds=this.getPeronnelIds(projectManageArchives.seEngineerId);
|
|
|
|
|
|
+ this.essentialInformation.seEngineerIds = this.getPeronnelIds(projectManageArchives.seEngineerId);
|
|
///////////////商务页签
|
|
///////////////商务页签
|
|
//主表数据
|
|
//主表数据
|
|
// this.businessAffairs.projectManageArchives = projectManageArchives;
|
|
// this.businessAffairs.projectManageArchives = projectManageArchives;
|
|
//收款计划
|
|
//收款计划
|
|
- if(projectManageArchives.bsInfo.coPlanList){
|
|
|
|
|
|
+ if (projectManageArchives.bsInfo.coPlanList) {
|
|
this.businessAffairs.collectionPlanList = projectManageArchives.bsInfo.coPlanList;
|
|
this.businessAffairs.collectionPlanList = projectManageArchives.bsInfo.coPlanList;
|
|
- this.businessAffairs.collectionPlanSort=projectManageArchives.bsInfo.coPlanList.length+1;
|
|
|
|
|
|
+ this.businessAffairs.collectionPlanSort = projectManageArchives.bsInfo.coPlanList.length + 1;
|
|
}
|
|
}
|
|
//回款情况
|
|
//回款情况
|
|
- if(projectManageArchives.bsInfo.coSituationList){
|
|
|
|
|
|
+ if (projectManageArchives.bsInfo.coSituationList) {
|
|
this.businessAffairs.paymentCollectionList = projectManageArchives.bsInfo.coSituationList;
|
|
this.businessAffairs.paymentCollectionList = projectManageArchives.bsInfo.coSituationList;
|
|
- this.businessAffairs.paymentCollectionSort=projectManageArchives.bsInfo.coSituationList.length+1;
|
|
|
|
|
|
+ this.businessAffairs.paymentCollectionSort = projectManageArchives.bsInfo.coSituationList.length + 1;
|
|
}
|
|
}
|
|
//付款计划
|
|
//付款计划
|
|
- if(projectManageArchives.bsInfo.payPlanList){
|
|
|
|
|
|
+ if (projectManageArchives.bsInfo.payPlanList) {
|
|
this.businessAffairs.paymentPlanList = projectManageArchives.bsInfo.payPlanList;
|
|
this.businessAffairs.paymentPlanList = projectManageArchives.bsInfo.payPlanList;
|
|
- this.businessAffairs.paymentPlanSort=projectManageArchives.bsInfo.payPlanList.length+1;
|
|
|
|
|
|
+ this.businessAffairs.paymentPlanSort = projectManageArchives.bsInfo.payPlanList.length + 1;
|
|
}
|
|
}
|
|
//付款情况
|
|
//付款情况
|
|
- if(projectManageArchives.bsInfo.paySituationList){
|
|
|
|
|
|
+ if (projectManageArchives.bsInfo.paySituationList) {
|
|
this.businessAffairs.paymentStatusList = projectManageArchives.bsInfo.paySituationList;
|
|
this.businessAffairs.paymentStatusList = projectManageArchives.bsInfo.paySituationList;
|
|
- this.businessAffairs.paymentStatusSort=projectManageArchives.bsInfo.paySituationList.length+1;
|
|
|
|
|
|
+ this.businessAffairs.paymentStatusSort = projectManageArchives.bsInfo.paySituationList.length + 1;
|
|
}
|
|
}
|
|
//对应的收款情况
|
|
//对应的收款情况
|
|
this.businessAffairs.paymentCollectionList.forEach(element => {
|
|
this.businessAffairs.paymentCollectionList.forEach(element => {
|
|
- this.remittanceInformationChange(element)
|
|
|
|
|
|
+ this.remittanceInformationChange(element);
|
|
});
|
|
});
|
|
/////////////////实施
|
|
/////////////////实施
|
|
//主表基本数据
|
|
//主表基本数据
|
|
@@ -388,15 +391,13 @@ export class ProjectManageArchivesUpdateComponent implements OnInit {
|
|
* 获取多选下拉列表中绑定的id数组
|
|
* 获取多选下拉列表中绑定的id数组
|
|
* @param personnels 多选人员id字符
|
|
* @param personnels 多选人员id字符
|
|
*/
|
|
*/
|
|
- getPeronnelIds(personnels):any{
|
|
|
|
- if(personnels){
|
|
|
|
|
|
+ getPeronnelIds(personnels): any {
|
|
|
|
+ if (personnels) {
|
|
//截取为数组
|
|
//截取为数组
|
|
- let personnelIdList=personnels.split("、");
|
|
|
|
|
|
+ let personnelIdList = personnels.split('、');
|
|
return personnelIdList;
|
|
return personnelIdList;
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
return [];
|
|
return [];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|