yuyue.vue 58 KB

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