index.vue 76 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715
  1. <template>
  2. <view :style="colorStyle">
  3. <view class='order-submission'>
  4. <view class="headerCon" v-if="ptype == 6">
  5. <view class="add-title acea-row row-between-wrapper">
  6. <view class="acea-row row-middle">
  7. <view class="icon ">
  8. 门店选择</view>
  9. <view class="text add-text line1">线上下单</view>
  10. <view class="text add-text line1" v-if="deliveryType==3">{{system_store.name || '请选择门店'}}
  11. </view>
  12. </view>
  13. <view class="text" @tap='onDelivery'>
  14. 点击切换 <text class='iconfont icon-jiantou'></text></view>
  15. </view>
  16. <view class="address acea-row row-between-wrapper">
  17. <view class="addressCon" v-if="storeList.length>0">
  18. <view class='name acea-row row-middle'>
  19. <view class="nameCon line1 on">{{system_store.name || ''}}</view>
  20. </view>
  21. <view class="line1">
  22. {{system_store.address || ''}}{{system_store.detailed_address || ''}}
  23. </view>
  24. </view>
  25. <view class='addressCon' v-else>
  26. <view class='setaddress'>暂无门店信息</view>
  27. </view>
  28. <view class="icon acea-row row-middle" v-if="storeList.length>0">
  29. <view class="iconfont icon-dianhua" @click.stop="call(system_store.phone)"></view>
  30. <view class="iconfont icon-dingwei2" @click.stop="showMaoLocation(system_store)"></view>
  31. </view>
  32. </view>
  33. </view>
  34. <view class="allAddress" v-if="product_type == 0">
  35. <!-- #ifdef MP -->
  36. <!-- 桌码信息 -->
  37. <view v-if="tableId" class="table-header">
  38. <view class="top">
  39. <view class="name">{{ codeData.storeName.storeName }}</view>
  40. <view class="number"><text
  41. class="light">{{ codeData.category.name }}{{ codeData.table_number }}</text>号桌</view>
  42. </view>
  43. <view>{{ codeData.serial_number }}</view>
  44. </view>
  45. <!-- #endif -->
  46. <!-- 地址 -->
  47. <view v-if="!tableId" class='headerCon'>
  48. <view class="add-title acea-row row-between-wrapper">
  49. <view class="acea-row row-middle">
  50. <view class="icon" :class="deliveryType==1?'':deliveryType==3?'orange':'red'">
  51. {{deliveryType==1?'商城配送':deliveryType==2?'门店自提':'门店配送'}}
  52. </view>
  53. <view class="text add-text line1" v-if="deliveryType==1">由平台为您提供配送服务</view>
  54. <view class="text add-text line1" v-if="deliveryType==2">线上下单,到店自提</view>
  55. <view class="text add-text line1" v-if="deliveryType==3">{{system_store.name || '请选择门店'}}
  56. </view>
  57. </view>
  58. <view class="text" @tap='onDelivery'
  59. v-if="(isDisplay.length >1 || (isDisplay.length==1 && deliveryType !=1)) && store_func_status && goodsType != 9">
  60. 点击切换 <text class='iconfont icon-jiantou'></text></view>
  61. </view>
  62. <view class="address acea-row row-between-wrapper" @tap="onAddress(addressInfo.real_name)"
  63. v-if="deliveryType==1 || deliveryType==3">
  64. <view class="addressCon" v-if="addressInfo.real_name">
  65. <view class='name acea-row row-middle'>
  66. <view class="nameCon line1">{{addressInfo.real_name}}</view><text
  67. class='phone'>{{addressInfo.phone}}</text>
  68. </view>
  69. <view class="line1">
  70. <text class='default font-num'
  71. v-if="addressInfo.is_default">[默认]</text>{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.district}}{{addressInfo.street}}{{addressInfo.detail}}
  72. </view>
  73. </view>
  74. <view class='addressCon' v-else>
  75. <view class='setaddress'>设置收货地址</view>
  76. </view>
  77. <view class="iconfont icon-s-bianji"></view>
  78. </view>
  79. <view class="address acea-row row-between-wrapper" v-else>
  80. <view class="addressCon" v-if="storeList.length>0">
  81. <view class='name acea-row row-middle'>
  82. <view class="nameCon line1 on">{{system_store.name || ''}}</view>
  83. </view>
  84. <view class="line1">
  85. {{system_store.address || ''}}{{system_store.detailed_address || ''}}
  86. </view>
  87. </view>
  88. <view class='addressCon' v-else>
  89. <view class='setaddress'>暂无门店信息</view>
  90. </view>
  91. <view class="icon acea-row row-middle" v-if="storeList.length>0">
  92. <view class="iconfont icon-dianhua" @click.stop="call(system_store.phone)"></view>
  93. <view class="iconfont icon-dingwei2" @click.stop="showMaoLocation(system_store)"></view>
  94. </view>
  95. </view>
  96. </view>
  97. <view v-if="!tableId" class='line'>
  98. <image src='/static/images/line.jpg'></image>
  99. </view>
  100. </view>
  101. <view class="wrapper">
  102. <group-goods-list v-if="collage_id" :goods-list="goodsList"></group-goods-list>
  103. <orderGoods v-else :cartInfo="cartInfo" :giveData="giveData" :shippingType="shippingType"
  104. :product_type='product_type' :giveCartInfo="giveCartInfo"></orderGoods>
  105. </view>
  106. <!-- <view class='moneyList' v-if="ptype == 5">
  107. <view class="item acea-row row-between-wrapper" >
  108. <view>销售员工</view>
  109. </view>
  110. <scroll-view scroll-x="true" class="zp-wrap" @scrolltolower="">
  111. <view class="zp-item" v-for="ygitem in saleyg.list" @click="choosYg(ygitem)"
  112. :class="{'choose': ygitem.id == sale_yg.id}">
  113. <image :src="ygitem.avatar || '../../../static/images/avt.png'" mode="" class="zp-logo"></image>
  114. <view class="zp-name">{{ygitem.alias}}</view>
  115. </view>
  116. </scroll-view>
  117. </view> -->
  118. <view class='wrapper'>
  119. <view class="item acea-row row-between-wrapper" v-if="ptype == 6">
  120. <view>预约时间</view>
  121. <view class='discount' @click="openDatetimePicker">
  122. {{yytime || '请选择预约时间'}}
  123. <text class='iconfont icon-jiantou'></text>
  124. </view>
  125. </view>
  126. <view class='item acea-row row-between-wrapper' @tap='couponTap'
  127. v-if="!pinkId && !BargainId && !combinationId && !seckillId&& !noCoupon && !discountId && goodsType != 7 && priceGroup.firstOrderPrice==0&&ptype != 5">
  128. <view>优惠券</view>
  129. <view class='discount'>{{couponTitle}}
  130. <text class='iconfont icon-jiantou'></text>
  131. </view>
  132. </view>
  133. <view class='item acea-row row-between-wrapper'
  134. v-if="!pinkId && !BargainId && !combinationId && !seckillId && integral_ratio_status == 1">
  135. <view>积分抵扣</view>
  136. <view class='discount acea-row row-middle'>
  137. <view> {{useIntegral ? "剩余积分":"当前积分"}}
  138. <text class='num font-color'>{{integral || 0}}</text>
  139. </view>
  140. <checkbox-group @change="ChangeIntegral">
  141. <checkbox :disabled="integral<=0 && !useIntegral" :checked='useIntegral ? true : false' />
  142. </checkbox-group>
  143. </view>
  144. </view>
  145. <view v-if="invoice_func || special_invoice" class='item acea-row row-between-wrapper' @tap="goInvoice">
  146. <view>开具发票</view>
  147. <view class='discount'>
  148. {{invTitle}}
  149. <text class='iconfont icon-jiantou'></text>
  150. </view>
  151. </view>
  152. <!-- <view class='item acea-row row-between-wrapper' v-if="priceGroup.vipPrice > 0 && userInfo.vip && !pinkId && !BargainId && !combinationId && !seckillId">
  153. <view>会员优惠</view>
  154. <view class='discount'>-¥{{priceGroup.vipPrice}}</view>
  155. </view>
  156. <view class='item acea-row row-between-wrapper' v-if='shippingType==0'>
  157. <view>快递费用</view>
  158. <view class='discount' v-if='priceGroup.storePostage > 0'>+¥{{priceGroup.storePostage}}</view>
  159. <view class='discount' v-else>免运费</view>
  160. </view> -->
  161. <view v-if="shippingType == 1">
  162. <view class="item acea-row row-between-wrapper">
  163. <view>联系人</view>
  164. <view class="discount">
  165. <input v-model="contacts" type="text" placeholder="请填写您的联系姓名"
  166. placeholder-class="placeholder"></input>
  167. </view>
  168. </view>
  169. <view class="item acea-row row-between-wrapper">
  170. <view>联系电话</view>
  171. <view class="discount">
  172. <input type="number" maxlength="11" v-model="contactsTel" placeholder="请填写您的联系电话"
  173. placeholder-class="placeholder"></input>
  174. </view>
  175. </view>
  176. </view>
  177. <!-- <view class='item acea-row row-between-wrapper' wx:else>
  178. <view>自提门店</view>
  179. <view class='discount'>{{system_store.name}}</view>
  180. </view> -->
  181. <view class='item' v-if="textareaStatus">
  182. <view>备注信息</view>
  183. <!-- <view class="placeholder-textarea"> -->
  184. <textarea placeholder-class='placeholder' placeholder="请添加备注(150字以内)" :always-embed="true"
  185. :adjust-position="true" cursor-spacing="30" v-if="!coupon.coupon" @input='bindHideKeyboard'
  186. :value="mark" :maxlength="150" name="mark">
  187. </textarea>
  188. <!-- <view class="placeholder" @click="clickTextArea" v-show="!mark">
  189. 请添加备注(150字以内)
  190. </view> -->
  191. <!-- </view> -->
  192. </view>
  193. </view>
  194. <view class='wrapper' v-if="confirm.length">
  195. <view class='item acea-row row-between-wrapper'
  196. :class="{on:(item.name=='radios' || item.name=='checkboxs'),on2:item.name == 'dateranges',on3:item.name == 'citys'}"
  197. v-for="(item,index) in confirm" :key="index">
  198. <view class="name">
  199. <span class="asterisk" v-if="item.titleShow.val">*</span>
  200. {{ item.titleConfig.value }}
  201. </view>
  202. <!-- radio -->
  203. <view v-if="item.name=='radios'" class="discount">
  204. <radio-group @change="radioChange(e, index, item)" class="acea-row row-middle row-right">
  205. <label class="radio" v-for="(j,jindex) in item.wordsConfig.list" :key="jindex">
  206. <view class="acea-row row-middle">
  207. <!-- #ifndef MP -->
  208. <radio :value="jindex.toString()" :checked='j.show' />
  209. <!-- #endif -->
  210. <!-- #ifdef MP -->
  211. <radio :value="jindex" :checked='j.show' />
  212. <!-- #endif -->
  213. <view>{{j.val}}</view>
  214. </view>
  215. </label>
  216. </radio-group>
  217. </view>
  218. <!-- checkbox -->
  219. <view v-if="item.name=='checkboxs'" class="discount">
  220. <checkbox-group @change="checkboxChange($event, index, item)"
  221. class="acea-row row-middle row-right">
  222. <label class="radio" v-for="(j,jindex) in item.wordsConfig.list" :key="jindex">
  223. <view class="acea-row row-middle">
  224. <!-- #ifndef MP -->
  225. <checkbox :value="jindex.toString()" :checked="j.show"
  226. style="transform:scale(0.9)" />
  227. <!-- #endif -->
  228. <!-- #ifdef MP -->
  229. <checkbox :value="jindex" :checked="j.show" style="transform:scale(0.9)" />
  230. <!-- #endif -->
  231. <view>{{j.val}}</view>
  232. </view>
  233. </label>
  234. </checkbox-group>
  235. </view>
  236. <!-- text -->
  237. <view v-if="item.name=='texts' && item.valConfig.tabVal == 0" class="discount">
  238. <input type="text" :placeholder="item.tipConfig.value" placeholder-class="placeholder"
  239. v-model="item.value" />
  240. </view>
  241. <!-- number -->
  242. <view v-if="item.name=='texts' && item.valConfig.tabVal == 4" class="discount">
  243. <input type="number" :placeholder="item.tipConfig.value" placeholder-class="placeholder"
  244. v-model="item.value" />
  245. </view>
  246. <!-- email -->
  247. <view v-if="item.name=='texts' && item.valConfig.tabVal == 3" class="discount">
  248. <input type="text" :placeholder="item.tipConfig.value" placeholder-class="placeholder"
  249. v-model="item.value" />
  250. </view>
  251. <!-- data -->
  252. <view v-if="item.name=='dates'" class="discount">
  253. <picker mode="date" :value="item.value" @change="bindDateChange($event,index)">
  254. <view class="acea-row row-between-wrapper">
  255. <view v-if="item.value == ''">{{item.tipConfig.value}}</view>
  256. <view v-else>{{item.value}}</view>
  257. <text class='iconfont icon-jiantou'></text>
  258. </view>
  259. </picker>
  260. </view>
  261. <!-- dateranges -->
  262. <view v-if="item.name=='dateranges'" class="discount">
  263. <uni-datetime-picker v-model="item.value" type="daterange" @maskClick="maskClick">
  264. {{item.value.length?item.value[0]+' - '+item.value[1]:item.tipConfig.value}}
  265. <text class='iconfont icon-jiantou'></text>
  266. </uni-datetime-picker>
  267. </view>
  268. <!-- time -->
  269. <view v-if="item.name=='times'" class="discount">
  270. <picker mode="time" :value="item.value" @change="bindTimeChange($event,index)"
  271. :placeholder="item.tipConfig.value">
  272. <view class="acea-row row-between-wrapper">
  273. <view v-if="item.value == ''">{{item.tipConfig.value}}</view>
  274. <view v-else>{{item.value}}</view>
  275. <text class='iconfont icon-jiantou'></text>
  276. </view>
  277. </picker>
  278. </view>
  279. <!-- timeranges -->
  280. <view v-if="item.name=='timeranges'" class="discount acea-row row-between-wrapper"
  281. @click="getTimeranges(index)">
  282. <view v-if="item.value">{{item.value}}</view>
  283. <view v-else>{{item.tipConfig.value}}</view>
  284. <text class='iconfont icon-jiantou'></text>
  285. </view>
  286. <!-- select -->
  287. <view v-if="item.name=='selects'" class="discount">
  288. <picker :value="item.value" :range="item.wordsConfig.list"
  289. @change="bindSelectChange($event,index,item)" range-key="val">
  290. <view class="acea-row row-between-wrapper">
  291. <view v-if="item.value == ''">请选择</view>
  292. <view v-else>{{item.value}}</view>
  293. <text class='iconfont icon-jiantou'></text>
  294. </view>
  295. </picker>
  296. </view>
  297. <!-- city -->
  298. <view v-if="item.name=='citys'" class="discount" @click="changeRegion(index)">
  299. <view class="acea-row row-middle row-right">
  300. <view class="city" v-if="item.value == ''">{{item.tipConfig.value}}</view>
  301. <view class="city" v-else>{{item.value}}</view>
  302. <text class='iconfont icon-jiantou'></text>
  303. </view>
  304. </view>
  305. <!-- id -->
  306. <view v-if="item.name=='texts' && item.valConfig.tabVal == 2" class="discount">
  307. <input type="idcard" :placeholder="item.tipConfig.value" placeholder-class="placeholder"
  308. v-model="item.value" />
  309. </view>
  310. <!-- phone -->
  311. <view v-if="item.name=='texts' && item.valConfig.tabVal == 1" class="discount">
  312. <input type="number" :placeholder="item.tipConfig.value" placeholder-class="placeholder"
  313. v-model="item.value" />
  314. </view>
  315. <!-- img -->
  316. <view v-if="item.name=='uploadPicture'" class="confirmImg">
  317. <view class='upload acea-row row-middle'>
  318. <view class='pictrue' v-for="(items,indexs) in item.value" :key="indexs">
  319. <image :src='items' mode="aspectFill"></image>
  320. <!-- <view class='iconfont icon-guanbi1 font-num' @tap='DelPic(index,indexs)'></view> -->
  321. <view class="close acea-row row-center-wrapper" @tap='DelPic(index,indexs)'>
  322. <view class="iconfont icon-guanbi5"></view>
  323. </view>
  324. </view>
  325. <view class='pictrue acea-row row-center-wrapper row-column' @tap='uploadpic(index)'
  326. v-if="item.value.length < item.numConfig.val">
  327. <text class='iconfont icon-icon25201'></text>
  328. <view>上传图片</view>
  329. </view>
  330. </view>
  331. </view>
  332. </view>
  333. </view>
  334. <view class='moneyList'>
  335. <view class='item acea-row row-between-wrapper'>
  336. <view>商品总价:</view>
  337. <!-- {{(parseFloat(priceGroup.totalPrice)+parseFloat(priceGroup.vipPrice)).toFixed(2)}} -->
  338. <view class='money'>
  339. ¥{{priceGroup.sumPrice}}
  340. </view>
  341. </view>
  342. <view class='item acea-row row-between-wrapper' v-if="priceGroup.storePostage > 0">
  343. <view>配送运费:</view>
  344. <view class='money'>
  345. ¥{{(parseFloat(priceGroup.storePostage)+parseFloat(priceGroup.storePostageDiscount)).toFixed(2)}}
  346. </view>
  347. </view>
  348. <view class='item acea-row row-between-wrapper'
  349. v-if="priceGroup.vipPrice > 0 && userInfo.vip && !pinkId && !BargainId && !combinationId && !seckillId && !discountId">
  350. <view>会员商品优惠:</view>
  351. <view class='money'>-¥{{parseFloat(priceGroup.vipPrice).toFixed(2)}}</view>
  352. </view>
  353. <view class='item acea-row row-between-wrapper' v-if="priceGroup.storePostageDiscount > 0">
  354. <view>会员运费优惠:</view>
  355. <view class='money'>-¥{{parseFloat(priceGroup.storePostageDiscount).toFixed(2)}}</view>
  356. </view>
  357. <view class='item acea-row row-between-wrapper' v-if="coupon_price > 0">
  358. <view>优惠券抵扣:</view>
  359. <view class='money'>-¥{{parseFloat(coupon_price).toFixed(2)}}</view>
  360. </view>
  361. <view class='item acea-row row-between-wrapper' v-if="parseFloat(priceGroup.firstOrderPrice) > 0">
  362. <view>新人首单优惠:</view>
  363. <view class='money'>-¥{{parseFloat(priceGroup.firstOrderPrice).toFixed(2)}}</view>
  364. </view>
  365. <view class='item acea-row row-between-wrapper' v-if="integral_price > 0">
  366. <view>积分抵扣:</view>
  367. <view class='money'>-¥{{parseFloat(integral_price).toFixed(2)}}</view>
  368. </view>
  369. <view class='item acea-row row-between' v-for="(item,index) in promotions_detail" :key="index"
  370. v-if="parseFloat(item.promotions_price)">
  371. <view>{{item.title}}:</view>
  372. <view class='money'>-¥{{parseFloat(item.promotions_price).toFixed(2)}}</view>
  373. </view>
  374. <!-- <view class='item acea-row row-between-wrapper' v-if="priceGroup.storePostage > 0">
  375. <view>运费:</view>
  376. <view class='money'>+¥{{priceGroup.storePostage}}</view>
  377. </view>
  378. <view class='item acea-row row-between-wrapper' v-if="priceGroup.storePostageDiscount > 0">
  379. <view>会员运费抵扣:</view>
  380. <view class='money'>-¥{{priceGroup.storePostageDiscount}}</view>
  381. </view> -->
  382. </view>
  383. <view class="height-add"></view>
  384. <view class='footer acea-row row-between-wrapper'>
  385. <view>合计:
  386. <text class='font-color'>¥{{totalPrice || 0}}</text>
  387. </view>
  388. <!-- <view class='settlement' style='z-index:100' @tap.stop="goPay"
  389. v-if="(((valid_count>0&&!discount_id) || (valid_count==cartInfo.length&&discount_id)) && shippingType) || (!shippingType && addressId) || product_type != 0">
  390. 立即结算</view>
  391. <view class='settlement bg-color-hui' style='z-index:100' v-else>立即结算</view> -->
  392. <view class='settlement' style='z-index:100' @tap.stop="goPay" v-if="
  393. (((valid_count>0&&!discount_id) || (valid_count==cartInfo.length&&discount_id))) ||
  394. (deliveryType == 2 && !shippingType) ||
  395. (deliveryType == 3 && shippingType) ||
  396. product_type != 0">
  397. 提交订单</view>
  398. <view class='settlement bg-color-hui' style='z-index:100' v-else>提交订单</view>
  399. </view>
  400. </view>
  401. <view class="alipaysubmit" v-html="formContent"></view>
  402. <view class="tipaddress" v-show="isaddress">
  403. <view class="top"></view>
  404. <view class="bottom">
  405. <div class="font1">更新地址</div>
  406. <div class="font2">当前地址功能已更新,请重新修改</div>
  407. <div class="btn" @tap="payAddress">前往修改</div>
  408. </view>
  409. </view>
  410. <view class="mark" v-show="isaddress"></view>
  411. <couponListWindow :coupon='coupon' @ChangCouponsClone="ChangCouponsClone" :openType='openType' :cartId='cartId'
  412. @ChangCoupons="ChangCoupons"></couponListWindow>
  413. <addressWindow ref="addressWindow" @changeTextareaStatus="changeTextareaStatus" :news='news' :address='address'
  414. :pagesUrl="pagesUrl" @OnChangeAddress="OnChangeAddress" @changeClose="changeClose">
  415. </addressWindow>
  416. <home v-show="!invShow && navigation"></home>
  417. <invoice-picker :inv-show="invShow" :inv-list="invList" :inv-checked="invChecked" :is-special="special_invoice"
  418. :url-query="urlQuery" @inv-close="invClose" @inv-change="invChange" @inv-cancel="invCancel">
  419. </invoice-picker>
  420. <payment :payMode="cartArr" :pay_close="pay_close" :isCall="true" :totalPrice="totalPrice.toString()"
  421. @changePayType="changePayType" @onChangeFun="onChangeFun"></payment>
  422. <deliveryMethod ref="deliveryMethod" :isDisplay="isDisplay" :storeList="storeList" :ptype="ptype"
  423. :storeSelfMention="store_self_mention" @deliveryFun="deliveryFun" @storeFun="storeFun"></deliveryMethod>
  424. <!-- #ifdef MP -->
  425. <!-- <authorize v-if="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize> -->
  426. <!-- #endif -->
  427. <timeranges :isShow='isShow' :time='timeranges' @confrim="confrim" @cancel="cancels"></timeranges>
  428. <areaWindow ref="areaWindow" :display="display" :address='addressInfoArea' :cityShow='cityShow'
  429. @submit="OnAreaAddress" @changeClose="changeAddressClose"></areaWindow>
  430. <buuug7-simple-datetime-picker ref="myPicker" @submit="handleSubmit" @err="datetimePickerErr" :start-year="start_year"
  431. :end-year="2030" :time-hide="[true, true, true, true, true, false]"
  432. :time-label="['年', '月', '日', '时', '分', '秒']" />
  433. </view>
  434. </template>
  435. <script>
  436. const CACHE_CITY = {};
  437. import dayjs from '@/plugin/dayjs/dayjs.min.js';
  438. import {
  439. orderConfirm,
  440. getCouponsOrderPrice,
  441. orderCreate,
  442. postOrderComputed,
  443. checkShipping
  444. } from '@/api/order.js';
  445. import {
  446. getAddressDefault,
  447. getAddressDetail,
  448. invoiceList,
  449. invoiceOrder
  450. } from '@/api/user.js';
  451. import {
  452. openPaySubscribe
  453. } from '@/utils/SubscribeMessage.js';
  454. import {
  455. storeListApi,
  456. getCollagePartake,
  457. getCodeData,
  458. getMen
  459. } from '@/api/store.js';
  460. import {
  461. CACHE_LONGITUDE,
  462. CACHE_LATITUDE
  463. } from '@/config/cache.js';
  464. import areaWindow from '@/components/areaWindow';
  465. import couponListWindow from '@/components/couponListWindow';
  466. import addressWindow from '@/components/addressWindow';
  467. import orderGoods from '@/components/orderGoods';
  468. import deliveryMethod from '../components/deliveryMethod/index.vue';
  469. import timeranges from '@/components/timeranges';
  470. import home from '@/components/home';
  471. import invoicePicker from '../components/invoicePicker';
  472. import groupGoodsList from '@/components/groupGoodsList/index.vue'
  473. import {
  474. toLogin
  475. } from '@/libs/login.js';
  476. import {
  477. mapGetters
  478. } from "vuex";
  479. import payment from '@/components/payment';
  480. import colors from "@/mixins/color";
  481. let newTime = new Date()
  482. export default {
  483. components: {
  484. payment,
  485. invoicePicker,
  486. couponListWindow,
  487. addressWindow,
  488. orderGoods,
  489. home,
  490. deliveryMethod,
  491. timeranges,
  492. areaWindow,
  493. groupGoodsList
  494. },
  495. mixins: [colors],
  496. data() {
  497. return {
  498. start_year: newTime.getFullYear(),
  499. addressInfoArea: [],
  500. cityShow: 2,
  501. display: false,
  502. timeranges: [],
  503. isShow: false,
  504. giveData: {
  505. give_integral: 0,
  506. give_coupon: []
  507. },
  508. giveCartInfo: [],
  509. confirm: [], //自定义留言
  510. id: 0,
  511. isaddress: false,
  512. textareaStatus: true,
  513. //支付方式
  514. cartArr: [{
  515. "name": "微信支付",
  516. "icon": "icon-weixin2",
  517. value: 'weixin',
  518. title: '使用微信快捷支付',
  519. payStatus: 1,
  520. },
  521. {
  522. "name": "支付宝支付",
  523. "icon": "icon-zhifubao",
  524. value: 'alipay',
  525. title: '使用线上支付宝支付',
  526. payStatus: 1,
  527. },
  528. {
  529. "name": "余额支付",
  530. "icon": "icon-yuezhifu",
  531. value: 'yue',
  532. title: '可用余额:',
  533. payStatus: 1,
  534. },
  535. {
  536. "name": "线下支付",
  537. "icon": "icon-yuezhifu1",
  538. value: 'offline',
  539. title: '选择线下付款方式',
  540. payStatus: 2,
  541. }
  542. ],
  543. formContent: '',
  544. payType: 'weixin', //支付方式
  545. openType: 1, //优惠券打开方式 1=使用
  546. active: 0, //支付方式切换
  547. coupon: {
  548. coupon: false,
  549. list: [],
  550. statusTile: '立即使用'
  551. }, //优惠券组件
  552. address: {
  553. address: false
  554. }, //地址组件
  555. addressInfo: {}, //地址信息
  556. pinkId: 0, //拼团id
  557. addressId: 0, //地址id
  558. couponId: 0, //优惠券id
  559. cartId: '', //购物车id
  560. BargainId: 0,
  561. combinationId: 0,
  562. seckillId: 0,
  563. discountId: 0,
  564. userInfo: {}, //用户信息
  565. mark: '', //备注信息
  566. couponTitle: '请选择', //优惠券
  567. coupon_price: 0, //优惠券抵扣金额
  568. promotions_detail: [], //优惠活动金额明细
  569. useIntegral: false, //是否使用积分
  570. integral_price: 0, //积分抵扣金额
  571. integral: 0,
  572. ChangePrice: 0, //使用积分抵扣变动后的金额
  573. formIds: [], //收集formid
  574. status: 0,
  575. is_address: false,
  576. toPay: false, //修复进入支付时页面隐藏从新刷新页面
  577. shippingType: 0,
  578. system_store: {},
  579. storePostage: 0,
  580. contacts: '',
  581. contactsTel: '',
  582. mydata: {},
  583. storeList: [],
  584. store_self_mention: 0, //是开启门店自提;
  585. store_func_status: false, //是否开启门店自提和门店配送;
  586. cartInfo: [],
  587. priceGroup: {},
  588. animated: false,
  589. totalPrice: 0,
  590. integralRatio: "0",
  591. pagesUrl: "",
  592. orderKey: "",
  593. // usableCoupon: {},
  594. offlinePostage: "",
  595. isAuto: false, //没有授权的不会自动授权
  596. isShowAuth: false, //是否隐藏授权
  597. from: '',
  598. news: 1,
  599. invTitle: '不开发票',
  600. special_invoice: false,
  601. invoice_func: false,
  602. integral_ratio_status: 1,
  603. header_type: '',
  604. invShow: false,
  605. invList: [],
  606. invChecked: '',
  607. urlQuery: '',
  608. pay_close: false,
  609. noCoupon: 0,
  610. valid_count: 0,
  611. discount_id: 0,
  612. storeId: 0,
  613. product_type: 1,
  614. newImg: [],
  615. isDisplay: [],
  616. deliveryType: 1,
  617. goodsType: 0,
  618. product_id: 0,
  619. selectIndex: 0,
  620. timerangesIndex: 0,
  621. collage_id: 0,
  622. goodsList: [],
  623. tableId: 0,
  624. codeData: {},
  625. ptype: 1,
  626. yytime: '',//预约时间
  627. saleyg: {
  628. list: [],
  629. },
  630. sale_yg: {},
  631. spid:'',
  632. };
  633. },
  634. computed: mapGetters(['isLogin']),
  635. onLoad: function(options) {
  636. this.ptype = options.product_type;
  637. if(options.spid){
  638. this.spid = options.spid;
  639. }
  640. if (this.ptype == 6) {
  641. this.getList()
  642. }
  643. this.getMen()
  644. // #ifdef H5
  645. this.from = this.$wechat.isWeixin() ? 'weixin' : 'weixinh5'
  646. // #endif
  647. // #ifdef MP
  648. this.from = 'routine'
  649. // #endif
  650. if (!options.cartId) return this.$util.Tips({
  651. title: '请选择要购买的商品'
  652. }, {
  653. tab: 3,
  654. url: 1
  655. });
  656. this.deliveryType = options.delivery_type || 1;
  657. if (this.deliveryType == 1 || this.deliveryType == 3) {
  658. this.addressId = options.addressId || 0;
  659. this.system_store.name = options.store_name;
  660. }
  661. if (this.deliveryType == 2 || this.deliveryType == 3) {
  662. this.storeId = options.store_id || 0;
  663. this.system_store.id = options.store_id || 0;
  664. }
  665. this.couponId = options.couponId || 0;
  666. this.noCoupon = options.noCoupon || 0;
  667. this.product_id = options.product_id || 0;
  668. this.pinkId = options.pinkId ? parseInt(options.pinkId) : 0;
  669. this.cartId = options.cartId;
  670. this.is_address = options.is_address ? true : false;
  671. this.news = !options.new || options.new === '0' ? 0 : 1;
  672. uni.setStorageSync('news', this.news);
  673. this.invChecked = options.invoice_id || '';
  674. this.header_type = options.header_type || '1';
  675. this.couponTitle = options.couponTitle || '请选择'
  676. switch (options.invoice_type) {
  677. case '1':
  678. this.invTitle = '增值税电子普通发票';
  679. break;
  680. case '2':
  681. this.invTitle = '增值税电子专用发票';
  682. break;
  683. }
  684. if (options.invoice_name) {
  685. this.invTitle = options.invoice_name;
  686. }
  687. // #ifndef APP-PLUS
  688. this.textareaStatus = true;
  689. // #endif
  690. if (this.isLogin && this.toPay == false) {
  691. this.getCheckShipping();
  692. } else {
  693. toLogin();
  694. }
  695. this.collage_id = options.collage_id || 0;
  696. if (this.collage_id) {
  697. this.getCollagePartake();
  698. }
  699. // #ifdef MP
  700. // 桌码
  701. this.tableId = options.tableId || 0;
  702. if (this.tableId) {
  703. this.getCodeData();
  704. }
  705. // #endif
  706. },
  707. /**
  708. * 生命周期函数--监听页面显示
  709. */
  710. onShow: function() {
  711. uni.removeStorageSync('form_type_cart');
  712. let _this = this
  713. uni.$on("handClick", res => {
  714. if (res) {
  715. _this.system_store = res.address
  716. _this.storeId = _this.system_store.id
  717. _this.cartId = res.cartId
  718. _this.news = res.new
  719. _this.pinkId = Number(res.pinkId)
  720. _this.couponId = res.couponId
  721. _this.getConfirm()
  722. }
  723. // 清除监听
  724. uni.$off('handClick');
  725. })
  726. let current = (dayjs(new Date(Number(new Date().getTime()))).format('HH:mm')).split(':');
  727. let currentArray = current;
  728. currentArray.push(0);
  729. let arrayNew = [];
  730. [...currentArray, ...current].forEach(item => {
  731. arrayNew.push(Number(item))
  732. })
  733. this.timeranges = arrayNew;
  734. },
  735. methods: {
  736. // 获取员工列表
  737. getMen(type) {
  738. let that = this
  739. getMen({
  740. page: 1,
  741. limit: 100,
  742. }).then(res => {
  743. let arr1 = res.data.list
  744. let arr2 = [{
  745. id: 0,
  746. alias: '暂无'
  747. }]
  748. that.saleyg.list = arr2.concat(arr1)
  749. })
  750. },
  751. // 选择员工
  752. choosYg(item) {
  753. this.sale_yg = item
  754. },
  755. // 打开picker
  756. openDatetimePicker() {
  757. this.$refs.myPicker.show();
  758. },
  759. // 关闭picker
  760. closeDatetimePicker() {
  761. this.$refs.myPicker.hide();
  762. },
  763. datetimePickerErr() {
  764. this.$util.Tips({
  765. title: '请选择正确的预约时间'
  766. });
  767. this.yytime = ''
  768. },
  769. handleSubmit(e) {
  770. console.log(e);
  771. this.yytime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`;
  772. },
  773. // #ifdef MP
  774. // 桌码信息
  775. getCodeData() {
  776. getCodeData({
  777. tableId: this.tableId
  778. }).then(res => {
  779. this.codeData = res.data;
  780. });
  781. },
  782. // #endif
  783. getCollagePartake() {
  784. getCollagePartake({
  785. collage_id: this.collage_id
  786. }).then(res => {
  787. this.goodsList = res.data;
  788. });
  789. },
  790. OnAreaAddress(address) {
  791. let addr = '';
  792. if (address.length == 4) {
  793. addr = address[0].label + '/' + address[1].label + '/' + address[2].label + '/' + address[3].label;
  794. } else if (address.length == 3) {
  795. addr = address[0].label + '/' + address[1].label + '/' + address[2].label;
  796. } else if (address.length == 2) {
  797. addr = address[0].label + '/' + address[1].label;
  798. } else {
  799. addr = address[0].label;
  800. }
  801. this.confirm[this.timerangesIndex].value = addr;
  802. CACHE_CITY[this.timerangesIndex] = address;
  803. },
  804. changeRegion(index) {
  805. if (!this.confirm[index].value) {
  806. this.addressInfoArea = [];
  807. }
  808. this.timerangesIndex = index;
  809. this.cityShow = Number(this.confirm[index].valConfig.tabVal) + 1;
  810. this.display = true;
  811. if (CACHE_CITY[index]) {
  812. this.addressInfoArea = CACHE_CITY[index];
  813. }
  814. },
  815. // 关闭地址弹窗;
  816. changeAddressClose: function() {
  817. this.display = false;
  818. },
  819. maskClick(e) {
  820. console.log(e);
  821. },
  822. // 授权关闭
  823. authColse: function(e) {
  824. this.isShowAuth = e
  825. },
  826. showMaoLocation(e) {
  827. let self = this;
  828. // #ifdef H5
  829. if (self.$wechat.isWeixin()) {
  830. self.$wechat.seeLocation({
  831. latitude: Number(e.latitude),
  832. longitude: Number(e.longitude),
  833. name: e.name,
  834. scale: 13,
  835. address: `${e.address}-${e.detailed_address}`,
  836. }).then(res => {})
  837. } else {
  838. // #endif
  839. uni.openLocation({
  840. latitude: Number(e.latitude),
  841. longitude: Number(e.longitude),
  842. name: e.name,
  843. address: `${e.address}-${e.detailed_address}`,
  844. success: function() {
  845. Number
  846. }
  847. });
  848. // #ifdef H5
  849. }
  850. // #endif
  851. },
  852. call(phone) {
  853. uni.makePhoneCall({
  854. phoneNumber: phone,
  855. });
  856. },
  857. // 选中配送类型
  858. deliveryFun(e, item) {
  859. this.deliveryType = e;
  860. this.$refs.deliveryMethod.module = false;
  861. if (e == 2) {
  862. this.storeId = item.id;
  863. } else {
  864. if (e == 3) {
  865. this.storeId = item.id;
  866. if (this.isDisplay.includes("2") && this.isDisplay.includes("3")) {
  867. this.getaddressInfo();
  868. this.$nextTick(function() {
  869. this.$refs.addressWindow.getAddressList();
  870. })
  871. }
  872. }
  873. this.system_store = item;
  874. }
  875. if (e == 1 || e == 3) {
  876. this.addressType(0, e);
  877. } else {
  878. this.addressType(1, e);
  879. }
  880. },
  881. // 选择配送方式
  882. onDelivery() {
  883. this.$refs.deliveryMethod.module = true
  884. },
  885. // 子集调用门店列表接口
  886. storeFun(index) {
  887. this.getList(1, index);
  888. },
  889. // 是否显示快递配送
  890. getCheckShipping() {
  891. let data = {
  892. cartId: this.cartId,
  893. new: this.news
  894. }
  895. checkShipping(data).then(res => {
  896. // 1:快递配送,2:到店自提,3:门店配送
  897. res.data.type.sort((x, y) => x - y) //正序
  898. this.isDisplay = res.data.type;
  899. if (((this.isDisplay.includes("2") && this.isDisplay.length == 1) || (this.deliveryType == 2 &&
  900. !this.tableId) || (this.deliveryType == 3 && this.storeId > 0 && !this.system_store
  901. .name)) && this.isDisplay.length) {
  902. if ((this.deliveryType == 2 || (this.deliveryType == 3 && !this.isDisplay.includes(
  903. "3"))) && this.isDisplay.includes("2")) {
  904. this.deliveryType = 2
  905. this.addressType(1, this.deliveryType);
  906. }
  907. if ((this.deliveryType == 3 || (this.deliveryType == 2 && !this.isDisplay.includes(
  908. "2"))) && this.isDisplay.includes("3")) {
  909. this.deliveryType = 3
  910. this.addressType(0, this.deliveryType);
  911. this.getaddressInfo();
  912. this.$nextTick(function() {
  913. this.$refs.addressWindow.getAddressList();
  914. })
  915. }
  916. } else {
  917. this.getaddressInfo();
  918. this.getConfirm();
  919. this.$nextTick(function() {
  920. this.$refs.addressWindow.getAddressList();
  921. })
  922. }
  923. }).catch(err => {
  924. uni.showToast({
  925. title: err,
  926. icon: 'none'
  927. });
  928. })
  929. },
  930. /**
  931. * 删除图片
  932. *
  933. */
  934. DelPic: function(index, indexs) {
  935. let that = this,
  936. pic = this.confirm[index].value;
  937. that.confirm[index].value.splice(indexs, 1);
  938. that.$set(that.confirm[index], 'value', that.confirm[index].value);
  939. },
  940. /**
  941. * 上传文件
  942. *
  943. */
  944. uploadpic: function(index) {
  945. let that = this;
  946. uni.showModal({
  947. title: '申请相机权限',
  948. content: '是否允许访问相册用于上传图片?',
  949. cancelText: '拒绝',
  950. confirmText: '允许',
  951. success: res => {
  952. if(res.confirm){
  953. that.$util.uploadImageOne('upload/image', function(res) {
  954. that.newImg.push(res.data.url);
  955. that.$set(that.confirm[index], 'value', that.newImg);
  956. });
  957. }
  958. },
  959. });
  960. },
  961. // 不开发票
  962. invCancel() {
  963. this.invChecked = '';
  964. this.invTitle = '不开发票';
  965. this.invShow = false;
  966. },
  967. // 选择发票
  968. invChange(id) {
  969. this.invChecked = id;
  970. this.invShow = false;
  971. const result = this.invList.find(item => item.id === id);
  972. let name = '';
  973. name += result.header_type === 1 ? '个人' : '企业';
  974. name += result.type === 1 ? '普通' : '专用';
  975. name += '发票';
  976. this.invTitle = name;
  977. },
  978. // 关闭发票
  979. invClose() {
  980. this.invShow = false;
  981. this.getInvoiceList()
  982. },
  983. getInvoiceList() {
  984. uni.showLoading({
  985. title: '正在加载…'
  986. })
  987. invoiceList().then(res => {
  988. uni.hideLoading();
  989. this.invList = res.data.map(item => {
  990. item.id = item.id.toString();
  991. return item;
  992. });
  993. const result = this.invList.find(item => item.id == this.invChecked);
  994. if (result) {
  995. let name = '';
  996. name += result.header_type === 1 ? '个人' : '企业';
  997. name += result.type === 1 ? '普通' : '专用';
  998. name += '发票';
  999. this.invTitle = name;
  1000. }
  1001. }).catch(err => {
  1002. uni.showToast({
  1003. title: err,
  1004. icon: 'none'
  1005. });
  1006. });
  1007. },
  1008. /**
  1009. * 开发票
  1010. */
  1011. goInvoice: function() {
  1012. this.getInvoiceList()
  1013. this.invShow = true;
  1014. this.urlQuery =
  1015. `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}`;
  1016. },
  1017. /**
  1018. * 授权回调事件
  1019. *
  1020. */
  1021. onLoadFun: function() {
  1022. this.getCheckShipping();
  1023. this.isShowAuth = false;
  1024. //调用子页面方法授权后执行获取地址列表
  1025. // this.$scope.selectComponent('#address-window').getAddressList();
  1026. },
  1027. /**
  1028. * 事件回调
  1029. *
  1030. */
  1031. onChangeFun: function(e) {
  1032. let opt = e;
  1033. let action = opt.action || null;
  1034. let value = opt.value != undefined ? opt.value : null;
  1035. action && this[action] && this[action](value);
  1036. },
  1037. payClose: function() {
  1038. this.pay_close = false;
  1039. },
  1040. goPay() {
  1041. this.formVerify();
  1042. },
  1043. payCheck(type) {
  1044. this.payType = type;
  1045. this.SubOrder();
  1046. },
  1047. payAddress() {
  1048. uni.navigateTo({
  1049. // /pages/users/user_address/index?id=25&cartId=76179610656654229504&pinkId=0&couponId=0&new=1
  1050. url: '/pages/users/user_address/index?id=' + this.id + '&new=' + this.news + '&cartId=' + this
  1051. .cartId +
  1052. '&pinkId=' +
  1053. this.pinkId +
  1054. '&couponId=' +
  1055. this.couponId + '&delivery_type=' + this.deliveryType + '&addressId=' + this.addressId +
  1056. '&store_id=' + this.storeId + '&store_name=' + this.system_store.name + '&product_id=' +
  1057. this.product_id
  1058. })
  1059. },
  1060. /**
  1061. * 获取门店列表数据
  1062. */
  1063. getList: function(fromType, index) {
  1064. let longitude = uni.getStorageSync("user_longitude"); //经度
  1065. let latitude = uni.getStorageSync("user_latitude"); //纬度
  1066. let data = {
  1067. latitude: latitude, //纬度
  1068. longitude: longitude, //经度
  1069. page: 1,
  1070. limit: 100,
  1071. type: this.seckillId > 0 ? 1 : 0,
  1072. product_id: this.product_id,
  1073. is_store: index
  1074. }
  1075. storeListApi(data).then(res => {
  1076. let list = res.data.list.list || [];
  1077. this.$set(this, 'storeList', list);
  1078. this.$set(this, 'storeId', this.storeId != 0 ? this.storeId : list[0].id);
  1079. list.forEach(item => {
  1080. if (this.storeId == item.id) {
  1081. this.$set(this, 'system_store', item);
  1082. }
  1083. })
  1084. if (fromType != 1) {
  1085. this.getConfirm();
  1086. }
  1087. }).catch(err => {})
  1088. },
  1089. // 关闭地址弹窗;
  1090. changeClose: function() {
  1091. this.$set(this.address, 'address', false);
  1092. },
  1093. /*
  1094. * 跳转门店列表
  1095. */
  1096. showStoreList: function() {
  1097. let _this = this
  1098. if (this.storeList.length > 0) {
  1099. uni.navigateTo({
  1100. url: `/pages/store/store_list/index?type=1&cartId=${_this.cartId}&new=${_this.news}&pinkId=${_this.pinkId}&couponId=${_this.couponId}`
  1101. })
  1102. }
  1103. },
  1104. changePayType(type) {
  1105. this.payType = type
  1106. this.computedPrice()
  1107. },
  1108. computedPrice: function() {
  1109. const that = this;
  1110. let shippingType = that.shippingType;
  1111. postOrderComputed(that.orderKey, {
  1112. addressId: that.addressId,
  1113. useIntegral: that.useIntegral ? 1 : 0,
  1114. couponId: that.priceGroup.couponPrice == 0 ? 0 : that.couponId,
  1115. shipping_type: that.tableId ? 4 : parseInt(shippingType) + 1,
  1116. payType: that.payType
  1117. }).then(res => {
  1118. let result = res.data.result;
  1119. if (result) {
  1120. that.totalPrice = result.pay_price;
  1121. that.integral_price = result.deduction_price;
  1122. that.coupon_price = result.coupon_price;
  1123. that.promotions_detail = result.promotions_detail;
  1124. that.integral = that.useIntegral ? result.SurplusIntegral : that.userInfo.integral;
  1125. that.$set(that.priceGroup, 'storePostage', shippingType == 1 ? 0 : result.pay_postage);
  1126. that.$set(that.priceGroup, 'storePostageDiscount', result.storePostageDiscount);
  1127. }
  1128. }).catch(err => {
  1129. return that.$util.Tips({
  1130. title: err
  1131. });
  1132. })
  1133. },
  1134. addressType: function(e, type) {
  1135. let index = e;
  1136. this.shippingType = parseInt(index);
  1137. // this.computedPrice();
  1138. if (index == 1) {
  1139. this.getList(0, type);
  1140. } else {
  1141. this.getConfirm();
  1142. }
  1143. },
  1144. bindPickerChange: function(e) {
  1145. let value = e.detail.value;
  1146. this.shippingType = value;
  1147. this.computedPrice();
  1148. },
  1149. ChangCouponsClone: function() {
  1150. this.$set(this.coupon, 'coupon', false);
  1151. },
  1152. changeTextareaStatus: function() {
  1153. for (let i = 0, len = this.coupon.list.length; i < len; i++) {
  1154. this.coupon.list[i].use_title = '';
  1155. this.coupon.list[i].is_use = 0;
  1156. }
  1157. this.textareaStatus = true;
  1158. this.status = 0;
  1159. this.$set(this.coupon, 'list', this.coupon.list);
  1160. },
  1161. /**
  1162. * 处理点击优惠券后的事件
  1163. *
  1164. */
  1165. ChangCoupons: function(e) {
  1166. // this.usableCoupon = e
  1167. // this.coupon.coupon = false
  1168. let index = e,
  1169. list = this.coupon.list,
  1170. couponTitle = '请选择',
  1171. couponId = 0;
  1172. for (let i = 0, len = list.length; i < len; i++) {
  1173. if (i != index) {
  1174. list[i].use_title = '';
  1175. list[i].is_use = 0;
  1176. }
  1177. }
  1178. if (list[index].is_use) {
  1179. //不使用优惠券
  1180. list[index].use_title = '';
  1181. list[index].is_use = 0;
  1182. } else {
  1183. //使用优惠券
  1184. list[index].use_title = '不使用';
  1185. list[index].is_use = 1;
  1186. couponTitle = list[index].coupon_title;
  1187. couponId = list[index].id;
  1188. }
  1189. this.couponTitle = couponTitle;
  1190. this.couponId = couponId;
  1191. this.$set(this.coupon, 'coupon', false);
  1192. this.$set(this.coupon, 'list', list);
  1193. this.getConfirm(1);
  1194. },
  1195. /**
  1196. * 使用积分抵扣
  1197. */
  1198. ChangeIntegral: function() {
  1199. this.useIntegral = !this.useIntegral;
  1200. this.computedPrice();
  1201. },
  1202. /**
  1203. * 选择地址后改变事件
  1204. * @param object e
  1205. */
  1206. OnChangeAddress: function(e) {
  1207. this.textareaStatus = true;
  1208. this.addressId = e;
  1209. this.address.address = false;
  1210. this.getConfirm()
  1211. this.getaddressInfo();
  1212. this.computedPrice();
  1213. },
  1214. bindHideKeyboard: function(e) {
  1215. this.mark = e.detail.value;
  1216. },
  1217. // 对象转数组
  1218. objToArr(data) {
  1219. let obj = Object.keys(data);
  1220. let m = obj.map(key => data[key]);
  1221. return m;
  1222. },
  1223. /**
  1224. * 获取当前订单详细信息
  1225. *
  1226. */
  1227. getConfirm: function(numType) {
  1228. let that = this;
  1229. let shippingType = parseInt(this.shippingType) + 1;
  1230. let addressId = 0,
  1231. storeid;
  1232. if (this.tableId) {
  1233. shippingType = 4;
  1234. }
  1235. if (shippingType == 1) {
  1236. addressId = that.addressId
  1237. if (this.deliveryType == 1) {
  1238. storeid = 0
  1239. } else {
  1240. storeid = that.storeId
  1241. }
  1242. } else {
  1243. addressId = ''
  1244. storeid = that.storeId
  1245. }
  1246. orderConfirm(that.cartId, that.news, addressId, shippingType, storeid, that.couponId).then(res => {
  1247. if (res.data.upgrade_addr == 1) {
  1248. that.id = res.data.addressInfo.id
  1249. this.isaddress = true
  1250. }
  1251. if (numType != 1) {
  1252. let confirm = this.objToArr(res.data.custom_form);
  1253. confirm.forEach((item, index, arr) => {
  1254. CACHE_CITY[index] = ''; //清空省市区
  1255. if (item.name == 'texts') {
  1256. if (item.defaultValConfig.value) {
  1257. item.value = item.defaultValConfig.value
  1258. } else {
  1259. item.value = ''
  1260. }
  1261. } else if (item.name == 'radios') {
  1262. item.value = item.wordsConfig.list[0].val
  1263. } else if (item.name == 'uploadPicture') {
  1264. item.value = [];
  1265. } else if (item.name == 'dateranges') {
  1266. if (item.valConfig.tabVal == 0) {
  1267. if (item.valConfig.tabData == 0) {
  1268. let obj = dayjs(new Date(Number(new Date().getTime()))).format(
  1269. 'YYYY-MM-DD');
  1270. item.value = [obj, obj]
  1271. } else {
  1272. let data1 = dayjs(new Date(Number(new Date(item.valConfig
  1273. .specifyDate[0]).getTime()))).format('YYYY-MM-DD');
  1274. let data2 = dayjs(new Date(Number(new Date(item.valConfig
  1275. .specifyDate[1]).getTime()))).format('YYYY-MM-DD');
  1276. item.value = [data1, data2];
  1277. }
  1278. } else {
  1279. item.value = [];
  1280. }
  1281. } else {
  1282. if (['times', 'dates', 'timeranges'].indexOf(item.name) != -1) {
  1283. if (item.valConfig.tabVal == 0) {
  1284. if (item.valConfig.tabData == 0) {
  1285. if (item.name == 'times') {
  1286. item.value = dayjs(new Date(Number(new Date()
  1287. .getTime()))).format('HH:mm');
  1288. } else if (item.name == 'dates') {
  1289. item.value = dayjs(new Date(Number(new Date()
  1290. .getTime()))).format('YYYY-MM-DD');
  1291. } else {
  1292. let current = dayjs(new Date(Number(new Date()
  1293. .getTime()))).format('HH:mm');
  1294. item.value = current + ' - ' + current;
  1295. }
  1296. } else {
  1297. if (item.name == 'times' || item.name == 'dates') {
  1298. item.value = item.valConfig.specifyDate;
  1299. } else {
  1300. item.value = item.valConfig.specifyDate[0] + ' - ' +
  1301. item.valConfig.specifyDate[1];
  1302. }
  1303. }
  1304. } else {
  1305. item.value = '';
  1306. }
  1307. } else {
  1308. item.value = '';
  1309. }
  1310. }
  1311. })
  1312. function sortNumber(a, b) {
  1313. return a.timestamp - b.timestamp;
  1314. }
  1315. confirm.sort(sortNumber);
  1316. that.$set(that, 'confirm', confirm);
  1317. }
  1318. that.$set(that, 'goodsType', res.data.type);
  1319. that.$set(that, 'userInfo', res.data.userInfo);
  1320. that.$set(that, 'integral', res.data.userInfo.integral);
  1321. that.$set(that, 'contacts', res.data.userInfo.real_name);
  1322. that.$set(that, 'contactsTel', res.data.userInfo.record_phone || '');
  1323. that.$set(that, 'integralRatio', res.data.integralRatio);
  1324. that.$set(that, 'offlinePostage', res.data.offlinePostage);
  1325. that.$set(that, 'orderKey', res.data.orderKey);
  1326. that.$set(that, 'valid_count', res.data.valid_count);
  1327. that.$set(that, 'discount_id', res.data.discount_id)
  1328. that.$set(that, 'priceGroup', res.data.priceGroup);
  1329. that.$set(that, 'seckillId', parseInt(res.data.seckill_id));
  1330. that.$set(that, 'BargainId', parseInt(res.data.bargain_id));
  1331. that.$set(that, 'combinationId', parseInt(res.data.combination_id));
  1332. that.$set(that, 'discountId', parseInt(res.data.discount_id));
  1333. that.$set(that, 'invoice_func', res.data.invoice_func);
  1334. that.$set(that, 'special_invoice', res.data.special_invoice);
  1335. that.$set(that, 'integral_ratio_status', res.data.integral_ratio_status);
  1336. that.$set(that, 'store_self_mention', res.data.store_self_mention);
  1337. that.$set(that, 'store_func_status', res.data.store_func_status);
  1338. that.giveData.give_integral = res.data.give_integral;
  1339. that.giveData.give_coupon = res.data.give_coupon;
  1340. let cartInfo = res.data.cartInfo;
  1341. let cartObj = [],
  1342. giftObj = [];
  1343. cartInfo.forEach(item => {
  1344. if (item.is_gift == 1) {
  1345. giftObj.push(item)
  1346. } else {
  1347. cartObj.push(item)
  1348. }
  1349. })
  1350. that.$set(that, 'cartInfo', cartObj);
  1351. that.$set(that, 'giveCartInfo', giftObj);
  1352. let giveType = -1;
  1353. giftObj.forEach(item => {
  1354. if (item.product_type == 0 || item.product_type == 4) {
  1355. return giveType = 0
  1356. }
  1357. })
  1358. that.$set(that, 'product_type', (res.data.product_type == 0 || giveType == 0 || res.data
  1359. .product_type == 4) ? 0 : 1);
  1360. //微信支付是否开启
  1361. that.cartArr[0].payStatus = res.data.pay_weixin_open || 0
  1362. //支付宝是否开启
  1363. that.cartArr[1].payStatus = res.data.ali_pay_status || 0;
  1364. //#ifdef MP
  1365. that.cartArr[1].payStatus = 0;
  1366. //#endif
  1367. //余额支付是否开启
  1368. // that.cartArr[2].title = '可用余额:' + res.data.userInfo.now_money;
  1369. that.cartArr[2].number = res.data.userInfo.now_money;
  1370. that.cartArr[2].payStatus = res.data.yue_pay_status == 1 ? res.data.yue_pay_status : 0
  1371. if (res.data.offline_pay_status == 2) {
  1372. that.cartArr[3].payStatus = 0
  1373. } else {
  1374. that.cartArr[3].payStatus = 1
  1375. }
  1376. // that.$set(that, 'cartArr', that.cartArr);
  1377. that.$set(that, 'ChangePrice', that.totalPrice);
  1378. that.getBargainId();
  1379. that.getCouponList();
  1380. that.computedPrice();
  1381. if (this.addressId || this.couponId) {
  1382. // this.computedPrice();
  1383. } else {
  1384. that.$set(that, 'totalPrice', that.$util.$h.Add(parseFloat(res.data.priceGroup
  1385. .totalPrice),
  1386. parseFloat(res.data
  1387. .priceGroup.storePostage)));
  1388. }
  1389. }).catch(err => {
  1390. return this.$util.Tips({
  1391. title: err
  1392. });
  1393. });
  1394. },
  1395. /*
  1396. * 提取砍价和拼团id
  1397. */
  1398. getBargainId: function() {
  1399. let that = this;
  1400. // let cartINfo = that.cartInfo;
  1401. // let BargainId = 0;
  1402. // let combinationId = 0;
  1403. // let discountId = 0;
  1404. // cartINfo.forEach(function(value, index, cartINfo) {
  1405. // BargainId = cartINfo[index].bargain_id,
  1406. // combinationId = cartINfo[index].combination_id,
  1407. // discountId = cartINfo[index].discount_id
  1408. // })
  1409. // that.$set(that, 'BargainId', parseInt(BargainId));
  1410. // that.$set(that, 'combinationId', parseInt(combinationId));
  1411. // that.$set(that, 'discountId', parseInt(discountId));
  1412. if (that.cartArr.length == 3 && (that.BargainId || that.combinationId || that.seckillId || that
  1413. .discountId)) {
  1414. that.cartArr[2].payStatus = 0;
  1415. that.$set(that, 'cartArr', that.cartArr);
  1416. }
  1417. },
  1418. /**
  1419. * 获取当前金额可用优惠券
  1420. *
  1421. */
  1422. getCouponList: function() {
  1423. let that = this;
  1424. let data = {
  1425. cartId: this.cartId,
  1426. 'new': this.news,
  1427. shipping_type: that.$util.$h.Add(that.shippingType, 1),
  1428. store_id: that.system_store ? that.system_store.id : 0
  1429. }
  1430. getCouponsOrderPrice(this.totalPrice, data).then(res => {
  1431. that.$set(that.coupon, 'list', res.data);
  1432. that.openType = 1;
  1433. });
  1434. },
  1435. /*
  1436. * 获取默认收货地址或者获取某条地址信息
  1437. */
  1438. getaddressInfo: function() {
  1439. let that = this;
  1440. if (that.addressId) {
  1441. getAddressDetail(that.addressId).then(res => {
  1442. res.data.is_default = parseInt(res.data.is_default);
  1443. that.addressInfo = res.data || {};
  1444. that.addressId = res.data.id || 0;
  1445. that.address.addressId = res.data.id || 0;
  1446. })
  1447. } else {
  1448. getAddressDefault().then(res => {
  1449. res.data.is_default = parseInt(res.data.is_default);
  1450. that.addressInfo = res.data || {};
  1451. that.addressId = res.data.id || 0;
  1452. that.address.addressId = res.data.id || 0;
  1453. })
  1454. }
  1455. },
  1456. payItem: function(e) {
  1457. let that = this;
  1458. let active = e;
  1459. that.active = active;
  1460. that.animated = true;
  1461. that.payType = that.cartArr[active].value;
  1462. that.computedPrice();
  1463. setTimeout(function() {
  1464. that.car();
  1465. }, 500);
  1466. },
  1467. couponTap: function() {
  1468. this.coupon.coupon = true;
  1469. this.coupon.list.forEach((item, index) => {
  1470. if (item.id == this.couponId) {
  1471. item.is_use = 1
  1472. } else {
  1473. item.is_use = 0
  1474. }
  1475. })
  1476. this.$set(this.coupon, 'list', this.coupon.list);
  1477. },
  1478. car: function() {
  1479. let that = this;
  1480. that.animated = false;
  1481. },
  1482. onAddress: function(name) {
  1483. let that = this;
  1484. if (name) {
  1485. that.textareaStatus = false;
  1486. that.address.address = true;
  1487. that.pagesUrl = '/pages/users/user_address_list/index?news=' + this.news + '&cartId=' + this
  1488. .cartId +
  1489. '&pinkId=' +
  1490. this.pinkId +
  1491. '&couponId=' +
  1492. this.couponId + '&delivery_type=' + this.deliveryType + '&addressId=' + this.addressId +
  1493. '&store_id=' + this.storeId + '&store_name=' + this.system_store.name + '&product_id=' + this
  1494. .product_id
  1495. } else {
  1496. uni.navigateTo({
  1497. url: '/pages/users/user_address/index?new=' + this.news + '&cartId=' + this.cartId +
  1498. '&pinkId=' +
  1499. this.pinkId +
  1500. '&couponId=' +
  1501. this.couponId + '&delivery_type=' + this.deliveryType + '&addressId=' + this
  1502. .addressId + '&store_id=' + this.storeId + '&store_name=' + this.system_store
  1503. .name + '&product_id=' + this.product_id
  1504. })
  1505. }
  1506. },
  1507. payment: function(data) {
  1508. let that = this;
  1509. orderCreate(that.orderKey, data).then(res => {
  1510. let status = res.data.status,
  1511. orderId = res.data.result.orderId,
  1512. jsConfig = res.data.result.jsConfig,
  1513. goPages = '/pages/goods/order_pay_status/index?order_id=' + orderId + '&msg=' + res
  1514. .msg +
  1515. '&type=3' + '&totalPrice=' + this.totalPrice
  1516. switch (status) {
  1517. case 'ORDER_EXIST':
  1518. case 'EXTEND_ORDER':
  1519. case 'PAY_ERROR':
  1520. uni.hideLoading();
  1521. return that.$util.Tips({
  1522. title: res.msg
  1523. }, {
  1524. tab: 5,
  1525. url: goPages
  1526. });
  1527. break;
  1528. case 'SUCCESS':
  1529. uni.hideLoading();
  1530. if (that.BargainId || that.combinationId || that.pinkId || that.seckillId || that
  1531. .discountId)
  1532. return that.$util.Tips({
  1533. title: res.msg,
  1534. icon: 'success'
  1535. }, {
  1536. tab: 4,
  1537. url: goPages
  1538. });
  1539. return that.$util.Tips({
  1540. title: res.msg,
  1541. icon: 'success'
  1542. }, {
  1543. tab: 5,
  1544. url: goPages
  1545. });
  1546. break;
  1547. case 'WECHAT_PAY':
  1548. that.toPay = true;
  1549. // #ifdef MP
  1550. /* that.toPay = true; */
  1551. let mp_pay_name = ''
  1552. if (uni.requestOrderPayment) {
  1553. mp_pay_name = 'requestOrderPayment'
  1554. } else {
  1555. mp_pay_name = 'requestPayment'
  1556. }
  1557. uni[mp_pay_name]({
  1558. timeStamp: jsConfig.timestamp,
  1559. nonceStr: jsConfig.nonceStr,
  1560. package: jsConfig.package,
  1561. signType: jsConfig.signType,
  1562. paySign: jsConfig.paySign,
  1563. success: function(res) {
  1564. uni.hideLoading();
  1565. if (that.BargainId || that.combinationId || that.pinkId || that
  1566. .seckillId || that.discountId)
  1567. return that.$util.Tips({
  1568. title: '支付成功',
  1569. icon: 'success'
  1570. }, {
  1571. tab: 4,
  1572. url: goPages
  1573. });
  1574. return that.$util.Tips({
  1575. title: '支付成功',
  1576. icon: 'success'
  1577. }, {
  1578. tab: 5,
  1579. url: goPages
  1580. });
  1581. },
  1582. fail: function(e) {
  1583. uni.hideLoading();
  1584. return that.$util.Tips({
  1585. title: '取消支付'
  1586. }, {
  1587. tab: 5,
  1588. url: goPages + '&status=2'
  1589. });
  1590. },
  1591. complete: function(e) {
  1592. uni.hideLoading();
  1593. //关闭当前页面跳转至订单状态
  1594. if (res.errMsg == 'requestPayment:cancel') return that.$util
  1595. .Tips({
  1596. title: '取消支付'
  1597. }, {
  1598. tab: 5,
  1599. url: goPages + '&status=2'
  1600. });
  1601. },
  1602. })
  1603. // #endif
  1604. // #ifdef H5
  1605. this.$wechat.pay(res.data.result.jsConfig).then(res => {
  1606. return that.$util.Tips({
  1607. title: '支付成功',
  1608. icon: 'success'
  1609. }, {
  1610. tab: 5,
  1611. url: goPages
  1612. });
  1613. }).catch(res => {
  1614. if (!this.$wechat.isWeixin()) {
  1615. uni.redirectTo({
  1616. url: goPages +
  1617. '&msg=支付失败&status=2'
  1618. })
  1619. }
  1620. if (res.errMsg == 'chooseWXPay:cancel') return that.$util.Tips({
  1621. title: '取消支付'
  1622. }, {
  1623. tab: 5,
  1624. url: goPages + '&status=2'
  1625. });
  1626. })
  1627. // #endif
  1628. // #ifdef APP-PLUS
  1629. uni.requestPayment({
  1630. provider: 'wxpay',
  1631. orderInfo: jsConfig,
  1632. success: (e) => {
  1633. let url = goPages;
  1634. uni.showToast({
  1635. title: "支付成功"
  1636. })
  1637. setTimeout(res => {
  1638. uni.redirectTo({
  1639. url: url
  1640. })
  1641. }, 2000)
  1642. },
  1643. fail: (e) => {
  1644. let url = '/pages/goods/order_pay_status/index?order_id=' +
  1645. orderId +
  1646. '&msg=支付失败';
  1647. uni.showModal({
  1648. content: "支付失败",
  1649. showCancel: false,
  1650. success: function(res) {
  1651. if (res.confirm) {
  1652. uni.redirectTo({
  1653. url: url
  1654. })
  1655. } else if (res.cancel) {
  1656. console.log('用户点击取消');
  1657. }
  1658. }
  1659. })
  1660. },
  1661. complete: () => {
  1662. uni.hideLoading();
  1663. },
  1664. });
  1665. // #endif
  1666. break;
  1667. case 'PAY_DEFICIENCY':
  1668. uni.hideLoading();
  1669. //余额不足
  1670. return that.$util.Tips({
  1671. title: res.msg
  1672. }, {
  1673. tab: 5,
  1674. url: goPages + '&status=1'
  1675. });
  1676. break;
  1677. case "WECHAT_H5_PAY":
  1678. uni.hideLoading();
  1679. that.$util.Tips({
  1680. title: '订单创建成功!'
  1681. }, {
  1682. tab: 4,
  1683. url: goPages + '&status=0'
  1684. });
  1685. setTimeout(() => {
  1686. location.href = res.data.result.jsConfig.mweb_url;
  1687. }, 2000);
  1688. break;
  1689. case 'ALIPAY_PAY':
  1690. //#ifdef H5
  1691. if (this.from === 'weixin') {
  1692. uni.redirectTo({
  1693. url: `/pages/users/alipay_invoke/index?id=${orderId}&pay_key=${res.data.result.pay_key}`
  1694. });
  1695. } else {
  1696. uni.hideLoading();
  1697. that.formContent = res.data.result.jsConfig;
  1698. that.$nextTick(() => {
  1699. document.getElementById('alipaysubmit').submit();
  1700. })
  1701. }
  1702. //#endif
  1703. // #ifdef MP
  1704. uni.navigateTo({
  1705. url: `/pages/users/alipay_invoke/index?id=${orderId}&link=${jsConfig.qrCode}`
  1706. });
  1707. // #endif
  1708. // #ifdef APP-PLUS
  1709. uni.requestPayment({
  1710. provider: 'alipay',
  1711. orderInfo: jsConfig,
  1712. success: (e) => {
  1713. uni.showToast({
  1714. title: "支付成功"
  1715. })
  1716. let url = '/pages/goods/order_pay_status/index?order_id=' +
  1717. orderId +
  1718. '&msg=支付成功';
  1719. setTimeout(res => {
  1720. uni.redirectTo({
  1721. url: url
  1722. })
  1723. }, 2000)
  1724. },
  1725. fail: (e) => {
  1726. let url = '/pages/goods/order_pay_status/index?order_id=' +
  1727. orderId +
  1728. '&msg=支付失败';
  1729. uni.showModal({
  1730. content: "支付失败",
  1731. showCancel: false,
  1732. success: function(res) {
  1733. if (res.confirm) {
  1734. uni.redirectTo({
  1735. url: url
  1736. })
  1737. } else if (res.cancel) {
  1738. console.log('用户点击取消');
  1739. }
  1740. }
  1741. })
  1742. },
  1743. complete: () => {
  1744. uni.hideLoading();
  1745. },
  1746. });
  1747. // #endif
  1748. break;
  1749. }
  1750. }).catch(err => {
  1751. uni.hideLoading();
  1752. return that.$util.Tips({
  1753. title: err
  1754. });
  1755. });
  1756. },
  1757. clickTextArea() {
  1758. this.$refs.textarea.focus()
  1759. },
  1760. bindDateChange: function(e, index) {
  1761. this.confirm[index].value = e.target.value
  1762. },
  1763. bindTimeChange: function(e, index) {
  1764. this.confirm[index].value = e.target.value
  1765. },
  1766. bindSelectChange: function(e, index, item) {
  1767. this.confirm[index].value = item.wordsConfig.list[e.detail.value].val
  1768. },
  1769. getTimeranges(index) {
  1770. this.isShow = true
  1771. this.timerangesIndex = index
  1772. },
  1773. confrim(e) {
  1774. this.isShow = false;
  1775. this.confirm[this.timerangesIndex].value = e.time;
  1776. let arrayNew = [];
  1777. e.val.forEach(item => {
  1778. arrayNew.push(Number(item))
  1779. })
  1780. this.timeranges = arrayNew;
  1781. },
  1782. cancels() {
  1783. this.isShow = false;
  1784. },
  1785. // 单选
  1786. radioChange(e, index, item) {
  1787. this.confirm[index].value = item.wordsConfig.list[e.detail.value].val
  1788. },
  1789. // 多选
  1790. checkboxChange(e, index, item) {
  1791. let obj = e.detail.value;
  1792. let val = '';
  1793. item.wordsConfig.list.forEach((j, jindex) => {
  1794. obj.forEach(x => {
  1795. if (jindex == x) {
  1796. val = val + (val ? ',' : '') + j.val;
  1797. }
  1798. })
  1799. })
  1800. this.confirm[index].value = val
  1801. },
  1802. formVerify() {
  1803. let that = this;
  1804. if (!that.addressId && !that.shippingType && !that.product_type && !that.tableId) return that.$util.Tips({
  1805. title: '请选择收货地址'
  1806. });
  1807. if (that.shippingType == 1) {
  1808. if (that.contacts == "" || that.contactsTel == "") {
  1809. return that.$util.Tips({
  1810. title: '请填写联系人或联系人电话'
  1811. });
  1812. }
  1813. if (!/^1(3|4|5|7|8|9|6)\d{9}$/.test(that.contactsTel)) {
  1814. return that.$util.Tips({
  1815. title: '请填写正确的手机号'
  1816. });
  1817. }
  1818. if (!/^[\u4e00-\u9fa5\w]{2,16}$/.test(that.contacts)) {
  1819. return that.$util.Tips({
  1820. title: '请填写您的真实姓名'
  1821. });
  1822. }
  1823. if (that.storeList.length == 0) return that.$util.Tips({
  1824. title: '暂无门店,请选择其他方式'
  1825. });
  1826. }
  1827. for (var i = 0; i < that.confirm.length; i++) {
  1828. let data = that.confirm[i]
  1829. if (['radios'].indexOf(data.name) == -1 && (data.titleShow.val || (['uploadPicture', 'dateranges']
  1830. .indexOf(data.name) == -1 && data.value && data.value.trim()))) {
  1831. if ((data.name === 'texts' && data.valConfig.tabVal == 0) || ['dates', 'times', 'selects', 'citys',
  1832. 'checkboxs'
  1833. ].indexOf(data.name) != -1) {
  1834. if (!data.value || (data.value && !data.value.trim())) {
  1835. return that.$util.Tips({
  1836. title: `请填写${data.titleConfig.value}`
  1837. });
  1838. }
  1839. }
  1840. if (data.name === 'timeranges') {
  1841. if (!data.value) {
  1842. return that.$util.Tips({
  1843. title: `请选择${data.titleConfig.value}`
  1844. });
  1845. }
  1846. }
  1847. if (data.name === 'dateranges') {
  1848. if (!data.value.length) {
  1849. return that.$util.Tips({
  1850. title: `请选择${data.titleConfig.value}`
  1851. });
  1852. }
  1853. }
  1854. if (data.name === 'texts' && data.valConfig.tabVal == 4) {
  1855. if (data.value <= 0) {
  1856. return that.$util.Tips({
  1857. title: `请填写大于0的${data.titleConfig.value}`
  1858. });
  1859. }
  1860. }
  1861. if (data.name === 'texts' && data.valConfig.tabVal == 3) {
  1862. if (!/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(data.value)) {
  1863. return that.$util.Tips({
  1864. title: `请填写正确的${data.titleConfig.value}`
  1865. });
  1866. }
  1867. }
  1868. if (data.name === 'texts' && data.valConfig.tabVal == 1) {
  1869. if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(data.value)) {
  1870. return that.$util.Tips({
  1871. title: `请填写正确的${data.titleConfig.value}`
  1872. });
  1873. }
  1874. }
  1875. if (data.name === 'texts' && data.valConfig.tabVal == 2) {
  1876. if (!
  1877. /^[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
  1878. .test(data.value)) {
  1879. return that.$util.Tips({
  1880. title: `请填写正确的${data.titleConfig.value}`
  1881. });
  1882. }
  1883. }
  1884. if (data.name === 'uploadPicture') {
  1885. if (!data.value.length) {
  1886. return that.$util.Tips({
  1887. title: `请上传${data.titleConfig.value}`
  1888. });
  1889. }
  1890. }
  1891. }
  1892. }
  1893. this.pay_close = true;
  1894. },
  1895. SubOrder: function(e) {
  1896. let that = this,
  1897. data = {};
  1898. if (!that.payType) return that.$util.Tips({
  1899. title: '请选择支付方式'
  1900. });
  1901. data = {
  1902. sale:that.spid,
  1903. sale_uid: that.sale_yg.id || 0,
  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. //指派
  2534. .zp-wrap {
  2535. margin-top: 20rpx;
  2536. width: 650rpx;
  2537. height: 216rpx;
  2538. white-space: nowrap;
  2539. .zp-item {
  2540. display: inline-block;
  2541. margin-right: 15rpx;
  2542. padding-top: 34rpx;
  2543. width: 172rpx;
  2544. height: 216rpx;
  2545. // background: #E02020;
  2546. background-color: #fff;
  2547. border-radius: 10rpx;
  2548. .zp-logo {
  2549. display: block;
  2550. width: 106rpx;
  2551. height: 106rpx;
  2552. margin: auto;
  2553. border-radius: 50%;
  2554. background-color: #eee;
  2555. }
  2556. .zp-name {
  2557. margin-top: 15rpx;
  2558. width: 100%;
  2559. text-align: center;
  2560. font-size: 30rpx;
  2561. font-weight: bold;
  2562. color: #333333;
  2563. }
  2564. }
  2565. .choose {
  2566. background-color: #262261 !important;
  2567. .zp-name {
  2568. color: #fff !important;
  2569. }
  2570. }
  2571. }
  2572. </style>