modelBom.vue 4.3 KB

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