merchant.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. <template>
  2. <div class="merchant">
  3. <div class="container">
  4. <div class="top clearfix">
  5. <div class="title">
  6. <p>High quality dealer</p>
  7. <h2>供应商列表</h2>
  8. </div>
  9. <div class="search">
  10. <div class="input-group">
  11. <input type="search" class="form-control" title="code" placeholder="名称/地址/行业/型号/品牌"
  12. v-model="searchCode" @search="goodsSearch(searchCode)"/>
  13. <span class="input-group-btn">
  14. <button type="button" class="btn" @click="goodsSearch(searchCode)">&nbsp;查 询</button>
  15. </span>
  16. </div>
  17. </div>
  18. </div>
  19. <div class="list_info">
  20. <ul class="list-inline">
  21. <li v-for="item in list.content" @click="jumpResource(item.enUU)">
  22. <div class="has_shop" v-if="item.isStore === 1">已开店</div>
  23. <div class="enterprise_name" v-text="item.enName">深圳英优软科技有限公司</div>
  24. <div class="select_btn" v-html="isInFrame ? '添加为<br/>供应商' : '查看<br/>更多'" @mouseleave="hasJump = false" @mouseenter="hasJump = true" @click="addResource(item.enUU)"></div>
  25. <div class="popups">
  26. <p>企业执照号:</p><p v-text="item.enBusinesscode ? item.enBusinesscode : '暂无信息'">1</p>
  27. <p>地址:</p><p v-text="item.enAddress ? item.enAddress : '暂无信息'">1</p>
  28. <p>邮箱:</p><p v-text="item.enEmail ? item.enEmail : '暂无信息'">h</p>
  29. <p>电话:</p><p v-text="item.enTel ? item.enTel : '暂无信息'">1</p>
  30. <p>行业:</p><p v-text="item.enProfession ? item.enProfession : '暂无信息'">1</p>
  31. </div>
  32. </li>
  33. </ul>
  34. <div style="float: right;">
  35. <page :total="list.totalElements" :page-size="pageParams.count"
  36. :current="pageParams.page" v-on:childEvent="handleCurrentChange">
  37. </page>
  38. </div>
  39. </div>
  40. </div>
  41. </div>
  42. </template>
  43. <script>
  44. import Page from '~components/common/page/pageComponent.vue'
  45. export default {
  46. name: 'MerchantView',
  47. data () {
  48. return {
  49. hasJump: false,
  50. searchCode: '',
  51. pageParams: {
  52. count: 20,
  53. page: 1
  54. }
  55. }
  56. },
  57. components: {
  58. Page
  59. },
  60. computed: {
  61. isInFrame () {
  62. if (this.$route.query.type === 'erp') {
  63. return true
  64. }
  65. },
  66. list () {
  67. return this.$store.state.supplier.merchant.merchant.data
  68. }
  69. },
  70. methods: {
  71. addResource (id) {
  72. if (this.isInFrame) {
  73. window.open(this.$route.query.localPath + this.$route.query.erpPath)
  74. } else {
  75. this.$router.push('supplier/' + id)
  76. }
  77. },
  78. jumpResource (id) {
  79. if (!this.hasJump) {
  80. this.$router.push('supplier/' + id)
  81. }
  82. },
  83. goodsSearch (type) {
  84. if (type) {
  85. this.$store.dispatch('supplier/loadVendorList', {page: this.pageParams.page, size: this.pageParams.count, keyword: type})
  86. }
  87. },
  88. handleCurrentChange (type) {
  89. this.pageParams.page = type
  90. this.$store.dispatch('supplier/loadVendorList', {page: type, size: this.pageParams.count})
  91. }
  92. }
  93. }
  94. </script>
  95. <style scoped type="text/scss" lang="scss">
  96. .merchant{
  97. background: #ecf1f1 url(/images/supplier/banner.jpg)no-repeat;
  98. border-top:3px solid #000;
  99. padding-bottom:25px;
  100. margin-top:-1.5em;
  101. .top{
  102. padding-top:30px;
  103. margin-bottom:40px;
  104. .title{
  105. margin:0 auto;
  106. text-align: center;
  107. width:215px;
  108. border-bottom:1px solid #ff5151;
  109. color:#fff;
  110. p{
  111. margin:0;
  112. }
  113. h2{
  114. font-size: 32px;
  115. margin:0;
  116. line-height: 46px;
  117. }
  118. &:before{
  119. content: '';
  120. display:block;
  121. position:relative;
  122. left:55px;
  123. top:61px;
  124. width:105px;
  125. height:1px;
  126. background: #ff8a00;
  127. }
  128. &:after{
  129. content: '';
  130. display:block;
  131. position:relative;
  132. left:55px;
  133. top:4px;
  134. width:105px;
  135. height:1px;
  136. background: #fff600;
  137. }
  138. }
  139. .search{
  140. float:right;
  141. width:310px;
  142. text-align: right;
  143. margin-right:10px;
  144. .btn{
  145. width:68px;
  146. background: #ffa200;
  147. color:#fff;
  148. }
  149. }
  150. }
  151. .list_info{
  152. padding: 0 10px;
  153. ul{
  154. margin-left:5px;
  155. li{
  156. position:relative;
  157. vertical-align: top;
  158. width:267px;
  159. height:115px;
  160. border-radius:5px;
  161. margin-right:32px;
  162. margin-bottom:60px;
  163. background: #ffffff;
  164. box-shadow: 0 3px 10px rgba(0,0,0,.8);
  165. &:nth-child(4n) {
  166. margin-right:0;
  167. }
  168. &:after{
  169. content: '';
  170. display:block;
  171. position:absolute;
  172. top:99%;
  173. left:50%;
  174. z-index:200;
  175. width:88px;
  176. height:22px;
  177. margin-left:-44px;
  178. background: url(/images/supplier/icon/bottom_center_img.png)no-repeat;
  179. }
  180. .has_shop {
  181. position:absolute;
  182. right:0;
  183. top:0;
  184. width:68px;
  185. height:22px;
  186. background: url(/images/supplier/icon/top_right_img.png)no-repeat;
  187. color:#fff;
  188. font-weight: bold;
  189. text-align: center;
  190. line-height: 22px;
  191. }
  192. .enterprise_name{
  193. padding-top:15px;
  194. width:98%;
  195. overflow: hidden;
  196. text-overflow: ellipsis;
  197. white-space:nowrap;
  198. border-bottom:1px solid #b9def7;
  199. font-weight: bold;
  200. color:#1891e4;
  201. font-size: 18px;
  202. line-height: 48px;
  203. text-align: center;
  204. }
  205. .select_btn{
  206. position:absolute;
  207. bottom:-10px;
  208. left:50%;
  209. z-index:250;
  210. width:56px;
  211. height:56px;
  212. padding:10px 0;
  213. margin-left:-28px;
  214. text-align: center;
  215. line-height: 18px;
  216. background: #1891e4;
  217. border-radius:50%;
  218. color:#fff;
  219. }
  220. &:hover{
  221. cursor:pointer;
  222. .popups{
  223. top:99%;
  224. opacity:1;
  225. z-index:100;
  226. min-height:125px;
  227. }
  228. }
  229. .popups{
  230. position:absolute;
  231. top:0;
  232. left:0;
  233. background: #6c6c6c;
  234. width:267px;
  235. min-height:110px;
  236. padding:25px 15px 15px 10px;
  237. transition: all .3s ease;
  238. opacity: 0;
  239. color:#fff;
  240. overflow: hidden;
  241. p{
  242. float:left;
  243. margin: 0 !important;
  244. line-height: 18px;
  245. max-height:18px;
  246. overflow: hidden;
  247. text-overflow: ellipsis;
  248. white-space: nowrap;
  249. &:nth-child(2n-1){
  250. width:42px;
  251. }
  252. &:first-child{
  253. width:85px;
  254. }
  255. &:nth-child(2n){
  256. width:200px;
  257. }
  258. &:nth-child(2){
  259. width:155px;
  260. }
  261. &:nth-child(4){
  262. max-height:38px;
  263. overflow: auto;
  264. white-space:pre-wrap;
  265. word-wrap:break-word;
  266. }
  267. &:last-child{
  268. overflow: hidden;
  269. text-overflow: ellipsis;
  270. white-space: nowrap;
  271. }
  272. }
  273. }
  274. }
  275. }
  276. }
  277. }
  278. </style>