diff --git a/src/views/contract/launch/components/ContractPartyPlaceholderModal.vue b/src/views/contract/launch/components/ContractPartyPlaceholderModal.vue index 0b9773d..2f834c3 100644 --- a/src/views/contract/launch/components/ContractPartyPlaceholderModal.vue +++ b/src/views/contract/launch/components/ContractPartyPlaceholderModal.vue @@ -37,7 +37,7 @@
我方主体
- {{ isSingleAgreementChecked ? "单方协议默认使用当前登录主体,且不可修改" : "当前登录主体必须包含在我方主体中" }} + {{ + isSingleAgreementChecked + ? "单方协议默认使用当前登录主体,且不可修改" + : "当前登录主体必须包含在我方主体中" + }}
@@ -383,6 +388,7 @@ > item.localId === localId, - ); -} - /** 创建一条空的履行计划 */ function createPerformancePlan() { return { @@ -1628,51 +1609,16 @@ const authAttachmentUploadList = ref([]); const bodyConfigModalRef = ref(null); const currentSelfParty = ref(null); -const companyProfileMap = { - 扬州宏富特种材料有限公司: { - contactPhone: "13800000001", - registeredAddress: "江苏省扬州市邗江区江阳中路88号", - bankAccount: "622202100000000001", - bankName: "中国工商银行扬州分行", - contactName: "王经理", - legalRepresentative: "张三", - creditCode: "91321000MA1X111111", - }, - 宁波港船务货运代理有限公司: { - contactPhone: "15757460062", - registeredAddress: "宁波市北仑区明州西路188号", - bankAccount: "39011600192100006088", - bankName: "中国工商银行股份有限公司宁波市支行", - contactName: "周经理", - legalRepresentative: "李四", - creditCode: "91330201MA2ABCDE9X", - }, - 宁波浙港供应链科技有限公司: { - contactPhone: "13900000088", - registeredAddress: "宁波市江北区长兴路689号", - bankAccount: "621700000000000088", - bankName: "中国银行宁波分行", - contactName: "陈经理", - legalRepresentative: "陈总", - creditCode: "91330200MA2SUPPLY01", - }, - 上海远洋能源有限公司: { - contactPhone: "13600000015", - registeredAddress: "上海市浦东新区临港大道188号", - bankAccount: "621483000000000015", - bankName: "招商银行上海分行", - contactName: "吴经理", - legalRepresentative: "孙先生", - creditCode: "91310115MAOCEAN001", - }, -}; - const isViewMode = computed(() => modalMode.value === "view"); const isSingleAgreementChecked = computed( () => String(detailState.value.isSingleAgreement || "0") === "1", ); +const isOurPartyLocked = computed( + () => isSingleAgreementChecked.value, +); + const ourParties = computed( () => detailState.value.partyState.ourPartyList || [], ); @@ -1928,29 +1874,12 @@ function handleCompanySelect(party, companyName, option = {}) { return; } - const profile = companyProfileMap[companyName]; - if (!profile) { - party.companyName = companyName; - return; - } - - Object.assign(party, { - companyName, - subjectCode: party.subjectCode || "", - contactPhone: party.contactPhone || profile.contactPhone, - registeredAddress: party.registeredAddress || profile.registeredAddress, - bankAccount: party.bankAccount || profile.bankAccount, - bankName: party.bankName || profile.bankName, - contactName: party.contactName || profile.contactName, - legalRepresentative: - party.legalRepresentative || profile.legalRepresentative, - creditCode: party.creditCode || profile.creditCode, - oppCharacter: party.oppCharacter || "1", - }); + party.companyName = companyName; + refreshPartyDisplayMeta(); } function handleAddOurParty() { - if (isSingleAgreementChecked.value) return; + if (isOurPartyLocked.value) return; detailState.value.partyState.ourPartyList = detailState.value.partyState.ourPartyList || []; detailState.value.partyState.ourPartyList.push( @@ -1984,7 +1913,7 @@ function handleAddCounterparty() { } function handleRemoveOurParty(localId) { - if (isSingleAgreementChecked.value) return; + if (isOurPartyLocked.value) return; detailState.value.partyState.ourPartyList = ( detailState.value.partyState.ourPartyList || [] ).filter((item) => item.localId !== localId); @@ -2581,9 +2510,7 @@ function loadPartnerOptions() { value: item.customerNameC, raw: item, })); - contractCompanyOptions.value = options.length - ? options - : contractCompanyOptions.value; + contractCompanyOptions.value = options; }); }