!isApprovalSettlementChange(row.changeContent)
);
this.attachments = this.parseAttachments(detail.attachmentsJson);
- this.sortAttachments();
this.selectedAttachmentRows = [];
if (detail.contractId) {
await this.ensureContractPartyOptions(detail.contractId, {
@@ -3099,7 +3097,6 @@ export default {
uploadTime: existing?.uploadTime || file.uploadTime || uploadTime,
};
});
- this.sortAttachments();
this.selectedAttachmentRows = [];
},
async loadAttachmentTypeOptions() {
@@ -3115,7 +3112,6 @@ export default {
} catch (error) {
this.attachmentTypeOptions = [];
}
- this.sortAttachments();
},
resolveAttachmentType(fileName) {
const normalizedName = String(fileName || '').toLocaleLowerCase();
@@ -3143,25 +3139,6 @@ export default {
typeText === '其它附件'
);
},
- getAttachmentTypeOrder(type) {
- const normalizedType = String(type || '').trim();
- const index = this.attachmentTypeOptions.findIndex(
- item =>
- String(item.value || '').trim() === normalizedType ||
- String(item.label || '').trim() === normalizedType
- );
- return index === -1 ? Number.MAX_SAFE_INTEGER : index;
- },
- sortAttachments() {
- this.attachments = (this.attachments || [])
- .map((file, index) => ({ file, index }))
- .sort((a, b) => {
- const orderDifference =
- this.getAttachmentTypeOrder(a.file.type) - this.getAttachmentTypeOrder(b.file.type);
- return orderDifference || a.index - b.index;
- })
- .map(item => item.file);
- },
attachmentTypeName(type) {
const option = this.attachmentTypeOptions.find(
item => String(item.value) === String(type) || String(item.label) === String(type)
diff --git a/src/views/settlement/receivable-payable-detail.vue b/src/views/settlement/receivable-payable-detail.vue
index f24f56d..3da9145 100644
--- a/src/views/settlement/receivable-payable-detail.vue
+++ b/src/views/settlement/receivable-payable-detail.vue
@@ -136,7 +136,7 @@
-
+
-
+
String(item.id) === String(this.generateQuery.contractId)
);
- return formatContractOptionLabel(contract);
+ return contract?.contractName || '';
},
updateContractName() {
const contractId = this.updateFeeForm.contractId;
const contract = [...this.updateContractOptions, ...this.contractOptions].find(
item => String(item.id) === String(contractId)
);
- return formatContractOptionLabel(contract);
+ return contract?.contractName || '';
},
updateBillingPlanName() {
const billingPlanId = this.updateFeeForm.billingPlanId;