index.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <app-drawer title="比例流水" :width="960" v-model:show="show">
  3. <app-table :data="dataList" :columns="tableColumns" :loading="loading" border>
  4. <!-- 变更时间 -->
  5. <template #updatetime="{ value }">
  6. {{ formatDate(value) }}
  7. </template>
  8. <template #footer>
  9. <app-pagination :total="total" v-model:page-size="pageSize" v-model:page-index="pageIndex" @change="run" />
  10. </template>
  11. </app-table>
  12. </app-drawer>
  13. </template>
  14. <script lang="ts" setup>
  15. import { shallowRef, PropType } from 'vue'
  16. import { ElMessage } from 'element-plus'
  17. import { formatDate } from '@/filters'
  18. import { useRequest } from '@/hooks/request'
  19. import { queryTHJInvesotrDepositLog } from '@/services/api/common'
  20. import AppDrawer from '@pc/components/base/drawer/index.vue'
  21. import AppTable from '@pc/components/base/table/index.vue'
  22. import AppPagination from '@pc/components/base/pagination/index.vue'
  23. const props = defineProps({
  24. selectedRow: {
  25. type: Object as PropType<Model.MyDepositRsp>,
  26. required: true
  27. },
  28. })
  29. const { loading, dataList, total, pageIndex, pageSize, run } = useRequest(queryTHJInvesotrDepositLog, {
  30. params: {
  31. pagesize: 10,
  32. userid: props.selectedRow.userid,
  33. depositrate: props.selectedRow.depositrate,
  34. },
  35. onError: (err) => {
  36. ElMessage.error(err)
  37. }
  38. })
  39. const show = shallowRef(true)
  40. const tableColumns = shallowRef<Model.TableColumn[]>([
  41. { prop: 'updatetime', label: '变更时间', width: 180 },
  42. { prop: 'oridepositqty', label: '变更前' },
  43. { prop: 'changeqty', label: '变更值' },
  44. { prop: 'curdepositqty', label: '变更后' },
  45. { prop: 'accountname', label: '采购人' },
  46. { prop: 'wrtradedetailid', label: '采购单号', width: 200 },
  47. ])
  48. </script>