detail.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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,record">
  25. <a @click="sonFullSetRate(record)">{{ 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 { fullRateClick } from '@api/reportForms/full-rate-table'
  46. import SubcomponentRate from '@views/reportForms/full-rate-table/subcomponent-rate.vue'
  47. import moment from 'moment'
  48. export default {
  49. name: 'Detail', // 明细 弹框
  50. mixins: [JeecgListMixin],
  51. components: { JEllipsis,JsonExcel,SubcomponentRate,moment },
  52. data() {
  53. return {
  54. // 表头
  55. detailColumns: [
  56. {
  57. title: '计划到货日期',
  58. dataIndex: 'dArriveDate',
  59. width: 80,
  60. className: 'replacecolor',
  61. },
  62. {
  63. title: '小po',
  64. dataIndex: 'smallPo',
  65. width: 80,
  66. className: 'replacecolor',
  67. },
  68. {
  69. title: '物料编码',
  70. dataIndex: 'cInvCode',
  71. width: 80,
  72. className: 'replacecolor',
  73. },
  74. {
  75. title: '物料名称',
  76. dataIndex: 'cInvName',
  77. width: 80,
  78. className: 'replacecolor',
  79. },
  80. {
  81. title: '颜色',
  82. dataIndex: 'clour',
  83. width: 80,
  84. className: 'replacecolor',
  85. },
  86. {
  87. title: '分销点',
  88. dataIndex: 'distributionPoint',
  89. width: 80,
  90. className: 'replacecolor',
  91. },
  92. {
  93. title: 'packID',
  94. dataIndex: 'packId',
  95. width: 80,
  96. className: 'replacecolor',
  97. },
  98. {
  99. title: '交期',
  100. dataIndex: 'deliveryDate',
  101. width: 80,
  102. className: 'replacecolor',
  103. scopedSlots: { customRender: 'fullSetRate' },
  104. },
  105. {
  106. title: '委外订单数量',
  107. dataIndex: 'subcontractOrderQuantity',
  108. width: 80,
  109. className: 'replacecolor',
  110. },
  111. {
  112. title: '齐套率',
  113. dataIndex: 'setRate',
  114. width: 80,
  115. className: 'replacecolor',
  116. },
  117. {
  118. title: '累计入库数量',
  119. dataIndex: 'cumulativeReceiptQty',
  120. width: 80,
  121. className: 'replacecolor',
  122. }
  123. ],
  124. detailData: [
  125. ],
  126. loading: false, // 表格加载
  127. confirmLoading: false,
  128. detailModVis: false,
  129. }
  130. },
  131. methods: {
  132. moment,
  133. backDetailTable(){
  134. this.detailModVis = false
  135. },
  136. sonFullSetRate(record){
  137. fullRateClick({mODetailsID:record.modetailsID}).then(res => {
  138. if (res.success) {
  139. this.$refs.SubcomponentRate.SubcomponentModVis = true
  140. this.$refs.SubcomponentRate.SubcomponentRateData = res.result
  141. }else{
  142. that.$message.error(res.message);
  143. }
  144. })
  145. }
  146. }
  147. }
  148. </script>
  149. <style lang="less" scoped>
  150. @import '~@assets/less/common.less';
  151. @import '~@assets/less/overwriter.less';
  152. /deep/ .ant-table-thead > tr > th {
  153. text-align: center;
  154. // font-weight: 700;
  155. }
  156. /deep/ .ant-table-tbody {
  157. text-align: center;
  158. }
  159. /deep/ .ant-table-footer .ant-table-body {
  160. overflow: hidden !important;
  161. }
  162. // /deep/ th.replacecolor {
  163. // background-color: #ccc;
  164. // }
  165. </style>