增加授权委托书
This commit is contained in:
@@ -373,6 +373,32 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div v-if="requiresAuthAttachment" class="upload-block">
|
||||||
|
<div class="upload-label">授权委托书附件</div>
|
||||||
|
<a-upload-dragger
|
||||||
|
:file-list="authAttachmentUploadList"
|
||||||
|
:before-upload="handleAuthAttachmentUpload"
|
||||||
|
@remove="handleRemoveAuthAttachment"
|
||||||
|
:disabled="isViewMode"
|
||||||
|
:show-upload-list="{ showRemoveIcon: !isViewMode }"
|
||||||
|
multiple
|
||||||
|
>
|
||||||
|
<div class="other-upload-text">当前签订方式需要上传授权委托书附件</div>
|
||||||
|
</a-upload-dragger>
|
||||||
|
<div v-if="detailState.authAttachmentList?.length" class="download-list">
|
||||||
|
<a-space wrap>
|
||||||
|
<a-button
|
||||||
|
v-for="item in detailState.authAttachmentList"
|
||||||
|
:key="item.uid || item.filePath"
|
||||||
|
size="small"
|
||||||
|
@click="downloadFile(item.filePath, item.name || item.fileName)"
|
||||||
|
>
|
||||||
|
下载 {{ item.name || item.fileName }}
|
||||||
|
</a-button>
|
||||||
|
</a-space>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="upload-block">
|
<div class="upload-block">
|
||||||
<div class="upload-label">其他附件</div>
|
<div class="upload-label">其他附件</div>
|
||||||
<a-upload-dragger
|
<a-upload-dragger
|
||||||
@@ -449,6 +475,20 @@
|
|||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<a-form-item
|
||||||
|
v-if="detailState.valuationMode === '2'"
|
||||||
|
class="tight-item"
|
||||||
|
label="预估金额"
|
||||||
|
required
|
||||||
|
>
|
||||||
|
<a-input-number
|
||||||
|
v-model:value="detailState.estimatedAmount"
|
||||||
|
:min="0"
|
||||||
|
:precision="2"
|
||||||
|
:controls="false"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
<a-form-item class="tight-item" label="币种">
|
<a-form-item class="tight-item" label="币种">
|
||||||
<a-input
|
<a-input
|
||||||
:value="
|
:value="
|
||||||
@@ -528,6 +568,17 @@
|
|||||||
placeholder="起草人所在主体机构编码;当前默认取登录组织ID,多个用逗号分隔"
|
placeholder="起草人所在主体机构编码;当前默认取登录组织ID,多个用逗号分隔"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<a-form-item
|
||||||
|
v-if="detailState.isPublicTender"
|
||||||
|
class="tight-item"
|
||||||
|
label="关联招标号"
|
||||||
|
required
|
||||||
|
>
|
||||||
|
<a-input
|
||||||
|
v-model:value="detailState.biddingNo"
|
||||||
|
placeholder="公开招标时必填"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
<a-form-item class="tight-item" label="开票时间">
|
<a-form-item class="tight-item" label="开票时间">
|
||||||
<a-date-picker
|
<a-date-picker
|
||||||
v-model:value="detailState.invoiceDate"
|
v-model:value="detailState.invoiceDate"
|
||||||
@@ -545,6 +596,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="boolean-grid">
|
<div class="boolean-grid">
|
||||||
|
<div class="boolean-row">
|
||||||
|
<span>是否需修订条款</span>
|
||||||
|
<a-radio-group v-model:value="detailState.needAmendments">
|
||||||
|
<a-radio :value="true">是</a-radio>
|
||||||
|
<a-radio :value="false">否</a-radio>
|
||||||
|
</a-radio-group>
|
||||||
|
</div>
|
||||||
<div class="boolean-row">
|
<div class="boolean-row">
|
||||||
<span>是否涉及港澳台</span>
|
<span>是否涉及港澳台</span>
|
||||||
<a-radio-group
|
<a-radio-group
|
||||||
@@ -977,6 +1035,7 @@ function normalizeBooleanValue(value) {
|
|||||||
|
|
||||||
function pickBooleanSource(source = {}, key) {
|
function pickBooleanSource(source = {}, key) {
|
||||||
const mapping = {
|
const mapping = {
|
||||||
|
needAmendments: [source.needAmendments, source.isNeedAmendments],
|
||||||
isInvolveHongKongMacaoTaiwan: [
|
isInvolveHongKongMacaoTaiwan: [
|
||||||
source.isInvolveHongKongMacaoTaiwan,
|
source.isInvolveHongKongMacaoTaiwan,
|
||||||
source.isSgat,
|
source.isSgat,
|
||||||
@@ -1041,6 +1100,11 @@ function splitFilesByCategory(source = {}) {
|
|||||||
: sourceFiles
|
: sourceFiles
|
||||||
.filter((item) => item.fileCategory === "gist")
|
.filter((item) => item.fileCategory === "gist")
|
||||||
.map(normalizeFileItem),
|
.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: "",
|
contractType: "",
|
||||||
contractTypeCode: "",
|
contractTypeCode: "",
|
||||||
contractAmount: null,
|
contractAmount: null,
|
||||||
|
estimatedAmount: null,
|
||||||
effectiveStart: "",
|
effectiveStart: "",
|
||||||
effectiveEnd: "",
|
effectiveEnd: "",
|
||||||
contractPeriodType: "0",
|
contractPeriodType: "0",
|
||||||
@@ -1312,6 +1377,7 @@ function createContractFormData() {
|
|||||||
bodySummary: "",
|
bodySummary: "",
|
||||||
invoiceDate: "",
|
invoiceDate: "",
|
||||||
receiveDate: "",
|
receiveDate: "",
|
||||||
|
biddingNo: "",
|
||||||
|
|
||||||
contractBodyFileName: "",
|
contractBodyFileName: "",
|
||||||
contractBodyFilePath: "",
|
contractBodyFilePath: "",
|
||||||
@@ -1320,6 +1386,7 @@ function createContractFormData() {
|
|||||||
contractBodyArrayBuffer: null,
|
contractBodyArrayBuffer: null,
|
||||||
otherAttachmentList: [],
|
otherAttachmentList: [],
|
||||||
contractGistFileList: [],
|
contractGistFileList: [],
|
||||||
|
authAttachmentList: [],
|
||||||
// 正文模板字段值统一放这里,后续新增模板字段时尽量只改 templateFieldList
|
// 正文模板字段值统一放这里,后续新增模板字段时尽量只改 templateFieldList
|
||||||
templateFieldValues: {},
|
templateFieldValues: {},
|
||||||
partyState: {
|
partyState: {
|
||||||
@@ -1335,6 +1402,7 @@ function createContractFormData() {
|
|||||||
isIncludedInCurrentYearBudget: false,
|
isIncludedInCurrentYearBudget: false,
|
||||||
isShared: false,
|
isShared: false,
|
||||||
isMajorContract: false,
|
isMajorContract: false,
|
||||||
|
needAmendments: false,
|
||||||
extraAmounts: {
|
extraAmounts: {
|
||||||
depositEnabled: false,
|
depositEnabled: false,
|
||||||
deposit: 0,
|
deposit: 0,
|
||||||
@@ -1386,6 +1454,8 @@ function copyContractFormData(data = {}) {
|
|||||||
form.otherAttachmentList = fileState.otherAttachmentList;
|
form.otherAttachmentList = fileState.otherAttachmentList;
|
||||||
} else if (key === "contractGistFileList") {
|
} else if (key === "contractGistFileList") {
|
||||||
form.contractGistFileList = fileState.contractGistFileList;
|
form.contractGistFileList = fileState.contractGistFileList;
|
||||||
|
} else if (key === "authAttachmentList") {
|
||||||
|
form.authAttachmentList = fileState.authAttachmentList;
|
||||||
} else if (
|
} else if (
|
||||||
[
|
[
|
||||||
"contractBodyFileName",
|
"contractBodyFileName",
|
||||||
@@ -1410,6 +1480,7 @@ function copyContractFormData(data = {}) {
|
|||||||
source.signingSubjectCode ?? source.orgId ?? form.signingSubjectCode;
|
source.signingSubjectCode ?? source.orgId ?? form.signingSubjectCode;
|
||||||
} else if (
|
} else if (
|
||||||
[
|
[
|
||||||
|
"needAmendments",
|
||||||
"isInvolveHongKongMacaoTaiwan",
|
"isInvolveHongKongMacaoTaiwan",
|
||||||
"isPublicTender",
|
"isPublicTender",
|
||||||
"isForeignRelatedSubject",
|
"isForeignRelatedSubject",
|
||||||
@@ -1442,6 +1513,7 @@ const templateName = ref("");
|
|||||||
const detailState = ref(createContractFormData());
|
const detailState = ref(createContractFormData());
|
||||||
const otherAttachmentList = ref([]);
|
const otherAttachmentList = ref([]);
|
||||||
const gistAttachmentList = ref([]);
|
const gistAttachmentList = ref([]);
|
||||||
|
const authAttachmentUploadList = ref([]);
|
||||||
const bodyConfigModalRef = ref(null);
|
const bodyConfigModalRef = ref(null);
|
||||||
const counterpartyRoleKeys = ref([]);
|
const counterpartyRoleKeys = ref([]);
|
||||||
|
|
||||||
@@ -1515,6 +1587,10 @@ const contractBodyHint = computed(() =>
|
|||||||
: "当前为模板创建,点击维护模板信息和正文预览",
|
: "当前为模板创建,点击维护模板信息和正文预览",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const requiresAuthAttachment = computed(() =>
|
||||||
|
["GZBSQRQZ", "HTZYZBSQRQZ"].includes(detailState.value.sealType),
|
||||||
|
);
|
||||||
|
|
||||||
function syncUploadLists() {
|
function syncUploadLists() {
|
||||||
otherAttachmentList.value = (detailState.value.otherAttachmentList || []).map(
|
otherAttachmentList.value = (detailState.value.otherAttachmentList || []).map(
|
||||||
(item, index) => ({
|
(item, index) => ({
|
||||||
@@ -1532,6 +1608,14 @@ function syncUploadLists() {
|
|||||||
status: item.status || "done",
|
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() {
|
function syncCounterpartyState() {
|
||||||
@@ -1754,6 +1838,10 @@ function handleGistAttachmentUpload(file) {
|
|||||||
return uploadAttachmentFile(file, "gist");
|
return uploadAttachmentFile(file, "gist");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleAuthAttachmentUpload(file) {
|
||||||
|
return uploadAttachmentFile(file, "auth");
|
||||||
|
}
|
||||||
|
|
||||||
function uploadAttachmentFile(file, category) {
|
function uploadAttachmentFile(file, category) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append("file", file);
|
formData.append("file", file);
|
||||||
@@ -1774,6 +1862,9 @@ function uploadAttachmentFile(file, category) {
|
|||||||
if (category === "gist") {
|
if (category === "gist") {
|
||||||
detailState.value.contractGistFileList.push(item);
|
detailState.value.contractGistFileList.push(item);
|
||||||
gistAttachmentList.value.push(item);
|
gistAttachmentList.value.push(item);
|
||||||
|
} else if (category === "auth") {
|
||||||
|
detailState.value.authAttachmentList.push(item);
|
||||||
|
authAttachmentUploadList.value.push(item);
|
||||||
} else {
|
} else {
|
||||||
detailState.value.otherAttachmentList.push(item);
|
detailState.value.otherAttachmentList.push(item);
|
||||||
otherAttachmentList.value.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 = "附件") {
|
async function downloadFile(filePath, fileName = "附件") {
|
||||||
if (!filePath) {
|
if (!filePath) {
|
||||||
message.warning("文件路径为空,无法下载");
|
message.warning("文件路径为空,无法下载");
|
||||||
@@ -1901,6 +2002,13 @@ function validateState() {
|
|||||||
)
|
)
|
||||||
return "请填写期限说明";
|
return "请填写期限说明";
|
||||||
if (!detailState.value.valuationMode) 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.currencyName) return "请选择币种";
|
||||||
if (!detailState.value.sealType) return "请选择签订方式";
|
if (!detailState.value.sealType) return "请选择签订方式";
|
||||||
if (!detailState.value.textSource) return "请选择文本来源";
|
if (!detailState.value.textSource) return "请选择文本来源";
|
||||||
@@ -1910,8 +2018,15 @@ function validateState() {
|
|||||||
if (!detailState.value.isElectron) return "请选择签署方式";
|
if (!detailState.value.isElectron) return "请选择签署方式";
|
||||||
if (!detailState.value.contractTypeCode) return "请选择合同属性中的合同类型";
|
if (!detailState.value.contractTypeCode) return "请选择合同属性中的合同类型";
|
||||||
if (!detailState.value.executorAccount?.trim()) return "请填写合同执行人";
|
if (!detailState.value.executorAccount?.trim()) return "请填写合同执行人";
|
||||||
|
if (detailState.value.isPublicTender && !detailState.value.biddingNo?.trim())
|
||||||
|
return "请填写关联招标号";
|
||||||
if (!detailState.value.contractBodyFileName?.trim())
|
if (!detailState.value.contractBodyFileName?.trim())
|
||||||
return "请先配置合同正文";
|
return "请先配置合同正文";
|
||||||
|
if (
|
||||||
|
requiresAuthAttachment.value &&
|
||||||
|
!(detailState.value.authAttachmentList || []).length
|
||||||
|
)
|
||||||
|
return "请上传授权委托书附件";
|
||||||
for (const plan of detailState.value.performancePlans || []) {
|
for (const plan of detailState.value.performancePlans || []) {
|
||||||
if (!plan.planMatter?.trim()) return "请填写履行计划的履行事项";
|
if (!plan.planMatter?.trim()) return "请填写履行计划的履行事项";
|
||||||
if (!plan.planWhere?.trim()) return "请填写履行计划的履约条件";
|
if (!plan.planWhere?.trim()) return "请填写履行计划的履约条件";
|
||||||
@@ -1936,6 +2051,12 @@ function handleSave() {
|
|||||||
detailState.value.contractAmount === ""
|
detailState.value.contractAmount === ""
|
||||||
? null
|
? null
|
||||||
: Number(detailState.value.contractAmount);
|
: 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();
|
const record = buildLaunchRecord();
|
||||||
emit("save", {
|
emit("save", {
|
||||||
@@ -2016,6 +2137,15 @@ function buildLaunchRecord() {
|
|||||||
fileSize: item.size ?? item.fileSize ?? 0,
|
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) => {
|
(detailState.value.otherAttachmentList || []).forEach((item) => {
|
||||||
fileList.push({
|
fileList.push({
|
||||||
fileCategory: "other",
|
fileCategory: "other",
|
||||||
@@ -2048,6 +2178,11 @@ function buildLaunchRecord() {
|
|||||||
primaryContent: detailState.value.primaryContent,
|
primaryContent: detailState.value.primaryContent,
|
||||||
amountExplain: detailState.value.amountExplain,
|
amountExplain: detailState.value.amountExplain,
|
||||||
valuationMode: detailState.value.valuationMode,
|
valuationMode: detailState.value.valuationMode,
|
||||||
|
needAmendments: detailState.value.needAmendments ? "1" : "0",
|
||||||
|
estimatedAmount:
|
||||||
|
detailState.value.valuationMode === "2"
|
||||||
|
? detailState.value.estimatedAmount
|
||||||
|
: null,
|
||||||
sealType: detailState.value.sealType,
|
sealType: detailState.value.sealType,
|
||||||
textSource:
|
textSource:
|
||||||
detailState.value.textSource ||
|
detailState.value.textSource ||
|
||||||
@@ -2069,6 +2204,7 @@ function buildLaunchRecord() {
|
|||||||
isShare: detailState.value.isShared ? "1" : "0",
|
isShare: detailState.value.isShared ? "1" : "0",
|
||||||
contractNature: detailState.value.isForeignRelatedSubject ? "1" : "0",
|
contractNature: detailState.value.isForeignRelatedSubject ? "1" : "0",
|
||||||
isSgat: detailState.value.isInvolveHongKongMacaoTaiwan ? "1" : "0",
|
isSgat: detailState.value.isInvolveHongKongMacaoTaiwan ? "1" : "0",
|
||||||
|
biddingNo: detailState.value.isPublicTender ? detailState.value.biddingNo || "" : "",
|
||||||
contractGistRemark: detailState.value.contractGistRemark || "",
|
contractGistRemark: detailState.value.contractGistRemark || "",
|
||||||
bodySummary: detailState.value.bodySummary || detailState.value.primaryContent || "",
|
bodySummary: detailState.value.bodySummary || detailState.value.primaryContent || "",
|
||||||
contractTextFileName: detailState.value.contractBodyFileName || "",
|
contractTextFileName: detailState.value.contractBodyFileName || "",
|
||||||
|
|||||||
Reference in New Issue
Block a user