yuyue.vue 58 KB

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