charge.vue 44 KB

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