|
|
|
@ -1,8 +1,26 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<BasicTable @register="registerTable">
|
|
|
|
|
<template #toolbar>
|
|
|
|
|
<!-- <template #toolbar>
|
|
|
|
|
<a-button type="primary" @click="handleCreate"> 新建 </a-button>
|
|
|
|
|
</template> -->
|
|
|
|
|
<template #tableTitle>
|
|
|
|
|
<span class="title">费用模版</span>
|
|
|
|
|
<a-button type="link" @click="handleCreate">
|
|
|
|
|
<span class="iconfont icon-new_document"></span>
|
|
|
|
|
添加
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-popconfirm
|
|
|
|
|
title="确定保存为自动费用模板?"
|
|
|
|
|
ok-text="是"
|
|
|
|
|
cancel-text="否"
|
|
|
|
|
@confirm="handleSave"
|
|
|
|
|
>
|
|
|
|
|
<a-button type="link">
|
|
|
|
|
<span class="iconfont icon-tijiao1"></span>
|
|
|
|
|
保存为自动费用模板
|
|
|
|
|
</a-button>
|
|
|
|
|
</a-popconfirm>
|
|
|
|
|
</template>
|
|
|
|
|
<template #bodyCell="{ column, record }">
|
|
|
|
|
<template v-if="column.key === 'action'">
|
|
|
|
@ -19,19 +37,24 @@
|
|
|
|
|
</template>
|
|
|
|
|
</BasicTable>
|
|
|
|
|
<Modal @register="registerModal" @success="handleSuccess" />
|
|
|
|
|
<TenantAuditStepModal @register="AutoRegisterModal" @success="handleSuccess" />
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import { onMounted } from 'vue'
|
|
|
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table'
|
|
|
|
|
import { GetFeeTemplateList } from './api'
|
|
|
|
|
import { GetFeeTemplateList, GetFeeTemplateDetailList } from './api'
|
|
|
|
|
// import { ApiEdit } from '/@/views/fee/FeeCustTemplate/api'
|
|
|
|
|
import TenantAuditStepModal from '/@/views/fee/FeeCustTemplate/TenantAuditStepModal.vue'
|
|
|
|
|
import { useModal } from '/@/components/Modal'
|
|
|
|
|
import Modal from './components/Modal.vue'
|
|
|
|
|
import { columns, searchFormSchema } from './columns'
|
|
|
|
|
// 引入字典数据
|
|
|
|
|
import { getDictOption } from '/@/utils/dictUtil'
|
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'
|
|
|
|
|
const { notification } = useMessage()
|
|
|
|
|
const [registerModal, { openModal }] = useModal()
|
|
|
|
|
const [registerTable, { reload, getForm, getPaginationRef }] = useTable({
|
|
|
|
|
const [registerTable, { reload, getForm, getPaginationRef, getSelectRows }] = useTable({
|
|
|
|
|
title: '费用模版',
|
|
|
|
|
// api: getSysDictTypeList,
|
|
|
|
|
api: async (p) => {
|
|
|
|
@ -107,7 +130,32 @@
|
|
|
|
|
isUpdate: false,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const [AutoRegisterModal, { openModal: AutOpenModal }] = useModal()
|
|
|
|
|
async function handleSave() {
|
|
|
|
|
const select = getSelectRows()
|
|
|
|
|
if (select.length !== 1) {
|
|
|
|
|
notification.warning({ message: '请选择一条数据', duration: 3 })
|
|
|
|
|
return false
|
|
|
|
|
} else {
|
|
|
|
|
const ApiData = {
|
|
|
|
|
pageCondition: {
|
|
|
|
|
pageIndex: 1,
|
|
|
|
|
pageSize: 1000,
|
|
|
|
|
sortConditions: [],
|
|
|
|
|
},
|
|
|
|
|
queryCondition: JSON.stringify([
|
|
|
|
|
{ FieldName: 'TemplateId', FieldValue: select[0].id, ConditionalType: 1 },
|
|
|
|
|
]),
|
|
|
|
|
}
|
|
|
|
|
const res = await GetFeeTemplateDetailList(ApiData)
|
|
|
|
|
select[0].details = res.data
|
|
|
|
|
AutOpenModal(true, {
|
|
|
|
|
record: select[0],
|
|
|
|
|
isUpdate: false,
|
|
|
|
|
isSave: true,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function handleEdit(record: Recordable) {
|
|
|
|
|
openModal(true, {
|
|
|
|
|
record,
|
|
|
|
|