instanceBom.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. <template>
  2. <view>
  3. <view class="material rx-ss" v-for="(mate, idx) in list">
  4. <view class="left rx-ss" @click="getDelete(idx)">
  5. <uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20" color="#fa3534"></uni-icons>
  6. </view>
  7. <view class="content_table">
  8. <view class="item">
  9. <view class="lable rx-cc">编码</view>
  10. <view class="content">
  11. {{mate.code}}
  12. </view>
  13. </view>
  14. <view class="item">
  15. <view class="lable rx-cc">名称</view>
  16. <view class="content rx-bc">{{mate.name}}
  17. <view class="tag_box "
  18. v-if="Object.prototype.hasOwnProperty.call(mate, 'isOut') && mate.isOut == 1" style="">委外
  19. </view>
  20. </view>
  21. </view>
  22. <view class="item" v-for="(itm, index) in tableH(mate.rootCategoryLevelId)" v-if='itm.prop'
  23. :key="index">
  24. <view class="lable rx-cc">{{ itm.label }}</view>
  25. <view class="content">{{ mate[itm.prop] }}</view>
  26. </view>
  27. <view class="item">
  28. <view class="lable rx-cc">包装库存</view>
  29. <view class="content">{{mate.packingCountBase}}/ {{mate.minUnit}}</view>
  30. </view>
  31. <view class="item" >
  32. <view class="lable rx-cc">领料数量</view>
  33. <view v-if="Object.prototype.hasOwnProperty.call(mate, 'isOut') && mate.isOut == 1">{{ mate.demandQuantity }}</view>
  34. <view class="content content_num" v-else>
  35. <input class="uni-input" v-model="mate.demandQuantity"
  36. @blur='mate.demandQuantity > mate.availableCountBase ? mate.demandQuantity = mate.availableCountBase : mate.demandQuantity'
  37. type="number"></input>
  38. <view class="unit">/{{mate.measuringUnit}}</view>
  39. <view>&nbsp;&nbsp; (库存:{{ mate.availableCountBase }} {{mate.measuringUnit}})</view>
  40. </view>
  41. </view>
  42. <view class="item" v-if="!Object.prototype.hasOwnProperty.call(mate, 'isOut') || mate.isOut == 0">
  43. <view class="lable rx-cc">领料仓库</view>
  44. <view class="content pd4">
  45. <zxz-uni-data-select :localdata="mate.warehouseLists" v-model="mate.warehouseId"
  46. dataValue='warehouse_id' format='{warehouse_name}' dataKey="warehouse_name" filterable
  47. :clear='false'></zxz-uni-data-select>
  48. </view>
  49. </view>
  50. <view class="item" v-if="Object.prototype.hasOwnProperty.call(mate, 'isOut') && mate.isOut == 1">
  51. <view class="lable rx-cc">领料仓库</view>
  52. <view class="content pd4 rx-sc">
  53. {{ mate.warehouseName}}
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. </view>
  59. </template>
  60. <script>
  61. import {
  62. tableHeader
  63. } from '../../common.js'
  64. export default {
  65. props: ['list'],
  66. data() {
  67. return {
  68. }
  69. },
  70. methods: {
  71. tableH(type) {
  72. return tableHeader(type)
  73. },
  74. getDelete(idx) {
  75. this.list.splice(idx, 1)
  76. },
  77. }
  78. }
  79. </script>
  80. <style lang="scss" scoped>
  81. .material {
  82. margin-top: 10rpx;
  83. .left {
  84. width: 40rpx;
  85. }
  86. .zdy_check {
  87. width: 30rpx;
  88. height: 30rpx;
  89. border: 2rpx solid #c8c9cc;
  90. border-radius: 4rpx;
  91. }
  92. .check_active {
  93. background: $theme-color;
  94. border: 2rpx solid $theme-color;
  95. /deep/ .u-icon__icon {
  96. color: #fff !important;
  97. }
  98. }
  99. .content_table {
  100. width: 652rpx;
  101. border: 2rpx solid $border-color;
  102. .item {
  103. display: flex;
  104. border-bottom: 2rpx solid $border-color;
  105. .lable {
  106. width: 132rpx;
  107. text-align: center;
  108. background-color: #F7F9FA;
  109. font-size: 26rpx;
  110. border-right: 2rpx solid $border-color;
  111. flex-shrink: 0;
  112. }
  113. .ww80 {
  114. width: 80rpx;
  115. }
  116. .content {
  117. width: 518rpx;
  118. min-height: 64rpx;
  119. font-size: 28rpx;
  120. line-height: 28rpx;
  121. font-style: normal;
  122. font-weight: 400;
  123. padding: 18rpx 8rpx;
  124. box-sizing: border-box;
  125. word-wrap: break-word;
  126. flex-grow: 1 !important;
  127. }
  128. .content_num {
  129. display: flex;
  130. align-items: center;
  131. padding: 0 4rpx;
  132. /deep/ .uni-input-input {
  133. width: 200rpx;
  134. border: 2rpx solid #F0F8F2;
  135. background: #F0F8F2;
  136. color: $theme-color;
  137. }
  138. .unit {
  139. padding: 0 4rpx;
  140. font-size: 24rpx;
  141. color: #404446;
  142. }
  143. }
  144. .pd4 {
  145. padding: 4rpx 8rpx;
  146. }
  147. &:last-child {
  148. border-bottom: none;
  149. }
  150. }
  151. .ww55 {
  152. width: 55%;
  153. }
  154. .ww45 {
  155. width: 45%;
  156. }
  157. }
  158. }
  159. .tag_box {
  160. padding: 2rpx 10rpx;
  161. margin-right: 12rpx;
  162. background: #E6A23C;
  163. font-size: 22rpx;
  164. color: #fff;
  165. border-radius: 4rpx;
  166. }
  167. </style>