一些禁用状态
This commit is contained in:
@@ -37,7 +37,7 @@
|
|||||||
<div class="section-title-row counterparty-toolbar">
|
<div class="section-title-row counterparty-toolbar">
|
||||||
<div class="section-title">我方主体</div>
|
<div class="section-title">我方主体</div>
|
||||||
<a-button
|
<a-button
|
||||||
v-if="!isViewMode && !isSingleAgreementChecked"
|
v-if="!isViewMode && !isOurPartyLocked"
|
||||||
type="link"
|
type="link"
|
||||||
class="text-action-btn"
|
class="text-action-btn"
|
||||||
@click="handleAddOurParty"
|
@click="handleAddOurParty"
|
||||||
@@ -46,7 +46,11 @@
|
|||||||
</a-button>
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="party-empty-state" style="margin-bottom: 12px">
|
<div class="party-empty-state" style="margin-bottom: 12px">
|
||||||
{{ isSingleAgreementChecked ? "单方协议默认使用当前登录主体,且不可修改" : "当前登录主体必须包含在我方主体中" }}
|
{{
|
||||||
|
isSingleAgreementChecked
|
||||||
|
? "单方协议默认使用当前登录主体,且不可修改"
|
||||||
|
: "当前登录主体必须包含在我方主体中"
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
@@ -59,7 +63,7 @@
|
|||||||
{{ party.displayName }}
|
{{ party.displayName }}
|
||||||
</div>
|
</div>
|
||||||
<a-button
|
<a-button
|
||||||
v-if="!isViewMode && !isSingleAgreementChecked && ourParties.length > 1"
|
v-if="!isViewMode && !isOurPartyLocked && ourParties.length > 1"
|
||||||
type="link"
|
type="link"
|
||||||
danger
|
danger
|
||||||
class="text-action-btn"
|
class="text-action-btn"
|
||||||
@@ -73,7 +77,7 @@
|
|||||||
v-model:value="party.companyName"
|
v-model:value="party.companyName"
|
||||||
:options="getPartyOptions(party.roleCode)"
|
:options="getPartyOptions(party.roleCode)"
|
||||||
show-search
|
show-search
|
||||||
:disabled="isSingleAgreementChecked"
|
:disabled="isViewMode || isOurPartyLocked"
|
||||||
:placeholder="`请选择${party.displayName}`"
|
:placeholder="`请选择${party.displayName}`"
|
||||||
:filter-option="filterPartnerOption"
|
:filter-option="filterPartnerOption"
|
||||||
@change="
|
@change="
|
||||||
@@ -83,6 +87,7 @@
|
|||||||
/>
|
/>
|
||||||
<a-button
|
<a-button
|
||||||
class="icon-btn"
|
class="icon-btn"
|
||||||
|
:disabled="isViewMode || isOurPartyLocked"
|
||||||
@click="showSearchTip(`${party.displayName}`)"
|
@click="showSearchTip(`${party.displayName}`)"
|
||||||
>
|
>
|
||||||
<SearchOutlined />
|
<SearchOutlined />
|
||||||
@@ -383,6 +388,7 @@
|
|||||||
>
|
>
|
||||||
<a-button
|
<a-button
|
||||||
size="small"
|
size="small"
|
||||||
|
:disabled="false"
|
||||||
@click="
|
@click="
|
||||||
downloadFile(
|
downloadFile(
|
||||||
detailState.contractBodyFilePath,
|
detailState.contractBodyFilePath,
|
||||||
@@ -418,6 +424,7 @@
|
|||||||
v-for="item in detailState.contractGistFileList"
|
v-for="item in detailState.contractGistFileList"
|
||||||
:key="item.uid || item.filePath"
|
:key="item.uid || item.filePath"
|
||||||
size="small"
|
size="small"
|
||||||
|
:disabled="false"
|
||||||
@click="
|
@click="
|
||||||
downloadFile(
|
downloadFile(
|
||||||
item.filePath,
|
item.filePath,
|
||||||
@@ -457,6 +464,7 @@
|
|||||||
v-for="item in detailState.authAttachmentList"
|
v-for="item in detailState.authAttachmentList"
|
||||||
:key="item.uid || item.filePath"
|
:key="item.uid || item.filePath"
|
||||||
size="small"
|
size="small"
|
||||||
|
:disabled="false"
|
||||||
@click="
|
@click="
|
||||||
downloadFile(
|
downloadFile(
|
||||||
item.filePath,
|
item.filePath,
|
||||||
@@ -493,6 +501,7 @@
|
|||||||
v-for="item in detailState.otherAttachmentList"
|
v-for="item in detailState.otherAttachmentList"
|
||||||
:key="item.uid || item.filePath"
|
:key="item.uid || item.filePath"
|
||||||
size="small"
|
size="small"
|
||||||
|
:disabled="false"
|
||||||
@click="
|
@click="
|
||||||
downloadFile(
|
downloadFile(
|
||||||
item.filePath,
|
item.filePath,
|
||||||
@@ -519,6 +528,7 @@
|
|||||||
<a-space style="margin-top: 8px">
|
<a-space style="margin-top: 8px">
|
||||||
<a-button
|
<a-button
|
||||||
size="small"
|
size="small"
|
||||||
|
:disabled="false"
|
||||||
@click="
|
@click="
|
||||||
downloadFile(
|
downloadFile(
|
||||||
detailState.signedFilePath,
|
detailState.signedFilePath,
|
||||||
@@ -828,6 +838,7 @@
|
|||||||
class="extra-check-item"
|
class="extra-check-item"
|
||||||
>
|
>
|
||||||
<a-checkbox
|
<a-checkbox
|
||||||
|
:disabled="isViewMode"
|
||||||
v-model:checked="
|
v-model:checked="
|
||||||
detailState.extraAmounts[`${item.key}Enabled`]
|
detailState.extraAmounts[`${item.key}Enabled`]
|
||||||
"
|
"
|
||||||
@@ -842,6 +853,7 @@
|
|||||||
:key="`${item.key}_input`"
|
:key="`${item.key}_input`"
|
||||||
v-model:value="detailState.extraAmounts[item.key]"
|
v-model:value="detailState.extraAmounts[item.key]"
|
||||||
:disabled="
|
:disabled="
|
||||||
|
isViewMode ||
|
||||||
!detailState.extraAmounts[`${item.key}Enabled`]
|
!detailState.extraAmounts[`${item.key}Enabled`]
|
||||||
"
|
"
|
||||||
:min="0"
|
:min="0"
|
||||||
@@ -1041,31 +1053,7 @@ import {
|
|||||||
getOptionLabel,
|
getOptionLabel,
|
||||||
} from "../contractLaunchOptions.js";
|
} from "../contractLaunchOptions.js";
|
||||||
|
|
||||||
// ========================================================================
|
const contractCompanyOptions = ref([]);
|
||||||
// 以下为表单模型 + 字典 + 工具函数,直接内联在此文件中。
|
|
||||||
// 接入后端时,保留这些函数,替换入参/出参为真实接口即可。
|
|
||||||
// ========================================================================
|
|
||||||
|
|
||||||
// ========== 合同方相关字典 ==========
|
|
||||||
|
|
||||||
const companyTypeOptions = [
|
|
||||||
{ label: "客户", value: "客户" },
|
|
||||||
{ label: "供应商", value: "供应商" },
|
|
||||||
{ label: "合作伙伴", value: "合作伙伴" },
|
|
||||||
{ label: "客户及供应商", value: "客户及供应商" },
|
|
||||||
{ label: "其他", value: "其他" },
|
|
||||||
];
|
|
||||||
|
|
||||||
const contractCompanyOptions = ref([
|
|
||||||
{ label: "扬州宏富特种材料有限公司", value: "扬州宏富特种材料有限公司" },
|
|
||||||
{ label: "宁波港船务货运代理有限公司", value: "宁波港船务货运代理有限公司" },
|
|
||||||
{ label: "宁波浙港供应链科技有限公司", value: "宁波浙港供应链科技有限公司" },
|
|
||||||
{ label: "上海远洋能源有限公司", value: "上海远洋能源有限公司" },
|
|
||||||
{ label: "宁波保税区港航设备有限公司", value: "宁波保税区港航设备有限公司" },
|
|
||||||
{ label: "浙江临港数智科技有限公司", value: "浙江临港数智科技有限公司" },
|
|
||||||
{ label: "杭州智云实施服务有限公司", value: "杭州智云实施服务有限公司" },
|
|
||||||
{ label: "浙港物流平台有限公司", value: "浙港物流平台有限公司" },
|
|
||||||
]);
|
|
||||||
|
|
||||||
// ========== 合同相关字典 ==========
|
// ========== 合同相关字典 ==========
|
||||||
|
|
||||||
@@ -1411,13 +1399,6 @@ function copyPartyState(input) {
|
|||||||
isThreePartyContract: source.isThreePartyContract,
|
isThreePartyContract: source.isThreePartyContract,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPartyByLocalId(list = [], localId) {
|
|
||||||
return (Array.isArray(list) ? list : []).find(
|
|
||||||
(item) => item.localId === localId,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 创建一条空的履行计划 */
|
/** 创建一条空的履行计划 */
|
||||||
function createPerformancePlan() {
|
function createPerformancePlan() {
|
||||||
return {
|
return {
|
||||||
@@ -1628,51 +1609,16 @@ const authAttachmentUploadList = ref([]);
|
|||||||
const bodyConfigModalRef = ref(null);
|
const bodyConfigModalRef = ref(null);
|
||||||
const currentSelfParty = 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 isViewMode = computed(() => modalMode.value === "view");
|
||||||
|
|
||||||
const isSingleAgreementChecked = computed(
|
const isSingleAgreementChecked = computed(
|
||||||
() => String(detailState.value.isSingleAgreement || "0") === "1",
|
() => String(detailState.value.isSingleAgreement || "0") === "1",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const isOurPartyLocked = computed(
|
||||||
|
() => isSingleAgreementChecked.value,
|
||||||
|
);
|
||||||
|
|
||||||
const ourParties = computed(
|
const ourParties = computed(
|
||||||
() => detailState.value.partyState.ourPartyList || [],
|
() => detailState.value.partyState.ourPartyList || [],
|
||||||
);
|
);
|
||||||
@@ -1928,29 +1874,12 @@ function handleCompanySelect(party, companyName, option = {}) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const profile = companyProfileMap[companyName];
|
|
||||||
if (!profile) {
|
|
||||||
party.companyName = companyName;
|
party.companyName = companyName;
|
||||||
return;
|
refreshPartyDisplayMeta();
|
||||||
}
|
|
||||||
|
|
||||||
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",
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleAddOurParty() {
|
function handleAddOurParty() {
|
||||||
if (isSingleAgreementChecked.value) return;
|
if (isOurPartyLocked.value) return;
|
||||||
detailState.value.partyState.ourPartyList =
|
detailState.value.partyState.ourPartyList =
|
||||||
detailState.value.partyState.ourPartyList || [];
|
detailState.value.partyState.ourPartyList || [];
|
||||||
detailState.value.partyState.ourPartyList.push(
|
detailState.value.partyState.ourPartyList.push(
|
||||||
@@ -1984,7 +1913,7 @@ function handleAddCounterparty() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleRemoveOurParty(localId) {
|
function handleRemoveOurParty(localId) {
|
||||||
if (isSingleAgreementChecked.value) return;
|
if (isOurPartyLocked.value) return;
|
||||||
detailState.value.partyState.ourPartyList = (
|
detailState.value.partyState.ourPartyList = (
|
||||||
detailState.value.partyState.ourPartyList || []
|
detailState.value.partyState.ourPartyList || []
|
||||||
).filter((item) => item.localId !== localId);
|
).filter((item) => item.localId !== localId);
|
||||||
@@ -2581,9 +2510,7 @@ function loadPartnerOptions() {
|
|||||||
value: item.customerNameC,
|
value: item.customerNameC,
|
||||||
raw: item,
|
raw: item,
|
||||||
}));
|
}));
|
||||||
contractCompanyOptions.value = options.length
|
contractCompanyOptions.value = options;
|
||||||
? options
|
|
||||||
: contractCompanyOptions.value;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user