yuyue.vue 58 KB

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