renewal.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714
  1. <template>
  2. <view class="container" :class="[AppTheme]">
  3. <view class="parcel_information" v-if="orderdeleti">
  4. <view class="mess_deitle_1">
  5. <view class="soil_mass">
  6. <image mode="aspectFill" :src="orderdeleti.soil_cover_pic"></image>
  7. </view>
  8. <view class="soil_mass_1">
  9. <view class="soil_mass_2">{{ orderdeleti.soil_name }} {{orderdeleti.subdivision.name}}</view>
  10. <view class="soil_mass_3">{{orderdeleti.subdivision.name}} {{orderdeleti.serve_name}}
  11. {{orderdeleti.subdivision.area}} m²
  12. </view>
  13. </view>
  14. </view>
  15. <view class="mess_deitle_2">
  16. <view class="farm_name">续租服务</view>
  17. <view class="bor_solp"></view>
  18. <view class="box_form_1">
  19. <view class="titem" v-for="(item, index) in orderdeleti.period" :key="index">
  20. <view class="titems">
  21. <view class="titem_1">
  22. <view class="titem_2">{{item.periodname}}</view>
  23. </view>
  24. <view class="titem_3">
  25. <u-radio-group v-model="value" iconPlacement="right">
  26. <u-radio size="18" :labelDisabled="true" :label="item.content" labelSize='14'
  27. iconSize='11' :name="index" @change="radioChange"></u-radio>
  28. </u-radio-group>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. <view class="page-bottom">
  36. <view class="page-bottom_1">
  37. <view class="p-b-btn">
  38. <view class="setnt_inion_p1">合计:</view>
  39. <view class="setnt_inion_p2 text-neutral">¥{{ parseFloat(totalpricenum).toFixed(2) }}</view>
  40. </view>
  41. </view>
  42. <view class="action-btn-group"><button type="primary"
  43. class=" bg-linear-gradient action-btn no-border buy-now-btn" @click="settlement">立即支付</button>
  44. </view>
  45. </view>
  46. <payment ref="payment" :channel="6" :alipay="true" :weixinpay="true" :zhtpay="true"></payment>
  47. </view>
  48. </template>
  49. <script>
  50. import Landapi from '@/api/land/index.js';
  51. export default {
  52. data() {
  53. return {
  54. primary: this.$theme.primary,
  55. settingFile: getApp().globalData.siteinfo,
  56. //顶部距离
  57. scrollTop: 0,
  58. orderdeleti: null,
  59. customstyle: {
  60. background: '#F4F6F8'
  61. },
  62. wxpay: '微信支付',
  63. yepay: '余额支付',
  64. servicemess: [],
  65. logo: '',
  66. name: '',
  67. value: '',
  68. totalpricenum: 0,
  69. serve_price: '',
  70. price: '',
  71. days: '',
  72. updaordermess: {},
  73. yuantotalprice: ''
  74. };
  75. },
  76. onLoad(options) {
  77. this.lookorderbyid(options.orderid);
  78. },
  79. methods: {
  80. radioChange(e) {
  81. let that = this;
  82. that.value = that.orderdeleti.period[e]['content'];
  83. that.days = that.orderdeleti.period[e]['days'];
  84. that.totalpricenums = parseFloat(that.price) + that.serve_price * that.days;
  85. that.totalpricenum = parseFloat(that.totalpricenums * (that.orderdeleti.level_radio / 100)).toFixed(2);
  86. that.yuantotalprice = parseFloat(that.totalpricenums);
  87. },
  88. //根据id获取订单信息
  89. lookorderbyid(orderid) {
  90. let that = this;
  91. let parms = {
  92. id: orderid
  93. };
  94. Landapi.renewal(parms).then(res => {
  95. console.log(res, "订单信息")
  96. if (res.status == 1) {
  97. that.orderdeleti = res.data;
  98. that.serve_price = res.data.serve_price;
  99. that.price = res.data.subdivision.price;
  100. } else {
  101. that.$api.msg(res.msg);
  102. }
  103. });
  104. },
  105. settlement() {
  106. let that = this
  107. let tmplIdsone = that.$config.temlist;
  108. if (tmplIdsone) {
  109. that.$until.requestSubscribeMessage([tmplIdsone['orderSuccess']], tmplIdsone, function() {
  110. that.settlement2()
  111. });
  112. } else {
  113. that.settlement2()
  114. }
  115. },
  116. // 结算订单
  117. settlement2() {
  118. var that = this;
  119. if (!that.days) {
  120. uni.showToast({
  121. title: "请选择续租时间",
  122. icon: "none"
  123. })
  124. return false
  125. }
  126. //土地id赋值
  127. that.updaordermess.soil_id = that.orderdeleti.soil_id;
  128. // 选中地块id
  129. that.updaordermess.subdivision_id = that.orderdeleti.subdivision_id;
  130. //订单金额
  131. that.updaordermess.order_money = that.totalpricenum;
  132. // 服务id
  133. that.updaordermess.service_id = that.orderdeleti.service_id;
  134. //订单号
  135. that.updaordermess.order_sn = that.orderdeleti.order_sn;
  136. that.updaordermess.type = 1;
  137. that.updaordermess.orderid = that.orderdeleti.id;
  138. // 租赁周期
  139. that.updaordermess.period_days = that.days;
  140. that.updaordermess.payprice = that.totalpricenum;
  141. that.updaordermess.money = that.totalpricenum;
  142. that.updaordermess.yuantotalprice = that.yuantotalprice
  143. if (that.updaordermess.id) {
  144. that.$refs.payment.payopen(that.updaordermess);
  145. } else {
  146. that.$paycenter.ct_renewal_order(that.updaordermess).then(res => {
  147. if (res.status === 0) {
  148. uni.showToast({
  149. title: res.msg,
  150. icon: 'none'
  151. })
  152. } else {
  153. // 已授权,跳转去支付页面
  154. that.updaordermess.id = res.data;
  155. that.$refs.payment.payopen(that.updaordermess);
  156. }
  157. })
  158. }
  159. },
  160. }
  161. };
  162. </script>
  163. <style lang="scss">
  164. table {
  165. width: 100%;
  166. border-color: #DFE2E5;
  167. border-collapse: collapse;
  168. text-align: center;
  169. color: #303133;
  170. }
  171. table,
  172. th,
  173. td {
  174. border: 1px solid #999;
  175. padding: 10rpx;
  176. }
  177. .container {
  178. position: relative;
  179. }
  180. .head_backn {
  181. width: 100%;
  182. z-index: 99;
  183. padding: 20rpx 20rpx 0rpx 20rpx;
  184. .icon_view {
  185. width: 100%;
  186. text-align: center;
  187. margin-top: 10rpx;
  188. }
  189. }
  190. /* 底部操作菜单 */
  191. .page-bottom {
  192. position: fixed;
  193. left: 0;
  194. bottom: 0;
  195. z-index: 95;
  196. display: flex;
  197. // justify-content: center;
  198. justify-content: space-evenly;
  199. align-items: center;
  200. width: 100%;
  201. height: 140upx;
  202. background: rgba(255, 255, 255, 0.9);
  203. box-shadow: 0 0 20upx 0 rgba(0, 0, 0, 0.5);
  204. .page-bottom_1 {
  205. display: flex;
  206. flex-direction: column;
  207. .p-b-btn {
  208. display: flex;
  209. align-items: center;
  210. justify-content: flex-start;
  211. font-size: 35rpx;
  212. width: 100%;
  213. height: 80upx;
  214. .yticon {
  215. font-size: 40upx;
  216. line-height: 48upx;
  217. color: $font-color-light;
  218. }
  219. &.active,
  220. &.active .yticon {
  221. color: $tab-color-1;
  222. }
  223. .icon-fenxiang2 {
  224. font-size: 42upx;
  225. transform: translateY(-2upx);
  226. }
  227. .icon-shoucang {
  228. font-size: 46upx;
  229. }
  230. }
  231. .page-bottom_2 {
  232. display: flex;
  233. justify-content: flex-start;
  234. font-size: 29rpx;
  235. }
  236. }
  237. .action-btn-group {
  238. display: flex;
  239. height: 76upx;
  240. border-radius: 100px;
  241. overflow: hidden;
  242. box-shadow: 0 20upx 40upx -16upx #fa436a;
  243. box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
  244. margin-left: 20upx;
  245. position: relative;
  246. .action-btn {
  247. display: flex;
  248. align-items: center;
  249. justify-content: center;
  250. width: 300rpx;
  251. height: 100%;
  252. font-size: $font-base;
  253. padding: 0;
  254. border-radius: 0;
  255. }
  256. }
  257. }
  258. .parcel_information {
  259. padding-top: 20rpx;
  260. }
  261. .mess_deitle {
  262. width: 100%;
  263. padding: 30rpx 0;
  264. margin: 25rpx 0;
  265. background-color: #ffffff;
  266. box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.08);
  267. border-radius: 15rpx;
  268. }
  269. .mess_deitle_2 {
  270. width: 95%;
  271. padding: 20rpx 0;
  272. margin: 25rpx 0;
  273. background-color: #ffffff;
  274. border-radius: 15rpx;
  275. margin-left: 2.5%;
  276. .farm_name_1 {
  277. display: flex;
  278. justify-content: space-between;
  279. align-items: center;
  280. padding: 0 20rpx;
  281. .farm_name_2 {
  282. font-size: 38rpx;
  283. }
  284. .farm_name_3 {
  285. display: flex;
  286. justify-content: flex-start;
  287. align-items: center;
  288. color: #999;
  289. font-size: 28rpx;
  290. margin-right: 2vh;
  291. }
  292. }
  293. .titems_one {
  294. display: flex;
  295. justify-content: space-between;
  296. align-items: center;
  297. .titems_one_1 {
  298. display: flex;
  299. justify-content: flex-start;
  300. align-items: center;
  301. padding: 0 20rpx;
  302. image {
  303. background-color: #DFE2E5;
  304. width: 150rpx;
  305. height: 150rpx;
  306. }
  307. .titems_one_2 {
  308. margin-left: 2vh;
  309. font-size: 30rpx;
  310. font-weight: 600;
  311. }
  312. }
  313. .titems_one_3 {
  314. display: flex;
  315. justify-content: flex-start;
  316. align-items: center;
  317. margin-right: 4vh;
  318. font-size: 30rpx;
  319. color: #999;
  320. }
  321. }
  322. }
  323. .mess_deitle_3 {
  324. width: 100%;
  325. padding: 20rpx 0;
  326. margin: 25rpx 0;
  327. background-color: #ffffff;
  328. .farm_name_1 {
  329. display: flex;
  330. justify-content: space-between;
  331. align-items: center;
  332. padding: 0 20rpx;
  333. .farm_name_2 {
  334. font-size: 38rpx;
  335. }
  336. .farm_name_3 {
  337. display: flex;
  338. justify-content: flex-start;
  339. align-items: center;
  340. color: #999;
  341. font-size: 28rpx;
  342. margin-right: 2vh;
  343. }
  344. }
  345. .tab_vie {
  346. text-align: center;
  347. padding: 30rpx 0;
  348. }
  349. }
  350. .mess_deitle_4 {
  351. width: 100%;
  352. padding: 20rpx 0;
  353. margin: 25rpx 0;
  354. background-color: #ffffff;
  355. .farm_name_4 {
  356. display: flex;
  357. justify-content: space-between;
  358. align-items: center;
  359. padding: 0 20rpx;
  360. .farm_name_5 {
  361. display: flex;
  362. justify-content: flex-start;
  363. align-items: center;
  364. image {
  365. width: 50rpx;
  366. height: 50rpx;
  367. }
  368. font-size: 32rpx;
  369. }
  370. .farm_name_6 {
  371. display: flex;
  372. justify-content: flex-start;
  373. align-items: center;
  374. color: #999;
  375. font-size: 26rpx;
  376. margin-right: 2vh;
  377. }
  378. }
  379. }
  380. .mess_deitle_1 {
  381. width: 90%;
  382. padding: 20rpx;
  383. border-radius: 10rpx;
  384. background-color: #ffffff;
  385. box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.08);
  386. margin-left: 2.5%;
  387. display: flex;
  388. justify-content: flex-start;
  389. align-items: center;
  390. .soil_mass {
  391. image {
  392. width: 150rpx;
  393. height: 150rpx;
  394. }
  395. }
  396. .soil_mass_1 {
  397. margin-left: 2vh;
  398. display: flex;
  399. justify-content: flex-start;
  400. align-items: flex-end;
  401. flex-wrap: wrap;
  402. .soil_mass_2 {
  403. color: #3f3f3f;
  404. font-size: 32rpx;
  405. font-weight: 600;
  406. -webkit-line-clamp: 2;
  407. display: -webkit-box;
  408. -webkit-box-orient: vertical;
  409. overflow: hidden;
  410. text-overflow: ellipsis;
  411. }
  412. .soil_mass_3 {
  413. font-size: 28rpx;
  414. color: #999;
  415. padding: 30rpx 0;
  416. }
  417. .soil_mass_4 {
  418. background-color: palegreen;
  419. width: 90rpx;
  420. line-height: 40rpx;
  421. text-align: center;
  422. border-radius: 10rpx;
  423. font-size: 26rpx;
  424. color: #fff;
  425. }
  426. }
  427. .soil_mass_5 {
  428. margin-left: 9vh;
  429. font-weight: 600;
  430. }
  431. }
  432. .order_item {
  433. width: 100%;
  434. margin: 25rpx 0;
  435. padding: 30rpx 0;
  436. background-color: #ffffff;
  437. box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.08);
  438. }
  439. .farm_name {
  440. font-size: 32rpx;
  441. color: #000;
  442. padding: 0 20rpx;
  443. }
  444. .bor_solp {
  445. background-color: #999;
  446. height: 1rpx;
  447. width: 100%;
  448. transform: scaleY(0.3);
  449. margin: 25rpx 0;
  450. }
  451. .order_detil {
  452. padding: 0 20rpx;
  453. text-align: center;
  454. }
  455. .seed_item_thumbnail {
  456. object-fit: cover;
  457. border-radius: 10rpx;
  458. width: 100%;
  459. height: 300rpx;
  460. }
  461. .right_deile {
  462. width: 100%;
  463. }
  464. .article_title_p2 {
  465. font-size: 26rpx;
  466. color: #000;
  467. margin: 15rpx 0;
  468. }
  469. .box_form {
  470. margin: 0 5%;
  471. width: 95%;
  472. }
  473. .box_form_1 {
  474. padding: 20rpx;
  475. .titem {
  476. display: flex;
  477. flex-direction: column;
  478. .titems {
  479. display: flex;
  480. justify-content: space-between;
  481. padding: 20rpx 0;
  482. .titem_1 {
  483. display: flex;
  484. justify-content: flex-start;
  485. align-items: center;
  486. image {
  487. width: 150rpx;
  488. height: 150rpx;
  489. }
  490. .titem_2 {
  491. margin-left: 2vh;
  492. font-size: 32rpx;
  493. }
  494. }
  495. .titem_3 {
  496. margin-left: 1vh;
  497. }
  498. }
  499. .titem_3 {
  500. display: flex;
  501. justify-content: flex-start;
  502. align-items: center;
  503. margin-right: 2vh;
  504. color: #999;
  505. font-size: 28rpx;
  506. .titem_4 {}
  507. .titem_5 {
  508. size: 18rpx;
  509. }
  510. }
  511. }
  512. }
  513. .u-border-bottom:after,
  514. .u-border-left:after,
  515. .u-border-right:after,
  516. .u-border-top-bottom:after,
  517. .u-border-top:after,
  518. .u-border:after {
  519. border-bottom-color: #999;
  520. }
  521. .tab_vie {
  522. padding-left: 15rpx;
  523. padding-right: 15rpx;
  524. .theard {
  525. display: flex;
  526. padding: 10rpx;
  527. justify-content: space-evenly;
  528. // background-color: #d5d5d5;
  529. }
  530. .titem {
  531. display: flex;
  532. padding-top: 25rpx;
  533. font-size: 26rpx;
  534. color: #767676;
  535. justify-content: space-evenly;
  536. .titem_1 {
  537. image {
  538. width: 150rpx;
  539. height: 150rpx;
  540. }
  541. }
  542. }
  543. .td {
  544. width: 25%;
  545. text-align: center;
  546. }
  547. }
  548. .all_box {
  549. padding: 0 5%;
  550. background-color: #ffffff;
  551. .time_1 {
  552. float: right;
  553. margin-top: 20px;
  554. color: #999;
  555. font-size: 25rpx;
  556. }
  557. .album {
  558. @include flex;
  559. align-items: flex-start;
  560. &__avatar {
  561. background-color: $u-bg-color;
  562. padding: 5px;
  563. border-radius: 3px;
  564. }
  565. &__content {
  566. margin-left: 10px;
  567. flex: 1;
  568. }
  569. }
  570. }
  571. .u-node {
  572. width: 44rpx;
  573. height: 44rpx;
  574. border-radius: 100rpx;
  575. display: flex;
  576. justify-content: center;
  577. align-items: center;
  578. background: #d0d0d0;
  579. }
  580. .u-order-title {
  581. color: #333333;
  582. font-weight: bold;
  583. font-size: 28rpx;
  584. }
  585. .u-order-desc {
  586. color: rgb(150, 150, 150);
  587. font-size: 26rpx;
  588. margin: 15rpx 0;
  589. }
  590. .u-order-time {
  591. font-size: 26rpx;
  592. color: #000;
  593. }
  594. .imgitem {
  595. width: 120rpx;
  596. height: 120rpx;
  597. }
  598. .wl_statui {
  599. color: #2979ff;
  600. width: 100%;
  601. padding-top: 5rpx;
  602. padding-bottom: 5rpx;
  603. font-size: 22rpx;
  604. background-color: rgba(41, 121, 255, 0.2);
  605. line-height: 27rpx;
  606. }
  607. </style>