car.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <template>
  2. <div class="car-center-container">
  3. <a-divider orientation="left" class="car-center-title">
  4. <a-tag color="#f50" v-if="selectedIdItem.title">{{ selectedIdItem?.title.join(' / ') }}</a-tag> 装运明细
  5. </a-divider>
  6. <a-row :gutter="20">
  7. <a-col :span="10">
  8. <a-card :bordered="false" :body-style="{ padding: '12px 24px' }">
  9. <template #title>
  10. <div class="title"
  11. >班组 <span>{{ getTeamShift(baseInfo?.shift, baseInfo?.shiftGroup) }}</span></div
  12. >
  13. </template>
  14. <a-descriptions :column="2">
  15. <a-descriptions-item label="发车时间">{{ baseInfo?.outTime }}</a-descriptions-item>
  16. <a-descriptions-item label="到站时间">{{ baseInfo?.arrivalTime }}</a-descriptions-item>
  17. <a-descriptions-item label="车次序号">{{ baseInfo?.carAllNum }}</a-descriptions-item>
  18. <a-descriptions-item label="本车次序号">{{ baseInfo?.carNum }}</a-descriptions-item>
  19. <a-descriptions-item label="组坯号" :column="2" :style="{ marginTop: 12 }">
  20. <div class="flex flex-wrap zupiNum">
  21. <a-tag :bordered="false" style="background-color: transparent; font-size: 16px" v-for="item in baseInfo?.assemblyNumber.split(',')">{{
  22. item
  23. }}</a-tag>
  24. </div>
  25. </a-descriptions-item>
  26. </a-descriptions>
  27. </a-card>
  28. </a-col>
  29. <a-col :span="14">
  30. <a-card :body-style="{ padding: '18px 24px' }" :bordered="false">
  31. <div class="heat-s-top flex">
  32. <div class="heat-s-top-item"><span>支数:</span> {{ baseInfo?.amountTotal }}</div>
  33. <div class="heat-s-top-item"><span>重量:</span> {{ baseInfo?.totalWeight || 0 }}t</div>
  34. <div class="heat-s-top-item"><span>钢种:</span> {{ baseInfo?.steel || '-' }}</div>
  35. <div class="heat-s-top-item"><span>规格:</span> {{ baseInfo?.spec || '-' }}</div>
  36. </div>
  37. <a-table class="heat-s-table" size="small" :pagination="false" :columns="columnHeat" :data-source="baseInfo?.heatNoInfos" />
  38. </a-card>
  39. </a-col>
  40. </a-row>
  41. <a-row class="heat-s-row" :gutter="[20, 20]">
  42. <a-col :span="8" v-for="item in baseInfo.heatNoDetails" v-if="baseInfo.heatNoDetails && baseInfo.heatNoDetails.length">
  43. <a-card :body-style="{ padding: '18px 24px' }" :bordered="false">
  44. <div class="flex heat-row-statistic">
  45. <a-statistic class="flex flex-col flex-1" title="炉号" :value="item.heatNo" groupSeparator="" />
  46. <a-statistic class="flex flex-col flex-1" title="支数" :value="item.sizeAmount" />
  47. <a-statistic class="flex flex-col flex-1" title="重量/t" :value="item.sizeWeight" />
  48. </div>
  49. <a-table class="heat-s-table" size="small" :columns="columnHeatDtl" :pagination="false" :data-source="item.assemblyNumberDetails" />
  50. </a-card>
  51. </a-col>
  52. </a-row>
  53. </div>
  54. </template>
  55. <script lang="ts" setup name="CarCenter">
  56. import { ref } from 'vue';
  57. import AStatistic from 'ant-design-vue/lib/statistic/Statistic';
  58. import { getStorageCenterCarInfo, getStorageCenterCarById } from '../storageAndTransportation.api';
  59. import { getTeamShift } from '../../Dashboard/dashboard.api';
  60. defineProps({
  61. currentDate: {
  62. type: String,
  63. default: '',
  64. },
  65. selectedIdItem: {
  66. type: Object,
  67. default: () => {},
  68. },
  69. });
  70. const emits = defineEmits(['changeTotal', 'changeLoading']);
  71. const columnHeat = [
  72. { title: '炉号', dataIndex: 'heatNo' },
  73. { title: '定尺', dataIndex: 'size' },
  74. { title: '支数', dataIndex: 'sizeAmount' },
  75. { title: '重量/t', dataIndex: 'sizeWeight' },
  76. ];
  77. const columnHeatDtl = [
  78. { title: '组坯号', dataIndex: 'assemblyNumber' },
  79. { title: '坯号', dataIndex: 'billetNo' },
  80. { title: '定尺', dataIndex: 'size' },
  81. { title: '支数', dataIndex: 'sizeAmount', width: 50, align: 'center' },
  82. { title: '重量/t', dataIndex: 'sizeWeight' },
  83. ];
  84. const baseInfo = ref<any>({
  85. assemblyNumber: '',
  86. heatNoInfos: [],
  87. heatNoDetails: [],
  88. });
  89. const getInfo = (day) => {
  90. getStorageCenterCarInfo({ currentDate: day }).then((res) => {
  91. emits('changeTotal', res);
  92. });
  93. };
  94. const getInfoById = (storageBillId) => {
  95. emits('changeLoading', true);
  96. getStorageCenterCarById({ storageBillId })
  97. .then((res) => {
  98. console.log('res', res);
  99. baseInfo.value = res;
  100. })
  101. .finally(() => {
  102. emits('changeLoading', false);
  103. });
  104. };
  105. defineExpose({
  106. getInfo,
  107. getInfoById,
  108. });
  109. </script>
  110. <style lang="less" scoped>
  111. .car-center-container {
  112. margin-top: 20px;
  113. .ant-divider {
  114. :deep(.ant-divider-inner-text) {
  115. // margin-left: -50px;
  116. }
  117. }
  118. .ant-tag {
  119. font-size: 18px;
  120. padding: 4px 10px;
  121. }
  122. .ant-card {
  123. height: 100%;
  124. }
  125. .heat-s-top {
  126. font-weight: 400;
  127. font-size: 16px;
  128. color: #4d4d4d;
  129. line-height: 22px;
  130. padding: 0 10px;
  131. span {
  132. color: #000;
  133. padding-right: 6px;
  134. }
  135. .heat-s-top-item {
  136. margin-right: 44px;
  137. }
  138. }
  139. .heat-s-table {
  140. margin-top: 16px;
  141. }
  142. .heat-s-row {
  143. margin-top: 20px;
  144. }
  145. .zupiNum {
  146. gap: 10px 0;
  147. }
  148. .heat-row-statistic {
  149. .ant-statistic {
  150. flex-direction: column-reverse;
  151. }
  152. }
  153. .title {
  154. span {
  155. color: var(--vxe-primary-color);
  156. }
  157. }
  158. }
  159. </style>