order-sharedetails.vue 6.1 KB

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