index (2).vue 73 KB

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