Przeglądaj źródła

解决专业数据丢失问题

java71- 张威豹 3 lat temu
rodzic
commit
91acfae756

+ 4 - 2
ruoyi-ahrs/src/main/resources/templates/ahrs/recruitplan/add.html

@@ -203,7 +203,7 @@
                             array.push(value.otherMajor);
                         }
                         var html = $.common.sprintf("<input class='form-control' type='hidden' name='columns[%s].major' value='%s'>", index, value.major);
-                        html += $.common.sprintf("<input class='form-control' type='text'  onclick='selectDictTree(this)' name='columns[%s].majorValue' value='%s' style='display:inline-block;width: 90%;'>", index, row.majorValue);
+                        html += $.common.sprintf("<input class='form-control' type='text'  onclick='selectDictTree(this)' onchange='changeData(" + index + ",this)'  name='columns[%s].majorValue' value='%s' style='display:inline-block;width: 90%;'>", index, row.majorValue);
                         html += "<i class='fa fa-pencil' style='display:inline-block;margin-left: 2%' onclick='insertMajor(this," + index + ")'></i>";
                         html += $.common.sprintf("<input class='form-control' type='hidden' name='columns[%s].specialtyMajor' value='%s'>", index, value.specialtyMajor);
                         html += $.common.sprintf("<input class='form-control' type='hidden' name='columns[%s].undergraduateMajor' value='%s'>", index, value.undergraduateMajor);
@@ -507,7 +507,7 @@
                 }
             }
         })
-        $(ggObj).prev().blur();
+        $(ggObj).change();
     }
 
     function changeNumber(index,value) {
@@ -899,6 +899,7 @@
                 url:prefix+"/setMajorValue",
                 type:"post",
                 data: {"major": JSON.stringify(majorValue)},
+                async: false,
                 success:function (data) {
                     if(data.code == web_status.SUCCESS){
                         $(ggObj).val(data.msg);
@@ -908,6 +909,7 @@
                     }
                 }
             });
+            $(ggObj).change();
         }
 
         var education = document.getElementById("columns[" + i + "].education");

+ 3 - 2
ruoyi-ahrs/src/main/resources/templates/ahrs/recruitplan/edit.html

@@ -176,7 +176,7 @@
                             array.push(value.otherMajor);
                         }
                         var html = $.common.sprintf("<input class='form-control' type='hidden' name='columns[%s].major' value='%s'>", index, value.major);
-                        html += $.common.sprintf("<input class='form-control' type='text'  onclick='selectDictTree(this)' name='columns[%s].majorValue' value='%s' style='display:inline-block;width: 90%;'>", index, row.majorValue);
+                        html += $.common.sprintf("<input class='form-control' type='text'  onclick='selectDictTree(this)' onchange='changeData(" + index + ",this)' name='columns[%s].majorValue' value='%s' style='display:inline-block;width: 90%;'>", index, row.majorValue);
                         html += "<i class='fa fa-pencil' style='display:inline-block;margin-left: 2%' onclick='insertMajor(this," + index + ")'></i>";
                         html += $.common.sprintf("<input class='form-control' type='hidden' name='columns[%s].specialtyMajor' value='%s'>", index, value.specialtyMajor);
                         html += $.common.sprintf("<input class='form-control' type='hidden' name='columns[%s].undergraduateMajor' value='%s'>", index, value.undergraduateMajor);
@@ -477,7 +477,7 @@
                 }
             }
         })
-        $(ggObj).blur();
+        $(ggObj).change();
     }
 
     //校验输入岗位代码是否重复
@@ -1078,6 +1078,7 @@
                 }
             }
         }
+        $(ggObj).change();
     }
 
     $(function () {