yuyue.vue 59 KB

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