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