charge.vue 45 KB

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