orderStatus.vue 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093
  1. <template>
  2. <view class="container-view">
  3. <view class="time-info">
  4. <navBar bgColor="transparent" left="0"></navBar>
  5. <view>
  6. <view v-if="orderInfo.pay_status!=2">
  7. <view class="get-time-view flex-row" v-if="orderInfo.pay_status == 0">{{ $t('待支付') }}</view>
  8. <view class="get-time-view flex-row" v-else-if="orderInfo.pay_status == 1">{{ $t('支付中') }}</view>
  9. <view class="get-time-view flex-row" v-else-if="orderInfo.pay_status == 3">{{ $t('支付失败') }}</view>
  10. <view class="get-time-view flex-row" v-else-if="orderInfo.pay_status == 4">{{ $t('支付取消') }}</view>
  11. <view class="get-time-view flex-row" v-else-if="orderInfo.pay_status == 5">{{ $t('线下待审核') }}</view>
  12. <view class="get-time-view flex-row" v-else-if="orderInfo.pay_status == 6">{{ $t('线下审核拒绝') }}</view>
  13. </view>
  14. <block v-if="orderInfo.pay_status == 2">
  15. <view :class="['get-time-view', 'flex-row', 'blue-text']" v-if="orderInfo.order_status == 3">{{ $t('使用中') }}...
  16. </view>
  17. <view :class="['get-time-view', 'flex-row', 'red-text']" v-if="orderInfo.order_status == 4">{{ $t('已逾期') }}
  18. </view>
  19. <view class="get-time-view flex-row" v-if="orderInfo.order_status == 2">{{ $t('请上传车辆图片激活车辆') }}</view>
  20. <view class="get-time-view flex-row" v-if="orderInfo.order_status == 5">{{ $t('待门店确认') }}</view>
  21. <view class="get-time-view flex-row" v-if="orderInfo.order_status == 6">{{ $t('还车中') }},{{ $t('等待门店取车') }}</view>
  22. <view class="get-time-view flex-row" v-if="orderInfo.order_status == 7">{{ $t('已完成') }}</view>
  23. <view class="get-time-view flex-row"
  24. v-if="orderInfo.order_status == 8||orderInfo.order_status == 9">{{ $t('已取消') }}</view>
  25. <view class="get-time-view flex-row" v-if="orderInfo.order_status == 1 "><text>{{ $t('请于') }}</text><text
  26. class="get-car-time">{{tools.formatTimeSecond( orderInfo.pick_up_time)}}</text><text>{{ $t('到门店取车') }}</text>
  27. </view>
  28. <view v-if="orderInfo.order_status == 10">{{ $t('已完结') }}</view>
  29. </block>
  30. </view>
  31. <view class="time-money">
  32. <view v-if="orderInfo.order_type != 3" class="flex-row flex-between">
  33. <view class="money-item">
  34. <view :class="orderInfo.order_status == 4?'red-status':''">
  35. <block v-if="orderInfo.hire_duration_time">{{orderInfo.hire_duration_time}}</block>
  36. <block v-else>{{Number(orderInfo.hire_cycle) * (orderInfo.hire_duration)}}</block>
  37. </view>
  38. <view>{{((orderInfo.order_status == 2) || orderInfo.order_status == 3)?$t('租期剩余'):(orderInfo.order_status == 4 ? $t('逾期时长'):$t('租借周期'))}}·<text style="opacity: 0.4;">{{leaseUnits(orderInfo.hire_duration_unit)}}</text></view>
  39. <!-- <view v-if="(orderInfo.order_status == 2&&orderInfo.hire_type==2) || orderInfo.order_status == 3">
  40. {{ $t('租期剩余') }}·{{ $t('天') }}</view>
  41. <view v-else-if="orderInfo.order_status == 4 " class="red-status">{{ $t('逾期时长') }}·{{ $t('天') }}</view>
  42. <view v-else>{{ $t('租借周期') }}·{{ $t('天') }}</view> -->
  43. </view>
  44. <view v-if="orderInfo.order_status != 4" class="money-item">
  45. <view>
  46. {{(orderInfo.hire_money + orderInfo.deposit / 100).toFixed(2)}}
  47. </view>
  48. <view>{{ $t('订单金额') }}<text style="opacity: 0.4;">·$</text></view>
  49. </view>
  50. <view v-if="orderInfo.order_status == 4" class="money-item">
  51. <view style="color:#F95151" class="red-status">
  52. {{(orderInfo.money / 100).toFixed(2)}}
  53. </view>
  54. <view style="color:#F95151">{{ $t('逾期金额') }}·$</view>
  55. </view>
  56. <view @tap="bindExpanded">
  57. <text>{{isExpanded?$t('收起'): $t('展开')}}</text>
  58. <img
  59. :src="isExpanded?'https://qiniu.bms16.com/FvRah8ro91B_TUVEmInBq6n69W2f':'https://qiniu.bms16.com/FtbxPP0aXYG8hyJTEJfNTXa_Puuc'" />
  60. </view>
  61. </view>
  62. <view v-if="orderInfo.order_type == 3" class="flex-row flex-between">
  63. <view class="money-item">
  64. <view></view>
  65. <view>{{ $t('租借周期:购买') }}</view>
  66. </view>
  67. <view class="money-item">
  68. <view :class="orderInfo.order_status == 4?'red-status':''">
  69. {{orderInfo.order_status == 4?tools.toFix(over_fee/100):tools.toFix(orderInfo.money / 100)}}<text>{{ $t('元') }}</text>
  70. </view>
  71. <view>{{ $t('订单金额') }}</view>
  72. </view>
  73. <view @tap="bindExpanded">
  74. <text>{{isExpanded?$t('收起'):$t('展开')}}</text>
  75. <img
  76. :src="isExpanded?'https://qiniu.bms16.com/FvRah8ro91B_TUVEmInBq6n69W2f':'https://qiniu.bms16.com/FtbxPP0aXYG8hyJTEJfNTXa_Puuc'" />
  77. </view>
  78. </view>
  79. <view v-if="isExpanded" class="dashed-border"></view>
  80. <view v-if="isExpanded">
  81. <view class="big-text">{{ $t('订单信息') }}</view>
  82. <view class="sn-content flex-row flex-between">
  83. <view class="sn-title">{{ $t('订单编号') }}</view>
  84. <view class="sn-text">{{orderInfo.sub_sn}}</view>
  85. </view>
  86. <view class="sn-content flex-row flex-between">
  87. <view class="sn-title">{{ $t('下单时间') }}</view>
  88. <view class="sn-text">{{tools.formatTime(orderInfo.ctime)}}</view>
  89. </view>
  90. <view v-if="orderInfo.pay_time" class="sn-content flex-row flex-between">
  91. <view class="sn-title">{{ $t('支付时间') }}</view>
  92. <view class="sn-text">{{tools.formatTime(orderInfo.pay_time)}}</view>
  93. </view>
  94. <view class="sn-content flex-row flex-between">
  95. <view class="sn-title">{{ $t('支付方式') }}</view>
  96. <view v-if="orderInfo.pay_type == 0" class="sn-text">{{ $t('微信支付') }}</view>
  97. <view v-if="orderInfo.pay_type == 1" class="sn-text">{{ $t('线下支付') }}</view>
  98. <view v-if="orderInfo.pay_type == 2" class="sn-text">{{ $t('支付宝支付') }}</view>
  99. <view v-if="orderInfo.pay_type == 9" class="sn-text">{{ $t('钱包余额支付') }}</view>
  100. </view>
  101. <view v-if="orderInfo.order_type != 3" class="sn-content flex-row flex-between">
  102. <view class="sn-title">{{ $t('租车金额') }}</view>
  103. <view class="sn-text">$ {{tools.toFix(orderInfo.hire_money/100)}}</view>
  104. </view>
  105. <view v-if="orderInfo.order_type != 3" class="sn-content flex-row flex-between">
  106. <view class="sn-title">{{ $t('租车押金') }}</view>
  107. <view class="sn-text"><text class="grey-text"></text> $
  108. {{tools.toFix(orderInfo.deposit/100)}}
  109. </view>
  110. </view>
  111. </view>
  112. </view>
  113. </view>
  114. <view class="car-info">
  115. <view class="flex-row flex-between" style="margin-bottom: 40rpx;">
  116. <text>{{ $t('自行去门店取还') }}</text>
  117. <text class="distance-num">{{orderInfo.distance}}m</text>
  118. </view>
  119. <view class="flex-row store-img-view">
  120. <img src="https://qiniu.bms16.com/FrwDlFZdSMiBgqnqDjB19PiDUmuu" alt="">
  121. <view style="width: calc(100% - 180rpx);margin-left: 24rpx;">
  122. <view class="store-name">{{orderInfo.shop_name}}</view>
  123. <view class="store-name-address">{{orderInfo.address || $t('未知地址')}}</view>
  124. <view class="flex-row flex-between align-center">
  125. <view class="flex-row time-style align-center">
  126. <img v-if="orderInfo.work_begin_time && orderInfo.work_end_time"
  127. style="width: 40rpx;height: 40rpx;"
  128. src="https://qiniu.bms16.com/Fp-G1pdXxnTV-G3qFbgS453AuqcU" alt="">
  129. <text
  130. v-if="orderInfo.work_begin_time && orderInfo.work_end_time">{{orderInfo.work_begin_time}}-{{orderInfo.work_end_time}}</text>
  131. </view>
  132. <img @click="navToCabinet" style="width: 112rpx;height: 64rpx;"
  133. src="https://qiniu.bms16.com/Fts38M35doVjK09GfOza5qD-wwkK" alt="">
  134. </view>
  135. </view>
  136. </view>
  137. </view>
  138. <view class="car-info">
  139. <view>{{ $t('车辆信息') }}</view>
  140. <view class="car-top flex-row flex-between">
  141. <view>
  142. <view class="top-flex">
  143. <view>{{orderInfo.model_name}}</view>
  144. <view>
  145. {{ $t('续航') }}{{(orderInfo.endurance /1000).toFixed(0)}}km{{ $t('|重量') }}{{(orderInfo.weight / 1000).toFixed(0)}}kg
  146. </view>
  147. </view>
  148. <!-- //{{ $t('配套服务') }} -->
  149. <view class="serviceList">
  150. <view v-for="(item,index) of orderInfo.service_list" :key="index" class="tag">
  151. {{item}}
  152. </view>
  153. </view>
  154. </view>
  155. <image mode="aspectFit" v-if="orderInfo.model_images" :src="orderInfo.model_images"></image>
  156. <image v-else src="https://qiniu.bms16.com/FhEvnKUckAHPtWaC04mi2s53IEVj" mode=""></image>
  157. </view>
  158. <!-- <view class="exchange-info">
  159. <view class="flex-row flex-between">
  160. <view class="exchange-info-title flex-row align-center">
  161. <img style="width: 40rpx;height: 40rpx;" src="https://qiniu.bms16.com/Fj_ifr41AqH2PijZBdOBa3SCxADg" alt="">
  162. <text style="margin-left: 16rpx;">{{ $t('换电信息') }}</text>
  163. </view>
  164. <view @tap="navToExchange" class="flex-row" style="margin-bottom: 28rpx;">
  165. <view class="exchange-button">{{ $t('共') }}3{{ $t('次') }}</view>
  166. <image src="https://qiniu.bms16.com/FpIN7AVzFU75slFlX-SIdnSEmn1k" style="width: 28rpx;height: 28rpx;" />
  167. </view>
  168. </view>
  169. <view class="exchange-content">{{ $t('本单可享') }}3{{ $t('次免费换电数,超出后需单独支付') }}</view>
  170. <view class="exchange-content">{{ $t('自费换电') }}:S1/{{ $t('次') }}</view> -->
  171. <!-- <view class="exchange-content">{{ $t('本单您可享受') }}{{orderInfo.gift_exchange_num}}{{ $t('次免费换电,') }}
  172. {{ $t('当前免费换电剩余') }}{{(orderInfo.gift_exchange_num - orderInfo.used_exchange_num) > 0 ? (orderInfo.gift_exchange_num - orderInfo.used_exchange_num) : '0' }}{{ $t('次,超出后需要单独支付换电费用') }}
  173. </view> -->
  174. <!-- </view> -->
  175. </view>
  176. <view v-if="orderInfo.hire_begin_time!=0&&orderInfo.hire_end_time!=0" class="return-info">
  177. <view class="return-top flex-row flex-between">
  178. <view>{{ $t('取还时间') }}</view>
  179. <view>
  180. <!-- {{ $t('共') }}3{{ $t('天') }}{{orderInfo.hire_return_time.day > 0 ? orderInfo.hire_return_time.day :'' }}<text
  181. v-if="orderInfo.hire_return_time.day>0">{{ $t('日') }}</text>{{orderInfo.hire_return_time.hour > 0 ? orderInfo.hire_return_time.hour :'' }}<text
  182. v-if="orderInfo.hire_return_time.hour>0">{{ $t('小时') }}</text>{{orderInfo.hire_return_time.minute > 0 ? orderInfo.hire_return_time.minute :'' }}<text
  183. v-if="orderInfo.hire_return_time.minute>0">{{ $t('分') }}</text> -->
  184. {{ $t('共') }}{{hireDurationUnitsFn(orderInfo.total_hire_time,orderInfo.hire_duration_unit)}}{{leaseUnits(orderInfo.hire_duration_unit)}}
  185. </view>
  186. </view>
  187. <view class="return-bottom flex-row">
  188. <view>{{orderInfo.hire_begin_times}}</view>
  189. <img src="https://qiniu.bms16.com/FoXmBbj7YGWmjyeuVEY35nzieqnx" />
  190. <view>{{orderInfo.hire_end_times}}</view>
  191. <!-- <view>{{tools.formatTimeDate(orderInfo.hire_begin_time)}}</view>
  192. <img src="https://qiniu.bms16.com/FoXmBbj7YGWmjyeuVEY35nzieqnx" />
  193. <view>{{tools.formatTimeDate(orderInfo.hire_end_time)}}</view> -->
  194. </view>
  195. </view>
  196. <view v-if="orderInfo.order_status==2||orderInfo.order_status==3||orderInfo.order_status==4"
  197. class="overdue-info">
  198. <view>{{ $t('逾期规则') }}</view>
  199. <view class="overdue-one">
  200. <view>1. {{ $t('逾期后还可用车吗') }}?</view>
  201. <view>{{ $t('如果逾期将触发智能锁车逻辑,可能导致您无法正常用车,请及时续费或联系商家处理。') }}</view>
  202. </view>
  203. <view class="overdue-two">
  204. <view>2. {{ $t('逾期费计算标准是什么') }}?</view>
  205. <view>{{ $t('小时租逾期费') }}={{ $t('每小时费用') }}*{{ $t('逾期小时;当日还') }}/{{ $t('日') }}/{{ $t('周') }}/{{ $t('月') }}/{{ $t('季租逾期费') }}={{ $t('每天费用') }}*{{ $t('逾期天数;如果不满') }}1{{ $t('小时按') }}1{{ $t('小时算,不满') }}1{{ $t('天按') }}1{{ $t('天算,最终收取的逾期费以门店确认的费用为准') }}</view>
  206. </view>
  207. <view class="overdue-thr">
  208. <view>3. {{ $t('逾期后续租如何收费') }}?</view>
  209. <view>{{ $t('逾期后及时续租不收取逾期费,逾期时长将从续租订单的用车时间中抵扣') }}</view>
  210. </view>
  211. </view>
  212. <view class="inset-bottom"></view>
  213. <view class="payment-info flex-row flex-between">
  214. <view>
  215. <view
  216. v-if="(orderInfo.order_status == 0 ||orderInfo.order_status == 1 || orderInfo.pay_status == 5 || orderInfo.pay_status == 0) && orderInfo.order_type != 3"
  217. class="cancel" @tap="clickCancel">{{ $t('结束订单') }}</view>
  218. </view>
  219. <view class="flex-row">
  220. <view v-if="orderInfo.order_status == 1" @tap="navToScan" class="sesame-btn ">{{ $t('扫码绑定') }}</view>
  221. <view v-if="orderInfo.order_status == 2" @tap="navToScan" class="sesame-btn ">{{ $t('去上传') }}</view>
  222. <view
  223. v-if="(orderInfo.order_status == 3||orderInfo.order_status == 4) && orderInfo.order_type != 3 && orderInfo.pay_status != 5"
  224. @tap="tapReturnCar" class="deposit-btn">{{ $t('到店还车') }}</view>
  225. <view
  226. v-if="(orderInfo.order_status == 3||orderInfo.order_status == 4) && orderInfo.order_type != 3 && orderInfo.pay_status != 5"
  227. @tap="bindRenew" class="sesame-btn">{{ $t('续租') }}</view>
  228. <view @tap="callStorePhone" class="deposit-btn ">{{ $t('联系门店') }}</view>
  229. </view>
  230. </view>
  231. <!-- <view class="payment-info flex-row flex-between">
  232. <view v-if="orderInfo.order_status == 1 || orderInfo.pay_status == 5" class="flex-row">
  233. <view v-if="orderInfo.order_type != 3"
  234. class="cancel" @tap="clickCancel">{{ $t('结束订单') }}
  235. </view>
  236. <view @tap="callStorePhone" class="deposit-btn ">{{ $t('联系门店') }}</view>
  237. </view>
  238. <view v-if="orderInfo.order_status == 1" class="flex-row">
  239. <view @tap="callStorePhone" class="deposit-btn ">{{ $t('联系门店') }}</view>
  240. <view @tap="navToScan" class="sesame-btn ">{{ $t('扫码绑定') }}</view>
  241. </view>
  242. <view v-if="orderInfo.order_status == 2" class="flex-row">
  243. <view @tap="callStorePhone" class="deposit-btn ">{{ $t('联系门店') }}</view>
  244. <view @tap="navToScan" class="sesame-btn ">{{ $t('去上传') }}</view>
  245. </view>
  246. <view
  247. v-else-if="(orderInfo.order_status == 3||orderInfo.order_status == 4) && orderInfo.order_type != 3 && orderInfo.pay_status != 5"
  248. class="flex-row">
  249. <view @tap="callStorePhone" class="cancel">{{ $t('联系门店') }}</view>
  250. <view @tap="tapReturnCar" class="deposit-btn">{{ $t('到店还车') }}</view>
  251. <view @tap="bindRenew" class="sesame-btn">{{ $t('续租') }}</view>
  252. </view>
  253. <view v-else-if="orderInfo.order_status == 5||orderInfo.order_status == 6" @tap="callStorePhone"
  254. class="pay-btn">
  255. {{ $t('联系门店') }}</view>
  256. <view v-else-if="orderInfo.order_status == 7" @tap="callStorePhone" class="pay-btn">{{ $t('联系门店') }}</view>
  257. <view v-if="orderInfo.order_type == 3 && (orderInfo.order_status == 3||orderInfo.order_status == 4)"
  258. @tap="callStorePhone" class="pay-btn">{{ $t('联系门店') }}</view>
  259. </view> -->
  260. <view v-if="isShowCancel" class="cancel-b">
  261. <view class="cancel-box">
  262. <view class="cancel-title flex-row flex-between">
  263. <view>{{ $t('选择取消原因') }}</view>
  264. <view @tap="isShowCancel = false" style="font-size: 60rpx;">×</view>
  265. </view>
  266. <view @click="reason = $t('行程变更无需用车')" class="cancel-item flex-row flex-between">
  267. <view>{{ $t('行程变更无需用车') }}</view>
  268. <img :src="reason == $t('行程变更无需用车') ? 'https://qiniu.bms16.com/FhWimtmWybKlYMB6mgIReVWArbfq':'https://qiniu.bms16.com/Fh0JH6_QbiXYmVy7FNYnDkVIGvLC'" />
  269. </view>
  270. <view @click="reason = $t('修改订单信息')" class="cancel-item flex-row flex-between">
  271. <view>{{ $t('修改订单信息') }}</view>
  272. <img
  273. :src="reason == $t('修改订单信息') ?'https://qiniu.bms16.com/FhWimtmWybKlYMB6mgIReVWArbfq':'https://qiniu.bms16.com/Fh0JH6_QbiXYmVy7FNYnDkVIGvLC'" />
  274. </view>
  275. <view @click="reason = $t('不想要了')" class="cancel-item flex-row flex-between">
  276. <view>{{ $t('不想要了') }}</view>
  277. <img
  278. :src="reason == $t('不想要了') ?'https://qiniu.bms16.com/FhWimtmWybKlYMB6mgIReVWArbfq':'https://qiniu.bms16.com/Fh0JH6_QbiXYmVy7FNYnDkVIGvLC'" />
  279. </view>
  280. <view @click="bindCancel" class="cancel_btn">{{ $t('确认取消') }}</view>
  281. </view>
  282. </view>
  283. <returnCar :isShowReturnCar="isShowReturnCar" @closeShowReturnCarBtn="()=>isShowReturnCar=false"
  284. @navStoreBtn="navStoreBtn" @immediatelyReturnBtn="immediatelyReturnBtn" />
  285. <carPlan :isBuy='false' @payToOrder='payReturn' v-if="showCarPlan" @changeSelectType="changeSelectType"
  286. @closeShowMore="showCarPlan = false" :params="params" :selectType="selectType" />
  287. <PayTypeModel @closeShow="()=>isShowToBuy=false" @payToOrder="payToOrder" :free_price="totalPrice"
  288. :isShowToBuy="isShowToBuy" />
  289. </view>
  290. </template>
  291. <script module="tools" lang="wxs" src="@/pages/common/wxs/tools.wxs"></script>
  292. <script module="tools" lang="sjs" src="@/pages/common/wxs/tools.sjs"></script>
  293. <script>
  294. var config_gyq = require('../../common/config_gyq.js');
  295. var config = require('../../common/config.js');
  296. var request = require('../../common/request');
  297. var common = require('../../common/common.js');
  298. var http = require('../../common/http.js');
  299. var storage = require('../../common/storage.js');
  300. var user = require('../../common/user.js');
  301. //
  302. import {
  303. getRemainingTime
  304. } from '@/utils/util';
  305. import {
  306. MAX_LIMITS,LEASE_TYPE_ARR
  307. } from '@/common/constant.js'
  308. var appWhiteListFilter = require('../../common/appWhiteListFilter.js');
  309. import allPrice from '@/component/allPrice/allPrice';
  310. import ReturnCar from '@/component/returnCar/returnCar';
  311. import carPlan from '@/component/carPlan/carPlan';
  312. import PayTypeModel from '@/component/payTypeModel/payTypeModel';
  313. import dayjs from 'dayjs'
  314. import duration from 'dayjs/plugin/duration'
  315. dayjs.extend(duration);
  316. export default {
  317. components: {
  318. allPrice,
  319. ReturnCar,
  320. PayTypeModel,
  321. carPlan
  322. },
  323. data() {
  324. return {
  325. overdueData: {},
  326. select_type: '',
  327. car_detail: {},
  328. showCarPlan: false,
  329. return_imgs: {},
  330. charge_standard: {},
  331. isShowCancel: false,
  332. order_sn: '',
  333. reason: this.$t('行程变更无需用车'),
  334. orderInfo: {},
  335. shop_image: [],
  336. isExpanded: false,
  337. isShowPrice: false,
  338. timer: '',
  339. isSelectStatus: 1,
  340. price_list: [], //车辆价格 hire_duration_unit 1 日 4 小时 6 周
  341. insurance_status: 0,
  342. over_fee: 0, //逾期金额
  343. plate_number: '',
  344. isScanCondeRentalCar: '',
  345. isShowReturnCar: false,
  346. isShowToBuy: false,
  347. totalPrice: 0, //逾期支付金额
  348. };
  349. },
  350. /**
  351. * 生命周期函数--监听页面加载
  352. */
  353. onLoad: function(options) {
  354. this.sub_sn = options.sub_sn || ''
  355. this.bindOrderInfo()
  356. },
  357. /**
  358. * 生命周期函数--监听页面显示
  359. */
  360. onShow: function(e) {
  361. if (this.sub_sn && this.orderInfo.sub_sn) {
  362. this.bindOrderInfo()
  363. }
  364. },
  365. onUnload: function() {},
  366. computed: {},
  367. methods: {
  368. getAddressName(latitude, longitude) {
  369. const pData = {
  370. lng: longitude,
  371. lat: latitude,
  372. pi: "wx_index"
  373. }
  374. const that = this
  375. http.postApi(config.API_MAP_REGEO, pData, (resp) => {
  376. if (resp.data.code === 200) {
  377. that.orderInfo.address = resp.data.data.data.address
  378. } else {
  379. common.simpleToast(resp.data.msg)
  380. }
  381. })
  382. },
  383. leaseUnits(type){
  384. const result = LEASE_TYPE_ARR.find(v => v.value == type);
  385. return result ? result.unit : '';
  386. },
  387. leaseUnitsResult(type) {
  388. const result = LEASE_TYPE_ARR.find(v => v.value == type);
  389. return result ? result.label : '';
  390. },
  391. payReturn() {},
  392. //逾期费用计算
  393. async overdueMoneyFn(car_sn) {
  394. let {
  395. data
  396. } = await request.postApi(config_gyq.API_FLK_CAR_OVERDUE_MONEY, {
  397. car_sn
  398. })
  399. if (data.code == 200) {
  400. this.overdueData = data.data
  401. } else {
  402. common.simpleToast(data.msg)
  403. }
  404. },
  405. payToOrder() {},
  406. async loadCarInfo(model_id) {
  407. const me = this
  408. http.postApi(config.API_FLK_INDEX_CAR_MODEL_DETAIL, {
  409. model_id,
  410. }, (resp) => {
  411. if (resp.data.code === 200) {
  412. const pData = {
  413. ...this.car_detail,
  414. price: this.price
  415. }
  416. me.setData({
  417. car_detail: resp.data.data,
  418. params: {
  419. order_sn: this.orderInfo.order_sn,
  420. ...resp.data.data,
  421. price: (resp.data.data.rental_setting[0].hire_price / 100).toFixed(2)
  422. }
  423. })
  424. } else {
  425. common.simpleToast(resp.data.msg);
  426. }
  427. })
  428. },
  429. changeSelectType(select_type, price) {
  430. this.setData({
  431. selectType: select_type,
  432. price: (price / 100).toFixed(2)
  433. })
  434. },
  435. async carDetFn(car_sn) {
  436. let {
  437. data
  438. } = await request.postApi(config.API_FLK_CAR_DETAIL, {
  439. car_sn
  440. })
  441. if (data.code === 200) {
  442. if (data.data.model_id == this.orderInfo.model_id) {
  443. return true
  444. } else {
  445. common.simpleToast(this.$t('车型不匹配!'))
  446. return false
  447. }
  448. if (data.data.is_hire == 1) {
  449. return true
  450. } else {
  451. common.simpleToast(this.$t('车辆已被租售!'))
  452. return false
  453. }
  454. if (data.data.is_display == 1) {
  455. return true
  456. } else {
  457. common.simpleToast(this.$t('车辆未展示!'))
  458. return false
  459. }
  460. } else {
  461. common.simpleToast(this.$t('请扫描正确的二维码!'))
  462. return false
  463. }
  464. return false
  465. },
  466. async navToScan() {
  467. let car_sn = this.orderInfo.car_sn || ''
  468. if (!car_sn) {
  469. let res = await uni.scanCode({
  470. onlyFromCamera: true,
  471. scanType: ['qrCode'],
  472. });
  473. if (res[0]) return
  474. car_sn = res[1].result
  475. if (!await this.carDetFn(car_sn)) return
  476. }
  477. uni.showLoading({
  478. title: '识别中....',
  479. mask: true
  480. })
  481. setTimeout(() => {
  482. uni.hideLoading();
  483. uni.navigateTo({
  484. url: `/pages/activation/activation?model_id=${this.orderInfo.model_id}&sub_sn=${this.sub_sn}&car_sn=${car_sn}`
  485. })
  486. }, 1000);
  487. },
  488. navToCabinet() {
  489. const {
  490. latitude,
  491. longitude,
  492. cityname,
  493. address,
  494. shop_name
  495. } = this.orderInfo
  496. uni.openLocation({
  497. latitude: latitude - 0,
  498. longitude: longitude - 0,
  499. scale: 15,
  500. name: shop_name,
  501. address: address,
  502. success: function(res) {}
  503. });
  504. },
  505. hireDurationUnitFn(type) {
  506. if (type == 1) {
  507. return this.$t('天')
  508. } else if (type == 2) {
  509. return this.$t('月')
  510. } else if (type == 3) {
  511. return this.$t('年')
  512. } else if (type == 4) {
  513. return this.$t('小时')
  514. } else if (type == 5) {
  515. return this.$t('分钟')
  516. } else if (type == 6) {
  517. return this.$t('周')
  518. } else if (type == 7) {
  519. return this.$t('季')
  520. }
  521. },
  522. hireDurationUnitsFn(time, type) {
  523. if (type == 1) {
  524. return Math.ceil(time / 60 / 60 / 24)
  525. } else if (type == 2) {
  526. return Math.ceil(time / 60 / 60 / 24 / 30)
  527. } else if (type == 3) {
  528. return Math.ceil(time / 60 / 60 / 24 / 30 / 365)
  529. } else if (type == 4) {
  530. return Math.ceil(time / 60 / 60)
  531. } else if (type == 5) {
  532. return Math.ceil(time / 60)
  533. } else if (type == 6) {
  534. return Math.ceil(time / 60 / 60 / 24 / 7)
  535. } else if (type == 7) {
  536. return Math.ceil(time / 60 / 60 / 24 / 30 / 3)
  537. }
  538. },
  539. async bindOrderInfo() {
  540. const me = this
  541. const locationStr = uni.getStorageSync('user_current_location');
  542. // if (locationStr) {
  543. // this.myLocation = locationStr;
  544. // }
  545. http.postApi(config.API_FLK_ORDER_INFO, {
  546. sub_sn: me.sub_sn,
  547. latitude: locationStr.latitude,
  548. longitude: locationStr.longitude,
  549. }, (resp) => {
  550. if (resp.data.code === 200) {
  551. me.orderInfo = resp.data.data.order_info
  552. me.orderInfo.model_images = me.orderInfo.model_images.split(',')[0]
  553. me.getAddressName(this.orderInfo.latitude,this.orderInfo.longitude)
  554. //
  555. if (resp.data.data.order_info.model_id) {
  556. me.loadCarInfo(resp.data.data.order_info.model_id)
  557. }
  558. let distance = common.getFlatternDistance(locationStr.longitude, locationStr.latitude,
  559. me
  560. .orderInfo.longitude, me.orderInfo.latitude)
  561. resp.data.data.order_info.distance = distance
  562. // 取还时间展示
  563. // me.orderInfo.hire_return_time = common.getTimeToDay(Math.ceil(me.orderInfo
  564. // .hire_end_time - me.orderInfo.hire_begin_time) / 60)
  565. me.orderInfo.hire_return_time = getRemainingTime(me.orderInfo
  566. .hire_begin_time, me
  567. .orderInfo.hire_end_time)
  568. me.orderInfo.hire_begin_times = me.orderInfo.hire_begin_time ? dayjs(me
  569. .orderInfo
  570. .hire_begin_time * 1000).format(
  571. 'YY-MM-DD') : 0
  572. me.orderInfo.hire_end_times = me.orderInfo.hire_end_time ? dayjs(me
  573. .orderInfo
  574. .hire_end_time * 1000).format(
  575. 'YY-MM-DD') : 0
  576. console.log(me.orderInfo.order_status == 1);
  577. let other_time = 0
  578. // 剩余租期判断
  579. //订单状态 0 默认 1 待取车 2 待激活 3 使用中 4 已逾期 5 还车申请中 6 还车中 7 车辆已归还 8 订单已支付,已取消 9 订单未支付已取消
  580. if (me.orderInfo.order_status == 1) {
  581. me.orderInfo.hire_duration_time = common.countToDay(me.orderInfo.hire_cycle * me
  582. .orderInfo.hire_duration, me.orderInfo.hire_duration_unit)
  583. console.log(me.orderInfo.hire_duration_time, 'me.orderInfo.hire_duration_time');
  584. } else if ((me.orderInfo.hire_type == 2 && me.orderInfo.order_status == 2) || me
  585. .orderInfo.order_status == 3) {
  586. // me.orderInfo.hire_duration_time = common.timestampToDays(Math.ceil(me.orderInfo
  587. // .hire_end_time - Math.floor(new Date()) / 1000))
  588. me.orderInfo.hire_duration_time = common.formatTimeDifference(me.orderInfo
  589. .hire_end_time * 1000)
  590. } else {
  591. if (me.orderInfo.order_status == 4) {
  592. me.overdueMoneyFn(me.orderInfo.car_sn)
  593. // me.orderInfo.hire_duration_time = common.timestampToDays(Math.ceil(Math.floor(
  594. // new Date()) / 1000 - me.orderInfo.hire_end_time))
  595. me.orderInfo.hire_duration_time = common.formatTimeDifference(me.orderInfo
  596. .hire_end_time * 1000)
  597. } else {
  598. me.orderInfo.hire_duration_time = common.timestampToDays(Math.ceil(me.orderInfo
  599. .hire_begin_time - me.orderInfo.hire_end_time))
  600. }
  601. }
  602. } else {
  603. // 默认返回上一个页面再提示报错
  604. uni.navigateBack({
  605. delta: 1
  606. })
  607. common.simpleToast(resp.data.msg)
  608. }
  609. })
  610. },
  611. navStoreBtn() {
  612. const {
  613. latitude,
  614. longitude,
  615. address,
  616. shop_name
  617. } = this.orderInfo
  618. uni.openLocation({
  619. latitude: latitude - 0,
  620. longitude: longitude - 0,
  621. scale: 15,
  622. name: shop_name,
  623. address: address,
  624. success: function(res) {}
  625. });
  626. },
  627. tapReturnCar() {
  628. this.setData({
  629. isShowReturnCar: true
  630. })
  631. },
  632. immediatelyReturnBtn() {
  633. //到店还车 判断逾期状态 如果逾期要交逾期费用 跳转到上传车辆图片再支付逾期费用还车
  634. const isOverdue = this.orderInfo.order_status == 4
  635. const {
  636. car_sn,
  637. shop_id,
  638. overdue_money
  639. } = this.orderInfo
  640. const returnCarParams = {
  641. car_sn,
  642. shop_id,
  643. overdue_money,
  644. isReturnCar: true,
  645. }
  646. //提交还车图片
  647. uni.navigateTo({
  648. url: `/pages/activation/activation?isReturnCar=true&model_id=${this.orderInfo.model_id}&sub_sn=${this.sub_sn}&car_sn=${this.orderInfo.car_sn}&isOverdue=${isOverdue}&overdueMoney=${this.overdueData.money}&overdueTime=${this.overdueData.time}&type=index`
  649. });
  650. // if (isOverdue) {
  651. // this.setData({
  652. // totalPrice: this.overdueData.money,
  653. // isShowToBuy: true
  654. // })
  655. // } else {
  656. // //提交还车图片
  657. // uni.navigateTo({
  658. // url: `/pages/activation/activation?isReturnCar=true,model_id=${this.orderInfo.model_id}&sub_sn=${this.sub_sn}&car_sn=${this.orderInfo.car_sn}&isOverdue=${isOverdue}&overdueMoney=${this.overdueData.money}&overdueTime=${this.overdueData.time}`
  659. // });
  660. // }
  661. },
  662. callStorePhone() {
  663. const phone = this.orderInfo.link_phone
  664. common.callPhone(phone)
  665. },
  666. async clickCancel() {
  667. this.isShowCancel = true
  668. },
  669. async bindCancel() {
  670. const me = this
  671. let res = await uni.showModal({
  672. title: this.$t('取消订单'),
  673. content: this.$t('您是否需要取消该订单'),
  674. confirmText: this.$t('是'),
  675. confirmColor: '#0074FF',
  676. cancelText: this.$t('否'),
  677. cancelColor: '#191D23',
  678. });
  679. if (res[1].confirm) {
  680. let {
  681. data
  682. } = await request.postApi(config.API_DAYHIRE_HIRE_CANCEL_ORDER, {
  683. sub_sn: this.sub_sn,
  684. remark: this.reason
  685. })
  686. if (data.code == 200) {
  687. common.simpleToast(data.msg)
  688. this.isShowCancel = false
  689. this.bindOrderInfo()
  690. } else {
  691. common.simpleToast(data.msg)
  692. }
  693. }
  694. },
  695. bindToNav() {
  696. console.log(111);
  697. const {
  698. address,
  699. latitude,
  700. longitude,
  701. shop_name
  702. } = this.shopInfo
  703. uni.openLocation({
  704. latitude: latitude - 0,
  705. longitude: longitude - 0,
  706. scale: 15,
  707. name: shop_name,
  708. address: address,
  709. success: function(res) {},
  710. })
  711. },
  712. bindToHome() {
  713. uni.reLaunch({
  714. url: '/pages/index/index',
  715. success: function(res) {},
  716. fail: function(res) {},
  717. complete: function(res) {}
  718. });
  719. },
  720. callPhone() {
  721. const me = this
  722. const phone = me.shopInfo.link_phone
  723. uni.showModal({
  724. content: `您是否要拨打电话${phone}?`,
  725. confirmText: this.$t('确定'),
  726. success: (res) => {
  727. if (res.confirm) {
  728. uni.makePhoneCall({
  729. phoneNumber: phone,
  730. success() {},
  731. fail() {}
  732. })
  733. }
  734. },
  735. fail: (res) => {}
  736. })
  737. },
  738. bindRenew() {
  739. this.params.overdueData = this.overdueData
  740. this.showCarPlan = true
  741. // this.isReturnHome = false
  742. // let isRenew = true
  743. // uni.navigateTo({
  744. // url: '/pages/carIntroduce/carIntroduce?plate_number=' + this.orderInfo
  745. // .license_plate_number +
  746. // '&isRenew=' + isRenew +
  747. // '&order_sn=' + this.order_sn,
  748. // success: function(res) {},
  749. // fail: function(res) {},
  750. // complete: function(res) {}
  751. // });
  752. },
  753. bindBattery() {
  754. this.isReturnHome = false
  755. uni.navigateTo({
  756. url: '/pages/battery/battery?plate_number=' + this.orderInfo.license_plate_number,
  757. success: function(res) {},
  758. fail: function(res) {},
  759. complete: function(res) {}
  760. });
  761. },
  762. bindExpanded() {
  763. this.isExpanded = !this.isExpanded
  764. },
  765. navToInput() {
  766. this.isReturnHome = false
  767. uni.navigateTo({
  768. url: '/pages/inputLicensePlate/inputLicensePlate?order_sn=' + this.orderInfo
  769. .order_sn,
  770. success: function(res) {},
  771. fail: function(res) {},
  772. complete: function(res) {}
  773. });
  774. },
  775. // 激活车辆
  776. navToActive() {
  777. this.isReturnHome = false
  778. const me = this
  779. if (this.orderInfo.hire_type == 1) { // 预约
  780. if (me.isScanCondeRentalCar) {
  781. uni.scanCode({
  782. onlyFromCamera: true,
  783. success: function(res) {
  784. me.loadScanCode(res.result)
  785. },
  786. fail: function(res) {},
  787. complete: function(res) {},
  788. })
  789. } else {
  790. uni.navigateTo({
  791. url: '/pages/inputLicensePlate/inputLicensePlate?order_sn=' + this
  792. .order_sn + '&order_model_id=' + this.orderInfo.model_id,
  793. success: function(res) {},
  794. fail: function(res) {},
  795. complete: function(res) {}
  796. });
  797. }
  798. } else { // 非预约
  799. const isJumpReturn = false
  800. uni.navigateTo({
  801. url: '/pages/activation/activation?order_sn=' + this.order_sn +
  802. '&plate_number=' + this
  803. .orderInfo.license_plate_number + '&isJumpReturn=' + isJumpReturn,
  804. success: function(res) {},
  805. fail: function(res) {},
  806. complete: function(res) {}
  807. });
  808. }
  809. },
  810. loadScanCode(battery_sn) {
  811. const pData = {
  812. longitude: this.longitude,
  813. latitude: this.latitude,
  814. battery_sn: battery_sn
  815. }
  816. const me = this
  817. http.postApi(config.API_DAYHIRE_CAR_CAR_INFO, pData, (resp) => {
  818. uni.hideLoading()
  819. if (resp.data.code === 200) {
  820. const timestamp = Date.now(); // 获取当前时间戳(毫秒)
  821. const isOffline = (Math.floor(timestamp / 1000) - resp.data.data
  822. .last_comm_time) > 1800
  823. me.plate_number = resp.data.data.license_plate_number
  824. if (resp.data.data.last_comm_time === 0 || isOffline) {
  825. common.simpleToast(this.$t('此车辆已离线,请选择其他车辆'))
  826. } else {
  827. let carInfo = JSON.stringify(resp.data.data)
  828. const car_model = resp.data.data.model_info.car_model
  829. const model_images = resp.data.data.model_info.model_images.split(',')
  830. const return_imgs = resp.data.data.return_imgs
  831. var model_id = resp.data.data.model_info.model_id
  832. if (resp.data.data.has_owner) { //车辆正在被使用
  833. if (resp.data.data.is_mine) { //是本人在使用
  834. wx.showModal({
  835. title: this.$t('提示'),
  836. content: '已有正在使用的车辆,是否跳转至车辆详情页?',
  837. cancelText: this.$t('取消'),
  838. confirmText: this.$t('确定'),
  839. success: function(res) {
  840. this.isReturnHome = false
  841. uni.navigateTo({
  842. url: '/pages/battery/battery?plate_number=' +
  843. this.plate_number
  844. });
  845. },
  846. fail: function(res) {},
  847. complete: function(res) {},
  848. })
  849. } else {
  850. common.simpleToast(this.$t('此车辆正在被使用'))
  851. }
  852. } else {
  853. if (me.order_sn && me.order_sn != '') {
  854. if (this.orderInfo.model_id != model_id) { // 预租车型与之前预约车型不一致
  855. common.simpleToast(this.$t('与预约车型不符'))
  856. } else {
  857. this.isReturnHome = false
  858. uni.navigateTo({
  859. url: '/pages/activation/activation?plate_number=' +
  860. this.plate_number + '&order_sn=' + this
  861. .order_sn +
  862. '&car_model=' + car_model + '&model_image=' +
  863. model_images[0] + '&return_imgs=' + JSON
  864. .stringify(
  865. return_imgs),
  866. fail() {}
  867. })
  868. }
  869. } else {
  870. this.isReturnHome = false
  871. uni.navigateTo({
  872. url: '/pages/carIntroduce/carIntroduce?carInfo=' +
  873. encodeURIComponent(carInfo) + '&plate_number=' +
  874. this.plate_number,
  875. fail() {}
  876. })
  877. }
  878. }
  879. }
  880. } else {
  881. common.simpleToast(resp.data.msg)
  882. }
  883. })
  884. },
  885. bindToPay() {
  886. const me = this
  887. //#ifdef MP-ALIPAY
  888. const _from = 'ali'
  889. const _pay_type = 2
  890. //#endif
  891. //#ifdef MP-WEIXIN
  892. const _from = 'wx'
  893. const _pay_type = 0
  894. //#endif
  895. http.postApi(config.API_DAYHIRE_HIRE_CONTINUE_PAY, {
  896. order_sn: me.order_sn,
  897. from: _from,
  898. pay_type: _pay_type
  899. }, (resp) => {
  900. common.loading()
  901. if (resp.data.code === 200) {
  902. uni.hideLoading()
  903. //#ifdef MP-ALIPAY
  904. my.tradePay({
  905. tradeNO: resp.data.data.trade_no,
  906. success: function(res) {
  907. if (res.resultCode == 9000) {
  908. common.simpleToast(this.$t('支付成功'));
  909. }
  910. setTimeout(function() {
  911. me.bindOrderInfo()
  912. }, 1000)
  913. },
  914. fail: function(res) {
  915. common.simpleToast(this.$t('支付失败,请重试'))
  916. },
  917. })
  918. //#endif
  919. //#ifdef MP-WEIXIN
  920. var payParams = JSON.parse(resp.data.data.payParams);
  921. user.wxPay(me.order_sn, payParams, function(isSuccess) {
  922. if (isSuccess) {
  923. common.simpleToast(this.$t('支付成功'))
  924. setTimeout(function() {
  925. me.bindOrderInfo()
  926. }, 1000)
  927. } else {
  928. common.simpleToast(this.$t('支付失败,请重试'))
  929. }
  930. });
  931. //#endif
  932. } else {
  933. uni.hideLoading()
  934. common.simpleToast(resp.data.msg)
  935. }
  936. })
  937. },
  938. // 计算拖车说明收费价格
  939. calculateFare(distance, charge_list) {
  940. let fare = 0
  941. if (distance <= charge_list.start_mil) {
  942. fare = charge_list.start_price / 100
  943. } else {
  944. // actual_start_mil:实际距离单位米
  945. // over_start_price:向上取整的公里数*超出首公里的费用
  946. var actual_start_mil = distance - charge_list.start_mil
  947. var over_start_price = (Math.ceil(actual_start_mil / charge_list.step_mil)) * charge_list
  948. .step_price
  949. fare = (charge_list.start_price + over_start_price) / 100
  950. }
  951. const fareArray = fare.toFixed(2).split('.'); //将价格拆分为整数部分和小数部分
  952. const price_list = {
  953. start_mil: (charge_list.start_mil / 1000).toFixed(2),
  954. start_price: (charge_list.start_price / 100).toFixed(2),
  955. step_mil: (charge_list.step_mil / 1000).toFixed(2),
  956. step_price: (charge_list.step_price / 100).toFixed(2),
  957. actual_start_mil: actual_start_mil ? (actual_start_mil / 1000).toFixed(2) : 0,
  958. over_start_price: over_start_price ? (over_start_price / 100).toFixed(2) : 0,
  959. fare: fare.toFixed(2), // 保留两位小数
  960. fareArray: fareArray //将价格拆分为整数部分和小数部分
  961. }
  962. return price_list
  963. },
  964. bindChangeStatus(e) {
  965. const {
  966. status,
  967. unit
  968. } = e.currentTarget.dataset
  969. this.setData({
  970. isSelectStatus: unit,
  971. selectIndex: status
  972. })
  973. // this.bindDuration()
  974. },
  975. //计算价格
  976. // bindDuration(){
  977. // const me = this
  978. // var _insurance_price //保险金
  979. // const unit_price=(me.price_list[0].hire_price/100) * me.leaseTime //租金
  980. // // insurance_setting 保险
  981. // if (me.insurance_setting!=null) { // 有保险的时候
  982. // // isSelectDeposit==0为免押 isOpenNoDeposit为是否成功开通免押 total_money为总金额
  983. // // unit_price 租金 insurance_setting.price 保险金 deposit 押金
  984. // if (me.duration_unit == 4) { // 时
  985. // _insurance_price = (me.insurance_setting.price - 0) * 1
  986. // } else if(me.duration_unit == 6) { // 周
  987. // _insurance_price = (me.insurance_setting.price - 0) * 7 * me.leaseTime
  988. // } else { //天
  989. // _insurance_price = (me.insurance_setting.price - 0) * me.leaseTime
  990. // }
  991. // } else { // 无保险
  992. // _insurance_price = 0
  993. // }
  994. // if (me.isOpenNoDeposit) {
  995. // // 金额=(周期数*周期价格)+保险金
  996. // me.amount = ((me.leaseTime * me.price_list[0].hire_price -0) + (_insurance_price - 0)) / 100
  997. // } else {
  998. // // 金额=(周期数*周期价格)+押金+保险金
  999. // me.amount = ((me.leaseTime * me.price_list[0].hire_price -0) + (me.modelInfo.deposit -0) + (_insurance_price - 0)) / 100
  1000. // }
  1001. // },
  1002. loadEnd() {
  1003. this.bindOrderInfo()
  1004. },
  1005. navToExchange() {
  1006. console.log(this.$t('跳转换电记录'));
  1007. uni.navigateTo({
  1008. url: '/pages/exchangeRecord/exchangeRecord' +
  1009. '?order_sn=' + this.orderInfo.order_sn
  1010. })
  1011. }
  1012. }
  1013. };
  1014. </script>
  1015. <style>
  1016. @import './orderStatus.css';
  1017. .cancel_btn {
  1018. width: 702rpx;
  1019. height: 80rpx;
  1020. background: #060809;
  1021. border-radius: 40rpx;
  1022. font-family: PingFangSC, PingFang SC;
  1023. font-weight: 500;
  1024. font-size: 32rpx;
  1025. color: #FFFFFF;
  1026. display: flex;
  1027. align-items: center;
  1028. justify-content: center;
  1029. }
  1030. </style>