移动端
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

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