deviceBom.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  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">
  16. <view class="lable rx-cc">工位名称</view>
  17. <view class="content">
  18. {{item.workstationName}}
  19. </view>
  20. </view>
  21. <view class="item">
  22. <view class="lable rx-cc">设备编码</view>
  23. <view class="content">
  24. {{ item.code }}
  25. </view>
  26. </view>
  27. <view class="item">
  28. <view class="lable rx-cc">设备名称</view>
  29. <view class="content">{{ item.name }}</view>
  30. </view>
  31. <view class="item rx-sc">
  32. <view class="rx ww50">
  33. <view class="lable rx-cc">固资编码</view>
  34. <view class="content">{{item.fixCode }} </view>
  35. </view>
  36. <view class="rx ww50">
  37. <view class="lable ww80 rx-cc">编号</view>
  38. <view class="content">{{item.codeNumber}}</view>
  39. </view>
  40. </view>
  41. <view class="item" v-if="clientEnvironmentId == 3">
  42. <view class="lable rx-cc">炉次号</view>
  43. <view class="content content_num">
  44. <input class="uni-input" v-model="item.extInfo.heatNumber" type="number"></input>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </template>
  51. <script>
  52. export default {
  53. props: {
  54. workOrderId: {
  55. type: String,
  56. default: ''
  57. },
  58. list: {
  59. type: Array,
  60. default: () => []
  61. },
  62. },
  63. data() {
  64. return {
  65. clientEnvironmentId: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo").clientEnvironmentId
  66. }
  67. },
  68. methods: {
  69. handleScan(id) {
  70. this.$emit('scanIt', id, )
  71. },
  72. getDelete(idx) {
  73. this.list.splice(idx, 1)
  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: 680rpx;
  121. border: 2rpx solid $border-color;
  122. margin-bottom: 10rpx;
  123. .item {
  124. display: flex;
  125. border-bottom: 2rpx solid $border-color;
  126. .lable {
  127. width: 132rpx;
  128. text-align: center;
  129. background-color: #F7F9FA;
  130. font-size: 26rpx;
  131. border-right: 2rpx solid $border-color;
  132. flex-shrink: 0;
  133. }
  134. .lable150 {
  135. width: 156rpx !important;
  136. font-size: 24rpx;
  137. }
  138. .ww80 {
  139. width: 80rpx;
  140. }
  141. .content {
  142. width: 518rpx;
  143. min-height: 64rpx;
  144. font-size: 28rpx;
  145. line-height: 28rpx;
  146. font-style: normal;
  147. font-weight: 400;
  148. padding: 18rpx 8rpx;
  149. box-sizing: border-box;
  150. word-wrap: break-word;
  151. flex-grow: 1 !important;
  152. .unit {
  153. padding: 0 4rpx;
  154. font-size: 24rpx;
  155. color: #404446;
  156. }
  157. }
  158. .content_num {
  159. display: flex;
  160. align-items: center;
  161. padding: 0 4rpx;
  162. /deep/ .uni-input-input {
  163. border: 2rpx solid #F0F8F2;
  164. background: #F0F8F2;
  165. color: $theme-color;
  166. }
  167. }
  168. .pd4 {
  169. padding: 4rpx 8rpx;
  170. }
  171. &:last-child {
  172. border-bottom: none;
  173. }
  174. }
  175. .ww50 {
  176. width: 50%;
  177. }
  178. .ww55 {
  179. width: 55%;
  180. }
  181. .ww45 {
  182. width: 45%;
  183. }
  184. }
  185. }
  186. </style>