diff --git a/src/views/payment/invoice-application.vue b/src/views/payment/invoice-application.vue
index a447f77..27075a7 100644
--- a/src/views/payment/invoice-application.vue
+++ b/src/views/payment/invoice-application.vue
@@ -125,6 +125,17 @@
{{ displayValue(row[column.prop]) }}
{{ formatMoney(row[column.prop]) }}
+
+
+ {{
+ row.kingdeeStatusName || '-'
+ }}
+
+
{{ lockTag(row).label }}
@@ -238,6 +249,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 { kingdeeStatusType } from '@/utils/kingdee';
const emptyQuery = () => ({
applicationNo: '',
@@ -500,6 +512,7 @@ export default {
''
);
},
+ kingdeeStatusType,
lockTag(row) {
if (row.kingdeeLockStatus === 'locked') {
return { show: true, type: 'danger', label: '金蝶锁定中', tip: '该单据已被金蝶锁定,不可编辑/作废' };
diff --git a/src/views/payment/payment-application-form.vue b/src/views/payment/payment-application-form.vue
index 3e91449..0a01f1c 100644
--- a/src/views/payment/payment-application-form.vue
+++ b/src/views/payment/payment-application-form.vue
@@ -883,8 +883,6 @@ export default {
// 收款方 C101-1 风险查询留档:risky=高风险/黑名单,tip=后端拼装提示文案
payeeRisky: false,
payeeRiskTip: '',
- payeeRiskLevel: '',
- payeeBlackStatus: '',
attachmentRuleLoading: false,
// 最近一次从结算单同步过来的附件 URL,切换结算单时用于整批替换
linkedSettlementAttachmentUrls: [],
@@ -1065,14 +1063,12 @@ export default {
.toUpperCase();
return ['D', 'D级', 'E', 'E级', 'F', 'F级'].includes(level) || level.includes('高风险');
},
- // 高风险/黑名单收款方提示(C101-1,同合同新增页风险客商提示口径;强制拦截在后端提交校验与金蝶推送门禁)
+ // 高风险/黑名单收款方提示(C101-1,强制拦截在后端提交校验与金蝶推送门禁):
+ // 等级/黑名单明细以后端 riskTip 为准(黑名单=金蝶命中、等级=C101-1,统一口径),前端不再重复拼接
payeeRiskText() {
if (!this.payeeRisky) return '';
- const levelMap = { 0: '低风险', 1: '中风险', 2: '高风险' };
- const level = levelMap[this.payeeRiskLevel] || '未知';
- const blacklist = String(this.payeeBlackStatus || '').trim().toLowerCase() === 'yes' ? '是' : '否';
const tip = this.payeeRiskTip || `收款方[${this.form.payeeName || ''}]为高风险/黑名单客商`;
- return `风险等级:${level}|黑名单:${blacklist}。${tip},按集团规定不可直接付款,提交前须上传「特批附件」类型附件,审批通过后将自动发起付款特批`;
+ return `${tip},按集团规定不可直接付款,提交前须上传「特批附件」类型附件,审批通过后将自动发起付款特批`;
},
requiredAttachmentMaterials() {
if (this.form.paymentType === 'project_advance') {
@@ -2341,8 +2337,6 @@ export default {
this.payeeCustomerLevel = '';
this.payeeRisky = false;
this.payeeRiskTip = '';
- this.payeeRiskLevel = '';
- this.payeeBlackStatus = '';
if (!partyBName) {
if (!preserveCurrentValue) this.clearReceiptAccount();
return;
@@ -2381,8 +2375,6 @@ export default {
const risk = this.unwrapData(await getCustomerRisk(detail.customerCode)) || {};
this.payeeRisky = Boolean(risk.risky);
this.payeeRiskTip = risk.riskTip || '';
- this.payeeRiskLevel = risk.fdRiskLevel || '';
- this.payeeBlackStatus = risk.fdBlackStatus || '';
} catch (error) {
// 忽略风险查询异常,提交时后端 C101-1 强校验兜底
}
@@ -2702,7 +2694,8 @@ export default {
this.referenceParams('formal')
);
const data = this.unwrapData(response) || {};
- const records = data.records || [];
+ // 已调整的结算单为调整重推后的归档原单,金额已作废,不可再发起付款
+ const records = (data.records || []).filter(row => row.adjustStatus !== 'adjusted');
this.formalRows = await this.fillReferencePayableAmounts(records, 'settlement_payment');
this.formalPage.total = Number(data.total || 0);
} finally {
@@ -3124,18 +3117,21 @@ export default {
if (!target) return;
target.paymentRatio = value;
this.syncRowPayment(target, 'ratio');
- this.syncHeaderSettlementTotalsFromRows();
+ this.syncHeaderSettlementTotalsFromRows(true);
},
handleRowAppliedAmountChange(row, value) {
const target = this.findReferenceRow(row);
if (!target) return;
target.appliedAmount = value;
this.syncRowPayment(target, 'amount');
- this.syncHeaderSettlementTotalsFromRows();
+ this.syncHeaderSettlementTotalsFromRows(true);
},
- /** 多结算单时仅同步结算金额/可付款金额合计,申请付款金额与比例由上方独立维护 */
- syncHeaderSettlementTotalsFromRows() {
- if (this.referenceRows.length <= 1) return;
+ /**
+ * 结算信息行合计回填付款基本信息。
+ * @param {boolean} syncApplied 行内编辑时同步申请付款金额与比例;回显加载时保持原值,避免改写历史单据
+ */
+ syncHeaderSettlementTotalsFromRows(syncApplied = false) {
+ if (!this.referenceRows.length) return;
const settlementAmount = this.referenceRows.reduce(
(total, item) => total + Number(item.settlementAmount || 0),
0
@@ -3144,9 +3140,21 @@ export default {
(total, item) => total + Number(item.payableAmount || 0),
0
);
+ const appliedAmount = this.referenceRows.reduce(
+ (total, item) => total + Number(item.appliedAmount || 0),
+ 0
+ );
this.amountSyncing = true;
this.form.settlementAmount = Number(settlementAmount.toFixed(2));
this.form.payableAmount = Number(payableAmount.toFixed(2));
+ if (syncApplied) {
+ this.form.appliedAmount = Number(appliedAmount.toFixed(2));
+ if (this.paymentAmountBase) {
+ this.form.paymentRatio = Number(
+ ((appliedAmount / this.paymentAmountBase) * 100).toFixed(2)
+ );
+ }
+ }
this.$nextTick(() => {
this.amountSyncing = false;
this.$refs.formRef?.validateField?.(['settlementAmount', 'appliedAmount']);
@@ -3320,6 +3328,18 @@ export default {
ElMessage.warning(`${exceededRow.settlementNo || '结算单'}付款金额不能超过可付款金额`);
return false;
}
+ const rowAppliedTotal = this.referenceRows.reduce(
+ (total, item) => total + Number(item.appliedAmount || 0),
+ 0
+ );
+ // 金蝶按付款基本信息申请金额推单,行合计不等时预付建档分摊会与金蝶金额不一致
+ if (Math.abs(rowAppliedTotal - appliedAmount) > 0.005) {
+ this.clearMessages();
+ ElMessage.warning(
+ `结算行付款金额合计${rowAppliedTotal.toFixed(2)}与申请付款金额${appliedAmount.toFixed(2)}不一致,请调整`
+ );
+ return false;
+ }
}
if (this.form.paymentType === 'project_advance' && !this.form.projectId) {
this.clearMessages();
diff --git a/src/views/payment/payment-application.vue b/src/views/payment/payment-application.vue
index 45b8fe6..7135c3a 100644
--- a/src/views/payment/payment-application.vue
+++ b/src/views/payment/payment-application.vue
@@ -68,6 +68,18 @@
-
+
+
+ {{
+ row.kingdeeStatusName || '-'
+ }}
+
+
+
-
+
diff --git a/src/views/payment/receipt-claim-record.vue b/src/views/payment/receipt-claim-record.vue
index bce6f40..df9d3cc 100644
--- a/src/views/payment/receipt-claim-record.vue
+++ b/src/views/payment/receipt-claim-record.vue
@@ -3,7 +3,7 @@
-
+
@@ -56,16 +56,6 @@
-
-
-
-
-
-
- 查询金蝶认领结果
-
作废 ({
claimDateRange: [],
claimerDeptName: '',
kingdeeBillStatus: '',
- pushStatus: '',
});
export default {
@@ -195,17 +177,15 @@ export default {
searchExpanded: false,
// 与 avue-crud 一致:搜索项数量超过 searchIndex(默认一行 4 项)时才显示“展开/收起”
searchIndex: 4,
- searchItemCount: 11,
+ searchItemCount: 10,
searchVisible: true,
tableSize: 'default',
claimStatusOptions: api.claimStatusOptions,
kingdeeBillStatusOptions: api.kingdeeBillStatusOptions,
- pushStatusOptions: api.pushStatusOptions,
columns: receiptClaimRecordTableColumns,
visibleColumnKeys: receiptClaimRecordTableColumns.map(column => column.prop),
rows: [],
loading: false,
- refreshing: false,
page: { current: 1, size: 10, total: 0 },
};
},
@@ -272,7 +252,7 @@ export default {
},
async handleVoid(row) {
await this.$confirm(
- '作废后将回退本次认领金额,是否继续?',
+ '作废后将回退本次认领金额,并同步作废合同合规系统认领记录,是否继续?',
'作废认领记录',
{ type: 'warning', confirmButtonText: '确定', cancelButtonText: '取消' }
);
@@ -280,16 +260,6 @@ export default {
this.$message.success('作废成功');
await this.loadTable();
},
- async handleRefreshKingdeeResult() {
- this.refreshing = true;
- try {
- const updated = Number(this.unwrapData(await api.queryKingdeeResult()) || 0);
- this.$message.success(`金蝶认领结果回写完成,更新${updated}条`);
- await this.loadTable();
- } finally {
- this.refreshing = false;
- }
- },
hasPermission(code) {
return this.isAdmin || this.validData(this.permission?.[code], false);
},
diff --git a/src/views/payment/receipt-flow-batch-form.vue b/src/views/payment/receipt-flow-batch-form.vue
index 547a956..58feffc 100644
--- a/src/views/payment/receipt-flow-batch-form.vue
+++ b/src/views/payment/receipt-flow-batch-form.vue
@@ -7,7 +7,7 @@
@@ -43,8 +43,8 @@
{{ formatMoney(row.claimedAmount) }}
-
- {{ formatMoney(row.unclaimedAmount) }}
+
+ {{ formatMoney(row.unmatchAmountRec) }}
{{ formatMoney(flowRemaining(row)) }}
@@ -96,7 +96,7 @@
formatMoney(row.settlement.claimedReceiptAmount)
}}
-
+
{{ row.flow.receiptNoticeNo || '-' }}
@@ -302,10 +302,8 @@ export default {
);
},
flowRemaining(flow) {
- const unclaimed = Number(flow.unclaimedAmount || 0);
- const receipt = Number(flow.receiptAmount || 0);
- const ceiling = unclaimed > 0 && receipt > 0 ? Math.min(unclaimed, receipt) : unclaimed || receipt;
- return Math.max(ceiling - Number(flow.claimedAmount || 0), 0);
+ // 认领只登记本地:剩余可认领 = 收款金额 − 已认领金额
+ return Math.max(Number(flow.receiptAmount || 0) - Number(flow.claimedAmount || 0), 0);
},
maxAllocation(row) {
const current = Number(row.settlement.allocations?.[row.flow.id] || 0);
@@ -355,12 +353,8 @@ export default {
}
for (const flow of this.flows) {
const total = this.flowAllocatedTotal(flow.id);
- const remaining = Math.max(
- Number(flow.unclaimedAmount || 0) - Number(flow.claimedAmount || 0),
- 0
- );
- if (total > remaining + 0.001) {
- this.$message.warning(`流水${flow.receiptNoticeNo}的累计认领金额不能超过公告未认领金额`);
+ if (total > this.flowRemaining(flow) + 0.001) {
+ this.$message.warning(`流水${flow.receiptNoticeNo}的累计认领金额不能超过剩余可认领金额`);
return;
}
}
diff --git a/src/views/payment/receipt-flow-form.vue b/src/views/payment/receipt-flow-form.vue
index 8497954..8778966 100644
--- a/src/views/payment/receipt-flow-form.vue
+++ b/src/views/payment/receipt-flow-form.vue
@@ -12,7 +12,7 @@
({
transactionTime: '',
detailSerialNo: '',
claimedAmount: 0,
- unclaimedAmount: 0,
+ unmatchAmountRec: 0,
claimerName: '',
claimerDeptName: '',
claimDate: '',
@@ -252,11 +252,10 @@ export default {
);
},
claimableAmount() {
- const unclaimed = Number(this.form.unclaimedAmount || 0);
+ // 认领只登记本地:剩余可认领 = 收款金额 − 已认领金额
const receipt = Number(this.form.receiptAmount || 0);
- const ceiling =
- unclaimed > 0 && receipt > 0 ? Math.min(unclaimed, receipt) : unclaimed || receipt;
- return Math.max(ceiling - Number(this.form.claimedAmount || 0), 0);
+ const claimed = Number(this.form.claimedAmount || 0);
+ return Math.max(receipt - claimed, 0);
},
},
created() {
diff --git a/src/views/payment/receipt-flow.vue b/src/views/payment/receipt-flow.vue
index 8fcf069..29ad100 100644
--- a/src/views/payment/receipt-flow.vue
+++ b/src/views/payment/receipt-flow.vue
@@ -3,7 +3,7 @@
-
+
@@ -15,16 +15,6 @@
-
-
-
-
-
{{ displayValue(row[column.prop]) }}
-
+
- 认领
- 推送金蝶
- -
+ 认领
+ -
@@ -201,13 +178,13 @@
>
-
+
{{ displayValue(detailDialog.data.receiptNoticeNo) }}
{{ displayValue(detailDialog.data.payerName) }}
-
+
{{ formatMoney(detailDialog.data.receiptAmount) }}
@@ -236,13 +213,8 @@
{{ formatMoney(detailDialog.data.remainingAmount) }}
-
- {{ formatMoney(detailDialog.data.unclaimedAmount) }}
-
-
-
- {{ displayValue(detailDialog.data.pushStatusName) }}
-
+
+ {{ formatMoney(detailDialog.data.unmatchAmountRec) }}
{{ displayValue(detailDialog.data.kingdeeBillNo) }}
@@ -250,9 +222,6 @@
{{ displayValue(detailDialog.data.kingdeeBillStatusName) }}
-
- {{ displayValue(detailDialog.data.pushFailReason) }}
-
{{ displayValue(detailDialog.data.summary) }}
@@ -267,9 +236,7 @@
-
- {{ row.actionType === 'push' ? row.actionName : claimStatusChange(row) }}
-
+ {{ claimStatusChange(row) }}
@@ -297,7 +264,6 @@ const emptyQuery = () => ({
summary: '',
detailSerialNo: '',
claimStatus: '',
- pushStatus: '',
kingdeeBillStatus: '',
receiptAmountStart: undefined,
receiptAmountEnd: undefined,
@@ -314,7 +280,6 @@ export default {
ArrowUp,
query: emptyQuery(),
claimStatusOptions: api.claimStatusOptions,
- pushStatusOptions: api.pushStatusOptions,
kingdeeBillStatusOptions: api.kingdeeBillStatusOptions,
columns: receiptFlowTableColumns,
visibleColumnKeys: receiptFlowTableColumns.map(column => column.prop),
@@ -324,7 +289,6 @@ export default {
selectedRows: [],
loading: false,
syncing: false,
- pushingId: null,
searchExpanded: false,
// 与 avue-crud 一致:搜索项数量超过 searchIndex(默认一行 4 项)时才显示“展开/收起”
searchIndex: 4,
@@ -389,7 +353,7 @@ export default {
this.syncing = true;
try {
const syncedCount = Number(this.unwrapData(await api.sync()) || 0);
- this.$message.success(`流水同步完成,共同步${syncedCount}条认领公告`);
+ this.$message.success(`流水同步完成,共同步${syncedCount}条收款流水`);
await this.loadTable();
} finally {
this.syncing = false;
@@ -448,38 +412,7 @@ export default {
canClaim(row) {
return this.hasPermission('receipt_flow_claim') && Number(row.remainingAmount || 0) > 0;
},
- canPush(row) {
- return (
- this.hasPermission('receipt_flow_push') &&
- !!row.billId &&
- row.claimStatus === 'claimed' &&
- row.pushStatus !== 'pushed'
- );
- },
- async handlePush(row) {
- try {
- await this.$confirm(
- `确认将流水【${row.receiptNoticeNo || row.detailSerialNo || ''}】推送金蝶生成收款单?`,
- '推送金蝶',
- { type: 'warning' }
- );
- } catch {
- return;
- }
- this.pushingId = row.id;
- try {
- const data = this.unwrapData(await api.pushKingdee(row.id));
- const billNo = data?.kingdeeBillNo;
- this.$message.success(billNo ? `推送成功,金蝶收款单号:${billNo}` : '推送成功');
- await this.loadTable();
- } finally {
- this.pushingId = null;
- }
- },
statusType(row, column) {
- if (column?.prop === 'pushStatusName') {
- return { pushed: 'success', failed: 'danger' }[row.pushStatus] || 'info';
- }
return (
{ claimed: 'success', partial: 'warning', unclaimed: 'info' }[row.claimStatus] || ''
);
diff --git a/src/views/settlement/components/formal-settlement-editor.vue b/src/views/settlement/components/formal-settlement-editor.vue
index bb59b40..7455abb 100644
--- a/src/views/settlement/components/formal-settlement-editor.vue
+++ b/src/views/settlement/components/formal-settlement-editor.vue
@@ -559,7 +559,7 @@
@@ -708,7 +708,9 @@
:rows="changeRecordDetailRows"
/>
- 同步
+ 同步
取消
- 同步
+ 同步
取消
- {{ kingdeeSyncName(row.kingdeeSyncStatus) }}
+
+
+ {{
+ kingdeeSyncName(row.kingdeeSyncStatus)
+ }}
+
+
+
+
+ {{ kingdeeWriteOffName(row.kingdeeWriteOffStatus) || '未校验' }}
+ -
+
@@ -83,7 +102,8 @@