tb-order-list.html 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  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. <div class="c-title">检索参数</div>
  22. <el-form ref="form" :model='p' @submit.native.prevent>
  23. <sa-item type="text" name="订单号" v-model="p.tradeNo" width="80px"></sa-item>
  24. <sa-item type="text" name="买家" v-model="p.buyUserName"></sa-item>
  25. <sa-item type="text" name="商家名称" v-model="p.enterpriseName" width="70px"></sa-item>
  26. <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
  27. <el-button type="info" icon="el-icon-refresh" @click="sa.f5()">重置</el-button>
  28. </el-form>
  29. <!-- ------------- 数据列表 ------------- -->
  30. <el-table class="data-table" ref="data-table" :data="dataList" >
  31. <sa-td type="index" width="30px"></sa-td>
  32. <sa-td name="订单号" prop="tradeNo" width="180"></sa-td>
  33. <sa-td name="买家" prop="buyUserName" ></sa-td>
  34. <sa-td name="商家名称" prop="enterpriseName" width="280px"></sa-td>
  35. <sa-td name="商品名称" prop="goodsNames" width="200px"></sa-td>
  36. <sa-td name="总重量" prop="totalWeight" ></sa-td>
  37. <sa-td name="总金额" prop="totalPrice" ></sa-td>
  38. <sa-td name="上架金额(元)" prop="upPrice" ></sa-td>
  39. <sa-td name="边民操作" prop="upPrice" >
  40. <template slot-scope="s">
  41. <div v-if="s.row.upStatus==2">已上架</div>
  42. <div v-else>未上架</div>
  43. </template>
  44. </sa-td>
  45. <sa-td name="车牌号" prop="veNo" ></sa-td>
  46. <sa-td name="预申报编号" prop="platSeqNo" width="180"></sa-td>
  47. <sa-td name="时间" prop="createTime" width="140px"></sa-td>
  48. <!-- <sa-td name="进出口预申报单号" prop="preIeportNo" width="180"></sa-td> -->
  49. <!--<sa-td type="enum" name="交易确认" prop="peopleConfirmStatus" :jv="{1: '已确认[green]', 0: '未确认[#ff910a]'}" ></sa-td>
  50. <sa-td type="enum" name="委托确认" prop="cooperEntrustStatus" :jv="{1: '已确认[green]', 0: '未确认[#ff910a]'}" ></sa-td>
  51. <sa-td type="enum" name="进口确认" prop="applyConfirmStatus" :jv="{1: '已确认[green]', 0: '未确认[#ff910a]'}" ></sa-td>-->
  52. <el-table-column label="操作" fixed="right" width="180px">
  53. <template slot-scope="s">
  54. <el-button class="c-btn" type="success" icon="el-icon-view" @click="get(s.row)">查看</el-button>
  55. <el-button class="c-btn" type="primary" icon="el-icon-view" @click="getBank(s.row)">银行回执</el-button>
  56. <!--<el-button v-if="s.row.upStatus==2&&s.row.resaleStatus==0&&sa.isAuth('tb-order-edit-price')"
  57. class="c-btn" type="warning" icon="el-icon-view" @click="editPrice(s.row)">修改上架金额</el-button>-->
  58. </template>
  59. </el-table-column>
  60. </el-table>
  61. <!-- ------------- 分页 ------------- -->
  62. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()"></sa-item>
  63. </div>
  64. <el-dialog :title="model.title" :visible.sync="model.visible" width="500px">
  65. <div>
  66. 当前价格(元):{{model.form.upPrice}}
  67. </div>
  68. <sa-item type="num" name="金额" v-model="model.form.selPrice" placeholder="确认金额" br></sa-item>
  69. <span slot="footer" class="dialog-footer">
  70. <el-button @click="model.visible = false">取 消</el-button>
  71. <el-button type="primary" @click="save">保存</el-button>
  72. <el-button type="primary" @click="sel">转售二级</el-button>
  73. </span>
  74. </el-dialog>
  75. </div>
  76. <script>
  77. var app = new Vue({
  78. components: {
  79. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  80. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  81. },
  82. el: '.vue-box',
  83. data: {
  84. model: {
  85. title: '修改价格',
  86. visible: false,
  87. form: {
  88. id:'',
  89. upPrice:'',
  90. selPrice:0
  91. }
  92. },
  93. p: { // 查询参数
  94. tradeNo: '', // 订单号
  95. buyUserName: '', // 买家
  96. enterpriseName: '', // 商家名称
  97. pageNo: 1, // 当前页
  98. pageSize: 20, // 页大小
  99. sortType: 0 // 排序方式
  100. },
  101. dataCount: 0,
  102. dataList: [], // 数据集合
  103. },
  104. methods: {
  105. editPrice(item){
  106. this.model={
  107. title:'修改订单【'+item.tradeNo+'】价格',
  108. visible:true,
  109. form:item
  110. }
  111. },
  112. save(){
  113. let price=this.model.form.selPrice;
  114. if(!price){
  115. sa.error('请输入金额')
  116. return;
  117. }
  118. sa.ajax('/level-one-server/TbOrder/editUpPrice', {id:this.model.form.id,price:price}, function(res) {
  119. this.f5();
  120. this.model.visible=false;
  121. }.bind(this));
  122. },
  123. sel(){
  124. let price=this.model.form.selPrice;
  125. if(!price){
  126. sa.error('请输入金额')
  127. return;
  128. }
  129. sa.ajax('/level-two-server/TbOrders/addOrderByResale', {id:this.model.form.id,price:price}, function(res) {
  130. this.f5();
  131. this.model.visible=false;
  132. }.bind(this));
  133. },
  134. // 刷新
  135. f5: function() {
  136. sa.ajax('/level-one-server/TbOrder/getList', sa.removeNull(this.p), function(res) {
  137. this.dataList = res.data; // 数据
  138. this.dataCount = res.dataCount; // 数据总数
  139. sa.f5TableHeight(); // 刷新表格高度
  140. }.bind(this));
  141. },
  142. // 查看
  143. get: function(data) {
  144. sa.showIframe('数据详情', 'tb-order-info.html?id=' + data.id, '1050px', '70%');
  145. },
  146. // 查看银行回执
  147. getBank: function(data) {
  148. sa.showIframe('银行回执', 'tb-order-bank-list.html?tradeNo=' + data.tradeNo, '1300px', '90%');
  149. },
  150. // 修改
  151. update: function(data) {
  152. sa.showIframe('修改数据', 'tb-order-add.html?id=' + data.id, '1000px', '90%');
  153. },
  154. // 新增
  155. add: function(data) {
  156. sa.showIframe('新增数据', 'tb-order-add.html?id=-1', '1000px', '90%');
  157. },
  158. // 删除
  159. del: function(data) {
  160. sa.confirm('是否删除,此操作不可撤销', function() {
  161. sa.ajax('/level-one-server/TbOrder/delete?id=' + data.id, function(res) {
  162. sa.arrayDelete(this.dataList, data);
  163. sa.ok('删除成功');
  164. sa.f5TableHeight(); // 刷新表格高度
  165. }.bind(this))
  166. }.bind(this));
  167. },
  168. // 批量删除
  169. deleteByIds: function() {
  170. // 获取选中元素的id列表
  171. let selection = this.$refs['data-table'].selection;
  172. let ids = sa.getArrayField(selection, 'id');
  173. if(selection.length == 0) {
  174. return sa.msg('请至少选择一条数据')
  175. }
  176. // 提交删除
  177. sa.confirm('是否批量删除选中数据?此操作不可撤销', function() {
  178. sa.ajax('/level-one-server/TbOrder/deleteByIds', {ids: ids.join(',')}, function(res) {
  179. sa.arrayDelete(this.dataList, selection);
  180. sa.ok('删除成功');
  181. sa.f5TableHeight(); // 刷新表格高度
  182. }.bind(this))
  183. }.bind(this));
  184. },
  185. },
  186. created: function() {
  187. this.f5();
  188. sa.onInputEnter();
  189. }
  190. })
  191. </script>
  192. </body>
  193. </html>