c371c152 by wang

init

1 parent 74b547a6
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
55 55
56 <div class="panel panel-default mb-20"> 56 <div class="panel panel-default mb-20">
57 <div class="panel-header">计算结果</div> 57 <div class="panel-header">计算结果</div>
58 <div class="panel-body"> 58 <div class="panel-body months">
59 <div class="row cl"> 59 <div class="row cl">
60 <div class="form-group col-sm-3 col-md-2"> 60 <div class="form-group col-sm-3 col-md-2">
61 <label>每月应还</label> 61 <label>每月应还</label>
...@@ -124,8 +124,28 @@ ...@@ -124,8 +124,28 @@
124 layer.alert(msg); 124 layer.alert(msg);
125 } else { 125 } else {
126 $('#totalRepay').val(data.data.totalRepay); 126 $('#totalRepay').val(data.data.totalRepay);
127 if(data.data.repayPlans.length > 1){
128 if(data.data.repayPlans[0].totalAmount !== data.data.repayPlans[1].totalAmount){
129 $('.months').html('');
130 var str = '';
131 for(var i=0;i<data.data.repayPlans.length;i++){
132 str += '<div class="row cl">'+
133 '<div class="form-group col-sm-3 col-md-2">'+
134 '<label>每月应还</label>'+
135 '<input type="text" id="totalAmount" class="form-control input-text" value="'+data.data.repayPlans[i].totalAmount+'" disabled>'+
136 '<span class="glyphicon form-control-feedback">元</span>'+
137 '</div>'+
138 '</div>';
139 }
140 $('.months').html(str);
141 }
142
143
144 }else{
127 $('#totalAmount').val(data.data.repayPlans[0].totalAmount); 145 $('#totalAmount').val(data.data.repayPlans[0].totalAmount);
128 } 146 }
147
148 }
129 }, 149 },
130 error: function () { 150 error: function () {
131 layer.alert("操作失败") 151 layer.alert("操作失败")
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!