|
@@ -42,7 +42,7 @@
|
|
|
<a-divider />
|
|
<a-divider />
|
|
|
<a-space direction="vertical" class="w-full" size="middle">
|
|
<a-space direction="vertical" class="w-full" size="middle">
|
|
|
<a-button type="primary" block :loading="submitLoading" @click="saveForm">保存评估表</a-button>
|
|
<a-button type="primary" block :loading="submitLoading" @click="saveForm">保存评估表</a-button>
|
|
|
- <a-button type="primary" block :loading="submitLoading" @click="submitForm">提交审核</a-button>
|
|
|
|
|
|
|
+ <a-button v-if="!authStore.isAdmin && currentForm?.progress === 0" type="primary" block :loading="submitLoading" @click="submitForm">提交审核</a-button>
|
|
|
<a-button block :loading="submitLoading" @click="downloadForm">下载评估表 PDF</a-button>
|
|
<a-button block :loading="submitLoading" @click="downloadForm">下载评估表 PDF</a-button>
|
|
|
</a-space>
|
|
</a-space>
|
|
|
</div>
|
|
</div>
|
|
@@ -174,9 +174,23 @@ async function saveForm() {
|
|
|
submitLoading.value = false;
|
|
submitLoading.value = false;
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+ if (cf.progress > 0) {
|
|
|
|
|
+ const confirmed = await new Promise<boolean>((resolve) => {
|
|
|
|
|
+ Modal.confirm({
|
|
|
|
|
+ title: '提示',
|
|
|
|
|
+ content: '您之前已提交审核,修改将导致审核撤回并需要重新审核,是否继续修改?',
|
|
|
|
|
+ okText: '继续修改',
|
|
|
|
|
+ cancelText: '取消',
|
|
|
|
|
+ onOk: () => resolve(true),
|
|
|
|
|
+ onCancel: () => resolve(false),
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ if (!confirmed)
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
cf.checkItems = currentFormCheckItems.value;
|
|
cf.checkItems = currentFormCheckItems.value;
|
|
|
try {
|
|
try {
|
|
|
- await AssessmentContentApi.saveSelfAssessment(cf as SelfAssessmentDetail);
|
|
|
|
|
|
|
+ await AssessmentContentApi.saveSelfAssessment(cf as SelfAssessmentDetail, 0);
|
|
|
message.success('保存评估表成功');
|
|
message.success('保存评估表成功');
|
|
|
await waitTimeOut(500);
|
|
await waitTimeOut(500);
|
|
|
await loader.load();
|
|
await loader.load();
|
|
@@ -201,6 +215,18 @@ async function submitForm() {
|
|
|
message.warning('请填写完整信息');
|
|
message.warning('请填写完整信息');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+ const confirmed = await new Promise<boolean>((resolve) => {
|
|
|
|
|
+ Modal.confirm({
|
|
|
|
|
+ title: '提示',
|
|
|
|
|
+ content: '您确认要提交审核吗?请确认各项信息填写无误。',
|
|
|
|
|
+ okText: '确认提交',
|
|
|
|
|
+ cancelText: '取消',
|
|
|
|
|
+ onOk: () => resolve(true),
|
|
|
|
|
+ onCancel: () => resolve(false),
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ if (!confirmed)
|
|
|
|
|
+ return;
|
|
|
submitLoading.value = true;
|
|
submitLoading.value = true;
|
|
|
const cf = currentForm.value;
|
|
const cf = currentForm.value;
|
|
|
if (!cf) {
|
|
if (!cf) {
|