detail.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <template>
  2. <a-modal
  3. title="明细"
  4. v-model="detailModVis"
  5. :confirmLoading="confirmLoading"
  6. width="90%"
  7. :footer="null"
  8. >
  9. <!-- tabel 加载 -->
  10. <a-spin :spinning="confirmLoading">
  11. <!-- table -->
  12. <div>
  13. <a-table
  14. ref="tableRef"
  15. :loading="loading"
  16. bordered
  17. :columns="detailColumns"
  18. :data-source="detailData"
  19. :pagination="false"
  20. :scroll="{ y: 500,x:1500 }"
  21. :footer="showTotal"
  22. >
  23. <!-- 齐套率 -->
  24. <span slot="fullSetRate" slot-scope="text">
  25. <a @click="sonFullSetRate">{{ text }}</a>
  26. </span>
  27. </a-table>
  28. <!-- 导出 打印 返回 -->
  29. <a-row style="marginTop:20px;">
  30. <a-col :md="24" :sm="12">
  31. <span style="float: right;" class="table-operator">
  32. <a-button type="primary" @click="backDetailTable" icon="rollback">关闭</a-button>
  33. </span>
  34. </a-col>
  35. </a-row>
  36. </div>
  37. </a-spin>
  38. <SubcomponentRate ref="SubcomponentRate"></SubcomponentRate>
  39. </a-modal>
  40. </template>
  41. <script>
  42. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  43. import JEllipsis from '@/components/jeecg/JEllipsis'
  44. import JsonExcel from 'vue-json-excel'
  45. import SubcomponentRate from '@views/reportForms/full-rate-table/subcomponent-rate.vue'
  46. export default {
  47. name: 'Detail', // 明细 弹框
  48. mixins: [JeecgListMixin],
  49. components: { JEllipsis,JsonExcel,SubcomponentRate },
  50. data() {
  51. return {
  52. // 表头
  53. detailColumns: [
  54. {
  55. title: '计划到货日期',
  56. dataIndex: 'data',
  57. width: 80,
  58. className: 'replacecolor',
  59. },
  60. {
  61. title: '小po',
  62. dataIndex: 'po',
  63. width: 80,
  64. className: 'replacecolor',
  65. },
  66. {
  67. title: '存货名称',
  68. dataIndex: 'chun',
  69. width: 80,
  70. className: 'replacecolor',
  71. },
  72. {
  73. title: '存货编码',
  74. dataIndex: 'chunma',
  75. width: 80,
  76. className: 'replacecolor',
  77. },
  78. {
  79. title: '颜色',
  80. dataIndex: 'color',
  81. width: 80,
  82. className: 'replacecolor',
  83. },
  84. {
  85. title: '交期',
  86. dataIndex: 'jiaoqi',
  87. width: 80,
  88. className: 'replacecolor',
  89. },
  90. {
  91. title: '订单数量',
  92. dataIndex: 'quantity',
  93. width: 80,
  94. className: 'replacecolor',
  95. },
  96. {
  97. title: '齐套率',
  98. dataIndex: 'iquantity',
  99. width: 80,
  100. className: 'replacecolor',
  101. scopedSlots: { customRender: 'fullSetRate' }
  102. },
  103. {
  104. title: '累计入库数量',
  105. dataIndex: 'iquantityadd',
  106. width: 80,
  107. className: 'replacecolor',
  108. }
  109. ],
  110. detailData: [
  111. ],
  112. loading: false, // 表格加载
  113. confirmLoading: false,
  114. detailModVis: false,
  115. }
  116. },
  117. methods: {
  118. backDetailTable(){
  119. this.detailModVis = false
  120. },
  121. sonFullSetRate(){
  122. this.$refs.SubcomponentRate.SubcomponentModVis = true
  123. }
  124. }
  125. }
  126. </script>
  127. <style lang="less" scoped>
  128. @import '~@assets/less/common.less';
  129. @import '~@assets/less/overwriter.less';
  130. /deep/ .ant-table-thead > tr > th {
  131. text-align: center;
  132. // font-weight: 700;
  133. }
  134. /deep/ .ant-table-tbody {
  135. text-align: center;
  136. }
  137. /deep/ .ant-table-footer .ant-table-body {
  138. overflow: hidden !important;
  139. }
  140. // /deep/ th.replacecolor {
  141. // background-color: #ccc;
  142. // }
  143. </style>