StoreInfo.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. <template>
  2. <div class="storeInfo container">
  3. <div class="form-group">
  4. <div class="storeIns">
  5. <div class="sign">选择商家:</div>
  6. <div class="storeInList" v-for="item in store">
  7. <div :class="{'storeIn-active' : item.isSelected, 'item' : !item.isSelected}">
  8. <a>
  9. <img :src="item.logoUrl || '/images/component/default.png'" :alt="item.storeName" :title="item.storeName">
  10. </a>
  11. </div>
  12. </div>
  13. <div class="storeInList" style="font-size: 14px" v-if="!store || store.length == 0">
  14. 暂无商家信息
  15. </div>
  16. </div>
  17. </div>
  18. <div class="form-group" style="margin-bottom: 40px;">
  19. <div>
  20. <div style="font-size: 14px">
  21. <span>产品匹配:</span>
  22. <span v-if="store && store.length > 0">
  23. <input type="checkbox">
  24. <span>&nbsp;库存寄售</span>
  25. <input type="checkbox">
  26. <span>&nbsp;店铺自营</span>
  27. </span>
  28. <span v-if="!store || store.length == 0">暂无可匹配的信息</span>
  29. </div>
  30. </div>
  31. </div>
  32. <div class="goodsList">
  33. <div class="goods-item">按商家列表</div>
  34. <table class="table">
  35. <thead>
  36. <tr class="height54">
  37. <th class="text-center" width="100">制造商型号</th>
  38. <th class="text-center" width="120">生产日期</th>
  39. <th class="text-center" width="80">包装方式</th>
  40. <th class="text-center" width="150">库存</th>
  41. <th class="text-center" width="80">数量</th>
  42. <th class="text-center" width="100">香港交货<span style="font-size: 12px;">($)</span></th>
  43. <th class="text-center" width="130">大陆交货<span style="font-size: 12px;">(¥)</span></th>
  44. <th class="text-center" width="120">交期</span></th>
  45. <th class="text-center" width="140">操作</th>
  46. </tr>
  47. </thead>
  48. <tbody class="text-center">
  49. <tr style="cursor: pointer;" v-for="list in storeList.content">
  50. <td><a :href="'/store/' + list.storeid + '/' + list.batchCode">{{list.code}}</a></td>
  51. <td><a :href="'/store/' + list.storeid + '/' + list.batchCode">{{list.produceDate}}</a></td>
  52. <td><a :href="'/store/' + list.storeid + '/' + list.batchCode">{{list.packaging || '暂无包装方式'}}</a></td>
  53. <td style="text-align: left;padding-left: 25px;">
  54. <a :href="'/store/' + list.storeid + '/' + list.batchCode">
  55. <div>
  56. <span>库存:</span>
  57. <span>{{list.reserve}}</span>
  58. </div>
  59. <div>
  60. <span>起拍:</span>
  61. <span>{{list.minBuyQty}}</span>
  62. </div>
  63. <div>
  64. <span>倍数:</span>
  65. <span>{{list.minPackQty}}</span>
  66. </div>
  67. </a>
  68. </td>
  69. <td>
  70. <a :href="'/store/' + list.storeid + '/' + list.batchCode">
  71. <div v-for="price in list.prices">
  72. <span>{{price.start}}</span>+
  73. </div>
  74. </a>
  75. </td>
  76. <td>
  77. <a :href="'/store/' + list.storeid + '/' + list.batchCode">
  78. <div v-show="list.currencyName.indexOf('USD')==-1 || !list.prices">
  79. <span>—</span>
  80. </div>
  81. <div v-for="price in list.prices">
  82. <span>{{price.uSDPrice | currency}}</span>
  83. </div>
  84. </a>
  85. </td>
  86. <td>
  87. <a :href="'/store/' + list.storeid + '/' + list.batchCode">
  88. <div v-show="list.currencyName.indexOf('RMB')==-1 || !list.prices">
  89. <span>—</span>
  90. </div>
  91. <div v-for="price in list.prices">
  92. <span>{{price.rMBPrice | currency}}</span>
  93. </div>
  94. </a>
  95. </td>
  96. <td>
  97. <a :href="'/store/' + list.storeid + '/' + list.batchCode">
  98. <div v-show="list.b2cMinDelivery">
  99. <span>交期:</span>
  100. <span>{{list.b2cMinDelivery}}</span>-<span>{{list.b2cMaxDelivery}}</span>
  101. </div>
  102. </a>
  103. </td>
  104. <td>
  105. <buy :item="list"></buy>
  106. </td>
  107. </tr>
  108. <tr v-if="!storeList.content || storeList.content.length == 0">
  109. <td colspan="10" class="text-center" style="line-height: 40px; font-size: 14px;"><i class="fa fa-smile-o fa-lg"></i> 暂无现货</td>
  110. </tr>
  111. </tbody>
  112. </table>
  113. </div>
  114. </div>
  115. </template>
  116. <script>
  117. import Buy from '~components/common/buyOrCar/buyComponent.vue'
  118. export default {
  119. name: 'StoreInfo',
  120. components: {
  121. Buy
  122. },
  123. filters: {
  124. currency: function (num) {
  125. if (typeof num === 'number') {
  126. if (num.toString().indexOf('.') === -1) {
  127. num += '.00'
  128. }
  129. }
  130. return num
  131. }
  132. },
  133. computed: {
  134. stores () {
  135. return this.$store.state.componentStore.store
  136. },
  137. store () {
  138. return this.stores.data
  139. },
  140. storeLists () {
  141. return this.$store.state.componentInformation.information
  142. },
  143. storeList () {
  144. return this.storeLists.data
  145. }
  146. }
  147. }
  148. </script>
  149. <style scoped>
  150. .container .storeIns{
  151. margin-top: 20px;
  152. width: 1190px;
  153. height: 48px;
  154. line-height: 48px;
  155. }
  156. .container .storeIns .sign {
  157. display: table-cell;
  158. vertical-align: middle;
  159. font-size: 14px;
  160. }
  161. .container .storeIns .storeInList {
  162. display: table-cell;
  163. }
  164. .container .storeIn {
  165. width: 98px;
  166. height: 49px;
  167. line-height: 30px;
  168. float: left;
  169. border: 1px solid #ccc;
  170. text-align: center;
  171. vertical-align: middle;
  172. margin-right: 15px;
  173. cursor: pointer;
  174. }
  175. .container .storeIn-active {
  176. width: 98px;
  177. float: left;
  178. border: 1px solid #5078cb;
  179. text-align: center;
  180. vertical-align: middle;
  181. margin-right: 15px;
  182. cursor: pointer;
  183. }
  184. .container .storeIn a,.componentDetail .storeIn-active a {
  185. display: table-cell;
  186. height: 46px;
  187. width: 98px;
  188. text-align: center;
  189. vertical-align: middle;
  190. }
  191. .storeIn a>img,.storeIn-active a>img {
  192. max-width: 95px;
  193. max-height: 46px;
  194. }
  195. .container .goodsList {
  196. clear: both;
  197. font-size: 14px;
  198. }
  199. .container .goodsList .goods-item {
  200. height: 30px;
  201. width: 120px;
  202. background-color: #5078cb;
  203. color: #fff;
  204. text-align: center;
  205. vertical-align: middle;
  206. line-height: 30px;
  207. }
  208. .container .goodsList thead {
  209. background-color: #F7F7F7;
  210. }
  211. .container .goodsList tbody tr td{
  212. vertical-align: middle;
  213. text-align: center;
  214. }
  215. .container .goodsList tbody tr td:hover a{
  216. color: #474443;
  217. }
  218. /* .container .goodsList .btn{
  219. border-radius: 4px;
  220. width: 80px;
  221. height: 30px;
  222. color: #214797;
  223. font-size: 14px;
  224. line-height: 14px;
  225. text-align: center;
  226. margin: 5px 0;
  227. padding: 0;
  228. user-select: none;
  229. background-image: none;
  230. border: 1px solid transparent;
  231. font-weight: 400;
  232. }
  233. .container .goodsList .btn-buyNow {
  234. color: #fff;
  235. background-color: #5078cb;
  236. }
  237. .container .goodsList .btn-default{
  238. background-color: #fff;
  239. border-color: #ccc;
  240. }*/
  241. .container .form-group input{
  242. vertical-align: sub;
  243. }
  244. .container .height54{
  245. height: 54px;
  246. background: none;
  247. color: #333;
  248. }
  249. .container .height54 th{
  250. line-height: 54px;
  251. border-bottom: none;
  252. padding: 0;
  253. }
  254. .container .table tbody td{
  255. border-bottom: #ddd 1px solid;
  256. border-top: none;
  257. }
  258. .container .table tbody{
  259. border-left: #ddd 1px solid;
  260. border-right: #ddd 1px solid;
  261. }
  262. .container .table tbody td div{
  263. text-align: center;
  264. margin-left: 10%;
  265. }
  266. .container .table tbody tr:hover{
  267. background: #f5f5f5;
  268. }
  269. .container .table tbody tr:hover{
  270. background: #f5f5f5;
  271. }
  272. </style>