debit.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <template>
  2. <hc-new-card>
  3. <template #header>
  4. <hc-new-switch :datas="tabTab" :keys="tabKey" :round="false" @change="tabChange" />
  5. <div class="hc-flex ml-6">
  6. <span class="text-gray-5">超计台账:</span>
  7. <el-switch v-model="searchForm.key1" inline-prompt active-text="是" inactive-text="否" size="large" />
  8. </div>
  9. </template>
  10. <template #extra>
  11. <el-button hc-btn type="primary" @click="periodModalClick">
  12. <HcIcon name="edit" />
  13. <span>选择计量周期</span>
  14. </el-button>
  15. <el-button hc-btn type="primary" @click="exportModalClick">
  16. <HcIcon name="download" />
  17. <span>导出</span>
  18. </el-button>
  19. </template>
  20. <div class="hc-table-ref-box no-border">
  21. <el-table
  22. class="w-full"
  23. :data="tableData"
  24. row-key="id"
  25. height="100%"
  26. lazy highlight-current-row border
  27. :load="tableLoad"
  28. :tree-props="treeProps"
  29. >
  30. <el-table-column prop="key1" label="清单编号" fixed="left" width="140" />
  31. <el-table-column prop="key2" label="清单名称" fixed="left" width="200" />
  32. <el-table-column prop="key3" label="清单单位" fixed="left" width="100" />
  33. <el-table-column prop="key4" label="中标单价(元)" width="120" />
  34. <el-table-column prop="key4" label="清单单价(元)" width="120" />
  35. <el-table-column prop="key4" label="变更后单价(元)" width="130" />
  36. <el-table-column prop="key4" label="合同数量" width="120" />
  37. <el-table-column prop="key4" label="分解核实量" width="120" />
  38. <el-table-column prop="key4" label="变更增减数量" width="120" />
  39. <el-table-column prop="key4" label="变更后数量" width="120" />
  40. <el-table-column prop="key4" label="合同金额(元)" width="120" />
  41. <el-table-column prop="key4" label="核实增减(元)" width="120" />
  42. <el-table-column prop="key4" label="变更增减金额(元)" width="140" />
  43. <el-table-column prop="key4" label="变更后金额(元)" width="130" />
  44. <el-table-column label="累计计量" align="center">
  45. <el-table-column prop="state" label="数量" width="120" />
  46. <el-table-column prop="city" label="金额(元)" width="120" />
  47. <el-table-column prop="address" label="支付比例" width="120" />
  48. </el-table-column>
  49. <el-table-column label="剩余工程" align="center">
  50. <el-table-column prop="state" label="数量" width="120" />
  51. <el-table-column prop="city" label="金额(元)" width="120" />
  52. </el-table-column>
  53. <el-table-column label="第1期" align="center">
  54. <el-table-column prop="state" label="数量" width="120" />
  55. <el-table-column prop="city" label="金额(元)" width="120" />
  56. </el-table-column>
  57. <el-table-column label="第2期" align="center">
  58. <el-table-column prop="state" label="数量" width="120" />
  59. <el-table-column prop="city" label="金额(元)" width="120" />
  60. </el-table-column>
  61. <el-table-column label="第3期" align="center">
  62. <el-table-column prop="state" label="数量" width="120" />
  63. <el-table-column prop="city" label="金额(元)" width="120" />
  64. </el-table-column>
  65. </el-table>
  66. </div>
  67. <template #action>
  68. <hc-pages :pages="searchForm" @change="pageChange" />
  69. </template>
  70. <!-- 选择计量周期 -->
  71. <HcPeriodModal v-model="periodModalShow" />
  72. <!-- 选择计量周期 -->
  73. <HcExportModal v-model="exportModalShow" />
  74. </hc-new-card>
  75. </template>
  76. <script setup>
  77. import { onMounted, ref } from 'vue'
  78. import HcPeriodModal from './components/debit/periodModal.vue'
  79. import HcExportModal from './components/debit/exportModal.vue'
  80. defineOptions({
  81. name: 'DebitPayLedgersDebit',
  82. })
  83. //渲染完成
  84. onMounted(() => {
  85. })
  86. //类型tab数据和相关处理
  87. const tabKey = ref('key1')
  88. const tabTab = ref([
  89. { key: 'key1', name: '按清单显示' },
  90. { key: 'key2', name: '按分项工程' },
  91. ])
  92. const tabChange = ({ key }) => {
  93. tabKey.value = key
  94. }
  95. //搜索表单
  96. const searchForm = ref({
  97. current: 1, size: 10, total: 0,
  98. })
  99. //分页
  100. const pageChange = ({ current, size }) => {
  101. searchForm.value.current = current
  102. searchForm.value.size = size
  103. }
  104. //表格数据
  105. const treeProps = ref({
  106. children: 'children',
  107. hasChildren: 'hasChildren',
  108. })
  109. const tableData = ref([
  110. {
  111. id: 1,
  112. key1: '2016',
  113. key2: '名称名称名称',
  114. key3: '总额',
  115. hasChildren: true,
  116. },
  117. ])
  118. const tableLoad = (row, treeNode, resolve) => {
  119. resolve([
  120. {
  121. id: 11,
  122. key1: '2017',
  123. key2: '名称名称名称',
  124. key3: '总额',
  125. },
  126. {
  127. id: 12,
  128. key1: '2018',
  129. key2: '名称名称名称',
  130. key3: '总额',
  131. },
  132. ])
  133. }
  134. //选择计量周期
  135. const periodModalShow = ref(false)
  136. const periodModalClick = () => {
  137. periodModalShow.value = true
  138. }
  139. //导出
  140. const exportModalShow = ref(false)
  141. const exportModalClick = () => {
  142. exportModalShow.value = true
  143. }
  144. </script>
  145. <style scoped lang="scss">
  146. </style>