index.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. <template>
  2. <div class="ele-body" style="width: 100%">
  3. <el-card shadow="never" v-loading="loading" style="width: 100%">
  4. <div class="ele-border-lighter form-content" v-loading="loading">
  5. <search-table @search="reload"></search-table>
  6. <!-- 数据表格 -->
  7. <ele-pro-table
  8. ref="table"
  9. :columns="columns"
  10. :datasource="datasource"
  11. height="calc(100vh - 410px)"
  12. style="margin-bottom: 10px"
  13. full-height="calc(100vh - 116px)"
  14. tool-class="ele-toolbar-form"
  15. :selection.sync="selection"
  16. @columns-change="handleColumnChange"
  17. :cache-key="cacheKeyUrl"
  18. :page-size="20"
  19. >
  20. <template v-slot:orderNo="{ row }">
  21. <el-link
  22. type="primary"
  23. :underline="false"
  24. @click="openorderDetail(row, 'orderNo')"
  25. >
  26. {{ row.orderNo }}
  27. </el-link>
  28. </template>
  29. <!-- 表头工具栏 -->
  30. <template v-slot:action="{ row }">
  31. <el-button
  32. size="small"
  33. type="primary"
  34. class="ele-btn-icon"
  35. @click="openEdit(row)"
  36. >
  37. 详情
  38. </el-button>
  39. </template>
  40. </ele-pro-table>
  41. </div>
  42. </el-card>
  43. <order-detail-dialog ref="orderDetailDialogRef"></order-detail-dialog>
  44. <detailDialog ref="detailDialog" @success="reload"></detailDialog>
  45. </div>
  46. </template>
  47. <script>
  48. import searchTable from './components/searchTable.vue';
  49. import orderDetailDialog from '@/views/saleManage/saleOrder/components/detailDialog.vue';
  50. import detailDialog from './components/detailDialog.vue';
  51. import dictMixins from '@/mixins/dictMixins';
  52. import { getTableList } from '@/api/saleManage/palletManagement';
  53. import tabMixins from '@/mixins/tableColumnsMixin';
  54. export default {
  55. mixins: [dictMixins,tabMixins],
  56. components: {
  57. searchTable,
  58. orderDetailDialog,
  59. detailDialog
  60. },
  61. data() {
  62. return {
  63. loading: false, // 加载状态
  64. cacheKeyUrl:'eos-3f2ac512-saleOrder-palletManagement',
  65. columns: [
  66. {
  67. columnKey: 'index',
  68. label: '序号',
  69. type: 'index',
  70. width: 55,
  71. align: 'center',
  72. showOverflowTooltip: true,
  73. fixed: 'left'
  74. },
  75. {
  76. prop: 'projectName',
  77. label: '项目名称',
  78. align: 'center',
  79. showOverflowTooltip: true,
  80. minWidth: 180
  81. },
  82. {
  83. prop: 'orderNo',
  84. label: '销售订单编码',
  85. align: 'center',
  86. sortable: true,
  87. slot: 'orderNo',
  88. showOverflowTooltip: true,
  89. minWidth: 200
  90. },
  91. {
  92. prop: 'productName',
  93. label: '托盘名称',
  94. align: 'center',
  95. showOverflowTooltip: true,
  96. minWidth: 140
  97. },
  98. {
  99. prop: 'totalCount',
  100. label: '托盘数量',
  101. align: 'center',
  102. showOverflowTooltip: true,
  103. minWidth: 140
  104. },
  105. {
  106. prop: 'resviceNum',
  107. label: '已回收数量',
  108. align: 'center',
  109. showOverflowTooltip: true,
  110. minWidth: 140
  111. },
  112. {
  113. prop: 'noResviceNum',
  114. label: '未回收数量',
  115. align: 'center',
  116. showOverflowTooltip: true,
  117. minWidth: 140
  118. },
  119. {
  120. columnKey: 'action',
  121. label: '操作',
  122. width: 160,
  123. align: 'center',
  124. resizable: false,
  125. slot: 'action',
  126. showOverflowTooltip: true,
  127. fixed: 'right'
  128. }
  129. // {
  130. // prop: 'createUserName',
  131. // label: '创建人',
  132. // align: 'center',
  133. // showOverflowTooltip: true,
  134. // minWidth: 80
  135. // },
  136. // {
  137. // prop: 'createTime',
  138. // label: '创建时间',
  139. // align: 'center',
  140. // showOverflowTooltip: true,
  141. // minWidth: 170
  142. // },
  143. ]
  144. };
  145. },
  146. computed: {},
  147. activated() {
  148. // 由 keep-alive 切回时刷新列表,但保留搜索条件与当前页码
  149. if (this.$refs.table) {
  150. this.$refs.table.reload();
  151. }
  152. },
  153. methods: {
  154. /* 表格数据源 */
  155. datasource({ page, limit, where, order }) {
  156. return getTableList({
  157. pageNum: page,
  158. size: limit,
  159. ...where
  160. });
  161. },
  162. /* 刷新表格 */
  163. reload(where) {
  164. this.$refs.table.reload({ page: 1, where });
  165. this.$emit('getToDoReminder')
  166. },
  167. openEdit(row) {
  168. this.$refs.detailDialog.open(row);
  169. },
  170. //查看详情
  171. openorderDetail(row, type) {
  172. if (type === 'docNo') {
  173. this.$refs.DetailDialogRef.open(row);
  174. }
  175. if (type === 'orderNo') {
  176. this.$refs.orderDetailDialogRef.open({ id: row.orderId });
  177. }
  178. }
  179. }
  180. };
  181. </script>
  182. <style lang="scss" scoped>
  183. .ele-body {
  184. padding-top: 0;
  185. padding-bottom: 0;
  186. }
  187. :deep .el-card__body {
  188. padding: 0;
  189. }
  190. :deep(.el-link--inner) {
  191. margin-left: 0px !important;
  192. }
  193. .sys-organization-list {
  194. height: calc(100vh - 264px);
  195. box-sizing: border-box;
  196. border-width: 1px;
  197. border-style: solid;
  198. overflow: auto;
  199. }
  200. .sys-organization-list :deep(.el-tree-node__content) {
  201. height: 40px;
  202. & > .el-tree-node__expand-icon {
  203. margin-left: 10px;
  204. }
  205. }
  206. .switch_left ul .active {
  207. border-top: 4px solid var(--color-primary);
  208. color: var(--color-primary-5);
  209. }
  210. .switch {
  211. padding-bottom: 20px;
  212. }
  213. .el-dropdown-link {
  214. cursor: pointer;
  215. color: var(--color-primary-5);
  216. }
  217. .el-icon-arrow-down {
  218. font-size: 12px;
  219. }
  220. </style>