lvhao 16 godzin temu
rodzic
commit
4c5cdcb499
1 zmienionych plików z 8 dodań i 5 usunięć
  1. 8 5
      template/erp/whlabel_print.html

+ 8 - 5
template/erp/whlabel_print.html

@@ -585,14 +585,17 @@ $(document).keyup(function(event){
     $('.select_two').select2("destroy");
 
     $(".select_two").removeClass("select_two");
+    $(".setting .select").each(function() {
+        if($(this).find('option[value=""]').length > 0){
+
+        }else{
+            $(this).prepend('<option value="">未选择</option>');
+        }
+        $(this).prop('selectedIndex', 0);
+    });
 	for(i=1;i<data.length+1;i++)
 	{
 		$(".setting .select").each(function() {
-        //  if($(this).find("option[value='']").length > 0){
-
-        //  }else{
-        //     $(this).prepend('<option value="">未选择</option>');
-        //  }
 		 $(this).find("option[value='"+data[i]+"']").prop("selected","selected");
         });
 		$("input:radio[value='"+data[i]+"']").attr('checked','true');