yuyue.vue 58 KB

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