移动端
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.

projectDetail.vue 32 KiB

4 years ago
4 years ago
4 years ago
4 years ago
2 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
2 years ago
4 years ago
4 years ago
2 years ago
4 years ago
4 years ago
4 years ago
2 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
2 years ago
2 years ago
2 years ago
4 years ago
2 years ago
4 years ago
2 years ago
4 years ago
4 years ago
4 years ago
2 years ago
4 years ago
2 years ago
4 years ago
2 years ago
2 years ago
4 years ago
4 years ago
4 years ago
4 years ago
2 years ago
4 years ago
4 years ago
4 years ago
4 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
4 years ago
4 years ago
2 years ago
4 years ago
2 years ago
4 years ago
4 years ago
2 years ago
2 years ago
4 years ago
2 years ago
4 years ago
2 years ago
2 years ago
4 years ago
2 years ago
2 years ago
2 years ago
4 years ago
4 years ago
2 years ago
4 years ago
2 years ago
4 years ago
2 years ago
4 years ago
4 years ago
2 years ago
2 years ago
2 years ago
4 years ago
4 years ago
4 years ago
2 years ago
4 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937
  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.data&&response.code==200){
  534. newMoney = response.data;
  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. if (this.detail.biddingDirect == '反向竞价'){
  550. // if (this.biddinglistInformation.length<1){
  551. if(this.detail.price<this.price){
  552. this.$toast({
  553. icon: 'fail', // 找到自己需要的图标
  554. message: '出价不能高于挂牌价格',
  555. duration:"1000",
  556. onClose:function(){
  557. }
  558. })
  559. return;
  560. }else{
  561. if (this.detail.biddingType=='阶梯竞价'||this.detail.biddingType=='公开竞价'){
  562. if (this.biddinglistInformation.length>1){
  563. //判断用户出价不能高于当前出价最低价格
  564. if(newMoney <= this.price){
  565. this.$toast({
  566. icon: 'fail', // 找到自己需要的图标
  567. message: '出价不能高于当前出价最低价格',
  568. duration:"1000",
  569. onClose:function(){
  570. }
  571. })
  572. return;
  573. }
  574. }
  575. }
  576. }
  577. }else{
  578. if(this.detail.price>this.price){
  579. this.$toast({
  580. icon: 'fail', // 找到自己需要的图标
  581. message: '出价不能低于挂牌价格',
  582. duration:"1000",
  583. onClose:function(){
  584. }
  585. })
  586. return;
  587. }else{
  588. if (this.detail.biddingType=='阶梯竞价'||this.detail.biddingType=='公开竞价'){
  589. if (this.biddinglistInformation.length>1){
  590. //判断用户出价不能高于当前出价最低价格
  591. if(newMoney >= this.price){
  592. this.$toast({
  593. icon: 'fail', // 找到自己需要的图标
  594. message: '出价不能低于当前出价最高价格',
  595. duration:"1000",
  596. onClose:function(){
  597. }
  598. })
  599. return;
  600. }
  601. }
  602. }
  603. }
  604. }
  605. let data= {
  606. projectId:this.id,
  607. memberId:this.memberId,
  608. userId:this.userId,
  609. userAccount:this.userAccount,
  610. userName:this.userName,
  611. money:parseInt(this.price).toFixed(2),
  612. };
  613. console.log(data)
  614. biddingSubmit(data).then(response =>{
  615. let _this = this
  616. if(response){
  617. this.$toast({
  618. icon: 'success', // 找到自己需要的图标
  619. message: '出价成功',
  620. duration:"1000",
  621. onClose:function(){
  622. _this.reload()
  623. _this.price = _this.price-_this.detail.ladderPrice;
  624. }
  625. })
  626. }
  627. })
  628. },
  629. add(){
  630. if (this.detail.biddingDirect == '反向竞价'){
  631. if (this.biddinglistInformation.length<1){
  632. if(this.detail.price <= this.price){
  633. this.$toast({
  634. icon: 'fail', // 找到自己需要的图标
  635. message: '出价不能高于挂牌价格',
  636. duration:"1000",
  637. onClose:function(){
  638. }
  639. })
  640. return;
  641. }
  642. }else{
  643. if(this.biddinglistInformation[0].money <= (parseInt(this.price)+parseInt(this.detail.ladderPrice))){
  644. this.$toast({
  645. icon: 'fail', // 找到自己需要的图标
  646. message: '出价不能高于当前出价最低价格',
  647. duration:"1000",
  648. onClose:function(){
  649. }
  650. })
  651. return;
  652. }
  653. }
  654. }else{
  655. if (this.biddinglistInformation.length<1){
  656. if(this.detail.price>=this.price){
  657. this.$toast({
  658. icon: 'fail', // 找到自己需要的图标
  659. message: '出价不能低于挂牌价格',
  660. duration:"1000",
  661. onClose:function(){
  662. }
  663. })
  664. return;
  665. }
  666. }else{
  667. if(this.biddinglistInformation[0].money>=this.price){
  668. this.$toast({
  669. icon: 'fail', // 找到自己需要的图标
  670. message: '出价不能低于当前出价最高价格',
  671. duration:"1000",
  672. onClose:function(){
  673. }
  674. })
  675. return;
  676. }
  677. }
  678. }
  679. console.log(this.price == null)
  680. this.price == null?this.price = 0:this.price = this.price;
  681. this.detail.ladderPrice?this.price=parseInt(this.price)+parseInt(this.detail.ladderPrice):this.price += 1
  682. },
  683. sub(){
  684. if (this.detail.biddingDirect == '反向竞价'){
  685. if (this.biddinglistInformation.length<1){
  686. if(this.detail.price<=this.price){
  687. this.$toast({
  688. icon: 'fail', // 找到自己需要的图标
  689. message: '出价不能高于挂牌价格',
  690. duration:"1000",
  691. onClose:function(){
  692. }
  693. })
  694. return;
  695. }
  696. }else{
  697. if(this.biddinglistInformation[0].money<this.price){
  698. this.$toast({
  699. icon: 'fail', // 找到自己需要的图标
  700. message: '出价不能高于当前出价最低价格',
  701. duration:"1000",
  702. onClose:function(){
  703. }
  704. })
  705. return;
  706. }
  707. }
  708. }else{
  709. if (this.biddinglistInformation.length<1){
  710. if(this.detail.price>=this.price){
  711. this.$toast({
  712. icon: 'fail', // 找到自己需要的图标
  713. message: '出价不能低于挂牌价格',
  714. duration:"1000",
  715. onClose:function(){
  716. }
  717. })
  718. return;
  719. }
  720. }else{
  721. if(this.biddinglistInformation[0].money>=(parseInt(this.price)-parseInt(this.detail.ladderPrice))){
  722. this.$toast({
  723. icon: 'fail', // 找到自己需要的图标
  724. message: '出价不能低于当前出价最高价格',
  725. duration:"1000",
  726. onClose:function(){
  727. }
  728. })
  729. return;
  730. }
  731. }
  732. }
  733. this.price == null?this.price = 0:this.price = this.price;
  734. if (this.price == 0)return;
  735. this.detail.ladderPrice?this.price=parseInt(this.price)-parseInt(this.detail.ladderPrice):this.price -= 1
  736. // if(this.detail.ladderPrice){
  737. // if((this.price-this.detail.ladderPrice)>this.biddinglistInformation[0].money){
  738. // this.price-=this.detail.ladderPrice
  739. // }else{
  740. // this.$toast({
  741. // icon: 'error', // 找到自己需要的图标
  742. // message: '出价不能低于当前最高价',
  743. // duration:"1000",
  744. // })
  745. // }
  746. // }else{
  747. // if((this.price-1)>this.biddinglistInformation[0].money){
  748. // this.price-=1
  749. // }else{
  750. // this.$toast({
  751. // icon: 'error', // 找到自己需要的图标
  752. // message: '出价不能低于当前最高价',
  753. // duration:"1000",
  754. // })
  755. // }
  756. // }
  757. },
  758. timerChange(value){
  759. let d = value.days;
  760. let h = value.hours;
  761. let m = value.minutes;
  762. let s = value.seconds;
  763. if (d==0 && h==0 && m<2){
  764. console.log("竞价剩余两分钟"+"m:"+m+"s:"+s)
  765. if (m == 0 && s==0){
  766. console.log("竞价结束22222222222")
  767. this.reload();
  768. }
  769. getBiddingList(this.id).then(response =>{
  770. this.biddinglistInformation = response.rows
  771. if (response.rows.length>this.biddinglistInformationLength){
  772. console.log("有人出价")
  773. this.biddinglistInformationLength = response.rows.length;
  774. this.time = 120000
  775. }
  776. });
  777. }
  778. }
  779. }
  780. };
  781. </script>
  782. <style scoped lang="scss">
  783. .app-container {
  784. }
  785. .custom-indicator {
  786. position: absolute;
  787. right: 20px;
  788. bottom: 20px;
  789. padding: 0px 20px;
  790. font-size: 12px;
  791. /*rgba(0, 0, 0, 0.1)*/
  792. background: rgba(0, 0, 0, 0.2);
  793. color: #FFF;
  794. border-radius: 20px;
  795. line-height: 0.5rem;
  796. }
  797. .title{
  798. font-size: 0.45rem;
  799. }
  800. .my-swipe{
  801. width: 100%;
  802. }
  803. .my-swipe .van-swipe-item .van-image{
  804. width: 100%;
  805. }
  806. .information{
  807. background-color: #FFF;
  808. margin-top: 0.3rem;
  809. padding: 0.4rem 0.5rem;
  810. }
  811. .van-row{
  812. line-height: 0.7rem;
  813. }
  814. .price{
  815. color: #C21F3A;
  816. }
  817. .price span{
  818. font-size: 0.5rem;
  819. font-weight: bold;
  820. }
  821. .money{
  822. color: #C21F3A;
  823. }
  824. .money span{
  825. font-size: 0.5rem;
  826. font-weight: bold;
  827. }
  828. .van-count-down{
  829. line-height: 0.7rem;
  830. }
  831. .lead{
  832. background-color: #FFF;
  833. margin-top: 0.3rem;
  834. padding: 0.1rem 0.5rem;
  835. color: #C21F3A;
  836. }
  837. .detail{
  838. background-color: #FFF;
  839. margin-top: 0.3rem;
  840. padding: 0.2rem 0.5rem;
  841. }
  842. .detail span{
  843. color: #8A8A8A;
  844. }
  845. .delTitle{
  846. font-size: 0.4rem;
  847. color: #007E72;
  848. padding: 0.2rem 0.5rem;
  849. }
  850. .introduce{
  851. padding: 0.2rem 0.5rem 0.5rem;
  852. background-color: #FFF;
  853. }
  854. .introduce span{
  855. color: #8A8A8A;
  856. margin-right: 20px;
  857. }
  858. .project_info{
  859. border: 1px solid #DCDCDC;
  860. padding: 0px 20px;
  861. margin-top: 10px;
  862. border-radius: 10px;
  863. }
  864. .notice{
  865. padding: 0.5rem;
  866. background-color: #FFF;
  867. }
  868. .notice p{
  869. line-height: 0.7rem;
  870. }
  871. .biddingList{
  872. padding: 0.5rem;
  873. background-color: #FFF;
  874. margin-bottom: 0.4rem;
  875. }
  876. .biddingList table{
  877. text-align: center;
  878. }
  879. .biddingList table td{
  880. text-align: center;
  881. padding: 10px 0px;
  882. }
  883. .biddingList table tr:first-child td{
  884. background-color: #007E72;
  885. color: #FFF;
  886. }
  887. .bottomBtn{
  888. padding: 0.2rem 0.5rem;
  889. background-color: #FFF;
  890. position: fixed;
  891. bottom: 0;
  892. width: 100%;
  893. }
  894. .popup{
  895. text-align: center;
  896. padding: 0.5rem;
  897. border-radius: 20px;
  898. width: 70%;
  899. padding-top: 1.5rem;
  900. }
  901. .popupTit{
  902. color: #007E72;
  903. font-size: 0.4rem;
  904. line-height: 0.9rem;
  905. }
  906. .popupContent{
  907. color: #666666;
  908. }
  909. .iKnow{
  910. margin-top: 1rem;
  911. }
  912. .updatePopup{
  913. color: #007E72;
  914. margin-top: 0.5rem;
  915. }
  916. </style>