book.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <template>
  2. <hc-card title="材料预付款报表手册">
  3. <template #extra>
  4. <el-button hc-btn type="primary" @click="addModalClick">
  5. <HcIcon name="add" />
  6. <span>新增</span>
  7. </el-button>
  8. </template>
  9. <hc-table :column="tableColumn" :datas="tableData" :loading="tableLoading">
  10. <template #action="{ row }">
  11. <el-link type="primary">查看报表</el-link>
  12. <el-link type="success">修改</el-link>
  13. <el-link type="danger">删除</el-link>
  14. <el-link>重新计算</el-link>
  15. </template>
  16. </hc-table>
  17. <template #action>
  18. <hc-pages :pages="searchForm" @change="pageChange" />
  19. </template>
  20. <!-- 新增/修改 -->
  21. <hc-dialog v-model="formModalShow" is-to-body widths="30rem" title="材料计量单新增" @save="formModalSave" @close="formModalClose">
  22. 1111
  23. </hc-dialog>
  24. </hc-card>
  25. </template>
  26. <script setup>
  27. import { onMounted, ref } from 'vue'
  28. defineOptions({
  29. name: 'DebitPayMaterialBook',
  30. })
  31. //渲染完成
  32. onMounted(() => {
  33. })
  34. //搜索表单
  35. const searchForm = ref({
  36. current: 1, size: 10, total: 0,
  37. })
  38. //分页
  39. const pageChange = ({ current, size }) => {
  40. searchForm.value.current = current
  41. searchForm.value.size = size
  42. }
  43. //表格数据
  44. const tableLoading = ref(false)
  45. const tableColumn = ref([
  46. { key: 'key1', name: '计量期' },
  47. { key: 'key2', name: '报表名称' },
  48. { key: 'key3', name: '打印日期' },
  49. { key: 'key4', name: '重新计算时间' },
  50. { key: 'action', name: '操作', width: 230 },
  51. ])
  52. const tableData = ref([
  53. { key1: '1111' },
  54. ])
  55. //新增
  56. const formModalShow = ref(false)
  57. const addModalClick = () => {
  58. formModalShow.value = true
  59. }
  60. const formModalSave = () => {
  61. formModalClose()
  62. }
  63. const formModalClose = () => {
  64. formModalShow.value = false
  65. }
  66. </script>
  67. <style scoped lang="scss">
  68. </style>