order-sharedetails.vue 6.3 KB

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