orderPay.blade.php 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. @extends('layouts.base')
  2. @section('title', '订单支付记录')
  3. @section('content')
  4. <div id="app-order-pay" xmlns:v-bind="http://www.w3.org/1999/xhtml">
  5. <template>
  6. <el-table
  7. :data="list"
  8. style="width: 100%"
  9. :row-class-name="tableRowClassName">
  10. <el-table-column
  11. prop="id"
  12. label="id">
  13. </el-table-column>
  14. {{--<el-table-column--}}
  15. {{--prop="uid"--}}
  16. {{--label="用户id">--}}
  17. {{--</el-table-column>--}}
  18. <el-table-column
  19. label="支付单号">
  20. <template slot-scope="scope">
  21. <a v-bind:href="'{{ yzWebUrl('orderPay.detail', array('order_pay_id' => '')) }}'+[[scope.row.id]]"
  22. target="_blank">
  23. [[scope.row.pay_sn]]
  24. </a>
  25. </template>
  26. </el-table-column>
  27. <el-table-column
  28. prop="amount"
  29. label="支付金额">
  30. </el-table-column>
  31. <el-table-column
  32. prop="status_name"
  33. label="状态">
  34. </el-table-column>
  35. <el-table-column
  36. prop="pay_type_name"
  37. label="支付方式">
  38. </el-table-column>
  39. <el-table-column
  40. prop="created_at"
  41. label="创建时间">
  42. </el-table-column>
  43. <el-table-column
  44. prop="pay_time"
  45. label="支付时间">
  46. </el-table-column>
  47. <el-table-column
  48. prop="refund_time"
  49. label="退款时间">
  50. </el-table-column>
  51. </el-table>
  52. </template>
  53. </div>
  54. <style>
  55. .el-table .warning-row {
  56. background: oldlace;
  57. }
  58. .el-table .success-row {
  59. background: #f0f9eb;
  60. }
  61. </style>
  62. @endsection('content')
  63. @section('js')
  64. <script>
  65. var app = new Vue({
  66. el: '#app-order-pay',
  67. delimiters: ['[[', ']]'],
  68. data() {
  69. let orderPays = JSON.parse('{!! $orderPays !!}');
  70. return {
  71. list: orderPays
  72. }
  73. },
  74. mounted: function () {
  75. },
  76. methods: {
  77. tableRowClassName({row, rowIndex}) {
  78. if (row.status == 1) {
  79. return 'success-row';
  80. }else if(row.status == 2){
  81. return 'warning-row';
  82. }
  83. return '';
  84. }
  85. }
  86. });
  87. </script>
  88. @endsection('js')