| xqd
@@ -114,7 +114,7 @@
|
|
|
<tr>
|
|
|
<td width="10%">拆迁补偿总金额:</td>
|
|
|
<td colspan="5">¥
|
|
|
- <input disabled id="total_money" class="form-control" type="text" placeholder="大写">
|
|
|
+ <input disabled id="total_money1" class="form-control" type="text" placeholder="大写">
|
|
|
</td>
|
|
|
<td colspan="2"><input name="total_money" class="form-control" type="text" placeholder="小写" onchange="NoToChinese(this.value)" >(元)</td>
|
|
|
</tr>
|
| xqd
@@ -132,8 +132,8 @@
|
|
|
<td><input name="home_area" class="form-control" type="text" placeholder="" onchange="get_product(home_area,money_home_dprice,money_home_price)"></td>
|
|
|
<td><input name="money_home_dprice" class="form-control" type="text" placeholder="" onchange="get_product(home_area,money_home_dprice,money_home_price)"></td>
|
|
|
<td><input name="money_home_price" class="form-control" type="text" placeholder=""></td>
|
|
|
- <td rowspan="3"><input name="money_home_jchae" class="form-control" type="text" placeholder=""></td>
|
|
|
- <td rowspan="3"><input id="money_home_tchae" name="money_home_tchae" class="form-control" type="text" placeholder="" onchange="minus(this.value)"></td>
|
|
|
+ <td rowspan="3"><input id="money_home_jchae" name="money_home_jchae" class="form-control" type="text" placeholder="" onclick="jian(money_home_price,money_home_price2,money_bus_price,total_money)"></td>
|
|
|
+ <td rowspan="3"><input id="money_home_tchae" name="money_home_tchae" class="form-control" type="text" placeholder="" onclick="jian(money_home_price,money_home_price2,money_bus_price,total_money)"></td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td><input name="home_area2" class="form-control" type="text" placeholder="" onchange="get_product(home_area2,money_home_dprice2,money_home_price2)"></td>
|
| xqd
@@ -250,7 +250,25 @@
|
|
|
for (var i = 0; i < a[1].length; i++) re += AA[a[1].charAt(i)];
|
|
|
}
|
|
|
|
|
|
- $('#total_money').val(re);
|
|
|
+ $('#total_money1').val(re);
|
|
|
+ }
|
|
|
+
|
|
|
+ function jian(I,P,Q,total){
|
|
|
+ var result = 0;
|
|
|
+ if ($(I).val() == ''){$(I).val(0);}
|
|
|
+ if ($(P).val() == ''){$(P).val(0);}
|
|
|
+ if ($(Q).val() == ''){$(Q).val(0);}
|
|
|
+ if ($(total).val() == ''){$(total).val(0);}
|
|
|
+
|
|
|
+ result = parseFloat($(total).val()) - ( parseFloat($(I).val())+parseFloat($(P).val())+parseFloat($(Q).val()) );
|
|
|
+ result = Math.round(result);
|
|
|
+ if(result >= 0){
|
|
|
+ $('#money_home_jchae').val(result);
|
|
|
+ $('#money_home_tchae').val('');
|
|
|
+ }else{
|
|
|
+ $('#money_home_jchae').val('');
|
|
|
+ $('#money_home_tchae').val(result*(-1));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
function minus(value){
|