| | |
| | | <input type="text" onblur="checkIsYuan(this)" value='${json.num1!}' name="num1" id="num1" class="form-control newWidth" placeholder="最多3位数"/> |
| | | 元,起步包含<input type="text" onblur="checkIsGongLi(this)" name="num2" id="num2" value='${json.num2!}' class="form-control newWidth" placeholder="最多3位数"/> |
| | | 公里,不足起步公里按起步公里收费</br></br> |
| | | 超过起步里程后每公里加收 <input type="text" onblur="checkIsYuan(this)" name="num3" id="num3" value='${json.num3!}' class="form-control newWidth" placeholder="最多3位数"/>元 |
| | | <!-- <span id="min">,<input type="text" onblur="checkIsMinute(this)" name="num5" id="num5" class="form-control newWidth" placeholder="最多3位数"/>--> |
| | | <!-- 分钟</span>--> |
| | | 超过起步里程后每公里加收 |
| | | <button style="background-color: #1c53c1; width: 60px; height: 30px; border-style: none; border-radius: 5px; color: white; font-size: 20px;" onclick="addPriceButton()">+</button> |
| | | <div id="mileage_div"> |
| | | @if(null != json.mileageList){ |
| | | @for(obj in json.mileageList){ |
| | | <div style="padding: 10px 0px;"> |
| | | <input onblur="checkIsYuan(this)" name="mileage" class="form-control newWidth mileage" value="${obj.mileage}" placeholder="最多3位数"/>公里以上,每公里加收 |
| | | <input onblur="checkIsYuan(this)" name="price" class="form-control newWidth price" value="${obj.price}" placeholder="最多3位数"/>元 |
| | | <button style="background-color: white; width: 60px;height: 30px;border-radius: 5px;color: red;font-size: 15px;border: none;" onclick="remPriceButton(this)">删除</button> |
| | | </div> |
| | | @} |
| | | @} |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="form-group waitFee"> |
| | |
| | | <div class="col-sm-10"> |
| | | 单程载客行驶 |
| | | <input type="text" onblur="checkIsGongLi(this)" name="num4" id="num4" value='${json.num4!}' class="form-control newWidth" placeholder="最多3位数" oninput="change(this)"/> |
| | | (不含<input type="text" id="buhan" value="${json.num4!}" disabled style="border: none;width:45px;text-align:center">公里)超出部分收取空驶费,每公里加收<input type="text" onblur="checkIsYuan(this)" name="num5" id="num5" value='${json.num5!}' class="form-control newWidth" placeholder="最多3位数"/>元 |
| | | (不含<input id="buhan" value="${json.num4!}" disabled style="border: none;width:45px;text-align:center">公里)超出部分收取空驶费,每公里加收<input type="text" onblur="checkIsYuan(this)" name="num5" id="num5" value='${json.num5!}' class="form-control newWidth" placeholder="最多3位数"/>元 |
| | | </div> |
| | | </div> |
| | | <div class="form-group waitFee"> |
| | |
| | | |
| | | var b = false; |
| | | var waitFee = '{'; |
| | | // waitFee = waitFee + '"num1":"'+$("#num1").val()+'",'; |
| | | $('.waitFee input[type="text"]').each(function(){ |
| | | var value = $(this).val(); |
| | | if('' == value){ |
| | |
| | | } |
| | | waitFee = waitFee + '"'+$(this)[0].name+'":"'+value+'",'; |
| | | }); |
| | | waitFee = waitFee + '"mileageList":[' |
| | | $('#mileage_div').children('div').each(function (){ |
| | | waitFee = waitFee + "{" |
| | | $(this).children('input').each(function (){ |
| | | var value = $(this).val(); |
| | | if('' == value){ |
| | | b = true; |
| | | Feng.info("请填写完整配置"); |
| | | return |
| | | } |
| | | waitFee = waitFee + '"'+$(this)[0].name+'":"'+value+'",'; |
| | | }) |
| | | waitFee = waitFee.substring(0,waitFee.length-1); |
| | | waitFee += '}'; |
| | | waitFee = waitFee + "}," |
| | | }) |
| | | waitFee = waitFee.substring(0,waitFee.length-1); |
| | | waitFee += ']}'; |
| | | console.log(btoa(waitFee)); |
| | | |
| | | window.parent.document.getElementById("zc_price").value = btoa(waitFee); |
| | |
| | | $(obj).val(''); |
| | | } |
| | | } |
| | | function addPriceButton(){ |
| | | $('#mileage_div').append('<div style="padding: 10px 0px;">' + |
| | | '<input onblur="checkIsYuan(this)" name="mileage" class="form-control newWidth mileage" placeholder="最多3位数"/>公里以上,每公里加收' + |
| | | '<input onblur="checkIsYuan(this)" name="price" class="form-control newWidth price" placeholder="最多3位数"/>元 ' + |
| | | '<button style="background-color: white; width: 60px;height: 30px;border-radius: 5px;color: red;font-size: 15px;border: none;" onclick="remPriceButton(this)">删除</button>' + |
| | | '</div>') |
| | | } |
| | | |
| | | function remPriceButton(e){ |
| | | $(e).parent('div').remove(); |
| | | } |
| | | </script> |
| | | @} |