This commit is contained in:
吴红兵
2026-03-05 15:00:19 +08:00
parent bff8907f88
commit 2317909261
9 changed files with 397 additions and 348 deletions

View File

@@ -154,7 +154,18 @@ watch(templateFiles, (files) => {
}, { deep: true })
const rules: FormRules = {
acceptDate: [{ required: true, message: '请选择验收日期', trigger: 'change' }],
templateFileIds: [
{
validator: (_rule: any, value: any, callback: (e?: Error) => void) => {
if (!value || (Array.isArray(value) && value.length === 0) || (typeof value === 'string' && !value.trim())) {
callback(new Error('请上传履约验收文件'))
return
}
callback()
},
trigger: 'change'
},
],
}
const validate = () => formRef.value?.validate()

View File

@@ -58,8 +58,30 @@
</el-form-item>
</el-col>
<el-col :span="8" class="mb20">
<el-form-item label="供应商联系人及电话" prop="supplierContact">
<el-input v-model="form.supplierContact" placeholder="请输入" clearable />
<el-form-item label="资产管理员" prop="assetAdminId">
<el-select
v-model="form.assetAdminId"
placeholder="请输入姓名或工号搜索"
filterable
remote
clearable
reserve-keyword
:remote-method="searchAssetAdmin"
:loading="assetAdminLoading"
style="width: 100%"
@change="onAssetAdminChange"
>
<el-option
v-for="item in assetAdminOptions"
:key="item.teacherNo"
:label="(item.commonDeptName ? item.commonDeptName + ' - ' : '') + (item.realName || item.name) + ' (' + item.teacherNo + ')'"
:value="item.teacherNo"
>
<span>{{ item.commonDeptName ? item.commonDeptName + ' - ' : '' }}{{ item.realName || item.name }}</span>
<span style="color: #999; font-size: 12px; margin-left: 8px;">{{ item.teacherNo }}</span>
</el-option>
</el-select>
<div class="field-note">如入固定资产必填</div>
</el-form-item>
</el-col>
<el-col :span="8" class="mb20">
@@ -167,7 +189,6 @@ const form = reactive({
projectName: '',
deptName: '',
supplierName: '',
supplierContact: '',
purchaserId: '',
purchaserName: '',
assetAdminId: '',
@@ -336,4 +357,9 @@ defineExpose({ validate, form })
.mb20 {
margin-bottom: 20px;
}
.field-note {
font-size: 12px;
color: #999;
margin-top: 4px;
}
</style>

View File

@@ -192,7 +192,6 @@ const loadData = async () => {
isInstallment: config.common.isInstallment || '0',
totalPhases: config.common.totalPhases || 1,
supplierName: config.common.supplierName || '',
supplierContact: config.common.supplierContact || '',
transactionAmount: config.common.transactionAmount || null,
})
}
@@ -278,7 +277,6 @@ const saveCommonConfig = async () => {
isInstallment: form.isInstallment ?? '0',
totalPhases: isInstallment ? (Number(form.totalPhases) || 1) : 1,
supplierName: String(form.supplierName ?? ''),
supplierContact: String(form.supplierContact ?? ''),
purchaserId: String(form.purchaserId ?? ''),
purchaserName: String(form.purchaserName ?? ''),
assetAdminId: String(form.assetAdminId ?? ''),
@@ -307,10 +305,7 @@ const saveCurrentBatch = async () => {
const formData = batchFormRef?.getFormData?.() || batchFormRef?.form
if (!formData) return
if (!formData.acceptDate) {
useMessage().error('请选择验收日期')
return
}
// acceptDate is now optional - removed the validation check
// templateFileIds: 提取ID数组
let fileIds: string[] = []
@@ -357,7 +352,6 @@ const DEFAULT_COMMON_FORM = {
isInstallment: '0',
totalPhases: 1,
supplierName: '',
supplierContact: '',
purchaserId: '',
purchaserName: '',
assetAdminId: '',

View File

@@ -205,7 +205,7 @@
<upload-file
v-model="dataForm.businessNegotiationTable"
:limit="1"
:file-type="['doc', 'docx', 'pdf']"
:file-type="['doc', 'docx', 'pdf', 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']"
:data="{ fileType: FILE_TYPE_MAP.businessNegotiationTable }"
upload-file-url="/purchase/purchasingfiles/upload"
:disabled="flowFieldDisabled('businessNegotiationTable')"
@@ -226,7 +226,7 @@
<upload-file
v-model="dataForm.marketPurchaseMinutes"
:limit="1"
:file-type="['doc', 'docx', 'pdf']"
:file-type="['doc', 'docx', 'pdf', 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']"
:data="{ fileType: FILE_TYPE_MAP.marketPurchaseMinutes }"
upload-file-url="/purchase/purchasingfiles/upload"
:disabled="flowFieldDisabled('marketPurchaseMinutes')"
@@ -247,7 +247,7 @@
<upload-file
v-model="dataForm.onlineMallMaterials"
:limit="1"
:file-type="['doc', 'docx', 'pdf']"
:file-type="['doc', 'docx', 'pdf', 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']"
:data="{ fileType: FILE_TYPE_MAP.onlineMallMaterials }"
upload-file-url="/purchase/purchasingfiles/upload"
:disabled="flowFieldDisabled('onlineMallMaterials')"
@@ -259,7 +259,7 @@
<upload-file
v-model="dataForm.inquiryTemplate"
:limit="1"
:file-type="['doc', 'docx', 'pdf']"
:file-type="['doc', 'docx', 'pdf', 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']"
:data="{ fileType: FILE_TYPE_MAP.inquiryTemplate }"
upload-file-url="/purchase/purchasingfiles/upload"
:disabled="flowFieldDisabled('inquiryTemplate')"
@@ -278,13 +278,13 @@
<el-col
:span="8"
class="mb12"
v-if="isDeptPurchase && dataForm.budget != null && dataForm.budget >= BUDGET_DEPT_SELF_MEETING_MINUTES"
v-if="dataForm.budget != null && dataForm.budget >= BUDGET_DEPT_SELF_MEETING_MINUTES"
>
<el-form-item label="部门自行采购会议纪要" prop="deptSelfMeetingMinutes" required>
<upload-file
v-model="dataForm.deptSelfMeetingMinutes"
:limit="1"
:file-type="['doc', 'docx', 'pdf']"
:file-type="['doc', 'docx', 'pdf', 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']"
:data="{ fileType: FILE_TYPE_MAP.deptSelfMeetingMinutes }"
upload-file-url="/purchase/purchasingfiles/upload"
:disabled="flowFieldDisabled('deptSelfMeetingMinutes')"
@@ -320,7 +320,7 @@
<upload-file
v-model="dataForm.serviceDirectSelect"
:limit="1"
:file-type="['doc', 'docx', 'pdf']"
:file-type="['doc', 'docx', 'pdf', 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']"
:data="{ fileType: FILE_TYPE_MAP.serviceDirectSelect }"
upload-file-url="/purchase/purchasingfiles/upload"
:disabled="flowFieldDisabled('serviceDirectSelect')"
@@ -351,7 +351,7 @@
<upload-file
v-model="dataForm.serviceInviteSelect"
:limit="1"
:file-type="['doc', 'docx', 'pdf']"
:file-type="['doc', 'docx', 'pdf', 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']"
:data="{ fileType: FILE_TYPE_MAP.serviceInviteSelect }"
upload-file-url="/purchase/purchasingfiles/upload"
:disabled="flowFieldDisabled('serviceInviteSelect')"
@@ -376,7 +376,7 @@
<upload-file
v-model="dataForm.purchaseRequirementTemplate"
:limit="1"
:file-type="['doc', 'docx', 'pdf']"
:file-type="['doc', 'docx']"
:data="{ fileType: FILE_TYPE_MAP.purchaseRequirementTemplate }"
upload-file-url="/purchase/purchasingfiles/upload"
:disabled="flowFieldDisabled('purchaseRequirementTemplate')"
@@ -405,7 +405,7 @@
<upload-file
v-model="dataForm.serviceInviteSelect"
:limit="1"
:file-type="['doc', 'docx', 'pdf']"
:file-type="['doc', 'docx', 'pdf', 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']"
:data="{ fileType: FILE_TYPE_MAP.serviceInviteSelect }"
upload-file-url="/purchase/purchasingfiles/upload"
:disabled="flowFieldDisabled('serviceInviteSelect')"
@@ -426,7 +426,7 @@
<upload-file
v-model="dataForm.servicePublicSelectAuto"
:limit="1"
:file-type="['doc', 'docx', 'pdf']"
:file-type="['doc', 'docx', 'pdf', 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']"
:data="{ fileType: FILE_TYPE_MAP.servicePublicSelectAuto }"
upload-file-url="/purchase/purchasingfiles/upload"
:disabled="flowFieldDisabled('servicePublicSelectAuto')"
@@ -556,7 +556,7 @@
<upload-file
v-model="dataForm.feasibilityReport"
:limit="1"
:file-type="['doc', 'docx', 'pdf']"
:file-type="['doc', 'docx', 'pdf', 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']"
:data="{ fileType: FILE_TYPE_MAP.feasibilityReport }"
upload-file-url="/purchase/purchasingfiles/upload"
:disabled="flowFieldDisabled('feasibilityReport')"
@@ -577,41 +577,28 @@
class="mb12"
v-if="
dataForm.budget &&
dataForm.budget >= BUDGET_FEASIBILITY_THRESHOLD &&
!isUrgentSpecial &&
!isSpecialType('2') &&
!isSpecialType('3')
(dataForm.budget >= BUDGET_FEASIBILITY_THRESHOLD || !isSpecialType('0'))
"
>
<el-form-item label="校党委会议纪要" prop="meetingMinutes" required>
<upload-file
v-model="dataForm.meetingMinutes"
:limit="1"
:file-type="['doc', 'docx', 'pdf']"
:file-type="['doc', 'docx', 'pdf', 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']"
:data="{ fileType: FILE_TYPE_MAP.meetingMinutes }"
upload-file-url="/purchase/purchasingfiles/upload"
:disabled="flowFieldDisabled('meetingMinutes')"
/>
</el-form-item>
</el-col>
<el-col :span="8" class="mb12" v-if="isUrgentSpecial">
<el-form-item label="校党委会议纪要(紧急)" prop="meetingMinutesUrgent" required>
<upload-file
v-model="dataForm.meetingMinutesUrgent"
:limit="1"
:file-type="['doc', 'docx', 'pdf']"
:data="{ fileType: FILE_TYPE_MAP.meetingMinutesUrgent }"
upload-file-url="/purchase/purchasingfiles/upload"
:disabled="flowFieldDisabled('meetingMinutesUrgent')"
/>
</el-form-item>
</el-col>
<el-col :span="8" class="mb12" v-if="isSpecialType('2')">
<el-form-item label="单一来源论专家证附件" prop="singleSourceProof" required>
<upload-file
v-model="dataForm.singleSourceProof"
:limit="1"
:file-type="['doc', 'docx', 'pdf']"
:file-type="['doc', 'docx', 'pdf', 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']"
:data="{ fileType: FILE_TYPE_MAP.singleSourceProof }"
upload-file-url="/purchase/purchasingfiles/upload"
:disabled="flowFieldDisabled('singleSourceProof')"
@@ -632,7 +619,7 @@
<upload-file
v-model="dataForm.meetingMinutesSingle"
:limit="1"
:file-type="['doc', 'docx', 'pdf']"
:file-type="['doc', 'docx', 'pdf', 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']"
:data="{ fileType: FILE_TYPE_MAP.meetingMinutesSingle }"
upload-file-url="/purchase/purchasingfiles/upload"
:disabled="flowFieldDisabled('meetingMinutesSingle')"
@@ -644,7 +631,7 @@
<upload-file
v-model="dataForm.importApplication"
:limit="1"
:file-type="['doc', 'docx', 'pdf']"
:file-type="['doc', 'docx', 'pdf', 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']"
:data="{ fileType: FILE_TYPE_MAP.importApplication }"
upload-file-url="/purchase/purchasingfiles/upload"
:disabled="flowFieldDisabled('importApplication')"
@@ -665,7 +652,7 @@
<upload-file
v-model="dataForm.meetingMinutesImport"
:limit="1"
:file-type="['doc', 'docx', 'pdf']"
:file-type="['doc', 'docx', 'pdf', 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']"
:data="{ fileType: FILE_TYPE_MAP.meetingMinutesImport }"
upload-file-url="/purchase/purchasingfiles/upload"
:disabled="flowFieldDisabled('meetingMinutesImport')"
@@ -693,7 +680,7 @@
<upload-file
v-model="dataForm.serviceInviteSelectSchool"
:limit="1"
:file-type="['doc', 'docx', 'pdf']"
:file-type="['doc', 'docx', 'pdf', 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']"
:data="{ fileType: FILE_TYPE_MAP.serviceInviteSelectSchool }"
upload-file-url="/purchase/purchasingfiles/upload"
:disabled="flowFieldDisabled('serviceInviteSelectSchool')"
@@ -712,7 +699,7 @@
<upload-file
v-model="dataForm.servicePublicSelectSchoolAuto"
:limit="1"
:file-type="['doc', 'docx', 'pdf']"
:file-type="['doc', 'docx', 'pdf', 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']"
:data="{ fileType: FILE_TYPE_MAP.servicePublicSelectSchoolAuto }"
upload-file-url="/purchase/purchasingfiles/upload"
:disabled="flowFieldDisabled('servicePublicSelectSchoolAuto')"
@@ -732,7 +719,7 @@
<upload-file
v-model="dataForm.servicePublicSelectSchool"
:limit="1"
:file-type="['doc', 'docx', 'pdf']"
:file-type="['doc', 'docx', 'pdf', 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']"
:data="{ fileType: FILE_TYPE_MAP.servicePublicSelectSchool }"
upload-file-url="/purchase/purchasingfiles/upload"
:disabled="flowFieldDisabled('servicePublicSelectSchool')"
@@ -751,7 +738,7 @@
<upload-file
v-model="dataForm.purchaseRequirement"
:limit="1"
:file-type="['doc', 'docx', 'pdf']"
:file-type="['doc', 'docx', 'pdf', 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']"
:data="{ fileType: FILE_TYPE_MAP.purchaseRequirement }"
upload-file-url="/purchase/purchasingfiles/upload"
:disabled="flowFieldDisabled('purchaseRequirement')"
@@ -773,7 +760,7 @@
<upload-file
v-model="dataForm.governmentPurchaseIntent"
:limit="1"
:file-type="['doc', 'docx', 'pdf']"
:file-type="['doc', 'docx', 'pdf', 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']"
:data="{ fileType: FILE_TYPE_MAP.governmentPurchaseIntent }"
upload-file-url="/purchase/purchasingfiles/upload"
:disabled="flowFieldDisabled('governmentPurchaseIntent')"
@@ -1285,9 +1272,9 @@ const schoolUnifiedPurchaseFormDefault = computed(() => {
// 申请阶段:始终可选(根据默认值自动选中后,允许用户自行修改)
// 流程嵌入:采购中心节点可编辑,其他节点只读
const schoolUnifiedPurchaseFormDisabled = computed(() => {
if (!isFlowEmbed.value) {
return false;
}
// if (!isFlowEmbed.value) {
// return false;
// }
// 流程嵌入且为采购中心:放开编辑
if (isPurchaseCenter.value) {
return false;
@@ -1610,6 +1597,7 @@ const dataRules = reactive({
],
purchaseChannel: [
{
required: true,
validator: (_rule: any, value: string, callback: (e?: Error) => void) => {
if (!isDeptPurchase.value) {
callback();