frame-financialTax-yjl-1204
lijingjia 2 weeks ago
commit 2384177610

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

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

Loading…
Cancel
Save