create-order.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986
  1. <template>
  2. <view class="container order clearfix" :style="{ paddingBottom: isIphoneX ? '190rpx' : '134rpx' }">
  3. <!-- 地址选择 -->
  4. <cm-address-temp ref="choiceAddress" v-if="isRequest" :addressData="addressData" />
  5. <!-- 商品 -->
  6. <cm-goods-temp
  7. ref="goods"
  8. v-if="isRequest"
  9. :secondflag="secondflag"
  10. :goodsData.sync="goodsData"
  11. @handleGoodList="handChangeInputGoodsList"
  12. @changeChina="handleChangeChina"
  13. @changePostage="handleChangePostage"
  14. />
  15. <!-- 返佣订单 -->
  16. <!-- <view class="order-return" v-if="goodsData.length == 1 && secondflag">
  17. <view class="order-return-main" @click="handleRebateFlag">
  18. <view class="label">是否返佣</view>
  19. <view class="label-right">
  20. <text class="text-l">{{ rebateFeeText }}</text> <text class="iconfont icon-xiayibu"></text>
  21. </view>
  22. </view>
  23. <view class="order-return-input" v-if="confirmParam.payInfo.rebateFlag === 2">
  24. <input class="input" v-model="rebateFee" type="number" placeholder="请输入返佣服务费" maxlength="20" />
  25. </view>
  26. </view> -->
  27. <!-- 返佣订单 -->
  28. <!-- <view class="Rebate" @click="handleSecondFlag" v-if="!secondflag">
  29. <text class="rebate-title">二手返佣订单</text>
  30. <text class="iconfont" :class="rebatecheck ? 'icon-yixuanze' : 'icon-weixuanze'"></text>
  31. </view> -->
  32. <!-- 发票信息 -->
  33. <cm-invice-popup
  34. ref="invoice"
  35. v-if="isRequest"
  36. :invoiceDatas="invoiceData"
  37. @handleChoiceaInvoice="handleChoiceaInvoiceData"
  38. />
  39. <!-- 优惠券选择弹窗 -->
  40. <cm-coupon-popup
  41. ref="coupon"
  42. v-if="isCouponShow"
  43. :couponList="couponList"
  44. @handleChoiceaCoupon="handleChoiceaCouponData"
  45. />
  46. <!-- 兑换优惠券弹窗 -->
  47. <cm-coupon-chang v-if="isExchangePopup" />
  48. <!-- 余额抵扣 -->
  49. <view class="invoice-balance" v-if="isRequest && !rechargeGoods">
  50. <view class="balabce-t">
  51. <view class="balabce-t-le">余额抵扣:</view>
  52. <view class="balabce-t-ri">
  53. <view class="money">
  54. <text>可用余额:</text> <text>¥{{ userMoney | NumFormat }}</text>
  55. </view>
  56. <view class="checkbox-box">
  57. <button
  58. class="checkbox iconfont"
  59. hover-class="btn-hover"
  60. v-if="userMoney != 0"
  61. @click.stop="checkedBalabce"
  62. :class="[ischecked ? 'icon-yixuanze' : 'icon-weixuanze']"
  63. ></button>
  64. </view>
  65. </view>
  66. </view>
  67. <view class="balabce-b" :class="{ 'balabce-b--hide': !ischecked }">
  68. <view
  69. class="balabce-b-text animation"
  70. :style="{
  71. transform: ischecked ? 'translateY(0)' : 'translateY(-50%)',
  72. '-webkit-transform': ischecked ? 'translateY(0)' : 'translateY(-50%)'
  73. }"
  74. >
  75. <text>当前使用:¥{{ deductMoney | NumFormat }},剩余:¥{{ surplusMoney | NumFormat }}</text>
  76. </view>
  77. </view>
  78. </view>
  79. <!-- 选择对机构是否可见 -->
  80. <cm-club-visible ref="clubVisible" v-if="isRequest" @handleClubVisible="handleClubVisibleData" />
  81. <!-- 售后条例 -->
  82. <cm-regula-popup
  83. ref="regulations"
  84. v-if="isRequest && seconDepositFlg"
  85. :regulaDatas="clauseList"
  86. @handleData="handleClauseData"
  87. />
  88. <!-- 底部 -->
  89. <view class="footer" :style="{ paddingBottom: isIphoneX ? '68rpx' : '0rpx' }">
  90. <view class="footer-le">
  91. <view class="footer-count">
  92. <text>共{{ totalCount }}件商品</text>
  93. </view>
  94. <view class="footer-price">
  95. <view class="sum" :class="totalDiscountAmount == 0 ? 'none' : ''">
  96. 总价:<text class="price">¥{{ orderShouldPayFee | NumFormat }}</text>
  97. </view>
  98. <view class="sum-none" v-if="totalDiscountAmount > 0">
  99. <text class="money-reduced"
  100. >共减<text>¥{{ totalDiscountAmount | NumFormat }}</text></text
  101. >
  102. </view>
  103. </view>
  104. </view>
  105. <view class="footer-submit" @click.stop="orderSubmitMit">
  106. <view class="btn" :class="isSubLoading ? 'disabled' : ''">提交订单</view>
  107. </view>
  108. </view>
  109. <!-- 弹窗提示 -->
  110. <tui-modal
  111. :show="modal"
  112. @click="handleClick"
  113. @cancel="hideMobel"
  114. :content="contentModalText"
  115. :button="modalButton"
  116. color="#333"
  117. :size="32"
  118. shape="circle"
  119. :maskClosable="false"
  120. >
  121. </tui-modal>
  122. </view>
  123. </template>
  124. <script>
  125. import cmAddressTemp from './components/cm-address-temp'
  126. import cmGoodsTemp from './components/cm-goods-temp'
  127. import cmInvicePopup from './components/cm-invice-popup'
  128. import cmFreightPopup from './components/cm-freight-popup'
  129. import cmCouponPopup from './components/cm-coupon-popup'
  130. import cmCouponChang from './components/cm-coupon-chang'
  131. import cmClubVisible from './components/cm-club-visible'
  132. import cmRegulaPopup from './components/cm-regula-popup'
  133. import cmCouponTips from './components/cm-coupon-tips'
  134. import conMixins from './mixins/conMixins.js'
  135. export default {
  136. mixins: [conMixins],
  137. components: {
  138. cmAddressTemp,
  139. cmGoodsTemp,
  140. cmInvicePopup,
  141. cmFreightPopup,
  142. cmCouponPopup,
  143. cmCouponChang,
  144. cmClubVisible,
  145. cmRegulaPopup,
  146. cmCouponTips
  147. },
  148. data() {
  149. return {
  150. isSubLoading: false,
  151. modalButton: [
  152. {
  153. text: '再想一想',
  154. type: 'gray',
  155. plain: true //是否空心
  156. },
  157. {
  158. text: '继续提交',
  159. customStyle: {
  160. color: '#fff',
  161. bgColor: 'linear-gradient(90deg, #F28F31 0%, #FF5B00 100%)'
  162. },
  163. plain: false
  164. }
  165. ],
  166. contentModalText: '', //操作文字提示语句
  167. modal: false,
  168. showModalstauts: 1,
  169. isIphoneX: this.$store.state.isIphoneX,
  170. confirmParam: {
  171. cartType: 3, // 购买类型:(1自主下单, 3协销下单)
  172. orderMiniType: 0, // 订单提交状态 0初始提交 1 继续提交
  173. orderSource: 6, // 订单来源 1WWW 6小程序[采美,星范]
  174. addressId: 0, // 收货地址Id
  175. clubCouponId: 0, // 关联优惠券Id
  176. clubId: 0, // 机构Id
  177. orderInfo: [], // 订单商品数据
  178. orderInvoice: { type: 0 }, // 订单发票信息
  179. orderSeen: 1, // 订单对机构可见度 1可见 2不可见
  180. payInfo: {
  181. // 订单金额数据
  182. orderShouldPayFee: 0, // 订单最终支付金额
  183. balancePayFlag: 0, // 勾选余额的状态(1使用,0不使用)
  184. clauseId: 0, // 条款Id
  185. postage: 0, // 运费金额
  186. postageFlag: 0, // 运费类型
  187. userBeans: 0, // 抵扣采美豆数量
  188. rebateFee: 0, // 返佣服务费
  189. rebateFlag: 0 // 是否返佣订单
  190. },
  191. unionId: uni.getStorageSync('unionId') // 用户unionId
  192. },
  193. rebateFee: '',
  194. rebateFeeText: '否',
  195. confirmType: 1,
  196. submitState: '', // 提交状态
  197. isRequest: false, // 是否加载完成渲染子组件
  198. isFreight: false, // 是否加载完成渲染子组件
  199. isExchangePopup: false, // 控制兑换优惠券弹窗
  200. isfreightTip: false, // 控制邮费弹窗
  201. ischecked: false, // 是否勾选余额
  202. addressData: {}, // 初始化地址信息
  203. goodsData: [], // 初始化商品信息
  204. couponList: [], // 初始化优惠券信息
  205. invoiceData: { type: 0 }, // 初始化发票信息
  206. orderInfo: [], // 提交的商品信息
  207. payInfo: {}, // 订单信息
  208. rechargeGoods: false,
  209. clauseList: [],
  210. seconDepositFlg: true,
  211. rebatecheck: false,
  212. isCouponShow: false, // 是否显示可选优惠券
  213. secondflag: true,
  214. isCouponModel: false, // 兑换优惠券成功提示
  215. ExchangeCouponData: {} // 兑换优惠券信息
  216. }
  217. },
  218. onLoad(option) {
  219. //商品数据
  220. this.initStorage(option)
  221. },
  222. filters: {
  223. NumFormat(value) {
  224. //处理金额
  225. return Number(value).toFixed(2)
  226. }
  227. },
  228. methods: {
  229. async initStorage(option) {
  230. const data = JSON.parse(option.data)
  231. const clubInfo = await this.$api.getComStorage('orderUserInfo')
  232. const userInfo = await this.$api.getStorage()
  233. this.handleComType = option.type * 1
  234. this.productParam.clubId = this.cartParam.clubId = this.confirmParam.clubId = clubInfo.clubId
  235. this.productParam.serviceProviderId = userInfo.serviceProviderId
  236. this.cartParam.serviceProviderId = userInfo.serviceProviderId
  237. this.confirmParam.serviceProviderId = userInfo.serviceProviderId
  238. if (option.type == '1') {
  239. this.confirmType = 1
  240. this.productParam.productCount = data.data.productCount
  241. this.productParam.productId = data.data.productIds
  242. this.getAddressData(clubInfo.userId, 1)
  243. } else {
  244. this.confirmType = 2
  245. this.cartParam.skuIds = data.data.skuIds
  246. this.getAddressData(clubInfo.userId, 2)
  247. }
  248. },
  249. //协销购物车跳转确认订单初始化信息
  250. async getInitCrearOrder() {
  251. try {
  252. const res = await this.SellerService.SellerSettlement(this.cartParam)
  253. const data = res.data
  254. this.goodsData = data.list.map(el => {
  255. el.handlePostageFlag = el.postageFlag
  256. return el
  257. })
  258. this.userMoney = data.userMoney
  259. this.couponList = data.couponList
  260. this.reducedPrice = data.reducedPrice
  261. this.totalCount = data.totalCount
  262. this.allPrice = data.totalPrice
  263. this.rechargeGoods = data.includeRecharge
  264. this.clauseList = data.clauseList
  265. this.isCouponShow = true
  266. if (this.couponList.length > 0) {
  267. this.couponAmount = data.couponList[0].couponAmount
  268. this.confirmParam.clubCouponId = data.couponList[0].clubCouponId
  269. }
  270. this.orderShouldPayFee = this.allPrice - this.couponAmount
  271. this.isRequest = true
  272. } catch (error) {
  273. console.log('获取订单信息异常')
  274. }
  275. },
  276. //二手下单初始化查询
  277. async getInitProdcutCrearOrder() {
  278. try {
  279. this.seconDepositFlg = false
  280. const res = await this.SellerService.GetSettlementBySencondProduct(this.productParam)
  281. const data = res.data
  282. this.goodsData = data.list.map(el => {
  283. el.handlePostageFlag = el.postageFlag
  284. return el
  285. })
  286. this.userMoney = data.userMoney
  287. this.totalCount = data.totalCount
  288. this.allPrice = data.totalPrice
  289. this.orderShouldPayFee = this.allPrice
  290. this.isCouponShow = false
  291. this.secondflag = false
  292. this.isRequest = true
  293. } catch (error) {
  294. console.log('获取订单信息异常')
  295. }
  296. },
  297. //获取地址信息
  298. async getAddressData(userId, type) {
  299. try {
  300. const params = { pageNum: 1, pageSize: 1, userId: userId }
  301. const res = await this.UserService.QueryAddressList(params)
  302. const data = res.data
  303. if (data.list && data.list.length > 0) {
  304. this.addressData = data.list[0]
  305. this.confirmParam.addressId = this.addressData.addressId
  306. this.cartParam.cityId = this.addressData.cityId
  307. this.productParam.cityId = this.addressData.cityId
  308. }
  309. if (type === 1) {
  310. //立即都买提交
  311. this.getInitProdcutCrearOrder()
  312. }
  313. if (type === 2) {
  314. //购物车提交
  315. this.getInitCrearOrder()
  316. }
  317. } catch (error) {
  318. console.log('获取订单地址异常')
  319. }
  320. },
  321. handChangeInputGoodsList(data) {
  322. //对应供应商的留言信息
  323. this.goodsData = data
  324. },
  325. handleChoiceaInvoiceData(data) {
  326. //获取发票信息
  327. this.confirmParam.orderInvoice = data
  328. },
  329. handleClauseData(clauseId) {
  330. // 条款Id
  331. this.confirmParam.payInfo.clauseId = parseInt(clauseId)
  332. },
  333. handleChoiceaCouponData(data) {
  334. // 勾选使用优惠券
  335. console.log('优惠券信息', data)
  336. this.couponAmount = data.couponAmount
  337. this.totalDiscountAmount = this.reducedPrice + this.couponAmount
  338. this.confirmParam.clubCouponId = data.clubCouponId
  339. this.attributePallPrice()
  340. },
  341. handleClubVisibleData(data) {
  342. // 订单对机构是否可见
  343. console.log('对机构是否可见', data)
  344. this.confirmParam.orderSeen = Number(data)
  345. },
  346. orderSubmitMit() {
  347. //提交订单
  348. if (this.confirmParam.addressId == '') {
  349. this.$util.msg('请先添加收货地址~', 2000)
  350. return
  351. }
  352. this.SellerCreateOrderSubmit()
  353. // if (this.confirmParam.payInfo.rebateFlag === 2) {
  354. // if (this.rebateFee == 0) {
  355. // this.$util.msg('请输入返佣服务费', 2000)
  356. // return
  357. // }
  358. // this.confirmParam.payInfo.rebateFee = Number(this.rebateFee).toFixed(2)
  359. // }
  360. // this.modal = true
  361. // this.contentModalText = '请仔细确认订单是否为返佣订单后再提交订单'
  362. },
  363. SellerCreateOrderSubmit() {
  364. //提交订单
  365. if (this.isSubLoading) {
  366. return
  367. }
  368. this.confirmParam.orderInfo = this.hanldeProcessing()
  369. this.confirmParam.payInfo.orderShouldPayFee = this.orderShouldPayFee.toFixed(2)
  370. this.confirmParam.payInfo = JSON.stringify(this.confirmParam.payInfo)
  371. this.confirmParam.orderInfo = JSON.stringify(this.confirmParam.orderInfo)
  372. this.confirmParam.orderInvoice = JSON.stringify(this.confirmParam.orderInvoice)
  373. this.isSubLoading = true
  374. this.hanldeOrderSubmit(this.confirmParam)
  375. },
  376. // 处理数据格式
  377. hanldeProcessing() {
  378. return this.goodsData.map(el => {
  379. let productInfo = []
  380. el.cartList.forEach(pros => {
  381. productInfo.push({
  382. skuId: pros.skuId,
  383. productNum: pros.number,
  384. presentNum: 0,
  385. productType: pros.giftType
  386. })
  387. })
  388. return {
  389. splitCode: el.splitCode,
  390. shopId: el.shopId,
  391. note: el.note ? el.note : '',
  392. postage: el.isColdChina
  393. ? parseInt(el.postage + el.coldChain).toFixed(2)
  394. : parseInt(el.postage).toFixed(2),
  395. postageFlag: parseInt(el.handlePostageFlag),
  396. isColdChina: el.isColdChina ? 1 : 0,
  397. productInfo: productInfo
  398. }
  399. })
  400. },
  401. // 提交订单
  402. async hanldeOrderSubmit(params) {
  403. try {
  404. const res = await this.SellerService.SellerCreateOrderSubmit(params)
  405. const data = res.data
  406. if (data.code === 1) {
  407. this.$util.msg('支付成功', 2000, true, 'success')
  408. setTimeout(() => {
  409. this.isSubLoading = false
  410. this.$api.redirectTo('/pages/seller/order/order-list?listType=0')
  411. }, 2000)
  412. } else {
  413. this.$util.msg('订单提交成功', 2000, true, 'success')
  414. setTimeout(() => {
  415. this.isSubLoading = false
  416. this.$api.redirectTo('/pages/seller/order/order-list?listType=0')
  417. }, 2000)
  418. }
  419. } catch (error) {
  420. this.isSubLoading = false
  421. this.handleError(error)
  422. }
  423. },
  424. handleError(data) {
  425. // 提交订单异常处理
  426. this.formatConfirmParam()
  427. const buttonMap = {
  428. 1: {
  429. contentModalText:
  430. '订单内存在械字号三类商品,需要拥有医疗执业许可证的医美机构才能购买。建议升级医美机构后再下单,否则会导致订单退款或影响发货。',
  431. modalButton: [
  432. { text: '取消', type: 'gray', plain: true },
  433. {
  434. text: '继续提交',
  435. customStyle: { color: '#fff', bgColor: 'linear-gradient(90deg, #F28F31 0%, #FF5B00 100%)' },
  436. plain: false
  437. }
  438. ]
  439. }
  440. }
  441. if (data.code === -6) {
  442. // 非医美机构下三类商品订单
  443. this.modal = true
  444. this.showModalstauts = 2
  445. this.contentModalText = buttonMap[1].contentModalText
  446. this.modalButton = buttonMap[1].modalButton
  447. } else {
  448. this.$util.msg(data.msg, 3000)
  449. }
  450. },
  451. formatConfirmParam() {
  452. // 还原提交订单参数格式
  453. this.confirmParam.payInfo = JSON.parse(this.confirmParam.payInfo)
  454. this.confirmParam.orderInfo = JSON.parse(this.confirmParam.orderInfo)
  455. this.confirmParam.orderInvoice = JSON.parse(this.confirmParam.orderInvoice)
  456. },
  457. handleRebateFlag() {
  458. // 普通订单返佣
  459. let self = this
  460. uni.showActionSheet({
  461. itemList: ['返佣订单', '普通订单,存在返佣服务费', '否'],
  462. success: e => {
  463. switch (e.tapIndex) {
  464. case 0:
  465. self.confirmParam.payInfo.rebateFlag = 1
  466. self.rebateFeeText = '返佣订单'
  467. break
  468. case 1:
  469. self.confirmParam.payInfo.rebateFlag = 2
  470. self.rebateFeeText = '普通订单,存在返佣服务费'
  471. break
  472. case 2:
  473. self.confirmParam.payInfo.rebateFlag = 0
  474. self.rebateFeeText = '否'
  475. break
  476. }
  477. }
  478. })
  479. if (this.confirmParam.payInfo.rebateFlag === 1) {
  480. this.confirmParam.payInfo.balancePayFlag = 0
  481. this.couponAmount = 0
  482. this.confirmParam.clubCouponId = 0
  483. this.confirmParam.orderSeen = 2
  484. this.$refs.clubVisible.orderVisibleText = '不可见'
  485. this.$refs.clubVisible.current = 1
  486. this.orderShouldPayFee = this.allPrice + parseInt(this.freightData.postage) - this.couponAmount
  487. this.totalDiscountAmount = this.reducedPrice + this.couponAmount
  488. this.$refs.coupon.coupon.couponAmount = 0
  489. this.$refs.freight.infoData(this.freightData)
  490. this.$refs.freight.freightData = this.freightData
  491. this.handleFreightData = this.freightData
  492. } else {
  493. this.confirmParam.orderSeen = 1
  494. this.$refs.clubVisible.orderVisibleText = '可见'
  495. if (this.couponList.length > 0) {
  496. this.confirmParam.clubCouponId = this.couponList[0].clubCouponId
  497. this.$refs.coupon.coupon.couponAmount = this.couponAmount = this.couponList[0].couponAmount
  498. }
  499. this.totalDiscountAmount = this.reducedPrice + this.couponAmount
  500. this.orderShouldPayFee = this.allPrice + parseInt(this.freightData.postage) - this.couponAmount
  501. }
  502. },
  503. handleClick(e) {
  504. //确认提交
  505. if (e.index == 1) {
  506. if (this.showModalstauts == 2) {
  507. this.confirmParam.orderMiniType = 2
  508. this.SellerCreateOrderSubmit()
  509. } else {
  510. this.SellerCreateOrderSubmit()
  511. }
  512. }
  513. this.confirmParam.orderMiniType = 0
  514. this.modal = false
  515. },
  516. handleSecondFlag() {
  517. // 二手订单勾选返佣
  518. this.rebatecheck = !this.rebatecheck
  519. if (this.rebatecheck) {
  520. this.ischecked = false
  521. this.confirmParam.payInfo.rebateFlag = 1
  522. this.confirmParam.payInfo.balancePayFlag = 0
  523. this.confirmParam.clubCouponId = 0
  524. this.confirmParam.orderSeen = 2
  525. this.$refs.clubVisible.orderVisibleText = '不可见'
  526. this.$refs.clubVisible.current = 1
  527. this.orderShouldPayFee = this.allPrice + parseInt(this.freightData.postage)
  528. this.$refs.freight.infoData(this.freightData)
  529. this.$refs.freight.freightData = this.freightData
  530. this.handleFreightData = this.freightData
  531. } else {
  532. this.confirmParam.orderSeen = 1
  533. this.$refs.clubVisible.orderVisibleText = '可见'
  534. this.confirmParam.payInfo.rebateFlag = 0
  535. this.orderShouldPayFee = this.allPrice + parseInt(this.freightData.postage)
  536. }
  537. },
  538. handFreightAlertShow() {
  539. //显示邮费弹窗
  540. this.isfreightTip = true
  541. },
  542. handleClickCancel() {
  543. // 关闭优惠券弹窗
  544. this.isCouponModel = false
  545. this.getInitCrearOrder()
  546. },
  547. hideFreight() {
  548. //关闭邮费弹窗
  549. this.isfreightTip = false
  550. },
  551. hideMobel() {
  552. this.modal = false
  553. }
  554. },
  555. onShow() {
  556. let pages = getCurrentPages()
  557. let currPage = pages[pages.length - 1]
  558. if (currPage.data.select == 'select') {
  559. let address = uni.getStorageSync('selectAddress')
  560. this.confirmParam.addressId = address.addressId
  561. this.cartParam.cityId = address.cityId
  562. this.productParam.cityId = address.cityId
  563. this.addressData = address
  564. this.ischecked = false
  565. this.isRequest = false
  566. if (this.handleComType === 1) {
  567. //立即都买提交
  568. this.getInitProdcutCrearOrder()
  569. }
  570. if (this.handleComType === 2) {
  571. //购物车提交
  572. this.getInitCrearOrder()
  573. }
  574. }
  575. }
  576. }
  577. </script>
  578. <style lang="scss">
  579. page {
  580. height: auto;
  581. background: #f7f7f7;
  582. }
  583. .btn-hover {
  584. background: #ffffff;
  585. }
  586. .animation {
  587. /* transition: transform 0.3s ease;*/
  588. transition-property: transform;
  589. transition-duration: 0.3s;
  590. transition-timing-function: ease;
  591. }
  592. .invoice-freight {
  593. width: 702rpx;
  594. padding: 0 24rpx;
  595. height: 86rpx;
  596. line-height: 86rpx;
  597. font-size: $font-size-28;
  598. color: $text-color;
  599. background: #ffffff;
  600. float: left;
  601. font-weight: bold;
  602. .freight-left {
  603. float: left;
  604. .icon-yunfeishuoming {
  605. height: 100%;
  606. padding: 0 15rpx;
  607. color: $color-system;
  608. font-weight: normal;
  609. }
  610. }
  611. .freight-right {
  612. float: right;
  613. color: #2a81ff;
  614. }
  615. }
  616. .invoice-balance {
  617. width: 702rpx;
  618. height: auto;
  619. padding: 0 24rpx;
  620. background: #ffffff;
  621. float: left;
  622. margin-top: 24rpx;
  623. margin-bottom: 24rpx;
  624. .balabce-t {
  625. width: 100%;
  626. height: 86rpx;
  627. line-height: 86rpx;
  628. font-size: $font-size-28;
  629. color: $text-color;
  630. float: left;
  631. .balabce-t-le {
  632. float: left;
  633. font-weight: bold;
  634. }
  635. .balabce-t-ri {
  636. float: right;
  637. display: flex;
  638. align-items: center;
  639. .money {
  640. display: flex;
  641. float: left;
  642. }
  643. .checkbox-box {
  644. display: flex;
  645. width: 60rpx;
  646. float: left;
  647. height: 100%;
  648. font-size: $font-size-24;
  649. .checkbox {
  650. width: 40rpx;
  651. text-align: right;
  652. box-sizing: border-box;
  653. text-align: center;
  654. text-decoration: none;
  655. border-radius: 0;
  656. -webkit-tap-highlight-color: transparent;
  657. overflow: hidden;
  658. color: $color-system;
  659. padding: 5rpx;
  660. }
  661. }
  662. }
  663. }
  664. .balabce-b {
  665. width: 100%;
  666. float: left;
  667. overflow: hidden;
  668. .balabce-b-text {
  669. width: 100%;
  670. line-height: 58rpx;
  671. font-size: $font-size-24;
  672. color: #ff2a2a;
  673. text-align: right;
  674. float: right;
  675. }
  676. &.balabce-b--hide {
  677. padding: 0 0;
  678. height: 0px;
  679. line-height: 0px;
  680. }
  681. }
  682. }
  683. .footer {
  684. position: fixed;
  685. left: 0;
  686. bottom: 0;
  687. display: flex;
  688. align-items: center;
  689. width: 100%;
  690. height: 110rpx;
  691. line-height: 110rpx;
  692. justify-content: space-between;
  693. font-size: $font-size-28;
  694. background-color: #ffffff;
  695. z-index: 990;
  696. color: $text-color;
  697. .footer-le {
  698. width: 570rpx;
  699. height: 100%;
  700. float: left;
  701. }
  702. .footer-count {
  703. float: left;
  704. padding-left: 24rpx;
  705. width: 190rpx;
  706. box-sizing: border-box;
  707. font-size: $font-size-26;
  708. }
  709. .footer-price {
  710. width: 370rpx;
  711. float: right;
  712. text-align: right;
  713. color: $text-color;
  714. padding: 10rpx 20rpx 10rpx 0;
  715. box-sizing: border-box;
  716. .sum-none {
  717. width: 100%;
  718. height: 45rpx;
  719. line-height: 45rpx;
  720. color: $text-color;
  721. float: left;
  722. text-align: right;
  723. .money {
  724. font-size: $font-size-26;
  725. color: #999999;
  726. text-decoration: line-through;
  727. }
  728. .money-sign {
  729. font-size: $font-size-26;
  730. color: #999999;
  731. text-decoration: line-through;
  732. }
  733. .money-reduced {
  734. margin-left: 10rpx;
  735. font-size: $font-size-26;
  736. color: $color-system;
  737. }
  738. }
  739. .sum {
  740. width: 100%;
  741. height: 45rpx;
  742. line-height: 45rpx;
  743. float: left;
  744. &.none {
  745. height: 90rpx;
  746. line-height: 90rpx;
  747. }
  748. .price {
  749. font-size: $font-size-32;
  750. color: #ff2a2a;
  751. }
  752. }
  753. }
  754. .footer-submit {
  755. display: flex;
  756. align-items: center;
  757. justify-content: center;
  758. width: 180rpx;
  759. height: 100%;
  760. box-sizing: border-box;
  761. padding: 15rpx 5rpx;
  762. .btn {
  763. width: 100%;
  764. height: 100%;
  765. color: #ffffff;
  766. background: linear-gradient(90deg, #ff9300 0%, #ff5b00 100%);
  767. font-size: $font-size-26;
  768. text-align: center;
  769. line-height: 80rpx;
  770. border-radius: 40rpx;
  771. &.disabled {
  772. background: #e4e8eb;
  773. color: #999999;
  774. }
  775. }
  776. }
  777. }
  778. .order-return {
  779. width: 100%;
  780. height: auto;
  781. box-sizing: border-box;
  782. padding: 0 24rpx;
  783. background: #ffffff;
  784. float: left;
  785. margin: 24rpx 0;
  786. .order-return-main {
  787. width: 100%;
  788. height: 86rpx;
  789. line-height: 86rpx;
  790. .label {
  791. float: left;
  792. font-weight: bold;
  793. color: #333333;
  794. font-size: $font-size-28;
  795. }
  796. .label-right {
  797. float: right;
  798. color: #2a81ff;
  799. .text-l {
  800. font-size: 28rpx;
  801. font-weight: bold;
  802. margin-right: 20rpx;
  803. }
  804. .icon-xiayibu {
  805. line-height: 88rpx;
  806. color: #999999;
  807. font-weight: normal;
  808. }
  809. }
  810. }
  811. .order-return-input {
  812. width: 100%;
  813. height: 86rpx;
  814. padding-bottom: 20rpx;
  815. box-sizing: border-box;
  816. .input {
  817. width: 100%;
  818. height: 66rpx;
  819. font-size: $font-size-26;
  820. border: 1px solid #e1e1e1;
  821. line-height: 66rpx;
  822. color: #333333;
  823. border-radius: 4rpx;
  824. box-sizing: border-box;
  825. padding: 0 20rpx;
  826. }
  827. }
  828. }
  829. .Rebate {
  830. width: 702rpx;
  831. height: auto;
  832. padding: 0 24rpx;
  833. background: #ffffff;
  834. float: left;
  835. margin-bottom: 24rpx;
  836. margin-top: 24rpx;
  837. line-height: 86rpx;
  838. .rebate-title {
  839. float: left;
  840. font-weight: bold;
  841. color: #333333;
  842. font-size: $font-size-28;
  843. }
  844. .iconfont {
  845. float: right;
  846. color: #b2b2b2;
  847. font-size: 40rpx;
  848. &.icon-yixuanze {
  849. color: $color-system;
  850. }
  851. }
  852. }
  853. .coupon-content-model {
  854. width: 100%;
  855. height: 100%;
  856. background: rgba(0, 0, 0, 0.5);
  857. position: fixed;
  858. top: 0;
  859. left: 0;
  860. z-index: 8888;
  861. transition: all 0.4s;
  862. .coupon-alert-content {
  863. width: 600rpx;
  864. height: 612rpx;
  865. position: absolute;
  866. top: 0;
  867. left: 0;
  868. bottom: 0;
  869. right: 0;
  870. margin: auto;
  871. box-sizing: border-box;
  872. padding-top: 92rpx;
  873. .coupon {
  874. width: 600rpx;
  875. height: 522rpx;
  876. background: url(https://static.caimei365.com/app/img/icon/icon-coupon-alertbg@2x.png);
  877. background-size: cover;
  878. box-sizing: border-box;
  879. padding: 230rpx 40rpx 0 40rpx;
  880. .coupon-list {
  881. width: 100%;
  882. height: 147rpx;
  883. margin-bottom: 32rpx;
  884. box-sizing: border-box;
  885. background: url(https://static.caimei365.com/app/img/icon/icon-coupon-bg@2x.png);
  886. background-size: cover;
  887. position: relative;
  888. .list-cell-tags {
  889. display: inline-block;
  890. padding: 0 10rpx;
  891. height: 32rpx;
  892. line-height: 32rpx;
  893. background-color: #f94b4b;
  894. color: #ffffff;
  895. font-size: 18rpx;
  896. border-radius: 16rpx 0 16rpx 0;
  897. text-align: center;
  898. position: absolute;
  899. top: 0;
  900. left: 0;
  901. }
  902. .list-cell-le {
  903. width: 154rpx;
  904. height: 100%;
  905. box-sizing: border-box;
  906. padding: 30rpx 0;
  907. float: left;
  908. .coupon-maxMoney {
  909. width: 100%;
  910. height: 54rpx;
  911. line-height: 54rpx;
  912. font-size: 42rpx;
  913. color: #f94b4b;
  914. text-align: center;
  915. margin-top: 10rpx;
  916. .small {
  917. font-size: $font-size-20;
  918. }
  919. }
  920. .coupon-minMoney {
  921. width: 100%;
  922. height: 28rpx;
  923. float: left;
  924. box-sizing: border-box;
  925. padding-left: 24rpx;
  926. .txt {
  927. display: block;
  928. height: 28rpx;
  929. line-height: 28rpx;
  930. font-size: 16rpx;
  931. color: #f94b4b;
  932. text-align: center;
  933. padding: 0 5rpx;
  934. background-color: #fff1eb;
  935. border-radius: 4rpx;
  936. float: left;
  937. }
  938. }
  939. }
  940. .list-cell-ri {
  941. width: 366rpx;
  942. height: 100%;
  943. box-sizing: border-box;
  944. padding: 30rpx 20rpx;
  945. float: left;
  946. .list-cell-top {
  947. width: 100%;
  948. height: 64rpx;
  949. line-height: 64rpx;
  950. font-size: $font-size-26;
  951. color: #333333;
  952. float: left;
  953. text-overflow: ellipsis;
  954. display: -webkit-box;
  955. word-break: break-all;
  956. -webkit-box-orient: vertical;
  957. -webkit-line-clamp: 1;
  958. overflow: hidden;
  959. }
  960. .list-cell-time {
  961. width: 100%;
  962. height: 28rpx;
  963. line-height: 28rpx;
  964. text-align: left;
  965. font-size: $font-size-20;
  966. color: #999999;
  967. }
  968. }
  969. }
  970. .coupon-btn {
  971. width: 100%;
  972. height: 78rpx;
  973. background: url(https://static.caimei365.com/app/img/icon/icon-coupon-alertbtnbg@2x.png);
  974. background-size: cover;
  975. line-height: 78rpx;
  976. text-align: center;
  977. color: #ffffff;
  978. font-size: $font-size-36;
  979. }
  980. }
  981. }
  982. }
  983. </style>