order.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. {include file="public/header"}
  2. <form action="order" method="post" class="form-inline">
  3. <div class="form-group">
  4. <label>搜索</label>
  5. <select name="type" class="form-control" id="select_id">
  6. <option value="">全部</option>
  7. <option value="order_id">订单号</option>
  8. <option value="linkman">报修人</option>
  9. <option value="linktel">报修号码</option>
  10. <option value="repuser">维修人</option>
  11. <option value="status">进度</option>
  12. </select>
  13. </div>
  14. <div class="form-group">
  15. <input type="text" class="form-control" id="input" name="keyword" placeholder="搜索内容">
  16. <select name="statusValue" id="statusValue" hidden disabled>
  17. <option value="4">请选择</option>
  18. <option value="0">接单中</option>
  19. <option value="1">处理中</option>
  20. <option value="2">已完成</option>
  21. <option value="3">转单</option>
  22. </select>
  23. </div>
  24. <button type="submit" class="btn btn-primary">搜索</button>
  25. </form>
  26. <div class="table-responsive" style="padding-top: 10px;">
  27. <table class="table table-striped" border='1'>
  28. <thead>
  29. <tr>
  30. <th style="text-align: center;">工单号</th>
  31. <th style="text-align: center;">报修人</th>
  32. <th style="text-align: center;">联系电话</th>
  33. <th style="text-align: center;">维修者</th>
  34. <th style="text-align: center;">订单问题</th>
  35. <th style="text-align: center;">创建时间</th>
  36. <th style="text-align: center;">订单更新时间</th>
  37. <th style="text-align: center;">订单状态</th>
  38. <th style="text-align: center;">操作</th>
  39. </tr>
  40. </thead>
  41. <tbody style="text-align: center;">
  42. {volist name="order_info" id="vo"}
  43. <tr>
  44. <td><b>{$vo.order_id}</b></td>
  45. <td>{$vo.linkman}</td>
  46. <td>{$vo.linktel}</td>
  47. <td>
  48. {if condition = "$vo.repuser eq null"}
  49. 暂无
  50. {else /}
  51. {$vo.repuser}
  52. {/if}
  53. </td>
  54. <td>{$vo.title}</td>
  55. <td>{$vo.create_time}</td>
  56. <td>{$vo.update_time | date='Y-m-d H:i',###}</td>
  57. <td>
  58. {if condition="$vo.status eq '0'"}
  59. <font color="green">接单中</font>
  60. {elseif condition="$vo.status eq '1'"}
  61. <font color="green">处理中</font>
  62. {elseif condition="$vo.status eq '3'"}
  63. <font color="green">转单</font>
  64. {else /}
  65. <font color="red">完成</font>
  66. {/if}
  67. </td>
  68. <td>
  69. <button data-orderid="{$vo['order_id']}" class="btn btn-xs btn-info buttoninfo">查看</button>
  70. <button data-orderid="{$vo['order_id']}" class="btn btn-xs btn-danger buttoneidt">编辑</button>
  71. <button data-orderid="{$vo['order_id']}" class="btn btn-xs btn-success buttonmessage">评论</button>
  72. </td>
  73. </tr>
  74. {/volist}
  75. </tbody>
  76. <thead>
  77. <tr>
  78. <th style="text-align: center;">工单号</th>
  79. <th style="text-align: center;">报修人</th>
  80. <th style="text-align: center;">联系电话</th>
  81. <th style="text-align: center;">维修者</th>
  82. <th style="text-align: center;">订单问题</th>
  83. <th style="text-align: center;">创建时间</th>
  84. <th style="text-align: center;">订单更新时间</th>
  85. <th style="text-align: center;">订单状态</th>
  86. <th style="text-align: center;">操作</th>
  87. </tr>
  88. </thead>
  89. </table>
  90. </div>
  91. <div style="text-align:center;">
  92. {$order_info->render()}
  93. </div>
  94. <script src="__LOGIN__/js/jquery.min.js"></script>
  95. <script>
  96. $(function () {
  97. $("#select_id").change(function(){
  98. var selected = $(this).children('option:selected').val()
  99. if(selected == "status"){
  100. $("#statusValue").show();
  101. $("#statusValue").removeAttr('disabled')
  102. $("#statusValue").addClass('form-control')
  103. $('#input').hide();
  104. $('#input').attr("disabled",true);
  105. }else{
  106. $('#input').show();
  107. $("#input").removeAttr('disabled')
  108. $("#statusValue").hide();
  109. $("#statusValue").attr("disabled",true)
  110. }
  111. });
  112. //查看信息
  113. $('.buttoninfo').click(function () {
  114. //获取到当前订单
  115. let orderid = $(this).attr('data-orderid');
  116. window.location.href = "__URL__/order_info?orderid="+orderid;
  117. });
  118. $("[name='type']");
  119. //编辑信息
  120. $('.buttoneidt').click(function () {
  121. //获取到当前订单
  122. let orderid = $(this).attr('data-orderid');
  123. window.location.href = "__URL__/edit_order_info?orderid="+orderid;
  124. });
  125. //评论订单
  126. $('.buttonmessage').click(function () {
  127. //获取到当前订单
  128. let orderid = $(this).attr('data-orderid');
  129. console.log(orderid);
  130. window.location.href = "__URL__/order_message?orderid="+orderid;
  131. });
  132. });
  133. </script>