fix: 金蝶票据池弹框样式与批量转结算保持一致 #14
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<el-dialog v-model="visible" :title="title" width="92%" append-to-body destroy-on-close @open="handleOpen">
|
||||
<el-form :model="query" inline label-width="130px" @submit.prevent>
|
||||
<el-dialog v-model="visible" :title="title" width="92%" append-to-body align-center destroy-on-close @open="handleOpen">
|
||||
<el-form class="kingdee-pool-dialog__form" :model="query" inline label-position="right" label-width="120px" @submit.prevent>
|
||||
<el-form-item label="发票号码">
|
||||
<el-input v-model="query.invoiceNo" clearable @keyup.enter="handleQuery" />
|
||||
<el-input v-model="query.invoiceNo" clearable placeholder="请输入" @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="开票日期">
|
||||
<el-date-picker
|
||||
@@ -10,15 +10,16 @@
|
||||
type="daterange"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
range-separator="-"
|
||||
start-placeholder="请选择"
|
||||
end-placeholder="请选择"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="开票单位">
|
||||
<el-input v-model="query.salerName" clearable @keyup.enter="handleQuery" />
|
||||
<el-input v-model="query.salerName" clearable placeholder="请输入" @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="受票单位">
|
||||
<el-input v-model="query.buyerName" clearable @keyup.enter="handleQuery" />
|
||||
<el-input v-model="query.buyerName" clearable placeholder="请输入" @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="开票单位(销方)">
|
||||
<el-select
|
||||
@@ -93,6 +94,9 @@
|
||||
<el-form-item>
|
||||
<el-button :disabled="loading" @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" :disabled="loading" @click="handleQuery">查询</el-button>
|
||||
<el-tooltip content="按名称检索范围为已同步票,未找到请改用发票号码或税号精确查找" placement="top">
|
||||
<el-icon class="kingdee-pool-dialog__query-tip"><QuestionFilled /></el-icon>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
@@ -101,7 +105,7 @@
|
||||
:data="rows"
|
||||
:row-key="rowKey"
|
||||
border
|
||||
height="520"
|
||||
max-height="50vh"
|
||||
:highlight-current-row="!multiple"
|
||||
@selection-change="selection => (selected = selection)"
|
||||
@row-dblclick="handleRowDblclick"
|
||||
@@ -118,6 +122,7 @@
|
||||
</el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column type="index" label="序号" width="70" align="center" :index="indexMethod" />
|
||||
<el-table-column prop="invoiceNo" label="发票号码" min-width="180" />
|
||||
<el-table-column prop="invoiceDate" label="开票日期" min-width="120" />
|
||||
<el-table-column prop="invoiceType" label="发票类型" min-width="140" />
|
||||
@@ -172,8 +177,8 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="kingdee-pool-dialog__pager">
|
||||
<span class="kingdee-pool-dialog__pager-tip">按名称检索范围为已同步票,未找到请改用发票号码或税号精确查找</span>
|
||||
<div class="kingdee-pool-dialog__pagination">
|
||||
<span class="kingdee-pool-dialog__pagination-tip">按名称检索范围为已同步票,未找到请改用发票号码或税号精确查找</span>
|
||||
<el-pagination
|
||||
v-model:current-page="page.current"
|
||||
v-model:page-size="page.size"
|
||||
@@ -323,6 +328,9 @@ export default {
|
||||
this.page.current = 1;
|
||||
this.load();
|
||||
},
|
||||
indexMethod(index) {
|
||||
return (this.page.current - 1) * this.page.size + index + 1;
|
||||
},
|
||||
resetQuery() {
|
||||
this.query = this.emptyQuery();
|
||||
this.handleQuery();
|
||||
@@ -420,15 +428,28 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.kingdee-pool-dialog__pager {
|
||||
.kingdee-pool-dialog__form {
|
||||
margin-bottom: 16px;
|
||||
padding: 12px 12px 4px;
|
||||
background: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
.kingdee-pool-dialog__pagination {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 12px;
|
||||
padding: 16px 0;
|
||||
gap: 16px;
|
||||
}
|
||||
.kingdee-pool-dialog__pager-tip {
|
||||
.kingdee-pool-dialog__pagination-tip {
|
||||
color: #909399;
|
||||
font-size: 12px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.kingdee-pool-dialog__query-tip {
|
||||
margin-left: 8px;
|
||||
color: #909399;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -145,10 +145,10 @@
|
||||
<el-descriptions-item label="创建时间">
|
||||
{{ invoiceRegisterDialog.row.createTime || '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="金蝶同步状态" :span="2">
|
||||
<el-descriptions-item label="金蝶同步状态">
|
||||
{{ kingdeeSyncName(invoiceRegisterDialog.row.kingdeeSyncStatus) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="备注" :span="2">
|
||||
<el-descriptions-item label="备注">
|
||||
{{ invoiceRegisterDialog.row.remark || '-' }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
@@ -847,6 +847,10 @@ export default {
|
||||
settlementTypeName(value) {
|
||||
return { payable: '付款', receivable: '收款' }[value] || '-';
|
||||
},
|
||||
// 模板无法直接访问 script 顶部 import,包装成实例方法(与 formal-settlement-table-panel 同模式)
|
||||
kingdeeSyncName(value) {
|
||||
return kingdeeSyncName(value);
|
||||
},
|
||||
unwrapData(response) {
|
||||
const body = response?.data || response || {};
|
||||
return body?.data || body;
|
||||
|
||||
Reference in New Issue
Block a user