instanceBom.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <template>
  2. <view>
  3. <view class="material rx-ss" v-for="(mate, idx) in list">
  4. <view class="content_table">
  5. <view class="item">
  6. <view class="lable rx-cc">编码</view>
  7. <view class="content">
  8. {{mate.categoryCode}}
  9. </view>
  10. </view>
  11. <view class="item">
  12. <view class="lable rx-cc">名称</view>
  13. <view class="content">{{mate.categoryName}}</view>
  14. </view>
  15. <view class="item" v-for="(itm, index) in tableH(mate.rootCategoryLevelId)" :key="index">
  16. <view class="lable rx-cc">{{ itm.label }}</view>
  17. <view class="content">{{ mate[itm.prop] }}</view>
  18. </view>
  19. <view class="item">
  20. <view class="lable rx-cc">数量</view>
  21. <view class="content content_num">
  22. <input class="uni-input" v-model="mate.demandQuantity"
  23. type="digit"></input>
  24. <view class="unit" v-if='mate.unit'>/{{mate.unit}}</view>
  25. </view>
  26. </view>
  27. <view class="item">
  28. <view class="lable rx-cc">领料仓库</view>
  29. <view class="content ">
  30. {{ mate.warehouseName }}
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. import {
  39. tableHeader
  40. } from './common.js'
  41. export default {
  42. props: ['list'],
  43. data() {
  44. return {
  45. }
  46. },
  47. methods: {
  48. tableH(type) {
  49. return tableHeader(type)
  50. },
  51. }
  52. }
  53. </script>
  54. <style lang="scss" scoped>
  55. .material {
  56. margin-top: 10rpx;
  57. .content_table {
  58. width: 702rpx;
  59. border: 2rpx solid $border-color;
  60. .item {
  61. display: flex;
  62. border-bottom: 2rpx solid $border-color;
  63. .lable {
  64. width: 132rpx;
  65. text-align: center;
  66. background-color: #F7F9FA;
  67. font-size: 26rpx;
  68. border-right: 2rpx solid $border-color;
  69. flex-shrink: 0;
  70. }
  71. .ww80 {
  72. width: 80rpx;
  73. }
  74. .content {
  75. width: 518rpx;
  76. min-height: 64rpx;
  77. font-size: 28rpx;
  78. line-height: 28rpx;
  79. font-style: normal;
  80. font-weight: 400;
  81. padding: 18rpx 8rpx;
  82. box-sizing: border-box;
  83. word-wrap: break-word;
  84. flex-grow: 1 !important;
  85. }
  86. .content_num {
  87. display: flex;
  88. align-items: center;
  89. padding: 0 4rpx;
  90. /deep/ .uni-input-input {
  91. width: 200rpx;
  92. border: 2rpx solid #F0F8F2;
  93. background: #F0F8F2;
  94. color: $theme-color;
  95. }
  96. .unit {
  97. padding: 0 4rpx;
  98. font-size: 24rpx;
  99. color: #404446;
  100. }
  101. }
  102. .pd4 {
  103. padding: 4rpx 8rpx;
  104. }
  105. &:last-child {
  106. border-bottom: none;
  107. }
  108. }
  109. .ww55 {
  110. width: 55%;
  111. }
  112. .ww45 {
  113. width: 45%;
  114. }
  115. }
  116. }
  117. </style>