Commit 8b651d54 authored by neo's avatar neo

[dev] merger goserver

parent 9afa0ddd
......@@ -737,7 +737,7 @@
assetsManageSessionService.project.serviceTypeID = project.serviceTypeID;
//window.location.href = '/#/assetsManage/importData/productItem';
}
else {
else if (project.serviceTypeID === enums.serviceType.VAT) {
if (project.haveCreateProject) {
if (_.isUndefined(project.projectStatusList[vatSessionService.month])) { //如果当前期间还没有导入任何数据的话,就添加一条未开始状态的记录
projectService.setProjectStatus(project.dbName, vatSessionService.month, constant.ProjectStatusEnum.UnStarted)
......@@ -746,25 +746,12 @@
//添加完成后,在vatSessionService.project中添加新加入的数据
project.projectStatusList[vatSessionService.month] = constant.ProjectStatusEnum.UnStarted;
vatSessionService.project = project;
if (project.serviceTypeID === enums.serviceType.CIT) {
citSessionService.year = $scope.currentSelectedYear;
citSessionService.project = project;
}
//!!请把goRightPath()放在最内层的callback中,否则会在当前service没有执行完毕前就跳转到vat-layout.ctrl.js,
//从而造成一些bug
goRightPath(project);
}
});
}
else {
vatSessionService.project = project;
if (project.serviceTypeID === enums.serviceType.CIT) {
citSessionService.year = $scope.currentSelectedYear;
citSessionService.project = project;
}
vatSessionService.project = citSessionService.project = project;
goRightPath(project);
}
} else {
......@@ -786,12 +773,6 @@
if (or1.result) {
project.importSubStatus = or1.data.importSubStatus;
vatSessionService.project = project;
if (project.serviceTypeID === enums.serviceType.CIT) {
citSessionService.year = $scope.currentSelectedYear;
citSessionService.project = project;
}
goRightPath(project);
}
});
......@@ -801,21 +782,70 @@
}
else {
vatSessionService.project = project;
if (project.serviceTypeID === enums.serviceType.CIT) {
goRightPath(project);
}
}
else {
SweetAlert.error($translate.instant('AddProjectFail'));
}
});
}
}
else { // project.serviceTypeID === enums.serviceType.CIT
if (project.haveCreateProject) {
if (_.isUndefined(project.projectStatusList[enums.wholeYearPeriod.import])) { //如果当前期间还没有导入任何数据的话,就添加一条未开始状态的记录
projectService.setProjectStatus(project.dbName, enums.wholeYearPeriod.import, constant.ProjectStatusEnum.UnStarted)
.success(function (or) {
if (or.result) {
//添加完成后,在vatSessionService.project中添加新加入的数据
project.projectStatusList[enums.wholeYearPeriod.import] = constant.ProjectStatusEnum.UnStarted;
vatSessionService.project = citSessionService.project = project;
citSessionService.year = $scope.currentSelectedYear;
citSessionService.project = project;
goRightPath(project);
}
});
}
else {
vatSessionService.project = citSessionService.project = project;
citSessionService.year = $scope.currentSelectedYear;
goRightPath(project);
}
} else {
projectService.addProject(project).success(function (rsp) {
if (rsp && rsp.result) {
project.haveCreateProject = true;
project.dbName = rsp.dbname;
project.id = rsp.projectID;
if (_.isNull(project.projectStatusList)) { //如果当前期间还没有导入任何数据的话,就添加一条未开始状态的记录
projectService.setProjectStatus(project.dbName, enums.wholeYearPeriod.import, constant.ProjectStatusEnum.UnStarted)
.success(function (or) {
if (or.result) {
projectService.getProjectAllStatus(project.dbName).success(function (org) {
//添加完成后,在vatSessionService.project中添加新加入的数据
project.projectStatusList = org;
projectService.getProjectStatus(project.dbName, project.id, enums.wholeYearPeriod.import)
.success(function (or1) {
if (or1.result) {
project.importSubStatus = or1.data.importSubStatus;
vatSessionService.project = citSessionService.project = project;
citSessionService.year = $scope.currentSelectedYear;
goRightPath(project);
}
});
})
}
});
}
else {
vatSessionService.project = citSessionService.project = project;
citSessionService.year = $scope.currentSelectedYear;
goRightPath(project);
}
}
else {
SweetAlert.error($translate.instant('AddProjectFail'));
}
});
}
}
......@@ -827,6 +857,7 @@
}
};
$scope.toggleExpand = function (item) {
item.expand = !item.expand;
};
......
......@@ -1663,7 +1663,7 @@ frameworkModule.controller('appOverviewController', ['$rootScope', '$scope', '$t
assetsManageSessionService.project.serviceTypeID = project.serviceTypeID;
//window.location.href = '/#/assetsManage/importData/productItem';
}
else {
else if (project.serviceTypeID === enums.serviceType.VAT) {
if (project.haveCreateProject) {
if (_.isUndefined(project.projectStatusList[vatSessionService.month])) { //如果当前期间还没有导入任何数据的话,就添加一条未开始状态的记录
projectService.setProjectStatus(project.dbName, vatSessionService.month, constant.ProjectStatusEnum.UnStarted)
......@@ -1672,25 +1672,12 @@ frameworkModule.controller('appOverviewController', ['$rootScope', '$scope', '$t
//添加完成后,在vatSessionService.project中添加新加入的数据
project.projectStatusList[vatSessionService.month] = constant.ProjectStatusEnum.UnStarted;
vatSessionService.project = project;
if (project.serviceTypeID === enums.serviceType.CIT) {
citSessionService.year = $scope.currentSelectedYear;
citSessionService.project = project;
}
//!!请把goRightPath()放在最内层的callback中,否则会在当前service没有执行完毕前就跳转到vat-layout.ctrl.js,
//从而造成一些bug
goRightPath(project);
}
});
}
else {
vatSessionService.project = project;
if (project.serviceTypeID === enums.serviceType.CIT) {
citSessionService.year = $scope.currentSelectedYear;
citSessionService.project = project;
}
vatSessionService.project = citSessionService.project = project;
goRightPath(project);
}
} else {
......@@ -1712,12 +1699,6 @@ frameworkModule.controller('appOverviewController', ['$rootScope', '$scope', '$t
if (or1.result) {
project.importSubStatus = or1.data.importSubStatus;
vatSessionService.project = project;
if (project.serviceTypeID === enums.serviceType.CIT) {
citSessionService.year = $scope.currentSelectedYear;
citSessionService.project = project;
}
goRightPath(project);
}
});
......@@ -1727,21 +1708,70 @@ frameworkModule.controller('appOverviewController', ['$rootScope', '$scope', '$t
}
else {
vatSessionService.project = project;
if (project.serviceTypeID === enums.serviceType.CIT) {
goRightPath(project);
}
}
else {
SweetAlert.error($translate.instant('AddProjectFail'));
}
});
}
}
else { // project.serviceTypeID === enums.serviceType.CIT
if (project.haveCreateProject) {
if (_.isUndefined(project.projectStatusList[enums.wholeYearPeriod.import])) { //如果当前期间还没有导入任何数据的话,就添加一条未开始状态的记录
projectService.setProjectStatus(project.dbName, enums.wholeYearPeriod.import, constant.ProjectStatusEnum.UnStarted)
.success(function (or) {
if (or.result) {
//添加完成后,在vatSessionService.project中添加新加入的数据
project.projectStatusList[enums.wholeYearPeriod.import] = constant.ProjectStatusEnum.UnStarted;
vatSessionService.project = citSessionService.project = project;
citSessionService.year = $scope.currentSelectedYear;
citSessionService.project = project;
goRightPath(project);
}
});
}
else {
vatSessionService.project = citSessionService.project = project;
citSessionService.year = $scope.currentSelectedYear;
goRightPath(project);
}
} else {
projectService.addProject(project).success(function (rsp) {
if (rsp && rsp.result) {
project.haveCreateProject = true;
project.dbName = rsp.dbname;
project.id = rsp.projectID;
if (_.isNull(project.projectStatusList)) { //如果当前期间还没有导入任何数据的话,就添加一条未开始状态的记录
projectService.setProjectStatus(project.dbName, enums.wholeYearPeriod.import, constant.ProjectStatusEnum.UnStarted)
.success(function (or) {
if (or.result) {
projectService.getProjectAllStatus(project.dbName).success(function (org) {
//添加完成后,在vatSessionService.project中添加新加入的数据
project.projectStatusList = org;
projectService.getProjectStatus(project.dbName, project.id, enums.wholeYearPeriod.import)
.success(function (or1) {
if (or1.result) {
project.importSubStatus = or1.data.importSubStatus;
vatSessionService.project = citSessionService.project = project;
citSessionService.year = $scope.currentSelectedYear;
goRightPath(project);
}
});
})
}
});
}
else {
vatSessionService.project = citSessionService.project = project;
citSessionService.year = $scope.currentSelectedYear;
goRightPath(project);
}
}
else {
SweetAlert.error($translate.instant('AddProjectFail'));
}
});
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment