plan.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. <template>
  2. <div class="pane-box">
  3. <HeaderTitle title="生产信息"> </HeaderTitle>
  4. <el-descriptions :column="5" border>
  5. <el-descriptions-item label="计划编号">{{
  6. productionPlan.code
  7. }}</el-descriptions-item>
  8. <el-descriptions-item label="物料名称">{{
  9. productionPlan.materialName
  10. }}</el-descriptions-item>
  11. <el-descriptions-item label="物料编码">{{
  12. productionPlan.materialCode
  13. }}</el-descriptions-item>
  14. <el-descriptions-item label="牌号">{{
  15. productionPlan.brandNo
  16. }}</el-descriptions-item>
  17. <el-descriptions-item label="型号">{{
  18. productionPlan.model
  19. }}</el-descriptions-item>
  20. <el-descriptions-item label="生产版本">{{
  21. productionPlan.produceVersionName
  22. }}</el-descriptions-item>
  23. <el-descriptions-item label="产线">{{
  24. productionPlan.lineName
  25. }}</el-descriptions-item>
  26. <el-descriptions-item label="工艺路线名称">{{
  27. productionPlan.routingName
  28. }}</el-descriptions-item>
  29. <el-descriptions-item label="工艺路线版本">{{
  30. productionPlan.routingVersion
  31. }}</el-descriptions-item>
  32. <el-descriptions-item label="生产重量">{{
  33. productionPlan.num
  34. }}</el-descriptions-item>
  35. <el-descriptions-item label="要求交付日期">{{
  36. productionPlan.deliveryTime
  37. }}</el-descriptions-item>
  38. <el-descriptions-item label="创建时间">{{
  39. productionPlan.createTime
  40. }}</el-descriptions-item>
  41. <el-descriptions-item label="计划备注" :span="2">{{
  42. productionPlan.notes
  43. }}</el-descriptions-item>
  44. </el-descriptions>
  45. <div class="progress-wrapper">
  46. <div class="progress-item">
  47. <div class="label"> 已生产重量 </div>
  48. <div class="item-percent">
  49. <el-progress
  50. :percentage="(infoData.completeWeightRatio || 0) * 100"
  51. color="rgba(0, 191, 191, 1)"
  52. :text-inside="true"
  53. :stroke-width="16"
  54. ></el-progress>
  55. <div class="percent-num">
  56. {{productionPlan.completeNum?productionPlan.completeNum:0}}/{{productionPlan.num}}
  57. </div>
  58. </div>
  59. </div>
  60. <div class="progress-item">
  61. <div class="label"> 已完成工单 </div>
  62. <div class="item-percent">
  63. <el-progress
  64. :percentage="(infoData.completeOrderRatio || 0) * 100"
  65. color="rgba(2, 125, 180, 1)"
  66. :text-inside="true"
  67. :stroke-width="16"
  68. ></el-progress>
  69. <div class="percent-num">
  70. {{infoData.completeOrder}}/{{infoData.orderNum?infoData.orderNum:0}}
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. <ele-pro-table ref="table" :columns="columns" :datasource="workOrderList">
  76. </ele-pro-table>
  77. </div>
  78. </template>
  79. <script>
  80. export default {
  81. props: {
  82. infoData: {
  83. type: Object,
  84. default: () => ({})
  85. }
  86. },
  87. data () {
  88. return {
  89. columns: [
  90. {
  91. type: 'index',
  92. label: '序号',
  93. align: 'center',
  94. width: '80'
  95. },
  96. {
  97. prop: 'code',
  98. label: '工单号'
  99. },
  100. {
  101. prop: 'productNum',
  102. label: '生产重量'
  103. },
  104. {
  105. prop: 'deviceCode',
  106. label: '设备编码'
  107. },
  108. {
  109. prop: 'deviceName',
  110. label: '设备名称'
  111. },
  112. {
  113. prop: 'planStartTime',
  114. label: '计划开始时间'
  115. },
  116. {
  117. prop: 'startTime',
  118. label: '实际开始时间'
  119. },
  120. {
  121. prop: 'executorName',
  122. label: '执行人'
  123. },
  124. {
  125. prop: 'reportWorkTime',
  126. label: '报工时间'
  127. },
  128. {
  129. prop: 'produceCycle',
  130. label: '生产周期'
  131. },
  132. {
  133. prop: 'name4',
  134. label: '状态'
  135. }
  136. ]
  137. };
  138. },
  139. computed: {
  140. productionPlan () {
  141. return this.infoData.productionPlan || {};
  142. },
  143. workOrderList () {
  144. return this.infoData.workOrderList || [];
  145. }
  146. }
  147. };
  148. </script>
  149. <style lang="scss" scoped>
  150. .progress-wrapper {
  151. padding: 10px 0;
  152. .progress-item {
  153. display: flex;
  154. justify-content: space-between;
  155. padding: 20px;
  156. .label {
  157. width: 180px;
  158. }
  159. .el-progress {
  160. flex: 1;
  161. }
  162. .item-percent{
  163. flex: 1;
  164. display: flex;
  165. justify-content: space-between;
  166. .percent-num{
  167. margin-left: 20px;
  168. width: 120px;
  169. text-align: left;
  170. }
  171. }
  172. }
  173. }
  174. </style>