fix:修复财税管理模块相关问题

feature-JimuReport-1106-yjl
yujinlong 3 weeks ago
parent f085f8e79d
commit 80ac55d84a

@ -2,11 +2,9 @@
<renderComponent />
</template>
<script lang="ts" setup>
import { VNode } from 'vue'
const props = defineProps<{
renderProp: VNode
}>()
const props = defineProps({
renderProp: [String, Object],
})
const renderComponent = {
render: () => {
return props.renderProp

@ -3,7 +3,7 @@
<template v-for="(action, index) in getActions" :key="`${index}-${action.label}`">
<Tooltip v-if="action.tooltip" v-bind="getTooltip(action.tooltip)">
<PopConfirmButton v-bind="action">
<RenderComponent v-if="action.isCustomIcon" :renderProp="action.icon" />
<RenderComponent v-if="action.isCustomIcon" :renderProp="action.customIcon" />
<template v-else>
<Icon v-if="action.icon" :icon="action.icon" :class="{ 'mr-1': !!action.label }" />
<template v-if="action.label">{{ action.label }}</template>
@ -11,7 +11,7 @@
</PopConfirmButton>
</Tooltip>
<PopConfirmButton v-else v-bind="action">
<RenderComponent v-if="action.isCustomIcon" :renderProp="action.icon" />
<RenderComponent v-if="action.isCustomIcon" :renderProp="action.customIcon" />
<template v-else>
<Icon v-if="action.icon" :icon="action.icon" :class="{ 'mr-1': !!action.label }" />
<template v-if="action.label">{{ action.label }}</template>

@ -7,7 +7,8 @@ export interface ActionItem extends ButtonProps {
label?: string
color?: 'success' | 'error' | 'warning'
isCustomIcon?: boolean
icon?: string | JSX.Element | VNode
icon?: string
customIcon?: string | JSX.Element | VNode
popConfirm?: PopConfirm
disabled?: boolean
divider?: boolean

@ -49,7 +49,7 @@
</div>
</template>
<script lang="ts" setup>
import { ref, onMounted } from 'vue'
import { ref, onMounted, h } from 'vue'
import type { BankItem } from './columns'
import { columns, searchFormSchema, bankNoFormat } from './columns'
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table'
@ -125,12 +125,11 @@
const getActionOptList = (record): ActionItem[] => {
return [
{
/* icon: h('i', {
customIcon: h('i', {
class: 'iconfont icon-xiazai',
style: { color: '#257afa', fontSize: '14px' },
}),
isCustomIcon: true, */
icon: 'ant-design:cloud-download-outlined',
isCustomIcon: true,
tooltip: '下载',
onClick: handleDownload.bind(null, record),
},

@ -32,7 +32,7 @@
class="iconfont icon-fuzhi3"
style="color: #257afa; font-size: 14px; margin-right: 4px; cursor: pointer"
v-if="record.invoiceNumber"
@click="copyHandle(record)"
@click.stop="copyHandle(record)"
></i>
<span>{{ record.invoiceNumber || '' }}</span>
</template>
@ -55,7 +55,7 @@
</a-modal>
</template>
<script lang="ts" setup>
import { ref, defineEmits, computed, watch } from 'vue'
import { ref, defineEmits, computed, watch, unref } from 'vue'
import { BasicTable, useTable } from '/@/components/Table'
import { columns, searchFormSchema } from './columns'
import { GetInvoiceList } from '../../api'

@ -56,7 +56,7 @@
class="iconfont icon-fuzhi3"
style="color: #257afa; font-size: 14px; margin-right: 4px; cursor: pointer"
v-if="record.invoiceNumber"
@click="copyHandle(record)"
@click.stop="copyHandle(record)"
></i>
<span>{{ record.invoiceNumber || '' }}</span>
</template>
@ -98,7 +98,7 @@
</a-spin>
</template>
<script lang="ts" setup>
import { ref, computed } from 'vue'
import { ref, computed, unref } from 'vue'
import { Divider } from 'ant-design-vue'
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table'
import SearchTable from './components/SearchTable.vue'

@ -32,13 +32,13 @@
<template v-if="column.key === 'action'">
<TableAction :actions="getActionOptList(record)" />
</template>
<template v-if="column.dataIndex == 'invoiceNumber'">
<span>{{ record.invoiceNumber || '' }}</span>
<template v-if="column.dataIndex == 'reimbursementId'">
<span>{{ record.reimbursementId || '' }}</span>
<i
class="iconfont icon-fuzhi3"
style="color: #257afa; font-size: 14px; margin-left: 4px; cursor: pointer"
v-if="record.invoiceNumber"
@click="copyHandle(record)"
v-if="record.reimbursementId"
@click.stop="copyHandle(record)"
></i>
</template>
<template v-if="column.dataIndex == 'reimbursementType'">
@ -56,6 +56,7 @@
</div>
</template>
<script setup lang="ts">
import { unref, h } from 'vue'
import { ReimbursementGetList, ReimbursementDelete } from './api.js'
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table'
import { formatParams } from '/@/hooks/web/common'
@ -121,14 +122,12 @@
const canEditable = [0, 2, 4].includes(record.reimbursementType)
return [
{
icon: canEditable ? 'clarity:note-edit-line' : 'ant-design:file-text-outlined',
/* icon: canEditable
? 'clarity:note-edit-line'
: h('i', {
class: 'iconfont icon-chakan',
style: { color: '#257afa', fontSize: '16px' },
}), */
// isCustomIcon: !canEditable,
customIcon: h('i', {
class: 'iconfont icon-chakan',
style: { color: '#257afa', fontSize: '16px' },
}),
icon: 'clarity:note-edit-line',
isCustomIcon: !canEditable,
tooltip: canEditable ? '编辑' : '查看',
onClick: GoDetailed.bind(null, record),
},
@ -158,8 +157,8 @@
})
}
const copyHandle = (row: BillItem) => {
const { clipboardRef, isSuccessRef } = useCopyToClipboard(row.invoiceNumber)
clipboardRef.value = row.invoiceNumber
const { clipboardRef, isSuccessRef } = useCopyToClipboard(row.reimbursementId)
clipboardRef.value = row.reimbursementId
if (unref(isSuccessRef)) {
createMessage.success('复制成功!')
}

@ -51,7 +51,7 @@
class="iconfont icon-fuzhi3"
style="color: #257afa; font-size: 14px; margin-right: 4px; cursor: pointer"
v-if="record.invoiceNumber"
@click="copyHandle(record)"
@click.stop="copyHandle(record)"
></i>
<span>{{ record.invoiceNumber || '' }}</span>
</template>
@ -62,7 +62,7 @@
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { ref, unref } from 'vue'
import { SvgIcon } from '/@/components/Icon'
import { BasicTable, useTable } from '/@/components/Table'
import { GetInfo } from '../api'

@ -29,7 +29,7 @@
</div>
</template>
<script lang="ts" setup>
import { onMounted } from 'vue'
import { onMounted, unref, h } from 'vue'
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table'
import { GetList } from './api'
import { formatParams } from '/@/hooks/web/common'
@ -90,22 +90,20 @@
const getActionOptList = (record): ActionItem[] => {
return [
{
icon: 'ant-design:file-text-outlined',
/* icon: h('i', {
customIcon: h('i', {
class: 'iconfont icon-chakan',
style: { color: '#257afa', fontSize: '16px' },
}),
isCustomIcon: true, */
isCustomIcon: true,
tooltip: '明细',
onClick: handleDetails.bind(null, record),
},
{
icon: 'ant-design:cloud-download-outlined',
/* icon: h('i', {
customIcon: h('i', {
class: 'iconfont icon-xiazai',
style: { color: '#257afa', fontSize: '14px' },
}),
isCustomIcon: true, */
isCustomIcon: true,
tooltip: '下载',
onClick: handleDownload.bind(null, record),
},

Loading…
Cancel
Save