Commit 010d77e1 authored by ken.q.you's avatar ken.q.you

fix 社会信用代码 verify---Ken

parent cab15ab1
...@@ -107,7 +107,7 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', ' ...@@ -107,7 +107,7 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
var saveInternationalOrg = function () { var saveInternationalOrg = function () {
$scope.orgControlForm.$setSubmitted(); $scope.orgControlForm.$setSubmitted();
if(saveVerify()) return;
var editModel = $scope.editOrgModel; var editModel = $scope.editOrgModel;
// 是否为境外企业 // 是否为境外企业
...@@ -197,8 +197,7 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', ' ...@@ -197,8 +197,7 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
} }
}; };
var saveLocalOrg = function () { var saveVerify =function () {
$scope.orgControlForm.$setSubmitted();
var fail = false; var fail = false;
...@@ -218,8 +217,41 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', ' ...@@ -218,8 +217,41 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
return false; return false;
} }
}); });
var taxPlayer=$scope.editOrgModel.taxPayerNumber;
if(!(taxPlayer.length===18)){
SweetAlert.error($translate.instant('UnifiedSocialCreditCode')+"长度必须为18位");
fail = true;
return fail;
};
return fail;
}
var saveLocalOrg = function () {
$scope.orgControlForm.$setSubmitted();
// var fail = false;
// if($('.localRequired').attr("required")==="required"){
// $('.localRequired').each( function (index,ele){
// if(null==ele.value||""===ele.value){
// SweetAlert.error("请检查必填项");
// fail = true;
// return false;
// }
// });
// };
// $('.orgAreaRequired').each( function (index,ele){
// if(null==ele.innerText||""===ele.innerText){
// SweetAlert.error("请检查必填项");
// fail = true;
// return false;
// }
// });
console.log(saveVerify());
if(fail) return; if(saveVerify()) return;
var hasSpecialChar = window.PWC.hasSpecialChar($scope.editOrgModel.name); var hasSpecialChar = window.PWC.hasSpecialChar($scope.editOrgModel.name);
if (hasSpecialChar) { if (hasSpecialChar) {
......
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