|
|
|
@ -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', {
|
|
|
|
|
customIcon: h('i', {
|
|
|
|
|
class: 'iconfont icon-chakan',
|
|
|
|
|
style: { color: '#257afa', fontSize: '16px' },
|
|
|
|
|
}), */
|
|
|
|
|
// isCustomIcon: !canEditable,
|
|
|
|
|
}),
|
|
|
|
|
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('复制成功!')
|
|
|
|
|
}
|
|
|
|
|