modelBom.vue 4.0 KB

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