Commit 61649b25 authored by gary's avatar gary

1、fixbug

parent 8d2b4f76
...@@ -149,5 +149,6 @@ ...@@ -149,5 +149,6 @@
"ErrorMesssage": "Error Message", "ErrorMesssage": "Error Message",
"ImportPartialSuccess":"Import with some errors", "ImportPartialSuccess":"Import with some errors",
"ImportErrorMsg":"Three are {NumberOfError} error(s),Please revise and import again(only import the error record(s)).", "ImportErrorMsg":"Three are {NumberOfError} error(s),Please revise and import again(only import the error record(s)).",
"CustomerImportDataFormatError" :"Import customer list with data format error" "CustomerImportDataFormatError" :"Import customer list with data format error",
} "UnSave": "You need save first!"
\ No newline at end of file }
\ No newline at end of file
...@@ -402,6 +402,7 @@ ...@@ -402,6 +402,7 @@
"VendorListManageVLNameRequired": "供应商名称不能为空", "VendorListManageVLNameRequired": "供应商名称不能为空",
"WordLibraryTitle": "字库", "WordLibraryTitle": "字库",
"notAllowDisableMessage": "机构中已关联,不允许停用", "notAllowDisableMessage": "机构中已关联,不允许停用",
"UnSave": "未点击保存按钮!",
"~MustBeEndOneApp": "I Must be the End One, please!" "~MustBeEndOneApp": "I Must be the End One, please!"
} }
\ No newline at end of file
...@@ -2176,7 +2176,6 @@ ...@@ -2176,7 +2176,6 @@
}, },
function (isConfirm) { function (isConfirm) {
if (isConfirm) { if (isConfirm) {
// 选中 // 选中
updateOrgExtraInfo($scope.selectCompany.id); updateOrgExtraInfo($scope.selectCompany.id);
} }
...@@ -2184,24 +2183,27 @@ ...@@ -2184,24 +2183,27 @@
}; };
var updateOrgExtraInfo = function (id) { var updateOrgExtraInfo = function (id) {
var data = $scope.editOrgExtraModel; debugger;
data.organizationId = id; var editData = $scope.editOrgExtraModel;
orgService.updateOrgExtraInfoByOrgId(data).success(function (data) { editData.organizationId = id;
if (data && !data.result) { orgService.updateOrgExtraInfoByOrgId(editData).success(function (res) {
SweetAlert.warning($translate.instant(data.resultMsg)); if (res && !res.result) {
SweetAlert.warning($translate.instant(res.resultMsg));
return; return;
} }
if (res) {
orgService.getSingleOrgExtra(id).success(function (data) { orgService.getSingleOrgExtra(id).success(function (data) {
if (data==null) { if (data == null) {
SweetAlert.warning($translate.instant(data.resultMsg)); SweetAlert.warning($translate.instant(data.resultMsg));
return; return;
} }
$scope.selectCompanyExtra = data;
$scope.editOrgExtraModel = angular.copy(data); $scope.editOrgExtraModel = angular.copy(data);
generalSelectCompanyExtraText(); generalSelectCompanyExtraText();
$scope.updateOrgExtraCancel(); $scope.updateOrgExtraCancel();
$scope.selectCompanyExtra = data;
SweetAlert.success($translate.instant('OrganizationExtraInfoEditSuccess')); SweetAlert.success($translate.instant('OrganizationExtraInfoEditSuccess'));
}); });
}
}); });
}; };
...@@ -2232,16 +2234,19 @@ ...@@ -2232,16 +2234,19 @@
var generalSelectCompanyText = function(){ var generalSelectCompanyText = function(){
if($scope.selectCompany.engageNationalProhibitIndustry!=null){ if($scope.selectCompany.engageNationalProhibitIndustry!=null){
$scope.selectCompany.engageNationalProhibitIndustry = $scope.selectCompany.engageNationalProhibitIndustry?"是":"否"; $scope.selectCompany.engageNationalProhibitIndustryStr = $scope.selectCompany.engageNationalProhibitIndustry?"是":"否";
} }
if($scope.selectCompany.nationalEconomicIndustry!=null){ if($scope.selectCompany.nationalEconomicIndustry!=null){
$scope.nationalEconomicIndustryList.map(function(value,index){ $scope.nationalEconomicIndustryList.map(function(value,index){
if (value.code === $scope.selectCompany.nationalEconomicIndustry) { if (value.code === $scope.selectCompany.nationalEconomicIndustry) {
$scope.selectCompany.nationalEconomicIndustry = value.code+"-"+value.type; $scope.selectCompany.nationalEconomicIndustryStr = value.code+"-"+value.type;
return; return;
} }
}); });
if(null==$scope.selectCompany.nationalEconomicIndustryStr||""===$scope.selectCompany.nationalEconomicIndustryStr){
$scope.selectCompany.nationalEconomicIndustryStr=$scope.selectCompany.nationalEconomicIndustry;
}
} }
}; };
......
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
<div class="form-group" ng-show="!isInternational"> <div class="form-group" ng-show="!isInternational">
<div class="col-sm-12"> <div class="col-sm-12">
<span class="control-label"> {{'NationalEconomicIndustry' | translate}}:<span <span class="control-label"> {{'NationalEconomicIndustry' | translate}}:<span
title="{{selectCompany.nationalEconomicIndustry}}">{{selectCompany.nationalEconomicIndustry }}</span></span> title="{{selectCompany.nationalEconomicIndustry}}">{{selectCompany.nationalEconomicIndustryStr }}</span></span>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
...@@ -203,7 +203,7 @@ ...@@ -203,7 +203,7 @@
<div class="form-group" ng-show="!isInternational"> <div class="form-group" ng-show="!isInternational">
<div class="col-sm-12"> <div class="col-sm-12">
<span class="control-label"> {{'EngageNationalProhibitIndustry' | translate}}:<span <span class="control-label"> {{'EngageNationalProhibitIndustry' | translate}}:<span
title="{{selectCompany.engageNationalProhibitIndustry}}">{{selectCompany.engageNationalProhibitIndustry}}</span></span> title="{{selectCompany.engageNationalProhibitIndustry}}">{{selectCompany.engageNationalProhibitIndustryStr}}</span></span>
</div> </div>
</div> </div>
</div> </div>
...@@ -785,7 +785,7 @@ ...@@ -785,7 +785,7 @@
<div class="form-group" ng-show="isInternational"> <div class="form-group" ng-show="isInternational">
<div class="col-sm-12"> <div class="col-sm-12">
<span class="control-label">{{'FiscalYearDeadline' | translate}}:<span <span class="control-label">{{'FiscalYearDeadline' | translate}}:<span
title="{{selectCompanyExtra.fiscalYearDeadline}}">{{selectCompanyExtra.fiscalYearDeadline }}</span> title="{{selectCompanyExtra.fiscalYearDeadline}}">{{selectCompanyExtra.fiscalYearDeadline|date:'yyyy-MM-dd'}}</span>
<input class="input-group" style="display: none" <input class="input-group" style="display: none"
ng-model="editOrgExtraModel.fiscalYearDeadline" ng-model="editOrgExtraModel.fiscalYearDeadline"
title="{{selectCompanyExtra.fiscalYearDeadline}}" title="{{selectCompanyExtra.fiscalYearDeadline}}"
......
...@@ -5,6 +5,10 @@ controller('editEquityChangeModalController', ['$scope', '$log', '$translate', ' ...@@ -5,6 +5,10 @@ controller('editEquityChangeModalController', ['$scope', '$log', '$translate', '
var selectedModel = '.editEquityChangeControlPop'; //'#addOrgControlPop' + $scope.dimensionId; var selectedModel = '.editEquityChangeControlPop'; //'#addOrgControlPop' + $scope.dimensionId;
$scope.pleaseSelect = $translate.instant('PleaseSelect'); $scope.pleaseSelect = $translate.instant('PleaseSelect');
$scope.startDate = new Date(new Date().getFullYear() - 20, 1, 1);
$scope.endDate = new Date(new Date().getFullYear() + 20, 1, 1);
$scope.viewMode = 1;
$scope.showPage = function (pageIndex) { $scope.showPage = function (pageIndex) {
...@@ -233,6 +237,7 @@ controller('editEquityChangeModalController', ['$scope', '$log', '$translate', ' ...@@ -233,6 +237,7 @@ controller('editEquityChangeModalController', ['$scope', '$log', '$translate', '
$scope.orgHasAccountMapping = false; $scope.orgHasAccountMapping = false;
orgService.getSingleOrg(orgId).success(function (orgData) { orgService.getSingleOrg(orgId).success(function (orgData) {
orgData.updateTime = $filter('date')(orgData.updateTime, 'yyyy-MM-dd');
$scope.selectCompany = orgData; $scope.selectCompany = orgData;
$scope.editOrgModel = orgData; $scope.editOrgModel = orgData;
}); });
...@@ -449,11 +454,18 @@ controller('editEquityChangeModalController', ['$scope', '$log', '$translate', ' ...@@ -449,11 +454,18 @@ controller('editEquityChangeModalController', ['$scope', '$log', '$translate', '
}; };
var initDatePicker = function () { var initDatePicker = function () {
$('.changeDatepicker').datepicker({ var ele = $(".changeDatepicker");
format: "yyyy/mm/dd", ele.datepicker({
startDate: new Date().formatDateTime('yyyy-MM-dd'), startDate: $scope.startDate,
minuteStep: 10 endDate: $scope.endDate,
viewMode: $scope.viewMode,
minViewMode: $scope.viewMode,
autoclose: true, //选中之后自动隐藏日期选择框
clearBtn: true, //清除按钮
todayBtn: false, //今日按钮
format: 'yyyy-mm-dd' //日期格式,详见 http://bootstrap-datepicker.readthedocs.org/en/release/options.html#format
}); });
ele.datepicker("setDate", new Date().formatDateTime('yyyy-mm-dd'));
}; };
(function initialize() { (function initialize() {
......
...@@ -6,6 +6,8 @@ controller('editEquityModalController', ['$scope', '$log', '$translate', 'uiGrid ...@@ -6,6 +6,8 @@ controller('editEquityModalController', ['$scope', '$log', '$translate', 'uiGrid
$scope.pleaseSelect = $translate.instant('PleaseSelect'); $scope.pleaseSelect = $translate.instant('PleaseSelect');
$scope.updated = false;
var defaultSelcectRegion = { var defaultSelcectRegion = {
id: 0, id: 0,
name: '', name: '',
...@@ -169,6 +171,7 @@ controller('editEquityModalController', ['$scope', '$log', '$translate', 'uiGrid ...@@ -169,6 +171,7 @@ controller('editEquityModalController', ['$scope', '$log', '$translate', 'uiGrid
equityService.insert(equities).success(function (data) { equityService.insert(equities).success(function (data) {
if (data) { if (data) {
refreshEquity($scope.selectedOrganization.id); refreshEquity($scope.selectedOrganization.id);
$scope.updated = true;
return; return;
}else{ }else{
SweetAlert.success($translate.instant('SaveFail')); SweetAlert.success($translate.instant('SaveFail'));
...@@ -185,6 +188,7 @@ controller('editEquityModalController', ['$scope', '$log', '$translate', 'uiGrid ...@@ -185,6 +188,7 @@ controller('editEquityModalController', ['$scope', '$log', '$translate', 'uiGrid
equityService.update(equityData).success(function (data) { equityService.update(equityData).success(function (data) {
if (data) { if (data) {
refreshEquity($scope.selectedOrganization.id); refreshEquity($scope.selectedOrganization.id);
$scope.updated = true;
return; return;
}else{ }else{
SweetAlert.success($translate.instant('UpdateFail')); SweetAlert.success($translate.instant('UpdateFail'));
...@@ -200,6 +204,7 @@ controller('editEquityModalController', ['$scope', '$log', '$translate', 'uiGrid ...@@ -200,6 +204,7 @@ controller('editEquityModalController', ['$scope', '$log', '$translate', 'uiGrid
equityService.delete($scope.equityId,removeList).success(function (data) { equityService.delete($scope.equityId,removeList).success(function (data) {
if (data) { if (data) {
refreshEquity($scope.selectedOrganization.id); refreshEquity($scope.selectedOrganization.id);
$scope.updated = true;
return; return;
}else{ }else{
SweetAlert.success($translate.instant('DeleteFail')); SweetAlert.success($translate.instant('DeleteFail'));
...@@ -364,36 +369,6 @@ controller('editEquityModalController', ['$scope', '$log', '$translate', 'uiGrid ...@@ -364,36 +369,6 @@ controller('editEquityModalController', ['$scope', '$log', '$translate', 'uiGrid
} }
}; };
// 设置时间控件
var setDatepickerRow = function (rowData) {
$("#" + rowData.fromID).datepicker({
minViewMode: 1,
autoclose: true,
language: "zh-CN",
format: "yyyy-mm"
});
$("#" + rowData.toID).datepicker({
minViewMode: 1,
autoclose: true,
language: "zh-CN",
format: "yyyy-mm"
});
$("#" + rowData.fromID).on('changeDate', function () {
if ($("#" + rowData.fromID).val === '') {
} else {
$("#" + rowData.toID).datepicker('setStartDate', $("#" + rowData.fromID).val());
}
});
// 默认的错误信息先设置为空
rowData.startDateError = null;
rowData.endDateError = null;
};
// 说明 // 说明
$scope.resources = { $scope.resources = {
OrganizationName: $translate.instant('OrganizationName'), OrganizationName: $translate.instant('OrganizationName'),
...@@ -450,6 +425,16 @@ controller('editEquityModalController', ['$scope', '$log', '$translate', 'uiGrid ...@@ -450,6 +425,16 @@ controller('editEquityModalController', ['$scope', '$log', '$translate', 'uiGrid
$scope.operateType = null; $scope.operateType = null;
}); });
$scope.confirm = function () {
if($scope.updated){
$scope.updated = false;
$('.confirmBtn').attr("data-dismiss","modal");
$scope.operateType = null;
}else{
SweetAlert.warning($translate.instant('UnSave'));
}
};
$scope.closeModal = function () { $scope.closeModal = function () {
$scope.operateType = null; $scope.operateType = null;
}; };
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
<div class="modal-footer" id="orgModalFooter" style="padding-left:139px;"> <div class="modal-footer" id="orgModalFooter" style="padding-left:139px;">
<button type="submit" class="btn btn-primary" ng-click="closeModal()" data-dismiss="modal"> <button type="submit" class="btn btn-primary confirmBtn" ng-click="confirm()">
{{'Confirm' | translate}} {{'Confirm' | translate}}
</button> </button>
<button type="button" class="btn btn-third" ng-click="closeModal()" data-dismiss="modal"> <button type="button" class="btn btn-third" ng-click="closeModal()" data-dismiss="modal">
......
...@@ -5,7 +5,9 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', ' ...@@ -5,7 +5,9 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
var selectedModel = '.addOrgControlPop'; //'#addOrgControlPop' + $scope.dimensionId; var selectedModel = '.addOrgControlPop'; //'#addOrgControlPop' + $scope.dimensionId;
$scope.pleaseSelect = $translate.instant('PleaseSelect'); $scope.pleaseSelect = $translate.instant('PleaseSelect');
$scope.startDate = new Date(new Date().getFullYear() - 20, 1, 1);
$scope.endDate = new Date(new Date().getFullYear() + 20, 1, 1);
$scope.viewMode = 1;
var defaultSelcectRegion = { var defaultSelcectRegion = {
id: 0, id: 0,
...@@ -180,6 +182,11 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', ' ...@@ -180,6 +182,11 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
if ($scope.componentSelectedArea) { if ($scope.componentSelectedArea) {
editModel.areaID = $scope.selectedAreaId; editModel.areaID = $scope.selectedAreaId;
} }
if((typeof $scope.editOrgModel.foundationDate) ==="string"){
if (""!==($scope.editOrgModel.foundationDate)) {
$scope.editOrgModel.foundationDate = new Date(Date.parse($scope.editOrgModel.foundationDate.replace(/-/g, "/")));
}
}
//账套 //账套
if ($scope.orgAccountList) { if ($scope.orgAccountList) {
...@@ -991,6 +998,7 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', ' ...@@ -991,6 +998,7 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
// 登记状态 // 登记状态
$scope.regStatusList = constant.RegStatusList; $scope.regStatusList = constant.RegStatusList;
$scope.architectureTypeList = constant.ArchitectureTypeList; $scope.architectureTypeList = constant.ArchitectureTypeList;
$scope.nationalEconomicIndustryList = constant.NationalEconomicIndustryList;
$scope.trueFalse = constant.trueFalse; $scope.trueFalse = constant.trueFalse;
debugger; debugger;
$('.localRequired').attr("required",true); $('.localRequired').attr("required",true);
...@@ -1063,11 +1071,19 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', ' ...@@ -1063,11 +1071,19 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
}; };
var initDatePicker = function () { var initDatePicker = function () {
$('.startDatepicker').datepicker({ var ele = $(".startDatepicker");
format: "yyyy/mm/dd", ele.datepicker({
startDate: new Date().formatDateTime('yyyy-MM-dd'), startDate: $scope.startDate,
minuteStep: 10 endDate: $scope.endDate,
viewMode: $scope.viewMode,
minViewMode: $scope.viewMode,
autoclose: true, //选中之后自动隐藏日期选择框
clearBtn: true, //清除按钮
todayBtn: false, //今日按钮
format: 'yyyy/mm/dd' //日期格式,详见 http://bootstrap-datepicker.readthedocs.org/en/release/options.html#format
}); });
ele.datepicker("setDate", new Date().formatDateTime('yyyy/mm/dd'));
}; };
// 获取修改机构的时候,自定义维度列表 // 获取修改机构的时候,自定义维度列表
......
...@@ -63,14 +63,11 @@ ...@@ -63,14 +63,11 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label"></span>{{'OrganizationNameEn' | <label class="col-sm-3 control-label"></span>{{'OrganizationNameEn' |
translate}}:</label> translate}}:</label>
<div class="col-sm-9" <div class="col-sm-9">
ng-class="{'has-error':orgControlForm.englishName.$invalid && (orgControlForm.englishName.$dirty || orgControlForm.$submitted)}">
<input class="form-control" id="englishName" <input class="form-control" id="englishName"
ng-model="editOrgModel.englishName" name="englishName" ng-model="editOrgModel.englishName" name="englishName"
placeholder="{{resources.OrganizationNameEn}}" placeholder="{{resources.OrganizationNameEn}}"
ng-keyup="nameKeyUp()" maxlength="100" > ng-keyup="nameKeyUp()" maxlength="100" >
<p ng-show="editOrgModel.nameError" class="has-error label">
{{editOrgModel.nameError}}</p>
</div> </div>
</div> </div>
...@@ -115,14 +112,14 @@ ...@@ -115,14 +112,14 @@
<!--注册地--> <!--注册地-->
<div class="form-group" ng-show="isLocal"> <div class="form-group" ng-show="isLocal">
<label for="registrationLocation" class="col-sm-3 control-label">{{'RegistrationLocation' <label for="registerAddress" class="col-sm-3 control-label">{{'RegistrationLocation'
| translate}}:</label> | translate}}:</label>
<div class="col-sm-9" <div class="col-sm-9"
ng-class="{'has-error':orgControlForm.registrationLocation.$invalid && (orgControlForm.registrationLocation.$dirty || orgControlForm.$submitted)}"> ng-class="{'has-error':orgControlForm.registerAddress.$invalid && (orgControlForm.registerAddress.$dirty || orgControlForm.$submitted)}">
<input class="form-control" name="registrationLocation" <input class="form-control" name="registerAddress"
id="registrationLocation" id="registerAddress"
ng-model="editOrgModel.registrationLocation" ng-model="editOrgModel.registerAddress"
placeholder="{{resources.RegistrationLocation}}" maxlength="50"> placeholder="{{resources.registerAddress}}" maxlength="100">
</div> </div>
</div> </div>
...@@ -145,10 +142,15 @@ ...@@ -145,10 +142,15 @@
| translate}}:</label> | translate}}:</label>
<div class="col-sm-9" <div class="col-sm-9"
ng-class="{'has-error':orgControlForm.nationalEconomicIndustry.$invalid && (orgControlForm.nationalEconomicIndustry.$dirty || orgControlForm.$submitted)}"> ng-class="{'has-error':orgControlForm.nationalEconomicIndustry.$invalid && (orgControlForm.nationalEconomicIndustry.$dirty || orgControlForm.$submitted)}">
<input class="form-control" name="nationalEconomicIndustry" <!--<input class="form-control" name="nationalEconomicIndustry"
id="nationalEconomicIndustry" id="nationalEconomicIndustry"
ng-model="editOrgModel.nationalEconomicIndustry" ng-model="editOrgModel.nationalEconomicIndustry"
placeholder="{{resources.NationalEconomicIndustry}}" maxlength="50"> placeholder="{{resources.NationalEconomicIndustry}}" maxlength="50">-->
<select class="form-control" id='nationalEconomicIndustry' name="nationalEconomicIndustry"
ng-model="editOrgModel.nationalEconomicIndustry"
ng-options="x.code as x.type for x in nationalEconomicIndustryList">
<option value="">{{resources.NationalEconomicIndustry}}</option>
</select>
</div> </div>
</div> </div>
...@@ -303,7 +305,7 @@ ...@@ -303,7 +305,7 @@
<select class="form-control" id='engageNationalProhibitIndustry' name="engageNationalProhibitIndustry" <select class="form-control" id='engageNationalProhibitIndustry' name="engageNationalProhibitIndustry"
ng-model="editOrgModel.engageNationalProhibitIndustry" ng-model="editOrgModel.engageNationalProhibitIndustry"
ng-options="x.code as x.type for x in trueFalse"> ng-options="x.code as x.type for x in trueFalse">
<option value="">{{resources.engageNationalProhibitIndustry}}</option> <option value="">{{resources.EngageNationalProhibitIndustry}}</option>
</select> </select>
<p ng-show="orgControlForm.engageNationalProhibitIndustry.$error.required && (orgControlForm.engageNationalProhibitIndustry.$dirty || orgControlForm.$submitted)" <p ng-show="orgControlForm.engageNationalProhibitIndustry.$error.required && (orgControlForm.engageNationalProhibitIndustry.$dirty || orgControlForm.$submitted)"
class="has-error label"> class="has-error label">
......
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