tb-order-deductionByVeNo.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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. <el-form ref="form" @submit.native.prevent>
  21. <el-button type="success" icon="el-icon-info" @click="deductionByVeNo()">按车补扣款</el-button>
  22. </el-form>
  23. <!-- ------------- 数据列表 ------------- -->
  24. <el-table class="data-table" ref="data-table" :data="dataList" >
  25. <sa-td type="index" width="30px"></sa-td>
  26. <sa-td name="车牌号" prop="veNo" ></sa-td>
  27. <sa-td name="订单号" prop="tradeNo" width="180"></sa-td>
  28. <sa-td name="买家" prop="buyUserName" ></sa-td>
  29. <sa-td name="商家名称" prop="enterpriseName" width="280px"></sa-td>
  30. <sa-td name="商品名称" prop="goodsNames" width="200px"></sa-td>
  31. <sa-td name="总重量" prop="totalWeight" ></sa-td>
  32. <sa-td name="总金额" prop="totalPrice" ></sa-td>
  33. <sa-td name="上架金额(元)" prop="upPrice" ></sa-td>
  34. <sa-td name="订单状态" prop="upStatus" >
  35. <template slot-scope="s">
  36. <div v-if="s.row.upStatus===2">已上架</div>
  37. <div v-else>未上架</div>
  38. </template>
  39. </sa-td>
  40. <sa-td name="过卡状态" prop="finishStatus" >
  41. <template slot-scope="s">
  42. <div v-if="s.row.finishStatus===1">已过卡3</div>
  43. <div v-else>未过卡3</div>
  44. </template>
  45. </sa-td>
  46. <!--(一级市场)订单扣款回执状态[0=初始值 1=扣款成功 2=扣款失败]-->
  47. <sa-td name="扣款状态" prop="sxb010Status" >
  48. <template slot-scope="s">
  49. <div v-if="s.row.sxb010Status===1">扣款成功</div>
  50. <div v-else-if="s.row.sxb010Status===2">扣款失败</div>
  51. <div v-else-if="s.row.peopleConfirmStatus===1 && s.row.applyConfirmStatus===1">已确认</div>
  52. <div v-else>未确认</div>
  53. </template>
  54. </sa-td>
  55. <sa-td name="补扣次数" prop="deductionCount">
  56. <template slot-scope="s">
  57. <div v-if="s.row.deductionCount==0">0</div>
  58. <div v-else>{{s.row.deductionCount}}</div>
  59. </template>
  60. </sa-td>
  61. <sa-td name="补扣时间" prop="deductionTime" width="140px"></sa-td>
  62. <sa-td name="创建时间" prop="createTime" width="140px"></sa-td>
  63. </el-table>
  64. <!-- ------------- 分页 ------------- -->
  65. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()"></sa-item>
  66. </div>
  67. </div>
  68. <script>
  69. var app = new Vue({
  70. components: {
  71. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  72. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  73. },
  74. el: '.vue-box',
  75. data: {
  76. veNo: sa.p('veNo', 0),
  77. p: { // 查询参数
  78. veNo: sa.p('veNo', 0), // 车牌号
  79. pageNo: 1, // 当前页
  80. pageSize: 10, // 页大小
  81. sortType: 0 // 排序方式
  82. },
  83. dataCount: 0,
  84. dataList: [], // 数据集合
  85. },
  86. methods: {
  87. deductionByVeNo() {
  88. if(this.dataCount === 0 ) {
  89. sa.error('当前车没有需要执行扣款的订单')
  90. return;
  91. }
  92. sa.confirm('是否执行当前列表订单的扣款操作', function() {
  93. sa.ajax('/level-one-server/TbOrder/deductionByVeNo?veNo=' + this.veNo, function(res) {
  94. sa.alert('操作成功', this.clean);
  95. }.bind(this))
  96. }.bind(this));
  97. },
  98. clean: function() {
  99. parent.app.f5(); // 刷新父页面列表
  100. sa.closeCurrIframe(); // 关闭本页
  101. },
  102. f5: function() {
  103. sa.ajax('/level-one-server/TbOrder/getDeductionByVeNoList', sa.removeNull(this.p), function(res) {
  104. this.dataList = res.data; // 数据
  105. this.dataCount = res.dataCount; // 数据总数
  106. sa.f5TableHeight(); // 刷新表格高度
  107. }.bind(this));
  108. },
  109. },
  110. created: function() {
  111. this.f5();
  112. sa.onInputEnter();
  113. }
  114. })
  115. </script>
  116. </body>
  117. </html>