企微助手 ,仓库名 短剧

orderCharge.vue 4.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <template>
  2. <div class="con" v-loading="loading">
  3. <ux-grid class="uxGridBox" ref="plxTable" :border="false" @row-click="()=>{return}" :header-cell-style="headerColor" :height="height" show-footer-overflow="tooltip" show-overflow="tooltip" size="mini">
  4. <ux-table-column v-for="item in desCol" :key="item.prop" :resizable="true" :field="item.prop" :title="item.label" :min-width="item.min_width?item.min_width:120" :fixed="item.fixed?item.fixed:''" align="center">
  5. <template #header>
  6. <div class="flex-align-jus-center">{{item.label}}
  7. <el-tooltip v-if="item.notes" :content="item.notes" placement="top">
  8. <div><i class="el-icon-question"></i></div>
  9. </el-tooltip>
  10. </div>
  11. </template>
  12. <template v-slot="{ row,$index }">
  13. <span v-if="item.prop == 'order_id'">
  14. {{row[item.prop]?row[item.prop]:'-'}}
  15. </span>
  16. <span v-else-if="item.prop == 'name'">
  17. {{row[item.prop]?row[item.prop]:'-'}}
  18. </span>
  19. <span v-else-if="item.prop == 'pay_status'">
  20. {{row[item.prop]?(row[item.prop]==1?'已付款':'未付款'):'-'}}
  21. </span>
  22. <span v-else>{{row[item.prop]||row[item.prop]==0?$formatNum(row[item.prop]):'-' }}</span>
  23. </template>
  24. </ux-table-column>
  25. </ux-grid>
  26. <div class="pagination" v-show="total>0">
  27. <el-pagination background :current-page="page" @current-change="handleCurrentChange" layout="prev, pager, next" :page-count='Number(pages)'>
  28. </el-pagination>
  29. </div>
  30. </div>
  31. </template>
  32. <script>
  33. import noData from "../assembly/noData";
  34. export default {
  35. name: "order",
  36. props:['rowProp'],
  37. components:{
  38. noData
  39. },
  40. data(){
  41. return{
  42. loading:false,
  43. desCol: [
  44. { prop: "order_id", label: "订单ID", min_width: 180, fixed: 'left' },
  45. { prop: "wx_account", label: "公众号", },
  46. { prop: "name", label: "用户昵称", min_width: 160 },
  47. { prop: "mp_user_register_time", label: "用户注册时间", min_width: 160 },
  48. { prop: "pay_status", label: "订单状态", },
  49. { prop: "order_pay_time", label: "下单时间" , min_width: 160},
  50. { prop: "pay_money", label: "支付金额(元)" },
  51. // { prop: "first_day_roi", label: "充值次数", },
  52. { prop: "order_source", label: "订单来源", },
  53. { prop: "playlet_name", label: "剧名", min_width: 160 },
  54. // { prop: "recall_rate2", label: "订单类型", },
  55. { prop: "ad_report_action_type", label: "回传类型", },
  56. { prop: "ad_report_order_status", label: "下单回传结果", },
  57. { prop: "ad_report_purchase_status", label: "付费回传结果", },
  58. // { prop: "ad_report_status", label: "回传结果", },
  59. ],
  60. page:1,
  61. pages:0,
  62. page_size:20,
  63. total:0,
  64. }
  65. },
  66. created() {
  67. this.height = document.documentElement.clientHeight - 280 > 400 ? document.documentElement.clientHeight - 280 : 400
  68. this.init()
  69. },
  70. methods:{
  71. headerColor ({ row, column, rowIndex, columnIndex }) {
  72. return { backgroundColor: '#FFFFFF !important', border: 'none!important' }
  73. },
  74. init(){
  75. this.loading = true
  76. let data={
  77. unionid: this.rowProp.unionid,
  78. page:this.page,
  79. page_size:this.page_size
  80. }
  81. this.$axios.post(this.URL.BASEURL + this.URL.charge_list,data).then((res)=>{
  82. this.loading = false
  83. res=res.data
  84. if(res&&res.errno==0){
  85. this.datas = res.rst.data
  86. this.$refs.plxTable.reloadData(this.datas)
  87. this.page = res.rst.pageInfo.page
  88. this.pages = res.rst.pageInfo.pages
  89. this.page_size = res.rst.pageInfo.size
  90. this.total = res.rst.pageInfo.total
  91. }else{
  92. this.$message({
  93. message: res.err,
  94. type: "info"
  95. })
  96. }
  97. }).catch(err=>{
  98. this.loading = false
  99. })
  100. },
  101. handleCurrentChange (val) {
  102. this.page = val
  103. this.init()
  104. },
  105. }
  106. }
  107. </script>
  108. <style lang="scss" scoped>
  109. .con{
  110. position: relative;
  111. .uxGridBox{
  112. border: 1px solid #EBEEF5;
  113. }
  114. .thead{
  115. background: #FBFBFB;
  116. border: 1px solid #D2D2D2;
  117. font-size: 14px;
  118. color: #666;
  119. display: flex;
  120. align-items: center;
  121. position: sticky;
  122. top: 60px;
  123. .thead_item{
  124. //width: 25%;
  125. min-width: 180px;
  126. padding: 6px;
  127. text-align: center;
  128. }
  129. }
  130. .tbody{
  131. .tbody_item{
  132. margin-top: 20px;
  133. text-align: center;
  134. display: flex;
  135. align-items: center;
  136. color: #333;
  137. font-size: 13px;
  138. div{
  139. width: 25%;
  140. }
  141. .c-00B38A{
  142. color: #00B38A;
  143. }
  144. }
  145. }
  146. }
  147. </style>