instanceBom.vue 2.8 KB

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