popupChargeDel.html 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <form class="layui-form" lay-filter="charge-form-del" style="padding: 20px 30px 0 0;">
  2. <div class="layui-form-item">
  3. <label class="layui-form-label">车牌号</label>
  4. <div class="layui-input-inline">
  5. <input type="text" name="license" required lay-verify="required" autocomplete="off" class="layui-input" id="license" disabled="disabled">
  6. </div>
  7. </div>
  8. <div class="layui-form-item">
  9. <label class="layui-form-label">安检退款</label>
  10. <div class="layui-input-inline">
  11. <input type="text" name="Safe_receivable" required lay-verify="required|number" autocomplete="off" class="layui-input" id="Safe_receivable">
  12. </div>
  13. </div>
  14. <div class="layui-form-item">
  15. <label class="layui-form-label">环检退款</label>
  16. <div class="layui-input-inline">
  17. <input type="text" name="EP_receivable" required lay-verify="required|number" autocomplete="off" class="layui-input" id="EP_receivable">
  18. </div>
  19. </div>
  20. <div class="layui-form-item">
  21. <label class="layui-form-label">退款总计</label>
  22. <div class="layui-input-inline">
  23. <input type="text" name="cost" required lay-verify="required|number" autocomplete="off" class="layui-input" id="cost">
  24. </div>
  25. </div>
  26. <div class="layui-form-item">
  27. <label class="layui-form-label">备注</label>
  28. <div class="layui-input-block">
  29. <textarea type="text" name="remarks" autocomplete="off" class="layui-textarea" id="remarks"></textarea>
  30. </div>
  31. </div>
  32. <div class="layui-form-item">
  33. <div class="layui-input-block">
  34. <button class="layui-btn" lay-submit="" lay-filter="LAY-charge-del-submit">确认</button>
  35. <!--<button type="reset" class="layui-btn layui-btn-primary">重置</button>-->
  36. </div>
  37. </div>
  38. </form>
  39. <script>
  40. layui.use(['admin', 'form'], function() {
  41. var $ = layui.$
  42. , form = layui.form;
  43. $(function(){
  44. //输入框的值改变时触发
  45. $("#Safe_receivable").on("input",function(e){
  46. //获取input输入的值
  47. $('#cost').val(parseFloat($('#Safe_receivable').val()) + parseFloat($('#EP_receivable').val()));
  48. });
  49. });
  50. $(function(){
  51. //输入框的值改变时触发
  52. $("#EP_receivable").on("input",function(e){
  53. //获取input输入的值
  54. $('#cost').val(parseFloat($('#Safe_receivable').val()) + parseFloat($('#EP_receivable').val()));
  55. });
  56. });
  57. form.render(null, 'charge-form-del');
  58. })
  59. </script>