0
0

finish.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <div class="row">
  4. <div class="col-sm-12">
  5. <div class="ibox float-e-margins">
  6. <div class="ibox-content">
  7. <form method="post" action="{:url('finish')}" class="form-horizontal">
  8. <input type="hidden" name="id" value="{$info['id']|default='0'}" id="orderId">
  9. <div class="form-group">
  10. <label class="col-xs-2 control-label">开始时间</label>
  11. <div class="col-xs-6">
  12. <input type="text" class="form-control" disabled id="start" value="{$info.start|default=''}">
  13. </div>
  14. </div>
  15. <div class="form-group">
  16. <label class="col-xs-2 control-label">结束时间</label>
  17. <div class="col-xs-6">
  18. <input type="text" class="form-control" readonly id="end" name="end" value="{$info.end|default=''}" >
  19. </div>
  20. </div>
  21. <div class="form-group">
  22. <label class="col-xs-2 control-label">预收金</label>
  23. <div class="col-xs-6">
  24. <input type="number" class="form-control" readonly value="{$info.pre_money|default='0'}">
  25. </div>
  26. </div>
  27. <div class="form-group">
  28. <label class="col-xs-2 control-label">收费金额</label>
  29. <div class="col-xs-6">
  30. <input type="number" class="form-control" name="amount" value="{$info.amount|default=''}" id="sfMoney">
  31. </div>
  32. <i class="tishi" style="margin-top: 5px;position: absolute">{if $bjMoney > 0}
  33. (应补缴:{$bjMoney})
  34. {/if}
  35. {if $tkMoney >0}(应退款:{$tkMoney}){/if}
  36. </i>
  37. </div>
  38. <div class="hr-line-dashed"></div>
  39. <div class="form-group">
  40. <div class="col-sm-4 col-sm-offset-2">
  41. <button class="btn btn-primary ajax-post" target-form="form-horizontal" data-layer="1" type="submit">确 定</button>
  42. </div>
  43. </div>
  44. </form>
  45. </div>
  46. </div>
  47. </div>
  48. </div>
  49. {/block}
  50. {block name="script"}
  51. <script type="text/javascript" src="/static/layDate-v5.0.9/laydate.js"></script>
  52. <script>
  53. laydate.render({
  54. elem: '#start',
  55. //设置开始日期、日期日期的 input 选择器
  56. //数组格式为 5.3.0 开始新增,之前版本直接配置 true 或任意分割字符即可
  57. type: 'datetime',
  58. trigger: 'click',
  59. theme: '#148d8f'
  60. });
  61. laydate.render({
  62. elem: '#end',
  63. //设置开始日期、日期日期的 input 选择器
  64. //数组格式为 5.3.0 开始新增,之前版本直接配置 true 或任意分割字符即可
  65. type: 'datetime',
  66. trigger: 'click',
  67. theme: '#148d8f',
  68. done: function(value, date, endDate){
  69. console.log(value,11111111)
  70. console.log(date,222222)
  71. console.log(date,endDate)
  72. var orderId = $('#orderId').val();
  73. var end = value;
  74. var url = '{:url("PhOrders/calculateMoney")}';
  75. $.post(url,{orderId:orderId,end:end},function (e){
  76. $('#sfMoney').val(e.data.sfMoney);
  77. if(e.data.bjMoney){
  78. $('.tishi').html('(应补缴:'+e.data.bjMoney+')')
  79. }
  80. if(e.data.tkMoney){
  81. $('.tishi').html('(应退款:'+e.data.tkMoney+')')
  82. }
  83. })
  84. }
  85. });
  86. </script>
  87. {/block}