order.html 4.2 KB

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