charge.vue 44 KB

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