index.vue 75 KB

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