create-order.vue 26 KB

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