index.vue 65 KB

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