order-sharedetails.vue 5.9 KB

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