outboundDetail.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <template>
  2. <el-dialog
  3. :visible.sync="visible"
  4. v-if="visible"
  5. title="出库单详情"
  6. width="60vw"
  7. append-to-body
  8. @close="closeOuboundDetail"
  9. >
  10. <div class="main_container">
  11. <el-descriptions
  12. title=""
  13. :column="3"
  14. size="medium"
  15. border
  16. label-class-name="title-col"
  17. content-class-name="title-col"
  18. >
  19. <el-descriptions-item>
  20. <template slot="label"> 批次号 </template>
  21. {{ outboundData.batchNo }}
  22. </el-descriptions-item>
  23. <el-descriptions-item>
  24. <template slot="label"> 名称 </template>
  25. {{ outboundData.name }}
  26. </el-descriptions-item>
  27. <el-descriptions-item>
  28. <template slot="label"> 牌号 </template>
  29. {{ outboundData.brandNum }}
  30. </el-descriptions-item>
  31. <el-descriptions-item>
  32. <template slot="label"> 编码 </template>
  33. {{ outboundData.categoryCode }}
  34. </el-descriptions-item>
  35. <el-descriptions-item>
  36. <template slot="label"> 类型</template>
  37. {{ typeName[Number(outboundData.rootCategoryLevelId)] }}
  38. </el-descriptions-item>
  39. <!-- <el-descriptions-item>
  40. <template slot="label"> 牌号 </template>
  41. {{}}
  42. </el-descriptions-item> -->
  43. <el-descriptions-item>
  44. <template slot="label"> 型号 </template>
  45. {{ outboundData.modelType }}
  46. </el-descriptions-item>
  47. <el-descriptions-item>
  48. <template slot="label"> 规格 </template>
  49. {{ outboundData.specification }}
  50. </el-descriptions-item>
  51. <!-- <el-descriptions-item>
  52. <template slot="label"> 领料类型 </template>
  53. <span v-if="outboundData.type"></span>
  54. </el-descriptions-item> -->
  55. <!-- <el-descriptions-item>
  56. <template slot="label"> 销售单数量 </template>
  57. {{}}
  58. </el-descriptions-item> -->
  59. <!-- <el-descriptions-item>
  60. <template slot="label"> 生产类型 </template>
  61. {{}}
  62. </el-descriptions-item> -->
  63. <!-- <el-descriptions-item>
  64. <template slot="label"> 工艺路线 </template>
  65. {{}}
  66. </el-descriptions-item> -->
  67. <el-descriptions-item>
  68. <template slot="label"> 订单数量 </template>
  69. {{ outboundData.feedQuantity }}
  70. </el-descriptions-item>
  71. <el-descriptions-item>
  72. <template slot="label"> 单位 </template>
  73. {{ outboundData.unit }}
  74. </el-descriptions-item>
  75. <!-- <el-descriptions-item>
  76. <template slot="label"> 订单重量 </template>
  77. {{ outboundData.weight }}{{ outboundData.weightUnit }}
  78. </el-descriptions-item> -->
  79. <el-descriptions-item>
  80. <template slot="label"> 仓库名称 </template>
  81. {{ outboundData.warehouseName }}
  82. </el-descriptions-item>
  83. <!-- <el-descriptions-item>
  84. <template slot="label"> 订单重量 </template>
  85. {{}}
  86. </el-descriptions-item> -->
  87. <!-- <el-descriptions-item>
  88. <template slot="label"> 要求生产数量 </template>
  89. {{}}
  90. </el-descriptions-item> -->
  91. <!-- <el-descriptions-item>
  92. <template slot="label"> 要求生产重量 </template>
  93. {{}}
  94. </el-descriptions-item> -->
  95. <!-- <el-descriptions-item>
  96. <template slot="label"> 要求完成日期 </template>
  97. {{}}
  98. </el-descriptions-item> -->
  99. <!-- <el-descriptions-item>
  100. <template slot="label"> 所属工厂 </template>
  101. {{}}
  102. </el-descriptions-item> -->
  103. <!-- <el-descriptions-item :span="3">
  104. <template slot="label"> </template>
  105. </el-descriptions-item> -->
  106. </el-descriptions>
  107. </div>
  108. <div slot="footer" class="footer">
  109. <div>
  110. <el-button @click="cancel">关闭</el-button>
  111. </div>
  112. </div>
  113. </el-dialog>
  114. </template>
  115. <script>
  116. import dictMixins from '@/mixins/dictMixins';
  117. import { getOutboundDetail } from '@/api/produce/picking.js';
  118. import { typeName } from '../common.js';
  119. export default {
  120. mixins: [dictMixins],
  121. props: {
  122. info: Object,
  123. type: String
  124. },
  125. data() {
  126. return {
  127. visible: false,
  128. loading: false,
  129. tableList: [],
  130. outboundData: {},
  131. typeName
  132. };
  133. },
  134. computed: {},
  135. created() {},
  136. methods: {
  137. open(item) {
  138. this.visible = true;
  139. this.getOutboundDetailData(item.pickOrderId, item.categoryCode);
  140. },
  141. cancel() {
  142. this.visible = false;
  143. },
  144. closeOuboundDetail() {
  145. this.visible = false;
  146. },
  147. async getOutboundDetailData(pickOrderId, categoryCode) {
  148. await getOutboundDetail({ pickOrderId, categoryCode }).then((res) => {
  149. if (res.length != 0) {
  150. const totalNumber = res.reduce((acc, cur) => {
  151. return cur.feedQuantity ? Number(cur.feedQuantity) + acc : acc;
  152. }, 0);
  153. res[0].feedQuantity = totalNumber;
  154. this.outboundData = res[0];
  155. }
  156. });
  157. }
  158. }
  159. };
  160. </script>
  161. <style lang="scss">
  162. .basic-details-title {
  163. margin: 10px 0;
  164. }
  165. .title-col {
  166. color: #000000 !important;
  167. background-color: #fff;
  168. }
  169. </style>