componet-item.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388
  1. <template>
  2. <div class="middle">
  3. <div class="list">
  4. <div class="name">品牌:</div>
  5. <div class="text overHidden">{{item.brandNameEn || item.brandNameCn || '-'}}</div>
  6. </div>
  7. <div class="list">
  8. <div class="name">物料名称:</div>
  9. <div class="text overHidden">{{item.kindNameCn || '-'}}</div>
  10. </div>
  11. <div class="list">
  12. <div class="name">型号:</div>
  13. <div class="text overHidden">{{item.code || '-'}}</div>
  14. </div>
  15. <div class="list">
  16. <div class="name">规格:</div>
  17. <div class="text overHidden">{{item.spec || '-'}}</div>
  18. </div>
  19. <div class="list">
  20. <div class="fl">
  21. <div class="name">包装:</div>
  22. <div class="text overHidden" style="width: 2.3rem">{{item.packaging || '无包装信息'}}</div>
  23. </div>
  24. <div class="fl">
  25. <div class="name">交期(天):</div>
  26. <div class="text overHidden" style="width: 1.8rem" v-if="item.b2cMaxDelivery && (item.b2cMaxDelivery != item.b2cMinDelivery)" v-text="item.b2cMinDelivery + '-'+ item.b2cMaxDelivery"></div>
  27. <div class="text overHidden" style="width: 1.8rem" v-if="item.b2cMaxDelivery && (item.b2cMaxDelivery == item.b2cMinDelivery)" v-text="item.b2cMinDelivery"></div>
  28. </div>
  29. </div>
  30. <div class="list">
  31. <!--<div class="fl">-->
  32. <!--<div class="name">生产日期:</div>-->
  33. <!--<div class="text overHidden" style="width: 1.75rem" :title="item.produceDate">{{item.produceDate || '-'}}</div>-->
  34. <!--</div>-->
  35. <div class="fl">
  36. <div class="name">库存:</div>
  37. <div class="text overHidden" style="width: 2.3rem">{{item.reserve || '-'}}</div>
  38. </div>
  39. <div class="fl">
  40. <div class="name">起拍:</div>
  41. <div class="text overHidden" style="width: 2.3rem">{{item.minBuyQty || '-'}}</div>
  42. </div>
  43. </div>
  44. <div class="list">
  45. <div class="fl">
  46. <div class="name">规格书:</div>
  47. <div class="text">
  48. <a :href="item.attach" target="_blank" v-if="item.attach && item.attach !== '' && item.attach !== '1'">
  49. <i class="iconfont icon-pdf" :class="{'active': item.attach && item.attach !== '' && item.attach !== '1'}"></i>
  50. </a>
  51. <template v-else>
  52. <i class="iconfont icon-pdf" :class="{'active': item.attach && item.attach !== '' && item.attach !== '1'}"></i>
  53. </template>
  54. </div>
  55. </div>
  56. </div>
  57. <div class="list">
  58. <div class="name">卖家名称:</div>
  59. <div class="text overHidden">{{item.storeName}}</div>
  60. </div>
  61. <div class="list">
  62. <div class="name left">价格梯度<p>(pcs):</p></div>
  63. <div class="table left">
  64. <ul>
  65. <li class="title">
  66. <div>分段数量/PCS</div>
  67. <div>分段单价</div>
  68. </li>
  69. <li v-for="price in item.prices">
  70. <div>{{price.start}}+</div>
  71. <div v-if="item.currencyName == 'RMB'">¥{{price.rMBPrice}}</div>
  72. <div v-else>${{price.uSDPrice}}</div>
  73. </li>
  74. </ul>
  75. </div>
  76. </div>
  77. <div class="list clearfix">
  78. <div class="pull-left cancat" @click.stop="cancatSeller(item)">
  79. <i class="iconfont icon-kefu1"></i>联系卖家
  80. </div>
  81. <div class="pull-right clearfix">
  82. <div class="pull-left" @click="buy(item, false, $event)">加入购物车</div>
  83. <div class="pull-left" @click="buy(item, true, $event)">立即购买</div>
  84. </div>
  85. </div>
  86. <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
  87. </div>
  88. </template>
  89. <script>
  90. import { RemindBox } from '~components/mobile/common'
  91. export default {
  92. props: {
  93. item: {
  94. type: Object,
  95. default: {}
  96. }
  97. },
  98. components: {
  99. RemindBox
  100. },
  101. data () {
  102. return {
  103. remindText: '',
  104. timeoutCount: 0
  105. }
  106. },
  107. methods: {
  108. cancatSeller(item) {
  109. this.$emit('cancatSeller', item)
  110. },
  111. buy(item, flag, e) {
  112. this.baseUtils.buyOrCar(flag, e, this, item, '/mobile/center/user/pay/')
  113. },
  114. setRemindText (str) {
  115. this.remindText = str
  116. this.timeoutCount++
  117. }
  118. }
  119. }
  120. </script>
  121. <style lang="scss" scoped>
  122. @mixin overFlowHidden {
  123. overflow: hidden;
  124. text-overflow: ellipsis;
  125. white-space: nowrap;
  126. }
  127. @mixin lineHeight($value) {
  128. height: $value;
  129. line-height: $value;
  130. }
  131. .middle {
  132. background: #fff;
  133. padding: 0.2rem;
  134. .lookMoreBtn {
  135. font-size: 0.28rem;
  136. color: #2d8cf0
  137. }
  138. .more_icon {
  139. font-size: 0.34rem;
  140. color: #999;
  141. }
  142. .order-tag {
  143. display: inline-block;
  144. font-size: .18rem;
  145. color: #fff;
  146. font-weight: bold;
  147. background: #ee1717;
  148. height: .27rem;
  149. width: .27rem;
  150. line-height: .27rem;
  151. text-align: center;
  152. border-radius: .05rem;
  153. position: relative;
  154. top: -.05rem;
  155. margin-right: .05rem;
  156. &.reserve-tag {
  157. background: #07bb1c;
  158. }
  159. }
  160. text-align: left;
  161. background: #fff;
  162. /*border-radius: 5px;*/
  163. margin-bottom: 0.2rem;
  164. .overHidden {
  165. @include overFlowHidden()
  166. }
  167. .pms {
  168. color: #f57710;
  169. border: 1px solid #f57710;
  170. border-radius: 0.4rem;
  171. background: #fff;
  172. font-size: 0.24rem;
  173. height: 0.4rem;
  174. line-height: 0.4rem;
  175. width: 0.8rem;
  176. text-align: center;
  177. }
  178. .list {
  179. @include overFlowHidden();
  180. width: 100%;
  181. .left {
  182. float: left;
  183. overflow: hidden;
  184. text-overflow: ellipsis;
  185. white-space: nowrap;
  186. }
  187. .textinfo {
  188. font-size: 0.18rem;
  189. margin-left: 0.1rem;
  190. display: inline-block;
  191. background: #3f84f6;
  192. color: #fff;
  193. font-weight: bold;
  194. border-radius: 3px;
  195. width: 0.8rem;
  196. height: 0.32rem;
  197. line-height: 0.32rem;
  198. text-align: center
  199. }
  200. .button {
  201. font-size: 0.3rem;
  202. color: #1a58dd;
  203. width: 0.92rem;
  204. height: 0.43rem;
  205. line-height: 0.43rem;
  206. text-align: center;
  207. border-radius: 5px;
  208. border:1px solid #1a58dd;
  209. display: inline-block;
  210. margin-right: 0.2rem;
  211. }
  212. margin-bottom: 0.18rem;
  213. &::after{
  214. clear: both;
  215. display: block;
  216. content: ' ';
  217. visibility: hidden;
  218. zoom: 1;
  219. }
  220. .fl {
  221. width: 3.5rem;
  222. float: left;
  223. }
  224. .fr {
  225. text-align: left;
  226. width: 2.6rem;
  227. overflow: hidden;
  228. text-overflow: ellipsis;
  229. white-space: nowrap;
  230. }
  231. &.list-long {
  232. .fl {
  233. width: 100% !important;
  234. }
  235. }
  236. .name {
  237. color: #666;
  238. font-size: 0.28rem;
  239. display: inline-block;
  240. }
  241. .text {
  242. display: inline-block;
  243. color: #333;
  244. font-size: 0.28rem;
  245. vertical-align: top;
  246. width: 5.5rem;
  247. @include overFlowHidden();
  248. }
  249. .table {
  250. width: 5.85rem;
  251. margin-bottom: 0;
  252. margin-top: 0;
  253. margin-left: 0.1rem;
  254. li {
  255. height: 0.43rem;
  256. line-height: 0.43rem;
  257. border-left: .01rem solid #c5c5c5;
  258. font-size: .28rem;
  259. &::after {
  260. clear: both;
  261. display: block;
  262. content: ' ';
  263. visibility: hidden;
  264. zoom: 1;
  265. }
  266. div {
  267. text-align: center;
  268. width: 50%;
  269. float: left;
  270. border-right: .01rem solid #c5c5c5;
  271. border-bottom: .01rem solid #c5c5c5;
  272. }
  273. &:nth-child(odd) {
  274. background: #ddd;
  275. color: #333;
  276. font-size: 0.28rem;
  277. }
  278. &:nth-child(even) {
  279. background: #fcfcfc;
  280. color: #333;
  281. font-size: 0.28rem;
  282. }
  283. &:nth-last-of-type(1){
  284. color: #f31919;
  285. }
  286. &.title {
  287. font-size: 0.28rem;
  288. color: #333;
  289. }
  290. }
  291. }
  292. .pull-right {
  293. div {
  294. color: #3f84f6;
  295. font-size: 0.28rem;
  296. border-radius: 0.07rem;
  297. border: 1px solid #3f84f6;
  298. background: #fff;
  299. width: 2rem;
  300. line-height: 0.56rem;
  301. height: 0.56rem;
  302. text-align: center;
  303. }
  304. div:last-child {
  305. margin-left: 0.2rem;
  306. color: #fff;
  307. background: #3f84f6;
  308. }
  309. }
  310. i {
  311. &.icon-pdf {
  312. color: #929292;
  313. font-size: 0.4rem;
  314. }
  315. &.active {
  316. color: #eb062b;
  317. }
  318. }
  319. .cancat {
  320. height: 0.56rem;
  321. line-height: 0.56rem;
  322. border: 1px solid #3f84f6;
  323. color: #3f84f6;
  324. font-size: 0.26rem;
  325. text-align: center;
  326. border-radius: 3px;
  327. padding: 0 0.1rem;
  328. overflow: hidden;
  329. width: auto;
  330. }
  331. img.pull-left {
  332. width: 1.21rem;
  333. height: 0.8rem;
  334. border: 1px solid #dcdcdc;
  335. border-radius: 0.07rem;
  336. margin-top: 0;
  337. }
  338. }
  339. .sayPriBtn {
  340. width: 2rem;
  341. @include lineHeight(0.54rem);
  342. color: #fff;
  343. font-size: 0.28rem;
  344. background: #3f84f6;
  345. border-radius: 3px;
  346. text-align: center;
  347. margin-top: -0.1rem;
  348. }
  349. .middle_bottom {
  350. .middle_bottom-left {
  351. float: left;
  352. img {
  353. width: 1.21rem;
  354. height: 1.21rem;
  355. border: 1px solid #4290f7;
  356. border-radius: 0.07rem;
  357. overflow: hidden;
  358. }
  359. div.middle_bottom-leftitem {
  360. line-height: 0.5rem;
  361. font-size: 0.28rem;
  362. div {
  363. display: inline-block;
  364. color: #666;
  365. height: 100%;
  366. float: left;
  367. &.bottom-title {
  368. display: inline-block;
  369. text-align: justify;
  370. vertical-align: top;
  371. width: 1.5rem;
  372. height: 0.5rem;
  373. &::after {
  374. content: "";
  375. display: inline-block;
  376. width: 100%;
  377. overflow: hidden;
  378. height: 0;
  379. }
  380. }
  381. }
  382. }
  383. }
  384. }
  385. }
  386. </style>