diff --git a/src/views/contract/launch/components/ContractPartyPlaceholderModal.vue b/src/views/contract/launch/components/ContractPartyPlaceholderModal.vue
index 7151001..e8e0aae 100644
--- a/src/views/contract/launch/components/ContractPartyPlaceholderModal.vue
+++ b/src/views/contract/launch/components/ContractPartyPlaceholderModal.vue
@@ -373,6 +373,32 @@
+
+
授权委托书附件
+
+ 当前签订方式需要上传授权委托书附件
+
+
+
+
+ 下载 {{ item.name || item.fileName }}
+
+
+
+
+
其他附件
+
+
+
+
+
+
+
是否涉及港澳台
item.fileCategory === "gist")
.map(normalizeFileItem),
+ authAttachmentList: source.authAttachmentList?.length
+ ? source.authAttachmentList.map(normalizeFileItem)
+ : sourceFiles
+ .filter((item) => item.fileCategory === "auth")
+ .map(normalizeFileItem),
};
}
@@ -1286,6 +1350,7 @@ function createContractFormData() {
contractType: "",
contractTypeCode: "",
contractAmount: null,
+ estimatedAmount: null,
effectiveStart: "",
effectiveEnd: "",
contractPeriodType: "0",
@@ -1312,6 +1377,7 @@ function createContractFormData() {
bodySummary: "",
invoiceDate: "",
receiveDate: "",
+ biddingNo: "",
contractBodyFileName: "",
contractBodyFilePath: "",
@@ -1320,6 +1386,7 @@ function createContractFormData() {
contractBodyArrayBuffer: null,
otherAttachmentList: [],
contractGistFileList: [],
+ authAttachmentList: [],
// 正文模板字段值统一放这里,后续新增模板字段时尽量只改 templateFieldList
templateFieldValues: {},
partyState: {
@@ -1335,6 +1402,7 @@ function createContractFormData() {
isIncludedInCurrentYearBudget: false,
isShared: false,
isMajorContract: false,
+ needAmendments: false,
extraAmounts: {
depositEnabled: false,
deposit: 0,
@@ -1386,6 +1454,8 @@ function copyContractFormData(data = {}) {
form.otherAttachmentList = fileState.otherAttachmentList;
} else if (key === "contractGistFileList") {
form.contractGistFileList = fileState.contractGistFileList;
+ } else if (key === "authAttachmentList") {
+ form.authAttachmentList = fileState.authAttachmentList;
} else if (
[
"contractBodyFileName",
@@ -1410,6 +1480,7 @@ function copyContractFormData(data = {}) {
source.signingSubjectCode ?? source.orgId ?? form.signingSubjectCode;
} else if (
[
+ "needAmendments",
"isInvolveHongKongMacaoTaiwan",
"isPublicTender",
"isForeignRelatedSubject",
@@ -1442,6 +1513,7 @@ const templateName = ref("");
const detailState = ref(createContractFormData());
const otherAttachmentList = ref([]);
const gistAttachmentList = ref([]);
+const authAttachmentUploadList = ref([]);
const bodyConfigModalRef = ref(null);
const counterpartyRoleKeys = ref([]);
@@ -1515,6 +1587,10 @@ const contractBodyHint = computed(() =>
: "当前为模板创建,点击维护模板信息和正文预览",
);
+const requiresAuthAttachment = computed(() =>
+ ["GZBSQRQZ", "HTZYZBSQRQZ"].includes(detailState.value.sealType),
+);
+
function syncUploadLists() {
otherAttachmentList.value = (detailState.value.otherAttachmentList || []).map(
(item, index) => ({
@@ -1532,6 +1608,14 @@ function syncUploadLists() {
status: item.status || "done",
}),
);
+ authAttachmentUploadList.value = (detailState.value.authAttachmentList || []).map(
+ (item, index) => ({
+ uid: item.uid || `auth_${index + 1}`,
+ name: item.name || item.fileName,
+ size: item.size ?? item.fileSize,
+ status: item.status || "done",
+ }),
+ );
}
function syncCounterpartyState() {
@@ -1754,6 +1838,10 @@ function handleGistAttachmentUpload(file) {
return uploadAttachmentFile(file, "gist");
}
+function handleAuthAttachmentUpload(file) {
+ return uploadAttachmentFile(file, "auth");
+}
+
function uploadAttachmentFile(file, category) {
const formData = new FormData();
formData.append("file", file);
@@ -1774,6 +1862,9 @@ function uploadAttachmentFile(file, category) {
if (category === "gist") {
detailState.value.contractGistFileList.push(item);
gistAttachmentList.value.push(item);
+ } else if (category === "auth") {
+ detailState.value.authAttachmentList.push(item);
+ authAttachmentUploadList.value.push(item);
} else {
detailState.value.otherAttachmentList.push(item);
otherAttachmentList.value.push(item);
@@ -1803,6 +1894,16 @@ function handleRemoveGistAttachment(file) {
);
}
+function handleRemoveAuthAttachment(file) {
+ detailState.value.authAttachmentList =
+ detailState.value.authAttachmentList.filter(
+ (item) => item.uid !== file.uid && item.name !== file.name,
+ );
+ authAttachmentUploadList.value = authAttachmentUploadList.value.filter(
+ (item) => item.uid !== file.uid && item.name !== file.name,
+ );
+}
+
async function downloadFile(filePath, fileName = "附件") {
if (!filePath) {
message.warning("文件路径为空,无法下载");
@@ -1901,6 +2002,13 @@ function validateState() {
)
return "请填写期限说明";
if (!detailState.value.valuationMode) return "请选择计价方式";
+ if (
+ detailState.value.valuationMode === "2" &&
+ (detailState.value.estimatedAmount === null ||
+ detailState.value.estimatedAmount === undefined ||
+ detailState.value.estimatedAmount === "")
+ )
+ return "请填写预估金额";
if (!detailState.value.currencyName) return "请选择币种";
if (!detailState.value.sealType) return "请选择签订方式";
if (!detailState.value.textSource) return "请选择文本来源";
@@ -1910,8 +2018,15 @@ function validateState() {
if (!detailState.value.isElectron) return "请选择签署方式";
if (!detailState.value.contractTypeCode) return "请选择合同属性中的合同类型";
if (!detailState.value.executorAccount?.trim()) return "请填写合同执行人";
+ if (detailState.value.isPublicTender && !detailState.value.biddingNo?.trim())
+ return "请填写关联招标号";
if (!detailState.value.contractBodyFileName?.trim())
return "请先配置合同正文";
+ if (
+ requiresAuthAttachment.value &&
+ !(detailState.value.authAttachmentList || []).length
+ )
+ return "请上传授权委托书附件";
for (const plan of detailState.value.performancePlans || []) {
if (!plan.planMatter?.trim()) return "请填写履行计划的履行事项";
if (!plan.planWhere?.trim()) return "请填写履行计划的履约条件";
@@ -1936,6 +2051,12 @@ function handleSave() {
detailState.value.contractAmount === ""
? null
: Number(detailState.value.contractAmount);
+ detailState.value.estimatedAmount =
+ detailState.value.estimatedAmount === null ||
+ detailState.value.estimatedAmount === undefined ||
+ detailState.value.estimatedAmount === ""
+ ? null
+ : Number(detailState.value.estimatedAmount);
const record = buildLaunchRecord();
emit("save", {
@@ -2016,6 +2137,15 @@ function buildLaunchRecord() {
fileSize: item.size ?? item.fileSize ?? 0,
});
});
+ (detailState.value.authAttachmentList || []).forEach((item) => {
+ fileList.push({
+ fileCategory: "auth",
+ fileName: item.name || item.fileName,
+ filePath: item.filePath || "",
+ fileType: item.fileType || "",
+ fileSize: item.size ?? item.fileSize ?? 0,
+ });
+ });
(detailState.value.otherAttachmentList || []).forEach((item) => {
fileList.push({
fileCategory: "other",
@@ -2048,6 +2178,11 @@ function buildLaunchRecord() {
primaryContent: detailState.value.primaryContent,
amountExplain: detailState.value.amountExplain,
valuationMode: detailState.value.valuationMode,
+ needAmendments: detailState.value.needAmendments ? "1" : "0",
+ estimatedAmount:
+ detailState.value.valuationMode === "2"
+ ? detailState.value.estimatedAmount
+ : null,
sealType: detailState.value.sealType,
textSource:
detailState.value.textSource ||
@@ -2069,6 +2204,7 @@ function buildLaunchRecord() {
isShare: detailState.value.isShared ? "1" : "0",
contractNature: detailState.value.isForeignRelatedSubject ? "1" : "0",
isSgat: detailState.value.isInvolveHongKongMacaoTaiwan ? "1" : "0",
+ biddingNo: detailState.value.isPublicTender ? detailState.value.biddingNo || "" : "",
contractGistRemark: detailState.value.contractGistRemark || "",
bodySummary: detailState.value.bodySummary || detailState.value.primaryContent || "",
contractTextFileName: detailState.value.contractBodyFileName || "",