expensesList.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <template>
  2. <view>
  3. <view class="payList">
  4. <uni-table border stripe emptyText="暂无更多数据" >
  5. <uni-tr>
  6. <uni-th align="center" width="80">维修项目/配件</uni-th>
  7. <uni-th align="center" width="30">数量</uni-th>
  8. <uni-th align="center" width="30">单价</uni-th>
  9. <uni-th align="center" width="30">工时费</uni-th>
  10. <uni-th align="center" width="30">总计</uni-th>
  11. <uni-th align="center" width="30">实收</uni-th>
  12. </uni-tr>
  13. <uni-tr v-for="(item,index) in tableList" :key="index">
  14. <uni-td align="center">{{item.goodsName}}</uni-td>
  15. <uni-td align="center">{{item.num}}</uni-td>
  16. <uni-td align="center">{{item.unitPrice}}</uni-td>
  17. <uni-td align="center">{{item.hourPrice}}</uni-td>
  18. <uni-td align="center">{{item.sumPrice}}</uni-td>
  19. <uni-td align="center">{{item.payPrice}}</uni-td>
  20. </uni-tr>
  21. </uni-table>
  22. <view class="dataBlock">
  23. <view class="payInfo">
  24. <view class="payTitle">合计费用</view>
  25. <view class="payPrice">¥{{payList.payNum || 0}}</view>
  26. </view>
  27. <view class="payInfo">
  28. <view class="payTitle">优惠费用</view>
  29. <view class="payPrice">-¥{{payList.discountPrice || 0}}</view>
  30. </view>
  31. <view class="payInfo">
  32. <view class="payTitle">实际支付</view>
  33. <view class="paySure">¥{{payList.payPrice}}</view>
  34. </view>
  35. <view class="payInfo">
  36. <view class="payTitle">支付状态</view>
  37. <view class="paySure">{{payList.payStatus==1?'已支付':payList.payStatus==2?'未支付':'已挂账'}}</view>
  38. </view>
  39. </view>
  40. </view>
  41. <view class="payBtn" @click="toPay()" v-if="payStatus === 4">立即支付</view>
  42. </view>
  43. </template>
  44. <script>
  45. import {
  46. orderDetail,
  47. payOrder
  48. } from '../../../api/maintain.js'
  49. export default {
  50. data() {
  51. return {
  52. orderId:'',
  53. type:1,
  54. provider:'',
  55. payList:{},
  56. tableList:[],
  57. payStatus : ''
  58. };
  59. },
  60. onLoad(options){
  61. this.orderId = options.id
  62. this.getOrderDetail()
  63. },
  64. methods:{
  65. getOrderDetail(){
  66. let data = {
  67. id : this.orderId
  68. }
  69. orderDetail(data).then(res=>{
  70. this.payList = res.data
  71. this.payStatus = res.data.status
  72. this.tableList = res.data.repairOrderServicesVO
  73. console.log(this.payStatus);
  74. })
  75. },
  76. toPay(){
  77. let data = {
  78. id:this.orderId,
  79. payType:this.type,
  80. payMoney:this.payList.payPrice
  81. }
  82. uni.navigateTo({
  83. url:'/pages/shop/cashierDesk/cashierDesk?page=maintenance&params='+JSON.stringify(data)
  84. })
  85. }
  86. }
  87. }
  88. </script>
  89. <style lang="less">
  90. page {
  91. background-color: #F5F5F5;
  92. }
  93. .payList{
  94. width: 630rpx;
  95. padding: 40rpx 30rpx;
  96. position: relative;
  97. left: calc(50% - 345rpx);
  98. background: #FFFFFF;
  99. border-radius: 10rpx;
  100. margin-top: 30rpx;
  101. }
  102. .dataBlock{
  103. width: 100%;
  104. margin-top: 30rpx;
  105. display: flex;
  106. flex-direction: column;
  107. .payInfo{
  108. width: 100%;
  109. display: flex;
  110. justify-content: space-between;
  111. align-items: center;
  112. margin-top: 30rpx;
  113. .payTitle{
  114. font-size: 26rpx;
  115. font-weight: 500;
  116. color: #666666;
  117. }
  118. .payPrice{
  119. font-size: 26rpx;
  120. font-weight: 500;
  121. color: #333333;
  122. }
  123. .paySure{
  124. font-size: 26rpx;
  125. font-weight: 500;
  126. color: #FE5C4A;
  127. }
  128. }
  129. }
  130. .payBtn{
  131. width: 690rpx;
  132. height: 90rpx;
  133. background: linear-gradient(0deg, #0036FF 0%, #008EFF 100%);
  134. border-radius: 45rpx;
  135. position: relative;
  136. left: calc(50% - 345rpx);
  137. font-size: 32rpx;
  138. font-weight: 500;
  139. color: #FFFFFF;
  140. line-height: 90rpx;
  141. text-align: center;
  142. margin-top: 180rpx;
  143. }
  144. </style>