OrderManagement.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <template>
  2. <!-- 订单管理 -->
  3. <div>
  4. <div ref="grabble">
  5. <actionBar :operateList="operateList" :formList="formList" :ruleForm="searchRuleForm" @openModel="openModel"
  6. @searchProtocol="searchProtocol"></actionBar>
  7. </div>
  8. <div class="card_content">
  9. <!-- 表单 -->
  10. <tables ref="refWaybill" tableHeight="68vh" :suspension="true" :tableList="tableList" :tableData="tableData"
  11. @buttonData="buttonData">
  12. </tables>
  13. <!-- 分页 -->
  14. <div v-if="Total">
  15. <pagination :total="Total" :currentPage="Pagination.PageIndex" @changeSize="changeSize"
  16. @changeCurrent="changeCurrent">
  17. </pagination>
  18. </div>
  19. </div>
  20. </div>
  21. </template>
  22. <script>
  23. import actionBar from '@/components/actionBar'
  24. import tables from '@/components/tables'
  25. import pagination from '@/components/pagination'
  26. import {
  27. employee,
  28. } from "./waybill.js";
  29. import {
  30. WaybillStatus
  31. } from '@/assets/js/blockSort'
  32. export default {
  33. name: 'OrderManagement',
  34. components: {
  35. actionBar,
  36. tables,
  37. pagination,
  38. },
  39. data() {
  40. return {
  41. operateList: [{
  42. type: 'sends',
  43. title: '批量派单',
  44. colour: 'success'
  45. }, {
  46. type: 'import',
  47. title: '批量导入',
  48. colour: 'warning'
  49. }, {
  50. type: 'add',
  51. title: '添加订单',
  52. icon: 'el-icon-plus',
  53. }],
  54. formList: [{
  55. type: 'input',
  56. label: '订单号',
  57. field: 'orderNo',
  58. placeholder: '请输入订单号',
  59. }, {
  60. type: 'select',
  61. label: '状态',
  62. field: 'status',
  63. placeholder: '请选择状态',
  64. options: WaybillStatus(),
  65. }, {
  66. type: 'picker',
  67. label: '下单时间',
  68. field: 'time',
  69. placeholder: '下单时间',
  70. }],
  71. searchRuleForm: {
  72. orderNo: '',
  73. status: null,
  74. time: [],
  75. },
  76. searchValue: {},
  77. Pagination: {
  78. PageIndex: 1,
  79. PageSize: 10,
  80. },
  81. Total: 0,
  82. operationType: '',
  83. tableData: [],
  84. tableList: employee(),
  85. }
  86. },
  87. methods: {
  88. // 搜索
  89. searchProtocol(value) {
  90. this.Pagination.PageIndex = 1
  91. this.searchValue = value
  92. if (value.time) {
  93. this.searchValue.orderStartTime = value.time[0]
  94. this.searchValue.orderEndTime = value.time[1]
  95. }
  96. this.getList()
  97. },
  98. openModel(type) {
  99. this.operationType = type
  100. },
  101. buttonData(row, type) {
  102. this.operationType = type
  103. },
  104. changeSize(val) {
  105. this.Pagination.PageSize = val
  106. this.getList()
  107. },
  108. changeCurrent(val) {
  109. this.Pagination.PageIndex = val
  110. this.getList()
  111. },
  112. },
  113. }
  114. </script>
  115. <style lang="scss">
  116. </style>