order-sharedetails.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  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.orderId = 11315
  75. this.initOrderDetaileData()
  76. },
  77. methods: {
  78. initOrderDetaileData(){//初始化页面数据@参数:订单ID
  79. this.OrderService.QueryOrderDetails({ orderId : this.orderId }).then(response =>{
  80. let resData = response.data;
  81. this.isRequest = true
  82. this.userID = resData.order.userID
  83. this.status = resData.order.status
  84. this.addressData = resData.userInfo
  85. this.information = resData.order
  86. this.shopOrderData = resData.shopOrderList
  87. this.orderInvoice = resData.orderInvoice
  88. this.returnedPurchaseList = resData.returnedPurchaseList
  89. this.discernReceiptList = resData.discernReceiptList
  90. this.receiptAmount = resData.order.receiptAmount
  91. this.returnedPurchaseFee = resData.order.returnedPurchaseFee
  92. this.mapStateArr.forEach(el => {
  93. el.val.forEach(value => {
  94. if(this.status === value){
  95. this.btnState[el.label] = el.status
  96. }
  97. })
  98. })
  99. }).catch(error =>{
  100. this.$util.msg(error.msg,2000);
  101. })
  102. },
  103. hanldePopupFn(data){//监听活动内容
  104. this.popupShow = true
  105. this.handlerPros = data
  106. },
  107. queryLogistics(){//跳转查询物流页面
  108. this.$api.navigateTo('/pages/user/order/order-logistics?orderId='+this.orderId)
  109. },
  110. },
  111. onShow() {
  112. }
  113. }
  114. </script>
  115. <style lang="scss">
  116. page {
  117. height: auto;
  118. background:#F7F7F7;
  119. }
  120. .details{
  121. padding-bottom: 130rpx;
  122. }
  123. .btn-hover{
  124. background: #FFFFFF;
  125. }
  126. .animation{
  127. /* transition: transform 0.3s ease;*/
  128. transition-property: transform;
  129. transition-duration: 0.3s;
  130. transition-timing-function: ease;
  131. }
  132. .invoice-balance{
  133. width: 702rpx;
  134. height: auto;
  135. padding:0 24rpx;
  136. background: #FFFFFF;
  137. float: left;
  138. margin-top: 24rpx;
  139. margin-bottom: 24rpx;
  140. .balabce-t{
  141. width: 100%;
  142. height: 86rpx;
  143. line-height: 86rpx;
  144. font-size: $font-size-28;
  145. color: $text-color;
  146. float: left;
  147. .balabce-t-le{
  148. float: left;
  149. font-weight: bold;
  150. }
  151. .balabce-t-ri{
  152. float: right;
  153. display: flex;
  154. align-items: center;
  155. .money{
  156. display: flex;
  157. float: left;
  158. }
  159. .checkbox-box{
  160. display: flex;
  161. width: 60rpx;
  162. float: left;
  163. height: 100%;
  164. font-size: $font-size-24;
  165. .checkbox{
  166. width: 40rpx;
  167. text-align: right;
  168. box-sizing: border-box;
  169. text-align: center;
  170. text-decoration: none;
  171. border-radius: 0;
  172. -webkit-tap-highlight-color: transparent;
  173. overflow: hidden;
  174. }
  175. }
  176. }
  177. }
  178. .balabce-b{
  179. width: 100%;
  180. float: left;
  181. overflow: hidden;
  182. .balabce-b-text{
  183. width: 100%;
  184. line-height: 58rpx;
  185. font-size: $font-size-24;
  186. color: #FF2A2A;
  187. text-align: right;
  188. float: right;
  189. }
  190. &.balabce-b--hide {
  191. padding: 0 0;
  192. height: 0px;
  193. line-height: 0px;
  194. }
  195. }
  196. }
  197. .button-content{
  198. width: 702rpx;
  199. padding:0 24rpx;
  200. height: auto;
  201. background: #ffffff;
  202. position: fixed;
  203. bottom: 0;
  204. left:0 ;
  205. .btn{
  206. width: 160rpx;
  207. height: 64rpx;
  208. margin:22rpx;
  209. line-height: 64rpx;
  210. font-size:$font-size-26;
  211. color: #FFFFFF;
  212. text-align: center;
  213. float: right;
  214. }
  215. .btn-query{
  216. background:linear-gradient(135deg,rgba(255,212,129,1) 0%,rgba(198,129,0,1) 100%);
  217. }
  218. }
  219. </style>