charge.vue 44 KB

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