yuyue.vue 58 KB

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