yuyue.vue 59 KB

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