feat: 付款与开票申请金蝶单据状态着色并悬浮展示失败原因
This commit is contained in:
@@ -169,7 +169,7 @@ export const paymentApplicationOption = ({
|
|||||||
{ label: '当前节点', prop: 'currentNode', minWidth: 120, formatter: textFormatter },
|
{ label: '当前节点', prop: 'currentNode', minWidth: 120, formatter: textFormatter },
|
||||||
{ label: '当前处理人', prop: 'currentProcessor', minWidth: 120, formatter: textFormatter },
|
{ label: '当前处理人', prop: 'currentProcessor', minWidth: 120, formatter: textFormatter },
|
||||||
{ label: '金蝶单据号', prop: 'kingdeeBillNo', minWidth: 130, formatter: textFormatter },
|
{ label: '金蝶单据号', prop: 'kingdeeBillNo', minWidth: 130, formatter: textFormatter },
|
||||||
{ label: '金蝶单据状态', prop: 'kingdeeStatusName', minWidth: 130, formatter: textFormatter },
|
{ label: '金蝶单据状态', prop: 'kingdeeStatusName', slot: true, minWidth: 130 },
|
||||||
{ label: '金蝶锁状态', prop: 'kingdeeLockStatus', slot: true, minWidth: 150 },
|
{ label: '金蝶锁状态', prop: 'kingdeeLockStatus', slot: true, minWidth: 150 },
|
||||||
{ label: '附件同步', prop: 'attachmentSyncStatusName', minWidth: 100, formatter: textFormatter },
|
{ label: '附件同步', prop: 'attachmentSyncStatusName', minWidth: 100, formatter: textFormatter },
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
/**
|
||||||
|
* 金蝶单据状态公共映射
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** 金蝶单据状态 → el-tag 颜色类型(failed 状态列表页悬浮展示失败原因) */
|
||||||
|
export const KINGDEE_STATUS_TAG_TYPES = {
|
||||||
|
synced: 'success',
|
||||||
|
paid: 'success',
|
||||||
|
invoiced: 'success',
|
||||||
|
paying: 'warning',
|
||||||
|
failed: 'danger',
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 金蝶单据状态 → el-tag 颜色类型,未映射状态返回 info */
|
||||||
|
export const kingdeeStatusType = status => KINGDEE_STATUS_TAG_TYPES[status] || 'info';
|
||||||
@@ -125,6 +125,17 @@
|
|||||||
{{ displayValue(row[column.prop]) }}
|
{{ displayValue(row[column.prop]) }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<span v-else-if="column.money">{{ formatMoney(row[column.prop]) }}</span>
|
<span v-else-if="column.money">{{ formatMoney(row[column.prop]) }}</span>
|
||||||
|
<template v-else-if="column.prop === 'kingdeeStatusName'">
|
||||||
|
<el-tooltip
|
||||||
|
:disabled="row.kingdeeStatus !== 'failed'"
|
||||||
|
:content="row.kingdeeFailReason || '推送金蝶失败,可点击「同步金蝶」重试'"
|
||||||
|
placement="top"
|
||||||
|
>
|
||||||
|
<el-tag :type="kingdeeStatusType(row.kingdeeStatus)" class="status-text">{{
|
||||||
|
row.kingdeeStatusName || '-'
|
||||||
|
}}</el-tag>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
<template v-else-if="column.prop === 'kingdeeLockStatus'">
|
<template v-else-if="column.prop === 'kingdeeLockStatus'">
|
||||||
<el-tooltip v-if="lockTag(row).show" :content="lockTag(row).tip" placement="top">
|
<el-tooltip v-if="lockTag(row).show" :content="lockTag(row).tip" placement="top">
|
||||||
<el-tag :type="lockTag(row).type" class="status-text">{{ lockTag(row).label }}</el-tag>
|
<el-tag :type="lockTag(row).type" class="status-text">{{ lockTag(row).label }}</el-tag>
|
||||||
@@ -238,6 +249,7 @@ import TableHeaderTools from '@/components/table-header-tools/main.vue';
|
|||||||
import organizationSearch from '@/mixins/organization-search';
|
import organizationSearch from '@/mixins/organization-search';
|
||||||
import { getMKApprovalUrl } from '@/api/system/business-process';
|
import { getMKApprovalUrl } from '@/api/system/business-process';
|
||||||
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
|
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
|
||||||
|
import { kingdeeStatusType } from '@/utils/kingdee';
|
||||||
|
|
||||||
const emptyQuery = () => ({
|
const emptyQuery = () => ({
|
||||||
applicationNo: '',
|
applicationNo: '',
|
||||||
@@ -500,6 +512,7 @@ export default {
|
|||||||
''
|
''
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
kingdeeStatusType,
|
||||||
lockTag(row) {
|
lockTag(row) {
|
||||||
if (row.kingdeeLockStatus === 'locked') {
|
if (row.kingdeeLockStatus === 'locked') {
|
||||||
return { show: true, type: 'danger', label: '金蝶锁定中', tip: '该单据已被金蝶锁定,不可编辑/作废' };
|
return { show: true, type: 'danger', label: '金蝶锁定中', tip: '该单据已被金蝶锁定,不可编辑/作废' };
|
||||||
|
|||||||
@@ -68,6 +68,18 @@
|
|||||||
<span v-else>-</span>
|
<span v-else>-</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template #kingdeeStatusName="{ row }">
|
||||||
|
<el-tooltip
|
||||||
|
:disabled="row.kingdeeStatus !== 'failed'"
|
||||||
|
:content="row.kingdeeFailReason || '推送金蝶失败,可点击「同步金蝶」重试'"
|
||||||
|
placement="top"
|
||||||
|
>
|
||||||
|
<el-tag :type="kingdeeStatusType(row.kingdeeStatus)" class="status-text">{{
|
||||||
|
row.kingdeeStatusName || '-'
|
||||||
|
}}</el-tag>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template #menu="{ row }">
|
<template #menu="{ row }">
|
||||||
<el-link
|
<el-link
|
||||||
v-if="hasPermission('payment_application_view')"
|
v-if="hasPermission('payment_application_view')"
|
||||||
@@ -151,6 +163,7 @@ import { paymentApplicationOption } from '@/option/payment/paymentApplication';
|
|||||||
import organizationSearch from '@/mixins/organization-search';
|
import organizationSearch from '@/mixins/organization-search';
|
||||||
import { getMKApprovalUrl } from '@/api/system/business-process';
|
import { getMKApprovalUrl } from '@/api/system/business-process';
|
||||||
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
|
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
|
||||||
|
import { kingdeeStatusType } from '@/utils/kingdee';
|
||||||
|
|
||||||
const paymentApplicationListRoute = '/payment/payment-application';
|
const paymentApplicationListRoute = '/payment/payment-application';
|
||||||
const paymentApplicationListRefreshKey = 'payment-application-list-refresh';
|
const paymentApplicationListRefreshKey = 'payment-application-list-refresh';
|
||||||
@@ -463,6 +476,7 @@ export default {
|
|||||||
''
|
''
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
kingdeeStatusType,
|
||||||
lockTag(row) {
|
lockTag(row) {
|
||||||
if (row.kingdeeLockStatus === 'locked') {
|
if (row.kingdeeLockStatus === 'locked') {
|
||||||
return { show: true, type: 'danger', label: '金蝶锁定中', tip: '该单据已被金蝶锁定,不可编辑/作废' };
|
return { show: true, type: 'danger', label: '金蝶锁定中', tip: '该单据已被金蝶锁定,不可编辑/作废' };
|
||||||
|
|||||||
Reference in New Issue
Block a user