index.vue 66 KB

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