fix: 收票管理列表金蝶状态增加颜色标签与其他页面一致

This commit is contained in:
刘泉佳
2026-11-05 16:49:01 +08:00
parent d57d3f86da
commit 119d71b4f5
4 changed files with 19 additions and 2 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ export const invoiceReceiptTableColumns = [
{ prop: 'createUserName', label: '创建人', minWidth: 110 }, { prop: 'createUserName', label: '创建人', minWidth: 110 },
{ prop: 'createTime', label: '创建时间', minWidth: 170 }, { prop: 'createTime', label: '创建时间', minWidth: 170 },
{ prop: 'kingdeeReceivedInvoiceNo', label: '金蝶单据号', minWidth: 150 }, { prop: 'kingdeeReceivedInvoiceNo', label: '金蝶单据号', minWidth: 150 },
{ prop: 'kingdeePushStatusName', label: '金蝶状态', minWidth: 130 }, { prop: 'kingdeePushStatusName', label: '金蝶状态', minWidth: 130, kingdeeStatus: true },
{ prop: 'kingdeePushMsg', label: '失败原因', minWidth: 160 }, { prop: 'kingdeePushMsg', label: '失败原因', minWidth: 160 },
{ prop: 'attachmentSyncStatusName', label: '附件同步', minWidth: 100 }, { prop: 'attachmentSyncStatusName', label: '附件同步', minWidth: 100 },
]; ];
+11
View File
@@ -14,6 +14,17 @@ export const KINGDEE_STATUS_TAG_TYPES = {
/** 金蝶单据状态 → el-tag 颜色类型,未映射状态返回 info */ /** 金蝶单据状态 → el-tag 颜色类型,未映射状态返回 info */
export const kingdeeStatusType = status => KINGDEE_STATUS_TAG_TYPES[status] || 'info'; export const kingdeeStatusType = status => KINGDEE_STATUS_TAG_TYPES[status] || 'info';
/** 收票登记推送状态 → el-tag 颜色类型(已指定应付=绿、已保存收票单=黄、推送失败=红、未推送=灰) */
export const KINGDEE_PUSH_STATUS_TAG_TYPES = {
unsynced: 'info',
pushed: 'warning',
assigned: 'success',
failed: 'danger',
};
/** 收票登记推送状态 → el-tag 颜色类型,未映射状态返回 info */
export const kingdeePushStatusType = status => KINGDEE_PUSH_STATUS_TAG_TYPES[status] || 'info';
/** 金蝶冲销状态 → el-tag 颜色类型(已冲销=绿、未冲销=黄) */ /** 金蝶冲销状态 → el-tag 颜色类型(已冲销=绿、未冲销=黄) */
export const KINGDEE_WRITEOFF_TAG_TYPES = { export const KINGDEE_WRITEOFF_TAG_TYPES = {
writtenoff: 'success', writtenoff: 'success',
+5
View File
@@ -119,6 +119,9 @@
<el-tag v-else-if="column.status" :type="statusType(row.approvalStatus)" class="status-text"> <el-tag v-else-if="column.status" :type="statusType(row.approvalStatus)" class="status-text">
{{ displayValue(row[column.prop]) }} {{ displayValue(row[column.prop]) }}
</el-tag> </el-tag>
<el-tag v-else-if="column.kingdeeStatus" :type="kingdeePushStatusType(row.kingdeePushStatus)">
{{ displayValue(row[column.prop]) }}
</el-tag>
<span v-else-if="column.money">{{ formatMoney(row[column.prop]) }}</span> <span v-else-if="column.money">{{ formatMoney(row[column.prop]) }}</span>
<span v-else>{{ displayValue(row[column.prop]) }}</span> <span v-else>{{ displayValue(row[column.prop]) }}</span>
</template> </template>
@@ -222,6 +225,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 { kingdeePushStatusType } from '@/utils/kingdee';
// 表单提交成功后带标记返回,keep-alive 缓存的列表页据此重新拉取 // 表单提交成功后带标记返回,keep-alive 缓存的列表页据此重新拉取
const invoiceReceiptListRefreshKey = 'invoice-receipt-list-refresh'; const invoiceReceiptListRefreshKey = 'invoice-receipt-list-refresh';
@@ -480,6 +484,7 @@ export default {
'' ''
); );
}, },
kingdeePushStatusType,
displayValue(value) { displayValue(value) {
return value === null || value === undefined || value === '' ? '-' : value; return value === null || value === undefined || value === '' ? '-' : value;
}, },
@@ -74,6 +74,7 @@
<script> <script>
import { claimCandidates } from '@/api/payment/invoiceReceipt'; import { claimCandidates } from '@/api/payment/invoiceReceipt';
import { kingdeePushStatusType } from '@/utils/kingdee';
export default { export default {
name: 'InvoiceReceiptCandidatesDialog', name: 'InvoiceReceiptCandidatesDialog',
@@ -152,7 +153,7 @@ export default {
); );
}, },
pushStatusType(value) { pushStatusType(value) {
return { pushed: 'warning', assigned: 'success', failed: 'danger', unsynced: 'info' }[value] || 'info'; return kingdeePushStatusType(value);
}, },
formatMoney(value) { formatMoney(value) {
const number = Number(value); const number = Number(value);