index.vue 66 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387
  1. <template>
  2. <view :style="viewColor">
  3. <view class='order-submission'>
  4. <view v-if="order_model==0" class="allAddress" @click="onAddress">
  5. <view class='address acea-row row-between-wrapper' v-if='shippingType == 0 '>
  6. <view class='addressCon' v-if="addressInfo.real_name">
  7. <view class='name'>{{addressInfo.real_name}}
  8. <text class='phone'>{{addressInfo.phone}}</text>
  9. </view>
  10. <view>
  11. <text class='default t-color'
  12. v-if="addressInfo.is_default">[默认]</text>{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.district}}{{addressInfo.street || ''}}{{addressInfo.detail}}
  13. </view>
  14. </view>
  15. <view class='addressCon' v-else>
  16. <view class='setaddress'>设置收货地址</view>
  17. </view>
  18. <view class='iconfont icon-jiantou'></view>
  19. </view>
  20. <view class='line'>
  21. <image src='/static/images/line.jpg'></image>
  22. </view>
  23. </view>
  24. <!-- 商品信息 -->
  25. <view class="storeinfo-wrapper">
  26. <view class="store-item" v-for="(item,index) in cartInfo" :key="index">
  27. <view class="store-title">
  28. <text class="iconfont icon-shangjiadingdan"></text>
  29. <view class="txt" @click="goStore(item.mer_id)">{{item.mer_name}}</view>
  30. <text class="iconfont icon-xiangyou"></text>
  31. </view>
  32. <view v-for="(goods,j) in item.list" :key="j">
  33. <view v-if="goods.product_type == 2">
  34. <view class="product-item">
  35. <view class="img-box">
  36. <image :src="goods.productPresellAttr.image || goods.product.image"></image>
  37. </view>
  38. <view class="content event_content">
  39. <view class="name line1"><text
  40. class="event_name event_bg">预售</text>{{goods.productPresell.store_name}}
  41. </view>
  42. <view class="label" style="width: 70%;">{{goods.productAttr.sku}}</view>
  43. <view class="price">
  44. ¥{{goods.productPresellAttr.presell_price}}
  45. <text>X{{goods.cart_num}}</text>
  46. </view>
  47. <view class="event_ship event_color">发货时间:
  48. <!--全款预售-->
  49. <text
  50. v-if="goods.productPresell.presell_type === 1">{{goods.productPresell.delivery_type === 1 ? '支付后' : '预售结束后'}}{{ goods.productPresell.delivery_day }}天内</text>
  51. <!--定金预售-->
  52. <text
  53. v-if="goods.productPresell.presell_type === 2">{{ goods.productPresell.delivery_type === 1 ? '付尾款后' : '预售结束后' }}{{ goods.productPresell.delivery_day }}天内</text>
  54. </view>
  55. <view class="err-txt" v-if="goods.undelivered && addressInfo.real_name">
  56. <text class="iconfont icon-zhuyi-copy"></text>
  57. <view class="txt">此商品不支持该区域配送</view>
  58. </view>
  59. </view>
  60. </view>
  61. <view v-if="goods.productPresell.presell_type === 2" class="event_payTime">
  62. <view class="event_progress">
  63. <view class="progress_step">
  64. <text class="name color_red">定金</text>
  65. <text
  66. class="price color_red">¥{{ (goods.productPresellAttr.down_price * goods.cart_num).toFixed(2) }}</text>
  67. </view>
  68. <view class="progress_step">
  69. <text class="name">尾款</text>
  70. <text
  71. class="price">¥{{ (goods.productPresellAttr.final_price * goods.cart_num).toFixed(2) }}</text>
  72. </view>
  73. <view class="progress_pay">
  74. {{ goods.productPresell.final_start_time | filterDay}}开始支付尾款
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. <view v-else>
  80. <view class="product-item">
  81. <view class="img-box">
  82. <image :src="goods.productAttr.image || goods.product.image"></image>
  83. </view>
  84. <view class="content">
  85. <view class="name line1">{{goods.product.store_name}}</view>
  86. <view class="label">{{goods.productAttr.sku}}</view>
  87. <view class="price">
  88. <block v-if="order_type == 3">
  89. ¥{{goods.productAssistAttr.assist_price}}
  90. </block>
  91. <block v-else-if="order_type == 4">
  92. ¥{{goods.activeSku.active_price}}
  93. </block>
  94. <block v-else>
  95. ¥{{goods.productAttr.price}}
  96. </block>
  97. <text>X{{goods.cart_num}}</text>
  98. </view>
  99. <view class="err-txt" v-if="goods.undelivered && addressInfo.real_name">
  100. <text class="iconfont icon-zhuyi-copy"></text>
  101. <view class="txt">此商品不支持该区域配送</view>
  102. </view>
  103. </view>
  104. </view>
  105. </view>
  106. </view>
  107. <view class="wrapper">
  108. <view class="boxs">
  109. <view class='item acea-row row-between-wrapper'>
  110. <view>配送方式</view>
  111. <view class='discount' @tap="openShowBox(item,index)">
  112. {{item.order.isTake==0 ? deliveryName :'到店核销'}}
  113. <text v-if="item.delivery_way.length == 2" class='iconfont icon-jiantou'></text>
  114. </view>
  115. </view>
  116. <view class="store-address" v-if="item.order.isTake">
  117. <view class="name line2">{{item.take.mer_take_name}}</view>
  118. <view class="info line2">{{item.take.mer_take_address}}</view>
  119. <view class="map" @click="goMap(item)">
  120. <text class="iconfont icon-chakanditu"></text>
  121. <view class="map_text">查看地图</view>
  122. </view>
  123. </view>
  124. </view>
  125. <view class='item acea-row row-between-wrapper'
  126. v-if='shippingType==0 && item.isTake == 0 && order_model == 0'>
  127. <view>快递费用 <text
  128. v-if="item.list[0].productPresell && item.list[0].productPresell.presell_type == 2">(尾款阶段)</text>
  129. </view>
  130. <view class='discount' v-if='item.order.postage_price > 0'>+¥{{item.order.postage_price}}
  131. </view>
  132. <view class='discount' v-else>免运费</view>
  133. </view>
  134. <view class='item acea-row row-between-wrapper'
  135. v-if="!seckillId && order_type != 3 && order_type != 4 && item.order.enabledCoupon">
  136. <view>店铺优惠券</view>
  137. <block v-if="item.coupon.length>0">
  138. <view class='discount' @tap='couponTap(item,index)'>
  139. <text v-if="item.order.coupon_price>0">优惠¥{{item.order.coupon_price}}</text>
  140. <text v-else>暂未选择优惠券</text>
  141. <text class='iconfont icon-jiantou'></text>
  142. </view>
  143. </block>
  144. <block v-else>
  145. <view class='discount'>暂无优惠券</view>
  146. </block>
  147. </view>
  148. <view v-if="item.openReceipt == 1" class='item acea-row row-between-wrapper'>
  149. <view>开具发票 <text @tap="showInvoice" class="iconfont icon-wenhao1"></text></view>
  150. <view class='discount discount_voice' @tap="goInvoice(item.mer_id)">
  151. {{(item.invoiceData && item.invoiceData.receipt_title) ? item.invoiceData.receipt_title : '不开发票'}}
  152. <text class='iconfont icon-jiantou'></text>
  153. </view>
  154. </view>
  155. <view v-if="order_type === 2 && item.list[0].productPresell.presell_type ==2"
  156. class="item acea-row row-between-wrapper"
  157. style="border-top: 1px solid #f5f5f5; border-bottom: 1px solid #f5f5f5;">
  158. <checkbox-group class="checkgroup" @change='changeIsAgree'>
  159. <text class="iconfont icon-wenhao1"></text>
  160. <text @click="getPresellAgree">我已同意定金不退等预售协议</text>
  161. <checkbox class="checkbox" :checked="isAgree ? true : false" />
  162. </checkbox-group>
  163. </view>
  164. <view class='item acea-row row-between-wrapper' v-if="textareaStatus">
  165. <view style="width: 100px;">备注信息</view>
  166. <input v-if="coupon.status===false" placeholder-class='placeholder'
  167. @input='bindHideKeyboard' value="" name="mark" placeholder='选填备注信息'
  168. v-model="msgObj[item.mer_id]"></input>
  169. </view>
  170. <view class="total">
  171. 共{{item.order.total_num}}件 小计
  172. <view class="price" v-if="item.isTake == 0"><text>¥</text>{{ item.order.pay_price }}</view>
  173. <view class="price" v-if="item.isTake == 1"><text>¥</text>{{ item.order.org_price}}</view>
  174. </view>
  175. </view>
  176. </view>
  177. </view>
  178. <!--虚拟商品-->
  179. <view class="wrapper virtual_form">
  180. <form report-submit='true'>
  181. <view v-for="(item,index) in order_extend">
  182. <view v-if="item.key == 'mobile'" class='item acea-row row-between-wrapper'>
  183. <view><text class="item-require" v-if="item.require">*</text>{{item.title}}</view>
  184. <view class='discount'>
  185. <input type="text" v-model="item.value" placeholder="请填写手机号"
  186. placeholder-class='placeholder' />
  187. </view>
  188. </view>
  189. <view v-if="item.key == 'email'" class='item acea-row row-between-wrapper'>
  190. <view><text class="item-require" v-if="item.require">*</text>{{item.title}}</view>
  191. <view class='discount'>
  192. <input type="text" v-model="item.value" placeholder="请填写邮箱"
  193. placeholder-class='placeholder' />
  194. </view>
  195. </view>
  196. <view v-if="item.key == 'idCard'" class='item acea-row row-between-wrapper'>
  197. <view><text class="item-require" v-if="item.require">*</text>{{item.title}}</view>
  198. <view class='discount'>
  199. <input type="text" v-model="item.value" placeholder="请填写身份证号"
  200. placeholder-class='placeholder' />
  201. </view>
  202. </view>
  203. <view v-if="item.key == 'text' || item.key == 'number'"
  204. class='item acea-row row-between-wrapper'>
  205. <view><text class="item-require" v-if="item.require">*</text>{{item.title}}</view>
  206. <view class='discount'>
  207. <input v-if="item.key == 'text'" type="text" v-model="item.value"
  208. :placeholder="'请填写'+item.title" placeholder-class='placeholder' />
  209. <input v-if="item.key == 'number'" type="number" v-model="item.value"
  210. :placeholder="'请填写'+item.title" placeholder-class='placeholder' />
  211. </view>
  212. </view>
  213. <view v-if="item.key == 'date'" class='item acea-row row-between-wrapper'>
  214. <view><text class="item-require" v-if="item.require">*</text>{{item.title}}</view>
  215. <view class='discount'>
  216. <picker mode="date" :value="item.value" start="1970-01-01" @change="bindDateChange">
  217. <input type="text" @click="getTime(index)" disabled v-model="item.value"
  218. placeholder="请选择日期" placeholder-class='placeholder' />
  219. </picker>
  220. </view>
  221. </view>
  222. <view v-if="item.key == 'time'" class='item acea-row row-between-wrapper'>
  223. <view><text class="item-require" v-if="item.require">*</text>{{item.title}}</view>
  224. <view class='discount'>
  225. <picker mode="time" :value="item.value" start="1970-01-01" @change="bindDateChange">
  226. <input type="text" @click="getTime(index)" disabled v-model="item.value"
  227. placeholder="请选择时间" placeholder-class='placeholder' />
  228. </picker>
  229. </view>
  230. </view>
  231. <view v-if="item.key == 'image'" class='item'>
  232. <view><text class="item-require" v-if="item.require">*</text>{{item.title}}</view>
  233. <view class="upload">
  234. <view class='pictrue' v-for="(itemn,indexn) in item.value" :key="indexn"
  235. :data-index="indexn" @click="getPhotoClickIdx">
  236. <image :src="itemn"></image>
  237. <text class="iconfont icon-guanbi4" @click.stop="DelPic(indexn)"></text>
  238. </view>
  239. <view class='pictrue acea-row row-center-wrapper row-column' @click='uploadpic(item)'
  240. v-if="pics.length < 5">
  241. <text class='iconfont icon-icon25201'></text>
  242. <view>上传图片</view>
  243. </view>
  244. </view>
  245. </view>
  246. </view>
  247. </form>
  248. </view>
  249. <view class="settlementAgreement" v-if="showProtocol">
  250. <view class="setAgCount">
  251. <i class="icon iconfont icon-cha" @click="showProtocol = false"></i>
  252. <div class="title">{{agrementTtile}}</div>
  253. <view class="content">
  254. <jyf-parser :html="protocol" ref="article" :tag-style="tagStyle"></jyf-parser>
  255. </view>
  256. </view>
  257. </view>
  258. <view class='wrapper'>
  259. <view class='item'>
  260. <view>支付方式</view>
  261. <view class='list'>
  262. <!-- #ifdef H5 -->
  263. <view class='payItem acea-row row-middle' :class='active==index ?"on":""' @tap='payItem(index)'
  264. v-for="(item,index) in cartArr" :key='index' v-if="item.payStatus==1">
  265. <view class='name acea-row row-center-wrapper'>
  266. <view class='iconfont animated'
  267. :class='(item.icon) + " " + (animated==true&&active==index ?"bounceIn":"")'></view>
  268. {{item.name}}
  269. </view>
  270. <view class='tip'>
  271. {{item.title}}
  272. <block v-if="item.value == 'balance'">
  273. {{userInfo.now_money}}
  274. </block>
  275. </view>
  276. </view>
  277. <!-- #endif -->
  278. <!-- #ifdef MP || APP-PLUS -->
  279. <view class='payItem acea-row row-middle' :class='active==index ?"on":""' @tap='payItem(index)'
  280. v-for="(item,index) in cartArr" :key='index' v-if="item.payStatus==1">
  281. <view class='name acea-row row-center-wrapper'>
  282. <view class='iconfont animated'
  283. :class='(item.icon) + " " + (animated==true&&active==index ?"bounceIn":"")'></view>
  284. {{item.name}}
  285. </view>
  286. <view class='tip'>
  287. {{item.title}}
  288. <block v-if="item.value == 'balance'">
  289. {{userInfo.now_money}}
  290. </block>
  291. </view>
  292. </view>
  293. <!-- #endif -->
  294. </view>
  295. </view>
  296. </view>
  297. <view class='moneyList'>
  298. <view class='item acea-row row-between-wrapper'>
  299. <view>商品总价:</view>
  300. <view class='money'>¥{{proPrice}}</view>
  301. </view>
  302. <view class='item acea-row row-between-wrapper' v-if="couponData.order_total_postage > 0">
  303. <view>运费:</view>
  304. <view class='money'>¥{{couponData.order_total_postage}}</view>
  305. </view>
  306. <view class='item acea-row row-between-wrapper' v-if="coupon_price > 0">
  307. <view>店铺优惠金额:</view>
  308. <view class='money'>-¥{{coupon_price}}</view>
  309. </view>
  310. <view class='item acea-row row-between-wrapper'
  311. v-if="open_integral && userInfo.integral>0 && order_type == 0">
  312. <view>积分抵扣:</view>
  313. <view class='money'>
  314. <text v-if="!use_integral">当前积分<text class="pColor">{{userInfo.integral}}</text></text>
  315. <text v-else>使用了{{integral_count}}个积分,抵扣<text class="pColor">{{integral_price}}元</text></text>
  316. <checkbox-group class="checkbox integral_checked" name="isDefault" @change="changeIntegral">
  317. <label>
  318. <checkbox :checked="use_integral ? true : false" />
  319. </label>
  320. </checkbox-group>
  321. </view>
  322. </view>
  323. <view class='item acea-row row-between-wrapper'
  324. v-if="!seckillId && order_type != 3 && order_type != 4 && enabledPlatformCoupon">
  325. <view>平台优惠券<text @tap="showCoupon" class="iconfont icon-wenhao1"></text></view>
  326. <block v-if="platformCoupon.length > 0">
  327. <view class='discount money' @tap='couponTap2(platformCoupon,0)'>
  328. <text v-if="total_platform_coupon_price>0">优惠¥{{total_platform_coupon_price}}</text>
  329. <text v-else>暂未选择优惠券</text>
  330. <text class='iconfont icon-jiantou'></text>
  331. </view>
  332. </block>
  333. <block v-else>
  334. <view class='discount'>暂无优惠券</view>
  335. </block>
  336. </view>
  337. <view class='item acea-row row-between-wrapper' v-if="priceGroup.storePostage > 0">
  338. <view>运费:</view>
  339. <view class='money'>+¥{{priceGroup.storePostage}}</view>
  340. </view>
  341. </view>
  342. <view style='height:120rpx;'></view>
  343. <view class='footer acea-row row-between-wrapper'>
  344. <view class="footer_count">
  345. <view>
  346. 合计:
  347. <text class='pColor'>¥{{totalPrice || 0}}</text>
  348. </view>
  349. <view class="coupon_price" v-if="couponData.total_coupon > 0">
  350. 优惠:¥ {{couponData.total_coupon}}
  351. <text @click="openDiscount">优惠明细</text>
  352. </view>
  353. </view>
  354. <view class='settlement' :class='couponData.status != "noAddress" ? "" : "disabled"' style='z-index:100'
  355. @tap="SubOrder">{{couponData.status != "noAddress" ? '立即结算':'选择地址'}}</view>
  356. </view>
  357. </view>
  358. <block v-if="coupon.status">
  359. <couponListWindow :coupon='coupon' :couponTitle="plantCoupon ? '平台优惠券' : '优惠券'"
  360. @ChangCouponsClone="ChangCouponsClone" @getCoupon="getCoupon" :openType='openType'
  361. @ChangCoupons="ChangCoupons" :coupon_amount='coupon_amount' :coupon_number='coupon_number'>
  362. </couponListWindow>
  363. </block>
  364. <addressWindow ref="addressWindow" @changeTextareaStatus="changeTextareaStatus" :address='address'
  365. :pagesUrl="pagesUrl" @OnChangeAddress="OnChangeAddress" @changeClose="changeClose"></addressWindow>
  366. <addInvoicing ref="addInvoicing" @changeInvoiceClose="changeInvoiceClose" :invoice='invoice'></addInvoicing>
  367. <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
  368. <block v-if="isShowBox">
  369. <checkDelivery :deliveryName="deliveryName" :isShowBox="isShowBox" :activeObj="activeObj" @close="boxClose"
  370. @confirmBtn="getData">
  371. </checkDelivery>
  372. </block>
  373. <!--优惠明细弹窗-->
  374. <discountDetails :isShowDiscount="isShowDiscount" @close="closeDiscount" :couponData="couponData">
  375. </discountDetails>
  376. </view>
  377. </template>
  378. <script>
  379. // +----------------------------------------------------------------------
  380. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  381. // +----------------------------------------------------------------------
  382. // | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
  383. // +----------------------------------------------------------------------
  384. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  385. // +----------------------------------------------------------------------
  386. // | Author: CRMEB Team <admin@crmeb.com>
  387. // +----------------------------------------------------------------------
  388. let app = getApp();
  389. import {
  390. orderConfirm,
  391. getOrderConfirm,
  392. getCouponsOrderPrice,
  393. orderCreate,
  394. createOrder
  395. } from '@/api/order.js';
  396. import {
  397. getAddressDefault,
  398. getAddressDetail,
  399. getAddressList,
  400. getUserInfo,
  401. getAgreementApi
  402. } from '@/api/user.js';
  403. import {
  404. openPaySubscribe
  405. } from '@/utils/SubscribeMessage.js';
  406. import {
  407. presellAgreement
  408. } from '@/api/activity.js';
  409. import {
  410. storeListApi
  411. } from '@/api/store.js';
  412. import {
  413. CACHE_LONGITUDE,
  414. CACHE_LATITUDE
  415. } from '@/config/cache.js';
  416. import couponListWindow from '@/components/orderCoupon';
  417. import addressWindow from '@/components/addressWindow';
  418. import orderGoods from '@/components/orderGoods';
  419. import checkDelivery from '@/components/checkDelivery/index.vue';
  420. import discountDetails from '@/components/discountDetails/index.vue';
  421. import addInvoicing from '@/components/addInvoicing';
  422. import parser from "@/components/jyf-parser/jyf-parser";
  423. import {
  424. mapGetters
  425. } from "vuex";
  426. import authorize from '@/components/Authorize';
  427. import {
  428. configMap
  429. } from '@/utils'
  430. export default {
  431. components: {
  432. couponListWindow,
  433. addressWindow,
  434. orderGoods,
  435. checkDelivery,
  436. addInvoicing,
  437. discountDetails,
  438. "jyf-parser": parser,
  439. authorize,
  440. },
  441. filters: {
  442. filterDay(val) {
  443. if (val) {
  444. var reg = /(\d{4})\-(\d{2})\-(\d{2})/;
  445. var date = val.replace(reg, "$2月$3日");
  446. return date
  447. }
  448. }
  449. },
  450. data() {
  451. return {
  452. // 备注
  453. msgObj: {},
  454. textareaStatus: true,
  455. deliveryName: '快递配送',
  456. //支付方式
  457. cartArr: [{
  458. "name": "余额支付",
  459. "icon": "icon-icon-test",
  460. value: 'balance',
  461. title: '可用余额:',
  462. payStatus: this.$store.getters.globalData.yue_pay_status,
  463. },
  464. {
  465. "name": "微信支付",
  466. "icon": "icon-weixin2",
  467. value: 'weixin_s',
  468. title: '微信快捷支付',
  469. payStatus: 1,
  470. },
  471. {
  472. name: "支付宝支付",
  473. icon: "icon-zhifubao",
  474. // #ifdef H5 || APP-PLUS
  475. value: 'alipay',
  476. // #endif
  477. // #ifdef MP
  478. value: 'alipayQr',
  479. // #endif
  480. title: '支付宝支付',
  481. // payStatus: this.$store.getters.globalData.alipay_open
  482. payStatus: 1,
  483. },
  484. // {
  485. // "name": "线下支付",
  486. // "icon": "icon-yinhangqia",
  487. // value: 'offline',
  488. // title: '线下支付',
  489. // payStatus: 2,
  490. // },
  491. ],
  492. tagStyle: {
  493. img: 'width:100%;display:block;',
  494. video: 'width:100%;'
  495. },
  496. payType: 'balance', //支付方式
  497. openType: 0, //优惠券打开方式 1=使用
  498. active: 0, //支付方式切换
  499. coupon: {
  500. status: false,
  501. list: [],
  502. statusTile: '立即使用'
  503. }, //优惠券组件
  504. address: {
  505. address: false
  506. }, //地址组件
  507. addressInfo: {}, //地址信息
  508. invoice: {
  509. invoice: false,
  510. mer_id: 0
  511. }, //发票组件
  512. invoiceData: {}, // 发票数据
  513. pinkId: 0, //拼团id
  514. addressId: 0, //地址id
  515. couponId: 0, //优惠券id
  516. cartId: '', //购物车id
  517. BargainId: 0,
  518. combinationId: 0,
  519. seckillId: 0,
  520. userInfo: {}, //用户信息
  521. mark: '', //备注信息
  522. couponTitle: '请选择', //优惠券
  523. coupon_price: 0, //优惠券抵扣金额
  524. useIntegral: false, //是否使用积分
  525. integral_price: 0, //积分抵扣金额
  526. integral: 0,
  527. ChangePrice: 0, //使用积分抵扣变动后的金额
  528. formIds: [], //收集formid
  529. status: 0,
  530. is_address: false,
  531. toPay: false, //修复进入支付时页面隐藏从新刷新页面
  532. shippingType: 0,
  533. system_store: {},
  534. storePostage: 0,
  535. contacts: '',
  536. contactsTel: '',
  537. mydata: {},
  538. storeList: [],
  539. store_self_mention: 0,
  540. cartInfo: [],
  541. priceGroup: {},
  542. animated: false,
  543. totalPrice: 0,
  544. use_integral: false,
  545. pagesUrl: "",
  546. orderKey: "",
  547. offlinePostage: "",
  548. isAuto: false, //没有授权的不会自动授权
  549. isShowAuth: false, //是否隐藏授权
  550. from: '',
  551. orderStatus: '', //是否有地址
  552. couponIndex: 0, //选择商铺优惠券索引
  553. subCoupon: {}, //提交订单使用的优惠券
  554. proPrice: 0, //商品总价
  555. isShowBox: false,
  556. activeObj: {}, //选中店铺信息
  557. activeIndex: '', // 选中店铺索引
  558. invoiceName: '不开发票',
  559. invoice_func: false,
  560. special_invoice: false,
  561. isAgree: false,
  562. showProtocol: false,
  563. isCoupon: false,
  564. protocol: '',
  565. order_type: 0,
  566. addInvoice: {},
  567. couponData: {},
  568. go_map: false,
  569. orderPay: false,
  570. take: [],
  571. open_integral: 0,
  572. coupon_number: 0,
  573. store_coupon_number: 0,
  574. coupon_amount: 0,
  575. store_coupon_amount: 0,
  576. plant_coupon_amount: 0,
  577. integral_count: '',
  578. agrementTtile: '发票说明',
  579. pics: [],
  580. order_model: 2,
  581. order_extend: [],
  582. extend: [],
  583. virtualIndex: 0,
  584. platformCoupon: [],
  585. total_platform_coupon_price: 0,
  586. enabledPlatformCoupon: false,
  587. plantCoupon: false,
  588. isShowDiscount: false,
  589. order_key: ''
  590. };
  591. },
  592. computed: {
  593. ...mapGetters(['isLogin', 'viewColor']),
  594. ...configMap(['hide_mer_status', 'alipay_open', 'yue_pay_status']),
  595. },
  596. watch: {
  597. alipay_open(n) {
  598. this.payMode[1].payStatus = n
  599. },
  600. yue_pay_status(n) {
  601. this.payMode[2].payStatus = n
  602. }
  603. },
  604. onReady() {},
  605. mounted: function() {},
  606. onLoad: function(options) {
  607. // if(options.is_xfq == 1 || options.is_jf == 1) {
  608. // }else {
  609. // this.cartArr = [{
  610. // "name": "余额支付",
  611. // "icon": "icon-icon-test",
  612. // value: 'balance',
  613. // title: '可用余额:',
  614. // payStatus: this.$store.getters.globalData.yue_pay_status,
  615. // }]
  616. // }
  617. this.seckillId = options.seckillId
  618. // #ifdef H5
  619. this.from = this.$wechat.isWeixin() ? 'weixin' : 'h5'
  620. // #endif
  621. // #ifdef MP
  622. this.from = 'routine'
  623. // #endif
  624. // #ifdef APP-PLUS
  625. this.from = 'weixin'
  626. // #endif
  627. if (!options.cartId) return this.$util.Tips({
  628. title: '请选择要购买的商品'
  629. }, {
  630. tab: 3,
  631. url: 1
  632. });
  633. this.couponId = options.couponId || 0;
  634. this.pinkId = options.pinkid ? parseInt(options.pinkid) : 0;
  635. this.addressId = options.addressId || 0;
  636. this.cartId = options.cartId;
  637. this.is_address = options.is_address ? true : false;
  638. this.news = options.new ? 1 : 0;
  639. this.invoice_id = options.invoice_id || '';
  640. if (options.invoice_type == 1) {
  641. this.invoiceName = '增值税电子普通发票';
  642. } else if (options.invoice_type == 2) {
  643. this.invoiceName = '增值税专用发票';
  644. }
  645. if (!this.isLogin) {
  646. this.isAuto = true;
  647. this.isShowAuth = true
  648. }
  649. if (this.payType == 'weixin') {
  650. this.payType = this.from
  651. }
  652. // this.getAgreement();
  653. let _this = this
  654. this.textareaStatus = true;
  655. if (this.isLogin && this.toPay == false && !this.orderPay) {
  656. this.getaddressInfo();
  657. this.$nextTick(function() {
  658. this.$refs.addressWindow.getAddressList();
  659. this.getUserInfo()
  660. })
  661. }
  662. uni.setStorage({
  663. key: 'invoice_Data',
  664. data: {},
  665. success: function() {}
  666. })
  667. },
  668. /**
  669. * 生命周期函数--监听页面显示
  670. */
  671. onShow: function() {
  672. let that = this;
  673. uni.$on("handClick", res => {
  674. if (res) {
  675. _this.system_store = res.address
  676. }
  677. // 清除监听
  678. uni.$off('handClick');
  679. })
  680. that.invoice.invoice = false
  681. },
  682. /**
  683. * 生命周期函数--监听页面隐藏
  684. */
  685. // onHide: function() {
  686. // },
  687. methods: {
  688. /*预售协议*/
  689. getPresellAgree: function() {
  690. this.showProtocol = true
  691. this.agrementTtile = '预售协议'
  692. presellAgreement().then(res => {
  693. this.protocol = res.data.sys_product_presell_agree;
  694. })
  695. },
  696. changeIsAgree: function(e) {
  697. this.isAgree = !this.isAgree;
  698. },
  699. changeIntegral: function(e) {
  700. this.use_integral = !this.use_integral;
  701. this.getConfirm(this.addressId);
  702. },
  703. showPresellAgree() {
  704. this.getPresellAgree()
  705. },
  706. showInvoice() {
  707. this.getAgreement();
  708. },
  709. showCoupon() {
  710. this.getCouponAgreement();
  711. },
  712. // 打开配送方式弹窗
  713. openDiscount(item, index) {
  714. this.isShowDiscount = !this.isShowDiscount;
  715. },
  716. closeDiscount() {
  717. this.isShowDiscount = false
  718. },
  719. // 图片预览
  720. // 获得相册 idx
  721. getPhotoClickIdx(e) {
  722. let _this = this;
  723. let idx = e.currentTarget.dataset.index;
  724. _this.imgPreview(_this.pics, idx);
  725. },
  726. // 图片预览
  727. imgPreview: function(list, idx) {
  728. // list:图片 url 数组
  729. if (list && list.length > 0) {
  730. uni.previewImage({
  731. current: list[idx], // 传 Number H5端出现不兼容
  732. urls: list
  733. });
  734. }
  735. },
  736. /**上传文件*/
  737. uploadpic: function(item) {
  738. let that = this;
  739. that.$util.uploadImageOne('upload/image', function(res) {
  740. that.pics.push(res.data.path);
  741. that.$set(item, 'value', that.pics);
  742. });
  743. },
  744. /** 删除图片*/
  745. DelPic: function(index) {
  746. let that = this,
  747. pic = this.pics[index];
  748. that.pics.splice(index, 1);
  749. that.$set(that, 'pics', that.pics);
  750. },
  751. // 获取个人信息
  752. getUserInfo() {
  753. getUserInfo().then(res => {
  754. this.userInfo = res.data
  755. })
  756. },
  757. /*获取发票说明*/
  758. getAgreement() {
  759. let that = this
  760. that.showProtocol = true;
  761. that.agrementTtile = '发票说明'
  762. getAgreementApi('sys_receipt_agree').then(res => {
  763. that.protocol = res.data.sys_receipt_agree
  764. })
  765. },
  766. /*获取发票说明*/
  767. getCouponAgreement() {
  768. let that = this
  769. that.showProtocol = true;
  770. that.agrementTtile = '优惠券说明'
  771. getAgreementApi('sys_coupon_agree').then(res => {
  772. console.log(res);
  773. that.protocol = res.data.sys_coupon_agree
  774. })
  775. },
  776. /**
  777. * 授权回调事件
  778. *
  779. */
  780. onLoadFun: function() {
  781. this.isShowAuth = false;
  782. this.getaddressInfo();
  783. this.getUserInfo();
  784. //调用子页面方法授权后执行获取地址列表
  785. // this.$scope.selectComponent('#address-window').getAddressList();
  786. },
  787. // 授权关闭
  788. authColse: function(e) {
  789. this.isShowAuth = e;
  790. },
  791. /**
  792. * 获取门店列表数据
  793. */
  794. getList: function() {
  795. let longitude = uni.getStorageSync("CACHE_LONGITUDE"); //经度
  796. let latitude = uni.getStorageSync("CACHE_LATITUDE"); //纬度
  797. let data = {
  798. latitude: latitude, //纬度
  799. longitude: longitude, //经度
  800. page: 1,
  801. limit: 10
  802. }
  803. storeListApi(data).then(res => {
  804. console.log(res)
  805. let list = res.data.list.list || [];
  806. this.$set(this, 'storeList', list);
  807. this.$set(this, 'system_store', list[0]);
  808. }).catch(err => {})
  809. },
  810. // 关闭地址弹窗;
  811. changeClose: function() {
  812. this.$set(this.address, 'address', false);
  813. },
  814. // 关闭发票弹窗
  815. changeInvoiceClose: function(data) {
  816. this.getInvoiceData(data);
  817. this.$set(this.invoice, 'invoice', false);
  818. },
  819. getInvoiceData(selectedData) {
  820. this.invoiceData = {}
  821. if (selectedData) {
  822. this.cartInfo.forEach((item, i) => {
  823. if (item.mer_id == selectedData.mer_id) {
  824. if (this.cartInfo[i]['invoiceData']) {
  825. this.cartInfo[i]['invoiceData'] = selectedData
  826. } else {
  827. this.$set(this.cartInfo[i], 'invoiceData', selectedData)
  828. }
  829. }
  830. let mer_id = selectedData.mer_id
  831. this.invoiceData[mer_id] = selectedData;
  832. });
  833. } else {
  834. this.cartInfo.forEach((item, i) => {
  835. this.$set(this.cartInfo[i], 'invoiceData', {})
  836. });
  837. }
  838. },
  839. getInvoiceDatas(selectedData) {
  840. this.invoiceData = {}
  841. if (selectedData.length) {
  842. this.cartInfo.forEach((item, i) => {
  843. selectedData.forEach((val, j) => {
  844. if (item.mer_id == val.mer_id) {
  845. if (this.cartInfo[i]['invoiceData']) {
  846. this.cartInfo[i]['invoiceData'] = val
  847. } else {
  848. this.$set(this.cartInfo[i], 'invoiceData', val)
  849. }
  850. }
  851. let mer_id = val.mer_id
  852. this.invoiceData[mer_id] = val;
  853. })
  854. });
  855. } else {
  856. this.cartInfo.forEach((item, i) => {
  857. this.$set(this.cartInfo[i], 'invoiceData', {})
  858. });
  859. }
  860. console.log(this.invoiceData)
  861. },
  862. /*
  863. * 跳转门店列表
  864. */
  865. showStoreList: function() {
  866. let _this = this
  867. if (this.storeList.length > 0) {
  868. uni.navigateTo({
  869. url: '/pages/users/goods_details_store/index'
  870. })
  871. }
  872. },
  873. // 进店
  874. goStore: function(id) {
  875. if (this.hide_mer_status != 1) {
  876. uni.navigateTo({
  877. url: `/pages/store/index?id=${id}`
  878. })
  879. }
  880. },
  881. ChangCouponsClone: function() {
  882. this.$set(this.coupon, 'status', false);
  883. },
  884. changeTextareaStatus: function() {
  885. for (let i = 0, len = this.coupon.list.length; i < len; i++) {
  886. this.coupon.list[i].use_title = '';
  887. this.coupon.list[i].is_use = 0;
  888. }
  889. this.textareaStatus = true;
  890. this.status = 0;
  891. this.$set(this.coupon, 'list', this.coupon.list);
  892. },
  893. /**
  894. * 处理点击优惠券后的事件
  895. *
  896. */
  897. ChangCoupons: function(data) {
  898. this.cartInfo.forEach((item, index) => {
  899. if (item.mer_id == data.mer_id) {
  900. this.$set(this.cartInfo, index, data)
  901. }
  902. console.log(item.order.pay_price, 'item.order.pay_price')
  903. })
  904. this.$set(this.coupon, 'status', false);
  905. this.couponNum()
  906. },
  907. // 计算优惠券抵扣
  908. couponNum() {
  909. let tempTotal = 0,
  910. tempCouponNum = 0
  911. this.cartInfo.forEach((item, index) => {
  912. tempCouponNum = this.$util.$h.Add(tempCouponNum, item.order.coupon_price)
  913. tempTotal = this.$util.$h.Add(tempTotal, item.order.pay_price)
  914. })
  915. this.coupon_price = tempCouponNum
  916. if (this.order_type == 2 && this.coupon.list[0].productPresell.presell_type == 2) {
  917. return
  918. }
  919. this.totalPrice = tempTotal
  920. },
  921. /**
  922. * 选择地址后改变事件
  923. * @param object e
  924. */
  925. OnChangeAddress: function(e) {
  926. this.textareaStatus = true;
  927. this.addressId = e;
  928. this.address.address = false;
  929. this.getaddressInfo();
  930. },
  931. bindHideKeyboard: function(e) {
  932. this.mark = e.detail.value;
  933. },
  934. getCoupon(coupon) {
  935. if (coupon.checked) {
  936. this.subCoupon[coupon.mer_id].forEach((item, i) => {
  937. if (coupon.coupon_user_id == item) {
  938. this.subCoupon[coupon.mer_id].splice(i, 1)
  939. }
  940. })
  941. } else {
  942. this.subCoupon[coupon.mer_id].push(coupon.coupon_user_id)
  943. }
  944. this.getConfirm(this.addressId)
  945. },
  946. /**
  947. * 获取当前订单详细信息
  948. *
  949. */
  950. getConfirm: function(address_id) {
  951. console.log(address_id, 'address_id')
  952. let that = this;
  953. console.log(that.cartId.split(","))
  954. uni.showLoading({
  955. title: '',
  956. mask: true
  957. });
  958. getOrderConfirm({
  959. cart_id: that.cartId.split(","),
  960. address_id: address_id,
  961. takes: that.take,
  962. use_coupon: that.subCoupon,
  963. use_integral: that.use_integral
  964. }).then(res => {
  965. // 默认选中
  966. res.data.order.forEach(el => {
  967. el.isTake = 0
  968. that.subCoupon[el.mer_id] = []
  969. el.coupon.forEach(coupon => {
  970. if (coupon.checked) {
  971. that.subCoupon[el.mer_id].push(coupon.coupon_user_id)
  972. }
  973. })
  974. })
  975. that.subCoupon['0'] = []
  976. if (res.data.platformCoupon.length > 0) {
  977. res.data.platformCoupon.forEach(el => {
  978. if (el.checked) {
  979. that.subCoupon[el.mer_id] = []
  980. that.subCoupon[el.mer_id].push(el.coupon_user_id)
  981. }
  982. })
  983. }
  984. that.$set(that.coupon, "coupon", that.plantCoupon ? res.data.platformCoupon : res.data
  985. .order[that.couponIndex].coupon);
  986. that.$set(that, "store_coupon_number", res.data.order[that.couponIndex].order.useCouponIds
  987. .length);
  988. that.$set(that, "coupon_amount", parseFloat(res.data.order[that.couponIndex].order
  989. .coupon_price) + parseFloat(res.data.total_platform_coupon_price));
  990. that.$set(that, "store_coupon_amount", parseFloat(res.data.order[that.couponIndex].order
  991. .coupon_price));
  992. that.$set(that, "plant_coupon_amount", parseFloat(res.data.total_platform_coupon_price));
  993. that.$set(that, 'couponData', res.data);
  994. that.$set(that, 'cartInfo', res.data.order);
  995. that.$set(that, 'total_platform_coupon_price', res.data.total_platform_coupon_price);
  996. that.$set(that, 'enabledPlatformCoupon', res.data.enabledPlatformCoupon);
  997. that.$set(that, 'platformCoupon', res.data.platformCoupon);
  998. that.$set(that, 'order_type', res.data.order_type);
  999. that.$set(that, 'coupon_price', res.data.order_coupon_price);
  1000. that.$set(that, 'integral_count', res.data.order_total_integral);
  1001. that.$set(that, 'integral_price', res.data.order_total_integral_price);
  1002. that.$set(that, 'open_integral', res.data.openIntegral);
  1003. that.$set(that, 'use_integral', res.data.useIntegral);
  1004. that.$set(that, 'order_extend', (that.order_extend && that.order_extend.length > 0) ? that
  1005. .order_extend : res.data.order_extend);
  1006. that.totalPrice = res.data.order_price
  1007. that.orderStatus = res.data.status
  1008. that.proPrice = res.data.total_price
  1009. that.order_type = res.data.order_type
  1010. that.order_model = res.data.order_model
  1011. that.deliveryName = res.data.order_model == 0 ? '快递配送' : '虚拟发货'
  1012. that.order_key = res.data.key
  1013. uni.getStorage({
  1014. key: "invoice_Data",
  1015. success: function(res) {
  1016. that.addInvoice = res.data;
  1017. if (res.data) {
  1018. that.getInvoiceDatas(res.data)
  1019. }
  1020. }
  1021. })
  1022. uni.hideLoading();
  1023. if (that.totalPrice == 0) {
  1024. that.cartArr = [{
  1025. "name": "余额支付",
  1026. "icon": "icon-icon-test",
  1027. value: 'balance',
  1028. title: '可用余额:',
  1029. payStatus: this.$store.getters.globalData.yue_pay_status,
  1030. }
  1031. ]
  1032. }
  1033. }).catch(err => {
  1034. return this.$util.Tips({
  1035. title: err
  1036. }, {
  1037. tab: 3,
  1038. url: 1
  1039. });
  1040. });
  1041. },
  1042. /*
  1043. * 获取默认收货地址或者获取某条地址信息
  1044. */
  1045. getaddressInfo: function() {
  1046. let that = this;
  1047. if (that.addressId) {
  1048. getAddressDetail(that.addressId).then(res => {
  1049. res.data.is_default = parseInt(res.data.is_default);
  1050. that.addressInfo = res.data || {};
  1051. that.addressId = res.data.address_id || 0;
  1052. that.address.addressId = res.data.address_id || 0;
  1053. this.getConfirm(that.addressId);
  1054. })
  1055. } else {
  1056. getAddressList().then(res => {
  1057. that.addressInfo = res.data.list.length > 0 ? res.data.list[0] : {};
  1058. that.addressId = res.data.list.length > 0 ? res.data.list[0].address_id : 0;
  1059. that.address.addressId = res.data.list.length > 0 ? res.data.list[0].address_id : 0;
  1060. this.getConfirm(that.addressId);
  1061. })
  1062. }
  1063. },
  1064. payItem: function(e) {
  1065. let that = this;
  1066. let active = e;
  1067. that.active = active;
  1068. that.animated = true;
  1069. that.payType = that.cartArr[active].value;
  1070. // if (that.payType == 'weixin') {
  1071. // that.payType = that.from
  1072. // }
  1073. },
  1074. couponTap: function(item, index) {
  1075. this.coupon = item
  1076. this.$set(this.coupon, 'status', true)
  1077. this.couponIndex = index
  1078. this.plantCoupon = false
  1079. this.$set(this, "coupon_number", this.store_coupon_number);
  1080. this.$set(this, "coupon_amount", this.store_coupon_amount);
  1081. },
  1082. couponTap2: function(item, index) {
  1083. this.coupon = {
  1084. coupon: item,
  1085. mer_id: 0,
  1086. status: true
  1087. }
  1088. this.plantCoupon = true
  1089. this.$set(this, "coupon_number", this.subCoupon['0'].length);
  1090. this.$set(this, "coupon_amount", this.plant_coupon_amount);
  1091. },
  1092. car: function() {
  1093. let that = this;
  1094. that.animated = false;
  1095. },
  1096. onAddress: function() {
  1097. let that = this;
  1098. that.textareaStatus = false;
  1099. that.address.address = true;
  1100. that.pagesUrl = '/pages/users/user_address_list/index?cartId=' + this.cartId + '&pinkId=' + this
  1101. .pinkId + '&couponId=' + this.couponId;
  1102. },
  1103. /**
  1104. * 开发票
  1105. */
  1106. goInvoice: function(id) {
  1107. let that = this;
  1108. that.invoice.invoice = true;
  1109. that.invoice.mer_id = id;
  1110. this.$refs.addInvoicing.getInvoiceDefault();
  1111. this.$refs.addInvoicing.getInvoiceList();
  1112. },
  1113. realName: function(e) {
  1114. this.contacts = e.detail.value;
  1115. },
  1116. phone: function(e) {
  1117. this.contactsTel = e.detail.value;
  1118. },
  1119. payment: function(data) {
  1120. let that = this;
  1121. createOrder(data).then(res => {
  1122. console.log(res, 'zhifures++++++++++++++++++++++++')
  1123. let status = res.data.status,
  1124. orderId = res.data.result.order_id,
  1125. callback_key = res.data.result.pay_key,
  1126. jsConfig = res.data.result.config,
  1127. goPages = '/pages/order_pay_status/index?order_id=' + orderId + '&msg=' + res.message;
  1128. that.orderPay = true;
  1129. switch (status) {
  1130. case 'ORDER_EXIST':
  1131. case 'EXTEND_ORDER':
  1132. case 'PAY_ERROR':
  1133. case 'error':
  1134. uni.hideLoading();
  1135. return that.$util.Tips({
  1136. title: res.msg
  1137. }, {
  1138. tab: 5,
  1139. url: goPages
  1140. });
  1141. break;
  1142. case 'success':
  1143. uni.hideLoading();
  1144. if (that.seckillId)
  1145. return that.$util.Tips({
  1146. title: res.msg,
  1147. icon: 'success'
  1148. }, {
  1149. tab: 4,
  1150. url: goPages
  1151. });
  1152. return that.$util.Tips({
  1153. title: res.msg,
  1154. icon: 'success'
  1155. }, {
  1156. tab: 5,
  1157. url: goPages
  1158. });
  1159. break;
  1160. case 'alipay':
  1161. case "alipayQr":
  1162. // uni.hideLoading();
  1163. // this.$emit('onChangeFun', {
  1164. // action: 'payClose'
  1165. // });
  1166. // uni.navigateTo({
  1167. // url: '/pages/order_pay_back/index?keyCode=' + callback_key + '&url=' +
  1168. // jsConfig
  1169. // })
  1170. window.location.href = res.data.result.config.jsConfig.expend.pay_info
  1171. return;
  1172. break;
  1173. // #ifndef MP
  1174. case "wechat":
  1175. case "weixin_s":
  1176. case "weixinApp":
  1177. jsConfig.timeStamp = jsConfig.timestamp;
  1178. // // #ifndef APP-PLUS
  1179. // console.log(jsConfig.timestamp,res,'ddddddddddddddddddddddddddddddd')
  1180. // this.$wechat.pay(jsConfig).then(res => {
  1181. // console.log('测试支付数据无效的success:' + res.data)
  1182. // return that.$util.Tips({
  1183. // title: res.message,
  1184. // icon: 'success'
  1185. // }, {
  1186. // tab: 4,
  1187. // url: goPages
  1188. // });
  1189. // }).catch(res => {
  1190. // console.log('测试支付数据无效的catch:' + res.data)
  1191. // if (res.errMsg == 'chooseWXPay:cancel') return that.$util.Tips({
  1192. // title: '取消支付'
  1193. // }, {
  1194. // tab: 5,
  1195. // url: goPages + '&status=0'
  1196. // });
  1197. // })
  1198. // // #endif
  1199. // // #ifdef APP-PLUS
  1200. // uni.requestPayment({
  1201. // provider: 'wxpay',
  1202. // orderInfo: jsConfig,
  1203. // success: (e) => {
  1204. // let url = '/pages/order_pay_status/index?order_id=' + orderId +
  1205. // '&msg=支付成功';
  1206. // return that.$util.Tips({
  1207. // title: '支付成功',
  1208. // icon: 'success'
  1209. // }, {
  1210. // tab: 4,
  1211. // url: url
  1212. // });
  1213. // },
  1214. // fail: (e) => {
  1215. // uni.showModal({
  1216. // content: "支付失败",
  1217. // showCancel: false,
  1218. // success: function(res) {
  1219. // let url =
  1220. // '/pages/order_pay_status/index?order_id=' +
  1221. // orderId + '&msg=支付失败';
  1222. // uni.redirectTo({
  1223. // url: url
  1224. // })
  1225. // }
  1226. // })
  1227. // },
  1228. // complete: () => {
  1229. // uni.hideLoading();
  1230. // },
  1231. // });
  1232. // // #endif
  1233. break;
  1234. // #endif
  1235. // #ifdef MP
  1236. case "routine":
  1237. jsConfig.timeStamp = jsConfig.timestamp;
  1238. that.toPay = true;
  1239. uni.requestPayment({
  1240. ...jsConfig,
  1241. success: function(res) {
  1242. uni.hideLoading();
  1243. if (that.seckillId)
  1244. return that.$util.Tips({
  1245. title: '支付成功',
  1246. icon: 'success'
  1247. }, {
  1248. tab: 4,
  1249. url: goPages
  1250. });
  1251. return that.$util.Tips({
  1252. title: '支付成功',
  1253. icon: 'success'
  1254. }, {
  1255. tab: 5,
  1256. url: goPages
  1257. });
  1258. },
  1259. fail: function(e) {
  1260. uni.hideLoading();
  1261. let pages = '/pages/order_pay_status/index?order_id=' +
  1262. orderId + '&msg=取消支付'
  1263. return that.$util.Tips({
  1264. title: '取消支付'
  1265. }, {
  1266. tab: 5,
  1267. url: pages + '&status=0'
  1268. });
  1269. },
  1270. })
  1271. break;
  1272. // #endif
  1273. case "balance":
  1274. uni.hideLoading();
  1275. //余额不足
  1276. return that.$util.Tips({
  1277. title: res.msg
  1278. }, {
  1279. tab: 5,
  1280. url: goPages + '&status=1'
  1281. });
  1282. break;
  1283. // #ifdef H5
  1284. case 'h5':
  1285. let host = window.location.protocol + "//" + window.location.host;
  1286. let url = `${host}/pages/order_pay_status/index?order_id=${orderId}`
  1287. let eUrl = encodeURIComponent(url)
  1288. let locations = `${jsConfig.mweb_url}&redirect_url=${eUrl}`
  1289. setTimeout(() => {
  1290. location.href = locations;
  1291. }, 100);
  1292. break;
  1293. // #endif
  1294. // #ifdef APP-PLUS
  1295. case 'alipayApp':
  1296. uni.requestPayment({
  1297. provider: 'alipay',
  1298. orderInfo: jsConfig,
  1299. success: (e) => {
  1300. return that.$util.Tips({
  1301. title: '支付成功',
  1302. icon: 'success'
  1303. }, {
  1304. tab: 5,
  1305. url: goPages
  1306. });
  1307. },
  1308. fail: (e) => {
  1309. uni.showModal({
  1310. content: "支付失败",
  1311. showCancel: false,
  1312. success: function(res) {
  1313. let url =
  1314. '/pages/order_pay_status/index?order_id=' +
  1315. orderId + '&msg=支付失败';
  1316. uni.redirectTo({
  1317. url: url
  1318. })
  1319. }
  1320. })
  1321. },
  1322. complete: () => {
  1323. uni.hideLoading();
  1324. },
  1325. });
  1326. break;
  1327. // #endif
  1328. }
  1329. }).catch(err => {
  1330. uni.hideLoading();
  1331. return that.$util.Tips({
  1332. title: err
  1333. });
  1334. });
  1335. },
  1336. isEmojiCharacter: function(substring) {
  1337. if (substring) {
  1338. for (var i = 0; i < substring.length; i++) {
  1339. var hs = substring.charCodeAt(i);
  1340. if (0xd800 <= hs && hs <= 0xdbff) {
  1341. if (substring.length > 1) {
  1342. var ls = substring.charCodeAt(i + 1);
  1343. var uc = ((hs - 0xd800) * 0x400) + (ls - 0xdc00) + 0x10000;
  1344. if (0x1d000 <= uc && uc <= 0x1f77f) {
  1345. return true;
  1346. }
  1347. }
  1348. } else if (substring.length > 1) {
  1349. var ls = substring.charCodeAt(i + 1);
  1350. if (ls == 0x20e3) {
  1351. return true;
  1352. }
  1353. } else {
  1354. if (0x2100 <= hs && hs <= 0x27ff) {
  1355. return true;
  1356. } else if (0x2B05 <= hs && hs <= 0x2b07) {
  1357. return true;
  1358. } else if (0x2934 <= hs && hs <= 0x2935) {
  1359. return true;
  1360. } else if (0x3297 <= hs && hs <= 0x3299) {
  1361. return true;
  1362. } else if (hs == 0xa9 || hs == 0xae || hs == 0x303d || hs == 0x3030 ||
  1363. hs == 0x2b55 || hs == 0x2b1c || hs == 0x2b1b ||
  1364. hs == 0x2b50) {
  1365. return true;
  1366. }
  1367. }
  1368. }
  1369. }
  1370. },
  1371. bindDateChange(e) {
  1372. let that = this
  1373. that.$set(that.order_extend[that.virtualIndex], 'value', e.detail.value);
  1374. },
  1375. getTime(index) {
  1376. this.virtualIndex = index;
  1377. },
  1378. SubOrder: function(e) {
  1379. let that = this,
  1380. data = {};
  1381. if (!that.payType) return that.$util.Tips({
  1382. title: '请选择支付方式'
  1383. });
  1384. if (that.orderStatus == 'noAddress') return that.$util.Tips({
  1385. title: '请选择收货地址'
  1386. });
  1387. if (that.orderStatus != 'finish' && that.order_model == 0) {
  1388. return that.$util.Tips({
  1389. title: '收货地址不在配送区域'
  1390. });
  1391. }
  1392. if (that.orderStatus == 'noDeliver') {
  1393. return that.$util.Tips({
  1394. title: '暂不发货'
  1395. });
  1396. }
  1397. if (that.order_type == 2 && !that.isAgree && that.cartInfo[0].list[0].productPresell.presell_type ==
  1398. 2) {
  1399. return that.$util.Tips({
  1400. title: '请阅读并勾选协议,否则无法进行操作'
  1401. });
  1402. }
  1403. if (that.order_model == 1 && that.order_extend.length > 0) {
  1404. for (var i = 0; i < that.order_extend.length; i++) {
  1405. let el = that.order_extend[i]
  1406. if (el.require) {
  1407. if (!el.value || el.value.length == 0) {
  1408. return that.$util.Tips({
  1409. title: '请填写' + el.title
  1410. });
  1411. } else if (el.key == 'mobile' && !/^1(3|4|5|7|8|9|6)\d{9}$/i.test(el.value)) {
  1412. return that.$util.Tips({
  1413. title: '请输入正确的' + el.title
  1414. });
  1415. } else if (el.key == 'email' && !/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(el
  1416. .value)) {
  1417. return that.$util.Tips({
  1418. title: '请输入正确的' + el.title
  1419. });
  1420. } else if (el.key == 'idCard' && !
  1421. /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}$)/
  1422. .test(el.value)) {
  1423. return that.$util.Tips({
  1424. title: '请输入正确的' + el.title
  1425. });
  1426. }
  1427. } else if (el.value) {
  1428. if (el.key == 'mobile' && !/^1(3|4|5|7|8|9|6)\d{9}$/i.test(el.value)) {
  1429. return that.$util.Tips({
  1430. title: '请输入正确的' + el.title
  1431. });
  1432. }
  1433. if (el.key == 'email' && !/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(el.value)) {
  1434. return that.$util.Tips({
  1435. title: '请输入正确的' + el.title
  1436. });
  1437. }
  1438. if (el.key == 'idCard' && !
  1439. /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}$)/
  1440. .test(el.value)) {
  1441. return that.$util.Tips({
  1442. title: '请输入正确的' + el.title
  1443. });
  1444. }
  1445. }
  1446. that.extend[i] = {
  1447. title: el.title,
  1448. value: el.value
  1449. }
  1450. }
  1451. }
  1452. data = {
  1453. type: this.payType,
  1454. cart_id: this.cartId.split(","),
  1455. address_id: this.addressId,
  1456. use_coupon: this.subCoupon,
  1457. pay_type: this.payType,
  1458. mark: this.msgObj,
  1459. order_type: this.order_type,
  1460. key: this.order_key,
  1461. takes: this.take,
  1462. use_integral: this.use_integral,
  1463. receipt_data: this.invoiceData,
  1464. extend: this.extend,
  1465. // #ifdef H5
  1466. return_url: 'http://' + window.location.host + '/pages/users/order_list/index',
  1467. // #endif
  1468. };
  1469. if (data.mark && this.isEmojiCharacter(data.mark[Object.keys(data.mark)[0]])) {
  1470. that.$util.Tips({
  1471. title: '备注不允许输入表情!'
  1472. });
  1473. return;
  1474. }
  1475. data.takes = []
  1476. this.cartInfo.map(el => {
  1477. if (el.isTake == 1 || el.order.isTake) {
  1478. data.takes.push(el.mer_id)
  1479. }
  1480. })
  1481. if (data.payType == 'balance' && parseFloat(that.userInfo.now_money) < parseFloat(that.totalPrice))
  1482. return that.$util
  1483. .Tips({
  1484. title: '余额不足!'
  1485. });
  1486. uni.showLoading({
  1487. title: '订单支付中',
  1488. mask: true
  1489. });
  1490. // #ifdef MP
  1491. openPaySubscribe().then(() => {
  1492. that.payment(data);
  1493. });
  1494. // #endif
  1495. // #ifndef MP
  1496. that.payment(data);
  1497. // #endif
  1498. },
  1499. // 打开配送方式弹窗
  1500. openShowBox(item, index) {
  1501. if (item.delivery_way.length == 2) {
  1502. this.activeObj = item
  1503. this.activeIndex = index
  1504. this.isShowBox = true
  1505. }
  1506. },
  1507. boxClose() {
  1508. this.isShowBox = false
  1509. },
  1510. getData(data) {
  1511. this.cartInfo[this.activeIndex] = data
  1512. if (data.order.isTake) {
  1513. this.take.push(data.mer_id)
  1514. } else {
  1515. this.take.forEach((item, i) => {
  1516. if (data.mer_id == item) {
  1517. this.take.splice(i, 1)
  1518. }
  1519. })
  1520. }
  1521. this.isShowBox = false
  1522. this.getConfirm(this.addressId);
  1523. },
  1524. //查看内置地图
  1525. goMap(item) {
  1526. let that = this;
  1527. let lat = Number(item.take.mer_take_location[0]),
  1528. long = Number(item.take.mer_take_location[1])
  1529. //#ifdef H5
  1530. if (that.$wechat.isWeixin() === true) {
  1531. that.$wechat.seeLocation({
  1532. latitude: lat,
  1533. longitude: long,
  1534. name: item.mer_name,
  1535. address: item.take ? item.take.mer_take_address : '',
  1536. }).then(res => {
  1537. console.log('success');
  1538. })
  1539. } else {
  1540. //#endif
  1541. uni.openLocation({
  1542. latitude: parseFloat(lat),
  1543. longitude: parseFloat(long),
  1544. scale: 8,
  1545. name: item.mer_name,
  1546. address: item.take ? item.take.mer_take_address : '',
  1547. success: function(res) {
  1548. that.go_map = true
  1549. },
  1550. });
  1551. // #ifdef H5
  1552. }
  1553. //#endif
  1554. }
  1555. }
  1556. }
  1557. </script>
  1558. <style lang="scss" scoped>
  1559. /deep/checkbox .uni-checkbox-input.uni-checkbox-input-checked,
  1560. /deep/checkbox .wx-checkbox-input.wx-checkbox-input-checked {
  1561. border: 1px solid var(--view-theme) !important;
  1562. background-color: var(--view-theme) !important;
  1563. color: #fff !important;
  1564. }
  1565. .order-submission .line {
  1566. position: absolute;
  1567. left: 0;
  1568. top: 0;
  1569. width: 100%;
  1570. height: 3rpx;
  1571. }
  1572. .order-submission .line image {
  1573. width: 100%;
  1574. height: 100%;
  1575. display: block;
  1576. }
  1577. .order-submission .address {
  1578. padding: 28rpx 30rpx;
  1579. background-color: #fff;
  1580. box-sizing: border-box;
  1581. }
  1582. .order-submission .address .addressCon {
  1583. width: 610rpx;
  1584. font-size: 26rpx;
  1585. color: #666;
  1586. }
  1587. .order-submission .address .addressCon .name {
  1588. font-size: 30rpx;
  1589. color: #282828;
  1590. font-weight: bold;
  1591. margin-bottom: 10rpx;
  1592. }
  1593. .order-submission .address .addressCon .name .phone {
  1594. margin-left: 50rpx;
  1595. }
  1596. .order-submission .address .addressCon .default {
  1597. margin-right: 12rpx;
  1598. }
  1599. .t-color {
  1600. color: var(--view-theme);
  1601. }
  1602. .order-submission .address .addressCon .setaddress {
  1603. color: #333;
  1604. font-size: 28rpx;
  1605. }
  1606. .order-submission .address .iconfont {
  1607. font-size: 35rpx;
  1608. color: #707070;
  1609. }
  1610. .order-submission .allAddress {
  1611. width: 100%;
  1612. }
  1613. .order-submission .allAddress .nav {
  1614. width: 710rpx;
  1615. margin: 0 auto;
  1616. }
  1617. .order-submission .allAddress .nav .item {
  1618. width: 355rpx;
  1619. }
  1620. .order-submission .allAddress .nav .item.on {
  1621. position: relative;
  1622. width: 250rpx;
  1623. }
  1624. .order-submission .allAddress .nav .item.on::before {
  1625. position: absolute;
  1626. bottom: 0;
  1627. content: "快递配送";
  1628. font-size: 28rpx;
  1629. display: block;
  1630. height: 0;
  1631. width: 336rpx;
  1632. border-width: 0 20rpx 80rpx 0;
  1633. border-style: none solid solid;
  1634. border-color: transparent transparent #fff;
  1635. z-index: 2;
  1636. border-radius: 7rpx 30rpx 0 0;
  1637. text-align: center;
  1638. line-height: 80rpx;
  1639. }
  1640. .order-submission .allAddress .nav .item:nth-of-type(2).on::before {
  1641. content: "到店核销";
  1642. border-width: 0 0 80rpx 20rpx;
  1643. border-radius: 30rpx 7rpx 0 0;
  1644. }
  1645. .order-submission .allAddress .nav .item.on2 {
  1646. position: relative;
  1647. }
  1648. .order-submission .allAddress .nav .item.on2::before {
  1649. position: absolute;
  1650. bottom: 0;
  1651. content: "到店核销";
  1652. font-size: 28rpx;
  1653. display: block;
  1654. height: 0;
  1655. width: 400rpx;
  1656. border-width: 0 0 60rpx 60rpx;
  1657. border-style: none solid solid;
  1658. border-color: transparent transparent #f7c1bd;
  1659. border-radius: 40rpx 6rpx 0 0;
  1660. text-align: center;
  1661. line-height: 60rpx;
  1662. }
  1663. .order-submission .allAddress .nav .item:nth-of-type(1).on2::before {
  1664. content: "快递配送";
  1665. border-width: 0 60rpx 60rpx 0;
  1666. border-radius: 6rpx 40rpx 0 0;
  1667. }
  1668. .order-submission .allAddress .address {
  1669. height: 150rpx;
  1670. margin: 0 auto;
  1671. }
  1672. .order-submission .allAddress .line {
  1673. margin: 0 auto;
  1674. }
  1675. .order-submission .wrapper .item .discount .placeholder {
  1676. color: #ccc;
  1677. text-align: right;
  1678. }
  1679. .order-submission .wrapper {
  1680. margin-bottom: 12rpx;
  1681. background-color: #fff;
  1682. }
  1683. .order-submission .wrapper .item {
  1684. padding: 27rpx 30rpx;
  1685. font-size: 30rpx;
  1686. color: #282828;
  1687. }
  1688. .order-submission .virtual_form {
  1689. padding: 0 30rpx;
  1690. }
  1691. /deep/.order-submission .virtual_form .uni-input-wrapper {
  1692. text-align: right;
  1693. }
  1694. .order-submission .virtual_form .item-require {
  1695. color: red;
  1696. margin-right: 4rpx;
  1697. }
  1698. .order-submission .virtual_form .item {
  1699. border-bottom: 1rpx solid #EEEEEE;
  1700. padding: 27rpx 0;
  1701. }
  1702. .upload {
  1703. display: -webkit-box;
  1704. display: -moz-box;
  1705. display: -webkit-flex;
  1706. display: -ms-flexbox;
  1707. display: flex;
  1708. -webkit-box-lines: multiple;
  1709. -moz-box-lines: multiple;
  1710. -o-box-lines: multiple;
  1711. -webkit-flex-wrap: wrap;
  1712. -ms-flex-wrap: wrap;
  1713. flex-wrap: wrap;
  1714. }
  1715. .order-submission .virtual_form .pictrue {
  1716. width: 156rpx;
  1717. height: 156rpx;
  1718. margin: 24rpx 20rpx 0 0;
  1719. position: relative;
  1720. font-size: 11px;
  1721. color: #bbb;
  1722. border-radius: 3rpx;
  1723. &:nth-child(4n) {
  1724. margin-right: 0;
  1725. }
  1726. &:nth-last-child(1) {
  1727. border: 0.5px solid #ddd;
  1728. box-sizing: border-box;
  1729. }
  1730. uni-image,
  1731. image {
  1732. width: 100%;
  1733. height: 100%;
  1734. border-radius: 1px;
  1735. img {
  1736. -webkit-touch-callout: none;
  1737. -webkit-user-select: none;
  1738. -moz-user-select: none;
  1739. display: block;
  1740. position: absolute;
  1741. top: 0;
  1742. left: 0;
  1743. opacity: 0;
  1744. width: 100%;
  1745. height: 100%;
  1746. }
  1747. }
  1748. .icon-guanbi4 {
  1749. color: #fff;
  1750. font-size: 14rpx;
  1751. position: absolute;
  1752. top: 0;
  1753. right: 0;
  1754. width: 30rpx;
  1755. height: 30rpx;
  1756. text-align: center;
  1757. line-height: 30rpx;
  1758. border-radius: 0 8rpx 0 8rpx;
  1759. background: rgba(0, 0, 0, .6);
  1760. }
  1761. }
  1762. .order-submission .wrapper .item .discount {
  1763. font-size: 30rpx;
  1764. color: #999;
  1765. &.discount_voice {
  1766. overflow: hidden;
  1767. text-overflow: ellipsis;
  1768. white-space: nowrap;
  1769. width: 500rpx;
  1770. text-align: right;
  1771. }
  1772. }
  1773. .order-submission .wrapper .item .discount .iconfont {
  1774. color: #515151;
  1775. font-size: 30rpx;
  1776. margin-left: 15rpx;
  1777. }
  1778. .order-submission .wrapper .item .discount .num {
  1779. font-size: 32rpx;
  1780. margin-right: 20rpx;
  1781. }
  1782. .order-submission .wrapper .item .shipping {
  1783. font-size: 30rpx;
  1784. color: #999;
  1785. position: relative;
  1786. padding-right: 58rpx;
  1787. }
  1788. .order-submission .wrapper .item .shipping .iconfont {
  1789. font-size: 35rpx;
  1790. color: #707070;
  1791. position: absolute;
  1792. right: 0;
  1793. top: 50%;
  1794. transform: translateY(-50%);
  1795. margin-left: 30rpx;
  1796. }
  1797. .order-submission .wrapper .item input {
  1798. flex: 1;
  1799. height: 100%;
  1800. margin-left: 20rpx;
  1801. text-align: right;
  1802. }
  1803. .order-submission .wrapper .item .placeholder {
  1804. color: #ccc;
  1805. }
  1806. .order-submission .wrapper .item .list {
  1807. margin-top: 35rpx;
  1808. }
  1809. .order-submission .wrapper .item .list .payItem {
  1810. border: 1px solid #eee;
  1811. border-radius: 6rpx;
  1812. height: 86rpx;
  1813. width: 100%;
  1814. box-sizing: border-box;
  1815. margin-top: 20rpx;
  1816. font-size: 28rpx;
  1817. color: #282828;
  1818. }
  1819. .order-submission .wrapper .item .list .payItem.on {
  1820. border-color: var(--view-theme);
  1821. color: var(--view-theme);
  1822. }
  1823. .order-submission .wrapper .item .list .payItem .name {
  1824. width: 50%;
  1825. text-align: center;
  1826. border-right: 1px solid #eee;
  1827. justify-content: left;
  1828. padding-left: 80rpx;
  1829. }
  1830. .order-submission .wrapper .item .list .payItem .name .iconfont {
  1831. width: 44rpx;
  1832. height: 44rpx;
  1833. border-radius: 50%;
  1834. text-align: center;
  1835. line-height: 44rpx;
  1836. background-color: #fe960f;
  1837. color: #fff;
  1838. font-size: 30rpx;
  1839. margin-right: 15rpx;
  1840. }
  1841. .order-submission .wrapper .item .list .payItem .name .iconfont.icon-weixin2 {
  1842. background-color: #41b035;
  1843. }
  1844. .order-submission .wrapper .item .list .payItem .name .iconfont.icon-zhifubao {
  1845. background-color: #4295D5;
  1846. }
  1847. .order-submission .wrapper .item .list .payItem .tip {
  1848. width: 49%;
  1849. text-align: center;
  1850. font-size: 26rpx;
  1851. color: #aaa;
  1852. }
  1853. .order-submission .moneyList {
  1854. margin-top: 12rpx;
  1855. background-color: #fff;
  1856. padding: 30rpx;
  1857. }
  1858. .order-submission .moneyList .item {
  1859. font-size: 28rpx;
  1860. color: #282828;
  1861. }
  1862. .order-submission .moneyList .item~.item {
  1863. margin-top: 20rpx;
  1864. }
  1865. .order-submission .moneyList .item .money {
  1866. color: #868686;
  1867. }
  1868. .order-submission .footer {
  1869. width: 100%;
  1870. height: 100rpx;
  1871. background-color: #fff;
  1872. padding: 0 30rpx;
  1873. font-size: 28rpx;
  1874. color: #333;
  1875. box-sizing: border-box;
  1876. position: fixed;
  1877. bottom: 0;
  1878. left: 0;
  1879. z-index: 30;
  1880. .footer_count {
  1881. font-size: 28rpx;
  1882. }
  1883. .coupon_price {
  1884. color: #999999;
  1885. font-size: 20rpx;
  1886. margin-top: 10rpx;
  1887. text {
  1888. color: #282828;
  1889. padding: 2rpx 10rpx;
  1890. background: #F5F5F5;
  1891. border-radius: 26rpx;
  1892. margin-left: 20rpx;
  1893. line-height: 30rpx;
  1894. height: 30rpx;
  1895. display: inline-block;
  1896. }
  1897. }
  1898. }
  1899. .pColor {
  1900. color: var(--view-priceColor);
  1901. }
  1902. .order-submission .footer .settlement {
  1903. font-size: 30rpx;
  1904. color: #fff;
  1905. width: 240rpx;
  1906. height: 70rpx;
  1907. background-color: var(--view-theme);
  1908. border-radius: 50rpx;
  1909. text-align: center;
  1910. line-height: 70rpx;
  1911. &.disabled {
  1912. background-color: #cccccc;
  1913. }
  1914. }
  1915. .footer .transparent {
  1916. opacity: 0
  1917. }
  1918. .event_bg {
  1919. background: #FF7F00;
  1920. }
  1921. .event_color {
  1922. color: #FF7F00;
  1923. }
  1924. .color_red {
  1925. color: var(--view-theme);
  1926. }
  1927. .storeinfo-wrapper {
  1928. .store-item {
  1929. margin-top: 12rpx;
  1930. background-color: #fff;
  1931. .store-title {
  1932. display: flex;
  1933. align-items: center;
  1934. padding: 28rpx 30rpx;
  1935. .icon-shangjiadingdan {
  1936. font-size: 32rpx;
  1937. }
  1938. .icon-xiangyou {
  1939. font-size: 26rpx;
  1940. color: #999;
  1941. }
  1942. .txt {
  1943. margin: 0 8rpx;
  1944. }
  1945. }
  1946. .product-item {
  1947. display: flex;
  1948. padding: 25rpx 30rpx;
  1949. border-top: 1px solid #F0F0F0;
  1950. .img-box {
  1951. width: 130rpx;
  1952. height: 130rpx;
  1953. image {
  1954. width: 130rpx;
  1955. height: 130rpx;
  1956. border-radius: 16rpx;
  1957. }
  1958. }
  1959. .content {
  1960. position: relative;
  1961. width: 550rpx;
  1962. margin-left: 30rpx;
  1963. font-size: 28rpx;
  1964. color: #282828;
  1965. &.event_content {
  1966. .line1 {
  1967. width: 360rpx;
  1968. }
  1969. .price {
  1970. position: absolute;
  1971. top: 0;
  1972. right: 0;
  1973. margin-top: 0;
  1974. text {
  1975. display: block;
  1976. text-align: right;
  1977. }
  1978. }
  1979. }
  1980. .event_name {
  1981. display: inline-block;
  1982. margin-right: 9rpx;
  1983. color: #fff;
  1984. font-size: 20rpx;
  1985. padding: 0 8rpx;
  1986. line-height: 30rpx;
  1987. text-align: center;
  1988. border-radius: 6rpx;
  1989. }
  1990. .event_ship {
  1991. font-size: 20rpx;
  1992. margin-top: 10rpx;
  1993. }
  1994. .label {
  1995. margin-top: 10rpx;
  1996. color: #868686;
  1997. font-size: 20rpx;
  1998. }
  1999. .price {
  2000. margin-top: 20rpx;
  2001. color: var(--view-priceColor);
  2002. text {
  2003. margin-left: 10rpx;
  2004. color: #999;
  2005. }
  2006. }
  2007. .err-txt {
  2008. display: flex;
  2009. align-items: center;
  2010. margin-top: 18rpx;
  2011. color: $theme-color;
  2012. .iconfont {
  2013. margin-right: 10rpx;
  2014. }
  2015. }
  2016. .step {
  2017. position: absolute;
  2018. right: 0;
  2019. top: 100rpx;
  2020. display: flex;
  2021. align-items: center;
  2022. .min {
  2023. width: 50rpx;
  2024. height: 40rpx;
  2025. background-image: url('~@/static/images/min.png');
  2026. background-size: 17rpx 17rpx;
  2027. background-position: center;
  2028. background-repeat: no-repeat;
  2029. }
  2030. .num-box {
  2031. width: 68rpx;
  2032. height: 40rpx;
  2033. line-height: 40rpx;
  2034. text-align: center;
  2035. background: #F2F2F2;
  2036. font-size: 23rpx;
  2037. }
  2038. .add {
  2039. width: 50rpx;
  2040. height: 40rpx;
  2041. background-image: url('~@/static/images/add.png');
  2042. background-size: 17rpx 17rpx;
  2043. background-position: center;
  2044. background-repeat: no-repeat;
  2045. }
  2046. }
  2047. }
  2048. }
  2049. }
  2050. .event_payTime {
  2051. padding: 0 30rpx 24rpx;
  2052. .event_progress {
  2053. margin-top: 50rpx;
  2054. position: relative;
  2055. }
  2056. .progress_step {
  2057. height: 80rpx;
  2058. position: relative;
  2059. padding-left: 60rpx;
  2060. &::before {
  2061. content: '';
  2062. display: block;
  2063. width: 2rpx;
  2064. height: 40rpx;
  2065. background: var(--view-theme);
  2066. position: absolute;
  2067. left: 35rpx;
  2068. top: 18rpx;
  2069. }
  2070. &:nth-child(2) {
  2071. &::before {
  2072. bottom: 64rpx;
  2073. top: auto;
  2074. background: #EFEFEF;
  2075. }
  2076. &::after {
  2077. background: #EFEFEF;
  2078. }
  2079. }
  2080. &::after {
  2081. content: '';
  2082. display: block;
  2083. width: 14rpx;
  2084. height: 14rpx;
  2085. background: var(--view-theme);
  2086. border-radius: 50%;
  2087. position: absolute;
  2088. top: 10rpx;
  2089. left: 29rpx;
  2090. }
  2091. .name {
  2092. float: left;
  2093. color: #282828;
  2094. &.color_red {
  2095. color: var(--view-theme);
  2096. }
  2097. }
  2098. .price {
  2099. float: right;
  2100. color: #282828;
  2101. &.color_red {
  2102. color: var(--view-priceColor);
  2103. }
  2104. }
  2105. }
  2106. .progress_pay {
  2107. padding-left: 60rpx;
  2108. font-size: 24rpx;
  2109. color: #868686;
  2110. margin-top: -34rpx;
  2111. }
  2112. }
  2113. }
  2114. .integral_checked {
  2115. margin-left: 10rpx;
  2116. position: relative;
  2117. top: -2rpx;
  2118. display: inline;
  2119. }
  2120. uni-checkbox-group,
  2121. .checkgroup {
  2122. width: 100%;
  2123. .checkbox {
  2124. float: right;
  2125. }
  2126. }
  2127. .icon-wenhao1 {
  2128. color: #868686;
  2129. margin-right: 6rpx;
  2130. }
  2131. .total {
  2132. display: flex;
  2133. justify-content: flex-end;
  2134. padding-right: 30rpx;
  2135. padding-bottom: 30rpx;
  2136. font-size: 26rpx;
  2137. color: #282828;
  2138. .price {
  2139. margin-left: 10rpx;
  2140. color: var(--view-priceColor);
  2141. font-size: 28rpx;
  2142. font-weight: bold;
  2143. text {
  2144. font-size: 20rpx;
  2145. }
  2146. }
  2147. }
  2148. .store-address {
  2149. padding: 30rpx 23rpx;
  2150. margin: 0 30rpx;
  2151. background: #F6F6F6;
  2152. border-radius: 8rpx;
  2153. font-size: 24rpx;
  2154. display: -webkit-box;
  2155. display: -moz-box;
  2156. display: -ms-flexbox;
  2157. display: -webkit-flex;
  2158. display: flex;
  2159. /*垂直居中*/
  2160. -webkit-box-align: center;
  2161. /*旧版本*/
  2162. -moz-box-align: center;
  2163. /*旧版本*/
  2164. -ms-flex-align: center;
  2165. /*混合版本*/
  2166. -webkit-align-items: center;
  2167. /*新版本*/
  2168. align-items: center;
  2169. /*新版本*/
  2170. .name {
  2171. width: 148rpx;
  2172. margin-right: 20rpx;
  2173. }
  2174. .info {
  2175. flex: 1;
  2176. }
  2177. .map {
  2178. text-align: center;
  2179. padding-left: 40rpx;
  2180. position: relative;
  2181. &::before {
  2182. content: '';
  2183. display: inline-block;
  2184. width: 2rpx;
  2185. height: 42rpx;
  2186. background-color: #DDDDDD;
  2187. position: absolute;
  2188. left: 0;
  2189. top: 18rpx;
  2190. }
  2191. .iconfont {
  2192. color: var(--view-theme);
  2193. }
  2194. .map_text {
  2195. color: var(--view-theme);
  2196. }
  2197. }
  2198. }
  2199. .settlementAgreement {
  2200. width: 100%;
  2201. height: 100%;
  2202. position: fixed;
  2203. top: 0;
  2204. left: 0;
  2205. background: rgba(0, 0, 0, .5);
  2206. z-index: 40;
  2207. }
  2208. .settlementAgreement .setAgCount {
  2209. background: #fff;
  2210. width: 656rpx;
  2211. height: 458px;
  2212. position: absolute;
  2213. top: 50%;
  2214. left: 50%;
  2215. border-radius: 12rpx;
  2216. -webkit-border-radius: 12rpx;
  2217. padding: 52rpx;
  2218. -webkit-transform: translate(-50%, -50%);
  2219. -moz-transform: translate(-50%, -50%);
  2220. transform: translate(-50%, -50%);
  2221. overflow: hidden;
  2222. .content {
  2223. height: 900rpx;
  2224. overflow-y: scroll;
  2225. /deep/ p {
  2226. font-size: 13px;
  2227. line-height: 22px;
  2228. }
  2229. /deep/ img {
  2230. max-width: 100%;
  2231. }
  2232. }
  2233. }
  2234. .settlementAgreement .setAgCount .icon {
  2235. font-size: 42rpx;
  2236. color: #b4b1b4;
  2237. position: absolute;
  2238. top: 15rpx;
  2239. right: 15rpx;
  2240. }
  2241. .settlementAgreement .setAgCount .title {
  2242. color: #333;
  2243. font-size: 32rpx;
  2244. text-align: center;
  2245. font-weight: bold;
  2246. }
  2247. .settlementAgreement .setAgCount .content {
  2248. margin-top: 32rpx;
  2249. color: #333;
  2250. font-size: 26rpx;
  2251. line-height: 22px;
  2252. text-align: justify;
  2253. text-justify: distribute-all-lines;
  2254. height: 756rpx;
  2255. overflow-y: scroll;
  2256. }
  2257. </style>