modelBom.vue 3.8 KB

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