ForwardGoodsList.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <template>
  2. <div class="forward-goods-list">
  3. <table>
  4. <thead>
  5. <tr>
  6. <th width="25%">型号/品牌</th>
  7. <th width="25%">卖家名称</th>
  8. <th width="25%">物料名称/库存(PCS)</th>
  9. <th width="15%">规格</th>
  10. <th width="15%"></th>
  11. </tr>
  12. </thead>
  13. <tbody>
  14. <tr v-for="item in forwardGood.content">
  15. <td>
  16. <div class="line">
  17. <span class="title inline-block">型号</span>
  18. <span class="content inline-block" :title="item.cmpCode" v-text="item.cmpCode || '-'"></span>
  19. </div>
  20. <div class="line">
  21. <span class="title inline-block">品牌</span>
  22. <span class="content inline-block" :title="item.pbrand || item.pbranden">{{item.pbrand || item.pbranden || '-'}}</span>
  23. </div>
  24. </td>
  25. <td class="single">
  26. <div class="line">
  27. <span class="title inline-block">卖家</span>
  28. <span class="content inline-block" :title="item.enName">{{item.enName || '-'}}</span>
  29. </div>
  30. </td>
  31. <td>
  32. <div class="line">
  33. <span class="title inline-block">物料名称</span>
  34. <span class="content inline-block" :title="item.kind || item.kinden">{{item.kind || item.kinden || '-'}}</span>
  35. </div>
  36. <div class="line">
  37. <span class="title inline-block">库存(PCS)</span>
  38. <span class="content inline-block" :title="item.erpReserve">{{item.erpReserve || 0}}</span>
  39. </div>
  40. </td>
  41. <td class="single">
  42. <div class="line">
  43. <span class="title inline-block">规格</span>
  44. <span class="content inline-block" :title="item.spec">{{item.spec || '-'}}</span>
  45. </div>
  46. </td>
  47. <td><button @click="authenticateInterceptor(goSeek(item))">立即询价</button></td>
  48. </tr>
  49. </tbody>
  50. </table>
  51. <seek-product :productItem="productItem" :showObj="showSeekObj"></seek-product>
  52. </div>
  53. </template>
  54. <script>
  55. import { SeekProduct } from '~components/applyPurchase'
  56. export default {
  57. data () {
  58. return {
  59. showSeekObj: {
  60. show: false
  61. },
  62. productItem: {}
  63. }
  64. },
  65. components: {
  66. SeekProduct
  67. },
  68. computed: {
  69. goods () {
  70. return this.$store.state.searchData.searchList.listNew.data
  71. },
  72. forwardGood () {
  73. return this.goods ? this.goods.futures : {}
  74. }
  75. },
  76. methods: {
  77. goSeek: function (item) {
  78. this.productItem.cmpCode = item.cmpCode
  79. this.productItem.brand = item.pbrand || item.pbranden
  80. this.productItem.prodName = item.kind || item.kinden
  81. this.productItem.spec = item.spec
  82. this.showSeekObj.show = true
  83. }
  84. }
  85. }
  86. </script>
  87. <style lang="scss" scoped>
  88. .forward-goods-list {
  89. table {
  90. width: 100%;
  91. margin: 10px 0 50px;
  92. thead tr {
  93. background: #f7f7f7;
  94. font-size: 14px;
  95. color: #333;
  96. height: 40px;
  97. th {
  98. text-align: center;
  99. }
  100. }
  101. tbody tr {
  102. &:hover {
  103. background: #ecf2fd;
  104. }
  105. border: 1px solid #e8e8e8;
  106. border-bottom: none;
  107. &:last-child {
  108. border-bottom: 1px solid #e8e8e8;
  109. }
  110. td {
  111. padding: 24px 0;
  112. font-size: 12px;
  113. &.single {
  114. float: left;
  115. width: 100%;
  116. height: 100%;
  117. }
  118. .line {
  119. margin-top: 24px;
  120. &:first-child {
  121. margin-top: 0;
  122. }
  123. .title {
  124. color: #2496f1;
  125. width: 30%;
  126. text-align: right;
  127. vertical-align: top;
  128. }
  129. .content {
  130. width: 70%;
  131. padding-left: 10px;
  132. vertical-align: top;
  133. word-break: break-all;
  134. color: #666;
  135. height: 30px;
  136. overflow: hidden;
  137. }
  138. }
  139. button {
  140. width: 80px;
  141. text-align: center;
  142. border-radius: 3px;
  143. height: 30px;
  144. color: #fff;
  145. background: #2e91f0;
  146. border: none;
  147. outline: none;
  148. display: block;
  149. margin: 0 auto;
  150. }
  151. }
  152. }
  153. }
  154. }
  155. </style>