outSourceSendList.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <template>
  2. <div class="ele-body">
  3. <el-card shadow="never" v-loading="loading">
  4. <div class="ele-border-lighter form-content" v-loading="loading">
  5. <!-- 数据表格 -->
  6. <ele-pro-table
  7. ref="table"
  8. :columns="columns"
  9. :datasource="datasource"
  10. height="calc(100vh - 385px)"
  11. full-height="calc(100vh - 116px)"
  12. tool-class="ele-toolbar-form"
  13. >
  14. <!-- 查看详情列 -->
  15. <template v-slot:code="{ row }">
  16. <el-link
  17. type="primary"
  18. :underline="false"
  19. @click="openorderDetail(row)"
  20. >
  21. {{ row.code }}</el-link
  22. >
  23. </template>
  24. </ele-pro-table>
  25. </div>
  26. </el-card>
  27. <detail-dialog
  28. ref="detailDialogRef"
  29. :detailDialogFlag.sync="detailDialogFlag"
  30. v-if="detailDialogFlag"
  31. ></detail-dialog>
  32. </div>
  33. </template>
  34. <script>
  35. import detailDialog from '@/views/purchasingManage/purchaseOrder/outSourceSend/components/detailDialog.vue';
  36. import { reviewStatus } from '@/enum/dict';
  37. import { getPurchaseOutSourceSendPageAPI } from '@/api/purchasingManage/outSourceSend';
  38. import dictMixins from '@/mixins/dictMixins';
  39. export default {
  40. mixins: [dictMixins],
  41. props: {
  42. orderId: String
  43. },
  44. components: {
  45. detailDialog
  46. },
  47. data() {
  48. return {
  49. detailDialogFlag: false,
  50. loading: false, // 加载状态
  51. columns: [
  52. {
  53. columnKey: 'index',
  54. label: '序号',
  55. type: 'index',
  56. width: 55,
  57. align: 'center',
  58. showOverflowTooltip: true,
  59. fixed: 'left'
  60. },
  61. {
  62. prop: 'code',
  63. label: '发货单编码',
  64. align: 'center',
  65. slot: 'code',
  66. sortable: true,
  67. showOverflowTooltip: true,
  68. minWidth: 200
  69. },
  70. {
  71. prop: 'productNames',
  72. label: '产品名称',
  73. align: 'center',
  74. showOverflowTooltip: true,
  75. minWidth: 140
  76. },
  77. {
  78. prop: 'productCodes',
  79. label: '产品编码',
  80. align: 'center',
  81. showOverflowTooltip: true,
  82. minWidth: 160
  83. },
  84. {
  85. prop: 'batchNos',
  86. label: '批次号',
  87. align: 'center',
  88. showOverflowTooltip: true,
  89. minWidth: 140
  90. },
  91. {
  92. prop: 'productCount',
  93. label: '数量',
  94. align: 'center',
  95. showOverflowTooltip: true,
  96. minWidth: 140
  97. },
  98. {
  99. prop: 'supplierName',
  100. label: '外协单位',
  101. align: 'center',
  102. showOverflowTooltip: true,
  103. minWidth: 180
  104. },
  105. {
  106. prop: 'reviewStatus',
  107. label: '状态',
  108. align: 'center',
  109. showOverflowTooltip: true,
  110. minWidth: 120,
  111. formatter: (_row, _column, cellValue) => {
  112. return reviewStatus[_row.reviewStatus];
  113. }
  114. },
  115. {
  116. prop: 'createTime',
  117. label: '创建时间',
  118. align: 'center',
  119. showOverflowTooltip: true,
  120. minWidth: 170
  121. }
  122. ]
  123. };
  124. },
  125. computed: {},
  126. methods: {
  127. /* 表格数据源 */
  128. datasource({ page, limit, where, order }) {
  129. return getPurchaseOutSourceSendPageAPI({
  130. pageNum: page,
  131. size: limit,
  132. orderId: this.orderId,
  133. ...where
  134. });
  135. },
  136. /* 刷新表格 */
  137. reload(where) {
  138. this.$refs.table.reload({ page: 1, where });
  139. },
  140. //查看详情
  141. openorderDetail(row, type) {
  142. this.detailDialogFlag = true;
  143. this.$nextTick(() => {
  144. this.$refs.detailDialogRef.open(row);
  145. });
  146. }
  147. }
  148. };
  149. </script>
  150. <style lang="scss" scoped>
  151. .ele-body {
  152. padding-top: 0;
  153. padding-bottom: 0;
  154. }
  155. :deep .el-card__body {
  156. padding: 0;
  157. }
  158. :deep(.el-link--inner) {
  159. margin-left: 0px !important;
  160. }
  161. .sys-organization-list {
  162. height: calc(100vh - 264px);
  163. box-sizing: border-box;
  164. border-width: 1px;
  165. border-style: solid;
  166. overflow: auto;
  167. }
  168. .sys-organization-list :deep(.el-tree-node__content) {
  169. height: 40px;
  170. & > .el-tree-node__expand-icon {
  171. margin-left: 10px;
  172. }
  173. }
  174. .switch_left ul .active {
  175. border-top: 4px solid var(--color-primary);
  176. color: var(--color-primary-5);
  177. }
  178. .switch {
  179. padding-bottom: 20px;
  180. }
  181. .el-dropdown-link {
  182. cursor: pointer;
  183. color: var(--color-primary-5);
  184. }
  185. .el-icon-arrow-down {
  186. font-size: 12px;
  187. }
  188. </style>