ApplyInfo.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. <template>
  2. <div class="apply-info">
  3. <div class="apply-info-title">
  4. <p>最新求购信息</p>
  5. <span>海量求购,一网打尽</span>
  6. <div>
  7. <input type="text" class="form-control" placeholder="请输入要查找的内容" />
  8. <span>查询</span>
  9. <a>展开筛选</a>
  10. </div>
  11. </div>
  12. <div class="apply-info-list">
  13. <p>
  14. <span>发布时间<img src="/images/applyPurchase/sort-arrow.png" alt=""></span>
  15. <span>买家</span>
  16. <span>型号</span>
  17. <span>品牌</span>
  18. <span>截止时间<img src="/images/applyPurchase/sort-arrow.png" alt=""></span>
  19. <span>已报价<img src="/images/applyPurchase/sort-arrow.png" alt=""></span>
  20. <span>操作</span>
  21. </p>
  22. <ul>
  23. <li v-for="purchaseMan in purchaseManList.content">
  24. <span>{{purchaseMan.releaseDate | date}}</span>
  25. <span>{{purchaseMan.tel | phone}}</span>
  26. <span>{{purchaseMan.code}}</span>
  27. <span>panasonic</span>
  28. <span class="date-content"><span>剩余</span><span> 8 </span>天<span> 8 </span>小时</span>
  29. <span class="number-content"><span>1000</span>&nbsp;条</span>
  30. <span class="btn-content">
  31. <a>联系买家</a>
  32. <a>我要报价</a>
  33. </span>
  34. </li>
  35. </ul>
  36. </div>
  37. <page :total="totalCount" :page-size="pageSize"
  38. :current="nowPage" v-on:childEvent="listenPage"></page>
  39. </div>
  40. </template>
  41. <script>
  42. import Page from '~components/common/page/pageComponent.vue'
  43. export default {
  44. data () {
  45. return {
  46. pageSize: 10,
  47. nowPage: 1
  48. }
  49. },
  50. components: {
  51. Page
  52. },
  53. filters: {
  54. date: function (input) {
  55. const d = new Date(Number(input))
  56. const year = d.getFullYear()
  57. const monthTemp = d.getMonth() + 1
  58. const month = monthTemp < 10 ? '0' + monthTemp : '' + monthTemp
  59. const hour = d.getHours() < 10 ? '0' + d.getHours() : '' + d.getHours() + ' '
  60. const minutes = d.getMinutes() < 10 ? '0' + d.getMinutes() : '' + d.getMinutes() + ' '
  61. const day = d.getDate() < 10 ? '0' + d.getDate() : '' + d.getDate() + ' '
  62. return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes
  63. },
  64. phone: function (str) {
  65. return str.substring(0, 3) + '****' + str.substring(7, 11)
  66. }
  67. },
  68. computed: {
  69. purchaseManList () {
  70. return this.$store.state.applyPurchase.purchaseManList.purchaseManList.data
  71. },
  72. totalCount () {
  73. return this.purchaseManList.totalElements
  74. }
  75. },
  76. methods: {
  77. listenPage: function (page) {
  78. this.nowPage = page
  79. this.$store.dispatch('applyPurchase/loadPurchaseManList', {page: this.nowPage, count: this.pageSize})
  80. }
  81. }
  82. }
  83. </script>
  84. <style lang="scss" scoped>
  85. .apply-info {
  86. width: 1190px;
  87. margin: 0 auto;
  88. .apply-info-title {
  89. border-bottom: 1px solid #3975f4;
  90. >p {
  91. display: inline-block;
  92. width: 156px;
  93. height: 33px;
  94. line-height: 33px;
  95. color: #fff;
  96. background: #3975f4;
  97. font-size: 18px;
  98. text-align: center;
  99. border: {
  100. top-left-radius: 3px;
  101. top-right-radius: 3px;
  102. }
  103. margin: 0;
  104. }
  105. >span {
  106. color: #999;
  107. margin-left: 16px;
  108. }
  109. >div {
  110. float: right;
  111. height: 25px;
  112. line-height: 25px;
  113. >input {
  114. width: 241px;
  115. height: 25px;
  116. line-height: 25px;
  117. font-size: 13px;
  118. border: {
  119. top-right-radius: 0;
  120. bottom-right-radius: 0;
  121. }
  122. }
  123. >span {
  124. display: inline-block;
  125. width: 69px;
  126. color: #fff;
  127. background: #3975f4;
  128. text-align: center;
  129. margin: 0 6px 0 -1px;
  130. border: {
  131. top-right-radius: 3px;
  132. bottom-right-radius: 3px;
  133. }
  134. cursor: pointer;
  135. }
  136. >a {
  137. background: #ffa200;
  138. color: #fff;
  139. width: 79px;
  140. border-radius: 3px;
  141. text-align: center;
  142. display: inline-block;
  143. }
  144. }
  145. }
  146. .apply-info-list {
  147. >p {
  148. background: #ededed;
  149. height: 40px;
  150. line-height: 40px;
  151. margin: 9px 0 0 0;
  152. span {
  153. display: inline-block;
  154. text-align: center;
  155. img {
  156. width: 15px;
  157. height: 14px;
  158. margin: 0 0 3px 5px;
  159. }
  160. &:nth-child(1) {
  161. width: 186px;
  162. }
  163. &:nth-child(2) {
  164. width: 160px;
  165. }
  166. &:nth-child(3) {
  167. width: 173px;
  168. }
  169. &:nth-child(4) {
  170. width: 147px;
  171. }
  172. &:nth-child(5) {
  173. width: 152px;
  174. }
  175. &:nth-child(6) {
  176. width: 158px;
  177. }
  178. &:nth-child(7) {
  179. width: 214px;
  180. }
  181. }
  182. }
  183. >ul {
  184. margin-bottom: 29px;
  185. li {
  186. min-height: 67px;
  187. line-height: 67px;
  188. border: 1px solid #ededed;
  189. >span {
  190. overflow: hidden;
  191. text-overflow: ellipsis;
  192. white-space: nowrap;
  193. display: inline-block;
  194. text-align: center;
  195. color: #3c3c3c;
  196. &:nth-child(1) {
  197. width: 186px;
  198. }
  199. &:nth-child(2) {
  200. width: 160px;
  201. }
  202. &:nth-child(3) {
  203. width: 173px;
  204. }
  205. &:nth-child(4) {
  206. width: 147px;
  207. }
  208. &:nth-child(5) {
  209. width: 152px;
  210. }
  211. &:nth-child(6) {
  212. width: 158px;
  213. }
  214. &:nth-child(7) {
  215. width: 212px;
  216. }
  217. &.date-content {
  218. span {
  219. &:first-child {
  220. font-size: 12px;
  221. color: #666;
  222. }
  223. color: #f71026;
  224. }
  225. }
  226. &.number-content {
  227. span {
  228. color: #5392f9;
  229. &.active {
  230. color: #ff9a00;
  231. }
  232. }
  233. }
  234. &.btn-content {
  235. a {
  236. display: inline-block;
  237. width: 71px;
  238. height: 28px;
  239. line-height: 28px;
  240. color: #fff;
  241. background: #3c7cf5;
  242. border-radius: 3px;
  243. cursor: pointer;
  244. &:first-child {
  245. background: #ffa200;
  246. margin-right: 10px;
  247. }
  248. }
  249. }
  250. }
  251. .expand-content {
  252. display: flex;
  253. justify-content: space-between;
  254. padding: 0 236px 0 36px;
  255. background: #fffbf0;
  256. box-shadow: 1.5px 3px 7px 0 rgb( 178, 178, 179 );
  257. div {
  258. display: inline-block;
  259. span {
  260. color: #f71026;
  261. }
  262. }
  263. }
  264. }
  265. }
  266. }
  267. }
  268. </style>