tb-transport-order-timeout.html 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>货运订单信息-列表</title>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  7. <!-- 所有的 css & js 资源 -->
  8. <link rel="stylesheet" href="../../static/kj/element-ui/theme-chalk/index.css">
  9. <link rel="stylesheet" href="../../static/sa.css">
  10. <script src="../../static/kj/vue.min.js"></script>
  11. <script src="../../static/kj/element-ui/index.js"></script>
  12. <script src="../../static/kj/httpVueLoader.js"></script>
  13. <script src="../../static/kj/jquery.min.js"></script>
  14. <script src="../../static/kj/layer/layer.js"></script>
  15. <script src="../../static/sa.js"></script>
  16. </head>
  17. <body>
  18. <div class="vue-box" style="display: none;" :style="'display: block;'">
  19. <div class="c-panel">
  20. <!-- ------------- 检索参数 ------------- -->
  21. <el-form ref="form" :model='p' @submit.native.prevent>
  22. <sa-item type="text" name="货运单号" v-model="p.orderId" width="80px"></sa-item>
  23. <sa-item type="text" name="需求单号" v-model="p.demandId" width="80px"></sa-item>
  24. <sa-item type="text" name="货主" v-model="p.shipperName"></sa-item>
  25. <sa-item type="text" name="接单司机" v-model="p.driverName" width="80px"></sa-item>
  26. <sa-item type="text" name="接单车辆" v-model="p.plateNo" width="80px"></sa-item>
  27. <!--<sa-item type="text" name="货运单状态" v-model="p.status" width="120px">
  28. <el-select v-model="p.status">
  29. <el-option label="待进场" value="0"></el-option>
  30. <el-option label="待装货" value="1"></el-option>
  31. <el-option label="已装货" value="2"></el-option>
  32. <el-option label="运输中" value="3"></el-option>
  33. <el-option label="待卸货" value="4"></el-option>
  34. <el-option label="卸货中" value="5"></el-option>
  35. <el-option label="已卸货" value="6"></el-option>
  36. <el-option label="已结算" value="7"></el-option>
  37. <el-option label="退款中" value="11"></el-option>
  38. <el-option label="已退款" value="12"></el-option>
  39. </el-select>
  40. </sa-item>
  41. <sa-item type="text" name="订单时间" v-model="p.createdAt" width="120px"></sa-item>-->
  42. <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
  43. <el-button size="mini" type="info" @click="sa.f5()">重置</el-button>
  44. </el-form>
  45. <!--<div class="fast-btn">
  46. <el-button v-if="sa.isAuth('tb-transport-order-add')" size="mini" type="primary" @click="add()">新增</el-button>
  47. <el-button size="mini" type="success" @click="getBySelect()">查看</el-button>
  48. </div>-->
  49. <!-- ------------- 数据列表 ------------- -->
  50. <el-table class="data-table" ref="data-table" :data="dataList" >
  51. <sa-td type="index" name="序号"></sa-td>
  52. <sa-td name="货运单号" prop="orderId" width="150px"></sa-td>
  53. <sa-td name="需求单号" prop="demandId" width="150px"></sa-td>
  54. <sa-td name="货主" prop="shipperName" width="180px"></sa-td>
  55. <sa-td name="商品名称" prop="itemName" width="180px"></sa-td>
  56. <!--<sa-td name="商品数量" prop="quantity" ></sa-td>
  57. <sa-td name="商品重量(kg)" prop="weight" width="120px"></sa-td>-->
  58. <sa-td name="起运地" prop="originAddress" width="220px"></sa-td>
  59. <sa-td name="目的地" prop="destAddress" width="220px"></sa-td>
  60. <sa-td name="里程(km)" prop="distance" ></sa-td>
  61. <!--<sa-td name="要求发车时间" prop="departureTime" width="120px" type="datetime"></sa-td>
  62. <sa-td name="要求运达时间" prop="arrivalTime" width="120px" type="datetime"></sa-td>-->
  63. <sa-td name="接单司机" prop="driverName" ></sa-td>
  64. <sa-td name="接单车辆" prop="plateNo" ></sa-td>
  65. <sa-td name="订单状态" prop="status" type="enum" :jv="{0: '待进场', 1: '待装货', 2: '已装货', 3:'运输中', 4:'待卸货', 5:'卸货中', 6:'已卸货', 7:'已结算', 11:'退款中', 12:'已退款'}"></sa-td>
  66. <sa-td name="装货时间" prop="realLoadingTime" width="150px" type="datetime"></sa-td>
  67. <sa-td name="发车时间" prop="realDepartureTime" width="150px" type="datetime"></sa-td>
  68. <sa-td name="运达时间" prop="realArrivalTime" type="datetime" width="150px"></sa-td>
  69. <sa-td name="完成时间" prop="finishTime" type="datetime" width="150px"></sa-td>
  70. <el-table-column label="操作" fixed="right" width="210px">
  71. <template slot-scope="s">
  72. <el-button class="c-btn" type="success" icon="el-icon-view" @click="get(s.row)">查看详情</el-button>
  73. <el-button class="c-btn" type="primary" icon="el-icon-view" @click="viewProcess(s.row)">查看处理过程</el-button>
  74. <el-button v-if="sa.isAuth('tb-transport-order-settle-confirm')" class="c-btn" type="danger" icon="el-icon-edit" @click="handleSettleConfirm(s.row)">超时结算处理</el-button>
  75. </template>
  76. </el-table-column>
  77. </el-table>
  78. <!-- ------------- 分页 ------------- -->
  79. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()"></sa-item>
  80. </div>
  81. </div>
  82. <script>
  83. var app = new Vue({
  84. components: {
  85. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  86. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  87. },
  88. el: '.vue-box',
  89. data: {
  90. p: { // 查询参数
  91. orderId: '', // 货运订单号
  92. demandId: '', // 需求单号
  93. shipperName: '', // 货主名称
  94. driverName: '', // 司机姓名
  95. plateNo: '', // 接单车辆
  96. status: '', // 货运订单状态
  97. createdAt: '', // 货运订单创建时间
  98. refundStatus: '', // 退款状态,0未退款,1退款申请,2同意退款,3退款关闭
  99. pageNo: 1, // 当前页
  100. pageSize: 10, // 页大小
  101. sortType: 0 // 排序方式
  102. },
  103. dataCount: 0,
  104. dataList: [], // 数据集合
  105. },
  106. methods: {
  107. // 刷新
  108. f5: function() {
  109. sa.ajax('/transport-server/TbTransportOrder/getConfirmTimeoutList', sa.removeNull(this.p), function(res) {
  110. this.dataList = res.data; // 数据
  111. this.dataCount = res.dataCount; // 数据总数
  112. sa.f5TableHeight(); // 刷新表格高度
  113. }.bind(this));
  114. },
  115. // 查看
  116. get: function(data) {
  117. sa.showIframe('货运单详情', 'tb-transport-order-info.html?orderId=' + data.orderId, '1050px', '90%');
  118. },
  119. viewProcess: function(data){
  120. sa.showIframe('货运单处理过程', 'tb-transport-order-process.html?orderId=' + data.orderId, '500px', '90%');
  121. },
  122. // 查看 - 根据选中的
  123. getBySelect: function(data) {
  124. var selection = this.$refs['data-table'].selection;
  125. if(selection.length == 0) {
  126. return sa.msg('请选择一条数据')
  127. }
  128. this.get(selection[0]);
  129. },
  130. // 超时结算确认
  131. handleSettleConfirm: function(data) {
  132. sa.showIframe('超时结算确认', 'tb-transport-order-settle-confirm.html?orderId=' + data.orderId, '1050px', '90%');
  133. },
  134. // 新增
  135. add: function(data) {
  136. sa.showIframe('新增数据', 'tb-transport-order-add.html?id=-1', '1000px', '90%');
  137. },
  138. // 删除
  139. del: function(data) {
  140. sa.confirm('是否删除,此操作不可撤销', function() {
  141. sa.ajax('/transport-server/TbTransportOrder/delete?id=' + data.orderId, function(res) {
  142. sa.arrayDelete(this.dataList, data);
  143. sa.ok('删除成功');
  144. sa.f5TableHeight(); // 刷新表格高度
  145. }.bind(this))
  146. }.bind(this));
  147. },
  148. // 批量删除
  149. deleteByIds: function() {
  150. // 获取选中元素的id列表
  151. let selection = this.$refs['data-table'].selection;
  152. let ids = sa.getArrayField(selection, 'id');
  153. if(selection.length == 0) {
  154. return sa.msg('请至少选择一条数据')
  155. }
  156. // 提交删除
  157. sa.confirm('是否批量删除选中数据?此操作不可撤销', function() {
  158. sa.ajax('/transport-server/TbTransportOrder/deleteByIds', {ids: ids.join(',')}, function(res) {
  159. sa.arrayDelete(this.dataList, selection);
  160. sa.ok('删除成功');
  161. sa.f5TableHeight(); // 刷新表格高度
  162. }.bind(this))
  163. }.bind(this));
  164. },
  165. },
  166. created: function() {
  167. this.f5();
  168. sa.onInputEnter();
  169. }
  170. })
  171. </script>
  172. </body>
  173. </html>