index.vue 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <div>
  3. <listTemp ref="list" :columns="columns" :param="param" :tableName="'payOrdersTable'" keyRouteName="orderno" :searchType="searchType" :detailPage="{name:'payOrdersDetail',idname:'sys_payorderid'}">
  4. <template #operation>
  5. <addTemp @payClose="onSuccess"></addTemp>
  6. </template>
  7. <template #tb_cell="{data}">
  8. <template v-if="data.column.dataIndex === 'ispaid'">
  9. <span v-if="data.record.ispaid == '0'" style="color: #4f7bfd">未付费</span>
  10. <span v-else-if="data.record.ispaid == '3'" style="color: #afb0be">已取消</span>
  11. <span v-else-if="data.record.ispaid == '4'" style="color: #afb0be">已退款</span>
  12. <span v-else-if="data.record.ispaid == '1'" style="color: green">已付费</span>
  13. </template>
  14. <template v-else-if="data.column.dataIndex === 'amount'">
  15. <span style="color: red">{{utils.formatAmount(data.record.amount,2)}}</span>
  16. </template>
  17. <template v-if="data.column.dataIndex === 'operation'">
  18. <a-space>
  19. <!-- <editTemp :data="data.record"></editTemp>
  20. <a-button type="link" @click="onDelete(data.record)">删 除</a-button>-->
  21. </a-space>
  22. </template>
  23. </template>
  24. </listTemp>
  25. </div>
  26. </template>
  27. <script setup>
  28. import Api from '@/api/api'
  29. import utils from '@/utils/utils'
  30. import listTemp from '@/components/listTemplate/index.vue'
  31. import addTemp from './modules/add.vue'
  32. import {ref, createVNode, defineEmits} from 'vue'
  33. import { useRouter } from "vue-router";
  34. import { onMounted } from "vue";
  35. const emit = defineEmits(['onSuccess'])
  36. const router = useRouter()
  37. const list = ref()
  38. let columns = ref([])
  39. let dataSource = ref([])
  40. let searchType = ref([
  41. {label:'搜索',key:'condition',type:'input'},
  42. ])
  43. let param = ref({
  44. "content": {
  45. "nocache":true,
  46. "pageNumber": 1,
  47. "pageSize": 20,
  48. "where": {
  49. "condition": ""
  50. }
  51. },
  52. "id":20230904132202
  53. })
  54. const onSuccess = async()=>{
  55. list.value.tableData()
  56. const res = await Api.requested({
  57. "classname": "sysmanage.develop.userauthforweb.userauth",
  58. "method": "query_userauth",
  59. "content": {
  60. "nocache":true,
  61. "place": 1
  62. },
  63. "systemappid": ""
  64. })
  65. console.log(res.data)
  66. // sessionStorage.setItem('app',JSON.stringify(res.data[1].modules[1].apps))
  67. }
  68. </script>
  69. <style scoped>
  70. </style>