fix: 收票管理列表金蝶状态增加颜色标签与其他页面一致
This commit is contained in:
@@ -12,7 +12,7 @@ export const invoiceReceiptTableColumns = [
|
||||
{ prop: 'createUserName', label: '创建人', minWidth: 110 },
|
||||
{ prop: 'createTime', label: '创建时间', minWidth: 170 },
|
||||
{ prop: 'kingdeeReceivedInvoiceNo', label: '金蝶单据号', minWidth: 150 },
|
||||
{ prop: 'kingdeePushStatusName', label: '金蝶状态', minWidth: 130 },
|
||||
{ prop: 'kingdeePushStatusName', label: '金蝶状态', minWidth: 130, kingdeeStatus: true },
|
||||
{ prop: 'kingdeePushMsg', label: '失败原因', minWidth: 160 },
|
||||
{ prop: 'attachmentSyncStatusName', label: '附件同步', minWidth: 100 },
|
||||
];
|
||||
|
||||
@@ -14,6 +14,17 @@ export const KINGDEE_STATUS_TAG_TYPES = {
|
||||
/** 金蝶单据状态 → el-tag 颜色类型,未映射状态返回 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 颜色类型(已冲销=绿、未冲销=黄) */
|
||||
export const KINGDEE_WRITEOFF_TAG_TYPES = {
|
||||
writtenoff: 'success',
|
||||
|
||||
@@ -119,6 +119,9 @@
|
||||
<el-tag v-else-if="column.status" :type="statusType(row.approvalStatus)" class="status-text">
|
||||
{{ displayValue(row[column.prop]) }}
|
||||
</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>{{ displayValue(row[column.prop]) }}</span>
|
||||
</template>
|
||||
@@ -222,6 +225,7 @@ import TableHeaderTools from '@/components/table-header-tools/main.vue';
|
||||
import organizationSearch from '@/mixins/organization-search';
|
||||
import { getMKApprovalUrl } from '@/api/system/business-process';
|
||||
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
|
||||
import { kingdeePushStatusType } from '@/utils/kingdee';
|
||||
|
||||
// 表单提交成功后带标记返回,keep-alive 缓存的列表页据此重新拉取
|
||||
const invoiceReceiptListRefreshKey = 'invoice-receipt-list-refresh';
|
||||
@@ -480,6 +484,7 @@ export default {
|
||||
''
|
||||
);
|
||||
},
|
||||
kingdeePushStatusType,
|
||||
displayValue(value) {
|
||||
return value === null || value === undefined || value === '' ? '-' : value;
|
||||
},
|
||||
|
||||
@@ -74,6 +74,7 @@
|
||||
|
||||
<script>
|
||||
import { claimCandidates } from '@/api/payment/invoiceReceipt';
|
||||
import { kingdeePushStatusType } from '@/utils/kingdee';
|
||||
|
||||
export default {
|
||||
name: 'InvoiceReceiptCandidatesDialog',
|
||||
@@ -152,7 +153,7 @@ export default {
|
||||
);
|
||||
},
|
||||
pushStatusType(value) {
|
||||
return { pushed: 'warning', assigned: 'success', failed: 'danger', unsynced: 'info' }[value] || 'info';
|
||||
return kingdeePushStatusType(value);
|
||||
},
|
||||
formatMoney(value) {
|
||||
const number = Number(value);
|
||||
|
||||
Reference in New Issue
Block a user