index.vue 75 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704
  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. spid:'',
  632. };
  633. },
  634. computed: mapGetters(['isLogin']),
  635. onLoad: function(options) {
  636. this.ptype = options.product_type;
  637. if(options.spid){
  638. this.spid = options.spid;
  639. }
  640. if (this.ptype == 6) {
  641. this.getList()
  642. }
  643. this.getMen()
  644. // #ifdef H5
  645. this.from = this.$wechat.isWeixin() ? 'weixin' : 'weixinh5'
  646. // #endif
  647. // #ifdef MP
  648. this.from = 'routine'
  649. // #endif
  650. if (!options.cartId) return this.$util.Tips({
  651. title: '请选择要购买的商品'
  652. }, {
  653. tab: 3,
  654. url: 1
  655. });
  656. this.deliveryType = options.delivery_type || 1;
  657. if (this.deliveryType == 1 || this.deliveryType == 3) {
  658. this.addressId = options.addressId || 0;
  659. this.system_store.name = options.store_name;
  660. }
  661. if (this.deliveryType == 2 || this.deliveryType == 3) {
  662. this.storeId = options.store_id || 0;
  663. this.system_store.id = options.store_id || 0;
  664. }
  665. this.couponId = options.couponId || 0;
  666. this.noCoupon = options.noCoupon || 0;
  667. this.product_id = options.product_id || 0;
  668. this.pinkId = options.pinkId ? parseInt(options.pinkId) : 0;
  669. this.cartId = options.cartId;
  670. this.is_address = options.is_address ? true : false;
  671. this.news = !options.new || options.new === '0' ? 0 : 1;
  672. uni.setStorageSync('news', this.news);
  673. this.invChecked = options.invoice_id || '';
  674. this.header_type = options.header_type || '1';
  675. this.couponTitle = options.couponTitle || '请选择'
  676. switch (options.invoice_type) {
  677. case '1':
  678. this.invTitle = '增值税电子普通发票';
  679. break;
  680. case '2':
  681. this.invTitle = '增值税电子专用发票';
  682. break;
  683. }
  684. if (options.invoice_name) {
  685. this.invTitle = options.invoice_name;
  686. }
  687. // #ifndef APP-PLUS
  688. this.textareaStatus = true;
  689. // #endif
  690. if (this.isLogin && this.toPay == false) {
  691. this.getCheckShipping();
  692. } else {
  693. toLogin();
  694. }
  695. this.collage_id = options.collage_id || 0;
  696. if (this.collage_id) {
  697. this.getCollagePartake();
  698. }
  699. // #ifdef MP
  700. // 桌码
  701. this.tableId = options.tableId || 0;
  702. if (this.tableId) {
  703. this.getCodeData();
  704. }
  705. // #endif
  706. },
  707. /**
  708. * 生命周期函数--监听页面显示
  709. */
  710. onShow: function() {
  711. uni.removeStorageSync('form_type_cart');
  712. let _this = this
  713. uni.$on("handClick", res => {
  714. if (res) {
  715. _this.system_store = res.address
  716. _this.storeId = _this.system_store.id
  717. _this.cartId = res.cartId
  718. _this.news = res.new
  719. _this.pinkId = Number(res.pinkId)
  720. _this.couponId = res.couponId
  721. _this.getConfirm()
  722. }
  723. // 清除监听
  724. uni.$off('handClick');
  725. })
  726. let current = (dayjs(new Date(Number(new Date().getTime()))).format('HH:mm')).split(':');
  727. let currentArray = current;
  728. currentArray.push(0);
  729. let arrayNew = [];
  730. [...currentArray, ...current].forEach(item => {
  731. arrayNew.push(Number(item))
  732. })
  733. this.timeranges = arrayNew;
  734. },
  735. methods: {
  736. // 获取员工列表
  737. getMen(type) {
  738. let that = this
  739. getMen({
  740. page: 1,
  741. limit: 100,
  742. }).then(res => {
  743. let arr1 = res.data.list
  744. let arr2 = [{
  745. id: 0,
  746. alias: '暂无'
  747. }]
  748. that.saleyg.list = arr2.concat(arr1)
  749. })
  750. },
  751. // 选择员工
  752. choosYg(item) {
  753. this.sale_yg = item
  754. },
  755. // 打开picker
  756. openDatetimePicker() {
  757. this.$refs.myPicker.show();
  758. },
  759. // 关闭picker
  760. closeDatetimePicker() {
  761. this.$refs.myPicker.hide();
  762. },
  763. datetimePickerErr() {
  764. this.$util.Tips({
  765. title: '请选择正确的预约时间'
  766. });
  767. this.yytime = ''
  768. },
  769. handleSubmit(e) {
  770. console.log(e);
  771. this.yytime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`;
  772. },
  773. // #ifdef MP
  774. // 桌码信息
  775. getCodeData() {
  776. getCodeData({
  777. tableId: this.tableId
  778. }).then(res => {
  779. this.codeData = res.data;
  780. });
  781. },
  782. // #endif
  783. getCollagePartake() {
  784. getCollagePartake({
  785. collage_id: this.collage_id
  786. }).then(res => {
  787. this.goodsList = res.data;
  788. });
  789. },
  790. OnAreaAddress(address) {
  791. let addr = '';
  792. if (address.length == 4) {
  793. addr = address[0].label + '/' + address[1].label + '/' + address[2].label + '/' + address[3].label;
  794. } else if (address.length == 3) {
  795. addr = address[0].label + '/' + address[1].label + '/' + address[2].label;
  796. } else if (address.length == 2) {
  797. addr = address[0].label + '/' + address[1].label;
  798. } else {
  799. addr = address[0].label;
  800. }
  801. this.confirm[this.timerangesIndex].value = addr;
  802. CACHE_CITY[this.timerangesIndex] = address;
  803. },
  804. changeRegion(index) {
  805. if (!this.confirm[index].value) {
  806. this.addressInfoArea = [];
  807. }
  808. this.timerangesIndex = index;
  809. this.cityShow = Number(this.confirm[index].valConfig.tabVal) + 1;
  810. this.display = true;
  811. if (CACHE_CITY[index]) {
  812. this.addressInfoArea = CACHE_CITY[index];
  813. }
  814. },
  815. // 关闭地址弹窗;
  816. changeAddressClose: function() {
  817. this.display = false;
  818. },
  819. maskClick(e) {
  820. console.log(e);
  821. },
  822. // 授权关闭
  823. authColse: function(e) {
  824. this.isShowAuth = e
  825. },
  826. showMaoLocation(e) {
  827. let self = this;
  828. // #ifdef H5
  829. if (self.$wechat.isWeixin()) {
  830. self.$wechat.seeLocation({
  831. latitude: Number(e.latitude),
  832. longitude: Number(e.longitude),
  833. name: e.name,
  834. scale: 13,
  835. address: `${e.address}-${e.detailed_address}`,
  836. }).then(res => {})
  837. } else {
  838. // #endif
  839. uni.openLocation({
  840. latitude: Number(e.latitude),
  841. longitude: Number(e.longitude),
  842. name: e.name,
  843. address: `${e.address}-${e.detailed_address}`,
  844. success: function() {
  845. Number
  846. }
  847. });
  848. // #ifdef H5
  849. }
  850. // #endif
  851. },
  852. call(phone) {
  853. uni.makePhoneCall({
  854. phoneNumber: phone,
  855. });
  856. },
  857. // 选中配送类型
  858. deliveryFun(e, item) {
  859. this.deliveryType = e;
  860. this.$refs.deliveryMethod.module = false;
  861. if (e == 2) {
  862. this.storeId = item.id;
  863. } else {
  864. if (e == 3) {
  865. this.storeId = item.id;
  866. if (this.isDisplay.includes("2") && this.isDisplay.includes("3")) {
  867. this.getaddressInfo();
  868. this.$nextTick(function() {
  869. this.$refs.addressWindow.getAddressList();
  870. })
  871. }
  872. }
  873. this.system_store = item;
  874. }
  875. if (e == 1 || e == 3) {
  876. this.addressType(0, e);
  877. } else {
  878. this.addressType(1, e);
  879. }
  880. },
  881. // 选择配送方式
  882. onDelivery() {
  883. this.$refs.deliveryMethod.module = true
  884. },
  885. // 子集调用门店列表接口
  886. storeFun(index) {
  887. this.getList(1, index);
  888. },
  889. // 是否显示快递配送
  890. getCheckShipping() {
  891. let data = {
  892. cartId: this.cartId,
  893. new: this.news
  894. }
  895. checkShipping(data).then(res => {
  896. // 1:快递配送,2:到店自提,3:门店配送
  897. res.data.type.sort((x, y) => x - y) //正序
  898. this.isDisplay = res.data.type;
  899. if (((this.isDisplay.includes("2") && this.isDisplay.length == 1) || (this.deliveryType == 2 &&
  900. !this.tableId) || (this.deliveryType == 3 && this.storeId > 0 && !this.system_store
  901. .name)) && this.isDisplay.length) {
  902. if ((this.deliveryType == 2 || (this.deliveryType == 3 && !this.isDisplay.includes(
  903. "3"))) && this.isDisplay.includes("2")) {
  904. this.deliveryType = 2
  905. this.addressType(1, this.deliveryType);
  906. }
  907. if ((this.deliveryType == 3 || (this.deliveryType == 2 && !this.isDisplay.includes(
  908. "2"))) && this.isDisplay.includes("3")) {
  909. this.deliveryType = 3
  910. this.addressType(0, this.deliveryType);
  911. this.getaddressInfo();
  912. this.$nextTick(function() {
  913. this.$refs.addressWindow.getAddressList();
  914. })
  915. }
  916. } else {
  917. this.getaddressInfo();
  918. this.getConfirm();
  919. this.$nextTick(function() {
  920. this.$refs.addressWindow.getAddressList();
  921. })
  922. }
  923. }).catch(err => {
  924. uni.showToast({
  925. title: err,
  926. icon: 'none'
  927. });
  928. })
  929. },
  930. /**
  931. * 删除图片
  932. *
  933. */
  934. DelPic: function(index, indexs) {
  935. let that = this,
  936. pic = this.confirm[index].value;
  937. that.confirm[index].value.splice(indexs, 1);
  938. that.$set(that.confirm[index], 'value', that.confirm[index].value);
  939. },
  940. /**
  941. * 上传文件
  942. *
  943. */
  944. uploadpic: function(index) {
  945. let that = this;
  946. this.$util.uploadImageOne('upload/image', function(res) {
  947. that.newImg.push(res.data.url);
  948. that.$set(that.confirm[index], 'value', that.newImg);
  949. });
  950. },
  951. // 不开发票
  952. invCancel() {
  953. this.invChecked = '';
  954. this.invTitle = '不开发票';
  955. this.invShow = false;
  956. },
  957. // 选择发票
  958. invChange(id) {
  959. this.invChecked = id;
  960. this.invShow = false;
  961. const result = this.invList.find(item => item.id === id);
  962. let name = '';
  963. name += result.header_type === 1 ? '个人' : '企业';
  964. name += result.type === 1 ? '普通' : '专用';
  965. name += '发票';
  966. this.invTitle = name;
  967. },
  968. // 关闭发票
  969. invClose() {
  970. this.invShow = false;
  971. this.getInvoiceList()
  972. },
  973. getInvoiceList() {
  974. uni.showLoading({
  975. title: '正在加载…'
  976. })
  977. invoiceList().then(res => {
  978. uni.hideLoading();
  979. this.invList = res.data.map(item => {
  980. item.id = item.id.toString();
  981. return item;
  982. });
  983. const result = this.invList.find(item => item.id == this.invChecked);
  984. if (result) {
  985. let name = '';
  986. name += result.header_type === 1 ? '个人' : '企业';
  987. name += result.type === 1 ? '普通' : '专用';
  988. name += '发票';
  989. this.invTitle = name;
  990. }
  991. }).catch(err => {
  992. uni.showToast({
  993. title: err,
  994. icon: 'none'
  995. });
  996. });
  997. },
  998. /**
  999. * 开发票
  1000. */
  1001. goInvoice: function() {
  1002. this.getInvoiceList()
  1003. this.invShow = true;
  1004. this.urlQuery =
  1005. `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}`;
  1006. },
  1007. /**
  1008. * 授权回调事件
  1009. *
  1010. */
  1011. onLoadFun: function() {
  1012. this.getCheckShipping();
  1013. this.isShowAuth = false;
  1014. //调用子页面方法授权后执行获取地址列表
  1015. // this.$scope.selectComponent('#address-window').getAddressList();
  1016. },
  1017. /**
  1018. * 事件回调
  1019. *
  1020. */
  1021. onChangeFun: function(e) {
  1022. let opt = e;
  1023. let action = opt.action || null;
  1024. let value = opt.value != undefined ? opt.value : null;
  1025. action && this[action] && this[action](value);
  1026. },
  1027. payClose: function() {
  1028. this.pay_close = false;
  1029. },
  1030. goPay() {
  1031. this.formVerify();
  1032. },
  1033. payCheck(type) {
  1034. this.payType = type;
  1035. this.SubOrder();
  1036. },
  1037. payAddress() {
  1038. uni.navigateTo({
  1039. // /pages/users/user_address/index?id=25&cartId=76179610656654229504&pinkId=0&couponId=0&new=1
  1040. url: '/pages/users/user_address/index?id=' + this.id + '&new=' + this.news + '&cartId=' + this
  1041. .cartId +
  1042. '&pinkId=' +
  1043. this.pinkId +
  1044. '&couponId=' +
  1045. this.couponId + '&delivery_type=' + this.deliveryType + '&addressId=' + this.addressId +
  1046. '&store_id=' + this.storeId + '&store_name=' + this.system_store.name + '&product_id=' +
  1047. this.product_id
  1048. })
  1049. },
  1050. /**
  1051. * 获取门店列表数据
  1052. */
  1053. getList: function(fromType, index) {
  1054. let longitude = uni.getStorageSync("user_longitude"); //经度
  1055. let latitude = uni.getStorageSync("user_latitude"); //纬度
  1056. let data = {
  1057. latitude: latitude, //纬度
  1058. longitude: longitude, //经度
  1059. page: 1,
  1060. limit: 100,
  1061. type: this.seckillId > 0 ? 1 : 0,
  1062. product_id: this.product_id,
  1063. is_store: index
  1064. }
  1065. storeListApi(data).then(res => {
  1066. let list = res.data.list.list || [];
  1067. this.$set(this, 'storeList', list);
  1068. this.$set(this, 'storeId', this.storeId != 0 ? this.storeId : list[0].id);
  1069. list.forEach(item => {
  1070. if (this.storeId == item.id) {
  1071. this.$set(this, 'system_store', item);
  1072. }
  1073. })
  1074. if (fromType != 1) {
  1075. this.getConfirm();
  1076. }
  1077. }).catch(err => {})
  1078. },
  1079. // 关闭地址弹窗;
  1080. changeClose: function() {
  1081. this.$set(this.address, 'address', false);
  1082. },
  1083. /*
  1084. * 跳转门店列表
  1085. */
  1086. showStoreList: function() {
  1087. let _this = this
  1088. if (this.storeList.length > 0) {
  1089. uni.navigateTo({
  1090. url: `/pages/store/store_list/index?type=1&cartId=${_this.cartId}&new=${_this.news}&pinkId=${_this.pinkId}&couponId=${_this.couponId}`
  1091. })
  1092. }
  1093. },
  1094. changePayType(type) {
  1095. this.payType = type
  1096. this.computedPrice()
  1097. },
  1098. computedPrice: function() {
  1099. const that = this;
  1100. let shippingType = that.shippingType;
  1101. postOrderComputed(that.orderKey, {
  1102. addressId: that.addressId,
  1103. useIntegral: that.useIntegral ? 1 : 0,
  1104. couponId: that.priceGroup.couponPrice == 0 ? 0 : that.couponId,
  1105. shipping_type: that.tableId ? 4 : parseInt(shippingType) + 1,
  1106. payType: that.payType
  1107. }).then(res => {
  1108. let result = res.data.result;
  1109. if (result) {
  1110. that.totalPrice = result.pay_price;
  1111. that.integral_price = result.deduction_price;
  1112. that.coupon_price = result.coupon_price;
  1113. that.promotions_detail = result.promotions_detail;
  1114. that.integral = that.useIntegral ? result.SurplusIntegral : that.userInfo.integral;
  1115. that.$set(that.priceGroup, 'storePostage', shippingType == 1 ? 0 : result.pay_postage);
  1116. that.$set(that.priceGroup, 'storePostageDiscount', result.storePostageDiscount);
  1117. }
  1118. }).catch(err => {
  1119. return that.$util.Tips({
  1120. title: err
  1121. });
  1122. })
  1123. },
  1124. addressType: function(e, type) {
  1125. let index = e;
  1126. this.shippingType = parseInt(index);
  1127. // this.computedPrice();
  1128. if (index == 1) {
  1129. this.getList(0, type);
  1130. } else {
  1131. this.getConfirm();
  1132. }
  1133. },
  1134. bindPickerChange: function(e) {
  1135. let value = e.detail.value;
  1136. this.shippingType = value;
  1137. this.computedPrice();
  1138. },
  1139. ChangCouponsClone: function() {
  1140. this.$set(this.coupon, 'coupon', false);
  1141. },
  1142. changeTextareaStatus: function() {
  1143. for (let i = 0, len = this.coupon.list.length; i < len; i++) {
  1144. this.coupon.list[i].use_title = '';
  1145. this.coupon.list[i].is_use = 0;
  1146. }
  1147. this.textareaStatus = true;
  1148. this.status = 0;
  1149. this.$set(this.coupon, 'list', this.coupon.list);
  1150. },
  1151. /**
  1152. * 处理点击优惠券后的事件
  1153. *
  1154. */
  1155. ChangCoupons: function(e) {
  1156. // this.usableCoupon = e
  1157. // this.coupon.coupon = false
  1158. let index = e,
  1159. list = this.coupon.list,
  1160. couponTitle = '请选择',
  1161. couponId = 0;
  1162. for (let i = 0, len = list.length; i < len; i++) {
  1163. if (i != index) {
  1164. list[i].use_title = '';
  1165. list[i].is_use = 0;
  1166. }
  1167. }
  1168. if (list[index].is_use) {
  1169. //不使用优惠券
  1170. list[index].use_title = '';
  1171. list[index].is_use = 0;
  1172. } else {
  1173. //使用优惠券
  1174. list[index].use_title = '不使用';
  1175. list[index].is_use = 1;
  1176. couponTitle = list[index].coupon_title;
  1177. couponId = list[index].id;
  1178. }
  1179. this.couponTitle = couponTitle;
  1180. this.couponId = couponId;
  1181. this.$set(this.coupon, 'coupon', false);
  1182. this.$set(this.coupon, 'list', list);
  1183. this.getConfirm(1);
  1184. },
  1185. /**
  1186. * 使用积分抵扣
  1187. */
  1188. ChangeIntegral: function() {
  1189. this.useIntegral = !this.useIntegral;
  1190. this.computedPrice();
  1191. },
  1192. /**
  1193. * 选择地址后改变事件
  1194. * @param object e
  1195. */
  1196. OnChangeAddress: function(e) {
  1197. this.textareaStatus = true;
  1198. this.addressId = e;
  1199. this.address.address = false;
  1200. this.getConfirm()
  1201. this.getaddressInfo();
  1202. this.computedPrice();
  1203. },
  1204. bindHideKeyboard: function(e) {
  1205. this.mark = e.detail.value;
  1206. },
  1207. // 对象转数组
  1208. objToArr(data) {
  1209. let obj = Object.keys(data);
  1210. let m = obj.map(key => data[key]);
  1211. return m;
  1212. },
  1213. /**
  1214. * 获取当前订单详细信息
  1215. *
  1216. */
  1217. getConfirm: function(numType) {
  1218. let that = this;
  1219. let shippingType = parseInt(this.shippingType) + 1;
  1220. let addressId = 0,
  1221. storeid;
  1222. if (this.tableId) {
  1223. shippingType = 4;
  1224. }
  1225. if (shippingType == 1) {
  1226. addressId = that.addressId
  1227. if (this.deliveryType == 1) {
  1228. storeid = 0
  1229. } else {
  1230. storeid = that.storeId
  1231. }
  1232. } else {
  1233. addressId = ''
  1234. storeid = that.storeId
  1235. }
  1236. orderConfirm(that.cartId, that.news, addressId, shippingType, storeid, that.couponId).then(res => {
  1237. if (res.data.upgrade_addr == 1) {
  1238. that.id = res.data.addressInfo.id
  1239. this.isaddress = true
  1240. }
  1241. if (numType != 1) {
  1242. let confirm = this.objToArr(res.data.custom_form);
  1243. confirm.forEach((item, index, arr) => {
  1244. CACHE_CITY[index] = ''; //清空省市区
  1245. if (item.name == 'texts') {
  1246. if (item.defaultValConfig.value) {
  1247. item.value = item.defaultValConfig.value
  1248. } else {
  1249. item.value = ''
  1250. }
  1251. } else if (item.name == 'radios') {
  1252. item.value = item.wordsConfig.list[0].val
  1253. } else if (item.name == 'uploadPicture') {
  1254. item.value = [];
  1255. } else if (item.name == 'dateranges') {
  1256. if (item.valConfig.tabVal == 0) {
  1257. if (item.valConfig.tabData == 0) {
  1258. let obj = dayjs(new Date(Number(new Date().getTime()))).format(
  1259. 'YYYY-MM-DD');
  1260. item.value = [obj, obj]
  1261. } else {
  1262. let data1 = dayjs(new Date(Number(new Date(item.valConfig
  1263. .specifyDate[0]).getTime()))).format('YYYY-MM-DD');
  1264. let data2 = dayjs(new Date(Number(new Date(item.valConfig
  1265. .specifyDate[1]).getTime()))).format('YYYY-MM-DD');
  1266. item.value = [data1, data2];
  1267. }
  1268. } else {
  1269. item.value = [];
  1270. }
  1271. } else {
  1272. if (['times', 'dates', 'timeranges'].indexOf(item.name) != -1) {
  1273. if (item.valConfig.tabVal == 0) {
  1274. if (item.valConfig.tabData == 0) {
  1275. if (item.name == 'times') {
  1276. item.value = dayjs(new Date(Number(new Date()
  1277. .getTime()))).format('HH:mm');
  1278. } else if (item.name == 'dates') {
  1279. item.value = dayjs(new Date(Number(new Date()
  1280. .getTime()))).format('YYYY-MM-DD');
  1281. } else {
  1282. let current = dayjs(new Date(Number(new Date()
  1283. .getTime()))).format('HH:mm');
  1284. item.value = current + ' - ' + current;
  1285. }
  1286. } else {
  1287. if (item.name == 'times' || item.name == 'dates') {
  1288. item.value = item.valConfig.specifyDate;
  1289. } else {
  1290. item.value = item.valConfig.specifyDate[0] + ' - ' +
  1291. item.valConfig.specifyDate[1];
  1292. }
  1293. }
  1294. } else {
  1295. item.value = '';
  1296. }
  1297. } else {
  1298. item.value = '';
  1299. }
  1300. }
  1301. })
  1302. function sortNumber(a, b) {
  1303. return a.timestamp - b.timestamp;
  1304. }
  1305. confirm.sort(sortNumber);
  1306. that.$set(that, 'confirm', confirm);
  1307. }
  1308. that.$set(that, 'goodsType', res.data.type);
  1309. that.$set(that, 'userInfo', res.data.userInfo);
  1310. that.$set(that, 'integral', res.data.userInfo.integral);
  1311. that.$set(that, 'contacts', res.data.userInfo.real_name);
  1312. that.$set(that, 'contactsTel', res.data.userInfo.record_phone || '');
  1313. that.$set(that, 'integralRatio', res.data.integralRatio);
  1314. that.$set(that, 'offlinePostage', res.data.offlinePostage);
  1315. that.$set(that, 'orderKey', res.data.orderKey);
  1316. that.$set(that, 'valid_count', res.data.valid_count);
  1317. that.$set(that, 'discount_id', res.data.discount_id)
  1318. that.$set(that, 'priceGroup', res.data.priceGroup);
  1319. that.$set(that, 'seckillId', parseInt(res.data.seckill_id));
  1320. that.$set(that, 'BargainId', parseInt(res.data.bargain_id));
  1321. that.$set(that, 'combinationId', parseInt(res.data.combination_id));
  1322. that.$set(that, 'discountId', parseInt(res.data.discount_id));
  1323. that.$set(that, 'invoice_func', res.data.invoice_func);
  1324. that.$set(that, 'special_invoice', res.data.special_invoice);
  1325. that.$set(that, 'integral_ratio_status', res.data.integral_ratio_status);
  1326. that.$set(that, 'store_self_mention', res.data.store_self_mention);
  1327. that.$set(that, 'store_func_status', res.data.store_func_status);
  1328. that.giveData.give_integral = res.data.give_integral;
  1329. that.giveData.give_coupon = res.data.give_coupon;
  1330. let cartInfo = res.data.cartInfo;
  1331. let cartObj = [],
  1332. giftObj = [];
  1333. cartInfo.forEach(item => {
  1334. if (item.is_gift == 1) {
  1335. giftObj.push(item)
  1336. } else {
  1337. cartObj.push(item)
  1338. }
  1339. })
  1340. that.$set(that, 'cartInfo', cartObj);
  1341. that.$set(that, 'giveCartInfo', giftObj);
  1342. let giveType = -1;
  1343. giftObj.forEach(item => {
  1344. if (item.product_type == 0 || item.product_type == 4) {
  1345. return giveType = 0
  1346. }
  1347. })
  1348. that.$set(that, 'product_type', (res.data.product_type == 0 || giveType == 0 || res.data
  1349. .product_type == 4) ? 0 : 1);
  1350. //微信支付是否开启
  1351. that.cartArr[0].payStatus = res.data.pay_weixin_open || 0
  1352. //支付宝是否开启
  1353. that.cartArr[1].payStatus = res.data.ali_pay_status || 0;
  1354. //#ifdef MP
  1355. that.cartArr[1].payStatus = 0;
  1356. //#endif
  1357. //余额支付是否开启
  1358. // that.cartArr[2].title = '可用余额:' + res.data.userInfo.now_money;
  1359. that.cartArr[2].number = res.data.userInfo.now_money;
  1360. that.cartArr[2].payStatus = res.data.yue_pay_status == 1 ? res.data.yue_pay_status : 0
  1361. if (res.data.offline_pay_status == 2) {
  1362. that.cartArr[3].payStatus = 0
  1363. } else {
  1364. that.cartArr[3].payStatus = 1
  1365. }
  1366. // that.$set(that, 'cartArr', that.cartArr);
  1367. that.$set(that, 'ChangePrice', that.totalPrice);
  1368. that.getBargainId();
  1369. that.getCouponList();
  1370. that.computedPrice();
  1371. if (this.addressId || this.couponId) {
  1372. // this.computedPrice();
  1373. } else {
  1374. that.$set(that, 'totalPrice', that.$util.$h.Add(parseFloat(res.data.priceGroup
  1375. .totalPrice),
  1376. parseFloat(res.data
  1377. .priceGroup.storePostage)));
  1378. }
  1379. }).catch(err => {
  1380. return this.$util.Tips({
  1381. title: err
  1382. });
  1383. });
  1384. },
  1385. /*
  1386. * 提取砍价和拼团id
  1387. */
  1388. getBargainId: function() {
  1389. let that = this;
  1390. // let cartINfo = that.cartInfo;
  1391. // let BargainId = 0;
  1392. // let combinationId = 0;
  1393. // let discountId = 0;
  1394. // cartINfo.forEach(function(value, index, cartINfo) {
  1395. // BargainId = cartINfo[index].bargain_id,
  1396. // combinationId = cartINfo[index].combination_id,
  1397. // discountId = cartINfo[index].discount_id
  1398. // })
  1399. // that.$set(that, 'BargainId', parseInt(BargainId));
  1400. // that.$set(that, 'combinationId', parseInt(combinationId));
  1401. // that.$set(that, 'discountId', parseInt(discountId));
  1402. if (that.cartArr.length == 3 && (that.BargainId || that.combinationId || that.seckillId || that
  1403. .discountId)) {
  1404. that.cartArr[2].payStatus = 0;
  1405. that.$set(that, 'cartArr', that.cartArr);
  1406. }
  1407. },
  1408. /**
  1409. * 获取当前金额可用优惠券
  1410. *
  1411. */
  1412. getCouponList: function() {
  1413. let that = this;
  1414. let data = {
  1415. cartId: this.cartId,
  1416. 'new': this.news,
  1417. shipping_type: that.$util.$h.Add(that.shippingType, 1),
  1418. store_id: that.system_store ? that.system_store.id : 0
  1419. }
  1420. getCouponsOrderPrice(this.totalPrice, data).then(res => {
  1421. that.$set(that.coupon, 'list', res.data);
  1422. that.openType = 1;
  1423. });
  1424. },
  1425. /*
  1426. * 获取默认收货地址或者获取某条地址信息
  1427. */
  1428. getaddressInfo: function() {
  1429. let that = this;
  1430. if (that.addressId) {
  1431. getAddressDetail(that.addressId).then(res => {
  1432. res.data.is_default = parseInt(res.data.is_default);
  1433. that.addressInfo = res.data || {};
  1434. that.addressId = res.data.id || 0;
  1435. that.address.addressId = res.data.id || 0;
  1436. })
  1437. } else {
  1438. getAddressDefault().then(res => {
  1439. res.data.is_default = parseInt(res.data.is_default);
  1440. that.addressInfo = res.data || {};
  1441. that.addressId = res.data.id || 0;
  1442. that.address.addressId = res.data.id || 0;
  1443. })
  1444. }
  1445. },
  1446. payItem: function(e) {
  1447. let that = this;
  1448. let active = e;
  1449. that.active = active;
  1450. that.animated = true;
  1451. that.payType = that.cartArr[active].value;
  1452. that.computedPrice();
  1453. setTimeout(function() {
  1454. that.car();
  1455. }, 500);
  1456. },
  1457. couponTap: function() {
  1458. this.coupon.coupon = true;
  1459. this.coupon.list.forEach((item, index) => {
  1460. if (item.id == this.couponId) {
  1461. item.is_use = 1
  1462. } else {
  1463. item.is_use = 0
  1464. }
  1465. })
  1466. this.$set(this.coupon, 'list', this.coupon.list);
  1467. },
  1468. car: function() {
  1469. let that = this;
  1470. that.animated = false;
  1471. },
  1472. onAddress: function(name) {
  1473. let that = this;
  1474. if (name) {
  1475. that.textareaStatus = false;
  1476. that.address.address = true;
  1477. that.pagesUrl = '/pages/users/user_address_list/index?news=' + this.news + '&cartId=' + this
  1478. .cartId +
  1479. '&pinkId=' +
  1480. this.pinkId +
  1481. '&couponId=' +
  1482. this.couponId + '&delivery_type=' + this.deliveryType + '&addressId=' + this.addressId +
  1483. '&store_id=' + this.storeId + '&store_name=' + this.system_store.name + '&product_id=' + this
  1484. .product_id
  1485. } else {
  1486. uni.navigateTo({
  1487. url: '/pages/users/user_address/index?new=' + this.news + '&cartId=' + this.cartId +
  1488. '&pinkId=' +
  1489. this.pinkId +
  1490. '&couponId=' +
  1491. this.couponId + '&delivery_type=' + this.deliveryType + '&addressId=' + this
  1492. .addressId + '&store_id=' + this.storeId + '&store_name=' + this.system_store
  1493. .name + '&product_id=' + this.product_id
  1494. })
  1495. }
  1496. },
  1497. payment: function(data) {
  1498. let that = this;
  1499. orderCreate(that.orderKey, data).then(res => {
  1500. let status = res.data.status,
  1501. orderId = res.data.result.orderId,
  1502. jsConfig = res.data.result.jsConfig,
  1503. goPages = '/pages/goods/order_pay_status/index?order_id=' + orderId + '&msg=' + res
  1504. .msg +
  1505. '&type=3' + '&totalPrice=' + this.totalPrice
  1506. switch (status) {
  1507. case 'ORDER_EXIST':
  1508. case 'EXTEND_ORDER':
  1509. case 'PAY_ERROR':
  1510. uni.hideLoading();
  1511. return that.$util.Tips({
  1512. title: res.msg
  1513. }, {
  1514. tab: 5,
  1515. url: goPages
  1516. });
  1517. break;
  1518. case 'SUCCESS':
  1519. uni.hideLoading();
  1520. if (that.BargainId || that.combinationId || that.pinkId || that.seckillId || that
  1521. .discountId)
  1522. return that.$util.Tips({
  1523. title: res.msg,
  1524. icon: 'success'
  1525. }, {
  1526. tab: 4,
  1527. url: goPages
  1528. });
  1529. return that.$util.Tips({
  1530. title: res.msg,
  1531. icon: 'success'
  1532. }, {
  1533. tab: 5,
  1534. url: goPages
  1535. });
  1536. break;
  1537. case 'WECHAT_PAY':
  1538. that.toPay = true;
  1539. // #ifdef MP
  1540. /* that.toPay = true; */
  1541. let mp_pay_name = ''
  1542. if (uni.requestOrderPayment) {
  1543. mp_pay_name = 'requestOrderPayment'
  1544. } else {
  1545. mp_pay_name = 'requestPayment'
  1546. }
  1547. uni[mp_pay_name]({
  1548. timeStamp: jsConfig.timestamp,
  1549. nonceStr: jsConfig.nonceStr,
  1550. package: jsConfig.package,
  1551. signType: jsConfig.signType,
  1552. paySign: jsConfig.paySign,
  1553. success: function(res) {
  1554. uni.hideLoading();
  1555. if (that.BargainId || that.combinationId || that.pinkId || that
  1556. .seckillId || that.discountId)
  1557. return that.$util.Tips({
  1558. title: '支付成功',
  1559. icon: 'success'
  1560. }, {
  1561. tab: 4,
  1562. url: goPages
  1563. });
  1564. return that.$util.Tips({
  1565. title: '支付成功',
  1566. icon: 'success'
  1567. }, {
  1568. tab: 5,
  1569. url: goPages
  1570. });
  1571. },
  1572. fail: function(e) {
  1573. uni.hideLoading();
  1574. return that.$util.Tips({
  1575. title: '取消支付'
  1576. }, {
  1577. tab: 5,
  1578. url: goPages + '&status=2'
  1579. });
  1580. },
  1581. complete: function(e) {
  1582. uni.hideLoading();
  1583. //关闭当前页面跳转至订单状态
  1584. if (res.errMsg == 'requestPayment:cancel') return that.$util
  1585. .Tips({
  1586. title: '取消支付'
  1587. }, {
  1588. tab: 5,
  1589. url: goPages + '&status=2'
  1590. });
  1591. },
  1592. })
  1593. // #endif
  1594. // #ifdef H5
  1595. this.$wechat.pay(res.data.result.jsConfig).then(res => {
  1596. return that.$util.Tips({
  1597. title: '支付成功',
  1598. icon: 'success'
  1599. }, {
  1600. tab: 5,
  1601. url: goPages
  1602. });
  1603. }).catch(res => {
  1604. if (!this.$wechat.isWeixin()) {
  1605. uni.redirectTo({
  1606. url: goPages +
  1607. '&msg=支付失败&status=2'
  1608. })
  1609. }
  1610. if (res.errMsg == 'chooseWXPay:cancel') return that.$util.Tips({
  1611. title: '取消支付'
  1612. }, {
  1613. tab: 5,
  1614. url: goPages + '&status=2'
  1615. });
  1616. })
  1617. // #endif
  1618. // #ifdef APP-PLUS
  1619. uni.requestPayment({
  1620. provider: 'wxpay',
  1621. orderInfo: jsConfig,
  1622. success: (e) => {
  1623. let url = goPages;
  1624. uni.showToast({
  1625. title: "支付成功"
  1626. })
  1627. setTimeout(res => {
  1628. uni.redirectTo({
  1629. url: url
  1630. })
  1631. }, 2000)
  1632. },
  1633. fail: (e) => {
  1634. let url = '/pages/goods/order_pay_status/index?order_id=' +
  1635. orderId +
  1636. '&msg=支付失败';
  1637. uni.showModal({
  1638. content: "支付失败",
  1639. showCancel: false,
  1640. success: function(res) {
  1641. if (res.confirm) {
  1642. uni.redirectTo({
  1643. url: url
  1644. })
  1645. } else if (res.cancel) {
  1646. console.log('用户点击取消');
  1647. }
  1648. }
  1649. })
  1650. },
  1651. complete: () => {
  1652. uni.hideLoading();
  1653. },
  1654. });
  1655. // #endif
  1656. break;
  1657. case 'PAY_DEFICIENCY':
  1658. uni.hideLoading();
  1659. //余额不足
  1660. return that.$util.Tips({
  1661. title: res.msg
  1662. }, {
  1663. tab: 5,
  1664. url: goPages + '&status=1'
  1665. });
  1666. break;
  1667. case "WECHAT_H5_PAY":
  1668. uni.hideLoading();
  1669. that.$util.Tips({
  1670. title: '订单创建成功!'
  1671. }, {
  1672. tab: 4,
  1673. url: goPages + '&status=0'
  1674. });
  1675. setTimeout(() => {
  1676. location.href = res.data.result.jsConfig.mweb_url;
  1677. }, 2000);
  1678. break;
  1679. case 'ALIPAY_PAY':
  1680. //#ifdef H5
  1681. if (this.from === 'weixin') {
  1682. uni.redirectTo({
  1683. url: `/pages/users/alipay_invoke/index?id=${orderId}&pay_key=${res.data.result.pay_key}`
  1684. });
  1685. } else {
  1686. uni.hideLoading();
  1687. that.formContent = res.data.result.jsConfig;
  1688. that.$nextTick(() => {
  1689. document.getElementById('alipaysubmit').submit();
  1690. })
  1691. }
  1692. //#endif
  1693. // #ifdef MP
  1694. uni.navigateTo({
  1695. url: `/pages/users/alipay_invoke/index?id=${orderId}&link=${jsConfig.qrCode}`
  1696. });
  1697. // #endif
  1698. // #ifdef APP-PLUS
  1699. uni.requestPayment({
  1700. provider: 'alipay',
  1701. orderInfo: jsConfig,
  1702. success: (e) => {
  1703. uni.showToast({
  1704. title: "支付成功"
  1705. })
  1706. let url = '/pages/goods/order_pay_status/index?order_id=' +
  1707. orderId +
  1708. '&msg=支付成功';
  1709. setTimeout(res => {
  1710. uni.redirectTo({
  1711. url: url
  1712. })
  1713. }, 2000)
  1714. },
  1715. fail: (e) => {
  1716. let url = '/pages/goods/order_pay_status/index?order_id=' +
  1717. orderId +
  1718. '&msg=支付失败';
  1719. uni.showModal({
  1720. content: "支付失败",
  1721. showCancel: false,
  1722. success: function(res) {
  1723. if (res.confirm) {
  1724. uni.redirectTo({
  1725. url: url
  1726. })
  1727. } else if (res.cancel) {
  1728. console.log('用户点击取消');
  1729. }
  1730. }
  1731. })
  1732. },
  1733. complete: () => {
  1734. uni.hideLoading();
  1735. },
  1736. });
  1737. // #endif
  1738. break;
  1739. }
  1740. }).catch(err => {
  1741. uni.hideLoading();
  1742. return that.$util.Tips({
  1743. title: err
  1744. });
  1745. });
  1746. },
  1747. clickTextArea() {
  1748. this.$refs.textarea.focus()
  1749. },
  1750. bindDateChange: function(e, index) {
  1751. this.confirm[index].value = e.target.value
  1752. },
  1753. bindTimeChange: function(e, index) {
  1754. this.confirm[index].value = e.target.value
  1755. },
  1756. bindSelectChange: function(e, index, item) {
  1757. this.confirm[index].value = item.wordsConfig.list[e.detail.value].val
  1758. },
  1759. getTimeranges(index) {
  1760. this.isShow = true
  1761. this.timerangesIndex = index
  1762. },
  1763. confrim(e) {
  1764. this.isShow = false;
  1765. this.confirm[this.timerangesIndex].value = e.time;
  1766. let arrayNew = [];
  1767. e.val.forEach(item => {
  1768. arrayNew.push(Number(item))
  1769. })
  1770. this.timeranges = arrayNew;
  1771. },
  1772. cancels() {
  1773. this.isShow = false;
  1774. },
  1775. // 单选
  1776. radioChange(e, index, item) {
  1777. this.confirm[index].value = item.wordsConfig.list[e.detail.value].val
  1778. },
  1779. // 多选
  1780. checkboxChange(e, index, item) {
  1781. let obj = e.detail.value;
  1782. let val = '';
  1783. item.wordsConfig.list.forEach((j, jindex) => {
  1784. obj.forEach(x => {
  1785. if (jindex == x) {
  1786. val = val + (val ? ',' : '') + j.val;
  1787. }
  1788. })
  1789. })
  1790. this.confirm[index].value = val
  1791. },
  1792. formVerify() {
  1793. let that = this;
  1794. if (!that.addressId && !that.shippingType && !that.product_type && !that.tableId) return that.$util.Tips({
  1795. title: '请选择收货地址'
  1796. });
  1797. if (that.shippingType == 1) {
  1798. if (that.contacts == "" || that.contactsTel == "") {
  1799. return that.$util.Tips({
  1800. title: '请填写联系人或联系人电话'
  1801. });
  1802. }
  1803. if (!/^1(3|4|5|7|8|9|6)\d{9}$/.test(that.contactsTel)) {
  1804. return that.$util.Tips({
  1805. title: '请填写正确的手机号'
  1806. });
  1807. }
  1808. if (!/^[\u4e00-\u9fa5\w]{2,16}$/.test(that.contacts)) {
  1809. return that.$util.Tips({
  1810. title: '请填写您的真实姓名'
  1811. });
  1812. }
  1813. if (that.storeList.length == 0) return that.$util.Tips({
  1814. title: '暂无门店,请选择其他方式'
  1815. });
  1816. }
  1817. for (var i = 0; i < that.confirm.length; i++) {
  1818. let data = that.confirm[i]
  1819. if (['radios'].indexOf(data.name) == -1 && (data.titleShow.val || (['uploadPicture', 'dateranges']
  1820. .indexOf(data.name) == -1 && data.value && data.value.trim()))) {
  1821. if ((data.name === 'texts' && data.valConfig.tabVal == 0) || ['dates', 'times', 'selects', 'citys',
  1822. 'checkboxs'
  1823. ].indexOf(data.name) != -1) {
  1824. if (!data.value || (data.value && !data.value.trim())) {
  1825. return that.$util.Tips({
  1826. title: `请填写${data.titleConfig.value}`
  1827. });
  1828. }
  1829. }
  1830. if (data.name === 'timeranges') {
  1831. if (!data.value) {
  1832. return that.$util.Tips({
  1833. title: `请选择${data.titleConfig.value}`
  1834. });
  1835. }
  1836. }
  1837. if (data.name === 'dateranges') {
  1838. if (!data.value.length) {
  1839. return that.$util.Tips({
  1840. title: `请选择${data.titleConfig.value}`
  1841. });
  1842. }
  1843. }
  1844. if (data.name === 'texts' && data.valConfig.tabVal == 4) {
  1845. if (data.value <= 0) {
  1846. return that.$util.Tips({
  1847. title: `请填写大于0的${data.titleConfig.value}`
  1848. });
  1849. }
  1850. }
  1851. if (data.name === 'texts' && data.valConfig.tabVal == 3) {
  1852. if (!/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(data.value)) {
  1853. return that.$util.Tips({
  1854. title: `请填写正确的${data.titleConfig.value}`
  1855. });
  1856. }
  1857. }
  1858. if (data.name === 'texts' && data.valConfig.tabVal == 1) {
  1859. if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(data.value)) {
  1860. return that.$util.Tips({
  1861. title: `请填写正确的${data.titleConfig.value}`
  1862. });
  1863. }
  1864. }
  1865. if (data.name === 'texts' && data.valConfig.tabVal == 2) {
  1866. if (!
  1867. /^[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
  1868. .test(data.value)) {
  1869. return that.$util.Tips({
  1870. title: `请填写正确的${data.titleConfig.value}`
  1871. });
  1872. }
  1873. }
  1874. if (data.name === 'uploadPicture') {
  1875. if (!data.value.length) {
  1876. return that.$util.Tips({
  1877. title: `请上传${data.titleConfig.value}`
  1878. });
  1879. }
  1880. }
  1881. }
  1882. }
  1883. this.pay_close = true;
  1884. },
  1885. SubOrder: function(e) {
  1886. let that = this,
  1887. data = {};
  1888. if (!that.payType) return that.$util.Tips({
  1889. title: '请选择支付方式'
  1890. });
  1891. data = {
  1892. sale:that.spid,
  1893. sale_uid: that.sale_yg.id || 0,
  1894. collate_code_id: that.collage_id || that.tableId,
  1895. custom_form: that.confirm,
  1896. real_name: that.contacts,
  1897. phone: that.contactsTel,
  1898. addressId: that.addressId,
  1899. formId: '',
  1900. couponId: that.priceGroup.couponPrice == 0 ? 0 : that.couponId,
  1901. payType: that.payType,
  1902. useIntegral: that.useIntegral,
  1903. bargainId: that.BargainId,
  1904. combinationId: that.combinationId,
  1905. discountId: that.discountId,
  1906. pinkId: that.pinkId,
  1907. seckill_id: that.seckillId,
  1908. mark: that.mark,
  1909. store_id: that.ptype == 6 ? that.system_store.id : (that.deliveryType == 1 ? 0 : that.system_store.id || 0),
  1910. 'from': that.from,
  1911. shipping_type: that.tableId ? 4 : that.$util.$h.Add(that.shippingType, 1),
  1912. 'new': that.news,
  1913. 'invoice_id': that.invChecked,
  1914. // #ifdef H5
  1915. quitUrl: location.protocol + '//' + location.hostname +
  1916. '/pages/goods/order_pay_status/index?' +
  1917. '&type=3' + '&totalPrice=' + this.totalPrice
  1918. // #endif
  1919. // #ifdef APP-PLUS
  1920. quitUrl: '/pages/goods/order_details/index?order_id=' + this.order_id
  1921. // #endif
  1922. };
  1923. if (data.payType == 'yue' && parseFloat(that.userInfo.now_money) < parseFloat(that.totalPrice))
  1924. return that.$util.Tips({
  1925. title: '余额不足!'
  1926. });
  1927. uni.showLoading({
  1928. title: '订单支付中'
  1929. });
  1930. // #ifdef MP
  1931. openPaySubscribe().then(() => {
  1932. that.payment(data);
  1933. });
  1934. // #endif
  1935. // #ifndef MP
  1936. that.payment(data);
  1937. // #endif
  1938. }
  1939. }
  1940. }
  1941. </script>
  1942. <style lang="scss" scoped>
  1943. /deep/.uni-date-x--border {
  1944. border: 0;
  1945. }
  1946. /deep/.uni-icons {
  1947. font-size: 0 !important;
  1948. }
  1949. /deep/.uni-date-x {
  1950. color: #999;
  1951. font-size: 15px;
  1952. }
  1953. /deep/.uni-date__x-input {
  1954. font-size: 15px;
  1955. }
  1956. .height-add {
  1957. height: calc(120rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  1958. height: calc(120rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  1959. }
  1960. /deep/uni-checkbox[disabled] .uni-checkbox-input {
  1961. background-color: #eee;
  1962. }
  1963. .confirmImg {
  1964. width: 100%;
  1965. }
  1966. /deep/.orderGoods {
  1967. margin-top: 20rpx;
  1968. border-radius: 14rpx;
  1969. }
  1970. .confirmImg .upload {
  1971. padding-bottom: 36rpx;
  1972. }
  1973. .confirmImg .upload .pictrue {
  1974. margin: 22rpx 23rpx 0 0;
  1975. width: 146rpx;
  1976. height: 146rpx;
  1977. position: relative;
  1978. font-size: 24rpx;
  1979. color: #bbb;
  1980. }
  1981. .confirmImg .upload .pictrue:nth-of-type(4n) {
  1982. margin-right: 0;
  1983. }
  1984. .confirmImg .upload .pictrue image {
  1985. width: 100%;
  1986. height: 100%;
  1987. border-radius: 8rpx;
  1988. }
  1989. .confirmImg .upload .pictrue .icon-guanbi1 {
  1990. position: absolute;
  1991. font-size: 45rpx;
  1992. top: -10rpx;
  1993. right: -10rpx;
  1994. }
  1995. .confirmImg .upload .pictrue .close {
  1996. position: absolute;
  1997. width: 26rpx;
  1998. height: 26rpx;
  1999. border-radius: 0 8rpx 0 8rpx;
  2000. background-color: rgba(0, 0, 0, 0.6);
  2001. top: 0;
  2002. right: 0;
  2003. }
  2004. .confirmImg .upload .pictrue .close .iconfont {
  2005. font-size: 24rpx;
  2006. }
  2007. .confirmImg .upload .pictrue .icon-icon25201 {
  2008. color: #bfbfbf;
  2009. font-size: 50rpx;
  2010. }
  2011. .confirmImg .upload .pictrue:nth-last-child(1) {
  2012. border: 1rpx solid #ddd;
  2013. box-sizing: border-box;
  2014. }
  2015. .alipaysubmit {
  2016. display: none;
  2017. }
  2018. .order-submission .line {
  2019. width: 100%;
  2020. height: 4rpx;
  2021. }
  2022. .order-submission .line image {
  2023. width: 100%;
  2024. height: 100%;
  2025. display: block;
  2026. }
  2027. .order-submission .headerCon {
  2028. background-color: #fff;
  2029. box-sizing: border-box;
  2030. .icon-s-bianji {
  2031. width: 44rpx;
  2032. height: 44rpx;
  2033. background: #F5F5F5;
  2034. border-radius: 50%;
  2035. text-align: center;
  2036. line-height: 44rpx;
  2037. font-size: 17rpx;
  2038. color: #666;
  2039. }
  2040. .add-title {
  2041. height: 72rpx;
  2042. padding: 0 26rpx;
  2043. border-bottom: 1px solid #eee;
  2044. .icon {
  2045. height: 32rpx;
  2046. background: #1890FF;
  2047. border-radius: 4rpx;
  2048. font-size: 20rpx;
  2049. font-weight: 400;
  2050. color: #FFFFFF;
  2051. text-align: center;
  2052. line-height: 32rpx;
  2053. padding: 0 6rpx;
  2054. &.orange {
  2055. background: #FE960F;
  2056. }
  2057. &.red {
  2058. background: #E93323;
  2059. }
  2060. }
  2061. .add-text {
  2062. margin-left: 14rpx;
  2063. width: 360rpx;
  2064. }
  2065. .text {
  2066. font-size: 24rpx;
  2067. font-weight: 400;
  2068. color: #999999;
  2069. .icon-jiantou {
  2070. display: inline-block;
  2071. font-size: 20rpx;
  2072. }
  2073. }
  2074. }
  2075. }
  2076. .order-submission .address {
  2077. padding: 0 26rpx;
  2078. height: 130rpx;
  2079. .icon {
  2080. .iconfont {
  2081. width: 44rpx;
  2082. height: 44rpx;
  2083. background: var(--view-minorColorT);
  2084. font-size: 20rpx;
  2085. border-radius: 50%;
  2086. text-align: center;
  2087. line-height: 44rpx;
  2088. color: var(--view-theme);
  2089. margin-left: 26rpx;
  2090. }
  2091. }
  2092. }
  2093. .order-submission .address .addressCon {
  2094. width: 502rpx;
  2095. font-size: 26rpx;
  2096. color: #666;
  2097. }
  2098. .order-submission .address .addressCon .name {
  2099. font-size: 30rpx;
  2100. color: #282828;
  2101. font-weight: bold;
  2102. margin-bottom: 10rpx;
  2103. .nameCon {
  2104. max-width: 244rpx;
  2105. &.on {
  2106. max-width: unset;
  2107. }
  2108. }
  2109. }
  2110. .order-submission .address .addressCon .name .phone {
  2111. margin-left: 50rpx;
  2112. }
  2113. .order-submission .address .addressCon .default {
  2114. margin-right: 12rpx;
  2115. }
  2116. .order-submission .address .addressCon .setaddress {
  2117. color: #333;
  2118. font-size: 28rpx;
  2119. }
  2120. .order-submission .allAddress {
  2121. width: 100%;
  2122. background: linear-gradient(to bottom, var(--view-theme) 0%, #f5f5f5 100%);
  2123. display: flex;
  2124. flex-direction: column;
  2125. justify-content: center;
  2126. align-items: center;
  2127. padding-top: 24rpx;
  2128. }
  2129. .order-submission .allAddress .nav {
  2130. width: 710rpx;
  2131. // margin: 0 auto;
  2132. }
  2133. .order-submission .allAddress .nav .item {
  2134. width: 355rpx;
  2135. }
  2136. .order-submission .allAddress .nav .item.on {
  2137. position: relative;
  2138. width: 250rpx;
  2139. }
  2140. .order-submission .allAddress .nav .item.on::before {
  2141. position: absolute;
  2142. bottom: 0;
  2143. content: "快递配送";
  2144. font-size: 28rpx;
  2145. display: block;
  2146. height: 0;
  2147. width: 336rpx;
  2148. border-width: 0 20rpx 80rpx 0;
  2149. border-style: none solid solid;
  2150. border-color: transparent transparent #fff;
  2151. z-index: 2;
  2152. border-radius: 7rpx 30rpx 0 0;
  2153. text-align: center;
  2154. // line-height: 80rpx;
  2155. }
  2156. .header-title {
  2157. font-size: 36rpx;
  2158. font-weight: 600;
  2159. color: #FFFFFF;
  2160. }
  2161. .order-submission .allAddress .nav .item:nth-of-type(2).on::before {
  2162. content: "到店自提";
  2163. border-width: 0 0 80rpx 20rpx;
  2164. border-radius: 30rpx 7rpx 0 0;
  2165. }
  2166. .order-submission .allAddress .nav .item.on2 {
  2167. position: relative;
  2168. }
  2169. .order-submission .allAddress .nav .item.on2::before {
  2170. position: absolute;
  2171. bottom: 0;
  2172. content: "到店自提";
  2173. font-size: 28rpx;
  2174. display: block;
  2175. height: 0;
  2176. width: 400rpx;
  2177. border-width: 0 0 60rpx 60rpx;
  2178. border-style: none solid solid;
  2179. border-color: transparent transparent rgba(255, 255, 255, 0.6);
  2180. border-radius: 40rpx 6rpx 0 0;
  2181. text-align: center;
  2182. // line-height: 60rpx;
  2183. }
  2184. .order-submission .allAddress .nav .item:nth-of-type(1).on2::before {
  2185. content: "快递配送";
  2186. border-width: 0 60rpx 60rpx 0;
  2187. border-radius: 6rpx 40rpx 0 0;
  2188. }
  2189. .order-submission .allAddress .headerCon {
  2190. width: 710rpx;
  2191. margin: 0 auto;
  2192. border-radius: 14rpx;
  2193. background-color: #fff;
  2194. }
  2195. .order-submission .allAddress .line {
  2196. width: 710rpx;
  2197. margin: 0 auto;
  2198. }
  2199. .order-submission .wrapper .item .discount .placeholder {
  2200. color: #ccc;
  2201. }
  2202. .placeholder-textarea {
  2203. position: relative;
  2204. .placeholder {
  2205. position: absolute;
  2206. color: #ccc;
  2207. top: 26rpx;
  2208. left: 30rpx;
  2209. }
  2210. }
  2211. .order-submission .wrapper {
  2212. background-color: #fff;
  2213. width: 710rpx;
  2214. border-radius: 14rpx;
  2215. margin: 0 auto;
  2216. margin-top: 14rpx;
  2217. }
  2218. .order-submission .wrapper .item .name {
  2219. position: relative;
  2220. width: 190rpx;
  2221. }
  2222. .order-submission .wrapper .item .asterisk {
  2223. position: absolute;
  2224. color: red;
  2225. left: -15rpx
  2226. }
  2227. .order-submission .wrapper .item {
  2228. padding: 27rpx 30rpx;
  2229. font-size: 30rpx;
  2230. color: #282828;
  2231. border-bottom: 1px solid #f0f0f0;
  2232. }
  2233. .order-submission .wrapper .item.on {
  2234. padding: 17rpx 14rpx 17rpx 30rpx;
  2235. align-items: baseline;
  2236. }
  2237. .order-submission .wrapper .item.on3 {
  2238. align-items: baseline;
  2239. }
  2240. .order-submission .wrapper .item.on2 {
  2241. padding: 17rpx 30rpx;
  2242. }
  2243. .order-submission .wrapper .item .discount {
  2244. font-size: 30rpx;
  2245. color: #999;
  2246. }
  2247. .order-submission .wrapper .item.on .discount,
  2248. .order-submission .wrapper .item.on3 .discount {
  2249. width: 460rpx;
  2250. text-align: right;
  2251. }
  2252. .order-submission .wrapper .item.on3 .discount .city {
  2253. width: 400rpx;
  2254. }
  2255. .order-submission .wrapper .item .discount input {
  2256. text-align: right;
  2257. width: 450rpx;
  2258. }
  2259. .order-submission .wrapper .item .discount .iconfont {
  2260. color: #515151;
  2261. font-size: 30rpx;
  2262. margin-left: 15rpx;
  2263. }
  2264. .order-submission .wrapper .item .discount .num {
  2265. font-size: 32rpx;
  2266. margin-right: 20rpx;
  2267. }
  2268. .order-submission .wrapper .item .discount .radio {
  2269. margin: 0 22rpx 0 22rpx;
  2270. padding: 10rpx 0;
  2271. }
  2272. .order-submission .wrapper .item .discount .radio /deep/uni-checkbox .uni-checkbox-input {
  2273. border-radius: 0
  2274. }
  2275. .order-submission .wrapper .item .shipping {
  2276. font-size: 30rpx;
  2277. color: #999;
  2278. position: relative;
  2279. padding-right: 58rpx;
  2280. }
  2281. .order-submission .wrapper .item .shipping .iconfont {
  2282. font-size: 35rpx;
  2283. color: #707070;
  2284. position: absolute;
  2285. right: 0;
  2286. top: 50%;
  2287. transform: translateY(-50%);
  2288. margin-left: 30rpx;
  2289. }
  2290. .order-submission .wrapper .item textarea {
  2291. background-color: #f9f9f9;
  2292. width: 650rpx;
  2293. height: 140rpx;
  2294. border-radius: 3rpx;
  2295. margin-top: 30rpx;
  2296. padding: 25rpx 28rpx;
  2297. box-sizing: border-box;
  2298. }
  2299. .order-submission .wrapper .item .placeholder {
  2300. color: #ccc;
  2301. }
  2302. .order-submission .wrapper .item .list {
  2303. margin-top: 35rpx;
  2304. }
  2305. .order-submission .wrapper .item .list .payItem {
  2306. border: 1px solid #eee;
  2307. border-radius: 6rpx;
  2308. height: 86rpx;
  2309. width: 100%;
  2310. box-sizing: border-box;
  2311. margin-top: 20rpx;
  2312. font-size: 28rpx;
  2313. color: #282828;
  2314. }
  2315. .order-submission .wrapper .item .list .payItem.on {
  2316. border-color: #fc5445;
  2317. color: #e93323;
  2318. }
  2319. .order-submission .wrapper .item .list .payItem .name {
  2320. width: 50%;
  2321. text-align: center;
  2322. border-right: 1px solid #eee;
  2323. padding-left: 80rpx;
  2324. }
  2325. .order-submission .wrapper .item .list .payItem .name .iconfont {
  2326. width: 44rpx;
  2327. height: 44rpx;
  2328. border-radius: 50%;
  2329. text-align: center;
  2330. line-height: 44rpx;
  2331. background-color: #fe960f;
  2332. color: #fff;
  2333. font-size: 30rpx;
  2334. margin-right: 15rpx;
  2335. }
  2336. .order-submission .wrapper .item .list .payItem .name .iconfont.icon-weixin2 {
  2337. background-color: #41b035;
  2338. }
  2339. .order-submission .wrapper .item .list .payItem .name .iconfont.icon-zhifubao {
  2340. background-color: #1677FF;
  2341. }
  2342. .order-submission .wrapper .item .list .payItem .tip {
  2343. width: 49%;
  2344. text-align: center;
  2345. font-size: 26rpx;
  2346. color: #aaa;
  2347. }
  2348. .order-submission .moneyList {
  2349. background-color: #fff;
  2350. padding: 30rpx;
  2351. width: 710rpx;
  2352. border-radius: 14rpx;
  2353. margin: 0 auto;
  2354. margin-top: 14rpx;
  2355. }
  2356. .order-submission .moneyList .item {
  2357. font-size: 28rpx;
  2358. color: #282828;
  2359. }
  2360. .order-submission .moneyList .item~.item {
  2361. margin-top: 20rpx;
  2362. }
  2363. .order-submission .moneyList .item .money {
  2364. color: #868686;
  2365. }
  2366. .order-submission .footer {
  2367. width: 100%;
  2368. height: 100rpx;
  2369. background-color: #fff;
  2370. padding: 0 30rpx;
  2371. font-size: 28rpx;
  2372. color: #333;
  2373. box-sizing: border-box;
  2374. position: fixed;
  2375. bottom: 0;
  2376. left: 0;
  2377. z-index: 9;
  2378. height: calc(100rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  2379. height: calc(100rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  2380. padding-bottom: calc(0rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  2381. padding-bottom: calc(0rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  2382. }
  2383. .order-submission .footer .settlement {
  2384. font-size: 30rpx;
  2385. color: #fff;
  2386. width: 240rpx;
  2387. height: 70rpx;
  2388. background-color: var(--view-theme);
  2389. border-radius: 50rpx;
  2390. text-align: center;
  2391. line-height: 70rpx;
  2392. }
  2393. .footer .transparent {
  2394. opacity: 0
  2395. }
  2396. .tipaddress {
  2397. position: fixed;
  2398. left: 13%;
  2399. top: 25%;
  2400. // margin-left: -283rpx;
  2401. width: 560rpx;
  2402. height: 614rpx;
  2403. background-color: #fff;
  2404. border-radius: 10rpx;
  2405. z-index: 100;
  2406. text-align: center;
  2407. .top {
  2408. width: 560rpx;
  2409. height: 270rpx;
  2410. border-top-left-radius: 10rpx;
  2411. border-top-right-radius: 10rpx;
  2412. background-image: url(../../../static/images/address.png);
  2413. background-repeat: round;
  2414. background-color: var(--view-theme);
  2415. .tipsphoto {
  2416. display: inline-block;
  2417. width: 200rpx;
  2418. height: 200rpx;
  2419. margin-top: 73rpx;
  2420. }
  2421. }
  2422. .bottom {
  2423. font-size: 32rpx;
  2424. font-weight: 400;
  2425. .font1 {
  2426. font-size: 36rpx;
  2427. font-weight: 600;
  2428. color: #333333;
  2429. margin: 32rpx 0rpx 22rpx;
  2430. }
  2431. .font2 {
  2432. color: #666666;
  2433. margin-bottom: 48rpx;
  2434. }
  2435. .btn {
  2436. width: 360rpx;
  2437. height: 82rpx;
  2438. border-radius: 42rpx;
  2439. background: linear-gradient(to left, var(--view-theme) 0%, #f5f5f5 100%);
  2440. color: #FFFFFF;
  2441. line-height: 82rpx;
  2442. margin: 0 auto;
  2443. }
  2444. }
  2445. }
  2446. .mark {
  2447. position: fixed;
  2448. top: 0;
  2449. left: 0;
  2450. bottom: 0;
  2451. right: 0;
  2452. background: rgba(0, 0, 0, 0.5);
  2453. z-index: 99;
  2454. }
  2455. .table-header {
  2456. width: 710rpx;
  2457. padding: 52rpx 24rpx 46rpx;
  2458. border-radius: 14rpx;
  2459. margin: 0 30rpx;
  2460. background-color: #FFFFFF;
  2461. font-size: 24rpx;
  2462. color: #999999;
  2463. .top {
  2464. display: flex;
  2465. margin-bottom: 18rpx;
  2466. }
  2467. .name {
  2468. flex: 1;
  2469. min-width: 0;
  2470. font-weight: 600;
  2471. font-size: 34rpx;
  2472. color: #333333;
  2473. }
  2474. .number {
  2475. color: #333333;
  2476. }
  2477. .light {
  2478. margin-right: 6rpx;
  2479. font-weight: 600;
  2480. font-size: 34rpx;
  2481. color: var(--view-theme);
  2482. }
  2483. }
  2484. //指派
  2485. .zp-wrap {
  2486. margin-top: 20rpx;
  2487. width: 750rpx;
  2488. height: 216rpx;
  2489. white-space: nowrap;
  2490. .zp-item {
  2491. display: inline-block;
  2492. margin-right: 15rpx;
  2493. padding-top: 34rpx;
  2494. width: 172rpx;
  2495. height: 216rpx;
  2496. // background: #E02020;
  2497. background-color: #fff;
  2498. border-radius: 10rpx;
  2499. .zp-logo {
  2500. display: block;
  2501. width: 106rpx;
  2502. height: 106rpx;
  2503. margin: auto;
  2504. border-radius: 50%;
  2505. background-color: #eee;
  2506. }
  2507. .zp-name {
  2508. margin-top: 15rpx;
  2509. width: 100%;
  2510. text-align: center;
  2511. font-size: 30rpx;
  2512. font-weight: bold;
  2513. color: #333333;
  2514. }
  2515. }
  2516. .choose {
  2517. background-color: #262261 !important;
  2518. .zp-name {
  2519. color: #fff !important;
  2520. }
  2521. }
  2522. }
  2523. //指派
  2524. .zp-wrap {
  2525. margin-top: 20rpx;
  2526. width: 650rpx;
  2527. height: 216rpx;
  2528. white-space: nowrap;
  2529. .zp-item {
  2530. display: inline-block;
  2531. margin-right: 15rpx;
  2532. padding-top: 34rpx;
  2533. width: 172rpx;
  2534. height: 216rpx;
  2535. // background: #E02020;
  2536. background-color: #fff;
  2537. border-radius: 10rpx;
  2538. .zp-logo {
  2539. display: block;
  2540. width: 106rpx;
  2541. height: 106rpx;
  2542. margin: auto;
  2543. border-radius: 50%;
  2544. background-color: #eee;
  2545. }
  2546. .zp-name {
  2547. margin-top: 15rpx;
  2548. width: 100%;
  2549. text-align: center;
  2550. font-size: 30rpx;
  2551. font-weight: bold;
  2552. color: #333333;
  2553. }
  2554. }
  2555. .choose {
  2556. background-color: #262261 !important;
  2557. .zp-name {
  2558. color: #fff !important;
  2559. }
  2560. }
  2561. }
  2562. </style>