turnover.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <template>
  2. <view class='container'>
  3. <view class='content'>
  4. <text class='title'>{{title}}</text>
  5. <view class='item-table' v-for="(item,index) in products" :key='index'>
  6. <view>
  7. <text class='tbhead' style='color:rgba(136, 136, 136,1)'>产品描述</text>
  8. <text class='tbhead table-layout'>{{item['description']}}</text>
  9. </view>
  10. <view>
  11. <text class='tbbody' style='color:rgba(136, 136, 136,1)'>批次</text>
  12. <text class='tbbody table-layout'>{{item['batch']}}</Text>
  13. </view>
  14. <view>
  15. <text class='tbbody' style='color:rgba(136, 136, 136,1)'>箱数</text>
  16. <text class='tbbody table-layout'>{{item['cases']}}</Text>
  17. </view>
  18. <view>
  19. <text class='tbbody' style='color:rgba(136, 136, 136,1)'>箱号</text>
  20. <text class='last-tbbody table-layout'>{{item['boxno']}}</text>
  21. </view>
  22. </view>
  23. </view>
  24. <view class='btn uni-row'>
  25. <button class='' type=primary>确定接收</button>
  26. </view>
  27. </view>
  28. </template>
  29. <script lang="uts">
  30. export default {
  31. data() {
  32. return {
  33. title: '热处理',
  34. sum: 0,
  35. products: [
  36. {
  37. description: '博士_0395614149_15*110.1',
  38. batch: 'DC23727410070',
  39. cases: 5,
  40. boxno: 'X12522、X552222、X15522、J5211、J5112'
  41. },
  42. {
  43. description: '博士_0395614149_15*110.1',
  44. batch: 'DC23727410070',
  45. cases: 5,
  46. boxno: 'X12522、X552222、X15522、J5211、J5112'
  47. },
  48. {
  49. description: '博士_0395614149_15*110.1',
  50. batch: 'DC23727410070',
  51. cases: 5,
  52. boxno: 'X12522、X552222、X15522、J5211、J5112'
  53. }
  54. ]
  55. }
  56. },
  57. methods: {
  58. init() {
  59. for (let i = 0; i < this.products.length; i++) {
  60. this.sum += parseInt(this.products[i]['cases'].toString());
  61. }
  62. // this.title = '热处理' + this.sum + '箱'
  63. this.title = '热处理' + this.sum + '箱'
  64. }
  65. },
  66. onReady() {
  67. this.init();
  68. }
  69. }
  70. </script>
  71. <style>
  72. .container {
  73. height: 100%;
  74. }
  75. .btn {
  76. background-color: white;
  77. width: 100%;
  78. height: 12%;
  79. /* position: absolute;
  80. bottom: 0; */
  81. }
  82. .confirm {
  83. width: 100%;
  84. /* height: 80rpx; */
  85. /* line-height: 80rpx; */
  86. padding-left: 0;
  87. }
  88. .content {
  89. width: 90%;
  90. /* height: auto; */
  91. background-color: rgba(255, 255, 255, 1);
  92. margin: 50rpx auto;
  93. padding-bottom: 50rpx;
  94. border-radius: 12rpx
  95. }
  96. .item-table {
  97. margin: 10rpx auto;
  98. width: 90%;
  99. }
  100. .tbhead {
  101. background-color: rgba(236, 245, 255, 1);
  102. font-size: 24rpx;
  103. height: 56rpx;
  104. line-height: 56rpx;
  105. padding-left: 6rpx;
  106. border-bottom: 1px solid lightgray;
  107. }
  108. .tbbody {
  109. font-size: 24rpx;
  110. background-color: rgba(238, 240, 245, 1);
  111. width: 70%;
  112. height: 56rpx;
  113. line-height: 56rpx;
  114. padding-left: 6rpx;
  115. border-bottom: 1px solid lightgray;
  116. }
  117. .last-tbbody {
  118. font-size: 24rpx;
  119. background-color: rgba(238, 240, 245, 1);
  120. width: 70%;
  121. height: 86rpx;
  122. padding-left: 6rpx;
  123. border-bottom: 1px solid lightgray;
  124. }
  125. .title {
  126. margin: 10rpx auto;
  127. width: 90%;
  128. font-size: 36rpx;
  129. font-weight: bold;
  130. }
  131. .table-layout {
  132. position: absolute;
  133. top: 0;
  134. left: 30%
  135. }
  136. </style>