作者 刘朕
1 个管道 的构建 通过 耗费 22 秒

合并分支 'liuzhen' 到 'master'

Liuzhen



查看合并请求 !138
@@ -49,6 +49,8 @@ class OrderSalesmanController extends WeChatBaseController @@ -49,6 +49,8 @@ class OrderSalesmanController extends WeChatBaseController
49 $user_id = $this->user_id; 49 $user_id = $this->user_id;
50 if($this->status == 2){ 50 if($this->status == 2){
51 $where['salesman_uid'] = ['eq',$user_id]; 51 $where['salesman_uid'] = ['eq',$user_id];
  52 + //获取当前业务员下级的所有老师
  53 + $user_ids = Db::name('my_user')->where(['pid'=>$this->pid])->column('uid');
52 }else{ 54 }else{
53 //获取当前用户的所有下级 55 //获取当前用户的所有下级
54 $user_child = Db::name('my_user')->where(['pid'=>$this->pid])->select(); 56 $user_child = Db::name('my_user')->where(['pid'=>$this->pid])->select();
@@ -80,11 +82,14 @@ class OrderSalesmanController extends WeChatBaseController @@ -80,11 +82,14 @@ class OrderSalesmanController extends WeChatBaseController
80 } 82 }
81 $this->assign('goods_count',$goods_count); 83 $this->assign('goods_count',$goods_count);
82 // 身份为老师,获取上级业务员的id 84 // 身份为老师,获取上级业务员的id
83 - $school_uid = $user_id;  
84 - if($this->my_user['status'] == 3) { 85 + $school = [];
  86 + if($this->my_user['status'] == 2) {
  87 + $user_ids[] = $user_id;
  88 + $school = Db::name('school')->whereIn('uid',$user_ids)->order('create_time desc')->select()->toArray();
  89 + } elseif($this->my_user['status'] == 3) {
85 $school_uid = Db::name('my_user')->where('id',$this->my_user['pid'])->value('uid'); 90 $school_uid = Db::name('my_user')->where('id',$this->my_user['pid'])->value('uid');
  91 + $school = Db::name('school')->whereIn('uid',[$user_id,$school_uid])->order('create_time desc')->select()->toArray();
86 } 92 }
87 - $school = Db::name('school')->where('uid',$school_uid)->order('create_time desc')->select()->toArray();  
88 if(count($school)!=0){ 93 if(count($school)!=0){
89 $schools = []; 94 $schools = [];
90 foreach ($school as $key => $val){ 95 foreach ($school as $key => $val){
@@ -387,6 +392,8 @@ class OrderSalesmanController extends WeChatBaseController @@ -387,6 +392,8 @@ class OrderSalesmanController extends WeChatBaseController
387 $user_id = $this->user_id; 392 $user_id = $this->user_id;
388 if($this->status == 2){ 393 if($this->status == 2){
389 $where['salesman_uid'] = ['eq',$user_id]; 394 $where['salesman_uid'] = ['eq',$user_id];
  395 + //获取当前业务员下级的所有老师
  396 + $user_ids = Db::name('my_user')->where(['pid'=>$this->pid])->column('uid');
390 }else{ 397 }else{
391 //获取当前用户的所有下级 398 //获取当前用户的所有下级
392 $user_child = Db::name('my_user')->where(['pid'=>$this->pid])->select(); 399 $user_child = Db::name('my_user')->where(['pid'=>$this->pid])->select();
@@ -418,11 +425,14 @@ class OrderSalesmanController extends WeChatBaseController @@ -418,11 +425,14 @@ class OrderSalesmanController extends WeChatBaseController
418 } 425 }
419 $this->assign('goods_count',$goods_count); 426 $this->assign('goods_count',$goods_count);
420 // 身份为老师,获取上级业务员的id 427 // 身份为老师,获取上级业务员的id
421 - $school_uid = $user_id;  
422 - if($this->my_user['status'] == 3) { 428 + $school = [];
  429 + if($this->my_user['status'] == 2) {
  430 + $user_ids[] = $user_id;
  431 + $school = Db::name('school')->whereIn('uid',$user_ids)->order('create_time desc')->select()->toArray();
  432 + } elseif($this->my_user['status'] == 3) {
423 $school_uid = Db::name('my_user')->where('id',$this->my_user['pid'])->value('uid'); 433 $school_uid = Db::name('my_user')->where('id',$this->my_user['pid'])->value('uid');
  434 + $school = Db::name('school')->whereIn('uid',[$user_id,$school_uid])->order('create_time desc')->select()->toArray();
424 } 435 }
425 - $school = Db::name('school')->where('uid',$school_uid)->order('create_time desc')->select()->toArray();  
426 if(count($school)!=0){ 436 if(count($school)!=0){
427 $schools = []; 437 $schools = [];
428 foreach ($school as $key => $val){ 438 foreach ($school as $key => $val){
@@ -786,8 +786,14 @@ class PersonalcenterController extends WeChatBaseController{ @@ -786,8 +786,14 @@ class PersonalcenterController extends WeChatBaseController{
786 if(!empty($grade_class)){ 786 if(!empty($grade_class)){
787 foreach ($grade_class as $key => $val){ 787 foreach ($grade_class as $key => $val){
788 $class = explode('-',$val['class']); 788 $class = explode('-',$val['class']);
789 - for($i=$class[0];$i<=$class[1];$i++){  
790 - $grade_class_show[] = $val['grade'].' - '.$i."班"; 789 + if($val['grade'] == '学龄前') {
  790 + foreach ($class as $kc=>$vc) {
  791 + $grade_class_show[] = $vc;
  792 + }
  793 + } else {
  794 + for($i=$class[0];$i<=$class[1];$i++){
  795 + $grade_class_show[] = $val['grade'].' - '.$i."班";
  796 + }
791 } 797 }
792 } 798 }
793 foreach ($grade_class_show as $key => $val){ 799 foreach ($grade_class_show as $key => $val){
@@ -63,22 +63,28 @@ class SchoolController extends WeChatBaseController{ @@ -63,22 +63,28 @@ class SchoolController extends WeChatBaseController{
63 foreach ($val['grade'] as $key1 => $val1){ 63 foreach ($val['grade'] as $key1 => $val1){
64 //循环传过来的年级 64 //循环传过来的年级
65 foreach ($class_data as $key2 => $val2){ 65 foreach ($class_data as $key2 => $val2){
66 - $val2 = explode('-',$val2);  
67 - if($val2[0] == $val1['grade']){  
68 - //将班级拆分循环装进数组  
69 - $class_s = explode('-',$val1['class']);  
70 - for($i=$class_s[0];$i<=$class_s[1];$i++){  
71 - $class_db[] = $i;  
72 - }  
73 - //将传过来的班级循环  
74 - for($j=$val2[1];$j<=$val2[2];$j++){  
75 - $class_my[] = $j;  
76 - }  
77 - $result = array_intersect($class_db,$class_my);  
78 - $result = count($result);  
79 - if($result > 0){ 66 + if($_POST['type'] == '学龄前'){
  67 + if(in_array($val2,explode('-',$val1['class']))) {
80 return 5; 68 return 5;
81 } 69 }
  70 + } else {
  71 + $val2 = explode('-',$val2);
  72 + if($val2[0] == $val1['grade']){
  73 + //将班级拆分循环装进数组
  74 + $class_s = explode('-',$val1['class']);
  75 + for($i=$class_s[0];$i<=$class_s[1];$i++){
  76 + $class_db[] = $i;
  77 + }
  78 + //将传过来的班级循环
  79 + for($j=$val2[1];$j<=$val2[2];$j++){
  80 + $class_my[] = $j;
  81 + }
  82 + $result = array_intersect($class_db,$class_my);
  83 + $result = count($result);
  84 + if($result > 0){
  85 + return 5;
  86 + }
  87 + }
82 } 88 }
83 } 89 }
84 } 90 }
@@ -94,12 +100,21 @@ class SchoolController extends WeChatBaseController{ @@ -94,12 +100,21 @@ class SchoolController extends WeChatBaseController{
94 return 5; 100 return 5;
95 } 101 }
96 $school_id = Db::name('school') -> insertGetId($school); 102 $school_id = Db::name('school') -> insertGetId($school);
97 - foreach ($class_data as $key => $val){  
98 - $grade_class = explode('-',$val); 103 + // 判断是否是学龄前
  104 + if($_POST['type'] == '学龄前') {
  105 + $grade_class = implode('-',$class_data);
99 $grade['school_id'] = $school_id; 106 $grade['school_id'] = $school_id;
100 - $grade['grade'] = $grade_class[0];  
101 - $grade['class'] = $grade_class[1].'-'.$grade_class[2]; 107 + $grade['grade'] = $_POST['type'];
  108 + $grade['class'] = $grade_class;
102 Db::name('grade_class') -> insert($grade); 109 Db::name('grade_class') -> insert($grade);
  110 + } else {
  111 + foreach ($class_data as $key => $val) {
  112 + $grade_class = explode('-', $val);
  113 + $grade['school_id'] = $school_id;
  114 + $grade['grade'] = $grade_class[0];
  115 + $grade['class'] = $grade_class[1] . '-' . $grade_class[2];
  116 + Db::name('grade_class')->insert($grade);
  117 + }
103 } 118 }
104 if($school_id){ 119 if($school_id){
105 return true; 120 return true;
@@ -132,12 +147,21 @@ class SchoolController extends WeChatBaseController{ @@ -132,12 +147,21 @@ class SchoolController extends WeChatBaseController{
132 $class_data[] = $val; 147 $class_data[] = $val;
133 } 148 }
134 } 149 }
135 - foreach ($class_data as $key => $val){  
136 - $grade_class = explode('-',$val); 150 + // 判断是否是学龄前
  151 + if($_POST['type'] == '学龄前') {
  152 + $grade_class = implode('-',$class_data);
137 $grade['school_id'] = $_POST['id']; 153 $grade['school_id'] = $_POST['id'];
138 - $grade['grade'] = $grade_class[0];  
139 - $grade['class'] = $grade_class[1].'-'.$grade_class[2]; 154 + $grade['grade'] = $_POST['type'];
  155 + $grade['class'] = $grade_class;
140 Db::name('grade_class') -> insert($grade); 156 Db::name('grade_class') -> insert($grade);
  157 + } else {
  158 + foreach ($class_data as $key => $val){
  159 + $grade_class = explode('-',$val);
  160 + $grade['school_id'] = $_POST['id'];
  161 + $grade['grade'] = $grade_class[0];
  162 + $grade['class'] = $grade_class[1].'-'.$grade_class[2];
  163 + Db::name('grade_class') -> insert($grade);
  164 + }
141 } 165 }
142 return true; 166 return true;
143 }else{ 167 }else{
@@ -7,7 +7,7 @@ return [ @@ -7,7 +7,7 @@ return [
7 // 数据库类型 7 // 数据库类型
8 'type' => 'mysql', 8 'type' => 'mysql',
9 // 服务器地址 9 // 服务器地址
10 - 'hostname' => 'rm-m5eblhc9o3515i25n.mysql.rds.aliyuncs.com', 10 + 'hostname' => 'rm-m5eblhc9o3515i25neo.mysql.rds.aliyuncs.com',
11 // 数据库名 11 // 数据库名
12 'database' => 'xkeasy', 12 'database' => 'xkeasy',
13 // 用户名 13 // 用户名
@@ -94,6 +94,12 @@ @@ -94,6 +94,12 @@
94 <div class="log_four_contant_left"> 94 <div class="log_four_contant_left">
95 <img src="__TMPL__/public/assets/images/73.png" alt="" /> 95 <img src="__TMPL__/public/assets/images/73.png" alt="" />
96 </div> 96 </div>
  97 + <div class="log_four_contant_right">学龄前</div>
  98 + </div>
  99 + <div class="log_four_contant_one">
  100 + <div class="log_four_contant_left">
  101 + <img src="__TMPL__/public/assets/images/39_0.png" alt="" />
  102 + </div>
97 <div class="log_four_contant_right">小学</div> 103 <div class="log_four_contant_right">小学</div>
98 </div> 104 </div>
99 <div class="log_four_contant_one"> 105 <div class="log_four_contant_one">
@@ -115,6 +121,42 @@ @@ -115,6 +121,42 @@
115 <div class="log_four_contants"> 121 <div class="log_four_contants">
116 <div class=" log_four_contant_ones"> 122 <div class=" log_four_contant_ones">
117 <div class="log_botms"> 123 <div class="log_botms">
  124 + <div class="log_four_contants_left xuelingqian" data-name="小班" data-class="1">
  125 + <img class="log_Img9" src="__TMPL__/public/assets/images/39_0.png" alt="" />
  126 + </div>
  127 + <div class="log_four_contants_right">小班</div>
  128 + </div>
  129 + </div>
  130 + <div class=" log_four_contant_ones">
  131 + <div class="log_botms">
  132 + <div class="log_four_contants_left xuelingqian" data-name="中班" data-class="2">
  133 + <img class="log_Img9" src="__TMPL__/public/assets/images/39_0.png" alt="" />
  134 + </div>
  135 + <div class="log_four_contants_right">中班</div>
  136 + </div>
  137 + </div>
  138 + <div class=" log_four_contant_ones">
  139 + <div class="log_botms">
  140 + <div class="log_four_contants_left xuelingqian" data-name="大班" data-class="3">
  141 + <img class="log_Img9" src="__TMPL__/public/assets/images/39_0.png" alt="" />
  142 + </div>
  143 + <div class="log_four_contants_right">大班</div>
  144 + </div>
  145 + </div>
  146 + <div class=" log_four_contant_ones">
  147 + <div class="log_botms">
  148 + <div class="log_four_contants_left xuelingqian" data-name="学前班" data-class="4">
  149 + <img class="log_Img9" src="__TMPL__/public/assets/images/39_0.png" alt="" />
  150 + </div>
  151 + <div class="log_four_contants_right">学前班</div>
  152 + </div>
  153 + </div>
  154 + </div>
  155 + </div>
  156 + <div class="log_four_radios" style="display: none">
  157 + <div class="log_four_contants">
  158 + <div class=" log_four_contant_ones">
  159 + <div class="log_botms">
118 <div class="log_four_contants_left"> 160 <div class="log_four_contants_left">
119 <img class="log_Img9" src="__TMPL__/public/assets/images/73.png" alt="" /> 161 <img class="log_Img9" src="__TMPL__/public/assets/images/73.png" alt="" />
120 </div> 162 </div>
@@ -679,9 +721,9 @@ @@ -679,9 +721,9 @@
679 $('.log_four_radios').on('click','.log_botms',function() { 721 $('.log_four_radios').on('click','.log_botms',function() {
680 var root = $(this).parents('.log_four_radios').index(); 722 var root = $(this).parents('.log_four_radios').index();
681 var index = $(this).parent().index(); 723 var index = $(this).parent().index();
682 - console.log(index) 724 + // console.log(index)
683 index = root == 0?index:root==1?index + 6:index+9 725 index = root == 0?index:root==1?index + 6:index+9
684 - console.log(index) 726 + // console.log(index)
685 if($(this).find('.log_Img9').attr("src") == '__TMPL__/public/assets/images/39_0.png') { 727 if($(this).find('.log_Img9').attr("src") == '__TMPL__/public/assets/images/39_0.png') {
686 $(this).find('.log_Img9').attr("src", "__TMPL__/public/assets/images/73.png"); 728 $(this).find('.log_Img9').attr("src", "__TMPL__/public/assets/images/73.png");
687 $(this).next('.log_four_contants_input_block').slideDown(); 729 $(this).next('.log_four_contants_input_block').slideDown();
@@ -690,18 +732,28 @@ @@ -690,18 +732,28 @@
690 var tempData = ''; 732 var tempData = '';
691 var classes = index == 0 ? '一年级' : index == 1 ? '二年级' : index == 2 ? '三年级' : index == 3 ? '四年级' : index == 4 ? '五年级' : index == 5 ? '六年级' : index == 6 ? '初一' : index == 7 ? '初二' : index == 8 ? '初三' : index == 9 ? '高一' : index == 10 ? '高二' : index == 11 ? '高三' : ''; 733 var classes = index == 0 ? '一年级' : index == 1 ? '二年级' : index == 2 ? '三年级' : index == 3 ? '四年级' : index == 4 ? '五年级' : index == 5 ? '六年级' : index == 6 ? '初一' : index == 7 ? '初二' : index == 8 ? '初三' : index == 9 ? '高一' : index == 10 ? '高二' : index == 11 ? '高三' : '';
692 if($(this).parents(".log_four_contant_ones").find(".log_four_contants_left").find("img").attr("src") == "__TMPL__/public/assets/images/73.png") { 734 if($(this).parents(".log_four_contant_ones").find(".log_four_contants_left").find("img").attr("src") == "__TMPL__/public/assets/images/73.png") {
693 - if(inputs[0].value && inputs[1].value) {  
694 - tempData = classes + '-' + inputs[0].value + '-' + inputs[1].value 735 + if(inputs.length == 0) {
  736 + var name = $(this).find('.xuelingqian').data('name');
  737 + var ind = $(this).find('.xuelingqian').data('class');
  738 + arr[ind-1] = name;
  739 + } else {
  740 + if(inputs[0].value && inputs[1].value) {
  741 + tempData = classes + '-' + inputs[0].value + '-' + inputs[1].value
  742 + }
  743 + arr[index] = tempData;
695 } 744 }
696 - arr[index] = tempData;  
697 -  
698 } else{ 745 } else{
699 arr[index] = '' 746 arr[index] = ''
700 } 747 }
701 } else { 748 } else {
702 $(this).find('.log_Img9').attr("src", '__TMPL__/public/assets/images/39_0.png'); 749 $(this).find('.log_Img9').attr("src", '__TMPL__/public/assets/images/39_0.png');
703 $(this).next('.log_four_contants_input_block').slideUp(); 750 $(this).next('.log_four_contants_input_block').slideUp();
704 - arr[index] = '' 751 + var ind = $(this).find('.xuelingqian').data('class');
  752 + if(ind) {
  753 + arr[ind-1] = '';
  754 + } else {
  755 + arr[index] = ''
  756 + }
705 } 757 }
706 console.log(arr) 758 console.log(arr)
707 }); 759 });
@@ -86,7 +86,7 @@ @@ -86,7 +86,7 @@
86 <div class="log_seven_left_one">{$val.school}</div> 86 <div class="log_seven_left_one">{$val.school}</div>
87 <div class="log_seven_left_two"> 87 <div class="log_seven_left_two">
88 <volist name="val.class" id="vo"> 88 <volist name="val.class" id="vo">
89 - <span>{$vo.grade}{$vo.class}</span> 89 + <span>{$vo.grade}{$vo.class}<neq name="val.type" value="学龄前"></neq></span>
90 </volist> 90 </volist>
91 </div> 91 </div>
92 <div class="log_secen_left_three">{$val.region}</div> 92 <div class="log_secen_left_three">{$val.region}</div>
@@ -93,6 +93,16 @@ @@ -93,6 +93,16 @@
93 <div class="log_four_contant"> 93 <div class="log_four_contant">
94 <div class="log_four_contant_one"> 94 <div class="log_four_contant_one">
95 <div class="log_four_contant_left"> 95 <div class="log_four_contant_left">
  96 + <if condition="$data.type eq '学龄前'">
  97 + <img src="__TMPL__/public/assets/images/73.png" alt="" />
  98 + <else/>
  99 + <img src="__TMPL__/public/assets/images/39_0.png" alt="" />
  100 + </if>
  101 + </div>
  102 + <div class="log_four_contant_right">学龄前</div>
  103 + </div>
  104 + <div class="log_four_contant_one">
  105 + <div class="log_four_contant_left">
96 <if condition="$data.type eq '小学'"> 106 <if condition="$data.type eq '小学'">
97 <img src="__TMPL__/public/assets/images/73.png" alt="" /> 107 <img src="__TMPL__/public/assets/images/73.png" alt="" />
98 <else/> 108 <else/>
@@ -129,6 +139,42 @@ @@ -129,6 +139,42 @@
129 <div class="log_four_contants"> 139 <div class="log_four_contants">
130 <div class=" log_four_contant_ones"> 140 <div class=" log_four_contant_ones">
131 <div class="log_botms"> 141 <div class="log_botms">
  142 + <div class="log_four_contants_left xuelingqian" data-name="小班" data-class="1">
  143 + <img class="log_Img9" src="__TMPL__/public/assets/images/39_0.png" alt="" />
  144 + </div>
  145 + <div class="log_four_contants_right">小班</div>
  146 + </div>
  147 + </div>
  148 + <div class=" log_four_contant_ones">
  149 + <div class="log_botms">
  150 + <div class="log_four_contants_left xuelingqian" data-name="中班" data-class="2">
  151 + <img class="log_Img9" src="__TMPL__/public/assets/images/39_0.png" alt="" />
  152 + </div>
  153 + <div class="log_four_contants_right">中班</div>
  154 + </div>
  155 + </div>
  156 + <div class=" log_four_contant_ones">
  157 + <div class="log_botms">
  158 + <div class="log_four_contants_left xuelingqian" data-name="大班" data-class="3">
  159 + <img class="log_Img9" src="__TMPL__/public/assets/images/39_0.png" alt="" />
  160 + </div>
  161 + <div class="log_four_contants_right">大班</div>
  162 + </div>
  163 + </div>
  164 + <div class=" log_four_contant_ones">
  165 + <div class="log_botms">
  166 + <div class="log_four_contants_left xuelingqian" data-name="学前班" data-class="4">
  167 + <img class="log_Img9" src="__TMPL__/public/assets/images/39_0.png" alt="" />
  168 + </div>
  169 + <div class="log_four_contants_right">学前班</div>
  170 + </div>
  171 + </div>
  172 + </div>
  173 + </div>
  174 + <div class="log_four_radios" style="display: none">
  175 + <div class="log_four_contants">
  176 + <div class=" log_four_contant_ones">
  177 + <div class="log_botms">
132 <div class="log_four_contants_left"> 178 <div class="log_four_contants_left">
133 <img class="log_Img9" src="__TMPL__/public/assets/images/73.png" alt="" /> 179 <img class="log_Img9" src="__TMPL__/public/assets/images/73.png" alt="" />
134 </div> 180 </div>
@@ -632,12 +678,9 @@ @@ -632,12 +678,9 @@
632 $(".log_four_contant_one").each(function() { 678 $(".log_four_contant_one").each(function() {
633 $(this).click(function() { 679 $(this).click(function() {
634 var index = $(this).index(); 680 var index = $(this).index();
635 - console.log(index);  
636 var text1 = $(this).find(".log_four_contant_right").text(); 681 var text1 = $(this).find(".log_four_contant_right").text();
637 - console.log(text1)  
638 $("#four_inp").attr("placeholder", text1).attr("value",text1); 682 $("#four_inp").attr("placeholder", text1).attr("value",text1);
639 xcg = $(this).find('.log_four_contant_right').text(); 683 xcg = $(this).find('.log_four_contant_right').text();
640 - console.log(xcg)  
641 $(".log_four_contant_one img").eq(index).attr("src", "__TMPL__/public/assets/images/73.png").parents(".log_four_contant_one").siblings().find("img").attr("src", "__TMPL__/public/assets/images/39_0.png"); 684 $(".log_four_contant_one img").eq(index).attr("src", "__TMPL__/public/assets/images/73.png").parents(".log_four_contant_one").siblings().find("img").attr("src", "__TMPL__/public/assets/images/39_0.png");
642 if($(".log_four_contant_one img").eq(index).attr("src") == "__TMPL__/public/assets/images/73.png") { 685 if($(".log_four_contant_one img").eq(index).attr("src") == "__TMPL__/public/assets/images/73.png") {
643 $(".log_four_radios").eq(index).css({ 686 $(".log_four_radios").eq(index).css({
@@ -679,7 +722,6 @@ @@ -679,7 +722,6 @@
679 tempData = classes + '-' + inputs[0].value + '-' + inputs[1].value 722 tempData = classes + '-' + inputs[0].value + '-' + inputs[1].value
680 } 723 }
681 arr[index] = tempData; 724 arr[index] = tempData;
682 - console.log(arr)  
683 } else { 725 } else {
684 tempData = "" 726 tempData = ""
685 } 727 }
@@ -690,9 +732,7 @@ @@ -690,9 +732,7 @@
690 $('.log_four_radios').on('click','.log_botms',function() { 732 $('.log_four_radios').on('click','.log_botms',function() {
691 var root = $(this).parents('.log_four_radios').index(); 733 var root = $(this).parents('.log_four_radios').index();
692 var index = $(this).parent().index(); 734 var index = $(this).parent().index();
693 - console.log(index)  
694 index = root == 0?index:root==1?index + 6:index+9 735 index = root == 0?index:root==1?index + 6:index+9
695 - console.log(index)  
696 if($(this).find('.log_Img9').attr("src") == '__TMPL__/public/assets/images/39_0.png') { 736 if($(this).find('.log_Img9').attr("src") == '__TMPL__/public/assets/images/39_0.png') {
697 $(this).find('.log_Img9').attr("src", "__TMPL__/public/assets/images/73.png"); 737 $(this).find('.log_Img9').attr("src", "__TMPL__/public/assets/images/73.png");
698 $(this).next('.log_four_contants_input_block').slideDown(); 738 $(this).next('.log_four_contants_input_block').slideDown();
@@ -701,18 +741,28 @@ @@ -701,18 +741,28 @@
701 var tempData = ''; 741 var tempData = '';
702 var classes = index == 0 ? '一年级' : index == 1 ? '二年级' : index == 2 ? '三年级' : index == 3 ? '四年级' : index == 4 ? '五年级' : index == 5 ? '六年级' : index == 6 ? '初一' : index == 7 ? '初二' : index == 8 ? '初三' : index == 9 ? '高一' : index == 10 ? '高二' : index == 11 ? '高三' : ''; 742 var classes = index == 0 ? '一年级' : index == 1 ? '二年级' : index == 2 ? '三年级' : index == 3 ? '四年级' : index == 4 ? '五年级' : index == 5 ? '六年级' : index == 6 ? '初一' : index == 7 ? '初二' : index == 8 ? '初三' : index == 9 ? '高一' : index == 10 ? '高二' : index == 11 ? '高三' : '';
703 if($(this).parents(".log_four_contant_ones").find(".log_four_contants_left").find("img").attr("src") == "__TMPL__/public/assets/images/73.png") { 743 if($(this).parents(".log_four_contant_ones").find(".log_four_contants_left").find("img").attr("src") == "__TMPL__/public/assets/images/73.png") {
704 - if(inputs[0].value && inputs[1].value) {  
705 - tempData = classes + '-' + inputs[0].value + '-' + inputs[1].value 744 + if(inputs.length == 0) {
  745 + var name = $(this).find('.xuelingqian').data('name');
  746 + var ind = $(this).find('.xuelingqian').data('class');
  747 + arr[ind-1] = name;
  748 + } else {
  749 + if (inputs[0].value && inputs[1].value) {
  750 + tempData = classes + '-' + inputs[0].value + '-' + inputs[1].value
  751 + }
  752 + arr[index] = tempData;
706 } 753 }
707 - arr[index] = tempData;  
708 -  
709 } else{ 754 } else{
710 arr[index] = '' 755 arr[index] = ''
711 } 756 }
712 } else { 757 } else {
713 $(this).find('.log_Img9').attr("src", '__TMPL__/public/assets/images/39_0.png'); 758 $(this).find('.log_Img9').attr("src", '__TMPL__/public/assets/images/39_0.png');
714 $(this).next('.log_four_contants_input_block').slideUp(); 759 $(this).next('.log_four_contants_input_block').slideUp();
715 - arr[index] = '' 760 + var ind = $(this).find('.xuelingqian').data('class');
  761 + if(ind) {
  762 + arr[ind-1] = '';
  763 + } else {
  764 + arr[index] = ''
  765 + }
716 } 766 }
717 console.log(arr) 767 console.log(arr)
718 }); 768 });