11wqe1 hai 8 horas
pai
achega
c469d4bc48
Modificáronse 1 ficheiros con 5 adicións e 4 borrados
  1. 5 4
      src/components/pages/studentManageNew/component/addstu.vue

+ 5 - 4
src/components/pages/studentManageNew/component/addstu.vue

@@ -465,6 +465,7 @@ export default {
               v[_this.lang.StudentName] !== "" 
             ) {
               obj.name = v[_this.lang.StudentName];
+              const accountVal = String(v[_this.lang.ssStuAccHd] || '').trim();
               if (
                 _this.org != "" &&
                 _this.org != "null" &&
@@ -472,8 +473,8 @@ export default {
                 _this.org &&
                 _this.schoolChar
               ) {
-                if (Number(v[_this.lang.ssStuAccHd])) {
-                  obj.account = v[_this.lang.ssStuAccHd] + '@' + _this.schoolChar + '.' + _this.userSuffix;
+                if (accountVal) {
+                  obj.account = accountVal + '@' + _this.schoolChar + '.' + _this.userSuffix;
                 } else {
                   obj.account = '';
                 }
@@ -481,8 +482,8 @@ export default {
                 obj.mail =
                   uuidv4() + "@" + _this.schoolChar + "." + _this.userSuffix;
               } else {
-                if (Number(v[_this.lang.ssStuAccHd])) {
-                  obj.account = v[_this.lang.ssStuAccHd] + + _this.userSuffix;
+                if (accountVal) {
+                  obj.account = accountVal + '@' + _this.userSuffix;
                 } else {
                   obj.account = '';
                 }