ht-trade-settlement-order.html 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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. <style type="text/css">
  17. .c-panel .el-form .c-label{width: 7em !important;}
  18. .c-panel .el-form .el-input, .c-panel .el-form .el-textarea__inner{width: 250px;}
  19. </style>
  20. </head>
  21. <body>
  22. <div class="vue-box" style="display: none;" :style="'display: block;'">
  23. <div class="c-panel">
  24. <!-- ------------- 检索参数 ------------- -->
  25. <!-- <div class="c-title">检索参数</div> -->
  26. <el-form ref="form" :model='p' @submit.native.prevent>
  27. <sa-item type="text" name="订单号" v-model="p.tradeNo" width="5em"></sa-item>
  28. <sa-item type="text" name="买家" v-model="p.buyUserName"></sa-item>
  29. <sa-item type="text" name="商家名称" v-model="p.enterpriseName" width="6em"></sa-item>
  30. <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
  31. <el-button type="info" icon="el-icon-refresh" @click="sa.f5()">重置</el-button>
  32. </el-form>
  33. <!-- ------------- 数据列表 ------------- -->
  34. <el-table class="data-table" ref="data-table" :data="dataList" >
  35. <sa-td type="index" width="30px"></sa-td>
  36. <sa-td name="订单号" prop="tradeNo" width="180px"></sa-td>
  37. <sa-td name="买家" prop="buyUserName" ></sa-td>
  38. <sa-td name="商家名称" prop="enterpriseName" width="280px"></sa-td>
  39. <sa-td name="商品名称" prop="goodsNames" width="200px"></sa-td>
  40. <sa-td name="总重量" prop="totalWeight" ></sa-td>
  41. <sa-td name="车牌号" prop="veNo" ></sa-td>
  42. <sa-td name="总金额" prop="totalPrice" ></sa-td>
  43. <sa-td name="上架金额(元)" prop="upPrice" >
  44. <template slot-scope="s">
  45. <div >{{s.row.upPrice}}
  46. <el-link v-if="s.row.upStatus==2&&s.row.resaleStatus==0&&sa.isAuth('tb-order-edit-price')" style="font-size: 12px;" type="primary" @click="editPrice(s.row)">
  47. 修改
  48. </el-link>
  49. </div>
  50. </template>
  51. </sa-td>
  52. <sa-td name="订单状态" prop="upPrice" >
  53. <template slot-scope="s">
  54. <div v-if="s.row.upStatus==2">已上架</div>
  55. <div v-else>未上架</div>
  56. </template>
  57. </sa-td>
  58. <!-- <sa-td type="enum" name="交易确认" prop="peopleConfirmStatus" :jv="{1: '已确认[green]', 0: '未确认[#ff910a]'}" ></sa-td>
  59. <sa-td type="enum" name="委托确认" prop="cooperEntrustStatus" :jv="{1: '已确认[green]', 0: '未确认[#ff910a]'}" ></sa-td>
  60. <sa-td type="enum" name="进口确认" prop="applyConfirmStatus" :jv="{1: '已确认[green]', 0: '未确认[#ff910a]'}" ></sa-td> -->
  61. <el-table-column label="操作" fixed="right" width="100px">
  62. <template slot-scope="s">
  63. <el-button class="c-btn" type="success" icon="el-icon-view" @click="getBank(s.row)">银行回执</el-button>
  64. </template>
  65. </el-table-column>
  66. </el-table>
  67. <!-- ------------- 分页 ------------- -->
  68. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()"></sa-item>
  69. </div>
  70. <el-dialog :title="model.title" :visible.sync="model.visible" width="500px">
  71. <div>
  72. 当前价格(元):{{model.form.upPrice}}
  73. </div>
  74. <sa-item type="num" name="金额" v-model="model.form.selPrice" placeholder="确认金额" br></sa-item>
  75. <span slot="footer" class="dialog-footer">
  76. <el-button @click="model.visible = false">取 消</el-button>
  77. <el-button type="primary" @click="save">保存</el-button>
  78. <el-button type="primary" @click="sel">转售二级</el-button>
  79. </span>
  80. </el-dialog>
  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. model: {
  91. title: '修改价格',
  92. visible: false,
  93. form: {
  94. id:'',
  95. upPrice:'',
  96. selPrice:0
  97. }
  98. },
  99. p: { // 查询参数
  100. tradeNo: '', // 订单号
  101. buyUserName: '', // 买家
  102. enterpriseName: '', // 商家名称
  103. platSeqNo: sa.p('platSeqNo', 0),
  104. pageNo: 1, // 当前页
  105. pageSize: 20, // 页大小
  106. sortType: 0 // 排序方式
  107. },
  108. dataCount: 0,
  109. dataList: [], // 数据集合
  110. },
  111. methods: {
  112. editPrice(item){
  113. this.model={
  114. title:'修改订单【'+item.tradeNo+'】价格',
  115. visible:true,
  116. form:item
  117. }
  118. },
  119. save(){
  120. let price=this.model.form.selPrice;
  121. if(!price){
  122. sa.error('请输入金额')
  123. return;
  124. }
  125. sa.ajax('/level-one-server/TbOrder/editUpPrice', {id:this.model.form.id,price:price}, function(res) {
  126. this.f5();
  127. this.model.visible=false;
  128. }.bind(this));
  129. },
  130. sel(){
  131. let price=this.model.form.selPrice;
  132. if(!price){
  133. sa.error('请输入金额')
  134. return;
  135. }
  136. sa.ajax('/level-two-server/TbOrders/addOrderByResale', {id:this.model.form.id,resalePrice:price}, function(res) {
  137. this.f5();
  138. this.model.visible=false;
  139. }.bind(this));
  140. },
  141. // 刷新
  142. f5: function() {
  143. sa.ajax('/level-one-server/TbOrder/getList', sa.removeNull(this.p), function(res) {
  144. this.dataList = res.data; // 数据
  145. this.dataCount = res.dataCount; // 数据总数
  146. sa.f5TableHeight(); // 刷新表格高度
  147. }.bind(this));
  148. },
  149. // 查看银行回执
  150. getBank: function(data) {
  151. sa.showIframe('银行回执', 'tb-order-bank-list.html?tradeNo=' + data.tradeNo, '1300px', '90%');
  152. }
  153. },
  154. created: function() {
  155. this.f5();
  156. sa.onInputEnter();
  157. }
  158. })
  159. </script>
  160. </body>
  161. </html>