index.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template>
  2. <div>
  3. <listTemp ref="list" :param="param" :tableName="'dispatchTable'" keyRouteName="billno" :searchType="searchType" :detailPage="{name:'dispatchdetail_agent',idname:'sa_dispatchid'}">
  4. <template #tb_cell="{data}">
  5. <template v-if="data.column.dataIndex === 'sumamount'">
  6. <span>{{utils.formatAmount(data.record.sumamount)}}</span>
  7. </template>
  8. </template>
  9. </listTemp>
  10. </div>
  11. </template>
  12. <script setup>
  13. import utils from '@/utils/utils'
  14. import Api from '@/api/api'
  15. import listTemp from '@/components/listTemplate/index.vue';
  16. import { ref } from 'vue'
  17. import { useRouter } from "vue-router";
  18. import { onMounted } from "vue";
  19. const router = useRouter()
  20. const list = ref()
  21. let dataSource = ref([])
  22. const statusTypeOptions = ref([])
  23. let searchType = ref([
  24. {label:'状态',key:'status',type:'select',dataSource:statusTypeOptions},
  25. {label:'时间范围',key:'dateRange',type:'datepickerRange',objKeys:['begindate','enddate']},
  26. {label:'搜索',key:'condition',type:'input'},
  27. ])
  28. let param = ref({
  29. "content": {
  30. "pageNumber": 1,
  31. "pageSize": 20,
  32. "where": {
  33. "condition": ""
  34. }
  35. },
  36. "id": 20230320160203,
  37. })
  38. const onSuccess = ()=>{
  39. list.value.tableData()
  40. }
  41. const statusType = async ()=>{
  42. const res = await Api.optionstype('dealershippingorderscreening')
  43. statusTypeOptions.value = res.data
  44. }
  45. onMounted (()=>{
  46. statusType()
  47. })
  48. </script>
  49. <style>
  50. </style>