order-sharedetails.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <template>
  2. <view class="container details clearfix">
  3. <!-- 地址选择 -->
  4. <order-address ref="orderAddress" v-if="isRequest" :addressData="addressData" ></order-address>
  5. <!-- 商品 -->
  6. <goods-list ref='goods' v-if="isRequest" :shopOrderData="shopOrderData" @popupClick="hanldePopupFn"></goods-list>
  7. <!-- 订单信息 -->
  8. <order-information ref="information" v-if="isRequest" :information="information"></order-information>
  9. <!-- 发票信息 -->
  10. <invoice-tent ref="invoice" v-if="isRequest" :orderInvoice="orderInvoice"></invoice-tent>
  11. <!-- 转账记录 -->
  12. <transfe-record ref="transfe" v-if="isRequest"></transfe-record>
  13. <!-- 支付记录 -->
  14. <payment-record ref="payment" v-if="isRequest" :discernReceiptList="discernReceiptList" :receiptAmount="receiptAmount"></payment-record>
  15. <!-- 退款记录 -->
  16. <refund-record ref="refund" v-if="isRequest" :returnedPurchaseList="returnedPurchaseList" :returnedPurchaseFee="returnedPurchaseFee"></refund-record>
  17. <!-- 底部button -->
  18. <view class="button-content" :style="{paddingBottom :isIphoneX ? '68rpx' : '0rpx'}">
  19. <view class="btn btn-query" v-if="btnState.isQuery" @click.stop="queryLogistics">查看物流</view>
  20. </view>
  21. <!-- 促销活动弹窗 -->
  22. <activi-popup :Promotion="handlerPros" :popupShow="popupShow"></activi-popup>
  23. </view>
  24. </template>
  25. <script>
  26. import orderAddress from '@/components/cm-module/orderDetails/orderAddress' //地址信息
  27. import goodsList from '@/components/cm-module/orderDetails/goodsList' //商品列表
  28. import invoiceTent from '@/components/cm-module/orderDetails/invoiceTent' //发票信息
  29. import orderInformation from '@/components/cm-module/orderDetails/orderInformation' //订单信息
  30. import transfeRecord from '@/components/cm-module/orderDetails/transfeRecord' //转账信息
  31. import paymentRecord from '@/components/cm-module/orderDetails/paymentRecord' //支付记录
  32. import refundRecord from '@/components/cm-module/orderDetails/refundRecord' //退款记录
  33. import activiPopup from '@/components/cm-module/orderDetails/activipopu' //促销活动弹窗
  34. export default {
  35. components:{
  36. orderInformation,
  37. orderAddress,
  38. invoiceTent,
  39. goodsList,
  40. transfeRecord,
  41. paymentRecord,
  42. refundRecord,
  43. activiPopup
  44. },
  45. data() {
  46. return {
  47. status:'',
  48. userId:'',
  49. orderId:'',
  50. cellPhone:'', //客服电话
  51. btnStatus:0, //按钮组件状态
  52. isRequest:false, //是否加载完成渲染子组件
  53. addressData:{}, //地址信息初始化
  54. information:{}, //订单信息初始化
  55. shopOrderData:{}, //商品信息初始化
  56. orderInvoice:{}, //发票信息初始化
  57. returnedPurchaseList:{}, //退款信息初始化
  58. discernReceiptList:{}, //支付信息初始化
  59. receiptAmount:0, //支付金额
  60. returnedPurchaseFee:0, //退款金额
  61. isIphoneX:this.$store.state.isIphoneX,
  62. popupShow:false,
  63. handlerPros:{},
  64. btnState:{
  65. isQuery:false
  66. },
  67. mapStateArr:[
  68. {label:'isQuery',val:[4,5,12,13,33,22,23,32,77],status: true},
  69. ]
  70. }
  71. },
  72. onLoad(option){
  73. this.orderId = option.orderId
  74. this.userId = option.userId
  75. this.initOrderDetaileData()
  76. },
  77. methods: {
  78. initOrderDetaileData(){//初始化页面数据@参数:订单ID
  79. this.OrderService.QueryOrderDetails({ orderId : this.orderId,userId : this.userId }).then(response =>{
  80. let data = response.data
  81. this.status = data.order.status
  82. this.addressData = data.userInfo
  83. this.information = data.order
  84. this.shopOrderData = data.shopOrderList
  85. this.orderInvoice = data.orderInvoice
  86. this.returnedPurchaseList = data.returnedPurchaseList
  87. this.discernReceiptList = data.discernReceiptList
  88. this.receiptAmount = data.order.receiptAmount
  89. this.returnedPurchaseFee = data.order.returnedPurchaseFee
  90. this.isRequest = true
  91. this.mapStateArr.forEach(el => {
  92. el.val.forEach(value => {
  93. if(this.status === value){
  94. this.btnState[el.label] = el.status
  95. }
  96. })
  97. })
  98. }).catch(error =>{
  99. this.$util.msg(error.msg,2000)
  100. })
  101. },
  102. hanldePopupFn(data){//监听活动内容
  103. this.popupShow = true
  104. this.handlerPros = data
  105. },
  106. queryLogistics(){//跳转查询物流页面
  107. this.$api.navigateTo('/pages/user/order/order-logistics?orderId='+this.orderId)
  108. },
  109. },
  110. onShow() {
  111. }
  112. }
  113. </script>
  114. <style lang="scss">
  115. page {
  116. height: auto;
  117. background:#F7F7F7;
  118. }
  119. .details{
  120. padding-bottom: 130rpx;
  121. }
  122. .btn-hover{
  123. background: #FFFFFF;
  124. }
  125. .animation{
  126. /* transition: transform 0.3s ease;*/
  127. transition-property: transform;
  128. transition-duration: 0.3s;
  129. transition-timing-function: ease;
  130. }
  131. .invoice-balance{
  132. width: 702rpx;
  133. height: auto;
  134. padding:0 24rpx;
  135. background: #FFFFFF;
  136. float: left;
  137. margin-top: 24rpx;
  138. margin-bottom: 24rpx;
  139. .balabce-t{
  140. width: 100%;
  141. height: 86rpx;
  142. line-height: 86rpx;
  143. font-size: $font-size-28;
  144. color: $text-color;
  145. float: left;
  146. .balabce-t-le{
  147. float: left;
  148. font-weight: bold;
  149. }
  150. .balabce-t-ri{
  151. float: right;
  152. display: flex;
  153. align-items: center;
  154. .money{
  155. display: flex;
  156. float: left;
  157. }
  158. .checkbox-box{
  159. display: flex;
  160. width: 60rpx;
  161. float: left;
  162. height: 100%;
  163. font-size: $font-size-24;
  164. .checkbox{
  165. width: 40rpx;
  166. text-align: right;
  167. box-sizing: border-box;
  168. text-align: center;
  169. text-decoration: none;
  170. border-radius: 0;
  171. -webkit-tap-highlight-color: transparent;
  172. overflow: hidden;
  173. }
  174. }
  175. }
  176. }
  177. .balabce-b{
  178. width: 100%;
  179. float: left;
  180. overflow: hidden;
  181. .balabce-b-text{
  182. width: 100%;
  183. line-height: 58rpx;
  184. font-size: $font-size-24;
  185. color: #FF2A2A;
  186. text-align: right;
  187. float: right;
  188. }
  189. &.balabce-b--hide {
  190. padding: 0 0;
  191. height: 0px;
  192. line-height: 0px;
  193. }
  194. }
  195. }
  196. .button-content{
  197. width: 702rpx;
  198. padding:0 24rpx;
  199. height: auto;
  200. background: #ffffff;
  201. position: fixed;
  202. bottom: 0;
  203. left:0 ;
  204. .btn{
  205. width: 160rpx;
  206. height: 64rpx;
  207. margin:22rpx;
  208. line-height: 64rpx;
  209. font-size:$font-size-26;
  210. color: #FFFFFF;
  211. text-align: center;
  212. float: right;
  213. }
  214. .btn-query{
  215. background:linear-gradient(135deg,rgba(255,212,129,1) 0%,rgba(198,129,0,1) 100%);
  216. }
  217. }
  218. </style>