|
@@ -1,102 +1,68 @@
|
|
|
<template>
|
|
|
- <hc-card>
|
|
|
+ <hc-new-card>
|
|
|
<template #header>
|
|
|
- 111
|
|
|
+ <div class="mr-2 w-40">
|
|
|
+ <el-select v-model="searchForm.key1" filterable block placeholder="报表分类">
|
|
|
+ <el-option label="中间计量申请" value="1" />
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div class="mr-2 w-40">
|
|
|
+ <el-input v-model="searchForm.key2" placeholder="报表编号" />
|
|
|
+ </div>
|
|
|
+ <hc-search-input v-model="searchForm.queryValue" placeholder="报表名称" @search="searchClick" />
|
|
|
</template>
|
|
|
<template #extra>
|
|
|
- 222
|
|
|
+ <el-button hc-btn type="primary" @click="addRowData">新增</el-button>
|
|
|
+ <el-button hc-btn color="#9e6ab8" style="color: white" @click="initReportForm">报表模板初始化</el-button>
|
|
|
+ <el-button hc-btn type="danger">批量删除</el-button>
|
|
|
</template>
|
|
|
- <div class="relative h-full flex">
|
|
|
- <div :id="`hc_tree_card_${uuid}`">
|
|
|
- <hc-card-item scrollbar>
|
|
|
- <hc-lazy-tree :h-props="treeProps" @load="treeLoadNode" />
|
|
|
- </hc-card-item>
|
|
|
- </div>
|
|
|
- <div :id="`hc_table_card_${uuid}`" class="flex-1">
|
|
|
- <hc-card-item>
|
|
|
- <template #header>
|
|
|
- <div class="font-400 text-orange">收方总金额:0元</div>
|
|
|
- </template>
|
|
|
- <template #extra>
|
|
|
- <el-button hc-btn color="#626aef">
|
|
|
- <HcIcon name="sort-desc" :line="false" />
|
|
|
- <span>按部位排序</span>
|
|
|
- </el-button>
|
|
|
- <el-button hc-btn color="#626aef">
|
|
|
- <HcIcon name="sort-desc" :line="false" />
|
|
|
- <span>按录入时间排序</span>
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- <hc-table :column="tableColumn" :datas="tableData" :loading="tableLoading" is-check @selection-change="tableCheckChange">
|
|
|
- <template #action="{ row }">
|
|
|
- <el-link type="primary" @click="giveTaskModalClick(row)">下达</el-link>
|
|
|
- <el-link type="success">修改</el-link>
|
|
|
- <el-link type="danger">删除</el-link>
|
|
|
- </template>
|
|
|
- </hc-table>
|
|
|
- <template #action>
|
|
|
- <hc-pages :pages="searchForm" @change="pageChange" />
|
|
|
- </template>
|
|
|
- </hc-card-item>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </hc-card>
|
|
|
+ <hc-table
|
|
|
+ is-new is-check :check-style="{ width: 29 }" :index-style="{ width: 60 }"
|
|
|
+ :column="tableColumn" :datas="tableData" :loading="tableLoading"
|
|
|
+ @selection-change="tableCheckChange"
|
|
|
+ >
|
|
|
+ <template #action="{ row }">
|
|
|
+ <el-link type="success">修改</el-link>
|
|
|
+ <el-link type="warning" @click="reportTemplateClick">修改报表模板</el-link>
|
|
|
+ <el-link type="danger">删除</el-link>
|
|
|
+ </template>
|
|
|
+ </hc-table>
|
|
|
+ <template #action>
|
|
|
+ <hc-pages :pages="searchForm" @change="pageChange" />
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 修改项目支付项 -->
|
|
|
+ <rowDataInfo v-model="isRowDataShow" />
|
|
|
+
|
|
|
+ <!-- 报表模板初始化 -->
|
|
|
+ <reportForm v-model="isReportFormShow" />
|
|
|
+
|
|
|
+ <!-- 修改报表模板 -->
|
|
|
+ <reportTemplate v-model="isTemplateShow" />
|
|
|
+ </hc-new-card>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { nextTick, onMounted, ref } from 'vue'
|
|
|
-import { getRandom } from 'js-fast-way'
|
|
|
+import { onMounted, ref } from 'vue'
|
|
|
+import rowDataInfo from './components/report/row-data.vue'
|
|
|
+import reportForm from './components/report/report-form.vue'
|
|
|
+import reportTemplate from './components/report/template.vue'
|
|
|
|
|
|
defineOptions({
|
|
|
- name: 'DebitPayAdminApply',
|
|
|
+ name: 'ProjectDebitProjectReport',
|
|
|
})
|
|
|
|
|
|
-const uuid = getRandom(4)
|
|
|
-
|
|
|
//渲染完成
|
|
|
onMounted(() => {
|
|
|
- setSplitRef()
|
|
|
-})
|
|
|
-
|
|
|
-//初始化设置拖动分割线
|
|
|
-const setSplitRef = () => {
|
|
|
- //配置参考: https://split.js.org/#/?direction=vertical&snapOffset=0
|
|
|
- nextTick(() => {
|
|
|
- window.$split(['#hc_tree_card_' + uuid, '#hc_table_card_' + uuid], {
|
|
|
- sizes: [20, 80],
|
|
|
- snapOffset: 0,
|
|
|
- minSize: [50, 500],
|
|
|
- })
|
|
|
- })
|
|
|
-}
|
|
|
|
|
|
-//搜索表单
|
|
|
-const searchForm = ref({
|
|
|
- key1: null, current: 1, size: 10, total: 0,
|
|
|
})
|
|
|
|
|
|
+//搜索表单
|
|
|
+const searchForm = ref({ current: 1, size: 10, total: 0 })
|
|
|
|
|
|
-//数据格式
|
|
|
-const treeProps = {
|
|
|
- label: 'name',
|
|
|
- children: 'children',
|
|
|
- isLeaf: 'leaf',
|
|
|
-}
|
|
|
-
|
|
|
-//懒加载的数据
|
|
|
-const treeLoadNode = ({ level }, resolve) => {
|
|
|
- if (level === 0) {
|
|
|
- return resolve([{ name: 'region' }])
|
|
|
- }
|
|
|
- if (level > 3) {
|
|
|
- return resolve([])
|
|
|
- }
|
|
|
- setTimeout(() => {
|
|
|
- resolve([
|
|
|
- { name: 'leaf', leaf: true },
|
|
|
- { name: 'zone' },
|
|
|
- ])
|
|
|
- }, 500)
|
|
|
+//搜索
|
|
|
+const searchClick = () => {
|
|
|
+ searchForm.value.current = 1
|
|
|
}
|
|
|
|
|
|
//分页
|
|
@@ -108,13 +74,9 @@ const pageChange = ({ current, size }) => {
|
|
|
//表格数据
|
|
|
const tableLoading = ref(false)
|
|
|
const tableColumn = ref([
|
|
|
- { key: 'key1', name: '收方单编号' },
|
|
|
- { key: 'key2', name: '收方期' },
|
|
|
- { key: 'key3', name: '工程划分部位' },
|
|
|
- { key: 'key4', name: '收方金额' },
|
|
|
- { key: 'key5', name: '业务日期' },
|
|
|
- { key: 'key6', name: '审核状态' },
|
|
|
- { key: 'action', name: '操作', width: 200, align: 'center' },
|
|
|
+ { key: 'key1', name: '报表编号' },
|
|
|
+ { key: 'key2', name: '报表名称', align: 'center' },
|
|
|
+ { key: 'action', name: '操作', width: 180, align: 'center' },
|
|
|
])
|
|
|
const tableData = ref([
|
|
|
{ key1: '1111' },
|
|
@@ -124,8 +86,22 @@ const tableData = ref([
|
|
|
const tableCheckChange = () => {
|
|
|
|
|
|
}
|
|
|
-</script>
|
|
|
|
|
|
-<style scoped lang="scss">
|
|
|
|
|
|
-</style>
|
|
|
+//新增
|
|
|
+const isRowDataShow = ref(false)
|
|
|
+const addRowData = () => {
|
|
|
+ isRowDataShow.value = true
|
|
|
+}
|
|
|
+
|
|
|
+//报表模板初始化
|
|
|
+const isReportFormShow = ref(false)
|
|
|
+const initReportForm = () => {
|
|
|
+ isReportFormShow.value = true
|
|
|
+}
|
|
|
+
|
|
|
+const isTemplateShow = ref(false)
|
|
|
+const reportTemplateClick = () => {
|
|
|
+ isTemplateShow.value = true
|
|
|
+}
|
|
|
+</script>
|