charge.vue 47 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111
  1. <template>
  2. <view>
  3. <ujp-navbar title="开始充电" :is-back="isback">
  4. <view class="exchange " slot="right" @click="showmodal2=true">充电说明</view>
  5. </ujp-navbar>
  6. <view class="carImg" v-if="personInfo&&personInfo.userType!=2">
  7. <img @click="gotoLogin" src="@/assets/img/gologin/img.png">
  8. </view>
  9. <view v-else>
  10. <!-- 优惠 -->
  11. <view class="discounts" style="padding:0 36rpx;" v-if="bannerList.length">
  12. <u-swiper bg-color="#fff" mode="none" :img-mode="'scaleToFill'" height="160" :list="bannerList"
  13. @click="clickBanner" :name="'picUrl'">
  14. </u-swiper>
  15. </view>
  16. </view>
  17. <view class="recharge">
  18. <view class="title">
  19. <view class="left lefttitle">
  20. 请选择支付方式和充电金额
  21. </view>
  22. <!-- <view class="to-recharge" @click="show=true,recordId='',otherNum_f='',fee=0">
  23. 去充值
  24. </view> -->
  25. </view>
  26. <view class="card" @click="payValue=0" :class="{
  27. cardselect:payValue==0,
  28. cardno:payValue!=0
  29. }">
  30. <view class="cardgo">
  31. <view class="cardinfo">
  32. <img src="@/assets/img/riFill-check-fill.svg" alt="">
  33. </view>
  34. </view>
  35. <view class="title">先付后退</view>
  36. <p>充电结束后,余额自动退还;不享受<span style="color:#ff3d00;">会员充电折扣、平台各类优惠券</span>等福利</p>
  37. <view class="rechargeMain" v-show="payValue==0">
  38. <view class="recharge-item" @click="moneyActiveClass_n=(item.id)"
  39. :class="moneyActiveClass_n == item.id ? 'active' : ''" v-for="(item,index) in moneyListN"
  40. :key="item.id">
  41. {{item.name}}
  42. </view>
  43. </view>
  44. </view>
  45. <view class="card" @click="paySelectMethod(paySelectMethodValue)" :class="{
  46. cardselect:payValue==1||payValue==4,
  47. cardno:!(payValue==1||payValue==4)
  48. }">
  49. <view class="cardgo">
  50. <view class="cardinfo">
  51. <img src="@/assets/img/riFill-check-fill.svg" alt="">
  52. </view>
  53. </view>
  54. <view class="title">会员账户余额充电</view>
  55. <p v-show="!chargingFundsBl&&!(payValue==1||payValue==4)">当前余额{{user.balance>0?user.balance.toFixed(2):'0.00'}}元
  56. <span @click="paySelectShow()" style="color:#00B962;margin-left: 20px; ">去充值></span>
  57. </p>
  58. <p v-show="(payValue==1||payValue==4)">优先使用付款方式
  59. <span @click="paySelectShow()" style="color:#00B962;margin-left: 20px; ">去充值></span>
  60. </p>
  61. <view class="rechargeBalance" v-if="chargingFundsBl" >
  62. <view class="rechargeBalanceItem">账户余额{{user.balance>0?user.balance.toFixed(2):'0.00'}}元</view>
  63. <view class="rechargeBalanceItem" v-if="chargingFundsBl">|</view>
  64. <view class="rechargeBalanceItem" v-if="chargingFundsBl" >充电金{{user.chargingFunds>0?user.chargingFunds.toFixed(2):'0.00'}}元</view>
  65. </view>
  66. <view class="rechargeMain" v-if="chargingFundsBl" v-show="payValue==1||payValue==4">
  67. <view
  68. class=" recharge-item " @click="paySelectMethodValue=1" :class="payValue == 1? 'active' : ''" >
  69. 账户余额
  70. </view>
  71. <view
  72. class=" recharge-item " @click="paySelectMethodValue=4" :class="payValue == 4? 'active' : ''">
  73. 充电金
  74. </view>
  75. </view>
  76. <p v-if="chargingFundsBl" v-show="(payValue==1||payValue==4)" >充电时长</p>
  77. <view class="rechargeMain" v-show="payValue==1||payValue==4">
  78. <view @click="moneyClick(-1)" :class="!otherNum&&moneyActiveClass == -1? 'active' : ''"
  79. class=" recharge-item ">
  80. 充满自停
  81. </view>
  82. <view class="recharge-item" @click="moneyClick(item.id)"
  83. :class="!otherNum&&moneyActiveClass == item.id ? 'active' : ''"
  84. v-for="(item,index) in moneyList" :key="item.id">
  85. {{item.name}}元
  86. </view>
  87. <view class="recharge-item recharge-item2" :class="otherNum ? 'active' : ''" style="
  88. padding: 1px 0px;">
  89. <ujp-input v-model="otherNum" @input="ckInput" @focus="focus" type="digit" placeholder="其他金额" />
  90. </view>
  91. </view>
  92. </view>
  93. <view class="card" v-for="(companyItem,i) in companyList" :key="i" @click="paySelectMethod(2,companyItem)"
  94. :class="{
  95. cardselect:(payValue==2&&companyItem.enterpriseAccount.id==companyPaySelect.enterpriseAccount.id),
  96. cardno:!(payValue==2&&companyItem.enterpriseAccount.id==companyPaySelect.enterpriseAccount.id)
  97. }">
  98. <view class="cardgo">
  99. <view class="cardinfo">
  100. <img src="@/assets/img/riFill-check-fill.svg" alt="">
  101. </view>
  102. </view>
  103. <view class="title">{{companyItem.enterpriseAccount.entName}}账户余额充电</view>
  104. <p>余额{{companyItem.enterpriseAccount.totalAmount>0?companyItem.enterpriseAccount.totalAmount.toFixed(2):'0.00'}}元
  105. <span
  106. v-show="(payValue==2&&companyItem.enterpriseAccount.id==companyPaySelect.enterpriseAccount.id)"
  107. @click="companyCarSelectBl=true"
  108. style="color:#00B962;margin-left: 40rpx; ">{{companyPaySelect.car?companyPaySelect.car+'(更换)':'选择充电车辆>'}}</span>
  109. <span style="margin-left: 40rpx; "
  110. v-show="(payValue==2&&companyItem.enterpriseAccount.id==companyPaySelect.enterpriseAccount.id)"></span>
  111. </p>
  112. <view class="rechargeMain"
  113. v-show="(payValue==2&&companyItem.enterpriseAccount.id==companyPaySelect.enterpriseAccount.id)">
  114. <view @click="moneyClick(-1)" :class="!otherNum&&moneyActiveClass == -1? 'active' : ''"
  115. class=" recharge-item ">
  116. 充满自停
  117. </view>
  118. <view class="recharge-item recharge-item2" :class="otherNum ? 'active' : ''" style="
  119. padding: 1px 0px;">
  120. <ujp-input v-model="otherNum" @input="ckInput" @focus="focus" type="digit" placeholder="其他金额" />
  121. </view>
  122. </view>
  123. </view>
  124. <!-- 优惠券2 -->
  125. <view v-if="personInfo.userType == '1'&&0" class="greyTips" >
  126. 车主注册会员可享受至少5%优惠,并可快速进入会员注册页面
  127. </view>
  128. <!-- 入场车辆 -->
  129. <view class="member" :class="{
  130. 'cost-explain2':!submitForm.carNumber
  131. }">
  132. <view class="actively ">
  133. 入场车辆
  134. </view>
  135. <view class="type" @click="carDet()" >
  136. {{submitForm.carNumber?submitForm.carNumber:'填车牌号可减免部分停车费用'}}
  137. <img v-if="!submitForm.carNumber" src="@/assets/static/img/riLine-edit-box-line2.svg" alt="">
  138. </view>
  139. </view>
  140. <view class="member">
  141. <view class="actively">
  142. 优惠券
  143. </view>
  144. <view class="right" v-if="payValue=='0'">
  145. 先付后退不享受会员优惠活动
  146. </view>
  147. <view class="right" v-else-if="payValue=='2'">
  148. 企业单位用户不可使用优惠券
  149. </view>
  150. <view class="right" @click="chooseCoupons" v-else-if="selectObj.id">
  151. {{selectObj.threshold == 0 ? '无门槛' : '满'+selectObj.threshold.toFixed(2)+'元可用'}},
  152. <span class="price"
  153. v-if="selectObj.classify == '1'||selectObj.classify == '3'">抵扣{{selectObj.value.toFixed(2)}}元</span>
  154. <span class="price" v-if="selectObj.classify == '2'">
  155. <template v-if="selectObj.value==0">
  156. 服务费全免
  157. </template>
  158. <template v-else>
  159. 服务费{{selectObj.value}}折
  160. </template>
  161. </span>
  162. <view class="iconfont">&#xe600;</view>
  163. </view>
  164. <view class="right" @click="chooseCoupons" v-else-if="listlength">
  165. 未选择,剩余{{listlength}}张优惠券
  166. <view class="iconfont">&#xe600;</view>
  167. </view>
  168. <view class="right" @click="chooseCoupons" v-else>
  169. 无优惠券
  170. <view class="iconfont">&#xe600;</view>
  171. </view>
  172. </view>
  173. <!-- 会员活动 -->
  174. <view class="member">
  175. <view class="actively ">
  176. 会员活动
  177. </view>
  178. <view class="type" v-if="payValue=='0'">
  179. 先付后退不享受会员优惠活动
  180. </view>
  181. <view class="type" v-else-if="payValue=='2'">
  182. 企业单位用户不享受会员优惠活动
  183. </view>
  184. <template v-else-if="userCardBool">
  185. <view class="type" v-if="!vin" style="color: red;">
  186. vin码不一致
  187. </view>
  188. <view class="type" v-else-if="canUse">
  189. <template v-if="userCard.cardType==4">
  190. {{userCard.cardName}}
  191. {{userCard.monthlyRentName}}
  192. </template>
  193. <template v-else>
  194. {{userCard.classify==1?'折扣卡':''}}
  195. {{userCard.classify==2?'服务费'+(userCard.serviceFeeDiscountRate/10)+'折卡':''}}
  196. </template>
  197. </view>
  198. <view class="type" style="color: red;" v-else>
  199. 此充电站不支持折扣卡
  200. </view>
  201. </template>
  202. <template v-else>
  203. <view class="type" style="color:#999999" @click="gotoUrl('pages/discountCard/productDetails')">
  204. 未使用服务费6折卡<view class="iconfont">&#xe600;</view>
  205. </view>
  206. </template>
  207. </view>
  208. <view v-if="(cardList.length||userCard)&&(payValue=='1'||payValue=='4')" class="cardListView">
  209. <view class="cardListItemTitle" v-if="cardList.length>1" >点击切换其他卡</view>
  210. <view class="cardListItem card" v-for="(item,i) in cardList"
  211. :key="i" :class="{
  212. cardselect:userCard&&userCard.id==item.id,
  213. cardno:(!userCard||userCard.id!=item.id)
  214. }" @click="userCardBtn(item)" >
  215. <view class="cardgo">
  216. <view class="cardinfo">
  217. <img src="@/assets/img/riFill-check-fill.svg" alt="">
  218. </view>
  219. </view>
  220. <view class="cardListName" >
  221. {{item.cardName}}
  222. </view>
  223. <view class="cardListText" v-if="item.classify==1" >
  224. <view>充电服务费全免</view>
  225. <view>
  226. {{thisendTime(item.endTime)}}到期
  227. </view>
  228. </view>
  229. <view class="cardListText" v-if="item.classify==2" >
  230. <view>
  231. 已用{{item.chargedDegree?item.chargedDegree.toFixed(0):0.00}}度 / 共{{item.chargeDegreeLimit}}度
  232. </view>
  233. <view>
  234. {{thisendTime(item.endTime)}}到期
  235. </view>
  236. </view>
  237. </view>
  238. <p>点击可<span style="color:red">取消</span>使用<span style="color:#00b962">“服务费折扣卡”</span></p>
  239. </view>
  240. </view>
  241. <view class="botton">
  242. <view style=" display: flex;
  243. justify-content: center;">
  244. <u-checkbox-group >
  245. <u-checkbox
  246. v-model="contractSignTime"
  247. >我已阅读并同意</u-checkbox><span style="color: rgba(0, 185, 98, 1);" @click="gotoUrl('pages/article/details?code=YHXY')">《优电联盟用户使用协议》</span>
  248. </u-checkbox-group>
  249. </view>
  250. <button class="bottonBtn" @click="submit">开始充电</button>
  251. </view>
  252. <u-modal v-model="showmodal2" confirm-text="知道了" title="充电说明">
  253. <view style="padding: 10px;font-size: 32rpx;">
  254. 1.最终结算金额将以实际充入电量为准;<br />
  255. 2.充满自停模式需要您的余额不低于10元才可充电;<br />
  256. 3.充电金额请输入1元~500元的整数。实际充电金额与所选金额会略有出入(一般误差约几分钱);<br />
  257. 4.完成充电后,在满足条件的情况下,优惠券自动抵扣;提前结束充电则不使用优惠券并返还至您的卡包。<br />
  258. 5.先付后退模式,无法享受平台会员的服务费折扣、优惠券等优惠活动。<br />
  259. </view>
  260. </u-modal>
  261. <!-- <view class="but-box" style="margin-bottom: 20px;">
  262. <u-button
  263. style=" background-color: rgba(0, 185, 98, 100);
  264. color: rgba(255, 255, 255, 100);
  265. font-size: 16px;
  266. text-align: center;"
  267. @click="submit" shape="circle">开始充电</u-button>
  268. </view> -->
  269. <u-modal v-model="showmodal" :show-cancel-button="true" title="余额不足" confirm-text="前往充值"
  270. content="账户余额不足,充值成功后开始充电" @confirm="show=true"></u-modal>
  271. <u-popup v-model="companyCarSelectBl" :closeable="true" mode="bottom" border-radius="30">
  272. <view class="indexData5content">
  273. <view class="contentTitle">
  274. 选择充电车辆
  275. </view>
  276. <view
  277. v-if="companyPaySelect&&(companyPaySelect.carList&&companyPaySelect.carList.length==0||companyPaySelect.carList==null)"
  278. style=" text-align: center;">
  279. <img src="@/assets/static/img/暂无数据-缺省页.png" alt="">
  280. <p class="oldTextjp2">未分配车辆,请联系管理员</p>
  281. </view>
  282. <scroll-view v-else scroll-y="true" style="height: 520rpx;">
  283. <view style="padding-bottom: 30rpx;">
  284. <u-radio-group v-model="companyPaySelect.car" size="42">
  285. <view class="contentbody">
  286. <view v-for="(item,index) in companyPaySelect.carList"
  287. @click="companyPaySelect.car=(item.carNum),companyCarSelectBl = false;"
  288. class="contentItem" :key="index">
  289. <view class="span1">{{item.carNum}}</view>
  290. <view class="span2">
  291. <span v-show="!item.vin" style="color:#fff">aaa</span>
  292. <img v-show="item.vin" style="vertical-align: bottom;" width="20"
  293. src="@/assets/img/riLine-link-m.png" />
  294. <span v-show="item.vin" style="color:#999999 ">已关联Vin码</span>
  295. </view>
  296. <view class="span3">
  297. <u-radio style=" overflow: inherit;"
  298. @change="companyPaySelect.car=(item.carNum),companyCarSelectBl = false;"
  299. :name="item.carNum">
  300. <span style="color:#fff">.</span>
  301. </u-radio>
  302. </view>
  303. </view>
  304. </view>
  305. </u-radio-group>
  306. </view>
  307. </scroll-view>
  308. </view>
  309. </u-popup>
  310. <!-- 弹窗2 -->
  311. <!-- 弹窗 -->
  312. <template>
  313. <view>
  314. <u-popup v-model="show" mode="bottom">
  315. <view class="recharge" style="padding-bottom: 0;">
  316. <view class="title lefttitle ">选择充值金额
  317. <span class=" rightspan">当前余额
  318. <span style="color: red;">{{user.balance>0?user.balance.toFixed(2):'0.00'}}元</span>
  319. </span>
  320. </view>
  321. <p style="color: red; font-size: 28rpx;" v-show="selectItem.amountRemark">
  322. {{selectItem.amountRemark}}代金券,退余额时将扣除已使用的优惠券金额
  323. </p>
  324. <view class="rechargeMain">
  325. <view class="recharge-item"
  326. :class="!otherNum_f&&moneyActiveClass_f == item.id ? 'active' : ''"
  327. v-for="(item,index) in moneyList_f" :key="item.id" @click="moneyClick_f(item.id,item)">
  328. {{item.amountDesc?item.amountDesc:item.rechargeAmount+'元'}}
  329. <view class="amount" v-if="item.amountRemark">{{item.amountRemark}}</view>
  330. </view>
  331. </view>
  332. <p class="oldTextjp2" oldstyle="font-size:16px">其他充值金额</p>
  333. <view style="margin-bottom: 32px;">
  334. <view :class="otherNum_f? 'active' : ''" class="recharge-input self-stop"
  335. style="height: 100%;width: 100%;margin-bottom: 8px;">
  336. <ujp-input v-model="otherNum_f" @input="ckInput_f" @focus="focus" type="digit"
  337. :border="true" />
  338. </view>
  339. <view style="color: rgba(153, 153, 153, 100);
  340. font-size: 12px;
  341. text-align: left;
  342. font-family: AlibabaPuHui-regular;"><span style="color:red">*</span>金额范围为1元-500元</view>
  343. </view>
  344. <view class="recharge-btn transactionClass" style="margin-top: 60px;">
  345. <view>
  346. <u-checkbox-group>
  347. <u-checkbox active-color="green" v-model="checked" shape="circle"></u-checkbox>
  348. </u-checkbox-group>
  349. 我已阅读并同意<span @click="gotoUrl('pages/article/details?code=CZXY')"
  350. style="color:#00B962">《充值协议》</span>
  351. </view>
  352. <u-button class="success-btn" shape="circle" type="success" @click="rechargeNow"
  353. style="margin-top: 12px;margin-bottom: 16px;">
  354. <span>微信充值</span>
  355. </u-button>
  356. </view>
  357. </view>
  358. </u-popup>
  359. </view>
  360. </template>
  361. <u-modal v-model="contractSignTimeBl"
  362. :show-confirm-button="true" :show-title="false" :show-cancel-button="true"
  363. cancel-text="放弃充电" confirm-text="同意并充电" @confirm="contractSignTimeSubmit()"
  364. >
  365. <view class="slot-content" style="padding:40rpx; text-align: center;margin-top: 10rpx;">
  366. 我已阅读并同意<br/>
  367. <span style="color: rgba(0, 185, 98, 1);" @click="gotoUrl('pages/article/details?code=YHXY')">《优电联盟用户使用协议》</span>
  368. </view>
  369. </u-modal>
  370. <quickRegistration v-if="personInfo.userType == '1'" @login="loginMethod" :carNum="carNumber" ></quickRegistration>
  371. </view>
  372. </template>
  373. <script>
  374. import * as API from '@/apis/chargeProcess.js'
  375. import * as API_index from '@/apis/index.js'
  376. import * as userApi from '@/apis/user.js'
  377. import * as newsApi from '@/apis/news.js'
  378. import * as API_finance from '@/apis/finance.js'
  379. import {
  380. wxPayJs
  381. } from '@/utils/wxpay'
  382. import {
  383. newDate,daysDistance
  384. } from '@/utils'
  385. import * as Pay from '@/apis/weixin.js'
  386. // import { contentStore } from 'core/core.model'
  387. import quickRegistration from '@/components/QuickRegistration.vue'
  388. export default {
  389. components: {
  390. quickRegistration
  391. },
  392. data() {
  393. return {
  394. fee: 0,
  395. recordId: "",
  396. show2: false,
  397. stationId: "",
  398. elderMode: false,
  399. isback: true,
  400. show: false,
  401. moneyActiveClass_n: "50",
  402. moneyActiveClass: "-1",
  403. moneyActiveClass_f: "-1",
  404. contractSignTime:"",
  405. contractSignTimeBl:false,
  406. detail: {},
  407. couponsuse: '',
  408. showmodal: false,
  409. showmodal2: false,
  410. //提交信息
  411. //提交信息
  412. submitForm_f: {
  413. //paytype:'YE',
  414. },
  415. submitForm: {
  416. deviceNo: '',
  417. channelNo: '',
  418. carNumber: '',
  419. chargeStrategy: 2,
  420. amount: 0
  421. //paytype:'YE',
  422. },
  423. uuid: 0,
  424. user: {},
  425. companyCarSelectBl: false,
  426. companyList: [
  427. ],
  428. companyPaySelect: {
  429. id: "",
  430. car: "aaa"
  431. },
  432. otherNum_f: '',
  433. otherNum: '',
  434. moneyList_f: [],
  435. paySelect: true,
  436. payName: "",
  437. payValueTemp: 0,
  438. payValue: 0,
  439. payList: [{
  440. name: "先付后退",
  441. tips: "游客不享受平台优惠活动",
  442. value: "1",
  443. select: false,
  444. }, {
  445. name: "个人账户支付",
  446. tips: "可使用折扣卡、优惠券、折扣卷等",
  447. value: "2",
  448. select: false,
  449. }, {
  450. name: "单位账户支付",
  451. tips: "账户余额:99999元",
  452. value: "3",
  453. select: false,
  454. }, {
  455. name: "充电金",
  456. tips: "账户余额:99999元",
  457. value: "4",
  458. select: false,
  459. }, {
  460. name: "充电金",
  461. tips: "账户余额:99999元",
  462. value: "4",
  463. select: false,
  464. }],
  465. moneyList: [
  466. {
  467. id: '10',
  468. name: '10'
  469. },
  470. {
  471. id: '20',
  472. name: '20'
  473. },
  474. {
  475. id: '50',
  476. name: '50'
  477. },
  478. {
  479. id: '100',
  480. name: '100'
  481. },
  482. ],
  483. moneyListN: [{
  484. id: '10',
  485. name: '10元'
  486. },
  487. {
  488. id: '20',
  489. name: '20元'
  490. },
  491. {
  492. id: '50',
  493. name: '50元'
  494. }
  495. ],
  496. userCard: null,
  497. canUse: false,
  498. selectObj: {},
  499. value: "",
  500. // 优惠券
  501. listlength: 0,
  502. vin: true,
  503. bannerList: [],
  504. checked: true,
  505. selectItem: {},
  506. personInfo: {},
  507. carNumber: "",
  508. show3: false,
  509. cardList:[],
  510. startMode:"",
  511. paySelectMethodValue:1,
  512. chargingFundsBl:false,
  513. id:""
  514. }
  515. },
  516. computed: {
  517. userCardBool() {
  518. if (this.userCard) {
  519. var date = new Date().getTime()
  520. var reg = new RegExp('-', 'gi')
  521. var str = this.userCard.endTime;
  522. //console.log(str.replace(reg,'/'))
  523. var date2 = new Date(str.replace(reg, '/')).getTime();
  524. if (date < date2) {
  525. return true;
  526. }
  527. }
  528. return false
  529. }
  530. },
  531. onLoad(op) {
  532. if(op.startMode){
  533. this.startMode=op.startMode
  534. }
  535. if(op.id){
  536. this.id=op.id
  537. }
  538. this.uuid = new Date().getTime();
  539. this.stationId = op.stationId;
  540. if (op.deviceNo) {
  541. this.submitForm.deviceNo = op.deviceNo;
  542. this.submitForm.channelNo = op.gun;
  543. this.carNumber = op.carNumber;
  544. this.submitForm.carNumber = op.carNumber;
  545. this.carhelp.setGunIdCharge(this.submitForm);
  546. }
  547. if (op.vin == 'no') {
  548. this.vin = false;
  549. }
  550. if (op.isback) {
  551. this.isback = false;
  552. }
  553. this.useCoupon()
  554. var couponsuse = "充电结束后满足金额即可生效,提前结束充电则优惠券不生效并返回"
  555. // img="https://yktwechat.xiaoxinda.com/config/xxd2021.jpg"
  556. if (couponsuse) {
  557. this.couponsuse = couponsuse
  558. }
  559. this.init()
  560. },
  561. onReady() {
  562. this.getBannerInfo("charge-start")
  563. this.elderMode = this.carhelp.get('getElderModeClass') == '长辈模式';
  564. if (this.elderMode)
  565. this.theme('elder')
  566. else
  567. this.theme('standard')
  568. this.loginMethod()
  569. },
  570. onShow() {
  571. this.personInfo = this.carhelp.getPersonInfo()
  572. var obj = this.carhelp.get("chooseCoupons");
  573. if (obj) {
  574. if (obj.uuid == this.uuid) {
  575. this.selectObj = obj.selectObj;
  576. }
  577. }
  578. this.getHomePage()
  579. },
  580. methods: {
  581. userCardBtn(item){
  582. if(this.userCard&&this.userCard.id==item.id){
  583. this.userCard=null
  584. uni.showToast({
  585. title: "已经取消选中"
  586. })
  587. }else{
  588. this.userCard=item
  589. }
  590. },
  591. carDet(t) {
  592. if(this.submitForm.carNumber){
  593. return
  594. }
  595. this.onShowRole = true
  596. var url="/pages/user/car/carDet?jpcode=jp_team51_charge_id:A_" + this.id
  597. uni.navigateTo({
  598. url: url
  599. })
  600. },
  601. loginMethod(form){
  602. this.personInfo = this.carhelp.getPersonInfo()
  603. // if(plus){
  604. // this.userCard=plus.userCard;
  605. // }
  606. if (this.personInfo && this.personInfo.userType == "1") {
  607. this.show3 = true
  608. }
  609. this.personInfo = this.carhelp.getPersonInfo()
  610. if (this.personInfo.userType == "1") {
  611. this.payValueTemp = 0;
  612. this.payValue = 0;
  613. } else {
  614. this.payValueTemp = 1;
  615. var payValueDefault = this.carhelp.get("payValueDefault");
  616. if(this.user&&this.user.chargingFunds>0){
  617. payValueDefault="4"
  618. }
  619. this.payValue = 1;
  620. if (payValueDefault == "1" || payValueDefault == "0") {
  621. this.payValue = payValueDefault;
  622. }
  623. if (payValueDefault == "1" || payValueDefault == "4") {
  624. this.paySelectMethodValue = payValueDefault;
  625. this.payValue = payValueDefault;
  626. }
  627. if(payValueDefault==4){
  628. this.chargingFundsBl=true;
  629. }
  630. }
  631. this.payName = this.payList[this.payValue].name;
  632. this.useCoupon()
  633. if(form){
  634. this.submitForm.carNumber=form.carNumber
  635. }
  636. },
  637. thisdaysDistance(endTime){
  638. var date=new Date()
  639. var date2=newDate(endTime);
  640. return daysDistance(date,date2)
  641. },
  642. getChargeList() {
  643. uni.showLoading({
  644. title: "加载中",
  645. mask: true,
  646. })
  647. API_index.personCardList({
  648. }).then((res) => {
  649. uni.hideLoading();
  650. this.cardList=res.data.cardList
  651. }).catch(error => {
  652. uni.showToast({
  653. title: error,
  654. icon: "none"
  655. })
  656. })
  657. },
  658. gotoLogin() {
  659. this.onShowRole = true
  660. if (false) {
  661. } else {
  662. uni.navigateTo({
  663. url: "/pages/login/login?jpcode=jp_team51_charge_id:A_" + this.submitForm.deviceNo
  664. })
  665. }
  666. },
  667. paySelectShow() {
  668. if (this.personInfo.userType == "1") {
  669. } else {
  670. this.show = true;
  671. this.recordId = '';
  672. this.otherNum_f = '';
  673. this.fee = 0
  674. }
  675. },
  676. //companyPaySelect
  677. paySelectCompany() {
  678. },
  679. paySelectMethod(value, company) {
  680. console.log(value)
  681. if (this.personInfo.userType == "1") {
  682. uni.showToast({
  683. title: "游客模式只支持“先付后退”"
  684. })
  685. } else {
  686. this.payValue = value
  687. if (value == 2) {
  688. this.companyPaySelect = company
  689. if (company.carList && company.carList.length == 1) {
  690. //this.companyPaySelect=entRegList[0]
  691. this.companyPaySelect.car = company.carList[0].carNum;
  692. }
  693. }
  694. this.$forceUpdate()
  695. }
  696. },
  697. moneyClick_f(index, item) {
  698. this.otherNum_f = '';
  699. this.moneyActiveClass_f = index;
  700. if (item) {
  701. this.selectItem = item;
  702. // if(item.imgUrl){
  703. // this.selectImg=item
  704. // }
  705. }
  706. },
  707. rechargeNow2() {
  708. //先付后退
  709. this.submitForm_f = {};
  710. var fee = 0;
  711. this.submitForm_f.amount = this.fee;
  712. uni.showLoading({
  713. title: "加载中",
  714. mask: true,
  715. })
  716. if (this.recordId) {
  717. this.submitForm_f.recordId = this.recordId
  718. }
  719. //(this.submitForm)
  720. this.wxpy()
  721. },
  722. rechargeNow() {
  723. if (!this.checked) {
  724. uni.showToast({
  725. title: "请同意《充值协议》后进行充值"
  726. })
  727. return
  728. }
  729. this.submitForm_f = {};
  730. var fee = 0;
  731. if (!this.otherNum_f) {
  732. this.submitForm_f.chargingMarketingId = this.selectItem.id;
  733. fee = this.selectItem.rechargeAmount
  734. } else {
  735. this.submitForm_f.amount = this.otherNum_f
  736. fee = this.otherNum_f
  737. }
  738. if (this.fee) {
  739. var thisfee = this.fee
  740. if (this.fee > parseFloat(fee)) {
  741. uni.showToast({
  742. title: `最少充值${thisfee}元才能启动充电`
  743. })
  744. return
  745. }
  746. }
  747. uni.showLoading({
  748. title: "加载中",
  749. mask: true,
  750. })
  751. if (this.recordId) {
  752. this.submitForm_f.recordId = this.recordId
  753. }
  754. //(this.submitForm)
  755. this.wxpy()
  756. },
  757. wxpy() {
  758. var obj = {
  759. ...this.submitForm_f
  760. }
  761. if (obj.amount) {
  762. for (var i in this.moneyList_f) {
  763. var item = this.moneyList_f[i]
  764. if (item.rechargeAmount == obj.amount) {
  765. delete obj.amount;
  766. obj.chargingMarketingId = item.id
  767. break
  768. }
  769. }
  770. }
  771. Pay.wxpay(obj).then((response) => {
  772. if (!response.result) {
  773. uni.showToast({
  774. title: response.message
  775. })
  776. return
  777. }
  778. var data = response.data
  779. uni.hideLoading()
  780. //("Pay+"+new Date().getTime())
  781. wxPayJs(data);
  782. }).catch(error => {
  783. uni.showToast({
  784. title: error
  785. })
  786. })
  787. },
  788. focus() {
  789. console.log(0)
  790. uni.pageScrollTo({
  791. scrollTop: 999999,
  792. duration: 0
  793. })
  794. },
  795. init() {
  796. var data = {
  797. type: 2,
  798. };
  799. API_finance.marketingData(data).then((res) => {
  800. this.moneyList_f = res.data.chargingMarketingList
  801. if (this.moneyList_f.length > 0) {
  802. this.selectItem = this.moneyList_f[0];
  803. this.moneyActiveClass_f = this.moneyList_f[0].id
  804. //(this.moneyActiveClass)
  805. }
  806. var list = res.data.priceList
  807. if (list.length) {
  808. this.moneyListN = [];
  809. for (var i in list) {
  810. this.moneyListN.push({
  811. id: list[i],
  812. name: list[i] + "元"
  813. })
  814. }
  815. this.moneyActiveClass_n = list[0]
  816. }
  817. }).catch(error => {
  818. uni.showToast({
  819. title: error
  820. })
  821. })
  822. },
  823. clickBanner(index) {
  824. var mod = this.bannerList[index]
  825. if (mod.linkUrl.indexOf('http') == 0) {
  826. window.location = mod.linkUrl;
  827. } else if (mod.linkUrl.indexOf('#/') == 0) {
  828. if (mod.linkUrl.indexOf("?") == -1) {
  829. mod.linkUrl += '?';
  830. }
  831. //window.location=mod.linkUrl;
  832. var url = mod.linkUrl.split("#")[1]
  833. //window.location = mod.clickUrl;
  834. uni.navigateTo({
  835. url: url
  836. })
  837. } else if (mod.linkUrl == '#' || mod.linkUrl == '') {
  838. } else {
  839. uni.navigateTo({
  840. url: mod.linkUrl
  841. })
  842. }
  843. },
  844. getBannerInfo(code) {
  845. newsApi.getBannerInfo(code).then((res) => {
  846. this.bannerList = res.data;
  847. // document.getElementsByClassName("uni-swiper-wrapper")[0].parentNode.style="background-color: rgb(255, 255, 255); height: 300px;"
  848. }).catch(error => {
  849. uni.showToast({
  850. title: error,
  851. icon: "none"
  852. })
  853. })
  854. },
  855. getPile() {
  856. },
  857. theme(type) {
  858. if (type == 'elder') {
  859. document.getElementsByTagName('body')[0].setAttribute('data-theme', type);
  860. } else {
  861. document.getElementsByTagName('body')[0].setAttribute('data-theme', type);
  862. }
  863. },
  864. chooseCoupons() {
  865. this.submitInit()
  866. this.gotoUrl('pages/user/coupon/chooseCoupons?uuid=' + this.uuid + "&amount=" + this.submitForm.amount +
  867. "&stationId=" + this.stationId)
  868. },
  869. ckInput_f(text) {
  870. if (text.indexOf('.') > 0) {
  871. var k = text.split(".")[1]
  872. if (k.length >= 3) {
  873. this.$nextTick(() => {
  874. text = parseFloat(text).toFixed(2);
  875. this.otherNum_f = text
  876. })
  877. }
  878. }
  879. var t = Number(text);
  880. if (t < 1) {
  881. this.$nextTick(() => {
  882. this.otherNum_f = '';
  883. })
  884. }
  885. if (t > 500) {
  886. this.$nextTick(() => {
  887. this.otherNum_f = 500;
  888. })
  889. }
  890. },
  891. ckInput(text) {
  892. if (text.indexOf('.') > 0) {
  893. this.$nextTick(() => {
  894. this.otherNum = text.substring(0, text.indexOf('.'))
  895. uni.showToast({
  896. title: "请输入正整数"
  897. })
  898. })
  899. }
  900. var t = Number(text);
  901. if (t < 1) {
  902. this.$nextTick(() => {
  903. this.otherNum = '';
  904. })
  905. }
  906. if (t > 500) {
  907. this.$nextTick(() => {
  908. this.otherNum = 500;
  909. })
  910. }
  911. this.selectJudge();
  912. },
  913. moneyClick(index) {
  914. this.otherNum = ''
  915. this.moneyActiveClass = index;
  916. this.selectJudge();
  917. },
  918. selectJudge() {
  919. this.submitInit()
  920. if (this.submitForm.amount == 0) {
  921. return
  922. }
  923. if (this.selectObj.id && this.selectObj.threshold > this.submitForm.amount) {
  924. uni.showToast({
  925. title: "请重新选择优惠券"
  926. })
  927. this.selectObj = {}
  928. }
  929. },
  930. radioChange(e) {},
  931. confirm() {
  932. ////(JSON.stringify(this.submitForm))
  933. if (this.payValue == 1||this.payValue == 4) {
  934. if (this.selectObj.id) {
  935. this.submitForm.userCouponId = this.selectObj.id
  936. }
  937. if (this.userCardBool && this.canUse && this.vin) {
  938. this.submitForm.userCardId = this.userCard.id
  939. }
  940. } else {
  941. this.submitForm.userCouponId = ""
  942. this.submitForm.userCardId = ""
  943. }
  944. if (this.payValue == 2) {
  945. if (!this.companyPaySelect.car) {
  946. uni.showToast({
  947. title: '请选择充车辆'
  948. })
  949. return
  950. }
  951. this.submitForm.vipUserId = this.companyPaySelect.vipUser.id;
  952. this.submitForm.carNumber = this.companyPaySelect.car;
  953. } else {
  954. this.submitForm.carNumber = this.carNumber;
  955. this.submitForm.vipUserId = ""
  956. }
  957. uni.showLoading({
  958. title: "加载中",
  959. mask: true,
  960. })
  961. this.carhelp.set("payValueDefault", this.payValue);
  962. if (this.payValue == 2) {
  963. this.carhelp.set("payValueDefault3", {
  964. carNumber: this.companyPaySelect.car,
  965. companyId: this.companyPaySelect.enterpriseAccount.id,
  966. });
  967. }
  968. if(this.startMode){
  969. this.submitForm.startMode=this.startMode; //判断充电入口
  970. }
  971. //this.submitForm.deviceNo = this.detail.deviceNo;
  972. API.startCarCharging(this.submitForm).then((res) => {
  973. //(JSON.stringify(this.res))
  974. if (res.data.status == "5") {
  975. uni.hideLoading()
  976. if (this.submitForm.payType == "1") {
  977. this.recordId = res.data.recordId;
  978. this.fee = res.data.fee;
  979. this.rechargeNow2() //先付后退
  980. } else {
  981. if (this.payValue == 2) {
  982. uni.showToast({
  983. title: "余额不足,请联系企业单位人员"
  984. })
  985. } else {
  986. this.showmodal = true;
  987. this.recordId = res.data.recordId;
  988. var fee = res.data.fee;
  989. this.fee = (fee - this.user.balance).toFixed(2);
  990. this.otherNum_f = this.fee;
  991. }
  992. }
  993. } else {
  994. this.gotoUrl("pages/searchPile/chargeProcess/dcCharging?id=" + res.data.recordId);
  995. }
  996. }).catch((error)=> {
  997. uni.hideLoading()
  998. if (error == '用户账户余额不足!') {
  999. } else {
  1000. // uni.showToast({
  1001. // title: error
  1002. // })
  1003. uni.showModal({
  1004. title: "提示",
  1005. content: error,
  1006. //showCancel: false,
  1007. confirmText: "首页>找桩",
  1008. success: res1 => {
  1009. if (res1.confirm) {
  1010. //this.alerttipsCk()
  1011. uni.navigateTo({
  1012. url: '/pages/searchPile/searchPile'
  1013. })
  1014. } else if (res1.cancel) {
  1015. //('用户点击取消');
  1016. }
  1017. }
  1018. })
  1019. }
  1020. })
  1021. },
  1022. thisendTime(endTime){
  1023. if(endTime){
  1024. var reg=new RegExp('-','gi')
  1025. var str=endTime.substring(0,10).replace(reg,'.')
  1026. return str
  1027. }
  1028. return ''
  1029. },
  1030. getHomePage() {
  1031. uni.showLoading({
  1032. title: "加载中",
  1033. mask: true,
  1034. })
  1035. API.userCard({
  1036. stationId: this.stationId
  1037. }).then((res) => {
  1038. this.userCard = res.data.regUserCard
  1039. this.canUse = res.data.canUse
  1040. //this.user = res.data
  1041. API.personalCenter({
  1042. stationId: this.stationId
  1043. }).then((res2) => {
  1044. this.user = res2.data
  1045. this.contractSignTime=res2.data.regUser.contractSignTime
  1046. if(this.user.chargingFunds){
  1047. this.chargingFundsBl=true;
  1048. }
  1049. var entRegList = res2.data.entRegList;
  1050. this.companyList = []
  1051. for (var i in entRegList) {
  1052. var item = entRegList[i]
  1053. if (item.enterpriseAccount) {
  1054. this.companyList.push(item)
  1055. }
  1056. }
  1057. this.isReady = true;
  1058. uni.hideLoading()
  1059. var payValueDefault = this.carhelp.get("payValueDefault");
  1060. if (payValueDefault == "2") {
  1061. var payValueDefault3 = this.carhelp.get("payValueDefault3");
  1062. for (var i in this.companyList) {
  1063. var item = this.companyList[i]
  1064. if (item.enterpriseAccount.id == payValueDefault3.companyId) {
  1065. this.companyPaySelect = item;
  1066. for (var j in item.carList) {
  1067. var car = item.carList[j]
  1068. if (car.carNum == payValueDefault3.carNumber) {
  1069. this.companyPaySelect.car = payValueDefault3.carNumber;
  1070. this.payValue = payValueDefault;
  1071. }
  1072. }
  1073. }
  1074. }
  1075. }
  1076. this.getChargeList()
  1077. this.loginMethod()
  1078. }).catch(error => {
  1079. uni.showToast({
  1080. title: error
  1081. })
  1082. })
  1083. }).catch(error => {
  1084. uni.showToast({
  1085. title: error
  1086. })
  1087. })
  1088. },
  1089. useCoupon() {
  1090. var obj = {
  1091. status: 0,
  1092. stationId: this.stationId,
  1093. hideCardCoupon: 1
  1094. }
  1095. if (this.userCardBool) {
  1096. obj.userCardId = this.userCard.id
  1097. }
  1098. userApi.couponList(obj).then((res) => {
  1099. this.listlength = res.data.recordsTotal;
  1100. }).catch(error => {
  1101. uni.showToast({
  1102. title: error
  1103. })
  1104. })
  1105. },
  1106. submitInit() {
  1107. if (this.moneyActiveClass == -1 && !this.otherNum) {
  1108. this.submitForm.chargeStrategy = 0;
  1109. this.submitForm.amount = 0
  1110. } else {
  1111. this.submitForm.chargeStrategy = 2;
  1112. if (this.otherNum) {
  1113. this.submitForm.amount = this.otherNum
  1114. } else {
  1115. this.submitForm.amount = this.moneyActiveClass
  1116. }
  1117. }
  1118. },
  1119. contractSignTimeSubmit(){
  1120. this.contractSignTime=true;
  1121. this.submit()
  1122. },
  1123. updateContractSignTime(){
  1124. if(this.user&&this.user.regUser&&!this.user.regUser.contractSignTime){
  1125. API.updateContractSignTime({
  1126. openId:this.carhelp.getOpenId()
  1127. }).then((res) => {
  1128. }).catch(error => {
  1129. uni.showToast({
  1130. title: error
  1131. })
  1132. })
  1133. }
  1134. },
  1135. submit() {
  1136. if(!this.contractSignTime){
  1137. this.contractSignTimeBl=true;
  1138. return
  1139. }
  1140. if (!this.submitForm.channelNo) {
  1141. uni.showToast({
  1142. title: '请先选择充电通道'
  1143. })
  1144. return
  1145. }
  1146. this.submitForm.payType = this.payList[this.payValue].value;
  1147. if (this.submitForm.payType == "1") {
  1148. this.submitForm.amount = this.moneyActiveClass_n
  1149. this.submitForm.chargeStrategy = 2;
  1150. } else {
  1151. this.submitInit()
  1152. }
  1153. this.updateContractSignTime()
  1154. this.confirm()
  1155. },
  1156. }
  1157. }
  1158. </script>
  1159. <style>
  1160. page {
  1161. background-color: #fff;
  1162. }
  1163. </style>
  1164. <style lang="scss" scoped>
  1165. .exchange {
  1166. margin-right: 32rpx;
  1167. color: rgba(119, 119, 119, 100);
  1168. //font-size: 24rpx;
  1169. font-size: 32rpx;
  1170. //margin-right: 6rpx;
  1171. }
  1172. .rightspan {
  1173. float: right;
  1174. }
  1175. .indexData5content {
  1176. padding: 40rpx 40rpx;
  1177. .contentTitle {
  1178. color: #333333;
  1179. font-size: 40rpx;
  1180. font-weight: bold;
  1181. margin-bottom: 16rpx;
  1182. }
  1183. .contentbody {
  1184. width: 100%;
  1185. display: block;
  1186. .contentItem {
  1187. border-bottom: 1px solid #ededed;
  1188. padding: 12rpx 0;
  1189. font-size: 32rpx;
  1190. display: flex;
  1191. width: 100%;
  1192. .span1 {
  1193. padding-top: 8rpx;
  1194. width: 50%;
  1195. }
  1196. .span2 {
  1197. padding-top: 8rpx;
  1198. width: 35%;
  1199. }
  1200. .span3 {
  1201. padding-top: 8rpx;
  1202. padding-left: 8rpx;
  1203. width: 10%;
  1204. }
  1205. }
  1206. }
  1207. }
  1208. .textinfo {
  1209. padding: 40rpx;
  1210. font-size: 24rpx !important;
  1211. color: #999999;
  1212. p {
  1213. font-size: 32rpx !important;
  1214. color: #101010;
  1215. font-weight: bold;
  1216. }
  1217. }
  1218. .lefttitle {
  1219. font-weight: bold;
  1220. font-size: 32rpx
  1221. }
  1222. @import "@/_theme.scss";
  1223. .listlength {
  1224. float: right;
  1225. padding-right: 20rpx;
  1226. }
  1227. /deep/.u-drawer-content {
  1228. border-radius: 10px 10px 0 0
  1229. }
  1230. /deep/.u-radio-group {
  1231. width: 100%;
  1232. }
  1233. /deep/.u-radio {
  1234. position: relative;
  1235. }
  1236. /deep/.u-radio__icon-wrap {
  1237. position: absolute;
  1238. right: 0;
  1239. }
  1240. .recharge-item2 {
  1241. @include themeify {
  1242. font-size: themed('font-size2') !important;
  1243. }
  1244. /* font-size: 14px !important;*/
  1245. color: #999999;
  1246. }
  1247. .paySelect {
  1248. padding: 32rpx;
  1249. .title {
  1250. font-size: 40rpx
  1251. }
  1252. p {
  1253. width: 100%;
  1254. span {
  1255. color: #666;
  1256. }
  1257. .u-radio__label {
  1258. color: #333333;
  1259. }
  1260. .u-radio {
  1261. width: 100% !important;
  1262. ;
  1263. }
  1264. color: #333333;
  1265. margin-top: 16rpx;
  1266. font-size:32rpx;
  1267. }
  1268. }
  1269. .recharge {
  1270. padding: 32rpx;
  1271. padding-bottom: 250rpx;
  1272. .title {
  1273. @include themeify {
  1274. font-size: themed('font-size3');
  1275. }
  1276. /* font-size: 16px;*/
  1277. position: relative;
  1278. }
  1279. p {
  1280. color: #666;
  1281. margin-top: 4px;
  1282. }
  1283. .self-stop.active {
  1284. background-color: #EFFFF7;
  1285. border-color: #00B962;
  1286. color: #00B962;
  1287. }
  1288. .rechargeMain {
  1289. display: flex;
  1290. flex-wrap: wrap;
  1291. // justify-content: space-between;
  1292. margin-top: 24rpx;
  1293. margin-bottom: 10rpx;
  1294. .recharge-item {
  1295. .u-input {
  1296. text-align: center !important;
  1297. }
  1298. width: 31%;
  1299. border: 1px solid #e3e3e3;
  1300. padding: 20rpx 0;
  1301. border-radius: 4px;
  1302. text-align: center;
  1303. margin-bottom: 20rpx;
  1304. position: relative;
  1305. margin-left: 10rpx;
  1306. @include themeify {
  1307. font-size: themed('font-size3');
  1308. }
  1309. /* font-size: 16px;*/
  1310. }
  1311. .active {
  1312. background-color: #EFFFF7;
  1313. border-color: #00B962;
  1314. color: #00B962;
  1315. }
  1316. }
  1317. .self-stop {
  1318. width: 105px;
  1319. /* height: 48px;
  1320. line-height: 48px;*/
  1321. border-radius: 4px;
  1322. color: #101010;
  1323. @include themeify {
  1324. font-size: themed('font-size3');
  1325. height: themed('font-size19');
  1326. line-height: themed('font-size19')
  1327. }
  1328. /* font-size: 16px;*/
  1329. text-align: center;
  1330. font-family: Arial;
  1331. border: 1px solid rgba(227, 227, 227, 100);
  1332. margin-top: 12px;
  1333. }
  1334. }
  1335. .recharge-input {
  1336. margin-top: 8px;
  1337. margin-bottom: 32px;
  1338. }
  1339. .recharge-radio {
  1340. margin-top: 10px;
  1341. .recharge-radio-item {
  1342. display: flex;
  1343. align-items: center;
  1344. }
  1345. .recharge-radio-name {
  1346. margin-left: 8px;
  1347. }
  1348. }
  1349. .but-box {
  1350. width: 89.3%;
  1351. height: 44px;
  1352. margin: 0 auto;
  1353. position: fixed;
  1354. bottom: 0;
  1355. right: 0;
  1356. left: 0;
  1357. }
  1358. //优惠券
  1359. .discounts {
  1360. margin-top: 10px;
  1361. width: 100%;
  1362. .title {
  1363. width: 100%;
  1364. .title-1 {
  1365. /* height: 22px;*/
  1366. color: rgba(16, 16, 16, 100);
  1367. @include themeify {
  1368. font-size: themed('font-size3');
  1369. height: themed('font-size6');
  1370. }
  1371. /* font-size: 16px;*/
  1372. }
  1373. .title-2 {
  1374. margin-left: 4px;
  1375. @include themeify {
  1376. font-size: themed('font-size2');
  1377. line-height: themed('font-size5');
  1378. }
  1379. /* font-size: 14px;
  1380. line-height: 20px;*/
  1381. }
  1382. .title-3 {
  1383. float: right;
  1384. @include themeify {
  1385. font-size: themed('font-size3');
  1386. line-height: themed('font-size5');
  1387. }
  1388. /* height: 19px;
  1389. font-size: 16px;*/
  1390. }
  1391. }
  1392. .select {
  1393. position: relative;
  1394. /deep/.u-radio {
  1395. padding: 36rpx 32rpx;
  1396. margin-top: 12px;
  1397. width: 100%;
  1398. height: 48px;
  1399. border-radius: 4px;
  1400. background-color: rgba(255, 255, 255, 100);
  1401. text-align: center;
  1402. border: 1px solid rgba(227, 227, 227, 100);
  1403. position: relative;
  1404. }
  1405. // /deep/.u-radio:nth-child(3) {
  1406. //
  1407. // }
  1408. /deep/.u-radio__icon-wrap {
  1409. left: 32rpx;
  1410. background-color: #fff;
  1411. }
  1412. /deep/.u-radio__label {
  1413. margin-left: 40px;
  1414. }
  1415. }
  1416. .explain {
  1417. width: 64px;
  1418. /* height: 24px;
  1419. line-height: 24px;*/
  1420. position: absolute;
  1421. top: 10px;
  1422. right: 12px;
  1423. border-radius: 4px;
  1424. background-color: rgba(255, 255, 255, 100);
  1425. text-align: center;
  1426. border: 1px solid rgba(227, 227, 227, 100);
  1427. color: rgba(0, 185, 98, 100);
  1428. /* font-size: 12px;*/
  1429. @include themeify {
  1430. font-size: themed('font-size1');
  1431. line-height: themed('font-size7');
  1432. height: themed('font-size7');
  1433. }
  1434. }
  1435. }
  1436. // 优惠券2
  1437. .discounts2 {
  1438. margin-top: 10px;
  1439. width: 100%;
  1440. display: flex;
  1441. justify-content: space-between;
  1442. .left {
  1443. /* width: 70px;*/
  1444. // height: 20px;
  1445. color: rgba(16, 16, 16, 100);
  1446. /* font-size: 20px;*/
  1447. @include themeify {
  1448. width: 160rpx;
  1449. font-size: 40rpx;
  1450. }
  1451. }
  1452. .right {
  1453. /*
  1454. height: 16px;
  1455. line-height: 28px;*/
  1456. color: rgba(255, 61, 0, 100);
  1457. @include themeify {
  1458. font-size: themed('font-size3');
  1459. height: themed('font-size3');
  1460. line-height: themed('font-size9');
  1461. }
  1462. /* font-size: 16px;*/
  1463. text-align: right;
  1464. display: flex;
  1465. }
  1466. .iconfont {
  1467. @include themeify {
  1468. font-size: themed('font-size7');
  1469. line-height: themed('font-size10');
  1470. }
  1471. /* line-height: 29px;*/
  1472. text-align: center;
  1473. color: #b3b3b3;
  1474. /* font-size: 24px;*/
  1475. }
  1476. }
  1477. // 会员活动
  1478. .member {
  1479. margin-top: 24rpx;
  1480. display: flex;
  1481. justify-content: space-between;
  1482. flex-wrap: wrap;
  1483. align-items: center;
  1484. .actively {
  1485. color: rgba(119, 119, 119, 1);
  1486. font-size: 36rpx;
  1487. }
  1488. .type,
  1489. .right {
  1490. color: rgba(16, 18, 18, 100);
  1491. font-size: 36rpx;
  1492. //line-height: 28px;
  1493. padding-right: 10px;
  1494. display: flex;
  1495. align-items: center;
  1496. }
  1497. .iconfont {
  1498. @include themeify {
  1499. font-size: themed('font-size7');
  1500. line-height: themed('font-size10');
  1501. }
  1502. /* line-height: 29px;*/
  1503. text-align: center;
  1504. color: #b3b3b3;
  1505. /* font-size: 24px;*/
  1506. }
  1507. }
  1508. // 尾部
  1509. .botton {
  1510. border: 1px solid rgba(242, 242, 242, 1);
  1511. background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 100%);
  1512. position: fixed;
  1513. //background: #fff;
  1514. width: 100%;
  1515. padding: 24rpx 40rpx;
  1516. line-height: 88rpx;
  1517. bottom: 0;
  1518. left: 0;
  1519. z-index: 999;
  1520. //padding: 0px 32rpx 32rpx;
  1521. padding-bottom: 12px;
  1522. button {
  1523. display: flex;
  1524. align-items: center;
  1525. justify-content: center;
  1526. //width: 45.8%;
  1527. // background-color: black;
  1528. // color: #fff;
  1529. // background-color: rgba(255, 255, 255, 1);
  1530. // color: rgba(0, 185, 98, 1);
  1531. background-color: rgba(0, 185, 98, 100);
  1532. color: rgba(255, 255, 255, 100);
  1533. height: 88rpx;
  1534. border-radius: 50px;
  1535. font-size: 32rpx;
  1536. }
  1537. }
  1538. .couponsuse {
  1539. color: rgba(153, 153, 153, 100);
  1540. margin-top: 10px;
  1541. font-size: 14px;
  1542. text-align: left;
  1543. font-family: AlibabaPuHui-regular;
  1544. }
  1545. .to-recharge {
  1546. padding: 0 16px;
  1547. line-height: 36px;
  1548. border-radius: 50px 0px 0px 50px;
  1549. background: linear-gradient(#FF9000, #FFB700);
  1550. color: rgba(255, 255, 255, 100);
  1551. font-size: 16px;
  1552. text-align: center;
  1553. position: absolute;
  1554. right: -16px;
  1555. top: 0;
  1556. }
  1557. /deep/.u-checkbox__icon-wrap--checked {
  1558. background-color: #2979ff !important;
  1559. border-color: #2979ff !important;
  1560. }
  1561. .amount {
  1562. // width: 41.9%;
  1563. height: 16px;
  1564. line-height: 15px;
  1565. border-radius: 0px 4px 0px 4px;
  1566. background-color: #ec4530; //rgba(0, 185, 98, 100)
  1567. color: rgba(255, 255, 255, 100);
  1568. font-size: 10px;
  1569. text-align: center;
  1570. position: absolute;
  1571. top: 0;
  1572. right: 0;
  1573. }
  1574. .card {
  1575. overflow: hidden;
  1576. padding: 10px;
  1577. margin-top: 10px;
  1578. .title {
  1579. font-weight: bold;
  1580. }
  1581. }
  1582. .cardselect {
  1583. border-radius: 8px;
  1584. border: 2px solid rgba(0, 185, 98, 1);
  1585. .title {
  1586. color: #00B962;
  1587. font-weight: bold;
  1588. }
  1589. .cardgo {
  1590. position: relative;
  1591. .cardinfo {
  1592. background-color: #00b962;
  1593. width: 64rpx;
  1594. height: 64rpx;
  1595. position: absolute;
  1596. top: -12px;
  1597. right: -12px;
  1598. border-radius: 0 0 0 8px;
  1599. img {
  1600. width: 64rpx;
  1601. }
  1602. }
  1603. }
  1604. }
  1605. .cardno {
  1606. border: 2px solid rgba(204, 204, 204, 1);
  1607. border-radius: 8px;
  1608. .title {
  1609. font-weight: bold;
  1610. }
  1611. .cardgo {
  1612. position: relative;
  1613. .cardinfo {
  1614. background-color: rgba(204, 204, 204, 1);
  1615. width: 64rpx;
  1616. height: 64rpx;
  1617. position: absolute;
  1618. top: -12px;
  1619. right: -12px;
  1620. border-radius: 0 0 0 8px;
  1621. img {
  1622. width: 64rpx;
  1623. }
  1624. }
  1625. }
  1626. }
  1627. .classtable {
  1628. margin: 40rpx 40rpx;
  1629. .td1 {
  1630. width: 50rpx;
  1631. padding: 12rpx 0;
  1632. text-align: center;
  1633. img {
  1634. width: 48rpx;
  1635. height: 48rpx;
  1636. }
  1637. font-size: 10px;
  1638. }
  1639. .td2 {
  1640. padding-left: 16rpx;
  1641. font-size: 12px;
  1642. line-height: 24px;
  1643. .dian {
  1644. padding: 0 10rpx
  1645. }
  1646. }
  1647. }
  1648. .carImg {
  1649. margin: 0 40rpx;
  1650. img {
  1651. width: 100%;
  1652. }
  1653. }
  1654. .cardListView{
  1655. .cardListItemTitle{
  1656. color: #777777;
  1657. font-size: 36rpx;
  1658. }
  1659. .cardListItem{
  1660. // margin:5px 4px;
  1661. //border: 1px solid ;
  1662. border: 2px solid #cccccc;
  1663. // border: 2px solid #cccccc;
  1664. // border-radius: 8px;
  1665. // padding: 3px;
  1666. border-radius: 6px;
  1667. .cardListName{
  1668. font-size: 34rpx;
  1669. }
  1670. .cardListText{
  1671. font-size: 24rpx;
  1672. display:flex;
  1673. justify-content: space-between;
  1674. }
  1675. }
  1676. .cardselect{
  1677. border: 2px solid #00b962;
  1678. background-color: #fff ;
  1679. color: #00b962;
  1680. }
  1681. }
  1682. .rechargeBalance{
  1683. display: flex;
  1684. .rechargeBalanceItem{
  1685. margin-right: 6px;
  1686. color: #666;
  1687. }
  1688. }
  1689. .greyTips{
  1690. background-color: #cccccc;
  1691. // color: #00b962;
  1692. font-weight: bold;
  1693. padding: 30rpx;
  1694. margin-top: 20rpx;
  1695. border-radius: 8px;
  1696. }
  1697. .cost-explain2{
  1698. .type{
  1699. color: #FF3D00;
  1700. }
  1701. }
  1702. </style>