modelBom.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. <template>
  2. <view>
  3. <view class="title_box rx-bc">
  4. <view class="name">模具信息</view>
  5. <view class="btn_box rx-bc" @click="handleScan(workOrderId)" v-if='workOrderId'>
  6. <image class="scan" src="@/static/pda/ScanIt.svg"></image>
  7. 更换模具
  8. </view>
  9. </view>
  10. <view class="material ">
  11. <view class="content_table" v-for="(item,index) in list" :key='index'>
  12. <view class="item " v-for="(tab, tIdx) in tableH(5)" :key="tIdx">
  13. <view class="item " v-if="Array.isArray(tab.prop)">
  14. <view class="lable lable300 rx-sc"> {{ item[tab.prop[0]] }}</view>
  15. <view class="content">
  16. {{ item[tab.prop[1]] }}
  17. </view>
  18. </view>
  19. <view class="item" v-if="!Array.isArray(tab.prop)">
  20. <view class="lable lable300 rx-sc"> {{ tab.label }}</view>
  21. <view class="content content_num" v-if='tab.write'>
  22. <input class="uni-input" v-model="tab.extInfo ? item.extInfo[tab.prop]: item[tab.prop]"
  23. type="digit"></input>
  24. </view>
  25. <view class="content" v-if='!tab.write'>
  26. {{tab.extInfo ? item.extInfo[tab.prop] : item[tab.prop]}}
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. import {
  36. tableHeader
  37. } from './feedBom.js'
  38. export default {
  39. props: {
  40. workOrderId: {
  41. type: String,
  42. default: ''
  43. },
  44. list: {
  45. type: Array,
  46. default: () => []
  47. },
  48. },
  49. data() {
  50. return {
  51. }
  52. },
  53. methods: {
  54. tableH(type) {
  55. return tableHeader(type)
  56. },
  57. handleScan(id) {
  58. this.$emit('scanIt', id )
  59. },
  60. }
  61. }
  62. </script>
  63. <style lang="scss" scoped>
  64. .title_box {
  65. margin-top: 20rpx;
  66. .name {
  67. font-size: 28rpx;
  68. font-style: normal;
  69. font-weight: 400;
  70. color: $theme-color;
  71. padding-left: 20rpx;
  72. position: relative;
  73. &:before {
  74. position: absolute;
  75. content: '';
  76. left: 0rpx;
  77. top: 0rpx;
  78. bottom: 0rpx;
  79. width: 4rpx;
  80. height: 28rpx;
  81. background: $theme-color;
  82. margin: auto;
  83. }
  84. }
  85. .btn_box {
  86. padding: 0 18rpx;
  87. height: 60rpx;
  88. background: $theme-color;
  89. font-size: 26rpx;
  90. font-style: normal;
  91. font-weight: 400;
  92. font-size: 24rpx;
  93. color: #fff;
  94. border-radius: 4rpx;
  95. .scan {
  96. width: 34rpx;
  97. height: 34rpx;
  98. margin-right: 12rpx;
  99. }
  100. }
  101. }
  102. .material {
  103. margin-top: 10rpx;
  104. .content_table {
  105. width: 100%;
  106. border: 2rpx solid $border-color;
  107. .item {
  108. display: flex;
  109. border-bottom: 1rpx dotted $border-color;
  110. .lable {
  111. width: 132rpx;
  112. text-align: center;
  113. background-color: #F7F9FA;
  114. font-size: 26rpx;
  115. border-right: 2rpx solid $border-color;
  116. flex-shrink: 0;
  117. }
  118. .lable150 {
  119. width: 156rpx !important;
  120. font-size: 24rpx;
  121. }
  122. .lable300 {
  123. width: 300rpx !important;
  124. padding-left: 14rpx;
  125. font-size: 24rpx;
  126. }
  127. .ww80 {
  128. width: 80rpx;
  129. }
  130. .content {
  131. width: 518rpx;
  132. min-height: 64rpx;
  133. font-size: 28rpx;
  134. line-height: 28rpx;
  135. font-style: normal;
  136. font-weight: 400;
  137. padding: 18rpx 8rpx;
  138. box-sizing: border-box;
  139. word-wrap: break-word;
  140. flex-grow: 1 !important;
  141. .unit {
  142. padding: 0 4rpx;
  143. font-size: 24rpx;
  144. color: #404446;
  145. }
  146. }
  147. .content_num {
  148. display: flex;
  149. align-items: center;
  150. padding: 0 4rpx;
  151. /deep/ .uni-input-input {
  152. border: 2rpx solid #F0F8F2;
  153. background: #F0F8F2;
  154. color: $theme-color;
  155. }
  156. }
  157. .pd4 {
  158. padding: 4rpx 8rpx;
  159. }
  160. &:last-child {
  161. border-bottom: none;
  162. }
  163. }
  164. .bot_border {
  165. border-bottom: 2rpx solid $theme-color;
  166. }
  167. .ww55 {
  168. width: 55%;
  169. }
  170. .ww45 {
  171. width: 45%;
  172. }
  173. }
  174. }
  175. </style>