bidding.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566
  1. <template>
  2. <view class="content">
  3. <view class="navbar">
  4. <u-navbar title="招标" @leftClick="leftClick" bgColor="rgba(0,0,0,0)" :placeholder="true" :autoBack="true">
  5. </u-navbar>
  6. <view class="search">
  7. <u-input v-model="serach_value" type="text" :border="true" placeholder="热搜关键词" shape="circle"
  8. prefixIcon="search" prefixIconStyle="font-size: 22px;color: #909399">
  9. <template slot="suffix">
  10. <view>搜索</view>
  11. </template>
  12. </u-input>
  13. </view>
  14. </view>
  15. <view class="box">
  16. <view class="hflex acenter jbetween">
  17. <view class="hflex acenter jbetween tabs">
  18. <block v-for="(item,index) in tabs" :key="index">
  19. <view class="tabs_item hflex acenter" @click="changeTab(item.index)" :class="tab_active == item.index ? 'tab_active' : ''">
  20. {{item.name}}
  21. <block v-if="index != 0">
  22. <u-icon name="arrow-down-fill" color="#666666" size="6" v-if="tab_active != item.index"></u-icon>
  23. <u-icon name="arrow-up-fill" color="#506DFF" size="6" v-if="tab_active == item.index"></u-icon>
  24. </block>
  25. </view>
  26. </block>
  27. </view>
  28. <view class="hflex acenter " @click="screen">
  29. <view class="tabs_item" :class="screen_show? 'tab_active' : ''">筛选</view>
  30. <image src="/static/images/comment/screen.png" class="screen_icon" v-show="!screen_show"></image>
  31. <image src="/static/images/comment/screen_active.png" class="screen_icon" v-show="screen_show"></image>
  32. </view>
  33. </view>
  34. <view class="drop" v-show="screen_show">
  35. <view class="drop_bg">
  36. <view class="drop_list">
  37. <view class="hflex acenter jbetween">
  38. <view class="drop_title">披露方式</view>
  39. <view class="hflex acenter" @click="expend('mode')">
  40. <view class="drop_right">{{mode?'':'展开'}}</view>
  41. <u-icon name="arrow-down-fill" color="#666666" size="6" v-if="!mode"></u-icon>
  42. <u-icon name="arrow-up-fill" color="#666666" size="6" v-else></u-icon>
  43. </view>
  44. </view>
  45. <view class="hflex acenter fwrap" :class="mode?'':'hide'">
  46. <block v-for="(item,index) in modeList" :key="index">
  47. <view class="drop_item" :class="mode_active == index?'drop_active':''" @click="selectMode(index)">{{item.name}}</view>
  48. </block>
  49. </view>
  50. </view>
  51. <view class="drop_list">
  52. <view class="hflex acenter jbetween">
  53. <view class="drop_title">转让底价</view>
  54. <view class="hflex acenter" @click="expend('price')">
  55. <view class="drop_right">{{price?'':'展开'}}</view>
  56. <u-icon name="arrow-down-fill" color="#666666" size="6" v-if="!price"></u-icon>
  57. <u-icon name="arrow-up-fill" color="#666666" size="6" v-else></u-icon>
  58. </view>
  59. </view>
  60. <view class="hflex acenter fwrap" :class="price?'':'hide'">
  61. <block v-for="(item,index) in priceList" :key="index">
  62. <view class="drop_item" :class="price_active == index?'drop_active':''" @click="selectPrice(index)">{{item.name}}</view>
  63. </block>
  64. </view>
  65. </view>
  66. <view class="drop_list">
  67. <view class="hflex acenter jbetween">
  68. <view class="drop_title">交易类型</view>
  69. <view class="hflex acenter" @click="expend('type')">
  70. <view class="drop_right">{{type?'':'展开'}}</view>
  71. <u-icon name="arrow-down-fill" color="#666666" size="6" v-if="!type"></u-icon>
  72. <u-icon name="arrow-up-fill" color="#666666" size="6" v-else></u-icon>
  73. </view>
  74. </view>
  75. <view class="hflex acenter fwrap" :class="type?'':'hide'">
  76. <block v-for="(item,index) in typeList" :key="index">
  77. <view class="drop_item" :class="type_active.indexOf(index) == -1?'':'drop_active'" @click="selectType(index)">{{item.name}}</view>
  78. </block>
  79. </view>
  80. </view>
  81. <view class="drop_list">
  82. <view class="hflex acenter jbetween">
  83. <view class="drop_title">所在地区</view>
  84. <view class="hflex acenter" @click="expend('region')">
  85. <view class="drop_right">{{region?'':'展开'}}</view>
  86. <u-icon name="arrow-down-fill" color="#666666" size="6" v-if="!region"></u-icon>
  87. <u-icon name="arrow-up-fill" color="#666666" size="6" v-else></u-icon>
  88. </view>
  89. </view>
  90. <view class="hflex acenter fwrap" :class="region?'':'hide'">
  91. <block v-for="(item,index) in regionList" :key="index">
  92. <view class="drop_item" :class="region_active == index?'drop_active':''" @click="selectRegion(index)">{{item.name}}</view>
  93. </block>
  94. </view>
  95. </view>
  96. <view class="drop_list">
  97. <view class="hflex acenter jbetween">
  98. <view class="drop_title">披露截止时间</view>
  99. <view class="hflex acenter" @click="expend('time')">
  100. <view class="drop_right">{{time?'':'展开'}}</view>
  101. <u-icon name="arrow-down-fill" color="#666666" size="6" v-if="!time"></u-icon>
  102. <u-icon name="arrow-up-fill" color="#666666" size="6" v-else></u-icon>
  103. </view>
  104. </view>
  105. <view class="hflex acenter fwrap" :class="time?'':'hide'">
  106. <block v-for="(item,index) in timeList" :key="index">
  107. <view class="drop_item" :class="time_active == index?'drop_active':''" @click="selectTime(index)">{{item.name}}</view>
  108. </block>
  109. </view>
  110. </view>
  111. <view class="drop_bottom hflex acenter jbetween">
  112. <view class="left" @click="reset">清空</view>
  113. <view class="right" @click="confirm">确定</view>
  114. </view>
  115. </view>
  116. </view>
  117. <view class="list">
  118. <block v-for="(item,index) in pageList" :key="index">
  119. <view class="list_item" @click="toDetail(item.id)">
  120. <view class="top">
  121. <view v-if="item.type == 0" class="top_icon">已中标</view>
  122. <view v-if="item.type == 1" class="top_icon1">招标中</view>
  123. <view class="item_name">{{item.name}}</view>
  124. </view>
  125. <view class="hflex acenter cell">
  126. <image src="/static/images/comment/company.png" class="item_icon"></image>
  127. <view class="text_style1">招标单位</view>
  128. <view class="text_style1">{{item.company}}</view>
  129. </view>
  130. <view class="hflex acenter cell">
  131. <u-icon name="clock-fill" color="#888888" size="14"></u-icon>
  132. <view class="text_style1">发布时间</view>
  133. <view class="text_style1">{{item.date}}</view>
  134. </view>
  135. </view>
  136. </block>
  137. </view>
  138. </view>
  139. </view>
  140. </template>
  141. <script>
  142. import $api from '@/static/js/api.js'
  143. var that = ''
  144. export default {
  145. data() {
  146. return {
  147. serach_value: '',
  148. tabs: [
  149. {
  150. index: 0,
  151. name: '默认',
  152. },
  153. {
  154. index: 1,
  155. name: '披露起始时间',
  156. },
  157. {
  158. index: 2,
  159. name: '披露截止时间',
  160. }
  161. ],
  162. tab_active: 0,
  163. screen_show: false,
  164. pageList: [
  165. {
  166. id: 1,
  167. type: 0,
  168. name: '珠海兴业绿色建筑科技有限公司2022年密封胶材料供应商年度框架招标项目',
  169. company: '中铁大桥局第七工程有限公司',
  170. date: '2022-07-12',
  171. },
  172. {
  173. id: 1,
  174. type: 1,
  175. name: '珠海兴业绿色建筑科技有限公司2022年密封胶材料供应商年度框架招标项目',
  176. company: '中铁大桥局第七工程有限公司',
  177. date: '2022-07-12',
  178. },
  179. {
  180. id: 1,
  181. type: 0,
  182. name: '珠海兴业绿色建筑科技有限公司2022年密封胶材料供应商年度框架招标项目',
  183. company: '中铁大桥局第七工程有限公司',
  184. date: '2022-07-12',
  185. },
  186. ],
  187. type: false,
  188. type_active: [],
  189. typeList: [
  190. {
  191. name: '全部'
  192. },
  193. {
  194. name: '制造加工类'
  195. },
  196. {
  197. name: '采购商品类'
  198. },
  199. {
  200. name: '资产转让类'
  201. },
  202. {
  203. name: '交通运费类'
  204. },
  205. {
  206. name: '船舶转让类'
  207. },
  208. {
  209. name: '工程招标类'
  210. }
  211. ],
  212. mode: false,
  213. mode_active: -1,
  214. modeList: [
  215. {
  216. name: '全部',
  217. },
  218. {
  219. name: '预披露',
  220. },
  221. {
  222. name: '正式披露',
  223. }
  224. ],
  225. price: false,
  226. price_active: -1,
  227. priceList: [
  228. {
  229. name: '全部',
  230. },
  231. {
  232. name: '100万以下',
  233. },
  234. {
  235. name: '100万-500万',
  236. }
  237. ],
  238. region: false,
  239. region_active: -1,
  240. regionList: [
  241. {
  242. name: '全国',
  243. },
  244. {
  245. name: '北京市',
  246. },
  247. {
  248. name: '天津市',
  249. }
  250. ],
  251. time: false,
  252. time_active: -1,
  253. timeList: [
  254. {
  255. name: '全部',
  256. },
  257. {
  258. name: '三天内',
  259. },
  260. {
  261. name: '十天内',
  262. }
  263. ],
  264. }
  265. },
  266. onLoad() {
  267. that = this
  268. that.getList()
  269. },
  270. methods: {
  271. // 返回
  272. leftClick() {
  273. $api.jump(-1)
  274. },
  275. getList() {
  276. $api.req({
  277. url: '/data/api.Bidding/index',
  278. data: {
  279. limit: that.limit,
  280. page: that.page,
  281. b_type:
  282. }
  283. })
  284. },
  285. // 切换tabs
  286. changeTab(index) {
  287. that.tab_active = index
  288. },
  289. // 筛选
  290. screen() {
  291. that.screen_show = !that.screen_show
  292. },
  293. // 查看详情
  294. toDetail(id) {
  295. $api.jump('/page_index/pages/bidding/bidDetail?id=' + id)
  296. },
  297. expend(e) {
  298. if(e == 'type') {
  299. that.type = !that.type
  300. }
  301. if(e == 'mode') {
  302. that.mode = !that.mode
  303. }
  304. if(e == 'price') {
  305. that.price = !that.price
  306. }
  307. if(e == 'region') {
  308. that.region = !that.region
  309. }
  310. if(e == 'time') {
  311. that.time = !that.time
  312. }
  313. },
  314. selectMode(index) {
  315. that.mode_active = index
  316. },
  317. selectPrice(index) {
  318. that.price_active = index
  319. },
  320. selectType(index) {
  321. if(that.type_active.length == 0) {
  322. that.type_active.push(index)
  323. } else {
  324. for(var i=0;i<that.type_active.length;i++) {
  325. if(that.type_active[i] == index) {
  326. that.type_active.splice(i,1)
  327. return
  328. }
  329. }
  330. that.type_active.push(index)
  331. }
  332. },
  333. selectRegion(index) {
  334. that.region_active = index
  335. },
  336. selectTime(index) {
  337. that.time_active = index
  338. },
  339. reset() {
  340. that.mode_active = -1
  341. that.price_active = -1
  342. that.type_active = []
  343. that.region_active = -1
  344. that.time_active = -1
  345. },
  346. confirm() {
  347. that.screen_show = false
  348. },
  349. },
  350. }
  351. </script>
  352. <style lang="scss" scoped>
  353. .content::v-deep {
  354. background-color: #e8eff5;
  355. .navbar {
  356. .search {
  357. // background: #fff;
  358. width: 100%;
  359. height: 88rpx;
  360. box-sizing: border-box;
  361. padding: 12rpx 30rpx;
  362. .u-input {
  363. background-color: #fff;
  364. height: 64rpx;
  365. padding: 0 0 0 18rpx !important;
  366. border: 1rpx solid #506Dff;
  367. margin-bottom: 12rpx;
  368. }
  369. .u-input__content__subfix-icon {
  370. width: 128rpx;
  371. height: 64rpx;
  372. background-color: #506Dff;
  373. border-radius: 32rpx;
  374. color: #fff;
  375. font-size: 28rpx;
  376. text-align: center;
  377. line-height: 64rpx;
  378. }
  379. }
  380. }
  381. .box {
  382. margin-top: 24rpx;
  383. width: 100%;
  384. min-height: calc(100vh - 296rpx);
  385. background: linear-gradient(180deg, #FFFFFF 0%, #F5F5F5 100%);
  386. border-radius: 40rpx 40rpx 0px 0px;
  387. box-sizing: border-box;
  388. padding: 30rpx;
  389. .tabs {
  390. width: 526rpx;
  391. }
  392. .tabs_item {
  393. font-size: 26rpx;
  394. font-weight: 400;
  395. color: #666666;
  396. line-height: 36rpx;
  397. padding-right: 8rpx;
  398. .u-icon{
  399. padding-left: 8rpx;
  400. }
  401. }
  402. .tab_active {
  403. color: #506DFF;
  404. }
  405. .screen_icon {
  406. width: 24rpx;
  407. height: 24rpx;
  408. }
  409. .drop {
  410. position: absolute;
  411. left: 0;
  412. top: 345rpx;
  413. width: 750rpx;
  414. z-index: 9;
  415. min-height: calc(100vh - 345rpx);
  416. background: rgba(0,0,0,0.5);
  417. backdrop-filter: blur(5px);
  418. .drop_bg {
  419. width: 100%;
  420. background-color: #fff;
  421. .drop_list {
  422. box-sizing: border-box;
  423. padding: 0 30rpx;
  424. .drop_title {
  425. margin: 24rpx 0 20rpx;
  426. font-size: 28rpx;
  427. font-weight: 400;
  428. color: #3D4249;
  429. line-height: 40rpx;
  430. }
  431. .drop_right {
  432. font-size: 20rpx;
  433. font-weight: 400;
  434. color: #555555;
  435. line-height: 28rpx;
  436. padding-right: 8rpx;
  437. }
  438. .hide {
  439. width: 100%;
  440. height: 80rpx;
  441. overflow: hidden;
  442. }
  443. .drop_item {
  444. width: 208rpx;
  445. height: 76rpx;
  446. background: #F4F8FB;
  447. border-radius: 4rpx;
  448. font-size: 28rpx;
  449. text-align: center;
  450. font-weight: 400;
  451. color: #555555;
  452. line-height: 76rpx;
  453. margin: 0 34rpx 20rpx 0;
  454. }
  455. .drop_item:nth-child(3n+3) {
  456. margin: 0 0 20rpx;
  457. }
  458. .drop_active {
  459. background: #E8F2FF;
  460. font-weight: 500;
  461. color: #506DFF;
  462. }
  463. }
  464. .drop_bottom {
  465. margin-top: 32rpx;
  466. width: 100%;
  467. height: 100rpx;
  468. background: #FFFFFF;
  469. box-shadow: 0px -1px 2px 0px rgba(0,0,0,0.05);
  470. .left {
  471. width: 50%;
  472. height: 100%;
  473. font-size: 36rpx;
  474. font-weight: 400;
  475. color: #BDBDBD;
  476. line-height: 100rpx;
  477. text-align: center;
  478. }
  479. .right {
  480. width: 50%;
  481. height: 100%;
  482. font-size: 36rpx;
  483. font-weight: 400;
  484. color: #FFFFFF;
  485. line-height: 100rpx;
  486. text-align: center;
  487. background: #506DFF;
  488. }
  489. }
  490. }
  491. }
  492. .list {
  493. margin-bottom: 60rpx;
  494. .list_item {
  495. margin: 20rpx auto 0;
  496. width: 690rpx;
  497. background: #FFFFFF;
  498. border-radius: 10px;
  499. box-sizing: border-box;
  500. padding: 20rpx;
  501. .cell {
  502. padding: 12rpx 0;
  503. }
  504. .top {
  505. vertical-align:middle;
  506. .item_name {
  507. // width: calc(100% - 74rpx);
  508. font-size: 30rpx;
  509. font-weight: 400;
  510. color: #222222;
  511. // float: right;
  512. line-height: 42rpx;
  513. }
  514. .top_icon {
  515. width: 64rpx;
  516. height: 28rpx;
  517. float: left;
  518. margin: 7rpx 10rpx 0 0;
  519. background: url('/static/images/comment/green_bg.png') no-repeat;
  520. background-size: 100%;
  521. font-size: 16rpx;
  522. font-weight: normal;
  523. color: #FFFFFF;
  524. line-height: 28rpx;
  525. text-align: center;
  526. }
  527. .top_icon1 {
  528. width: 64rpx;
  529. height: 28rpx;
  530. float: left;
  531. margin: 7rpx 10rpx 0 0;
  532. background: url('/static/images/comment/blue_bg.png') no-repeat;
  533. background-size: 100%;
  534. font-size: 16rpx;
  535. font-weight: normal;
  536. color: #FFFFFF;
  537. line-height: 28rpx;
  538. text-align: center;
  539. }
  540. }
  541. .text_style1 {
  542. font-size: 22rpx;
  543. font-weight: 400;
  544. color: #585F6A;
  545. line-height: 32rpx;
  546. padding-left: 12rpx;
  547. }
  548. .item_icon {
  549. width: 28rpx;
  550. height: 28rpx;
  551. }
  552. }
  553. }
  554. }
  555. }
  556. </style>