index.vue 75 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695
  1. <template>
  2. <view :style="colorStyle">
  3. <view class='order-submission'>
  4. <view class="headerCon" v-if="ptype == 6">
  5. <view class="add-title acea-row row-between-wrapper">
  6. <view class="acea-row row-middle">
  7. <view class="icon ">
  8. 门店选择</view>
  9. <view class="text add-text line1">线上下单</view>
  10. <view class="text add-text line1" v-if="deliveryType==3">{{system_store.name || '请选择门店'}}
  11. </view>
  12. </view>
  13. <view class="text" @tap='onDelivery'>
  14. 点击切换 <text class='iconfont icon-jiantou'></text></view>
  15. </view>
  16. <view class="address acea-row row-between-wrapper">
  17. <view class="addressCon" v-if="storeList.length>0">
  18. <view class='name acea-row row-middle'>
  19. <view class="nameCon line1 on">{{system_store.name || ''}}</view>
  20. </view>
  21. <view class="line1">
  22. {{system_store.address || ''}}{{system_store.detailed_address || ''}}
  23. </view>
  24. </view>
  25. <view class='addressCon' v-else>
  26. <view class='setaddress'>暂无门店信息</view>
  27. </view>
  28. <view class="icon acea-row row-middle" v-if="storeList.length>0">
  29. <view class="iconfont icon-dianhua" @click.stop="call(system_store.phone)"></view>
  30. <view class="iconfont icon-dingwei2" @click.stop="showMaoLocation(system_store)"></view>
  31. </view>
  32. </view>
  33. </view>
  34. <view class="allAddress" v-if="product_type == 0">
  35. <!-- #ifdef MP -->
  36. <!-- 桌码信息 -->
  37. <view v-if="tableId" class="table-header">
  38. <view class="top">
  39. <view class="name">{{ codeData.storeName.storeName }}</view>
  40. <view class="number"><text
  41. class="light">{{ codeData.category.name }}{{ codeData.table_number }}</text>号桌</view>
  42. </view>
  43. <view>{{ codeData.serial_number }}</view>
  44. </view>
  45. <!-- #endif -->
  46. <!-- 地址 -->
  47. <view v-if="!tableId" class='headerCon'>
  48. <view class="add-title acea-row row-between-wrapper">
  49. <view class="acea-row row-middle">
  50. <view class="icon" :class="deliveryType==1?'':deliveryType==3?'orange':'red'">
  51. {{deliveryType==1?'商城配送':deliveryType==2?'门店自提':'门店配送'}}
  52. </view>
  53. <view class="text add-text line1" v-if="deliveryType==1">由平台为您提供配送服务</view>
  54. <view class="text add-text line1" v-if="deliveryType==2">线上下单,到店自提</view>
  55. <view class="text add-text line1" v-if="deliveryType==3">{{system_store.name || '请选择门店'}}
  56. </view>
  57. </view>
  58. <view class="text" @tap='onDelivery'
  59. v-if="(isDisplay.length >1 || (isDisplay.length==1 && deliveryType !=1)) && store_func_status && goodsType != 9">
  60. 点击切换 <text class='iconfont icon-jiantou'></text></view>
  61. </view>
  62. <view class="address acea-row row-between-wrapper" @tap="onAddress(addressInfo.real_name)"
  63. v-if="deliveryType==1 || deliveryType==3">
  64. <view class="addressCon" v-if="addressInfo.real_name">
  65. <view class='name acea-row row-middle'>
  66. <view class="nameCon line1">{{addressInfo.real_name}}</view><text
  67. class='phone'>{{addressInfo.phone}}</text>
  68. </view>
  69. <view class="line1">
  70. <text class='default font-num'
  71. v-if="addressInfo.is_default">[默认]</text>{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.district}}{{addressInfo.street}}{{addressInfo.detail}}
  72. </view>
  73. </view>
  74. <view class='addressCon' v-else>
  75. <view class='setaddress'>设置收货地址</view>
  76. </view>
  77. <view class="iconfont icon-s-bianji"></view>
  78. </view>
  79. <view class="address acea-row row-between-wrapper" v-else>
  80. <view class="addressCon" v-if="storeList.length>0">
  81. <view class='name acea-row row-middle'>
  82. <view class="nameCon line1 on">{{system_store.name || ''}}</view>
  83. </view>
  84. <view class="line1">
  85. {{system_store.address || ''}}{{system_store.detailed_address || ''}}
  86. </view>
  87. </view>
  88. <view class='addressCon' v-else>
  89. <view class='setaddress'>暂无门店信息</view>
  90. </view>
  91. <view class="icon acea-row row-middle" v-if="storeList.length>0">
  92. <view class="iconfont icon-dianhua" @click.stop="call(system_store.phone)"></view>
  93. <view class="iconfont icon-dingwei2" @click.stop="showMaoLocation(system_store)"></view>
  94. </view>
  95. </view>
  96. </view>
  97. <view v-if="!tableId" class='line'>
  98. <image src='/static/images/line.jpg'></image>
  99. </view>
  100. </view>
  101. <view class="wrapper">
  102. <group-goods-list v-if="collage_id" :goods-list="goodsList"></group-goods-list>
  103. <orderGoods v-else :cartInfo="cartInfo" :giveData="giveData" :shippingType="shippingType"
  104. :product_type='product_type' :giveCartInfo="giveCartInfo"></orderGoods>
  105. </view>
  106. <!-- <view class='moneyList' v-if="ptype == 5">
  107. <view class="item acea-row row-between-wrapper" >
  108. <view>销售员工</view>
  109. </view>
  110. <scroll-view scroll-x="true" class="zp-wrap" @scrolltolower="">
  111. <view class="zp-item" v-for="ygitem in saleyg.list" @click="choosYg(ygitem)"
  112. :class="{'choose': ygitem.id == sale_yg.id}">
  113. <image :src="ygitem.avatar || '../../../static/images/avt.png'" mode="" class="zp-logo"></image>
  114. <view class="zp-name">{{ygitem.alias}}</view>
  115. </view>
  116. </scroll-view>
  117. </view> -->
  118. <view class='wrapper'>
  119. <view class="item acea-row row-between-wrapper" v-if="ptype == 6">
  120. <view>预约时间</view>
  121. <view class='discount' @click="openDatetimePicker">
  122. {{yytime || '请选择预约时间'}}
  123. <text class='iconfont icon-jiantou'></text>
  124. </view>
  125. </view>
  126. <view class='item acea-row row-between-wrapper' @tap='couponTap'
  127. v-if="!pinkId && !BargainId && !combinationId && !seckillId&& !noCoupon && !discountId && goodsType != 7 && priceGroup.firstOrderPrice==0&&ptype != 5">
  128. <view>优惠券</view>
  129. <view class='discount'>{{couponTitle}}
  130. <text class='iconfont icon-jiantou'></text>
  131. </view>
  132. </view>
  133. <view class='item acea-row row-between-wrapper'
  134. v-if="!pinkId && !BargainId && !combinationId && !seckillId && integral_ratio_status == 1">
  135. <view>积分抵扣</view>
  136. <view class='discount acea-row row-middle'>
  137. <view> {{useIntegral ? "剩余积分":"当前积分"}}
  138. <text class='num font-color'>{{integral || 0}}</text>
  139. </view>
  140. <checkbox-group @change="ChangeIntegral">
  141. <checkbox :disabled="integral<=0 && !useIntegral" :checked='useIntegral ? true : false' />
  142. </checkbox-group>
  143. </view>
  144. </view>
  145. <view v-if="invoice_func || special_invoice" class='item acea-row row-between-wrapper' @tap="goInvoice">
  146. <view>开具发票</view>
  147. <view class='discount'>
  148. {{invTitle}}
  149. <text class='iconfont icon-jiantou'></text>
  150. </view>
  151. </view>
  152. <!-- <view class='item acea-row row-between-wrapper' v-if="priceGroup.vipPrice > 0 && userInfo.vip && !pinkId && !BargainId && !combinationId && !seckillId">
  153. <view>会员优惠</view>
  154. <view class='discount'>-¥{{priceGroup.vipPrice}}</view>
  155. </view>
  156. <view class='item acea-row row-between-wrapper' v-if='shippingType==0'>
  157. <view>快递费用</view>
  158. <view class='discount' v-if='priceGroup.storePostage > 0'>+¥{{priceGroup.storePostage}}</view>
  159. <view class='discount' v-else>免运费</view>
  160. </view> -->
  161. <view v-if="shippingType == 1">
  162. <view class="item acea-row row-between-wrapper">
  163. <view>联系人</view>
  164. <view class="discount">
  165. <input v-model="contacts" type="text" placeholder="请填写您的联系姓名"
  166. placeholder-class="placeholder"></input>
  167. </view>
  168. </view>
  169. <view class="item acea-row row-between-wrapper">
  170. <view>联系电话</view>
  171. <view class="discount">
  172. <input type="number" maxlength="11" v-model="contactsTel" placeholder="请填写您的联系电话"
  173. placeholder-class="placeholder"></input>
  174. </view>
  175. </view>
  176. </view>
  177. <!-- <view class='item acea-row row-between-wrapper' wx:else>
  178. <view>自提门店</view>
  179. <view class='discount'>{{system_store.name}}</view>
  180. </view> -->
  181. <view class='item' v-if="textareaStatus">
  182. <view>备注信息</view>
  183. <!-- <view class="placeholder-textarea"> -->
  184. <textarea placeholder-class='placeholder' placeholder="请添加备注(150字以内)" :always-embed="true"
  185. :adjust-position="true" cursor-spacing="30" v-if="!coupon.coupon" @input='bindHideKeyboard'
  186. :value="mark" :maxlength="150" name="mark">
  187. </textarea>
  188. <!-- <view class="placeholder" @click="clickTextArea" v-show="!mark">
  189. 请添加备注(150字以内)
  190. </view> -->
  191. <!-- </view> -->
  192. </view>
  193. </view>
  194. <view class='wrapper' v-if="confirm.length">
  195. <view class='item acea-row row-between-wrapper'
  196. :class="{on:(item.name=='radios' || item.name=='checkboxs'),on2:item.name == 'dateranges',on3:item.name == 'citys'}"
  197. v-for="(item,index) in confirm" :key="index">
  198. <view class="name">
  199. <span class="asterisk" v-if="item.titleShow.val">*</span>
  200. {{ item.titleConfig.value }}
  201. </view>
  202. <!-- radio -->
  203. <view v-if="item.name=='radios'" class="discount">
  204. <radio-group @change="radioChange(e, index, item)" class="acea-row row-middle row-right">
  205. <label class="radio" v-for="(j,jindex) in item.wordsConfig.list" :key="jindex">
  206. <view class="acea-row row-middle">
  207. <!-- #ifndef MP -->
  208. <radio :value="jindex.toString()" :checked='j.show' />
  209. <!-- #endif -->
  210. <!-- #ifdef MP -->
  211. <radio :value="jindex" :checked='j.show' />
  212. <!-- #endif -->
  213. <view>{{j.val}}</view>
  214. </view>
  215. </label>
  216. </radio-group>
  217. </view>
  218. <!-- checkbox -->
  219. <view v-if="item.name=='checkboxs'" class="discount">
  220. <checkbox-group @change="checkboxChange($event, index, item)"
  221. class="acea-row row-middle row-right">
  222. <label class="radio" v-for="(j,jindex) in item.wordsConfig.list" :key="jindex">
  223. <view class="acea-row row-middle">
  224. <!-- #ifndef MP -->
  225. <checkbox :value="jindex.toString()" :checked="j.show"
  226. style="transform:scale(0.9)" />
  227. <!-- #endif -->
  228. <!-- #ifdef MP -->
  229. <checkbox :value="jindex" :checked="j.show" style="transform:scale(0.9)" />
  230. <!-- #endif -->
  231. <view>{{j.val}}</view>
  232. </view>
  233. </label>
  234. </checkbox-group>
  235. </view>
  236. <!-- text -->
  237. <view v-if="item.name=='texts' && item.valConfig.tabVal == 0" class="discount">
  238. <input type="text" :placeholder="item.tipConfig.value" placeholder-class="placeholder"
  239. v-model="item.value" />
  240. </view>
  241. <!-- number -->
  242. <view v-if="item.name=='texts' && item.valConfig.tabVal == 4" class="discount">
  243. <input type="number" :placeholder="item.tipConfig.value" placeholder-class="placeholder"
  244. v-model="item.value" />
  245. </view>
  246. <!-- email -->
  247. <view v-if="item.name=='texts' && item.valConfig.tabVal == 3" class="discount">
  248. <input type="text" :placeholder="item.tipConfig.value" placeholder-class="placeholder"
  249. v-model="item.value" />
  250. </view>
  251. <!-- data -->
  252. <view v-if="item.name=='dates'" class="discount">
  253. <picker mode="date" :value="item.value" @change="bindDateChange($event,index)">
  254. <view class="acea-row row-between-wrapper">
  255. <view v-if="item.value == ''">{{item.tipConfig.value}}</view>
  256. <view v-else>{{item.value}}</view>
  257. <text class='iconfont icon-jiantou'></text>
  258. </view>
  259. </picker>
  260. </view>
  261. <!-- dateranges -->
  262. <view v-if="item.name=='dateranges'" class="discount">
  263. <uni-datetime-picker v-model="item.value" type="daterange" @maskClick="maskClick">
  264. {{item.value.length?item.value[0]+' - '+item.value[1]:item.tipConfig.value}}
  265. <text class='iconfont icon-jiantou'></text>
  266. </uni-datetime-picker>
  267. </view>
  268. <!-- time -->
  269. <view v-if="item.name=='times'" class="discount">
  270. <picker mode="time" :value="item.value" @change="bindTimeChange($event,index)"
  271. :placeholder="item.tipConfig.value">
  272. <view class="acea-row row-between-wrapper">
  273. <view v-if="item.value == ''">{{item.tipConfig.value}}</view>
  274. <view v-else>{{item.value}}</view>
  275. <text class='iconfont icon-jiantou'></text>
  276. </view>
  277. </picker>
  278. </view>
  279. <!-- timeranges -->
  280. <view v-if="item.name=='timeranges'" class="discount acea-row row-between-wrapper"
  281. @click="getTimeranges(index)">
  282. <view v-if="item.value">{{item.value}}</view>
  283. <view v-else>{{item.tipConfig.value}}</view>
  284. <text class='iconfont icon-jiantou'></text>
  285. </view>
  286. <!-- select -->
  287. <view v-if="item.name=='selects'" class="discount">
  288. <picker :value="item.value" :range="item.wordsConfig.list"
  289. @change="bindSelectChange($event,index,item)" range-key="val">
  290. <view class="acea-row row-between-wrapper">
  291. <view v-if="item.value == ''">请选择</view>
  292. <view v-else>{{item.value}}</view>
  293. <text class='iconfont icon-jiantou'></text>
  294. </view>
  295. </picker>
  296. </view>
  297. <!-- city -->
  298. <view v-if="item.name=='citys'" class="discount" @click="changeRegion(index)">
  299. <view class="acea-row row-middle row-right">
  300. <view class="city" v-if="item.value == ''">{{item.tipConfig.value}}</view>
  301. <view class="city" v-else>{{item.value}}</view>
  302. <text class='iconfont icon-jiantou'></text>
  303. </view>
  304. </view>
  305. <!-- id -->
  306. <view v-if="item.name=='texts' && item.valConfig.tabVal == 2" class="discount">
  307. <input type="idcard" :placeholder="item.tipConfig.value" placeholder-class="placeholder"
  308. v-model="item.value" />
  309. </view>
  310. <!-- phone -->
  311. <view v-if="item.name=='texts' && item.valConfig.tabVal == 1" class="discount">
  312. <input type="number" :placeholder="item.tipConfig.value" placeholder-class="placeholder"
  313. v-model="item.value" />
  314. </view>
  315. <!-- img -->
  316. <view v-if="item.name=='uploadPicture'" class="confirmImg">
  317. <view class='upload acea-row row-middle'>
  318. <view class='pictrue' v-for="(items,indexs) in item.value" :key="indexs">
  319. <image :src='items' mode="aspectFill"></image>
  320. <!-- <view class='iconfont icon-guanbi1 font-num' @tap='DelPic(index,indexs)'></view> -->
  321. <view class="close acea-row row-center-wrapper" @tap='DelPic(index,indexs)'>
  322. <view class="iconfont icon-guanbi5"></view>
  323. </view>
  324. </view>
  325. <view class='pictrue acea-row row-center-wrapper row-column' @tap='uploadpic(index)'
  326. v-if="item.value.length < item.numConfig.val">
  327. <text class='iconfont icon-icon25201'></text>
  328. <view>上传图片</view>
  329. </view>
  330. </view>
  331. </view>
  332. </view>
  333. </view>
  334. <view class='moneyList'>
  335. <view class='item acea-row row-between-wrapper'>
  336. <view>商品总价:</view>
  337. <!-- {{(parseFloat(priceGroup.totalPrice)+parseFloat(priceGroup.vipPrice)).toFixed(2)}} -->
  338. <view class='money'>
  339. ¥{{priceGroup.sumPrice}}
  340. </view>
  341. </view>
  342. <view class='item acea-row row-between-wrapper' v-if="priceGroup.storePostage > 0">
  343. <view>配送运费:</view>
  344. <view class='money'>
  345. ¥{{(parseFloat(priceGroup.storePostage)+parseFloat(priceGroup.storePostageDiscount)).toFixed(2)}}
  346. </view>
  347. </view>
  348. <view class='item acea-row row-between-wrapper'
  349. v-if="priceGroup.vipPrice > 0 && userInfo.vip && !pinkId && !BargainId && !combinationId && !seckillId && !discountId">
  350. <view>会员商品优惠:</view>
  351. <view class='money'>-¥{{parseFloat(priceGroup.vipPrice).toFixed(2)}}</view>
  352. </view>
  353. <view class='item acea-row row-between-wrapper' v-if="priceGroup.storePostageDiscount > 0">
  354. <view>会员运费优惠:</view>
  355. <view class='money'>-¥{{parseFloat(priceGroup.storePostageDiscount).toFixed(2)}}</view>
  356. </view>
  357. <view class='item acea-row row-between-wrapper' v-if="coupon_price > 0">
  358. <view>优惠券抵扣:</view>
  359. <view class='money'>-¥{{parseFloat(coupon_price).toFixed(2)}}</view>
  360. </view>
  361. <view class='item acea-row row-between-wrapper' v-if="parseFloat(priceGroup.firstOrderPrice) > 0">
  362. <view>新人首单优惠:</view>
  363. <view class='money'>-¥{{parseFloat(priceGroup.firstOrderPrice).toFixed(2)}}</view>
  364. </view>
  365. <view class='item acea-row row-between-wrapper' v-if="integral_price > 0">
  366. <view>积分抵扣:</view>
  367. <view class='money'>-¥{{parseFloat(integral_price).toFixed(2)}}</view>
  368. </view>
  369. <view class='item acea-row row-between' v-for="(item,index) in promotions_detail" :key="index"
  370. v-if="parseFloat(item.promotions_price)">
  371. <view>{{item.title}}:</view>
  372. <view class='money'>-¥{{parseFloat(item.promotions_price).toFixed(2)}}</view>
  373. </view>
  374. <!-- <view class='item acea-row row-between-wrapper' v-if="priceGroup.storePostage > 0">
  375. <view>运费:</view>
  376. <view class='money'>+¥{{priceGroup.storePostage}}</view>
  377. </view>
  378. <view class='item acea-row row-between-wrapper' v-if="priceGroup.storePostageDiscount > 0">
  379. <view>会员运费抵扣:</view>
  380. <view class='money'>-¥{{priceGroup.storePostageDiscount}}</view>
  381. </view> -->
  382. </view>
  383. <view class="height-add"></view>
  384. <view class='footer acea-row row-between-wrapper'>
  385. <view>合计:
  386. <text class='font-color'>¥{{totalPrice || 0}}</text>
  387. </view>
  388. <!-- <view class='settlement' style='z-index:100' @tap.stop="goPay"
  389. v-if="(((valid_count>0&&!discount_id) || (valid_count==cartInfo.length&&discount_id)) && shippingType) || (!shippingType && addressId) || product_type != 0">
  390. 立即结算</view>
  391. <view class='settlement bg-color-hui' style='z-index:100' v-else>立即结算</view> -->
  392. <view class='settlement' style='z-index:100' @tap.stop="goPay" v-if="
  393. (((valid_count>0&&!discount_id) || (valid_count==cartInfo.length&&discount_id))) ||
  394. (deliveryType == 2 && !shippingType) ||
  395. (deliveryType == 3 && shippingType) ||
  396. product_type != 0">
  397. 提交订单</view>
  398. <view class='settlement bg-color-hui' style='z-index:100' v-else>提交订单</view>
  399. </view>
  400. </view>
  401. <view class="alipaysubmit" v-html="formContent"></view>
  402. <view class="tipaddress" v-show="isaddress">
  403. <view class="top"></view>
  404. <view class="bottom">
  405. <div class="font1">更新地址</div>
  406. <div class="font2">当前地址功能已更新,请重新修改</div>
  407. <div class="btn" @tap="payAddress">前往修改</div>
  408. </view>
  409. </view>
  410. <view class="mark" v-show="isaddress"></view>
  411. <couponListWindow :coupon='coupon' @ChangCouponsClone="ChangCouponsClone" :openType='openType' :cartId='cartId'
  412. @ChangCoupons="ChangCoupons"></couponListWindow>
  413. <addressWindow ref="addressWindow" @changeTextareaStatus="changeTextareaStatus" :news='news' :address='address'
  414. :pagesUrl="pagesUrl" @OnChangeAddress="OnChangeAddress" @changeClose="changeClose">
  415. </addressWindow>
  416. <home v-show="!invShow && navigation"></home>
  417. <invoice-picker :inv-show="invShow" :inv-list="invList" :inv-checked="invChecked" :is-special="special_invoice"
  418. :url-query="urlQuery" @inv-close="invClose" @inv-change="invChange" @inv-cancel="invCancel">
  419. </invoice-picker>
  420. <payment :payMode="cartArr" :pay_close="pay_close" :isCall="true" :totalPrice="totalPrice.toString()"
  421. @changePayType="changePayType" @onChangeFun="onChangeFun"></payment>
  422. <deliveryMethod ref="deliveryMethod" :isDisplay="isDisplay" :storeList="storeList" :ptype="ptype"
  423. :storeSelfMention="store_self_mention" @deliveryFun="deliveryFun" @storeFun="storeFun"></deliveryMethod>
  424. <!-- #ifdef MP -->
  425. <!-- <authorize v-if="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize> -->
  426. <!-- #endif -->
  427. <timeranges :isShow='isShow' :time='timeranges' @confrim="confrim" @cancel="cancels"></timeranges>
  428. <areaWindow ref="areaWindow" :display="display" :address='addressInfoArea' :cityShow='cityShow'
  429. @submit="OnAreaAddress" @changeClose="changeAddressClose"></areaWindow>
  430. <buuug7-simple-datetime-picker ref="myPicker" @submit="handleSubmit" @err="datetimePickerErr" :start-year="start_year"
  431. :end-year="2030" :time-hide="[true, true, true, true, true, false]"
  432. :time-label="['年', '月', '日', '时', '分', '秒']" />
  433. </view>
  434. </template>
  435. <script>
  436. const CACHE_CITY = {};
  437. import dayjs from '@/plugin/dayjs/dayjs.min.js';
  438. import {
  439. orderConfirm,
  440. getCouponsOrderPrice,
  441. orderCreate,
  442. postOrderComputed,
  443. checkShipping
  444. } from '@/api/order.js';
  445. import {
  446. getAddressDefault,
  447. getAddressDetail,
  448. invoiceList,
  449. invoiceOrder
  450. } from '@/api/user.js';
  451. import {
  452. openPaySubscribe
  453. } from '@/utils/SubscribeMessage.js';
  454. import {
  455. storeListApi,
  456. getCollagePartake,
  457. getCodeData,
  458. getMen
  459. } from '@/api/store.js';
  460. import {
  461. CACHE_LONGITUDE,
  462. CACHE_LATITUDE
  463. } from '@/config/cache.js';
  464. import areaWindow from '@/components/areaWindow';
  465. import couponListWindow from '@/components/couponListWindow';
  466. import addressWindow from '@/components/addressWindow';
  467. import orderGoods from '@/components/orderGoods';
  468. import deliveryMethod from '../components/deliveryMethod/index.vue';
  469. import timeranges from '@/components/timeranges';
  470. import home from '@/components/home';
  471. import invoicePicker from '../components/invoicePicker';
  472. import groupGoodsList from '@/components/groupGoodsList/index.vue'
  473. import {
  474. toLogin
  475. } from '@/libs/login.js';
  476. import {
  477. mapGetters
  478. } from "vuex";
  479. import payment from '@/components/payment';
  480. import colors from "@/mixins/color";
  481. let newTime = new Date()
  482. export default {
  483. components: {
  484. payment,
  485. invoicePicker,
  486. couponListWindow,
  487. addressWindow,
  488. orderGoods,
  489. home,
  490. deliveryMethod,
  491. timeranges,
  492. areaWindow,
  493. groupGoodsList
  494. },
  495. mixins: [colors],
  496. data() {
  497. return {
  498. start_year: newTime.getFullYear(),
  499. addressInfoArea: [],
  500. cityShow: 2,
  501. display: false,
  502. timeranges: [],
  503. isShow: false,
  504. giveData: {
  505. give_integral: 0,
  506. give_coupon: []
  507. },
  508. giveCartInfo: [],
  509. confirm: [], //自定义留言
  510. id: 0,
  511. isaddress: false,
  512. textareaStatus: true,
  513. //支付方式
  514. cartArr: [{
  515. "name": "微信支付",
  516. "icon": "icon-weixin2",
  517. value: 'weixin',
  518. title: '使用微信快捷支付',
  519. payStatus: 1,
  520. },
  521. {
  522. "name": "支付宝支付",
  523. "icon": "icon-zhifubao",
  524. value: 'alipay',
  525. title: '使用线上支付宝支付',
  526. payStatus: 1,
  527. },
  528. {
  529. "name": "余额支付",
  530. "icon": "icon-yuezhifu",
  531. value: 'yue',
  532. title: '可用余额:',
  533. payStatus: 1,
  534. },
  535. {
  536. "name": "线下支付",
  537. "icon": "icon-yuezhifu1",
  538. value: 'offline',
  539. title: '选择线下付款方式',
  540. payStatus: 2,
  541. }
  542. ],
  543. formContent: '',
  544. payType: 'weixin', //支付方式
  545. openType: 1, //优惠券打开方式 1=使用
  546. active: 0, //支付方式切换
  547. coupon: {
  548. coupon: false,
  549. list: [],
  550. statusTile: '立即使用'
  551. }, //优惠券组件
  552. address: {
  553. address: false
  554. }, //地址组件
  555. addressInfo: {}, //地址信息
  556. pinkId: 0, //拼团id
  557. addressId: 0, //地址id
  558. couponId: 0, //优惠券id
  559. cartId: '', //购物车id
  560. BargainId: 0,
  561. combinationId: 0,
  562. seckillId: 0,
  563. discountId: 0,
  564. userInfo: {}, //用户信息
  565. mark: '', //备注信息
  566. couponTitle: '请选择', //优惠券
  567. coupon_price: 0, //优惠券抵扣金额
  568. promotions_detail: [], //优惠活动金额明细
  569. useIntegral: false, //是否使用积分
  570. integral_price: 0, //积分抵扣金额
  571. integral: 0,
  572. ChangePrice: 0, //使用积分抵扣变动后的金额
  573. formIds: [], //收集formid
  574. status: 0,
  575. is_address: false,
  576. toPay: false, //修复进入支付时页面隐藏从新刷新页面
  577. shippingType: 0,
  578. system_store: {},
  579. storePostage: 0,
  580. contacts: '',
  581. contactsTel: '',
  582. mydata: {},
  583. storeList: [],
  584. store_self_mention: 0, //是开启门店自提;
  585. store_func_status: false, //是否开启门店自提和门店配送;
  586. cartInfo: [],
  587. priceGroup: {},
  588. animated: false,
  589. totalPrice: 0,
  590. integralRatio: "0",
  591. pagesUrl: "",
  592. orderKey: "",
  593. // usableCoupon: {},
  594. offlinePostage: "",
  595. isAuto: false, //没有授权的不会自动授权
  596. isShowAuth: false, //是否隐藏授权
  597. from: '',
  598. news: 1,
  599. invTitle: '不开发票',
  600. special_invoice: false,
  601. invoice_func: false,
  602. integral_ratio_status: 1,
  603. header_type: '',
  604. invShow: false,
  605. invList: [],
  606. invChecked: '',
  607. urlQuery: '',
  608. pay_close: false,
  609. noCoupon: 0,
  610. valid_count: 0,
  611. discount_id: 0,
  612. storeId: 0,
  613. product_type: 1,
  614. newImg: [],
  615. isDisplay: [],
  616. deliveryType: 1,
  617. goodsType: 0,
  618. product_id: 0,
  619. selectIndex: 0,
  620. timerangesIndex: 0,
  621. collage_id: 0,
  622. goodsList: [],
  623. tableId: 0,
  624. codeData: {},
  625. ptype: 1,
  626. yytime: '',//预约时间
  627. saleyg: {
  628. list: [],
  629. },
  630. sale_yg: {}
  631. };
  632. },
  633. computed: mapGetters(['isLogin']),
  634. onLoad: function(options) {
  635. this.ptype = options.product_type
  636. if (this.ptype == 6) {
  637. this.getList()
  638. }
  639. this.getMen()
  640. // #ifdef H5
  641. this.from = this.$wechat.isWeixin() ? 'weixin' : 'weixinh5'
  642. // #endif
  643. // #ifdef MP
  644. this.from = 'routine'
  645. // #endif
  646. if (!options.cartId) return this.$util.Tips({
  647. title: '请选择要购买的商品'
  648. }, {
  649. tab: 3,
  650. url: 1
  651. });
  652. this.deliveryType = options.delivery_type || 1;
  653. if (this.deliveryType == 1 || this.deliveryType == 3) {
  654. this.addressId = options.addressId || 0;
  655. this.system_store.name = options.store_name;
  656. }
  657. if (this.deliveryType == 2 || this.deliveryType == 3) {
  658. this.storeId = options.store_id || 0;
  659. this.system_store.id = options.store_id || 0;
  660. }
  661. this.couponId = options.couponId || 0;
  662. this.noCoupon = options.noCoupon || 0;
  663. this.product_id = options.product_id || 0;
  664. this.pinkId = options.pinkId ? parseInt(options.pinkId) : 0;
  665. this.cartId = options.cartId;
  666. this.is_address = options.is_address ? true : false;
  667. this.news = !options.new || options.new === '0' ? 0 : 1;
  668. uni.setStorageSync('news', this.news);
  669. this.invChecked = options.invoice_id || '';
  670. this.header_type = options.header_type || '1';
  671. this.couponTitle = options.couponTitle || '请选择'
  672. switch (options.invoice_type) {
  673. case '1':
  674. this.invTitle = '增值税电子普通发票';
  675. break;
  676. case '2':
  677. this.invTitle = '增值税电子专用发票';
  678. break;
  679. }
  680. if (options.invoice_name) {
  681. this.invTitle = options.invoice_name;
  682. }
  683. // #ifndef APP-PLUS
  684. this.textareaStatus = true;
  685. // #endif
  686. if (this.isLogin && this.toPay == false) {
  687. this.getCheckShipping();
  688. } else {
  689. toLogin();
  690. }
  691. this.collage_id = options.collage_id || 0;
  692. if (this.collage_id) {
  693. this.getCollagePartake();
  694. }
  695. // #ifdef MP
  696. // 桌码
  697. this.tableId = options.tableId || 0;
  698. if (this.tableId) {
  699. this.getCodeData();
  700. }
  701. // #endif
  702. },
  703. /**
  704. * 生命周期函数--监听页面显示
  705. */
  706. onShow: function() {
  707. uni.removeStorageSync('form_type_cart');
  708. let _this = this
  709. uni.$on("handClick", res => {
  710. if (res) {
  711. _this.system_store = res.address
  712. _this.storeId = _this.system_store.id
  713. _this.cartId = res.cartId
  714. _this.news = res.new
  715. _this.pinkId = Number(res.pinkId)
  716. _this.couponId = res.couponId
  717. _this.getConfirm()
  718. }
  719. // 清除监听
  720. uni.$off('handClick');
  721. })
  722. let current = (dayjs(new Date(Number(new Date().getTime()))).format('HH:mm')).split(':');
  723. let currentArray = current;
  724. currentArray.push(0);
  725. let arrayNew = [];
  726. [...currentArray, ...current].forEach(item => {
  727. arrayNew.push(Number(item))
  728. })
  729. this.timeranges = arrayNew;
  730. },
  731. methods: {
  732. // 获取员工列表
  733. getMen(type) {
  734. let that = this
  735. getMen({
  736. page: 1,
  737. limit: 100,
  738. }).then(res => {
  739. let arr1 = res.data.list
  740. let arr2 = [{
  741. id: 0,
  742. alias: '暂无'
  743. }]
  744. that.saleyg.list = arr2.concat(arr1)
  745. })
  746. },
  747. // 选择员工
  748. choosYg(item) {
  749. this.sale_yg = item
  750. },
  751. // 打开picker
  752. openDatetimePicker() {
  753. this.$refs.myPicker.show();
  754. },
  755. // 关闭picker
  756. closeDatetimePicker() {
  757. this.$refs.myPicker.hide();
  758. },
  759. datetimePickerErr() {
  760. this.$util.Tips({
  761. title: '请选择正确的预约时间'
  762. });
  763. this.yytime = ''
  764. },
  765. handleSubmit(e) {
  766. console.log(e);
  767. this.yytime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`;
  768. },
  769. // #ifdef MP
  770. // 桌码信息
  771. getCodeData() {
  772. getCodeData({
  773. tableId: this.tableId
  774. }).then(res => {
  775. this.codeData = res.data;
  776. });
  777. },
  778. // #endif
  779. getCollagePartake() {
  780. getCollagePartake({
  781. collage_id: this.collage_id
  782. }).then(res => {
  783. this.goodsList = res.data;
  784. });
  785. },
  786. OnAreaAddress(address) {
  787. let addr = '';
  788. if (address.length == 4) {
  789. addr = address[0].label + '/' + address[1].label + '/' + address[2].label + '/' + address[3].label;
  790. } else if (address.length == 3) {
  791. addr = address[0].label + '/' + address[1].label + '/' + address[2].label;
  792. } else if (address.length == 2) {
  793. addr = address[0].label + '/' + address[1].label;
  794. } else {
  795. addr = address[0].label;
  796. }
  797. this.confirm[this.timerangesIndex].value = addr;
  798. CACHE_CITY[this.timerangesIndex] = address;
  799. },
  800. changeRegion(index) {
  801. if (!this.confirm[index].value) {
  802. this.addressInfoArea = [];
  803. }
  804. this.timerangesIndex = index;
  805. this.cityShow = Number(this.confirm[index].valConfig.tabVal) + 1;
  806. this.display = true;
  807. if (CACHE_CITY[index]) {
  808. this.addressInfoArea = CACHE_CITY[index];
  809. }
  810. },
  811. // 关闭地址弹窗;
  812. changeAddressClose: function() {
  813. this.display = false;
  814. },
  815. maskClick(e) {
  816. console.log(e);
  817. },
  818. // 授权关闭
  819. authColse: function(e) {
  820. this.isShowAuth = e
  821. },
  822. showMaoLocation(e) {
  823. let self = this;
  824. // #ifdef H5
  825. if (self.$wechat.isWeixin()) {
  826. self.$wechat.seeLocation({
  827. latitude: Number(e.latitude),
  828. longitude: Number(e.longitude),
  829. name: e.name,
  830. scale: 13,
  831. address: `${e.address}-${e.detailed_address}`,
  832. }).then(res => {})
  833. } else {
  834. // #endif
  835. uni.openLocation({
  836. latitude: Number(e.latitude),
  837. longitude: Number(e.longitude),
  838. name: e.name,
  839. address: `${e.address}-${e.detailed_address}`,
  840. success: function() {
  841. Number
  842. }
  843. });
  844. // #ifdef H5
  845. }
  846. // #endif
  847. },
  848. call(phone) {
  849. uni.makePhoneCall({
  850. phoneNumber: phone,
  851. });
  852. },
  853. // 选中配送类型
  854. deliveryFun(e, item) {
  855. this.deliveryType = e;
  856. this.$refs.deliveryMethod.module = false;
  857. if (e == 2) {
  858. this.storeId = item.id;
  859. } else {
  860. if (e == 3) {
  861. this.storeId = item.id;
  862. if (this.isDisplay.includes("2") && this.isDisplay.includes("3")) {
  863. this.getaddressInfo();
  864. this.$nextTick(function() {
  865. this.$refs.addressWindow.getAddressList();
  866. })
  867. }
  868. }
  869. this.system_store = item;
  870. }
  871. if (e == 1 || e == 3) {
  872. this.addressType(0, e);
  873. } else {
  874. this.addressType(1, e);
  875. }
  876. },
  877. // 选择配送方式
  878. onDelivery() {
  879. this.$refs.deliveryMethod.module = true
  880. },
  881. // 子集调用门店列表接口
  882. storeFun(index) {
  883. this.getList(1, index);
  884. },
  885. // 是否显示快递配送
  886. getCheckShipping() {
  887. let data = {
  888. cartId: this.cartId,
  889. new: this.news
  890. }
  891. checkShipping(data).then(res => {
  892. // 1:快递配送,2:到店自提,3:门店配送
  893. res.data.type.sort((x, y) => x - y) //正序
  894. this.isDisplay = res.data.type;
  895. if (((this.isDisplay.includes("2") && this.isDisplay.length == 1) || (this.deliveryType == 2 &&
  896. !this.tableId) || (this.deliveryType == 3 && this.storeId > 0 && !this.system_store
  897. .name)) && this.isDisplay.length) {
  898. if ((this.deliveryType == 2 || (this.deliveryType == 3 && !this.isDisplay.includes(
  899. "3"))) && this.isDisplay.includes("2")) {
  900. this.deliveryType = 2
  901. this.addressType(1, this.deliveryType);
  902. }
  903. if ((this.deliveryType == 3 || (this.deliveryType == 2 && !this.isDisplay.includes(
  904. "2"))) && this.isDisplay.includes("3")) {
  905. this.deliveryType = 3
  906. this.addressType(0, this.deliveryType);
  907. this.getaddressInfo();
  908. this.$nextTick(function() {
  909. this.$refs.addressWindow.getAddressList();
  910. })
  911. }
  912. } else {
  913. this.getaddressInfo();
  914. this.getConfirm();
  915. this.$nextTick(function() {
  916. this.$refs.addressWindow.getAddressList();
  917. })
  918. }
  919. }).catch(err => {
  920. uni.showToast({
  921. title: err,
  922. icon: 'none'
  923. });
  924. })
  925. },
  926. /**
  927. * 删除图片
  928. *
  929. */
  930. DelPic: function(index, indexs) {
  931. let that = this,
  932. pic = this.confirm[index].value;
  933. that.confirm[index].value.splice(indexs, 1);
  934. that.$set(that.confirm[index], 'value', that.confirm[index].value);
  935. },
  936. /**
  937. * 上传文件
  938. *
  939. */
  940. uploadpic: function(index) {
  941. let that = this;
  942. this.$util.uploadImageOne('upload/image', function(res) {
  943. that.newImg.push(res.data.url);
  944. that.$set(that.confirm[index], 'value', that.newImg);
  945. });
  946. },
  947. // 不开发票
  948. invCancel() {
  949. this.invChecked = '';
  950. this.invTitle = '不开发票';
  951. this.invShow = false;
  952. },
  953. // 选择发票
  954. invChange(id) {
  955. this.invChecked = id;
  956. this.invShow = false;
  957. const result = this.invList.find(item => item.id === id);
  958. let name = '';
  959. name += result.header_type === 1 ? '个人' : '企业';
  960. name += result.type === 1 ? '普通' : '专用';
  961. name += '发票';
  962. this.invTitle = name;
  963. },
  964. // 关闭发票
  965. invClose() {
  966. this.invShow = false;
  967. this.getInvoiceList()
  968. },
  969. getInvoiceList() {
  970. uni.showLoading({
  971. title: '正在加载…'
  972. })
  973. invoiceList().then(res => {
  974. uni.hideLoading();
  975. this.invList = res.data.map(item => {
  976. item.id = item.id.toString();
  977. return item;
  978. });
  979. const result = this.invList.find(item => item.id == this.invChecked);
  980. if (result) {
  981. let name = '';
  982. name += result.header_type === 1 ? '个人' : '企业';
  983. name += result.type === 1 ? '普通' : '专用';
  984. name += '发票';
  985. this.invTitle = name;
  986. }
  987. }).catch(err => {
  988. uni.showToast({
  989. title: err,
  990. icon: 'none'
  991. });
  992. });
  993. },
  994. /**
  995. * 开发票
  996. */
  997. goInvoice: function() {
  998. this.getInvoiceList()
  999. this.invShow = true;
  1000. this.urlQuery =
  1001. `new=${this.news}&cartId=${this.cartId}&pinkId=${this.pinkId}&couponId=${this.couponId}&addressId=${this.addressId}&specialInvoice=${this.special_invoice}&couponTitle=${this.couponTitle}&delivery_type=${this.deliveryType}&store_id=${this.storeId}&store_name=${this.system_store.name}&product_id=${this.product_id}`;
  1002. },
  1003. /**
  1004. * 授权回调事件
  1005. *
  1006. */
  1007. onLoadFun: function() {
  1008. this.getCheckShipping();
  1009. this.isShowAuth = false;
  1010. //调用子页面方法授权后执行获取地址列表
  1011. // this.$scope.selectComponent('#address-window').getAddressList();
  1012. },
  1013. /**
  1014. * 事件回调
  1015. *
  1016. */
  1017. onChangeFun: function(e) {
  1018. let opt = e;
  1019. let action = opt.action || null;
  1020. let value = opt.value != undefined ? opt.value : null;
  1021. action && this[action] && this[action](value);
  1022. },
  1023. payClose: function() {
  1024. this.pay_close = false;
  1025. },
  1026. goPay() {
  1027. this.formVerify();
  1028. },
  1029. payCheck(type) {
  1030. this.payType = type;
  1031. this.SubOrder();
  1032. },
  1033. payAddress() {
  1034. uni.navigateTo({
  1035. // /pages/users/user_address/index?id=25&cartId=76179610656654229504&pinkId=0&couponId=0&new=1
  1036. url: '/pages/users/user_address/index?id=' + this.id + '&new=' + this.news + '&cartId=' + this
  1037. .cartId +
  1038. '&pinkId=' +
  1039. this.pinkId +
  1040. '&couponId=' +
  1041. this.couponId + '&delivery_type=' + this.deliveryType + '&addressId=' + this.addressId +
  1042. '&store_id=' + this.storeId + '&store_name=' + this.system_store.name + '&product_id=' +
  1043. this.product_id
  1044. })
  1045. },
  1046. /**
  1047. * 获取门店列表数据
  1048. */
  1049. getList: function(fromType, index) {
  1050. let longitude = uni.getStorageSync("user_longitude"); //经度
  1051. let latitude = uni.getStorageSync("user_latitude"); //纬度
  1052. let data = {
  1053. latitude: latitude, //纬度
  1054. longitude: longitude, //经度
  1055. page: 1,
  1056. limit: 100,
  1057. type: this.seckillId > 0 ? 1 : 0,
  1058. product_id: this.product_id,
  1059. is_store: index
  1060. }
  1061. storeListApi(data).then(res => {
  1062. let list = res.data.list.list || [];
  1063. this.$set(this, 'storeList', list);
  1064. this.$set(this, 'storeId', this.storeId != 0 ? this.storeId : list[0].id);
  1065. list.forEach(item => {
  1066. if (this.storeId == item.id) {
  1067. this.$set(this, 'system_store', item);
  1068. }
  1069. })
  1070. if (fromType != 1) {
  1071. this.getConfirm();
  1072. }
  1073. }).catch(err => {})
  1074. },
  1075. // 关闭地址弹窗;
  1076. changeClose: function() {
  1077. this.$set(this.address, 'address', false);
  1078. },
  1079. /*
  1080. * 跳转门店列表
  1081. */
  1082. showStoreList: function() {
  1083. let _this = this
  1084. if (this.storeList.length > 0) {
  1085. uni.navigateTo({
  1086. url: `/pages/store/store_list/index?type=1&cartId=${_this.cartId}&new=${_this.news}&pinkId=${_this.pinkId}&couponId=${_this.couponId}`
  1087. })
  1088. }
  1089. },
  1090. changePayType(type) {
  1091. this.payType = type
  1092. this.computedPrice()
  1093. },
  1094. computedPrice: function() {
  1095. let shippingType = this.shippingType;
  1096. postOrderComputed(this.orderKey, {
  1097. addressId: this.addressId,
  1098. useIntegral: this.useIntegral ? 1 : 0,
  1099. couponId: this.priceGroup.couponPrice == 0 ? 0 : this.couponId,
  1100. shipping_type: this.tableId ? 4 : parseInt(shippingType) + 1,
  1101. payType: this.payType
  1102. }).then(res => {
  1103. let result = res.data.result;
  1104. if (result) {
  1105. this.totalPrice = result.pay_price;
  1106. this.integral_price = result.deduction_price;
  1107. this.coupon_price = result.coupon_price;
  1108. this.promotions_detail = result.promotions_detail;
  1109. this.integral = this.useIntegral ? result.SurplusIntegral : this.userInfo.integral;
  1110. this.$set(this.priceGroup, 'storePostage', shippingType == 1 ? 0 : result.pay_postage);
  1111. this.$set(this.priceGroup, 'storePostageDiscount', result.storePostageDiscount);
  1112. }
  1113. }).catch(err => {
  1114. return that.$util.Tips({
  1115. title: err
  1116. });
  1117. })
  1118. },
  1119. addressType: function(e, type) {
  1120. let index = e;
  1121. this.shippingType = parseInt(index);
  1122. // this.computedPrice();
  1123. if (index == 1) {
  1124. this.getList(0, type);
  1125. } else {
  1126. this.getConfirm();
  1127. }
  1128. },
  1129. bindPickerChange: function(e) {
  1130. let value = e.detail.value;
  1131. this.shippingType = value;
  1132. this.computedPrice();
  1133. },
  1134. ChangCouponsClone: function() {
  1135. this.$set(this.coupon, 'coupon', false);
  1136. },
  1137. changeTextareaStatus: function() {
  1138. for (let i = 0, len = this.coupon.list.length; i < len; i++) {
  1139. this.coupon.list[i].use_title = '';
  1140. this.coupon.list[i].is_use = 0;
  1141. }
  1142. this.textareaStatus = true;
  1143. this.status = 0;
  1144. this.$set(this.coupon, 'list', this.coupon.list);
  1145. },
  1146. /**
  1147. * 处理点击优惠券后的事件
  1148. *
  1149. */
  1150. ChangCoupons: function(e) {
  1151. // this.usableCoupon = e
  1152. // this.coupon.coupon = false
  1153. let index = e,
  1154. list = this.coupon.list,
  1155. couponTitle = '请选择',
  1156. couponId = 0;
  1157. for (let i = 0, len = list.length; i < len; i++) {
  1158. if (i != index) {
  1159. list[i].use_title = '';
  1160. list[i].is_use = 0;
  1161. }
  1162. }
  1163. if (list[index].is_use) {
  1164. //不使用优惠券
  1165. list[index].use_title = '';
  1166. list[index].is_use = 0;
  1167. } else {
  1168. //使用优惠券
  1169. list[index].use_title = '不使用';
  1170. list[index].is_use = 1;
  1171. couponTitle = list[index].coupon_title;
  1172. couponId = list[index].id;
  1173. }
  1174. this.couponTitle = couponTitle;
  1175. this.couponId = couponId;
  1176. this.$set(this.coupon, 'coupon', false);
  1177. this.$set(this.coupon, 'list', list);
  1178. this.getConfirm(1);
  1179. },
  1180. /**
  1181. * 使用积分抵扣
  1182. */
  1183. ChangeIntegral: function() {
  1184. this.useIntegral = !this.useIntegral;
  1185. this.computedPrice();
  1186. },
  1187. /**
  1188. * 选择地址后改变事件
  1189. * @param object e
  1190. */
  1191. OnChangeAddress: function(e) {
  1192. this.textareaStatus = true;
  1193. this.addressId = e;
  1194. this.address.address = false;
  1195. this.getConfirm()
  1196. this.getaddressInfo();
  1197. this.computedPrice();
  1198. },
  1199. bindHideKeyboard: function(e) {
  1200. this.mark = e.detail.value;
  1201. },
  1202. // 对象转数组
  1203. objToArr(data) {
  1204. let obj = Object.keys(data);
  1205. let m = obj.map(key => data[key]);
  1206. return m;
  1207. },
  1208. /**
  1209. * 获取当前订单详细信息
  1210. *
  1211. */
  1212. getConfirm: function(numType) {
  1213. let that = this;
  1214. let shippingType = parseInt(this.shippingType) + 1;
  1215. let addressId = 0,
  1216. storeid;
  1217. if (this.tableId) {
  1218. shippingType = 4;
  1219. }
  1220. if (shippingType == 1) {
  1221. addressId = that.addressId
  1222. if (this.deliveryType == 1) {
  1223. storeid = 0
  1224. } else {
  1225. storeid = that.storeId
  1226. }
  1227. } else {
  1228. addressId = ''
  1229. storeid = that.storeId
  1230. }
  1231. orderConfirm(that.cartId, that.news, addressId, shippingType, storeid, that.couponId).then(res => {
  1232. if (res.data.upgrade_addr == 1) {
  1233. that.id = res.data.addressInfo.id
  1234. this.isaddress = true
  1235. }
  1236. if (numType != 1) {
  1237. let confirm = this.objToArr(res.data.custom_form);
  1238. confirm.forEach((item, index, arr) => {
  1239. CACHE_CITY[index] = ''; //清空省市区
  1240. if (item.name == 'texts') {
  1241. if (item.defaultValConfig.value) {
  1242. item.value = item.defaultValConfig.value
  1243. } else {
  1244. item.value = ''
  1245. }
  1246. } else if (item.name == 'radios') {
  1247. item.value = item.wordsConfig.list[0].val
  1248. } else if (item.name == 'uploadPicture') {
  1249. item.value = [];
  1250. } else if (item.name == 'dateranges') {
  1251. if (item.valConfig.tabVal == 0) {
  1252. if (item.valConfig.tabData == 0) {
  1253. let obj = dayjs(new Date(Number(new Date().getTime()))).format(
  1254. 'YYYY-MM-DD');
  1255. item.value = [obj, obj]
  1256. } else {
  1257. let data1 = dayjs(new Date(Number(new Date(item.valConfig
  1258. .specifyDate[0]).getTime()))).format('YYYY-MM-DD');
  1259. let data2 = dayjs(new Date(Number(new Date(item.valConfig
  1260. .specifyDate[1]).getTime()))).format('YYYY-MM-DD');
  1261. item.value = [data1, data2];
  1262. }
  1263. } else {
  1264. item.value = [];
  1265. }
  1266. } else {
  1267. if (['times', 'dates', 'timeranges'].indexOf(item.name) != -1) {
  1268. if (item.valConfig.tabVal == 0) {
  1269. if (item.valConfig.tabData == 0) {
  1270. if (item.name == 'times') {
  1271. item.value = dayjs(new Date(Number(new Date()
  1272. .getTime()))).format('HH:mm');
  1273. } else if (item.name == 'dates') {
  1274. item.value = dayjs(new Date(Number(new Date()
  1275. .getTime()))).format('YYYY-MM-DD');
  1276. } else {
  1277. let current = dayjs(new Date(Number(new Date()
  1278. .getTime()))).format('HH:mm');
  1279. item.value = current + ' - ' + current;
  1280. }
  1281. } else {
  1282. if (item.name == 'times' || item.name == 'dates') {
  1283. item.value = item.valConfig.specifyDate;
  1284. } else {
  1285. item.value = item.valConfig.specifyDate[0] + ' - ' +
  1286. item.valConfig.specifyDate[1];
  1287. }
  1288. }
  1289. } else {
  1290. item.value = '';
  1291. }
  1292. } else {
  1293. item.value = '';
  1294. }
  1295. }
  1296. })
  1297. function sortNumber(a, b) {
  1298. return a.timestamp - b.timestamp;
  1299. }
  1300. confirm.sort(sortNumber);
  1301. that.$set(that, 'confirm', confirm);
  1302. }
  1303. that.$set(that, 'goodsType', res.data.type);
  1304. that.$set(that, 'userInfo', res.data.userInfo);
  1305. that.$set(that, 'integral', res.data.userInfo.integral);
  1306. that.$set(that, 'contacts', res.data.userInfo.real_name);
  1307. that.$set(that, 'contactsTel', res.data.userInfo.record_phone || '');
  1308. that.$set(that, 'integralRatio', res.data.integralRatio);
  1309. that.$set(that, 'offlinePostage', res.data.offlinePostage);
  1310. that.$set(that, 'orderKey', res.data.orderKey);
  1311. that.$set(that, 'valid_count', res.data.valid_count);
  1312. that.$set(that, 'discount_id', res.data.discount_id)
  1313. that.$set(that, 'priceGroup', res.data.priceGroup);
  1314. that.$set(that, 'seckillId', parseInt(res.data.seckill_id));
  1315. that.$set(that, 'BargainId', parseInt(res.data.bargain_id));
  1316. that.$set(that, 'combinationId', parseInt(res.data.combination_id));
  1317. that.$set(that, 'discountId', parseInt(res.data.discount_id));
  1318. that.$set(that, 'invoice_func', res.data.invoice_func);
  1319. that.$set(that, 'special_invoice', res.data.special_invoice);
  1320. that.$set(that, 'integral_ratio_status', res.data.integral_ratio_status);
  1321. that.$set(that, 'store_self_mention', res.data.store_self_mention);
  1322. that.$set(that, 'store_func_status', res.data.store_func_status);
  1323. that.giveData.give_integral = res.data.give_integral;
  1324. that.giveData.give_coupon = res.data.give_coupon;
  1325. let cartInfo = res.data.cartInfo;
  1326. let cartObj = [],
  1327. giftObj = [];
  1328. cartInfo.forEach(item => {
  1329. if (item.is_gift == 1) {
  1330. giftObj.push(item)
  1331. } else {
  1332. cartObj.push(item)
  1333. }
  1334. })
  1335. that.$set(that, 'cartInfo', cartObj);
  1336. that.$set(that, 'giveCartInfo', giftObj);
  1337. let giveType = -1;
  1338. giftObj.forEach(item => {
  1339. if (item.product_type == 0 || item.product_type == 4) {
  1340. return giveType = 0
  1341. }
  1342. })
  1343. that.$set(that, 'product_type', (res.data.product_type == 0 || giveType == 0 || res.data
  1344. .product_type == 4) ? 0 : 1);
  1345. //微信支付是否开启
  1346. that.cartArr[0].payStatus = res.data.pay_weixin_open || 0
  1347. //支付宝是否开启
  1348. that.cartArr[1].payStatus = res.data.ali_pay_status || 0;
  1349. //#ifdef MP
  1350. that.cartArr[1].payStatus = 0;
  1351. //#endif
  1352. //余额支付是否开启
  1353. // that.cartArr[2].title = '可用余额:' + res.data.userInfo.now_money;
  1354. that.cartArr[2].number = res.data.userInfo.now_money;
  1355. that.cartArr[2].payStatus = res.data.yue_pay_status == 1 ? res.data.yue_pay_status : 0
  1356. if (res.data.offline_pay_status == 2) {
  1357. that.cartArr[3].payStatus = 0
  1358. } else {
  1359. that.cartArr[3].payStatus = 1
  1360. }
  1361. // that.$set(that, 'cartArr', that.cartArr);
  1362. that.$set(that, 'ChangePrice', that.totalPrice);
  1363. that.getBargainId();
  1364. that.getCouponList();
  1365. that.computedPrice();
  1366. if (this.addressId || this.couponId) {
  1367. // this.computedPrice();
  1368. } else {
  1369. that.$set(that, 'totalPrice', that.$util.$h.Add(parseFloat(res.data.priceGroup
  1370. .totalPrice),
  1371. parseFloat(res.data
  1372. .priceGroup.storePostage)));
  1373. }
  1374. }).catch(err => {
  1375. return this.$util.Tips({
  1376. title: err
  1377. });
  1378. });
  1379. },
  1380. /*
  1381. * 提取砍价和拼团id
  1382. */
  1383. getBargainId: function() {
  1384. let that = this;
  1385. // let cartINfo = that.cartInfo;
  1386. // let BargainId = 0;
  1387. // let combinationId = 0;
  1388. // let discountId = 0;
  1389. // cartINfo.forEach(function(value, index, cartINfo) {
  1390. // BargainId = cartINfo[index].bargain_id,
  1391. // combinationId = cartINfo[index].combination_id,
  1392. // discountId = cartINfo[index].discount_id
  1393. // })
  1394. // that.$set(that, 'BargainId', parseInt(BargainId));
  1395. // that.$set(that, 'combinationId', parseInt(combinationId));
  1396. // that.$set(that, 'discountId', parseInt(discountId));
  1397. if (that.cartArr.length == 3 && (that.BargainId || that.combinationId || that.seckillId || that
  1398. .discountId)) {
  1399. that.cartArr[2].payStatus = 0;
  1400. that.$set(that, 'cartArr', that.cartArr);
  1401. }
  1402. },
  1403. /**
  1404. * 获取当前金额可用优惠券
  1405. *
  1406. */
  1407. getCouponList: function() {
  1408. let that = this;
  1409. let data = {
  1410. cartId: this.cartId,
  1411. 'new': this.news,
  1412. shipping_type: that.$util.$h.Add(that.shippingType, 1),
  1413. store_id: that.system_store ? that.system_store.id : 0
  1414. }
  1415. getCouponsOrderPrice(this.totalPrice, data).then(res => {
  1416. that.$set(that.coupon, 'list', res.data);
  1417. that.openType = 1;
  1418. });
  1419. },
  1420. /*
  1421. * 获取默认收货地址或者获取某条地址信息
  1422. */
  1423. getaddressInfo: function() {
  1424. let that = this;
  1425. if (that.addressId) {
  1426. getAddressDetail(that.addressId).then(res => {
  1427. res.data.is_default = parseInt(res.data.is_default);
  1428. that.addressInfo = res.data || {};
  1429. that.addressId = res.data.id || 0;
  1430. that.address.addressId = res.data.id || 0;
  1431. })
  1432. } else {
  1433. getAddressDefault().then(res => {
  1434. res.data.is_default = parseInt(res.data.is_default);
  1435. that.addressInfo = res.data || {};
  1436. that.addressId = res.data.id || 0;
  1437. that.address.addressId = res.data.id || 0;
  1438. })
  1439. }
  1440. },
  1441. payItem: function(e) {
  1442. let that = this;
  1443. let active = e;
  1444. that.active = active;
  1445. that.animated = true;
  1446. that.payType = that.cartArr[active].value;
  1447. that.computedPrice();
  1448. setTimeout(function() {
  1449. that.car();
  1450. }, 500);
  1451. },
  1452. couponTap: function() {
  1453. this.coupon.coupon = true;
  1454. this.coupon.list.forEach((item, index) => {
  1455. if (item.id == this.couponId) {
  1456. item.is_use = 1
  1457. } else {
  1458. item.is_use = 0
  1459. }
  1460. })
  1461. this.$set(this.coupon, 'list', this.coupon.list);
  1462. },
  1463. car: function() {
  1464. let that = this;
  1465. that.animated = false;
  1466. },
  1467. onAddress: function(name) {
  1468. let that = this;
  1469. if (name) {
  1470. that.textareaStatus = false;
  1471. that.address.address = true;
  1472. that.pagesUrl = '/pages/users/user_address_list/index?news=' + this.news + '&cartId=' + this
  1473. .cartId +
  1474. '&pinkId=' +
  1475. this.pinkId +
  1476. '&couponId=' +
  1477. this.couponId + '&delivery_type=' + this.deliveryType + '&addressId=' + this.addressId +
  1478. '&store_id=' + this.storeId + '&store_name=' + this.system_store.name + '&product_id=' + this
  1479. .product_id
  1480. } else {
  1481. uni.navigateTo({
  1482. url: '/pages/users/user_address/index?new=' + this.news + '&cartId=' + this.cartId +
  1483. '&pinkId=' +
  1484. this.pinkId +
  1485. '&couponId=' +
  1486. this.couponId + '&delivery_type=' + this.deliveryType + '&addressId=' + this
  1487. .addressId + '&store_id=' + this.storeId + '&store_name=' + this.system_store
  1488. .name + '&product_id=' + this.product_id
  1489. })
  1490. }
  1491. },
  1492. payment: function(data) {
  1493. let that = this;
  1494. orderCreate(that.orderKey, data).then(res => {
  1495. let status = res.data.status,
  1496. orderId = res.data.result.orderId,
  1497. jsConfig = res.data.result.jsConfig,
  1498. goPages = '/pages/goods/order_pay_status/index?order_id=' + orderId + '&msg=' + res
  1499. .msg +
  1500. '&type=3' + '&totalPrice=' + this.totalPrice
  1501. switch (status) {
  1502. case 'ORDER_EXIST':
  1503. case 'EXTEND_ORDER':
  1504. case 'PAY_ERROR':
  1505. uni.hideLoading();
  1506. return that.$util.Tips({
  1507. title: res.msg
  1508. }, {
  1509. tab: 5,
  1510. url: goPages
  1511. });
  1512. break;
  1513. case 'SUCCESS':
  1514. uni.hideLoading();
  1515. if (that.BargainId || that.combinationId || that.pinkId || that.seckillId || that
  1516. .discountId)
  1517. return that.$util.Tips({
  1518. title: res.msg,
  1519. icon: 'success'
  1520. }, {
  1521. tab: 4,
  1522. url: goPages
  1523. });
  1524. return that.$util.Tips({
  1525. title: res.msg,
  1526. icon: 'success'
  1527. }, {
  1528. tab: 5,
  1529. url: goPages
  1530. });
  1531. break;
  1532. case 'WECHAT_PAY':
  1533. that.toPay = true;
  1534. // #ifdef MP
  1535. /* that.toPay = true; */
  1536. let mp_pay_name = ''
  1537. if (uni.requestOrderPayment) {
  1538. mp_pay_name = 'requestOrderPayment'
  1539. } else {
  1540. mp_pay_name = 'requestPayment'
  1541. }
  1542. uni[mp_pay_name]({
  1543. timeStamp: jsConfig.timestamp,
  1544. nonceStr: jsConfig.nonceStr,
  1545. package: jsConfig.package,
  1546. signType: jsConfig.signType,
  1547. paySign: jsConfig.paySign,
  1548. success: function(res) {
  1549. uni.hideLoading();
  1550. if (that.BargainId || that.combinationId || that.pinkId || that
  1551. .seckillId || that.discountId)
  1552. return that.$util.Tips({
  1553. title: '支付成功',
  1554. icon: 'success'
  1555. }, {
  1556. tab: 4,
  1557. url: goPages
  1558. });
  1559. return that.$util.Tips({
  1560. title: '支付成功',
  1561. icon: 'success'
  1562. }, {
  1563. tab: 5,
  1564. url: goPages
  1565. });
  1566. },
  1567. fail: function(e) {
  1568. uni.hideLoading();
  1569. return that.$util.Tips({
  1570. title: '取消支付'
  1571. }, {
  1572. tab: 5,
  1573. url: goPages + '&status=2'
  1574. });
  1575. },
  1576. complete: function(e) {
  1577. uni.hideLoading();
  1578. //关闭当前页面跳转至订单状态
  1579. if (res.errMsg == 'requestPayment:cancel') return that.$util
  1580. .Tips({
  1581. title: '取消支付'
  1582. }, {
  1583. tab: 5,
  1584. url: goPages + '&status=2'
  1585. });
  1586. },
  1587. })
  1588. // #endif
  1589. // #ifdef H5
  1590. this.$wechat.pay(res.data.result.jsConfig).then(res => {
  1591. return that.$util.Tips({
  1592. title: '支付成功',
  1593. icon: 'success'
  1594. }, {
  1595. tab: 5,
  1596. url: goPages
  1597. });
  1598. }).catch(res => {
  1599. if (!this.$wechat.isWeixin()) {
  1600. uni.redirectTo({
  1601. url: goPages +
  1602. '&msg=支付失败&status=2'
  1603. })
  1604. }
  1605. if (res.errMsg == 'chooseWXPay:cancel') return that.$util.Tips({
  1606. title: '取消支付'
  1607. }, {
  1608. tab: 5,
  1609. url: goPages + '&status=2'
  1610. });
  1611. })
  1612. // #endif
  1613. // #ifdef APP-PLUS
  1614. uni.requestPayment({
  1615. provider: 'wxpay',
  1616. orderInfo: jsConfig,
  1617. success: (e) => {
  1618. let url = goPages;
  1619. uni.showToast({
  1620. title: "支付成功"
  1621. })
  1622. setTimeout(res => {
  1623. uni.redirectTo({
  1624. url: url
  1625. })
  1626. }, 2000)
  1627. },
  1628. fail: (e) => {
  1629. let url = '/pages/goods/order_pay_status/index?order_id=' +
  1630. orderId +
  1631. '&msg=支付失败';
  1632. uni.showModal({
  1633. content: "支付失败",
  1634. showCancel: false,
  1635. success: function(res) {
  1636. if (res.confirm) {
  1637. uni.redirectTo({
  1638. url: url
  1639. })
  1640. } else if (res.cancel) {
  1641. console.log('用户点击取消');
  1642. }
  1643. }
  1644. })
  1645. },
  1646. complete: () => {
  1647. uni.hideLoading();
  1648. },
  1649. });
  1650. // #endif
  1651. break;
  1652. case 'PAY_DEFICIENCY':
  1653. uni.hideLoading();
  1654. //余额不足
  1655. return that.$util.Tips({
  1656. title: res.msg
  1657. }, {
  1658. tab: 5,
  1659. url: goPages + '&status=1'
  1660. });
  1661. break;
  1662. case "WECHAT_H5_PAY":
  1663. uni.hideLoading();
  1664. that.$util.Tips({
  1665. title: '订单创建成功!'
  1666. }, {
  1667. tab: 4,
  1668. url: goPages + '&status=0'
  1669. });
  1670. setTimeout(() => {
  1671. location.href = res.data.result.jsConfig.mweb_url;
  1672. }, 2000);
  1673. break;
  1674. case 'ALIPAY_PAY':
  1675. //#ifdef H5
  1676. if (this.from === 'weixin') {
  1677. uni.redirectTo({
  1678. url: `/pages/users/alipay_invoke/index?id=${orderId}&pay_key=${res.data.result.pay_key}`
  1679. });
  1680. } else {
  1681. uni.hideLoading();
  1682. that.formContent = res.data.result.jsConfig;
  1683. that.$nextTick(() => {
  1684. document.getElementById('alipaysubmit').submit();
  1685. })
  1686. }
  1687. //#endif
  1688. // #ifdef MP
  1689. uni.navigateTo({
  1690. url: `/pages/users/alipay_invoke/index?id=${orderId}&link=${jsConfig.qrCode}`
  1691. });
  1692. // #endif
  1693. // #ifdef APP-PLUS
  1694. uni.requestPayment({
  1695. provider: 'alipay',
  1696. orderInfo: jsConfig,
  1697. success: (e) => {
  1698. uni.showToast({
  1699. title: "支付成功"
  1700. })
  1701. let url = '/pages/goods/order_pay_status/index?order_id=' +
  1702. orderId +
  1703. '&msg=支付成功';
  1704. setTimeout(res => {
  1705. uni.redirectTo({
  1706. url: url
  1707. })
  1708. }, 2000)
  1709. },
  1710. fail: (e) => {
  1711. let url = '/pages/goods/order_pay_status/index?order_id=' +
  1712. orderId +
  1713. '&msg=支付失败';
  1714. uni.showModal({
  1715. content: "支付失败",
  1716. showCancel: false,
  1717. success: function(res) {
  1718. if (res.confirm) {
  1719. uni.redirectTo({
  1720. url: url
  1721. })
  1722. } else if (res.cancel) {
  1723. console.log('用户点击取消');
  1724. }
  1725. }
  1726. })
  1727. },
  1728. complete: () => {
  1729. uni.hideLoading();
  1730. },
  1731. });
  1732. // #endif
  1733. break;
  1734. }
  1735. }).catch(err => {
  1736. uni.hideLoading();
  1737. return that.$util.Tips({
  1738. title: err
  1739. });
  1740. });
  1741. },
  1742. clickTextArea() {
  1743. this.$refs.textarea.focus()
  1744. },
  1745. bindDateChange: function(e, index) {
  1746. this.confirm[index].value = e.target.value
  1747. },
  1748. bindTimeChange: function(e, index) {
  1749. this.confirm[index].value = e.target.value
  1750. },
  1751. bindSelectChange: function(e, index, item) {
  1752. this.confirm[index].value = item.wordsConfig.list[e.detail.value].val
  1753. },
  1754. getTimeranges(index) {
  1755. this.isShow = true
  1756. this.timerangesIndex = index
  1757. },
  1758. confrim(e) {
  1759. this.isShow = false;
  1760. this.confirm[this.timerangesIndex].value = e.time;
  1761. let arrayNew = [];
  1762. e.val.forEach(item => {
  1763. arrayNew.push(Number(item))
  1764. })
  1765. this.timeranges = arrayNew;
  1766. },
  1767. cancels() {
  1768. this.isShow = false;
  1769. },
  1770. // 单选
  1771. radioChange(e, index, item) {
  1772. this.confirm[index].value = item.wordsConfig.list[e.detail.value].val
  1773. },
  1774. // 多选
  1775. checkboxChange(e, index, item) {
  1776. let obj = e.detail.value;
  1777. let val = '';
  1778. item.wordsConfig.list.forEach((j, jindex) => {
  1779. obj.forEach(x => {
  1780. if (jindex == x) {
  1781. val = val + (val ? ',' : '') + j.val;
  1782. }
  1783. })
  1784. })
  1785. this.confirm[index].value = val
  1786. },
  1787. formVerify() {
  1788. let that = this;
  1789. if (!that.addressId && !that.shippingType && !that.product_type && !that.tableId) return that.$util.Tips({
  1790. title: '请选择收货地址'
  1791. });
  1792. if (that.shippingType == 1) {
  1793. if (that.contacts == "" || that.contactsTel == "") {
  1794. return that.$util.Tips({
  1795. title: '请填写联系人或联系人电话'
  1796. });
  1797. }
  1798. if (!/^1(3|4|5|7|8|9|6)\d{9}$/.test(that.contactsTel)) {
  1799. return that.$util.Tips({
  1800. title: '请填写正确的手机号'
  1801. });
  1802. }
  1803. if (!/^[\u4e00-\u9fa5\w]{2,16}$/.test(that.contacts)) {
  1804. return that.$util.Tips({
  1805. title: '请填写您的真实姓名'
  1806. });
  1807. }
  1808. if (that.storeList.length == 0) return that.$util.Tips({
  1809. title: '暂无门店,请选择其他方式'
  1810. });
  1811. }
  1812. for (var i = 0; i < that.confirm.length; i++) {
  1813. let data = that.confirm[i]
  1814. if (['radios'].indexOf(data.name) == -1 && (data.titleShow.val || (['uploadPicture', 'dateranges']
  1815. .indexOf(data.name) == -1 && data.value && data.value.trim()))) {
  1816. if ((data.name === 'texts' && data.valConfig.tabVal == 0) || ['dates', 'times', 'selects', 'citys',
  1817. 'checkboxs'
  1818. ].indexOf(data.name) != -1) {
  1819. if (!data.value || (data.value && !data.value.trim())) {
  1820. return that.$util.Tips({
  1821. title: `请填写${data.titleConfig.value}`
  1822. });
  1823. }
  1824. }
  1825. if (data.name === 'timeranges') {
  1826. if (!data.value) {
  1827. return that.$util.Tips({
  1828. title: `请选择${data.titleConfig.value}`
  1829. });
  1830. }
  1831. }
  1832. if (data.name === 'dateranges') {
  1833. if (!data.value.length) {
  1834. return that.$util.Tips({
  1835. title: `请选择${data.titleConfig.value}`
  1836. });
  1837. }
  1838. }
  1839. if (data.name === 'texts' && data.valConfig.tabVal == 4) {
  1840. if (data.value <= 0) {
  1841. return that.$util.Tips({
  1842. title: `请填写大于0的${data.titleConfig.value}`
  1843. });
  1844. }
  1845. }
  1846. if (data.name === 'texts' && data.valConfig.tabVal == 3) {
  1847. if (!/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(data.value)) {
  1848. return that.$util.Tips({
  1849. title: `请填写正确的${data.titleConfig.value}`
  1850. });
  1851. }
  1852. }
  1853. if (data.name === 'texts' && data.valConfig.tabVal == 1) {
  1854. if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(data.value)) {
  1855. return that.$util.Tips({
  1856. title: `请填写正确的${data.titleConfig.value}`
  1857. });
  1858. }
  1859. }
  1860. if (data.name === 'texts' && data.valConfig.tabVal == 2) {
  1861. if (!
  1862. /^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/i
  1863. .test(data.value)) {
  1864. return that.$util.Tips({
  1865. title: `请填写正确的${data.titleConfig.value}`
  1866. });
  1867. }
  1868. }
  1869. if (data.name === 'uploadPicture') {
  1870. if (!data.value.length) {
  1871. return that.$util.Tips({
  1872. title: `请上传${data.titleConfig.value}`
  1873. });
  1874. }
  1875. }
  1876. }
  1877. }
  1878. this.pay_close = true;
  1879. },
  1880. SubOrder: function(e) {
  1881. let that = this,
  1882. data = {};
  1883. if (!that.payType) return that.$util.Tips({
  1884. title: '请选择支付方式'
  1885. });
  1886. data = {
  1887. sale_uid: that.sale_yg.id || 0,
  1888. collate_code_id: that.collage_id || that.tableId,
  1889. custom_form: that.confirm,
  1890. real_name: that.contacts,
  1891. phone: that.contactsTel,
  1892. addressId: that.addressId,
  1893. formId: '',
  1894. couponId: that.priceGroup.couponPrice == 0 ? 0 : that.couponId,
  1895. payType: that.payType,
  1896. useIntegral: that.useIntegral,
  1897. bargainId: that.BargainId,
  1898. combinationId: that.combinationId,
  1899. discountId: that.discountId,
  1900. pinkId: that.pinkId,
  1901. seckill_id: that.seckillId,
  1902. mark: that.mark,
  1903. store_id: that.ptype == 6 ? that.system_store.id : (that.deliveryType == 1 ? 0 : that.system_store.id || 0),
  1904. 'from': that.from,
  1905. shipping_type: that.tableId ? 4 : that.$util.$h.Add(that.shippingType, 1),
  1906. 'new': that.news,
  1907. 'invoice_id': that.invChecked,
  1908. // #ifdef H5
  1909. quitUrl: location.protocol + '//' + location.hostname +
  1910. '/pages/goods/order_pay_status/index?' +
  1911. '&type=3' + '&totalPrice=' + this.totalPrice
  1912. // #endif
  1913. // #ifdef APP-PLUS
  1914. quitUrl: '/pages/goods/order_details/index?order_id=' + this.order_id
  1915. // #endif
  1916. };
  1917. if (data.payType == 'yue' && parseFloat(that.userInfo.now_money) < parseFloat(that.totalPrice))
  1918. return that.$util.Tips({
  1919. title: '余额不足!'
  1920. });
  1921. uni.showLoading({
  1922. title: '订单支付中'
  1923. });
  1924. // #ifdef MP
  1925. openPaySubscribe().then(() => {
  1926. that.payment(data);
  1927. });
  1928. // #endif
  1929. // #ifndef MP
  1930. that.payment(data);
  1931. // #endif
  1932. }
  1933. }
  1934. }
  1935. </script>
  1936. <style lang="scss" scoped>
  1937. /deep/.uni-date-x--border {
  1938. border: 0;
  1939. }
  1940. /deep/.uni-icons {
  1941. font-size: 0 !important;
  1942. }
  1943. /deep/.uni-date-x {
  1944. color: #999;
  1945. font-size: 15px;
  1946. }
  1947. /deep/.uni-date__x-input {
  1948. font-size: 15px;
  1949. }
  1950. .height-add {
  1951. height: calc(120rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  1952. height: calc(120rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  1953. }
  1954. /deep/uni-checkbox[disabled] .uni-checkbox-input {
  1955. background-color: #eee;
  1956. }
  1957. .confirmImg {
  1958. width: 100%;
  1959. }
  1960. /deep/.orderGoods {
  1961. margin-top: 20rpx;
  1962. border-radius: 14rpx;
  1963. }
  1964. .confirmImg .upload {
  1965. padding-bottom: 36rpx;
  1966. }
  1967. .confirmImg .upload .pictrue {
  1968. margin: 22rpx 23rpx 0 0;
  1969. width: 146rpx;
  1970. height: 146rpx;
  1971. position: relative;
  1972. font-size: 24rpx;
  1973. color: #bbb;
  1974. }
  1975. .confirmImg .upload .pictrue:nth-of-type(4n) {
  1976. margin-right: 0;
  1977. }
  1978. .confirmImg .upload .pictrue image {
  1979. width: 100%;
  1980. height: 100%;
  1981. border-radius: 8rpx;
  1982. }
  1983. .confirmImg .upload .pictrue .icon-guanbi1 {
  1984. position: absolute;
  1985. font-size: 45rpx;
  1986. top: -10rpx;
  1987. right: -10rpx;
  1988. }
  1989. .confirmImg .upload .pictrue .close {
  1990. position: absolute;
  1991. width: 26rpx;
  1992. height: 26rpx;
  1993. border-radius: 0 8rpx 0 8rpx;
  1994. background-color: rgba(0, 0, 0, 0.6);
  1995. top: 0;
  1996. right: 0;
  1997. }
  1998. .confirmImg .upload .pictrue .close .iconfont {
  1999. font-size: 24rpx;
  2000. }
  2001. .confirmImg .upload .pictrue .icon-icon25201 {
  2002. color: #bfbfbf;
  2003. font-size: 50rpx;
  2004. }
  2005. .confirmImg .upload .pictrue:nth-last-child(1) {
  2006. border: 1rpx solid #ddd;
  2007. box-sizing: border-box;
  2008. }
  2009. .alipaysubmit {
  2010. display: none;
  2011. }
  2012. .order-submission .line {
  2013. width: 100%;
  2014. height: 4rpx;
  2015. }
  2016. .order-submission .line image {
  2017. width: 100%;
  2018. height: 100%;
  2019. display: block;
  2020. }
  2021. .order-submission .headerCon {
  2022. background-color: #fff;
  2023. box-sizing: border-box;
  2024. .icon-s-bianji {
  2025. width: 44rpx;
  2026. height: 44rpx;
  2027. background: #F5F5F5;
  2028. border-radius: 50%;
  2029. text-align: center;
  2030. line-height: 44rpx;
  2031. font-size: 17rpx;
  2032. color: #666;
  2033. }
  2034. .add-title {
  2035. height: 72rpx;
  2036. padding: 0 26rpx;
  2037. border-bottom: 1px solid #eee;
  2038. .icon {
  2039. height: 32rpx;
  2040. background: #1890FF;
  2041. border-radius: 4rpx;
  2042. font-size: 20rpx;
  2043. font-weight: 400;
  2044. color: #FFFFFF;
  2045. text-align: center;
  2046. line-height: 32rpx;
  2047. padding: 0 6rpx;
  2048. &.orange {
  2049. background: #FE960F;
  2050. }
  2051. &.red {
  2052. background: #E93323;
  2053. }
  2054. }
  2055. .add-text {
  2056. margin-left: 14rpx;
  2057. width: 360rpx;
  2058. }
  2059. .text {
  2060. font-size: 24rpx;
  2061. font-weight: 400;
  2062. color: #999999;
  2063. .icon-jiantou {
  2064. display: inline-block;
  2065. font-size: 20rpx;
  2066. }
  2067. }
  2068. }
  2069. }
  2070. .order-submission .address {
  2071. padding: 0 26rpx;
  2072. height: 130rpx;
  2073. .icon {
  2074. .iconfont {
  2075. width: 44rpx;
  2076. height: 44rpx;
  2077. background: var(--view-minorColorT);
  2078. font-size: 20rpx;
  2079. border-radius: 50%;
  2080. text-align: center;
  2081. line-height: 44rpx;
  2082. color: var(--view-theme);
  2083. margin-left: 26rpx;
  2084. }
  2085. }
  2086. }
  2087. .order-submission .address .addressCon {
  2088. width: 502rpx;
  2089. font-size: 26rpx;
  2090. color: #666;
  2091. }
  2092. .order-submission .address .addressCon .name {
  2093. font-size: 30rpx;
  2094. color: #282828;
  2095. font-weight: bold;
  2096. margin-bottom: 10rpx;
  2097. .nameCon {
  2098. max-width: 244rpx;
  2099. &.on {
  2100. max-width: unset;
  2101. }
  2102. }
  2103. }
  2104. .order-submission .address .addressCon .name .phone {
  2105. margin-left: 50rpx;
  2106. }
  2107. .order-submission .address .addressCon .default {
  2108. margin-right: 12rpx;
  2109. }
  2110. .order-submission .address .addressCon .setaddress {
  2111. color: #333;
  2112. font-size: 28rpx;
  2113. }
  2114. .order-submission .allAddress {
  2115. width: 100%;
  2116. background: linear-gradient(to bottom, var(--view-theme) 0%, #f5f5f5 100%);
  2117. display: flex;
  2118. flex-direction: column;
  2119. justify-content: center;
  2120. align-items: center;
  2121. padding-top: 24rpx;
  2122. }
  2123. .order-submission .allAddress .nav {
  2124. width: 710rpx;
  2125. // margin: 0 auto;
  2126. }
  2127. .order-submission .allAddress .nav .item {
  2128. width: 355rpx;
  2129. }
  2130. .order-submission .allAddress .nav .item.on {
  2131. position: relative;
  2132. width: 250rpx;
  2133. }
  2134. .order-submission .allAddress .nav .item.on::before {
  2135. position: absolute;
  2136. bottom: 0;
  2137. content: "快递配送";
  2138. font-size: 28rpx;
  2139. display: block;
  2140. height: 0;
  2141. width: 336rpx;
  2142. border-width: 0 20rpx 80rpx 0;
  2143. border-style: none solid solid;
  2144. border-color: transparent transparent #fff;
  2145. z-index: 2;
  2146. border-radius: 7rpx 30rpx 0 0;
  2147. text-align: center;
  2148. // line-height: 80rpx;
  2149. }
  2150. .header-title {
  2151. font-size: 36rpx;
  2152. font-weight: 600;
  2153. color: #FFFFFF;
  2154. }
  2155. .order-submission .allAddress .nav .item:nth-of-type(2).on::before {
  2156. content: "到店自提";
  2157. border-width: 0 0 80rpx 20rpx;
  2158. border-radius: 30rpx 7rpx 0 0;
  2159. }
  2160. .order-submission .allAddress .nav .item.on2 {
  2161. position: relative;
  2162. }
  2163. .order-submission .allAddress .nav .item.on2::before {
  2164. position: absolute;
  2165. bottom: 0;
  2166. content: "到店自提";
  2167. font-size: 28rpx;
  2168. display: block;
  2169. height: 0;
  2170. width: 400rpx;
  2171. border-width: 0 0 60rpx 60rpx;
  2172. border-style: none solid solid;
  2173. border-color: transparent transparent rgba(255, 255, 255, 0.6);
  2174. border-radius: 40rpx 6rpx 0 0;
  2175. text-align: center;
  2176. // line-height: 60rpx;
  2177. }
  2178. .order-submission .allAddress .nav .item:nth-of-type(1).on2::before {
  2179. content: "快递配送";
  2180. border-width: 0 60rpx 60rpx 0;
  2181. border-radius: 6rpx 40rpx 0 0;
  2182. }
  2183. .order-submission .allAddress .headerCon {
  2184. width: 710rpx;
  2185. margin: 0 auto;
  2186. border-radius: 14rpx;
  2187. background-color: #fff;
  2188. }
  2189. .order-submission .allAddress .line {
  2190. width: 710rpx;
  2191. margin: 0 auto;
  2192. }
  2193. .order-submission .wrapper .item .discount .placeholder {
  2194. color: #ccc;
  2195. }
  2196. .placeholder-textarea {
  2197. position: relative;
  2198. .placeholder {
  2199. position: absolute;
  2200. color: #ccc;
  2201. top: 26rpx;
  2202. left: 30rpx;
  2203. }
  2204. }
  2205. .order-submission .wrapper {
  2206. background-color: #fff;
  2207. width: 710rpx;
  2208. border-radius: 14rpx;
  2209. margin: 0 auto;
  2210. margin-top: 14rpx;
  2211. }
  2212. .order-submission .wrapper .item .name {
  2213. position: relative;
  2214. width: 190rpx;
  2215. }
  2216. .order-submission .wrapper .item .asterisk {
  2217. position: absolute;
  2218. color: red;
  2219. left: -15rpx
  2220. }
  2221. .order-submission .wrapper .item {
  2222. padding: 27rpx 30rpx;
  2223. font-size: 30rpx;
  2224. color: #282828;
  2225. border-bottom: 1px solid #f0f0f0;
  2226. }
  2227. .order-submission .wrapper .item.on {
  2228. padding: 17rpx 14rpx 17rpx 30rpx;
  2229. align-items: baseline;
  2230. }
  2231. .order-submission .wrapper .item.on3 {
  2232. align-items: baseline;
  2233. }
  2234. .order-submission .wrapper .item.on2 {
  2235. padding: 17rpx 30rpx;
  2236. }
  2237. .order-submission .wrapper .item .discount {
  2238. font-size: 30rpx;
  2239. color: #999;
  2240. }
  2241. .order-submission .wrapper .item.on .discount,
  2242. .order-submission .wrapper .item.on3 .discount {
  2243. width: 460rpx;
  2244. text-align: right;
  2245. }
  2246. .order-submission .wrapper .item.on3 .discount .city {
  2247. width: 400rpx;
  2248. }
  2249. .order-submission .wrapper .item .discount input {
  2250. text-align: right;
  2251. width: 450rpx;
  2252. }
  2253. .order-submission .wrapper .item .discount .iconfont {
  2254. color: #515151;
  2255. font-size: 30rpx;
  2256. margin-left: 15rpx;
  2257. }
  2258. .order-submission .wrapper .item .discount .num {
  2259. font-size: 32rpx;
  2260. margin-right: 20rpx;
  2261. }
  2262. .order-submission .wrapper .item .discount .radio {
  2263. margin: 0 22rpx 0 22rpx;
  2264. padding: 10rpx 0;
  2265. }
  2266. .order-submission .wrapper .item .discount .radio /deep/uni-checkbox .uni-checkbox-input {
  2267. border-radius: 0
  2268. }
  2269. .order-submission .wrapper .item .shipping {
  2270. font-size: 30rpx;
  2271. color: #999;
  2272. position: relative;
  2273. padding-right: 58rpx;
  2274. }
  2275. .order-submission .wrapper .item .shipping .iconfont {
  2276. font-size: 35rpx;
  2277. color: #707070;
  2278. position: absolute;
  2279. right: 0;
  2280. top: 50%;
  2281. transform: translateY(-50%);
  2282. margin-left: 30rpx;
  2283. }
  2284. .order-submission .wrapper .item textarea {
  2285. background-color: #f9f9f9;
  2286. width: 650rpx;
  2287. height: 140rpx;
  2288. border-radius: 3rpx;
  2289. margin-top: 30rpx;
  2290. padding: 25rpx 28rpx;
  2291. box-sizing: border-box;
  2292. }
  2293. .order-submission .wrapper .item .placeholder {
  2294. color: #ccc;
  2295. }
  2296. .order-submission .wrapper .item .list {
  2297. margin-top: 35rpx;
  2298. }
  2299. .order-submission .wrapper .item .list .payItem {
  2300. border: 1px solid #eee;
  2301. border-radius: 6rpx;
  2302. height: 86rpx;
  2303. width: 100%;
  2304. box-sizing: border-box;
  2305. margin-top: 20rpx;
  2306. font-size: 28rpx;
  2307. color: #282828;
  2308. }
  2309. .order-submission .wrapper .item .list .payItem.on {
  2310. border-color: #fc5445;
  2311. color: #e93323;
  2312. }
  2313. .order-submission .wrapper .item .list .payItem .name {
  2314. width: 50%;
  2315. text-align: center;
  2316. border-right: 1px solid #eee;
  2317. padding-left: 80rpx;
  2318. }
  2319. .order-submission .wrapper .item .list .payItem .name .iconfont {
  2320. width: 44rpx;
  2321. height: 44rpx;
  2322. border-radius: 50%;
  2323. text-align: center;
  2324. line-height: 44rpx;
  2325. background-color: #fe960f;
  2326. color: #fff;
  2327. font-size: 30rpx;
  2328. margin-right: 15rpx;
  2329. }
  2330. .order-submission .wrapper .item .list .payItem .name .iconfont.icon-weixin2 {
  2331. background-color: #41b035;
  2332. }
  2333. .order-submission .wrapper .item .list .payItem .name .iconfont.icon-zhifubao {
  2334. background-color: #1677FF;
  2335. }
  2336. .order-submission .wrapper .item .list .payItem .tip {
  2337. width: 49%;
  2338. text-align: center;
  2339. font-size: 26rpx;
  2340. color: #aaa;
  2341. }
  2342. .order-submission .moneyList {
  2343. background-color: #fff;
  2344. padding: 30rpx;
  2345. width: 710rpx;
  2346. border-radius: 14rpx;
  2347. margin: 0 auto;
  2348. margin-top: 14rpx;
  2349. }
  2350. .order-submission .moneyList .item {
  2351. font-size: 28rpx;
  2352. color: #282828;
  2353. }
  2354. .order-submission .moneyList .item~.item {
  2355. margin-top: 20rpx;
  2356. }
  2357. .order-submission .moneyList .item .money {
  2358. color: #868686;
  2359. }
  2360. .order-submission .footer {
  2361. width: 100%;
  2362. height: 100rpx;
  2363. background-color: #fff;
  2364. padding: 0 30rpx;
  2365. font-size: 28rpx;
  2366. color: #333;
  2367. box-sizing: border-box;
  2368. position: fixed;
  2369. bottom: 0;
  2370. left: 0;
  2371. z-index: 9;
  2372. height: calc(100rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  2373. height: calc(100rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  2374. padding-bottom: calc(0rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  2375. padding-bottom: calc(0rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  2376. }
  2377. .order-submission .footer .settlement {
  2378. font-size: 30rpx;
  2379. color: #fff;
  2380. width: 240rpx;
  2381. height: 70rpx;
  2382. background-color: var(--view-theme);
  2383. border-radius: 50rpx;
  2384. text-align: center;
  2385. line-height: 70rpx;
  2386. }
  2387. .footer .transparent {
  2388. opacity: 0
  2389. }
  2390. .tipaddress {
  2391. position: fixed;
  2392. left: 13%;
  2393. top: 25%;
  2394. // margin-left: -283rpx;
  2395. width: 560rpx;
  2396. height: 614rpx;
  2397. background-color: #fff;
  2398. border-radius: 10rpx;
  2399. z-index: 100;
  2400. text-align: center;
  2401. .top {
  2402. width: 560rpx;
  2403. height: 270rpx;
  2404. border-top-left-radius: 10rpx;
  2405. border-top-right-radius: 10rpx;
  2406. background-image: url(../../../static/images/address.png);
  2407. background-repeat: round;
  2408. background-color: var(--view-theme);
  2409. .tipsphoto {
  2410. display: inline-block;
  2411. width: 200rpx;
  2412. height: 200rpx;
  2413. margin-top: 73rpx;
  2414. }
  2415. }
  2416. .bottom {
  2417. font-size: 32rpx;
  2418. font-weight: 400;
  2419. .font1 {
  2420. font-size: 36rpx;
  2421. font-weight: 600;
  2422. color: #333333;
  2423. margin: 32rpx 0rpx 22rpx;
  2424. }
  2425. .font2 {
  2426. color: #666666;
  2427. margin-bottom: 48rpx;
  2428. }
  2429. .btn {
  2430. width: 360rpx;
  2431. height: 82rpx;
  2432. border-radius: 42rpx;
  2433. background: linear-gradient(to left, var(--view-theme) 0%, #f5f5f5 100%);
  2434. color: #FFFFFF;
  2435. line-height: 82rpx;
  2436. margin: 0 auto;
  2437. }
  2438. }
  2439. }
  2440. .mark {
  2441. position: fixed;
  2442. top: 0;
  2443. left: 0;
  2444. bottom: 0;
  2445. right: 0;
  2446. background: rgba(0, 0, 0, 0.5);
  2447. z-index: 99;
  2448. }
  2449. .table-header {
  2450. width: 710rpx;
  2451. padding: 52rpx 24rpx 46rpx;
  2452. border-radius: 14rpx;
  2453. margin: 0 30rpx;
  2454. background-color: #FFFFFF;
  2455. font-size: 24rpx;
  2456. color: #999999;
  2457. .top {
  2458. display: flex;
  2459. margin-bottom: 18rpx;
  2460. }
  2461. .name {
  2462. flex: 1;
  2463. min-width: 0;
  2464. font-weight: 600;
  2465. font-size: 34rpx;
  2466. color: #333333;
  2467. }
  2468. .number {
  2469. color: #333333;
  2470. }
  2471. .light {
  2472. margin-right: 6rpx;
  2473. font-weight: 600;
  2474. font-size: 34rpx;
  2475. color: var(--view-theme);
  2476. }
  2477. }
  2478. //指派
  2479. .zp-wrap {
  2480. margin-top: 20rpx;
  2481. width: 750rpx;
  2482. height: 216rpx;
  2483. white-space: nowrap;
  2484. .zp-item {
  2485. display: inline-block;
  2486. margin-right: 15rpx;
  2487. padding-top: 34rpx;
  2488. width: 172rpx;
  2489. height: 216rpx;
  2490. // background: #E02020;
  2491. background-color: #fff;
  2492. border-radius: 10rpx;
  2493. .zp-logo {
  2494. display: block;
  2495. width: 106rpx;
  2496. height: 106rpx;
  2497. margin: auto;
  2498. border-radius: 50%;
  2499. background-color: #eee;
  2500. }
  2501. .zp-name {
  2502. margin-top: 15rpx;
  2503. width: 100%;
  2504. text-align: center;
  2505. font-size: 30rpx;
  2506. font-weight: bold;
  2507. color: #333333;
  2508. }
  2509. }
  2510. .choose {
  2511. background-color: #262261 !important;
  2512. .zp-name {
  2513. color: #fff !important;
  2514. }
  2515. }
  2516. }
  2517. //指派
  2518. .zp-wrap {
  2519. margin-top: 20rpx;
  2520. width: 650rpx;
  2521. height: 216rpx;
  2522. white-space: nowrap;
  2523. .zp-item {
  2524. display: inline-block;
  2525. margin-right: 15rpx;
  2526. padding-top: 34rpx;
  2527. width: 172rpx;
  2528. height: 216rpx;
  2529. // background: #E02020;
  2530. background-color: #fff;
  2531. border-radius: 10rpx;
  2532. .zp-logo {
  2533. display: block;
  2534. width: 106rpx;
  2535. height: 106rpx;
  2536. margin: auto;
  2537. border-radius: 50%;
  2538. background-color: #eee;
  2539. }
  2540. .zp-name {
  2541. margin-top: 15rpx;
  2542. width: 100%;
  2543. text-align: center;
  2544. font-size: 30rpx;
  2545. font-weight: bold;
  2546. color: #333333;
  2547. }
  2548. }
  2549. .choose {
  2550. background-color: #262261 !important;
  2551. .zp-name {
  2552. color: #fff !important;
  2553. }
  2554. }
  2555. }
  2556. </style>