DetailView.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <template>
  2. <view>
  3. <view class="tabs-container">
  4. <view class="tabs">
  5. <view
  6. class="tab-item"
  7. :class="{ active: activeName === 1 }"
  8. @click="activeName = 1"
  9. >基本信息</view>
  10. </view>
  11. </view>
  12. <view class="list"
  13. >
  14. <CellInfo label="生产工单号" :value="baseInfo.code" />
  15. <CellInfo label="计划编号" :value="baseInfo.productionPlanCode" />
  16. <CellInfo label="生产版本" :value="baseInfo.produceVersionName" />
  17. <CellInfo label="工艺路线版本" :value="baseInfo.routingVersion" />
  18. <CellInfo label="产品编码" :value="baseInfo.productCode" />
  19. <CellInfo label="产品名称" :value="baseInfo.productName" />
  20. <CellInfo label="牌号" :value="baseInfo.brandNo" />
  21. <CellInfo label="型号" :value="baseInfo.model" />
  22. <CellInfo label="要求成型数量(PCS)" :value="baseInfo.formingNum" />
  23. <CellInfo label="要求成型重量(KG)" :value="baseInfo.formingWeight" />
  24. <CellInfo label="已成型数量(PCS)" :value="baseInfo.formedNum" />
  25. <CellInfo label="已成型重量(KG)" :value="baseInfo.formedWeight" />
  26. <CellInfo label="计划开始时间" :value="baseInfo.planStartTime" />
  27. <CellInfo label="实际开始时间" :value="baseInfo.startTime" />
  28. <!-- <CellInfo label="要求成型完成时间" :value="baseInfo.dialType" /> -->
  29. <CellInfo label="实际成型完成时间" :value="baseInfo.completeTime" />
  30. <CellInfo label="已完成生产数量(PCS)" :value="baseInfo.deliveredQuantity" />
  31. <CellInfo label="已完成生产重量(KG)" :value="baseInfo.deliveredWeight" />
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. import CellInfo from '@/components/CellInfo.vue'
  37. export default {
  38. components: { CellInfo },
  39. props: {
  40. baseInfo: {
  41. type: Object,
  42. default: () => ({})
  43. },
  44. list: {
  45. type: Array,
  46. default: () => []
  47. },
  48. type: {
  49. type: String,
  50. default: ''
  51. }
  52. },
  53. watch:{
  54. },
  55. computed: {
  56. sum () {
  57. return this.list.reduce((sum, item) => {
  58. if (item.takeStockPattern) {
  59. sum += +item.amount
  60. } else {
  61. sum += item.detailReqList?.length || 0
  62. }
  63. return sum
  64. }, 0)
  65. }
  66. },
  67. data () {
  68. return {
  69. activeName: 1
  70. }
  71. }
  72. }
  73. </script>
  74. <style lang="scss" scoped>
  75. .tabs-container {
  76. height: 80rpx;
  77. background: #fff;
  78. border-bottom: 2rpx solid #333333;
  79. }
  80. .tabs {
  81. position: fixed;
  82. width: 100vw;
  83. height: 80rpx;
  84. background-color: #fff;
  85. display: flex;
  86. justify-content: flex-start;
  87. align-items: flex-end;
  88. margin-bottom: 20rpx;
  89. padding-left: 30rpx;
  90. line-height: 50rpx;
  91. .tab-item {
  92. width: 200rpx;
  93. display: flex;
  94. justify-content: center;
  95. align-items: center;
  96. padding-top: 10rpx;
  97. &.active {
  98. background: linear-gradient(
  99. 180deg,
  100. rgba(75, 121, 2, 1) 0%,
  101. rgba(255, 255, 255, 1) 12%
  102. );
  103. border-right: 1rpx solid #ccc;
  104. border-left: 1rpx solid #ccc;
  105. }
  106. }
  107. }
  108. .list {
  109. overflow-y: auto;
  110. height: calc(100vh - 420rpx);
  111. /deep/.list-cell{
  112. display: flex;
  113. align-items: center;
  114. justify-content: space-around;
  115. .label{
  116. max-width: 240rpx!important;
  117. text-align: left;
  118. }
  119. .value{
  120. text-align: right;
  121. }
  122. }
  123. }
  124. .kd-row {
  125. font-size: 28rpx;
  126. padding: 14rpx 12rpx 6rpx;
  127. border-bottom: 1rpx solid $page-bg;
  128. .kd-col {
  129. display: flex;
  130. justify-content: space-between;
  131. align-items: center;
  132. color: #aaaaaa;
  133. > text {
  134. flex: 1;
  135. }
  136. .label {
  137. margin-right: 20rpx;
  138. }
  139. &.kd-col {
  140. margin-top: 25rpx;
  141. }
  142. .status {
  143. background-color: $page-bg;
  144. display: inline-block;
  145. padding: 4rpx 10rpx;
  146. border-radius: 18rpx;
  147. }
  148. }
  149. .title {
  150. font-weight: bold;
  151. color: #333333;
  152. }
  153. }
  154. </style>