yuyue.vue 59 KB

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