index.vue 66 KB

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