create-order.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874
  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-gouxuanl':'icon-weigouxuan']"
  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="claData">
  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>共{{allCount}}件商品</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:1, // 购买类型:(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. allCount:1, // 订单提交总数量
  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. addressID:'', // 地址ID
  203. townID:'', // 区ID
  204. isRequest:false, // 是否加载完成渲染子组件
  205. isFreight:false, // 是否加载完成渲染子组件
  206. isAddress:false, // 是否加载完成地址
  207. isExchangePopup:false, // 控制兑换优惠券弹窗
  208. isfreightTip:false, // 控制邮费弹窗
  209. ischecked:false, // 是否勾选余额
  210. addressData:{}, // 初始化地址信息
  211. goodsData:[], // 初始化商品信息
  212. couponList:[], // 初始化优惠券信息
  213. invoiceData:{type:0}, // 初始化发票信息
  214. freightData:{}, // 邮费数据
  215. orderInfo:[], // 提交的商品信息
  216. payInfo:{}, // 订单信息
  217. rechargeGoods:false,
  218. isDepositFlg:true,
  219. depositIds : [6060,6061,6062,6063,6064,6065,6066,6067,6068,6069],//定金&充值余额商品ID
  220. clauseList:[],
  221. clauseId:0,
  222. seconDepositFlg:true,
  223. rebateFlag:0,
  224. rebatecheck:false,
  225. isCouponShow:false, // 是否显示可选优惠券
  226. secondflag:true,
  227. isCouponModel:false, // 兑换优惠券成功提示
  228. ExchangeCouponData:{} // 兑换优惠券信息
  229. }
  230. },
  231. onLoad(option){//商品数据
  232. this.initStorage(option)
  233. },
  234. filters:{
  235. NumFormat(value) {//处理金额
  236. return Number(value).toFixed(2);
  237. },
  238. },
  239. methods: {
  240. async initStorage(option){
  241. const data = JSON.parse(option.data)
  242. const clubInfo = await this.$api.getComStorage('orderUserInfo')
  243. const userInfo = await this.$api.getStorage()
  244. this.productParam.clubId = this.cartParam.clubId = this.confirmParam.clubId = clubInfo.clubID ? clubInfo.clubID : 0
  245. this.postageParam.userId = clubInfo.userID ? clubInfo.userID : 0
  246. this.productParam.serviceProviderId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
  247. this.cartParam.serviceProviderId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
  248. this.confirmParam.serviceProviderId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
  249. if(option.type =='prodcut'){
  250. this.confirmType = 1
  251. this.productParam.productCount = data.data.productCount
  252. this.productParam.productId = data.data.productIds
  253. this.productIds = this.postageParam.productIds = data.data.productIds
  254. this.getInitProdcutCrearOrder();
  255. }else{
  256. this.confirmType = 2
  257. this.productIds = this.cartParam.productIds = this.postageParam.productIds = data.data.productIds
  258. this.getInitCrearOrder();
  259. }
  260. },
  261. getInitCrearOrder(){//协销购物车跳转确认订单初始化信息
  262. this.SellerService.SellerSettlement(this.cartParam).then(response =>{
  263. let data = response.data
  264. this.isRequest = true
  265. this.goodsData = data.list
  266. this.userMoney = data.userMoney
  267. this.couponList = data.couponList
  268. this.reducedPrice = data.reducedPrice
  269. this.allPrice = data.totalAmount
  270. this.isCouponShow = true
  271. if(this.couponList.length>0){
  272. this.couponAmount = data.couponList[0].couponAmount
  273. this.confirmParam.clubCouponId = data.couponList[0].clubCouponId
  274. }
  275. this.orderShouldPayFee = this.allPrice - this.couponAmount
  276. this.totalDiscountAmount = this.reducedPrice + this.couponAmount
  277. this.rechargeGoods = data.includeRecharge
  278. this.clauseList = data.clauseList
  279. this.goodsData.forEach(item =>{
  280. item.cartList.forEach(pros =>{
  281. if(this.depositIds.indexOf(pros.productId)>=0){
  282. this.isDepositFlg = false
  283. }
  284. })
  285. })
  286. }).catch(error =>{
  287. this.$util.msg(error.msg,2000)
  288. })
  289. },
  290. getInitProdcutCrearOrder(){//二手下单初始化查询
  291. this.seconDepositFlg = false;
  292. this.SellerService.GetSettlementBySencondProduct(this.productParam).then(response =>{
  293. let resData = response.data
  294. this.isRequest = true
  295. this.goodsData = resData.shopList
  296. this.userMoney = resData.userMoney
  297. this.secondflag = false
  298. }).catch(error =>{
  299. this.$util.msg(error.msg,2000)
  300. })
  301. },
  302. getFreightData(){//获取邮费信息
  303. this.OrderService.GetOrderPostage(this.postageParam).then(response =>{
  304. this.isFreight = true
  305. this.freightData = response.data
  306. if(response.data.freePostFlag== 1){
  307. this.orderShouldPayFee = this.allPrice + response.data.freight
  308. this.attributePallPrice()
  309. }else{
  310. this.orderShouldPayFee = this.allPrice
  311. this.attributePallPrice()
  312. }
  313. })
  314. },
  315. getAddressData(){//获取地址信息
  316. this.$api.getComStorage('orderUserInfo').then((resolve) =>{
  317. this.UserService.QueryAddressList({pageNum:1,pageSize:1,userID:resolve.userID}).then(response =>{
  318. this.isAddress = true
  319. this.addressData = {}
  320. if(response.data.results != ''){
  321. this.addressID = response.data.results[0].addressID;
  322. this.townID = response.data.results[0].townID;
  323. this.addressData = response.data.results[0];
  324. this.getFreightData()
  325. }else{
  326. this.addressData = this.addressData;
  327. }
  328. })
  329. })
  330. },
  331. handChangeInputGoodsList(data){//对应供应商的留言信息
  332. this.goodsData = data;
  333. },
  334. handleChoiceaInvoiceData(data){//获取发票信息
  335. this.invoiceData = data
  336. },
  337. handleChoiceaFreightData(data){//获取运费信息
  338. if(data.freePostFlag == '1'){
  339. this.freightData = data
  340. this.orderShouldPayFee = this.allPrice + parseInt(data.freight)
  341. this.attributePallPrice()
  342. }else{
  343. this.freightData = data
  344. this.orderShouldPayFee = this.allPrice
  345. this.attributePallPrice()
  346. }
  347. },
  348. claData(id){
  349. this.clauseId = id;
  350. },
  351. handleChoiceaCouponData(data){// 勾选使用优惠券
  352. console.log('优惠券信息',data)
  353. this.couponAmount = data.couponAmount
  354. this.totalDiscountAmount = this.reducedPrice + this.couponAmount;
  355. this.clubCouponId = data.clubCouponId
  356. this.attributePallPrice()
  357. },
  358. checkedBalabce(){//勾选使用余额
  359. if(this.userMoney > 0){
  360. this.ischecked = !this.ischecked
  361. if(this.ischecked){
  362. this.balanceDeductionFlag =1
  363. this.attributePallPrice()
  364. }else{
  365. this.balanceDeductionFlag = 2
  366. if(this.freightData.freePostFlag == 1 || this.freightData.freePostFlag == '1'){
  367. this.orderShouldPayFee = this.allPrice + parseInt(this.freightData.freight) - this.couponAmount
  368. }else{
  369. this.orderShouldPayFee = this.allPrice - this.couponAmount
  370. }
  371. }
  372. console.log('最终订单支付金额',this.orderShouldPayFee)
  373. console.log('优惠券金额',this.couponAmount)
  374. }else{
  375. return
  376. }
  377. },
  378. attributePallPrice(){//计算价格
  379. if(this.freightData.freePostFlag == 1 || this.freightData.freePostFlag == '1'){
  380. this.attributeHashfreight(this.freightData.freight)
  381. }else{
  382. this.attributeNofreight()
  383. }
  384. },
  385. attributeNofreight(){//计算没有邮费的支付价格
  386. if(this.ischecked){
  387. let totalAmount = this.allPrice - this.couponAmount//计算不包邮的价格 总价等于商品价格+邮费
  388. if(this.userMoney > totalAmount){
  389. this.orderShouldPayFee = 0.00
  390. this.deductMoney = this.allPrice - this.couponAmount // 勾选后使用抵余额
  391. this.surplusMoney = this.userMoney - this.deductMoney // 勾选后的剩余抵扣
  392. }else{
  393. this.orderShouldPayFee = this.allPrice - this.userMoney - this.couponAmount //勾选后的总价
  394. this.deductMoney = this.userMoney // 勾选后使用抵余额
  395. this.surplusMoney = this.userMoney - this.deductMoney // 勾选后的剩余抵扣
  396. }
  397. }else{
  398. this.orderShouldPayFee = this.allPrice - this.couponAmount;
  399. this.deductMoney = 0.00
  400. this.surplusMoney = this.userMoney
  401. }
  402. console.log('最终订单支付金额',this.orderShouldPayFee)
  403. console.log('优惠券金额',this.couponAmount)
  404. },
  405. attributeHashfreight(freight){//计算需要邮费的支付价格
  406. let totalAmount = this.allPrice + parseInt(freight) - this.couponAmount//计算不包邮的价格 总价等于商品价格+邮费
  407. if(this.ischecked){
  408. if(this.userMoney > totalAmount ){ //余额大于支付金额
  409. this.orderShouldPayFee = 0.00
  410. this.deductMoney = this.allPrice + parseInt(freight) - this.couponAmount //勾选后使用抵余额
  411. this.surplusMoney = this.userMoney - this.deductMoney //勾选后的剩余抵扣
  412. }else{
  413. this.orderShouldPayFee = this.allPrice + parseInt(freight) - this.userMoney - this.couponAmount //勾选后的总价
  414. this.deductMoney = this.userMoney //勾选后使用抵余额
  415. this.surplusMoney = this.userMoney - this.deductMoney //勾选后的剩余抵扣
  416. }
  417. }else{
  418. this.orderShouldPayFee = this.allPrice + parseInt(freight) - this.couponAmount
  419. this.deductMoney = 0.00
  420. this.surplusMoney = this.userMoney
  421. }
  422. console.log('最终订单支付金额',this.orderShouldPayFee)
  423. console.log('优惠券金额',this.couponAmount)
  424. },
  425. orderSubmitMit(){//提交订单
  426. if(this.addressID == ''){
  427. this.$util.msg('请先添加收货地址~',2000)
  428. return
  429. }
  430. // 处理商品信息及留言
  431. this.orderInfo = this.goodsData.map(el => {
  432. let productInfo = [];
  433. el.cartList.forEach(item => {
  434. productInfo.push({
  435. productId:item.productID,
  436. productNum:item.productCount,
  437. productType:item.giftType ? Number(item.giftType) : 0,
  438. presentNum:0,
  439. })
  440. })
  441. return {shopId:el.shopID,note:el.note?el.note:'',productInfo:productInfo}
  442. })
  443. //订单信息
  444. this.payInfo = {
  445. orderShouldPayFee:this.orderShouldPayFee.toFixed(2),//提交的总价
  446. balancePayFlag:this.balanceDeductionFlag,//余额抵扣的状态
  447. freight:parseInt(this.freightData.freight).toFixed(2),//邮费
  448. freePostFlag:parseInt(this.freightData.freePostFlag),//运费形式
  449. clauseId:this.clauseId,//售后条款
  450. rebateFlag:this.rebateFlag,//返佣
  451. }
  452. console.log(this.payInfo)
  453. let params = {
  454. clubCouponId:this.clubCouponId,
  455. orderSource:6, //提交来源
  456. clubUserId:this.clubUserId, //机构UserID
  457. cartType:this.cartType, //从购物车提交
  458. serviceProviderId:this.serviceProviderId,//帮下单协销ID
  459. addressId:this.addressID, //地址ID
  460. orderInfo:this.orderInfo, //商品信息
  461. payInfo:this.payInfo, //订单信息
  462. orderInvoice:this.invoiceData //发票信息
  463. }
  464. this.modalLayer = true;
  465. this.$util.modal('','请仔细确认订单是否为返佣订单后再提交订单','继续提交','再想一想',true,() =>{
  466. this.SellerService.SellerCreateOrderSubmit({'params':JSON.stringify(params)}).then(response =>{
  467. const data = response.data;
  468. if(data.code === '1'){
  469. this.$util.msg('支付成功',2000,true,'success')
  470. setTimeout(() =>{
  471. this.$api.redirectTo(`/pages/seller/order/order-details?type=cash&orderID=${data.orderID}&userId=${this.clubUserId}`)
  472. },2000)
  473. }else{
  474. this.$util.msg('订单提交成功',2000,true,'success')
  475. setTimeout(()=>{
  476. this.$api.redirectTo(`/pages/seller/order/order-details?type=cash&orderID=${data.orderID}&userId=${this.clubUserId}`)
  477. },2000)
  478. }
  479. }).catch(error =>{
  480. this.$util.msg(error.msg,2000);
  481. })
  482. })
  483. },
  484. RebateChang(){// 返佣订单勾选
  485. this.rebatecheck = !this.rebatecheck;
  486. if(this.rebatecheck){
  487. this.rebateFlag=1;
  488. }else{
  489. this.rebateFlag=0;
  490. }
  491. console.log(this.rebateFlag)
  492. },
  493. handFreightAlertShow(){//显示邮费弹窗
  494. this.isfreightTip = true;
  495. },
  496. handleClickCancel(){// 关闭优惠券弹窗
  497. this.isCouponModel = false;
  498. this.getInitCrearOrder();
  499. },
  500. hideFreight(){//关闭邮费弹窗
  501. this.isfreightTip = false;
  502. },
  503. },
  504. onShow() {
  505. // this.addressID = ''
  506. let pages = getCurrentPages();
  507. let currPage = pages[pages.length-1];
  508. if(currPage.data.select =='select'){
  509. this.isAddress = true
  510. let SelectData = uni.getStorageSync('selectAddress');
  511. this.addressID = SelectData.addressID;
  512. this.addressData = SelectData
  513. this.getFreightData()
  514. }else{
  515. this.getAddressData()
  516. }
  517. }
  518. }
  519. </script>
  520. <style lang="scss">
  521. page {
  522. height: auto;
  523. background:#F7F7F7;
  524. }
  525. .btn-hover{
  526. background: #FFFFFF;
  527. }
  528. .animation{
  529. /* transition: transform 0.3s ease;*/
  530. transition-property: transform;
  531. transition-duration: 0.3s;
  532. transition-timing-function: ease;
  533. }
  534. .invoice-freight{
  535. width: 702rpx;
  536. padding: 0 24rpx;
  537. height: 86rpx;
  538. line-height: 86rpx;
  539. font-size: $font-size-28;
  540. color: $text-color;
  541. background: #FFFFFF;
  542. float: left;
  543. font-weight: bold;
  544. .freight-left{
  545. float: left;
  546. .icon-yunfeishuoming{
  547. height: 100%;
  548. padding: 0 15rpx;
  549. color: $color-system;
  550. font-weight: normal;
  551. }
  552. }
  553. .freight-right{
  554. float: right;
  555. color: #2A81FF;
  556. }
  557. }
  558. .invoice-balance{
  559. width: 702rpx;
  560. height: auto;
  561. padding:0 24rpx;
  562. background: #FFFFFF;
  563. float: left;
  564. margin-top: 24rpx;
  565. margin-bottom: 24rpx;
  566. .balabce-t{
  567. width: 100%;
  568. height: 86rpx;
  569. line-height: 86rpx;
  570. font-size: $font-size-28;
  571. color: $text-color;
  572. float: left;
  573. .balabce-t-le{
  574. float: left;
  575. font-weight: bold;
  576. }
  577. .balabce-t-ri{
  578. float: right;
  579. display: flex;
  580. align-items: center;
  581. .money{
  582. display: flex;
  583. float: left;
  584. }
  585. .checkbox-box{
  586. display: flex;
  587. width: 60rpx;
  588. float: left;
  589. height: 100%;
  590. font-size: $font-size-24;
  591. .checkbox{
  592. width: 40rpx;
  593. text-align: right;
  594. box-sizing: border-box;
  595. text-align: center;
  596. text-decoration: none;
  597. border-radius: 0;
  598. -webkit-tap-highlight-color: transparent;
  599. overflow: hidden;
  600. color: $color-system;
  601. padding: 5rpx;
  602. }
  603. }
  604. }
  605. }
  606. .balabce-b{
  607. width: 100%;
  608. float: left;
  609. overflow: hidden;
  610. .balabce-b-text{
  611. width: 100%;
  612. line-height: 58rpx;
  613. font-size: $font-size-24;
  614. color: #FF2A2A;
  615. text-align: right;
  616. float: right;
  617. }
  618. &.balabce-b--hide {
  619. padding: 0 0;
  620. height: 0px;
  621. line-height: 0px;
  622. }
  623. }
  624. }
  625. .footer{
  626. position: fixed;
  627. left: 0;
  628. bottom: 0;
  629. display: flex;
  630. align-items: center;
  631. width: 100%;
  632. height: 110rpx;
  633. line-height: 110rpx;
  634. justify-content: space-between;
  635. font-size: $font-size-28;
  636. background-color: #FFFFFF;
  637. z-index: 990;
  638. color: $text-color;
  639. .footer-le{
  640. width:570rpx;
  641. height:100%;
  642. float: left;
  643. }
  644. .footer-count{
  645. float: left;
  646. padding-left: 24rpx;
  647. width:190rpx;
  648. box-sizing: border-box;
  649. font-size: $font-size-26;
  650. }
  651. .footer-price{
  652. width:370rpx;
  653. float: right;
  654. text-align: right;
  655. color: $text-color;
  656. padding: 10rpx 20rpx 10rpx 0;
  657. box-sizing: border-box;
  658. .sum-none{
  659. width: 100%;
  660. height: 45rpx;
  661. line-height: 45rpx;
  662. color: $text-color;
  663. float: left;
  664. text-align: right;
  665. .money{
  666. font-size: $font-size-26;
  667. color: #999999;
  668. text-decoration: line-through;
  669. }
  670. .money-sign{
  671. font-size: $font-size-26;
  672. color: #999999;
  673. text-decoration: line-through;
  674. }
  675. .money-reduced{
  676. margin-left: 10rpx;
  677. font-size: $font-size-26;
  678. color:$color-system;
  679. }
  680. }
  681. .sum{
  682. width: 100%;
  683. height: 45rpx;
  684. line-height: 45rpx;
  685. float: left;
  686. &.none{
  687. height: 90rpx;
  688. line-height: 90rpx;
  689. }
  690. .price{
  691. font-size: $font-size-32;
  692. color: #FF2A2A;
  693. }
  694. }
  695. }
  696. .footer-submit{
  697. display:flex;
  698. align-items:center;
  699. justify-content: center;
  700. width: 180rpx;
  701. height: 100%;
  702. box-sizing: border-box;
  703. padding: 15rpx 5rpx;
  704. .btn{
  705. width: 100%;
  706. height: 100%;
  707. color: #FFFFFF;
  708. background:linear-gradient(135deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%);
  709. font-size: $font-size-26;
  710. text-align: center;
  711. line-height: 80rpx;
  712. border-radius: 40rpx;
  713. }
  714. }
  715. }
  716. .Rebate{
  717. width: 702rpx;
  718. height: auto;
  719. padding: 0 24rpx;
  720. background: #FFFFFF;
  721. float: left;
  722. margin-bottom: 24rpx;
  723. margin-top: 24rpx;
  724. line-height: 86rpx;
  725. .rebate-title{
  726. float: left;
  727. font-weight: bold;
  728. color: #333333;
  729. font-size: $font-size-28;
  730. }
  731. .iconfont{
  732. float: right;
  733. color: #b2b2b2;
  734. font-size: 40rpx;
  735. &.icon-yixuanze{
  736. color: $color-system;
  737. }
  738. }
  739. }
  740. .coupon-content-model{
  741. width: 100%;
  742. height: 100%;
  743. background: rgba(0,0,0,.5);
  744. position: fixed;
  745. top: 0;
  746. left: 0;
  747. z-index: 8888;
  748. transition: all 0.4s;
  749. .coupon-alert-content{
  750. width: 600rpx;
  751. height: 612rpx;
  752. position: absolute;
  753. top: 0;
  754. left: 0;
  755. bottom: 0;
  756. right: 0;
  757. margin: auto;
  758. box-sizing: border-box;
  759. padding-top: 92rpx;
  760. .coupon{
  761. width: 600rpx;
  762. height: 522rpx;
  763. background: url(https://static.caimei365.com/app/img/icon/icon-coupon-alertbg@2x.png);
  764. background-size: cover;
  765. box-sizing: border-box;
  766. padding: 230rpx 40rpx 0 40rpx;
  767. .coupon-list{
  768. width: 100%;
  769. height: 147rpx;
  770. margin-bottom: 32rpx;
  771. box-sizing: border-box;
  772. background: url(https://static.caimei365.com/app/img/icon/icon-coupon-bg@2x.png);
  773. background-size: cover;
  774. position: relative;
  775. .list-cell-tags{
  776. display: inline-block;
  777. padding: 0 10rpx;
  778. height: 32rpx;
  779. line-height: 32rpx;
  780. background-color: #f94b4b;
  781. color: #FFFFFF;
  782. font-size: 18rpx;
  783. border-radius: 16rpx 0 16rpx 0;
  784. text-align: center;
  785. position: absolute;
  786. top: 0;
  787. left: 0;
  788. }
  789. .list-cell-le{
  790. width: 154rpx;
  791. height: 100%;
  792. box-sizing: border-box;
  793. padding: 30rpx 0;
  794. float: left;
  795. .coupon-maxMoney{
  796. width: 100%;
  797. height: 54rpx;
  798. line-height: 54rpx;
  799. font-size: 42rpx;
  800. color: #f94b4b;
  801. text-align: center;
  802. margin-top: 10rpx;
  803. .small{
  804. font-size: $font-size-20;
  805. }
  806. }
  807. .coupon-minMoney{
  808. width: 100%;
  809. height: 28rpx;
  810. float: left;
  811. box-sizing: border-box;
  812. padding-left: 24rpx;
  813. .txt{
  814. display: block;
  815. height: 28rpx;
  816. line-height: 28rpx;
  817. font-size: 16rpx;
  818. color: #f94b4b;
  819. text-align: center;
  820. padding: 0 5rpx;
  821. background-color: #fff1eb;
  822. border-radius: 4rpx;
  823. float: left;
  824. }
  825. }
  826. }
  827. .list-cell-ri{
  828. width: 366rpx;
  829. height: 100%;
  830. box-sizing: border-box;
  831. padding:30rpx 20rpx;
  832. float: left;
  833. .list-cell-top{
  834. width: 100%;
  835. height: 64rpx;
  836. line-height: 64rpx;
  837. font-size: $font-size-26;
  838. color: #333333;
  839. float: left;
  840. text-overflow:ellipsis;
  841. display: -webkit-box;
  842. word-break: break-all;
  843. -webkit-box-orient: vertical;
  844. -webkit-line-clamp: 1;
  845. overflow: hidden;
  846. }
  847. .list-cell-time{
  848. width: 100%;
  849. height: 28rpx;
  850. line-height: 28rpx;
  851. text-align: left;
  852. font-size: $font-size-20;
  853. color: #999999;
  854. }
  855. }
  856. }
  857. .coupon-btn{
  858. width: 100%;
  859. height: 78rpx;
  860. background: url(https://static.caimei365.com/app/img/icon/icon-coupon-alertbtnbg@2x.png);
  861. background-size: cover;
  862. line-height: 78rpx;
  863. text-align: center;
  864. color: #FFFFFF;
  865. font-size: $font-size-36;
  866. }
  867. }
  868. }
  869. }
  870. </style>