yuyue.vue 59 KB

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