order-sharedetails.vue 5.9 KB

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