Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 68904b02a5 | |||
| f3d69d7df0 | |||
| 11d33df46a | |||
| 06de9477e5 | |||
| f7ee9273c6 |
+1
-1
@@ -2,7 +2,7 @@ import request from '@/axios';
|
||||
import { ElLoading, ElMessage } from 'element-plus';
|
||||
|
||||
/** 审核按钮统一超时:审批通过后可能同步推送金蝶等耗时操作,覆盖全局 10s */
|
||||
export const APPROVE_TIMEOUT = 30000;
|
||||
export const APPROVE_TIMEOUT = 60 * 1000;
|
||||
|
||||
/**
|
||||
* 文件流返回
|
||||
|
||||
@@ -175,6 +175,30 @@ export const querySupplierCode = creditCode => {
|
||||
});
|
||||
};
|
||||
|
||||
// 金蝶开户行查询(A905-3):收款信息填写开户行失焦后精确匹配带出联行号
|
||||
export const queryKingdeeBank = bankName => {
|
||||
return request({
|
||||
url: '/blade-transport/customer-archive/query-bank',
|
||||
method: 'get',
|
||||
timeout: 30000,
|
||||
params: {
|
||||
bankName,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
// 金蝶联行号校验(A905-3):收款信息保存前按联行号精确匹配,查不到不允许保存
|
||||
export const queryKingdeeBankByNumber = cnapsCode => {
|
||||
return request({
|
||||
url: '/blade-transport/customer-archive/query-bank-by-number',
|
||||
method: 'get',
|
||||
timeout: 30000,
|
||||
params: {
|
||||
cnapsCode,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
export const syncKingdee = id => {
|
||||
return request({
|
||||
url: '/blade-transport/customer-archive/sync-kingdee',
|
||||
|
||||
@@ -16,7 +16,6 @@ import {
|
||||
approvalStatusOptions,
|
||||
invoiceStatusOptions,
|
||||
kingdeeSyncStatusOptions,
|
||||
kingdeeWriteOffStatusOptions,
|
||||
paymentStatusOptions,
|
||||
} from './formalSettlementSearch';
|
||||
import { formalSettlementTableColumns } from './formalSettlementTable';
|
||||
@@ -88,7 +87,6 @@ const COLUMN_EXTRA = {
|
||||
searchPlaceholder: '请选择',
|
||||
},
|
||||
kingdeeLockStatus: { slot: true },
|
||||
kingdeeWriteOffStatus: { slot: true },
|
||||
createTime: { width: 180 },
|
||||
};
|
||||
|
||||
@@ -173,5 +171,4 @@ export const formalSettlementOption = () => ({
|
||||
});
|
||||
|
||||
export const kingdeeSyncName = value => pickLabel(kingdeeSyncStatusOptions, value);
|
||||
export const kingdeeWriteOffName = value => pickLabel(kingdeeWriteOffStatusOptions, value);
|
||||
export const paymentStatusName = value => pickLabel(paymentStatusOptions, value);
|
||||
|
||||
@@ -34,11 +34,6 @@ export const kingdeeSyncStatusOptions = [
|
||||
{ label: '同步失败', value: 'failed' },
|
||||
];
|
||||
|
||||
export const kingdeeWriteOffStatusOptions = [
|
||||
{ label: '未冲销', value: 'unwrittenoff' },
|
||||
{ label: '已冲销', value: 'writtenoff' },
|
||||
];
|
||||
|
||||
export const formalSettlementSearchFields = [
|
||||
{ label: '结算单号', prop: 'formalSettlementNo', type: 'input' },
|
||||
{ label: '预付结算单号', prop: 'preSettlementNo', type: 'input' },
|
||||
|
||||
@@ -25,7 +25,6 @@ export const formalSettlementTableColumns = [
|
||||
{ label: '来源原单号', prop: 'originFormalSettlementNo', minWidth: 170 },
|
||||
{ label: '金蝶单据号', prop: 'kingdeeBillNo', minWidth: 150 },
|
||||
{ label: '金蝶单据状态', prop: 'kingdeeSyncStatus', minWidth: 135 },
|
||||
{ label: '金蝶冲销状态', prop: 'kingdeeWriteOffStatus', minWidth: 135 },
|
||||
{ label: '金蝶锁状态', prop: 'kingdeeLockStatus', minWidth: 150 },
|
||||
{ label: '附件同步', prop: 'attachmentSyncStatusName', minWidth: 100 },
|
||||
{ label: '创建人', prop: 'createUserName', minWidth: 110 },
|
||||
|
||||
@@ -13,12 +13,3 @@ export const KINGDEE_STATUS_TAG_TYPES = {
|
||||
|
||||
/** 金蝶单据状态 → el-tag 颜色类型,未映射状态返回 info */
|
||||
export const kingdeeStatusType = status => KINGDEE_STATUS_TAG_TYPES[status] || 'info';
|
||||
|
||||
/** 金蝶冲销状态 → el-tag 颜色类型(已冲销=绿、未冲销=黄) */
|
||||
export const KINGDEE_WRITEOFF_TAG_TYPES = {
|
||||
writtenoff: 'success',
|
||||
unwrittenoff: 'warning',
|
||||
};
|
||||
|
||||
/** 金蝶冲销状态 → el-tag 颜色类型,未映射状态(null=未校验)返回 info */
|
||||
export const kingdeeWriteOffTagType = status => KINGDEE_WRITEOFF_TAG_TYPES[status] || 'info';
|
||||
|
||||
@@ -93,15 +93,24 @@
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
|
||||
<!-- 客商风险:等级与金蝶黑名单组合展示(推送链路按金蝶命中口径落库),复用公共展示方法 -->
|
||||
<!-- 客商风险:等级与金蝶黑名单组合展示(推送链路按金蝶命中口径落库),复用公共展示方法;非无风险标签悬浮见明细 -->
|
||||
<template #customerRisk="{ row }">
|
||||
<el-tag
|
||||
<el-tooltip
|
||||
v-if="contractRiskTagName(row)"
|
||||
:type="isContractRisky(row) ? 'danger' : row.hcsRiskLevel === '1' ? 'warning' : 'success'"
|
||||
class="status-text"
|
||||
placement="top"
|
||||
effect="dark"
|
||||
popper-class="customer-risk-popper"
|
||||
>
|
||||
{{ contractRiskTagName(row) }}
|
||||
</el-tag>
|
||||
<template #content>
|
||||
<div>{{ row.hcsRiskDetail || contractRiskTagName(row) }}</div>
|
||||
</template>
|
||||
<el-tag
|
||||
:type="isContractRisky(row) ? 'danger' : row.hcsRiskLevel === '1' ? 'warning' : 'success'"
|
||||
class="status-text"
|
||||
>
|
||||
{{ contractRiskTagName(row) }}
|
||||
</el-tag>
|
||||
</el-tooltip>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
|
||||
@@ -3839,4 +3848,10 @@ export default {
|
||||
white-space: normal;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
/* 风险客商悬浮提示(同客商列表页):popper 挂在 body 下,约束宽度 */
|
||||
.customer-risk-popper {
|
||||
max-width: 360px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -72,15 +72,6 @@
|
||||
</el-tooltip>
|
||||
</template>
|
||||
|
||||
<template #kingdeeWriteOffStatus="{ row }">
|
||||
<el-tag
|
||||
v-if="row.kingdeeSyncStatus === 'synced'"
|
||||
:type="kingdeeWriteOffTagType(row.kingdeeWriteOffStatus)"
|
||||
>{{ kingdeeWriteOffName(row.kingdeeWriteOffStatus) || '未校验' }}</el-tag
|
||||
>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
|
||||
<template #kingdeeLockStatus="{ row }">
|
||||
<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>
|
||||
@@ -102,8 +93,8 @@
|
||||
|
||||
<script>
|
||||
import { invoiceStatusName } from '@/option/settlement/formalSettlementSearch';
|
||||
import { kingdeeSyncName, kingdeeWriteOffName, paymentStatusName } from '@/option/settlement/formalSettlement';
|
||||
import { kingdeeStatusType, kingdeeWriteOffTagType } from '@/utils/kingdee';
|
||||
import { kingdeeSyncName, paymentStatusName } from '@/option/settlement/formalSettlement';
|
||||
import { kingdeeStatusType } from '@/utils/kingdee';
|
||||
|
||||
export default {
|
||||
name: 'FormalSettlementTablePanel',
|
||||
@@ -216,10 +207,6 @@ export default {
|
||||
kingdeeSyncName(value) {
|
||||
return kingdeeSyncName(value);
|
||||
},
|
||||
kingdeeWriteOffName(value) {
|
||||
return kingdeeWriteOffName(value);
|
||||
},
|
||||
kingdeeWriteOffTagType,
|
||||
lockTag(row) {
|
||||
if (row.kingdeeLockStatus === 'locked') {
|
||||
return {
|
||||
|
||||
@@ -49,21 +49,24 @@
|
||||
</template>
|
||||
<template #customerRisk="{ row }">
|
||||
<el-tooltip
|
||||
v-if="customerRowRisky(row)"
|
||||
v-if="customerRowRiskName(row) && customerRowRiskName(row) !== '无风险'"
|
||||
placement="top"
|
||||
effect="dark"
|
||||
popper-class="customer-risk-popper"
|
||||
>
|
||||
<template #content>
|
||||
<div>{{ row.hcsRiskDetail || '该客商为高风险/黑名单客商' }}</div>
|
||||
<div>{{ row.hcsRiskDetail || customerRowRiskName(row) }}</div>
|
||||
</template>
|
||||
<el-tag type="danger" class="status-text">
|
||||
<el-tag
|
||||
:type="customerRowRisky(row) ? 'danger' : row.hcsRiskLevel === '1' ? 'warning' : 'success'"
|
||||
class="status-text"
|
||||
>
|
||||
{{ customerRowRiskName(row) }}
|
||||
</el-tag>
|
||||
</el-tooltip>
|
||||
<el-tag
|
||||
v-else-if="customerRowRiskName(row)"
|
||||
:type="row.hcsRiskLevel === '1' ? 'warning' : 'success'"
|
||||
type="success"
|
||||
class="status-text"
|
||||
>
|
||||
{{ customerRowRiskName(row) }}
|
||||
@@ -1097,8 +1100,18 @@
|
||||
<el-form-item label="开户人姓名" prop="accountHolderName">
|
||||
<el-input v-model="receiptForm.accountHolderName" maxlength="50" />
|
||||
</el-form-item>
|
||||
<el-form-item label="开户行" prop="bankName">
|
||||
<el-input v-model="receiptForm.bankName" maxlength="100" />
|
||||
<el-form-item prop="bankName">
|
||||
<template #label>
|
||||
<span class="receipt-bank-label">
|
||||
开户行
|
||||
<el-tooltip placement="top" effect="dark" content="请填写银行全称,系统将自动匹配金蝶档案带出联行号">
|
||||
<el-icon class="receipt-bank-help">
|
||||
<el-icon-question-filled />
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
</span>
|
||||
</template>
|
||||
<el-input v-model="receiptForm.bankName" maxlength="100" @blur="fetchReceiptCnapsCode" />
|
||||
</el-form-item>
|
||||
<el-form-item label="联行号" prop="cnapsCode">
|
||||
<el-input v-model="receiptForm.cnapsCode" maxlength="32" />
|
||||
@@ -1605,6 +1618,8 @@ import {
|
||||
remove,
|
||||
getScoreTemplate,
|
||||
recognizeBusinessLicenseOcr,
|
||||
queryKingdeeBank,
|
||||
queryKingdeeBankByNumber,
|
||||
queryKingdeeCustomer,
|
||||
querySupplierCode,
|
||||
syncKingdee,
|
||||
@@ -3654,18 +3669,50 @@ export default {
|
||||
this.receiptForm = this.emptyReceiptAccount();
|
||||
this.$refs.receiptForm?.clearValidate();
|
||||
},
|
||||
saveReceipt() {
|
||||
this.$refs.receiptForm.validate(valid => {
|
||||
if (!valid) return;
|
||||
const receipt = this.normalizeReceipt(this.receiptForm);
|
||||
if (this.receiptIndex > -1) {
|
||||
this.archiveForm.receiptAccounts.splice(this.receiptIndex, 1, receipt);
|
||||
// 开户行失焦后按行名精确匹配金蝶行名行号档案(A905-3),命中自动带出联行号,未命中提示检查
|
||||
async fetchReceiptCnapsCode() {
|
||||
const bankName = String(this.receiptForm.bankName || '').trim();
|
||||
if (!bankName) return;
|
||||
try {
|
||||
const res = await queryKingdeeBank(bankName);
|
||||
// 防止响应返回时用户已修改开户行
|
||||
if (String(this.receiptForm.bankName || '').trim() !== bankName) return;
|
||||
const bank = res?.data?.data || null;
|
||||
if (bank && bank.unionNumber) {
|
||||
this.receiptForm.cnapsCode = bank.unionNumber;
|
||||
this.$refs.receiptForm?.clearValidate('cnapsCode');
|
||||
} else {
|
||||
this.archiveForm.receiptAccounts.push(receipt);
|
||||
this.handleDetailCurrentChange('receipt', this.getDetailPageCount('receipt'));
|
||||
this.$message.warning('未查询到金蝶开户行信息,请检查开户行名称');
|
||||
}
|
||||
this.receiptBox = false;
|
||||
});
|
||||
} catch (error) {
|
||||
// 忽略查询异常,联行号留空由用户手填
|
||||
}
|
||||
},
|
||||
async saveReceipt() {
|
||||
const valid = await this.$refs.receiptForm.validate().catch(() => false);
|
||||
if (!valid) return;
|
||||
// 保存前按联行号精确校验金蝶行名行号档案(A905-3),查不到不允许保存
|
||||
const cnapsCode = String(this.receiptForm.cnapsCode || '').trim();
|
||||
let bank = null;
|
||||
try {
|
||||
const res = await queryKingdeeBankByNumber(cnapsCode);
|
||||
bank = res?.data?.data || null;
|
||||
} catch (error) {
|
||||
this.$message.warning('金蝶联行号校验失败,请稍后重试');
|
||||
return;
|
||||
}
|
||||
if (!bank || !bank.unionNumber) {
|
||||
this.$message.warning('未查询到金蝶联行号信息,不能保存,请检查联行号');
|
||||
return;
|
||||
}
|
||||
const receipt = this.normalizeReceipt(this.receiptForm);
|
||||
if (this.receiptIndex > -1) {
|
||||
this.archiveForm.receiptAccounts.splice(this.receiptIndex, 1, receipt);
|
||||
} else {
|
||||
this.archiveForm.receiptAccounts.push(receipt);
|
||||
this.handleDetailCurrentChange('receipt', this.getDetailPageCount('receipt'));
|
||||
}
|
||||
this.receiptBox = false;
|
||||
},
|
||||
deleteReceipt(index) {
|
||||
this.$confirm('确定删除该收款信息?', '提示', {
|
||||
@@ -6124,6 +6171,19 @@ export default {
|
||||
:deep(.el-select) {
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.receipt-bank-label {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.receipt-bank-help {
|
||||
color: #a8abb2;
|
||||
cursor: help;
|
||||
font-size: 14px;
|
||||
flex: none;
|
||||
}
|
||||
}
|
||||
|
||||
.receipt-dialog__footer-actions {
|
||||
|
||||
Reference in New Issue
Block a user