index.vue 72 KB

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