index.vue 65 KB

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