create-order.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867
  1. <template>
  2. <view class="container order clearfix" :style="{paddingBottom :isIphoneX ? '170rpx' : '134rpx'}">
  3. <!-- 透明模态层 -->
  4. <modal-layer v-if='modallayer'></modal-layer>
  5. <!-- 地址选择 -->
  6. <choice-address ref="choiceAddress" v-if="isAddress" :addressData="addressData"></choice-address>
  7. <!-- 商品 -->
  8. <seller-goodsList ref='goods' v-if="isRequest" :goodsData="goodsData" @handleGoodList="handChangeInputGoodsList"></seller-goodsList>
  9. <!-- 返佣订单 -->
  10. <view class="Rebate" @click="RebateChang" v-if="goodsData.length==1 && secondflag && isDepositFlg">
  11. <text class="rebate-title">返佣订单</text>
  12. <text class="iconfont" :class="rebatecheck?'icon-yixuanze':'icon-weixuanze'" ></text>
  13. </view>
  14. <!-- 发票信息 -->
  15. <seller-invoice ref="invoice"
  16. v-if="isRequest && isDepositFlg"
  17. :invoiceDatas="invoiceData"
  18. @handleChoiceaInvoice="handleChoiceaInvoiceData">
  19. </seller-invoice>
  20. <!-- 优惠券选择弹窗 -->
  21. <sellerCoupon ref="coupon"
  22. v-if="isCouponShow"
  23. :couponList="couponList"
  24. @handleChoiceaCoupon="handleChoiceaCouponData">
  25. </sellerCoupon>
  26. <!-- 兑换优惠券弹窗 -->
  27. <sellerExchangeCoupon v-if="isExchangePopup"></sellerExchangeCoupon>
  28. <!-- 运费 -->
  29. <seller-freight ref="freight"
  30. v-if="isFreight && isDepositFlg"
  31. :freightDatas="freightData"
  32. @handleChoiceaFreight="handleChoiceaFreightData"
  33. @showFreightAlert="handFreightAlertShow">
  34. </seller-freight>
  35. <freight-alert v-if="isfreightTip" ref="csPhone"></freight-alert>
  36. <!-- 余额抵扣 -->
  37. <view class="invoice-balance" v-if="!rechargeGoods">
  38. <view class="balabce-t">
  39. <view class="balabce-t-le">余额抵扣</view>
  40. <view class="balabce-t-ri">
  41. <view class="money">
  42. <text>可用余额:</text>
  43. <text>¥{{ userMoney | NumFormat }}</text>
  44. </view>
  45. <view class="checkbox-box">
  46. <button class="checkbox iconfont"
  47. hover-class="btn-hover"
  48. v-if="userMoney!=0"
  49. @click.stop="checkedBalabce"
  50. :class="[ischecked ?'icon-yixuanze':'icon-weixuanze']"
  51. >
  52. </button>
  53. </view>
  54. </view>
  55. </view>
  56. <view class="balabce-b" :class="{'balabce-b--hide':!ischecked}">
  57. <view class="balabce-b-text animation"
  58. :style="{'transform':ischecked?'translateY(0)':'translateY(-50%)','-webkit-transform':ischecked?'translateY(0)':'translateY(-50%)'}">
  59. <text>当前使用:¥{{deductMoney | NumFormat}},剩余:¥{{ surplusMoney | NumFormat }}</text>
  60. </view>
  61. </view>
  62. </view>
  63. <!-- 售后条例 -->
  64. <seller-regulations ref="regulations"
  65. v-if="isRequest && isDepositFlg && seconDepositFlg"
  66. :regulaDatas="clauseList"
  67. @handleData="handleClauseData">
  68. </seller-regulations>
  69. <regula-alert v-if="isregulaTip" ref="csPhone"></regula-alert>
  70. <!-- 底部 -->
  71. <view class="footer" :style="{paddingBottom :isIphoneX ? '68rpx' : '0rpx'}">
  72. <view class="footer-le">
  73. <view class="footer-count">
  74. <text>共{{ totalCount }}件商品</text>
  75. </view>
  76. <view class="footer-price">
  77. <view class="sum" :class="totalDiscountAmount == 0 ? 'none' : ''">
  78. 总价:<text class="price">¥{{orderShouldPayFee | NumFormat}}</text>
  79. </view>
  80. <view class="sum-none" v-if="totalDiscountAmount > 0">
  81. <text class="money-reduced">共减<text>¥{{ totalDiscountAmount | NumFormat}}</text></text>
  82. </view>
  83. </view>
  84. </view>
  85. <view class="footer-submit" @click.stop="orderSubmitMit">
  86. <view class="btn">提交订单</view>
  87. </view>
  88. </view>
  89. <!-- 优惠券 -->
  90. <view class="coupon-content-model" v-if="isCouponModel">
  91. <view class="coupon-alert-content">
  92. <view class="coupon">
  93. <view class="coupon-list">
  94. <view class="list-cell-tags">{{ ExchangeCouponData.couponType | TypeFormat }}</text></view>
  95. <view class="list-cell-le">
  96. <view class="coupon-maxMoney">
  97. <text class="small">¥</text>
  98. {{ ExchangeCouponData.couponAmount }}
  99. </view>
  100. <view class="coupon-minMoney">
  101. <text class="txt">满{{ ExchangeCouponData.touchPrice }}可用</text>
  102. </view>
  103. </view>
  104. <view class="list-cell-ri">
  105. <view class="list-cell-top">
  106. <text v-if="ExchangeCouponData.couponType == 0">
  107. {{ ExchangeCouponData.productType && ExchangeCouponData.productType == 1 ? '全商城商品通用' : '仅可购买指定商品' }}
  108. </text>
  109. <text v-if="ExchangeCouponData.couponType == 1">
  110. {{ ExchangeCouponData.categoryType == 1 ? '仅限购买产品类商品' : '仅限购买仪器类商品' }}
  111. </text>
  112. <text v-if="ExchangeCouponData.couponType == 3">仅限购买店铺【{{ ExchangeCouponData.shopName }}】的商品</text>
  113. <text v-if="ExchangeCouponData.couponType == 4 || ExchangeCouponData.couponType == 2">全商城商品通用</text>
  114. </view>
  115. <view class="list-cell-time">{{ ExchangeCouponData.startDate }} - {{ ExchangeCouponData.endDate }}</view>
  116. </view>
  117. </view>
  118. <view class="coupon-btn" @click.stop="handleClickCancel">立即收下</view>
  119. </view>
  120. </view>
  121. </view>
  122. </view>
  123. </template>
  124. <script>
  125. import choiceAddress from '@/components/cm-module/creatOrder/sellerAddress'
  126. import sellerGoodsList from '@/components/cm-module/creatOrder/sellerGoodsList'
  127. import sellerInvoice from '@/components/cm-module/creatOrder/sellerInvoice'
  128. import sellerFreight from '@/components/cm-module/creatOrder/sellerFreight'
  129. import freightAlert from '@/components/cm-module/modelAlert/freightAlert.vue'
  130. import sellerCoupon from '@/components/cm-module/creatOrder/sellerCoupon'
  131. import sellerExchangeCoupon from '@/components/cm-module/creatOrder/sellerExchangeCoupon'
  132. import sellerRegulations from '@/components/cm-module/creatOrder/sellerRegulations.vue'
  133. import modalLayer from "@/components/modal-layer"
  134. const defaultProductParam = {
  135. productCount:0, // 商品数量
  136. productId:0, // 商品Id
  137. serviceProviderId:0,// 协销Id
  138. clubId:0 // 机构Id
  139. };
  140. const defaultCartParam = {
  141. productIds:0, // 商品Id(逗号隔开)
  142. serviceProviderId:0,// 协销Id
  143. clubId:0 // 机构Id
  144. };
  145. const defaultPostageParam = {
  146. productIds:0, // 商品Id(逗号隔开)
  147. userId:0, // 用户Id
  148. townId:0 // 地区Id
  149. };
  150. const defaultConfirmParam = {
  151. cartType:3, // 购买类型:(1自主下单, 3协销下单)
  152. orderSource:6, // 订单来源 1WWW 6小程序[采美,星范]
  153. addressId:0, // 收货地址Id
  154. clubCouponId:0, // 关联优惠券Id
  155. clubId:0, // 机构Id
  156. orderInfo:[], // 订单商品数据
  157. orderInvoice:{type:0}, // 订单发票信息
  158. payInfo:{ // 订单金额数据
  159. orderShouldPayFee: 0, // 订单最终支付金额
  160. balancePayFlag: 0, // 勾选余额的状态(1使用,0不使用)
  161. clauseId:0, // 条款Id
  162. postage: 0, // 运费金额
  163. postageFlag: 0, // 运费类型
  164. userBeans: 0, // 抵扣采美豆数量
  165. rebateFlag:0 // 是否返佣订单
  166. },
  167. unionId:uni.getStorageSync('unionId'),// 用户unionId
  168. };
  169. export default {
  170. components:{
  171. choiceAddress,
  172. sellerGoodsList,
  173. sellerInvoice,
  174. sellerFreight,
  175. sellerCoupon,
  176. sellerExchangeCoupon,
  177. freightAlert,
  178. modalLayer,
  179. sellerRegulations
  180. },
  181. data() {
  182. return {
  183. modallayer:false,
  184. isIphoneX:this.$store.state.isIphoneX,
  185. cartParam: Object.assign({}, defaultCartParam), // 购物车立即结算确认订单参数
  186. productParam: Object.assign({}, defaultProductParam), // 二手商品立即购买确认订单参数
  187. postageParam: Object.assign({}, defaultPostageParam), // 邮费计算参数
  188. confirmParam: Object.assign({}, defaultConfirmParam), // 提交订单参数
  189. productIds:'', //商品ID,
  190. confirmType:1,
  191. submitState:'', // 提交状态
  192. balanceDeductionFlag:2, // 勾选余额的状态(1使用,2不使用)
  193. totalCount:0, // 订单提交总数量
  194. reducedPrice:0, // 满减金额
  195. couponAmount:0, // 优惠券金额
  196. totalDiscountAmount:0, // 共减金额
  197. orderShouldPayFee:0.00, // 订单提交总金额
  198. allPrice:0.00, // 订单总金额
  199. surplusMoney:0.00, // 显示勾选后的剩余抵扣
  200. userMoney:0.00, // 显示可使用余额
  201. deductMoney:0.00, // 显示已使用的余额
  202. isRequest:false, // 是否加载完成渲染子组件
  203. isFreight:false, // 是否加载完成渲染子组件
  204. isAddress:false, // 是否加载完成地址
  205. isExchangePopup:false, // 控制兑换优惠券弹窗
  206. isfreightTip:false, // 控制邮费弹窗
  207. ischecked:false, // 是否勾选余额
  208. addressData:{}, // 初始化地址信息
  209. goodsData:[], // 初始化商品信息
  210. couponList:[], // 初始化优惠券信息
  211. invoiceData:{type:0}, // 初始化发票信息
  212. freightData:{}, // 邮费数据
  213. orderInfo:[], // 提交的商品信息
  214. payInfo:{}, // 订单信息
  215. rechargeGoods:false,
  216. isDepositFlg:true,
  217. depositIds : [6060,6061,6062,6063,6064,6065,6066,6067,6068,6069],//定金&充值余额商品ID
  218. clauseList:[],
  219. seconDepositFlg:true,
  220. rebatecheck:false,
  221. isCouponShow:false, // 是否显示可选优惠券
  222. secondflag:true,
  223. isCouponModel:false, // 兑换优惠券成功提示
  224. ExchangeCouponData:{} // 兑换优惠券信息
  225. }
  226. },
  227. onLoad(option){//商品数据
  228. this.initStorage(option)
  229. },
  230. filters:{
  231. NumFormat(value) {//处理金额
  232. return Number(value).toFixed(2);
  233. },
  234. },
  235. methods: {
  236. async initStorage(option){
  237. const data = JSON.parse(option.data)
  238. const clubInfo = await this.$api.getComStorage('orderUserInfo')
  239. const userInfo = await this.$api.getStorage()
  240. this.productParam.clubId = this.cartParam.clubId = this.confirmParam.clubId = clubInfo.clubID ? clubInfo.clubID : 0
  241. this.postageParam.userId = clubInfo.userID ? clubInfo.userID : 0
  242. this.productParam.serviceProviderId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
  243. this.cartParam.serviceProviderId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
  244. this.confirmParam.serviceProviderId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
  245. if(option.type =='prodcut'){
  246. this.confirmType = 1
  247. this.productParam.productCount = data.data.productCount
  248. this.productParam.productId = data.data.productIds
  249. this.productIds = this.postageParam.productIds = data.data.productIds
  250. this.getInitProdcutCrearOrder()
  251. }else{
  252. this.confirmType = 2
  253. this.productIds = this.cartParam.productIds = this.postageParam.productIds = data.data.productIds
  254. this.getInitCrearOrder()
  255. }
  256. },
  257. getInitCrearOrder(){//协销购物车跳转确认订单初始化信息
  258. this.SellerService.SellerSettlement(this.cartParam).then(response =>{
  259. let data = response.data
  260. this.isRequest = true
  261. this.goodsData = data.list
  262. this.userMoney = data.userMoney
  263. this.couponList = data.couponList
  264. this.reducedPrice = data.reducedPrice
  265. this.totalCount = data.totalCount
  266. this.allPrice = data.totalPrice
  267. this.rechargeGoods = data.includeRecharge
  268. this.clauseList = data.clauseList
  269. this.isCouponShow = true
  270. if(this.couponList.length>0){
  271. this.couponAmount = data.couponList[0].couponAmount
  272. this.confirmParam.clubCouponId = data.couponList[0].clubCouponId
  273. }
  274. this.orderShouldPayFee = this.allPrice - this.couponAmount
  275. this.totalDiscountAmount = this.reducedPrice + this.couponAmount
  276. this.goodsData.forEach(item =>{
  277. item.cartList.forEach(pros =>{
  278. if(this.depositIds.indexOf(pros.productId)>=0){
  279. this.isDepositFlg = false
  280. }
  281. })
  282. })
  283. }).catch(error =>{
  284. this.$util.msg(error.msg,2000)
  285. })
  286. },
  287. getInitProdcutCrearOrder(){//二手下单初始化查询
  288. this.seconDepositFlg = false;
  289. this.SellerService.GetSettlementBySencondProduct(this.productParam).then(response =>{
  290. const data = response.data
  291. this.isRequest = true
  292. this.goodsData = data.list
  293. this.userMoney = data.userMoney
  294. this.totalCount = data.totalCount
  295. this.allPrice = data.totalPrice
  296. this.orderShouldPayFee = this.allPrice
  297. this.isCouponShow = false
  298. this.secondflag = false
  299. }).catch(error =>{
  300. this.$util.msg(error.msg,2000)
  301. })
  302. },
  303. getFreightData(){//获取邮费信息
  304. this.OrderService.GetOrderPostage(this.postageParam).then(response =>{
  305. const data = response.data
  306. this.isFreight = true
  307. this.freightData = data
  308. if(data.postageFlag== 1){
  309. this.orderShouldPayFee = this.allPrice + data.postage
  310. this.attributePallPrice()
  311. }else{
  312. this.orderShouldPayFee = this.allPrice
  313. this.attributePallPrice()
  314. }
  315. })
  316. },
  317. async getAddressData(){//获取地址信息
  318. const clubInfo = await this.$api.getComStorage('orderUserInfo')
  319. this.UserService.QueryAddressList(
  320. {
  321. pageNum:1,
  322. pageSize:1,
  323. userId:clubInfo.userID,
  324. }
  325. ).then(response =>{
  326. let data = response.data
  327. this.isAddress = true
  328. this.addressData = {}
  329. if(response.data.results != ''){
  330. this.confirmParam.addressId = data.list[0].addressId;
  331. this.postageParam.townId = data.list[0].townId;
  332. this.addressData = data.list[0];
  333. this.getFreightData()
  334. }else{
  335. this.addressData = this.addressData;
  336. }
  337. })
  338. },
  339. handChangeInputGoodsList(data){//对应供应商的留言信息
  340. this.goodsData = data;
  341. },
  342. handleChoiceaInvoiceData(data){//获取发票信息
  343. this.confirmParam.orderInvoice = data
  344. },
  345. handleChoiceaFreightData(data){//获取运费信息
  346. if(data.postageFlag == 1){
  347. this.freightData = data
  348. this.orderShouldPayFee = this.allPrice + parseInt(data.postage)
  349. this.attributePallPrice()
  350. }else{
  351. this.freightData = data
  352. this.orderShouldPayFee = this.allPrice
  353. this.attributePallPrice()
  354. }
  355. },
  356. handleClauseData(clauseId){// 条款Id
  357. this.confirmParam.payInfo.clauseId = parseInt(clauseId);
  358. },
  359. handleChoiceaCouponData(data){// 勾选使用优惠券
  360. console.log('优惠券信息',data)
  361. this.couponAmount = data.couponAmount
  362. this.totalDiscountAmount = this.reducedPrice + this.couponAmount;
  363. this.clubCouponId = data.clubCouponId
  364. this.attributePallPrice()
  365. },
  366. checkedBalabce(){//勾选使用余额
  367. if(this.userMoney > 0){
  368. this.ischecked = !this.ischecked
  369. if(this.ischecked){
  370. this.balanceDeductionFlag =1
  371. this.attributePallPrice()
  372. }else{
  373. this.balanceDeductionFlag = 2
  374. if( this.freightData.postageFlag == 1 ){
  375. this.orderShouldPayFee = this.allPrice + parseInt(this.freightData.postage) - this.couponAmount
  376. }else{
  377. this.orderShouldPayFee = this.allPrice - this.couponAmount
  378. }
  379. }
  380. console.log('最终订单支付金额',this.orderShouldPayFee)
  381. console.log('优惠券金额',this.couponAmount)
  382. }else{
  383. return
  384. }
  385. },
  386. attributePallPrice(){//计算价格
  387. if( this.freightData.postageFlag == 1){
  388. this.attributeHashfreight(this.freightData.postage)
  389. }else{
  390. this.attributeNofreight()
  391. }
  392. },
  393. attributeNofreight(){//计算没有邮费的支付价格
  394. if(this.ischecked){
  395. let totalAmount = this.allPrice - this.couponAmount//计算不包邮的价格 总价等于商品价格+邮费
  396. if(this.userMoney > totalAmount){
  397. this.orderShouldPayFee = 0.00
  398. this.deductMoney = this.allPrice - this.couponAmount // 勾选后使用抵余额
  399. this.surplusMoney = this.userMoney - this.deductMoney // 勾选后的剩余抵扣
  400. }else{
  401. this.orderShouldPayFee = this.allPrice - this.userMoney - this.couponAmount //勾选后的总价
  402. this.deductMoney = this.userMoney // 勾选后使用抵余额
  403. this.surplusMoney = this.userMoney - this.deductMoney // 勾选后的剩余抵扣
  404. }
  405. }else{
  406. this.orderShouldPayFee = this.allPrice - this.couponAmount;
  407. this.deductMoney = 0.00
  408. this.surplusMoney = this.userMoney
  409. }
  410. console.log('最终订单支付金额',this.orderShouldPayFee)
  411. console.log('优惠券金额',this.couponAmount)
  412. },
  413. attributeHashfreight(postage){//计算需要邮费的支付价格
  414. let totalAmount = this.allPrice + parseInt(postage) - this.couponAmount//计算不包邮的价格 总价等于商品价格+邮费
  415. if(this.ischecked){
  416. if(this.userMoney > totalAmount ){ //余额大于支付金额
  417. this.orderShouldPayFee = 0.00
  418. this.deductMoney = this.allPrice + parseInt(postage) - this.couponAmount //勾选后使用抵余额
  419. this.surplusMoney = this.userMoney - this.deductMoney //勾选后的剩余抵扣
  420. }else{
  421. this.orderShouldPayFee = this.allPrice + parseInt(postage) - this.userMoney - this.couponAmount //勾选后的总价
  422. this.deductMoney = this.userMoney //勾选后使用抵余额
  423. this.surplusMoney = this.userMoney - this.deductMoney //勾选后的剩余抵扣
  424. }
  425. }else{
  426. this.orderShouldPayFee = this.allPrice + parseInt(postage) - this.couponAmount
  427. this.deductMoney = 0.00
  428. this.surplusMoney = this.userMoney
  429. }
  430. console.log('最终订单支付金额',this.orderShouldPayFee)
  431. console.log('优惠券金额',this.couponAmount)
  432. },
  433. orderSubmitMit(){//提交订单
  434. if(this.confirmParam.addressId == ''){
  435. this.$util.msg('请先添加收货地址~',2000)
  436. return
  437. }
  438. this.confirmParam.orderInfo = this.goodsData.map(el => {
  439. let productInfo = [];
  440. el.cartList.forEach(item => {
  441. productInfo.push({
  442. productId:item.productId,
  443. productNum:item.number,
  444. presentNum:0,
  445. productType:item.productType
  446. })
  447. })
  448. return {shopId:el.shopId,note:el.note?el.note:'',productInfo:productInfo}
  449. })
  450. this.confirmParam.payInfo.postage = parseInt(this.freightData.postage).toFixed(2)
  451. this.confirmParam.payInfo.postageFlag = parseInt(this.freightData.postageFlag)
  452. this.confirmParam.payInfo.orderShouldPayFee = this.orderShouldPayFee.toFixed(2)
  453. this.confirmParam.payInfo = JSON.stringify(this.confirmParam.payInfo)
  454. this.confirmParam.orderInfo = JSON.stringify(this.confirmParam.orderInfo)
  455. this.confirmParam.orderInvoice = JSON.stringify(this.confirmParam.orderInvoice)
  456. console.log(this.confirmParam)
  457. this.modalLayer = true;
  458. this.$util.modal('','请仔细确认订单是否为返佣订单后再提交订单','继续提交','再想一想',true,() =>{
  459. this.SellerService.SellerCreateOrderSubmit(this.confirmParam).then(response =>{
  460. const data = response.data;
  461. if(data.code === 1){
  462. this.$util.msg('支付成功',2000,true,'success')
  463. setTimeout(() =>{
  464. this.$api.redirectTo(`/pages/seller/order/order-details?type=cash&orderId=${data.orderId}&userId=${this.postageParam.userId}`)
  465. },2000)
  466. }else{
  467. this.$util.msg('订单提交成功',2000,true,'success')
  468. setTimeout(()=>{
  469. this.$api.redirectTo(`/pages/seller/order/order-details?type=cash&orderId=${data.orderId}&userId=${this.postageParam.userId}`)
  470. },2000)
  471. }
  472. }).catch(error =>{
  473. this.$util.msg(error.msg,2000);
  474. })
  475. })
  476. },
  477. RebateChang(){// 返佣订单勾选
  478. this.rebatecheck = !this.rebatecheck;
  479. if(this.rebatecheck){
  480. this.confirmParam.payInfo.rebateFlag=1;
  481. }else{
  482. this.confirmParam.payInfo.rebateFlag=0;
  483. }
  484. console.log(this.confirmParam.payInfo.rebateFlag)
  485. },
  486. handFreightAlertShow(){//显示邮费弹窗
  487. this.isfreightTip = true;
  488. },
  489. handleClickCancel(){// 关闭优惠券弹窗
  490. this.isCouponModel = false;
  491. this.getInitCrearOrder();
  492. },
  493. hideFreight(){//关闭邮费弹窗
  494. this.isfreightTip = false;
  495. },
  496. },
  497. onShow() {
  498. let pages = getCurrentPages();
  499. let currPage = pages[pages.length-1];
  500. if(currPage.data.select =='select'){
  501. this.isAddress = true
  502. let SelectData = uni.getStorageSync('selectAddress');
  503. this.confirmParam.addressId = SelectData.addressId;
  504. this.postageParam.townId = SelectData.townId
  505. this.addressData = SelectData
  506. this.getFreightData()
  507. }else{
  508. this.getAddressData()
  509. }
  510. }
  511. }
  512. </script>
  513. <style lang="scss">
  514. page {
  515. height: auto;
  516. background:#F7F7F7;
  517. }
  518. .btn-hover{
  519. background: #FFFFFF;
  520. }
  521. .animation{
  522. /* transition: transform 0.3s ease;*/
  523. transition-property: transform;
  524. transition-duration: 0.3s;
  525. transition-timing-function: ease;
  526. }
  527. .invoice-freight{
  528. width: 702rpx;
  529. padding: 0 24rpx;
  530. height: 86rpx;
  531. line-height: 86rpx;
  532. font-size: $font-size-28;
  533. color: $text-color;
  534. background: #FFFFFF;
  535. float: left;
  536. font-weight: bold;
  537. .freight-left{
  538. float: left;
  539. .icon-yunfeishuoming{
  540. height: 100%;
  541. padding: 0 15rpx;
  542. color: $color-system;
  543. font-weight: normal;
  544. }
  545. }
  546. .freight-right{
  547. float: right;
  548. color: #2A81FF;
  549. }
  550. }
  551. .invoice-balance{
  552. width: 702rpx;
  553. height: auto;
  554. padding:0 24rpx;
  555. background: #FFFFFF;
  556. float: left;
  557. margin-top: 24rpx;
  558. margin-bottom: 24rpx;
  559. .balabce-t{
  560. width: 100%;
  561. height: 86rpx;
  562. line-height: 86rpx;
  563. font-size: $font-size-28;
  564. color: $text-color;
  565. float: left;
  566. .balabce-t-le{
  567. float: left;
  568. font-weight: bold;
  569. }
  570. .balabce-t-ri{
  571. float: right;
  572. display: flex;
  573. align-items: center;
  574. .money{
  575. display: flex;
  576. float: left;
  577. }
  578. .checkbox-box{
  579. display: flex;
  580. width: 60rpx;
  581. float: left;
  582. height: 100%;
  583. font-size: $font-size-24;
  584. .checkbox{
  585. width: 40rpx;
  586. text-align: right;
  587. box-sizing: border-box;
  588. text-align: center;
  589. text-decoration: none;
  590. border-radius: 0;
  591. -webkit-tap-highlight-color: transparent;
  592. overflow: hidden;
  593. color: $color-system;
  594. padding: 5rpx;
  595. }
  596. }
  597. }
  598. }
  599. .balabce-b{
  600. width: 100%;
  601. float: left;
  602. overflow: hidden;
  603. .balabce-b-text{
  604. width: 100%;
  605. line-height: 58rpx;
  606. font-size: $font-size-24;
  607. color: #FF2A2A;
  608. text-align: right;
  609. float: right;
  610. }
  611. &.balabce-b--hide {
  612. padding: 0 0;
  613. height: 0px;
  614. line-height: 0px;
  615. }
  616. }
  617. }
  618. .footer{
  619. position: fixed;
  620. left: 0;
  621. bottom: 0;
  622. display: flex;
  623. align-items: center;
  624. width: 100%;
  625. height: 110rpx;
  626. line-height: 110rpx;
  627. justify-content: space-between;
  628. font-size: $font-size-28;
  629. background-color: #FFFFFF;
  630. z-index: 990;
  631. color: $text-color;
  632. .footer-le{
  633. width:570rpx;
  634. height:100%;
  635. float: left;
  636. }
  637. .footer-count{
  638. float: left;
  639. padding-left: 24rpx;
  640. width:190rpx;
  641. box-sizing: border-box;
  642. font-size: $font-size-26;
  643. }
  644. .footer-price{
  645. width:370rpx;
  646. float: right;
  647. text-align: right;
  648. color: $text-color;
  649. padding: 10rpx 20rpx 10rpx 0;
  650. box-sizing: border-box;
  651. .sum-none{
  652. width: 100%;
  653. height: 45rpx;
  654. line-height: 45rpx;
  655. color: $text-color;
  656. float: left;
  657. text-align: right;
  658. .money{
  659. font-size: $font-size-26;
  660. color: #999999;
  661. text-decoration: line-through;
  662. }
  663. .money-sign{
  664. font-size: $font-size-26;
  665. color: #999999;
  666. text-decoration: line-through;
  667. }
  668. .money-reduced{
  669. margin-left: 10rpx;
  670. font-size: $font-size-26;
  671. color:$color-system;
  672. }
  673. }
  674. .sum{
  675. width: 100%;
  676. height: 45rpx;
  677. line-height: 45rpx;
  678. float: left;
  679. &.none{
  680. height: 90rpx;
  681. line-height: 90rpx;
  682. }
  683. .price{
  684. font-size: $font-size-32;
  685. color: #FF2A2A;
  686. }
  687. }
  688. }
  689. .footer-submit{
  690. display:flex;
  691. align-items:center;
  692. justify-content: center;
  693. width: 180rpx;
  694. height: 100%;
  695. box-sizing: border-box;
  696. padding: 15rpx 5rpx;
  697. .btn{
  698. width: 100%;
  699. height: 100%;
  700. color: #FFFFFF;
  701. background:linear-gradient(135deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%);
  702. font-size: $font-size-26;
  703. text-align: center;
  704. line-height: 80rpx;
  705. border-radius: 40rpx;
  706. }
  707. }
  708. }
  709. .Rebate{
  710. width: 702rpx;
  711. height: auto;
  712. padding: 0 24rpx;
  713. background: #FFFFFF;
  714. float: left;
  715. margin-bottom: 24rpx;
  716. margin-top: 24rpx;
  717. line-height: 86rpx;
  718. .rebate-title{
  719. float: left;
  720. font-weight: bold;
  721. color: #333333;
  722. font-size: $font-size-28;
  723. }
  724. .iconfont{
  725. float: right;
  726. color: #b2b2b2;
  727. font-size: 40rpx;
  728. &.icon-yixuanze{
  729. color: $color-system;
  730. }
  731. }
  732. }
  733. .coupon-content-model{
  734. width: 100%;
  735. height: 100%;
  736. background: rgba(0,0,0,.5);
  737. position: fixed;
  738. top: 0;
  739. left: 0;
  740. z-index: 8888;
  741. transition: all 0.4s;
  742. .coupon-alert-content{
  743. width: 600rpx;
  744. height: 612rpx;
  745. position: absolute;
  746. top: 0;
  747. left: 0;
  748. bottom: 0;
  749. right: 0;
  750. margin: auto;
  751. box-sizing: border-box;
  752. padding-top: 92rpx;
  753. .coupon{
  754. width: 600rpx;
  755. height: 522rpx;
  756. background: url(https://static.caimei365.com/app/img/icon/icon-coupon-alertbg@2x.png);
  757. background-size: cover;
  758. box-sizing: border-box;
  759. padding: 230rpx 40rpx 0 40rpx;
  760. .coupon-list{
  761. width: 100%;
  762. height: 147rpx;
  763. margin-bottom: 32rpx;
  764. box-sizing: border-box;
  765. background: url(https://static.caimei365.com/app/img/icon/icon-coupon-bg@2x.png);
  766. background-size: cover;
  767. position: relative;
  768. .list-cell-tags{
  769. display: inline-block;
  770. padding: 0 10rpx;
  771. height: 32rpx;
  772. line-height: 32rpx;
  773. background-color: #f94b4b;
  774. color: #FFFFFF;
  775. font-size: 18rpx;
  776. border-radius: 16rpx 0 16rpx 0;
  777. text-align: center;
  778. position: absolute;
  779. top: 0;
  780. left: 0;
  781. }
  782. .list-cell-le{
  783. width: 154rpx;
  784. height: 100%;
  785. box-sizing: border-box;
  786. padding: 30rpx 0;
  787. float: left;
  788. .coupon-maxMoney{
  789. width: 100%;
  790. height: 54rpx;
  791. line-height: 54rpx;
  792. font-size: 42rpx;
  793. color: #f94b4b;
  794. text-align: center;
  795. margin-top: 10rpx;
  796. .small{
  797. font-size: $font-size-20;
  798. }
  799. }
  800. .coupon-minMoney{
  801. width: 100%;
  802. height: 28rpx;
  803. float: left;
  804. box-sizing: border-box;
  805. padding-left: 24rpx;
  806. .txt{
  807. display: block;
  808. height: 28rpx;
  809. line-height: 28rpx;
  810. font-size: 16rpx;
  811. color: #f94b4b;
  812. text-align: center;
  813. padding: 0 5rpx;
  814. background-color: #fff1eb;
  815. border-radius: 4rpx;
  816. float: left;
  817. }
  818. }
  819. }
  820. .list-cell-ri{
  821. width: 366rpx;
  822. height: 100%;
  823. box-sizing: border-box;
  824. padding:30rpx 20rpx;
  825. float: left;
  826. .list-cell-top{
  827. width: 100%;
  828. height: 64rpx;
  829. line-height: 64rpx;
  830. font-size: $font-size-26;
  831. color: #333333;
  832. float: left;
  833. text-overflow:ellipsis;
  834. display: -webkit-box;
  835. word-break: break-all;
  836. -webkit-box-orient: vertical;
  837. -webkit-line-clamp: 1;
  838. overflow: hidden;
  839. }
  840. .list-cell-time{
  841. width: 100%;
  842. height: 28rpx;
  843. line-height: 28rpx;
  844. text-align: left;
  845. font-size: $font-size-20;
  846. color: #999999;
  847. }
  848. }
  849. }
  850. .coupon-btn{
  851. width: 100%;
  852. height: 78rpx;
  853. background: url(https://static.caimei365.com/app/img/icon/icon-coupon-alertbtnbg@2x.png);
  854. background-size: cover;
  855. line-height: 78rpx;
  856. text-align: center;
  857. color: #FFFFFF;
  858. font-size: $font-size-36;
  859. }
  860. }
  861. }
  862. }
  863. </style>