palletBom.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. <template>
  2. <view>
  3. <view class="title_box rx-bc">
  4. <view class="name">舟皿</view>
  5. </view>
  6. <view class="material ">
  7. <view class='content_table' v-for="(item,index) in palletList" :key='index'>
  8. <view class="item">
  9. <view class="lable rx-cc">舟皿名称</view>
  10. <view class="content ">
  11. <zxz-uni-data-select :localdata="boatList" v-model="item.categoryId" dataValue='id'
  12. format='{name}-{code}' dataKey="code" filterable :clear='false'
  13. @change='inputChange'></zxz-uni-data-select>
  14. <view v-if="isDetails">{{item.code }} </view>
  15. </view>
  16. </view>
  17. <view class="item">
  18. <view class="lable rx-cc">舟皿型号</view>
  19. <view class="content">
  20. {{item.modelType}}
  21. </view>
  22. </view>
  23. <view class="item">
  24. <view class="lable rx-cc">舟皿数量</view>
  25. <view class="content content_num">
  26. <input class="uni-input" v-model="item.quantity " type='digit' :disabled="isDetails"></input>
  27. </view>
  28. </view>
  29. <view class="item" v-if="item.hideKc">
  30. <view class="lable rx-cc">库存</view>
  31. <view class="content content_num">
  32. {{ packingCountBase }} {{item.unit}}
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. import {
  41. realTimeInventory,
  42. } from '@/api/pda/workOrder.js'
  43. export default {
  44. props: {
  45. palletList: {
  46. type: Array,
  47. default: () => []
  48. },
  49. isDetails: {
  50. type: Boolean,
  51. default: false
  52. }
  53. },
  54. data() {
  55. return {
  56. classificationList: [],
  57. boatList: [],
  58. packingCountBase: 0,
  59. }
  60. },
  61. created() {
  62. this.getInventoryList()
  63. },
  64. methods: {
  65. getInventoryList() {
  66. let param = {
  67. categoryLevelId: 8,
  68. dimension: 1,
  69. pageNum: 1,
  70. size: -1,
  71. }
  72. realTimeInventory(param).then(res => {
  73. this.boatList = res.list
  74. })
  75. },
  76. inputChange(e) {
  77. this.$set(this.palletList[0], 'categoryId', e.id)
  78. this.$set(this.palletList[0], 'code', e.code)
  79. this.$set(this.palletList[0], 'name', e.name)
  80. this.$set(this.palletList[0], 'specification', e.specification)
  81. this.$set(this.palletList[0], 'categoryId', e.id)
  82. this.$set(this.palletList[0], 'brandNum', e.brandNum)
  83. this.$set(this.palletList[0], 'modelType', e.modelType)
  84. this.$set(this.palletList[0], 'quantity', e.quantity)
  85. this.$set(this.palletList[0], 'unit', e.unit)
  86. if (Object.prototype.hasOwnProperty.call(e, 'packingCountBase')) {
  87. this.packingCountBase = e.packingCountBase
  88. this.$set(this.palletList[0], 'hideKc', true)
  89. }
  90. this.$forceUpdate()
  91. },
  92. },
  93. }
  94. </script>
  95. <style lang="scss" scoped>
  96. .title_box {
  97. margin-top: 20rpx;
  98. .name {
  99. font-size: 28rpx;
  100. font-style: normal;
  101. font-weight: 400;
  102. color: $theme-color;
  103. padding-left: 20rpx;
  104. position: relative;
  105. &:before {
  106. position: absolute;
  107. content: '';
  108. left: 0rpx;
  109. top: 0rpx;
  110. bottom: 0rpx;
  111. width: 4rpx;
  112. height: 28rpx;
  113. background: $theme-color;
  114. margin: auto;
  115. }
  116. }
  117. }
  118. .material {
  119. margin-top: 10rpx;
  120. .content_table {
  121. width: 100%;
  122. border: 2rpx solid $border-color;
  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. .lable220 {
  135. width: 220rpx !important;
  136. font-size: 24rpx;
  137. }
  138. .lable150 {
  139. width: 156rpx !important;
  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. .penalize {
  162. width: 160rpx;
  163. line-height: 60rpx;
  164. background: $theme-color;
  165. font-size: 24rpx;
  166. text-align: center;
  167. color: #fff;
  168. }
  169. }
  170. .content_num {
  171. display: flex;
  172. align-items: center;
  173. padding: 0 4rpx;
  174. /deep/ .uni-input-input {
  175. border: 2rpx solid #F0F8F2;
  176. background: #F0F8F2;
  177. color: $theme-color;
  178. }
  179. }
  180. .pd4 {
  181. padding: 4rpx 8rpx;
  182. }
  183. &:last-child {
  184. border-bottom: none;
  185. }
  186. }
  187. .ww55 {
  188. width: 55%;
  189. }
  190. .ww45 {
  191. width: 45%;
  192. }
  193. }
  194. }
  195. </style>