移动端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

1039 regels
36 KiB

  1. <template>
  2. <div class="app-container">
  3. <van-nav-bar
  4. title="项目详情"
  5. left-arrow
  6. fixed
  7. placeholder
  8. @click-left="$router.back(-1)"
  9. />
  10. <van-tabs scrollspy sticky color="#007b76" >
  11. <van-tab title="竞拍信息" title-style="font-size:12px;">
  12. <!-- <van-swipe class="my-swipe" height="235" indicator-color="white" @change="onChange">-->
  13. <!-- <template v-if="detail.fileUrlList !== undefined &&detail.fileUrlList.length>0">-->
  14. <!-- <van-swipe-item v-for="(item,index) in detail.fileUrlList" :key="index"><van-image :src="item.fileUrl?'/api'+item.fileUrl:'../../static/images/zwtp.jpg'" height="235" /></van-swipe-item>-->
  15. <!-- </template>-->
  16. <!-- <template v-else>-->
  17. <!-- <van-swipe-item><van-image src="../../static/images/zwtp.jpg" height="235" /></van-swipe-item>-->
  18. <!-- </template>-->
  19. <!-- <template #indicator>-->
  20. <!-- <div class="custom-indicator">{{ current + 1 }}/{{ detail.fileUrlList !== undefined &&detail.fileUrlList.length>0 ? detail.fileUrlList.length:1 }}</div>-->
  21. <!-- </template>-->
  22. <!-- </van-swipe>-->
  23. <van-notice-bar color="#fff" background="#007E72" left-icon="clock-o">
  24. {{ process }}&nbsp&nbsp&nbsp&nbsp{{tip}}
  25. </van-notice-bar>
  26. <div class="information">
  27. <van-row>
  28. <van-col span="24" class="title">【{{ detail.rollout }}】{{ detail.projectName }}</van-col>
  29. </van-row>
  30. <van-row>
  31. <van-col span="5">{{ process }}</van-col>
  32. <van-col span="19"><van-count-down :time="time" format="DD 天 HH 时 mm 分 ss 秒" @change="timerChange" /></van-col>
  33. </van-row>
  34. <van-row>
  35. <van-col span="5">挂牌价</van-col>
  36. <van-col span="19" class="price"><span>{{detail.price}}</span> {{detail.unit}}</van-col>
  37. </van-row>
  38. <van-row>
  39. <van-col span="5">保证金</van-col>
  40. <van-col span="19" class="money"><span>{{ detail.deposit }}</span> 元</van-col>
  41. </van-row>
  42. </div>
  43. <div class="lead" v-if="detail.biddingType != '自由竞价' || biddingTimeType == 2">
  44. <van-row >
  45. <van-col span="2"><van-image src="../../static/images/icon/phone.png" style="vertical-align: text-top;" /></van-col>
  46. <template v-if="biddinglistInformation!=undefined&&biddinglistInformation.length>0">
  47. <van-col span="3">{{biddinglistInformation[0].memberId}}</van-col>
  48. <van-col span="6">{{biddinglistInformation[0].money}}元</van-col>
  49. <van-col span="4">领先</van-col>
  50. <van-col span="9">{{biddinglistInformation[0].createTime}}</van-col>
  51. </template>
  52. </van-row>
  53. </div>
  54. <div class="detail">
  55. <van-row>
  56. <van-col span="24"><span>报名开始时间:</span>{{ detail.signupStartTime }}</van-col>
  57. </van-row>
  58. <van-row>
  59. <van-col span="24"><span>报名截止时间:</span>{{ detail.signupStopTime }}</van-col>
  60. </van-row>
  61. <van-row>
  62. <van-col span="24"><span>竞价开始时间:</span>{{ detail.biddingStartTime }}</van-col>
  63. </van-row>
  64. <van-row>
  65. <van-col span="24"><span>竞价截止时间:</span>{{ detail.biddingStopTime }}</van-col>
  66. </van-row>
  67. <van-row>
  68. <van-col span="24"><span>竞价方式:</span>{{ detail.biddingType }}</van-col>
  69. </van-row>
  70. <van-row>
  71. <van-col span="24"><span>竞价方向:</span>{{ detail.biddingDirect }}</van-col>
  72. </van-row>
  73. <van-row v-if="detail.ladderPrice&&detail.biddingType=='阶梯竞价'">
  74. <van-col span="24"><span>阶梯价(增减幅度):</span>¥{{ detail.ladderPrice }}</van-col>
  75. </van-row>
  76. <van-row>
  77. <van-col span="24"><span>延时周期:</span>{{timeConfig}}分钟</van-col>
  78. </van-row>
  79. <van-row>
  80. <van-col span="24"><span>延时周期说明:</span>竞价的最后{{timeConfig}}分钟内,任意方出价,距结束时间将延长{{timeConfig}}分钟,直至无人出价为止</van-col>
  81. </van-row>
  82. </div>
  83. </van-tab>
  84. <van-tab title="标的物介绍" title-style="font-size:12px;">
  85. <p class="delTitle">标的物介绍</p>
  86. <div class="introduce">
  87. <van-row>
  88. <van-col span="24" style="color:#333333;font-size: 0.4rem;text-align: center;font-weight: bold;">项目挂牌转出方简况及公告内容</van-col>
  89. </van-row>
  90. <van-row>
  91. <van-col span="24"><span>转出方名称</span>{{ detail.outName }}</van-col>
  92. </van-row>
  93. <van-row>
  94. <van-col span="24"><span>住址</span>{{ detail.address }}</van-col>
  95. </van-row>
  96. <van-row>
  97. <van-col span="12"><span>经济类型</span>{{ detail.economicType }}</van-col>
  98. <van-col span="12"><span>统一社会信用代码</span>{{ detail.areaNum }}</van-col>
  99. </van-row>
  100. <van-row>
  101. <van-col span="12"><span>法人/负责人</span>{{ detail.legalPerson }}</van-col>
  102. <van-col span="12"><span>联系电话</span>{{ detail.phone }}</van-col>
  103. </van-row>
  104. <van-row>
  105. <van-col span="12"><span>项目类型</span>{{ detail.projectNumber }}</van-col>
  106. <van-col span="12"><span>农地性质</span>{{ detail.projectType }}</van-col>
  107. </van-row>
  108. <van-row>
  109. <van-col span="24"><span>转出项目名称</span>{{ detail.projectName }}</van-col>
  110. </van-row>
  111. <van-row>
  112. <van-col span="24"><span>坐落</span>{{ detail.locationName }}</van-col>
  113. </van-row>
  114. <!-- <van-row>-->
  115. <!-- <van-col span="14"><span>是否属再次转出</span>{{ detail.twoout == 'N'?"否":"是"}}</van-col>-->
  116. <!-- <van-col span="10"><span>前次转出方式</span>{{ detail.oneout}}</van-col>-->
  117. <!-- </van-row>-->
  118. <van-row>
  119. <van-col span="12"><span>拟转出方式</span>{{ detail.rollout }}</van-col>
  120. <van-col span="12"><span>拟转出面积/数量</span> {{detail.allCount}}{{detail.allCountUnit}} </van-col>
  121. </van-row>
  122. <van-row>
  123. <van-col span="24"><span>拟转出期限</span>{{detail.outStartTime}} 至 {{detail.outStopTime}}&nbsp&nbsp&nbsp&nbsp&nbsp共{{detail.outYearNum}}年</van-col>
  124. </van-row>
  125. <van-row>
  126. <van-col span="24"><span>涉及农户数</span>{{ detail.peasantNum }}</van-col>
  127. </van-row>
  128. <van-row>
  129. <van-col span="24"><span>支付方式</span>{{ detail.paymentType }}</van-col>
  130. </van-row>
  131. <van-row>
  132. <van-col span="24"><span>授权情况</span>{{ detail.authorization }}</van-col>
  133. </van-row>
  134. <van-row>
  135. <van-col span="24"><span>{{detail.projectNumber == '小微工程' ? '工程内容':'拟流转土地用途'}}</span>{{ detail.contractPurpose }}</van-col>
  136. </van-row>
  137. <van-row>
  138. <van-col span="24"><span>{{detail.projectNumber == '小微工程' ? '承包范围':'其它需要披露的事项'}}</span>{{ detail.cracksEvents }}</van-col>
  139. </van-row>
  140. <van-row>
  141. <van-col span="24"><span>受让方条件</span>{{ detail.condition }}</van-col>
  142. </van-row>
  143. <van-row>
  144. <van-col span="24" style="color:#007E72;">标的物信息</van-col>
  145. </van-row>
  146. <div class="project_info" v-for="(item,index) in detail.subjectList" :key="index">
  147. <van-row>
  148. <van-col span="8">{{ item.landName }}</van-col>
  149. <van-col span="8">{{ item.area }}{{item.areaUnit}}</van-col>
  150. <van-col span="8">{{ item.condition}}</van-col>
  151. </van-row>
  152. </div>
  153. </div>
  154. </van-tab>
  155. <van-tab title="标的物图片" title-style="font-size:12px;">
  156. <p class="delTitle">标的物图片</p>
  157. <template v-if="detail.fileUrlList !== undefined &&detail.fileUrlList.length>0">
  158. <van-image v-for="(item,index) in detail.fileUrlList" :key="index" :src="item.fileUrl?'/api'+item.fileUrl:'../../static/images/index/detailImg.png'" style="vertical-align: text-top;" />
  159. </template>
  160. <template v-else>
  161. <van-image src="../../static/images/index/detailImg.png" style="vertical-align: text-top;" />
  162. </template>
  163. </van-tab>
  164. <van-tab title="竞买须知" title-style="font-size:12px;">
  165. <p class="delTitle">竞买须知</p>
  166. <div class="notice" v-html="webConfig">
  167. </div>
  168. </van-tab>
  169. <van-tab title="竞价记录" title-style="font-size:12px;">
  170. <p class="delTitle">竞价记录</p>
  171. <div class="biddingList">
  172. <p v-if="detail.biddingType == '自由竞价' && biddingTimeType != 2">友情提示:自由竞价方式下,竞价过程中不显示竞价记录!</p>
  173. <table v-else width="100%" cellspacing="0">
  174. <tr>
  175. <td>出价人</td>
  176. <td>出价</td>
  177. <td>状态</td>
  178. <td>时间</td>
  179. </tr>
  180. <tr v-for="(item,index) in biddinglistInformation" :key="index">
  181. <td>{{ item.memberId }}</td>
  182. <td>{{ item.money}}</td>
  183. <template v-if="index==0">
  184. <td style="color:#C21F3A">领先</td>
  185. </template>
  186. <template v-else>
  187. <td></td>
  188. </template>
  189. <td>{{ item.loginTime }}</td>
  190. </tr>
  191. </table>
  192. </div>
  193. </van-tab>
  194. </van-tabs>
  195. <div style="height: 3rem;"></div>
  196. <div class="bottomBtn" v-if="">
  197. <van-row v-if="!showBtn">
  198. <!-- <van-col span="8" style="margin-top: 4px;" @click="showPopup">-->
  199. <!-- <van-image src="../../static/images/icon/clock.png" style="vertical-align: text-bottom;" />-->
  200. <!-- <p style="line-height: 0.2rem;color: #999999">提醒</p>-->
  201. <!-- </van-col>-->
  202. <van-col span="24">
  203. <van-button round color="#C21F3A" block :disabled="isSignup" @click="goSignUp">
  204. {{ btnMsg }}<br/>
  205. <span style="font-size: 10px">保证金¥{{detail.deposit}}</span>
  206. </van-button>
  207. </van-col>
  208. </van-row>
  209. <van-field v-if="showBtn&&detail.biddingType!='阶梯竞价'" v-model="price" type="number" input-align="center" placeholder="请输入出价金额" />
  210. <van-row v-if="showBtn" type="flex" justify="space-around">
  211. <van-col span="4" v-if="detail.ladderPrice&&detail.biddingType=='阶梯竞价'" style="text-align: center;line-height: 1rem">
  212. <van-button color="#e2e2e2" icon="minus" size="small" @click="sub"></van-button>
  213. </van-col>
  214. <van-col span="16">
  215. <div style="display: flex;">
  216. <van-button round color="#C21F3A" block @click="offer">
  217. <p>出价</p>
  218. <p v-if="detail.ladderPrice&&detail.biddingType=='阶梯竞价'">{{price}}元</p>
  219. </van-button>
  220. <van-button v-if="isFirst == 'Y'" round color="#C21F3A" block @click="offerFirst" style="margin-left: 10px;">
  221. <p>优先跟价</p>
  222. </van-button>
  223. </div>
  224. </van-col>
  225. <van-col span="4" v-if="detail.ladderPrice&&detail.biddingType=='阶梯竞价'" style="text-align: center;line-height: 1rem">
  226. <van-button color="#e2e2e2" icon="plus" size="small" @click="add"></van-button>
  227. </van-col>
  228. </van-row>
  229. </div>
  230. <van-popup v-model="show" class="popup" closeable>
  231. <van-image src="../../static/images/icon/success.png"/>
  232. <p class="popupTit">提醒设置成功</p>
  233. <p class="popupContent">系统将按要求提醒您竞拍</p>
  234. <van-button round color="#C21F3A" block class="iKnow">
  235. 我知道了
  236. </van-button>
  237. <p class="updatePopup">修改提醒方式</p>
  238. </van-popup>
  239. </div>
  240. </template>
  241. <script>
  242. import {
  243. biddingSubmit,
  244. getBiddingList,
  245. getMember,
  246. getOutProjectDetail,
  247. getSignup,
  248. getWebConfig,
  249. projectNewBidMoney
  250. } from "../../api/project";
  251. import {getInfo} from "../../api/login";
  252. export default {
  253. name: "projectDetail",
  254. provide(){
  255. return{
  256. reload:this.reload
  257. }
  258. },
  259. data() {
  260. return {
  261. current: 0,
  262. show: false,
  263. id:this.$route.query.id,
  264. detail: {},
  265. webConfig:"",
  266. biddinglistInformation:[],
  267. rollout_type:[],
  268. process:"",
  269. tip:"",
  270. btnMsg:"",
  271. time:1000000000000000000,
  272. timeMsg:"",
  273. isSignup:false,
  274. showBtn:false,
  275. price:null,
  276. userAccount:"",
  277. userName:"",
  278. userId:"",
  279. timeConfig:'',
  280. biddinglistInformationLength:0,
  281. biddingTimeType:2,
  282. isFirst:'',
  283. timer:null
  284. };
  285. },
  286. computed: {
  287. getNowFormatDate:function(){
  288. let date = new Date();
  289. let seperator1 = "-";
  290. let seperator2 = ":";
  291. let month = date.getMonth() + 1;
  292. let day = date.getDate();
  293. let hours = date.getHours();
  294. let minutes = date.getMinutes();
  295. let seconds = date.getSeconds();
  296. if (month >= 1 && month <= 9) {
  297. month = "0" + month;
  298. }
  299. if (day >= 0 && day <= 9) {
  300. day = "0" + day;
  301. }
  302. if (hours >= 0 && hours <= 9) {
  303. hours = "0" + hours;
  304. }
  305. if (minutes >= 0 && minutes <= 9) {
  306. minutes = "0" + minutes;
  307. }
  308. if (seconds >= 0 && seconds <= 9) {
  309. seconds = "0" + seconds;
  310. }
  311. let currentdate = date.getFullYear() + seperator1 + month + seperator1 + day + " " + hours + seperator2 + minutes + seperator2 + seconds;
  312. console.log(currentdate)
  313. return currentdate;
  314. }
  315. },
  316. created() {
  317. clearInterval(this.timer);
  318. this.reload();
  319. },
  320. methods: {
  321. goSignUp(){
  322. getInfo().then(response => {
  323. getMember(response.user.userId).then(resresponse => {
  324. let data= {
  325. projectId:this.id,
  326. memberId:resresponse.data.id,
  327. };
  328. var isSign;
  329. getSignup(data).then(r =>{
  330. if(r.data=="1"){
  331. isSign=true
  332. }
  333. })
  334. if (resresponse.data.auditStatus == 'Y'){
  335. if (isSign){
  336. this.$toast({
  337. icon: 'error', // 找到自己需要的图标
  338. message: '已报名,请耐心等待审核结果!',
  339. duration:"2000",
  340. onClose:function(){
  341. }
  342. })
  343. return;
  344. }
  345. this.$router.push(
  346. {
  347. path: 'signUp',
  348. query: {
  349. projectId: this.detail.id,
  350. deposit: this.detail.deposit,
  351. projectName: this.detail.projectName
  352. }
  353. }
  354. );
  355. }else{
  356. this.$toast({
  357. icon: 'error', // 找到自己需要的图标
  358. message: '交易中心审核注册信息后方可进行报名!',
  359. duration:"2000",
  360. onClose:function(){
  361. }
  362. })
  363. }
  364. })
  365. })
  366. },
  367. onChange(index) {
  368. this.current = index;
  369. },
  370. showPopup() {
  371. this.show = true;
  372. },
  373. reload(){
  374. console.log("结束进入")
  375. getOutProjectDetail(this.id).then(response =>{
  376. this.detail=response.data
  377. this.getDicts("rollout_type").then(res =>{
  378. this.detail.rollout = this.selectDictLabel(res.data,response.data.rollout);
  379. if(this.detail.oneout==0){
  380. this.detail.oneout = "无"
  381. }else{
  382. this.detail.oneout = this.selectDictLabel(res.data,response.data.oneout);
  383. }
  384. })
  385. this.getDicts("project_type").then(res => {
  386. this.detail.projectNumber = this.selectDictLabel(res.data,response.data.projectNumber);
  387. });
  388. this.getDicts("sub_object_type").then(res => {
  389. // this.detail.projectType = this.selectDictLabel(res.data,response.data.projectType);
  390. });
  391. this.getDicts("economic_type").then(res => {
  392. this.detail.economicType = this.selectDictLabel(res.data,response.data.economicType);
  393. });
  394. this.getDicts("area_unit").then(res => {
  395. this.detail.allCountUnit = this.selectDictLabel(res.data,response.data.allCountUnit);
  396. });
  397. this.getDicts("bidding_type").then(res => {
  398. this.detail.biddingType = this.selectDictLabel(res.data,response.data.biddingType);
  399. });
  400. this.getDicts("bidding_direct").then(res => {
  401. this.detail.biddingDirect = this.selectDictLabel(res.data,response.data.biddingDirect);
  402. });
  403. this.getDicts("price_unit").then(res => {
  404. this.detail.unit = this.selectDictLabel(res.data,response.data.unit);
  405. });
  406. this.getDicts("payment_type").then(res => {
  407. this.detail.paymentType = this.selectDictLabel(res.data,response.data.paymentType);
  408. });
  409. for(let i of this.detail.subjectList){
  410. this.getDicts("area_unit").then(res => {
  411. i.areaUnit = this.selectDictLabel(res.data,i.areaUnit);
  412. });
  413. }
  414. var that = this;
  415. getBiddingList(that.id).then(response =>{
  416. that.biddinglistInformation = response.rows
  417. that.biddinglistInformationLength = response.total
  418. if (that.detail.biddingType == '阶梯竞价'){
  419. if (response.rows.length>0&&that.detail.ladderPrice){
  420. if (that.price == 0){return;}
  421. if (that.detail.biddingDirect == 2 ||that.detail.biddingDirect == '反向竞价') {
  422. that.price = parseFloat(response.rows[0].money - that.detail.ladderPrice).toFixed(2)
  423. }else{
  424. that.price = parseFloat(response.rows[0].money + that.detail.ladderPrice).toFixed(2)
  425. }
  426. }else if (response.rows.length>0&&!that.detail.ladderPrice){
  427. if (that.price == 0){return;}
  428. that.price = response.rows[0].money
  429. }else{
  430. if (that.detail.biddingDirect == 2 ||that.detail.biddingDirect == '反向竞价') {
  431. that.price = parseFloat(that.detail.price - that.detail.ladderPrice).toFixed(2)
  432. }else{
  433. that.price = parseFloat(that.detail.price + that.detail.ladderPrice).toFixed(2)
  434. }
  435. }
  436. }
  437. });
  438. let biddingStartTime = Date.parse(this.detail.biddingStartTime)+0
  439. let biddingStopTime = Date.parse(this.detail.biddingStopTime)+0
  440. let signupStartTime = Date.parse(this.detail.signupStartTime)+0
  441. let signupStopTime = Date.parse(this.detail.signupStopTime)+0
  442. let nowDate = Date.parse(new Date());
  443. if(signupStartTime>nowDate){
  444. console.log('未开始')
  445. this.process= "报名未开始"
  446. this.tip=this.detail.signupStartTime+"开始报名"
  447. this.btnMsg="立即报名"
  448. this.timeMsg="距报名开始"
  449. this.time = signupStartTime-nowDate
  450. this.isSignup=true
  451. }
  452. if(signupStopTime>nowDate&&signupStopTime>signupStartTime){
  453. console.log('报名中')
  454. this.process= "报名中"
  455. this.tip=this.detail.signupStopTime+"报名截止"
  456. this.btnMsg="立即报名"
  457. this.timeMsg="距报名截止"
  458. this.time = signupStopTime-nowDate
  459. getInfo().then(response => {
  460. let _this = this
  461. getMember(response.user.userId).then(res => {
  462. console.log(res)
  463. let data= {
  464. projectId:this.id,
  465. memberId:res.data.id,
  466. depositStatus:'1'
  467. };
  468. getSignup(data).then(r =>{
  469. if(r.data=="1"){
  470. _this.isSignup=true
  471. this.btnMsg="已报名"
  472. }
  473. })
  474. })
  475. })
  476. }
  477. if(biddingStartTime>nowDate&&nowDate>signupStopTime){
  478. console.log('竞价未开始')
  479. this.biddingTimeType = 3;
  480. this.process= "竞价未开始"
  481. this.tip=this.detail.biddingStartTime+"开始竞价"
  482. this.timeMsg="距竞价开始"
  483. this.time = biddingStartTime-nowDate
  484. getInfo().then(response => {
  485. let _this = this
  486. getMember(response.user.userId).then(res => {
  487. let data= {
  488. projectId:this.id,
  489. memberId:res.data.id,
  490. depositStatus:'1'
  491. };
  492. getSignup(data).then(r =>{
  493. if(r.data=="1"){
  494. _this.isSignup=true;
  495. this.btnMsg="立即竞价"
  496. // this.price=this.detail.ladderPrice?this.biddinglistInformation[0].money+this.detail.ladderPrice:this.biddinglistInformation[0].money+1
  497. }else{
  498. this.btnMsg="未报名"
  499. }
  500. })
  501. })
  502. })
  503. }
  504. if(biddingStopTime>nowDate&&nowDate>biddingStartTime){
  505. console.log('竞价中')
  506. this.biddingTimeType = 1;
  507. this.process= "竞价中"
  508. this.tip=this.detail.biddingStopTime+"结束竞价"
  509. this.timeMsg="距竞价结束"
  510. this.time = biddingStopTime-nowDate
  511. getInfo().then(response => {
  512. let _this = this
  513. this.userId=response.user.userId
  514. getMember(response.user.userId).then(res => {
  515. this.userAccount=res.data.phone
  516. this.userName=res.data.realname
  517. this.memberId=res.data.id
  518. let data= {
  519. projectId:this.id,
  520. memberId:res.data.id,
  521. depositStatus:'1'
  522. };
  523. getSignup(data).then(r =>{
  524. if(r.data=="1"){
  525. _this.isSignup=true
  526. this.btnMsg="立即竞价"
  527. this.showBtn=true
  528. _this.isFirst = r.signup.isFirst;
  529. // this.price=this.detail.ladderPrice?this.biddinglistInformation[0].money+this.detail.ladderPrice:this.biddinglistInformation[0].money+1
  530. }else{
  531. this.btnMsg="未报名"
  532. _this.isSignup=true
  533. }
  534. })
  535. })
  536. })
  537. this.timer = setInterval(function () {
  538. getBiddingList(that.id).then(response =>{
  539. that.biddinglistInformation = response.rows
  540. if((response.rows.length != that.biddinglistInformationLength) && that.detail.ladderPrice){
  541. if (that.detail.biddingDirect == 2 ||that.detail.biddingDirect == '反向竞价') {
  542. that.price = parseInt(response.rows[0].money) - parseInt(that.detail.ladderPrice)
  543. }else{
  544. that.price = parseInt(response.rows[0].money) + parseInt(that.detail.ladderPrice)
  545. }
  546. }
  547. that.biddinglistInformationLength = response.total
  548. });
  549. },10000)
  550. }
  551. if(nowDate>biddingStopTime){
  552. console.log('竞价结束')
  553. this.process= "竞价结束"
  554. this.tip=this.detail.biddingStopTime+"结束竞价"
  555. this.btnMsg="竞价结束"
  556. this.timeMsg="竞价结束"
  557. this.time = 0
  558. this.isSignup = true
  559. this.showBtn=false
  560. this.biddingTimeType = 2;
  561. }
  562. });
  563. getWebConfig().then(response =>{
  564. this.timeConfig = response.data[8].configValue;
  565. response.data.map(item =>{
  566. if(item.configKey=="cqjy.website.bidInfo"){
  567. this.webConfig = item.configValue
  568. }
  569. })
  570. });
  571. },
  572. offerFirst(){
  573. clearInterval(this.timer);
  574. let newMoney;
  575. projectNewBidMoney(this.id).then(response =>{
  576. if (response.data&&response.code==200){
  577. newMoney = response.data;
  578. }else{
  579. newMoney = this.detail.price;
  580. }
  581. let data= {
  582. projectId:this.id,
  583. memberId:this.memberId,
  584. userId:this.userId,
  585. userAccount:this.userAccount,
  586. userName:this.userName,
  587. money:parseFloat(newMoney),
  588. };
  589. biddingSubmit(data).then(response =>{
  590. let _this = this
  591. if(response){
  592. this.$toast({
  593. icon: 'success', // 找到自己需要的图标
  594. message: '出价成功',
  595. duration:"1000",
  596. onClose:function(){
  597. _this.reload()
  598. }
  599. })
  600. }
  601. })
  602. });
  603. },
  604. offer(){
  605. let newMoney;
  606. projectNewBidMoney(this.id).then(response =>{
  607. if (response.data&&response.code==200){
  608. newMoney = response.data;
  609. }else{
  610. newMoney = this.detail.price;
  611. }
  612. if (this.price==''||this.price==0||this.price<0||this.price == null){
  613. this.$toast({
  614. icon: 'fail', // 找到自己需要的图标
  615. message: '请输入出价金额',
  616. duration:"1000",
  617. onClose:function(){
  618. }
  619. })
  620. return;
  621. }
  622. if (this.detail.biddingDirect == '反向竞价'){
  623. // if (this.biddinglistInformation.length<1){
  624. if(this.detail.price<this.price){
  625. this.$toast({
  626. icon: 'fail', // 找到自己需要的图标
  627. message: '出价不能高于挂牌价格',
  628. duration:"1000",
  629. onClose:function(){
  630. }
  631. })
  632. return;
  633. }else{
  634. if (this.detail.biddingType=='阶梯竞价'||this.detail.biddingType=='公开竞价'){
  635. if (this.biddinglistInformation.length>1){
  636. //判断用户出价不能高于当前出价最低价格
  637. if(newMoney <= this.price){
  638. this.$toast({
  639. icon: 'fail', // 找到自己需要的图标
  640. message: '出价不能高于当前出价最低价格',
  641. duration:"1000",
  642. onClose:function(){
  643. }
  644. })
  645. return;
  646. }
  647. }
  648. }
  649. }
  650. }else{
  651. if(this.detail.price>this.price){
  652. this.$toast({
  653. icon: 'fail', // 找到自己需要的图标
  654. message: '出价不能低于挂牌价格',
  655. duration:"1000",
  656. onClose:function(){
  657. }
  658. })
  659. return;
  660. }else{
  661. if (this.detail.biddingType=='阶梯竞价'||this.detail.biddingType=='公开竞价'){
  662. if (this.biddinglistInformation.length>1){
  663. //判断用户出价不能高于当前出价最低价格
  664. console.log(newMoney)
  665. console.log(this.price)
  666. if(newMoney >= this.price){
  667. this.$toast({
  668. icon: 'fail', // 找到自己需要的图标
  669. message: '出价不能低于当前出价最高价格',
  670. duration:"1000",
  671. onClose:function(){
  672. }
  673. })
  674. return;
  675. }
  676. }
  677. }
  678. }
  679. }
  680. let data= {
  681. projectId:this.id,
  682. memberId:this.memberId,
  683. userId:this.userId,
  684. userAccount:this.userAccount,
  685. userName:this.userName,
  686. money:parseFloat(this.price),
  687. };
  688. console.log(data)
  689. biddingSubmit(data).then(response =>{
  690. let _this = this
  691. if(response){
  692. clearInterval(this.timer);
  693. this.$toast({
  694. icon: 'success', // 找到自己需要的图标
  695. message: '出价成功',
  696. duration:"1000",
  697. onClose:function(){
  698. clearInterval(this.timer);
  699. _this.reload()
  700. if (_this.detail.biddingType=='自由竞价'||_this.detail.biddingType=='公开竞价'){
  701. _this.price = null;
  702. }else{
  703. _this.price = _this.price-_this.detail.ladderPrice;
  704. }
  705. }
  706. })
  707. }
  708. })
  709. });
  710. },
  711. add(){
  712. if (this.detail.biddingDirect == '反向竞价'){
  713. if (this.biddinglistInformation.length<1){
  714. if(this.detail.price <= this.price){
  715. this.$toast({
  716. icon: 'fail', // 找到自己需要的图标
  717. message: '出价不能高于挂牌价格',
  718. duration:"1000",
  719. onClose:function(){
  720. }
  721. })
  722. return;
  723. }
  724. }else{
  725. if(this.biddinglistInformation[0].money <= (parseFloat(this.price)+parseFloat(this.detail.ladderPrice)).toFixed(2)){
  726. this.$toast({
  727. icon: 'fail', // 找到自己需要的图标
  728. message: '出价不能高于当前出价最低价格',
  729. duration:"1000",
  730. onClose:function(){
  731. }
  732. })
  733. return;
  734. }
  735. }
  736. }else{
  737. if (this.biddinglistInformation.length<1){
  738. if(this.detail.price>this.price){
  739. this.$toast({
  740. icon: 'fail', // 找到自己需要的图标
  741. message: '出价不能低于挂牌价格',
  742. duration:"1000",
  743. onClose:function(){
  744. }
  745. })
  746. return;
  747. }
  748. }else{
  749. if(this.biddinglistInformation[0].money>this.price){
  750. this.$toast({
  751. icon: 'fail', // 找到自己需要的图标
  752. message: '出价不能低于当前出价最高价格',
  753. duration:"1000",
  754. onClose:function(){
  755. }
  756. })
  757. return;
  758. }
  759. }
  760. }
  761. console.log(this.price == null)
  762. this.price == null?this.price = 0:this.price = this.price;
  763. this.detail.ladderPrice?this.price=(parseFloat(this.price)+parseFloat(this.detail.ladderPrice)).toFixed(2):this.price += 1
  764. },
  765. sub(){
  766. if (this.detail.biddingDirect == '反向竞价'){
  767. if (this.biddinglistInformation.length<1){
  768. if(this.detail.price<this.price){
  769. this.$toast({
  770. icon: 'fail', // 找到自己需要的图标
  771. message: '出价不能高于挂牌价格',
  772. duration:"1000",
  773. onClose:function(){
  774. }
  775. })
  776. return;
  777. }
  778. }else{
  779. if(this.biddinglistInformation[0].money<this.price){
  780. this.$toast({
  781. icon: 'fail', // 找到自己需要的图标
  782. message: '出价不能高于当前出价最低价格',
  783. duration:"1000",
  784. onClose:function(){
  785. }
  786. })
  787. return;
  788. }
  789. }
  790. }else{
  791. if (this.biddinglistInformation.length<1){
  792. if(this.detail.price>=this.price){
  793. this.$toast({
  794. icon: 'fail', // 找到自己需要的图标
  795. message: '出价不能低于挂牌价格',
  796. duration:"1000",
  797. onClose:function(){
  798. }
  799. })
  800. return;
  801. }
  802. }else{
  803. if(this.biddinglistInformation[0].money >= (parseFloat(this.price)-parseFloat(this.detail.ladderPrice)).toFixed(2)){
  804. this.$toast({
  805. icon: 'fail', // 找到自己需要的图标
  806. message: '出价不能低于当前出价最高价格',
  807. duration:"1000",
  808. onClose:function(){
  809. }
  810. })
  811. return;
  812. }
  813. }
  814. }
  815. this.price == null?this.price = 0:this.price = this.price;
  816. if (this.price == 0)return;
  817. this.detail.ladderPrice?this.price=(parseFloat(this.price)-parseFloat(this.detail.ladderPrice)).toFixed(2):this.price -= 1
  818. // if(this.detail.ladderPrice){
  819. // if((this.price-this.detail.ladderPrice)>this.biddinglistInformation[0].money){
  820. // this.price-=this.detail.ladderPrice
  821. // }else{
  822. // this.$toast({
  823. // icon: 'error', // 找到自己需要的图标
  824. // message: '出价不能低于当前最高价',
  825. // duration:"1000",
  826. // })
  827. // }
  828. // }else{
  829. // if((this.price-1)>this.biddinglistInformation[0].money){
  830. // this.price-=1
  831. // }else{
  832. // this.$toast({
  833. // icon: 'error', // 找到自己需要的图标
  834. // message: '出价不能低于当前最高价',
  835. // duration:"1000",
  836. // })
  837. // }
  838. // }
  839. },
  840. timerChange(value){
  841. let d = value.days;
  842. let h = value.hours;
  843. let m = value.minutes;
  844. let s = value.seconds;
  845. if (d==0 && h==0 && m<2){
  846. console.log("竞价剩余两分钟"+"m:"+m+"s:"+s)
  847. if (m == 0 && s==0){
  848. console.log("竞价结束22222222222")
  849. this.reload();
  850. }
  851. getBiddingList(this.id).then(response =>{
  852. this.biddinglistInformation = response.rows
  853. if (response.rows.length>this.biddinglistInformationLength){
  854. console.log("有人出价")
  855. this.biddinglistInformationLength = response.rows.length;
  856. this.time = 120000
  857. }
  858. });
  859. }
  860. }
  861. },
  862. destroyed () {
  863. console.log('bbbbbbbbbb')
  864. clearInterval(this.timer);
  865. },
  866. beforeDestory() {
  867. clearInterval(this.timer)
  868. },
  869. //离开页面清除定时器失效问题
  870. beforeRouteLeave (to, from, next) {
  871. console.log("我离开了")
  872. clearInterval(this.timer)
  873. next()
  874. }
  875. };
  876. </script>
  877. <style scoped lang="scss">
  878. .app-container {
  879. }
  880. .custom-indicator {
  881. position: absolute;
  882. right: 20px;
  883. bottom: 20px;
  884. padding: 0px 20px;
  885. font-size: 12px;
  886. /*rgba(0, 0, 0, 0.1)*/
  887. background: rgba(0, 0, 0, 0.2);
  888. color: #FFF;
  889. border-radius: 20px;
  890. line-height: 0.5rem;
  891. }
  892. .title{
  893. font-size: 0.45rem;
  894. }
  895. .my-swipe{
  896. width: 100%;
  897. }
  898. .my-swipe .van-swipe-item .van-image{
  899. width: 100%;
  900. }
  901. .information{
  902. background-color: #FFF;
  903. margin-top: 0.3rem;
  904. padding: 0.4rem 0.5rem;
  905. }
  906. .van-row{
  907. line-height: 0.7rem;
  908. }
  909. .price{
  910. color: #C21F3A;
  911. }
  912. .price span{
  913. font-size: 0.5rem;
  914. font-weight: bold;
  915. }
  916. .money{
  917. color: #C21F3A;
  918. }
  919. .money span{
  920. font-size: 0.5rem;
  921. font-weight: bold;
  922. }
  923. .van-count-down{
  924. line-height: 0.7rem;
  925. }
  926. .lead{
  927. background-color: #FFF;
  928. margin-top: 0.3rem;
  929. padding: 0.1rem 0.5rem;
  930. color: #C21F3A;
  931. }
  932. .detail{
  933. background-color: #FFF;
  934. margin-top: 0.3rem;
  935. padding: 0.2rem 0.5rem;
  936. }
  937. .detail span{
  938. color: #8A8A8A;
  939. }
  940. .delTitle{
  941. font-size: 0.4rem;
  942. color: #007E72;
  943. padding: 0.2rem 0.5rem;
  944. }
  945. .introduce{
  946. padding: 0.2rem 0.5rem 0.5rem;
  947. background-color: #FFF;
  948. }
  949. .introduce span{
  950. color: #8A8A8A;
  951. margin-right: 20px;
  952. }
  953. .project_info{
  954. border: 1px solid #DCDCDC;
  955. padding: 0px 20px;
  956. margin-top: 10px;
  957. border-radius: 10px;
  958. }
  959. .notice{
  960. padding: 0.5rem;
  961. background-color: #FFF;
  962. }
  963. .notice p{
  964. line-height: 0.7rem;
  965. }
  966. .biddingList{
  967. padding: 0.5rem;
  968. background-color: #FFF;
  969. margin-bottom: 0.4rem;
  970. }
  971. .biddingList table{
  972. text-align: center;
  973. }
  974. .biddingList table td{
  975. text-align: center;
  976. padding: 10px 0px;
  977. }
  978. .biddingList table tr:first-child td{
  979. background-color: #007E72;
  980. color: #FFF;
  981. }
  982. .bottomBtn{
  983. padding: 0.2rem 0.5rem;
  984. background-color: #FFF;
  985. position: fixed;
  986. bottom: 0;
  987. width: 100%;
  988. }
  989. .popup{
  990. text-align: center;
  991. padding: 0.5rem;
  992. border-radius: 20px;
  993. width: 70%;
  994. padding-top: 1.5rem;
  995. }
  996. .popupTit{
  997. color: #007E72;
  998. font-size: 0.4rem;
  999. line-height: 0.9rem;
  1000. }
  1001. .popupContent{
  1002. color: #666666;
  1003. }
  1004. .iKnow{
  1005. margin-top: 1rem;
  1006. }
  1007. .updatePopup{
  1008. color: #007E72;
  1009. margin-top: 0.5rem;
  1010. }
  1011. </style>