往来单位样式 部分

frame-financialTax-yjl-1127
张同海 1 week ago
parent 10b7200fb7
commit 052b26984c

@ -1,22 +1,13 @@
<template> <template>
<div> <div class="p20">
<BasicTable class="ds-table" @register="registerTable" @row-dbClick="handleAudit"> <BasicTable class="ds-table" @register="registerTable" @row-dbClick="handleAudit">
<template #tableTitle> <template #tableTitle>
<a-button type="link" @click="handleCreate" :disabled="checkPermissions('op:factory:add')"> <TableButton
<span class="iconfont icon-new_document"></span> :show="{ add: 'op:factory:add', del: 'op:factory:del' }"
添加 @add="handleCreate"
</a-button> @del="handleDel"
<a-popconfirm
title="确定要删除勾选的数据?"
ok-text="确定"
cancel-text="取消"
@confirm="handleDel"
:disabled="checkPermissions('op:factory:del')"
> >
<a-button type="link" :disabled="checkPermissions('op:factory:del')"> </TableButton>
<span class="iconfont icon-shanchu2"></span> 删除
</a-button>
</a-popconfirm>
</template> </template>
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'"> <template v-if="column.key === 'action'">
@ -46,7 +37,7 @@
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
const { notification } = useMessage() const { notification } = useMessage()
const [registerModal, { openModal }] = useModal() const [registerModal, { openModal }] = useModal()
const [registerTable, { reload, getForm, getSelectRows }] = useTable({ const [registerTable, { reload, getForm, getVxeSelectRows }] = useTable({
title: '', title: '',
api: async (p) => { api: async (p) => {
const res: API.DataResult = await ApiList(p) const res: API.DataResult = await ApiList(p)
@ -117,11 +108,11 @@
}) })
} }
function handleDel() { function handleDel() {
if (getSelectRows().length) { if (getVxeSelectRows().length) {
let Apidata: any = { let Apidata: any = {
ids: [], ids: [],
} }
getSelectRows().forEach((item) => { getVxeSelectRows().forEach((item) => {
Apidata.ids.push(item.id) Apidata.ids.push(item.id)
}) })
ApiDel(Apidata).then((res) => { ApiDel(Apidata).then((res) => {

@ -21,7 +21,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref } from 'vue' import { ref } from 'vue'
import { BasicTable, useTable, TableAction } from '/@/components/Table' import { BasicTable, useTable } from '/@/components/Table'
import { ApiList, ApiAudit } from './api' import { ApiList, ApiAudit } from './api'
import { columns, searchFormSchema } from './columns' import { columns, searchFormSchema } from './columns'
import { formatParams } from '/@/hooks/web/common' import { formatParams } from '/@/hooks/web/common'
@ -29,7 +29,7 @@
const { notification } = useMessage() const { notification } = useMessage()
const visible = ref(false) const visible = ref(false)
const remark = ref('') const remark = ref('')
const [registerTable, { reload, getForm, getSelectRows }] = useTable({ const [registerTable, { reload, getVxeSelectRows }] = useTable({
title: '', title: '',
api: async (p) => { api: async (p) => {
const res: API.DataResult = await ApiList(p) const res: API.DataResult = await ApiList(p)
@ -41,7 +41,6 @@
p['auditStatus'] = 0 p['auditStatus'] = 0
return formatParams(p) return formatParams(p)
}, },
rowSelection: { type: 'checkbox' },
columns, columns,
formConfig: { formConfig: {
labelWidth: 120, labelWidth: 120,
@ -51,19 +50,19 @@
pagination: true, pagination: true,
striped: true, striped: true,
useSearchForm: true, useSearchForm: true,
showTableSetting: false, showTableSetting: true,
bordered: true, bordered: true,
showIndexColumn: true, showIndexColumn: true,
indexColumnProps: {
width: 60,
},
canResize: true, canResize: true,
resizeHeightOffset: 35,
immediate: true, immediate: true,
resizeHeightOffset: 45,
tableComponent: 'vxe',
id: '0',
autoHeight: window.innerHeight - 330.5,
}) })
function FnAudit(result) { function FnAudit(result) {
let Audit = () => { let Audit = () => {
const select = getSelectRows() const select = getVxeSelectRows()
let ApiData: any = { let ApiData: any = {
ids: [], ids: [],
result, result,
@ -73,7 +72,7 @@
notification.warning({ message: '请至少选择一条数据', duration: 3 }) notification.warning({ message: '请至少选择一条数据', duration: 3 })
return false return false
} else { } else {
ApiData.ids = select.map((item) => { ApiData.ids = select.map((item: any) => {
return item.id return item.id
}) })
} }

Loading…
Cancel
Save