order-sharedetails.vue 6.7 KB

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