tijiao
This commit is contained in:
@@ -147,7 +147,7 @@
|
|||||||
style="width: 100%">
|
style="width: 100%">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in purchaseTypeDeptList"
|
v-for="item in purchaseTypeDeptList"
|
||||||
:key="item.id"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value" />
|
:value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
@@ -170,6 +170,7 @@
|
|||||||
<upload-file
|
<upload-file
|
||||||
v-model="dataForm.businessNegotiationTable"
|
v-model="dataForm.businessNegotiationTable"
|
||||||
:limit="5"
|
:limit="5"
|
||||||
|
:file-type="['doc', 'docx', 'pdf']"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload" />
|
upload-file-url="/purchase/purchasingfiles/upload" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@@ -190,6 +191,7 @@
|
|||||||
<upload-file
|
<upload-file
|
||||||
v-model="dataForm.marketPurchaseMinutes"
|
v-model="dataForm.marketPurchaseMinutes"
|
||||||
:limit="5"
|
:limit="5"
|
||||||
|
:file-type="['doc', 'docx', 'pdf']"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload" />
|
upload-file-url="/purchase/purchasingfiles/upload" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@@ -202,11 +204,8 @@
|
|||||||
<upload-file
|
<upload-file
|
||||||
v-model="dataForm.onlineMallMaterials"
|
v-model="dataForm.onlineMallMaterials"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
accept=".zip"
|
:file-type="['doc', 'docx', 'pdf']"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload" />
|
upload-file-url="/purchase/purchasingfiles/upload" />
|
||||||
<div class="template-note mt5">
|
|
||||||
<el-text type="info" size="small">请上传zip格式的压缩包</el-text>
|
|
||||||
</div>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<!-- 委托采购中心 -->
|
<!-- 委托采购中心 -->
|
||||||
@@ -258,6 +257,7 @@
|
|||||||
<upload-file
|
<upload-file
|
||||||
v-model="dataForm.serviceDirectSelect"
|
v-model="dataForm.serviceDirectSelect"
|
||||||
:limit="5"
|
:limit="5"
|
||||||
|
:file-type="['doc', 'docx', 'pdf']"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload" />
|
upload-file-url="/purchase/purchasingfiles/upload" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@@ -277,6 +277,7 @@
|
|||||||
<upload-file
|
<upload-file
|
||||||
v-model="dataForm.serviceInviteSelect"
|
v-model="dataForm.serviceInviteSelect"
|
||||||
:limit="5"
|
:limit="5"
|
||||||
|
:file-type="['doc', 'docx', 'pdf']"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload" />
|
upload-file-url="/purchase/purchasingfiles/upload" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@@ -298,6 +299,7 @@
|
|||||||
<upload-file
|
<upload-file
|
||||||
v-model="dataForm.purchaseRequirementTemplate"
|
v-model="dataForm.purchaseRequirementTemplate"
|
||||||
:limit="5"
|
:limit="5"
|
||||||
|
:file-type="['doc', 'docx', 'pdf']"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload" />
|
upload-file-url="/purchase/purchasingfiles/upload" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@@ -339,6 +341,7 @@
|
|||||||
<upload-file
|
<upload-file
|
||||||
v-model="dataForm.serviceInviteSelect"
|
v-model="dataForm.serviceInviteSelect"
|
||||||
:limit="5"
|
:limit="5"
|
||||||
|
:file-type="['doc', 'docx', 'pdf']"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload" />
|
upload-file-url="/purchase/purchasingfiles/upload" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@@ -359,9 +362,20 @@
|
|||||||
<upload-file
|
<upload-file
|
||||||
v-model="dataForm.servicePublicSelectAuto"
|
v-model="dataForm.servicePublicSelectAuto"
|
||||||
:limit="5"
|
:limit="5"
|
||||||
|
:file-type="['doc', 'docx', 'pdf']"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload" />
|
upload-file-url="/purchase/purchasingfiles/upload" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<!-- 其他材料(zip压缩包) -->
|
||||||
|
<el-form-item label="其他材料" prop="otherMaterials" class="mb20">
|
||||||
|
<upload-file
|
||||||
|
v-model="dataForm.otherMaterials"
|
||||||
|
:limit="5"
|
||||||
|
:file-type="['zip']"
|
||||||
|
upload-file-url="/purchase/purchasingfiles/upload" />
|
||||||
|
<div class="template-note">支持上传zip格式的压缩包文件</div>
|
||||||
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 分支二:学校统一采购 -->
|
<!-- 分支二:学校统一采购 -->
|
||||||
@@ -395,6 +409,40 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<!-- 业务分管处室 -->
|
||||||
|
<el-form-item label="业务分管处室" prop="deptClassifyId" class="mb20">
|
||||||
|
<el-select
|
||||||
|
v-model="dataForm.deptClassifyId"
|
||||||
|
placeholder="请选择业务分管处室"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
@change="handleBusinessDeptChange"
|
||||||
|
style="width: 100%">
|
||||||
|
<el-option
|
||||||
|
v-for="item in businessDeptList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.deptName"
|
||||||
|
:value="item.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<!-- 分管校领导 -->
|
||||||
|
<el-form-item label="分管校领导" prop="schoolLeaderUserId" class="mb20">
|
||||||
|
<el-select
|
||||||
|
v-model="dataForm.schoolLeaderUserId"
|
||||||
|
placeholder="请选择分管校领导"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
@change="handleSchoolLeaderChange"
|
||||||
|
style="width: 100%">
|
||||||
|
<el-option
|
||||||
|
v-for="item in schoolLeaderList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.userId" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<!-- 金额>=30万,显示可行性论证报告和会议纪要 -->
|
<!-- 金额>=30万,显示可行性论证报告和会议纪要 -->
|
||||||
<template v-if="dataForm.budget && dataForm.budget >= 300000">
|
<template v-if="dataForm.budget && dataForm.budget >= 300000">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
@@ -412,12 +460,14 @@
|
|||||||
<upload-file
|
<upload-file
|
||||||
v-model="dataForm.feasibilityReport"
|
v-model="dataForm.feasibilityReport"
|
||||||
:limit="5"
|
:limit="5"
|
||||||
|
:file-type="['doc', 'docx', 'pdf']"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload" />
|
upload-file-url="/purchase/purchasingfiles/upload" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="会议纪要" prop="meetingMinutes" class="mb20">
|
<el-form-item label="会议纪要" prop="meetingMinutes" class="mb20">
|
||||||
<upload-file
|
<upload-file
|
||||||
v-model="dataForm.meetingMinutes"
|
v-model="dataForm.meetingMinutes"
|
||||||
:limit="5"
|
:limit="5"
|
||||||
|
:file-type="['doc', 'docx', 'pdf']"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload" />
|
upload-file-url="/purchase/purchasingfiles/upload" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@@ -428,6 +478,7 @@
|
|||||||
<upload-file
|
<upload-file
|
||||||
v-model="dataForm.meetingMinutesUrgent"
|
v-model="dataForm.meetingMinutesUrgent"
|
||||||
:limit="5"
|
:limit="5"
|
||||||
|
:file-type="['doc', 'docx', 'pdf']"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload" />
|
upload-file-url="/purchase/purchasingfiles/upload" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@@ -449,12 +500,14 @@
|
|||||||
<upload-file
|
<upload-file
|
||||||
v-model="dataForm.singleSourceProof"
|
v-model="dataForm.singleSourceProof"
|
||||||
:limit="5"
|
:limit="5"
|
||||||
|
:file-type="['doc', 'docx', 'pdf']"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload" />
|
upload-file-url="/purchase/purchasingfiles/upload" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="会议纪要" prop="meetingMinutesSingle" class="mb20">
|
<el-form-item label="会议纪要" prop="meetingMinutesSingle" class="mb20">
|
||||||
<upload-file
|
<upload-file
|
||||||
v-model="dataForm.meetingMinutesSingle"
|
v-model="dataForm.meetingMinutesSingle"
|
||||||
:limit="5"
|
:limit="5"
|
||||||
|
:file-type="['doc', 'docx', 'pdf']"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload" />
|
upload-file-url="/purchase/purchasingfiles/upload" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@@ -476,32 +529,18 @@
|
|||||||
<upload-file
|
<upload-file
|
||||||
v-model="dataForm.importApplication"
|
v-model="dataForm.importApplication"
|
||||||
:limit="5"
|
:limit="5"
|
||||||
|
:file-type="['doc', 'docx', 'pdf']"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload" />
|
upload-file-url="/purchase/purchasingfiles/upload" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="会议纪要" prop="meetingMinutesImport" class="mb20">
|
<el-form-item label="会议纪要" prop="meetingMinutesImport" class="mb20">
|
||||||
<upload-file
|
<upload-file
|
||||||
v-model="dataForm.meetingMinutesImport"
|
v-model="dataForm.meetingMinutesImport"
|
||||||
:limit="5"
|
:limit="5"
|
||||||
|
:file-type="['doc', 'docx', 'pdf']"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload" />
|
upload-file-url="/purchase/purchasingfiles/upload" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 需求文件(默认) -->
|
|
||||||
<el-form-item label="需求文件" prop="purchaseRequirement" class="mb20">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
link
|
|
||||||
icon="Download"
|
|
||||||
@click="downloadTemplate('purchase_requirement')"
|
|
||||||
class="mb10">
|
|
||||||
下载《采购需求填报模板》模版
|
|
||||||
</el-button>
|
|
||||||
<upload-file
|
|
||||||
v-model="dataForm.purchaseRequirement"
|
|
||||||
:limit="5"
|
|
||||||
upload-file-url="/purchase/purchasingfiles/upload" />
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<!-- 特殊规则:5万<=金额<40万,服务类目(isMallService=1、isProjectService=1),自动使用邀请比选模版 -->
|
<!-- 特殊规则:5万<=金额<40万,服务类目(isMallService=1、isProjectService=1),自动使用邀请比选模版 -->
|
||||||
<template v-if="showAutoInviteSelectSchool">
|
<template v-if="showAutoInviteSelectSchool">
|
||||||
<el-form-item label="是否有推荐供应商" prop="hasRecommendedSupplierSchool" class="mb20">
|
<el-form-item label="是否有推荐供应商" prop="hasRecommendedSupplierSchool" class="mb20">
|
||||||
@@ -510,9 +549,9 @@
|
|||||||
<el-radio label="no">无</el-radio>
|
<el-radio label="no">无</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 有推荐供应商:显示推荐供应商输入框和邀请比选模板 -->
|
<!-- 有推荐供应商:显示推荐供应商输入框 -->
|
||||||
<template v-if="dataForm.hasRecommendedSupplierSchool === 'yes'">
|
|
||||||
<el-form-item
|
<el-form-item
|
||||||
|
v-if="dataForm.hasRecommendedSupplierSchool === 'yes'"
|
||||||
label="推荐供应商"
|
label="推荐供应商"
|
||||||
prop="recommendedSuppliersSchool"
|
prop="recommendedSuppliersSchool"
|
||||||
class="mb20">
|
class="mb20">
|
||||||
@@ -526,10 +565,15 @@
|
|||||||
<el-text type="info" size="small">请输入三家供应商名称,用逗号或分号分隔</el-text>
|
<el-text type="info" size="small">请输入三家供应商名称,用逗号或分号分隔</el-text>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
</template>
|
||||||
label="服务商城项目需求模板(邀请比选)"
|
|
||||||
prop="serviceInviteSelectSchool"
|
<!-- 需求文件 -->
|
||||||
class="mb20">
|
<el-form-item label="需求文件" :prop="getRequirementFileProp()" class="mb20">
|
||||||
|
<!-- 特殊规则:5万<=金额<40万,服务类目(isMallService=1、isProjectService=1),自动使用邀请比选模版 -->
|
||||||
|
<template v-if="showAutoInviteSelectSchool">
|
||||||
|
<!-- 有推荐供应商:显示邀请比选模板 -->
|
||||||
|
<template v-if="dataForm.hasRecommendedSupplierSchool === 'yes'">
|
||||||
|
<div class="mb10">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
link
|
link
|
||||||
@@ -538,18 +582,16 @@
|
|||||||
class="mb10">
|
class="mb10">
|
||||||
下载《服务商城项目需求模板(邀请比选)》模版
|
下载《服务商城项目需求模板(邀请比选)》模版
|
||||||
</el-button>
|
</el-button>
|
||||||
|
</div>
|
||||||
<upload-file
|
<upload-file
|
||||||
v-model="dataForm.serviceInviteSelectSchool"
|
v-model="dataForm.serviceInviteSelectSchool"
|
||||||
:limit="5"
|
:limit="5"
|
||||||
|
:file-type="['doc', 'docx', 'pdf']"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload" />
|
upload-file-url="/purchase/purchasingfiles/upload" />
|
||||||
</el-form-item>
|
|
||||||
</template>
|
</template>
|
||||||
<!-- 无推荐供应商:显示公开比选模板 -->
|
<!-- 无推荐供应商:显示公开比选模板 -->
|
||||||
<el-form-item
|
<template v-else-if="dataForm.hasRecommendedSupplierSchool === 'no'">
|
||||||
v-if="dataForm.hasRecommendedSupplierSchool === 'no'"
|
<div class="mb10">
|
||||||
label="服务商城项目需求模板(公开比选)"
|
|
||||||
prop="servicePublicSelectSchoolAuto"
|
|
||||||
class="mb20">
|
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
link
|
link
|
||||||
@@ -558,19 +600,18 @@
|
|||||||
class="mb10">
|
class="mb10">
|
||||||
下载《服务商城项目需求模板(公开比选)》模版
|
下载《服务商城项目需求模板(公开比选)》模版
|
||||||
</el-button>
|
</el-button>
|
||||||
|
</div>
|
||||||
<upload-file
|
<upload-file
|
||||||
v-model="dataForm.servicePublicSelectSchoolAuto"
|
v-model="dataForm.servicePublicSelectSchoolAuto"
|
||||||
:limit="5"
|
:limit="5"
|
||||||
|
:file-type="['doc', 'docx', 'pdf']"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload" />
|
upload-file-url="/purchase/purchasingfiles/upload" />
|
||||||
</el-form-item>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 特殊规则:40万<=金额<100万,服务类目,自动使用公开比选需求模版 -->
|
<!-- 特殊规则:40万<=金额<100万,服务类目,自动使用公开比选需求模版 -->
|
||||||
<el-form-item
|
<template v-else-if="showAutoPublicSelect">
|
||||||
v-if="showAutoPublicSelect"
|
<div class="mb10">
|
||||||
label="服务商城项目需求模板(公开比选)"
|
|
||||||
prop="servicePublicSelectSchool"
|
|
||||||
class="mb20">
|
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
link
|
link
|
||||||
@@ -579,10 +620,32 @@
|
|||||||
class="mb10">
|
class="mb10">
|
||||||
下载《服务商城项目需求模板(公开比选)》模版
|
下载《服务商城项目需求模板(公开比选)》模版
|
||||||
</el-button>
|
</el-button>
|
||||||
|
</div>
|
||||||
<upload-file
|
<upload-file
|
||||||
v-model="dataForm.servicePublicSelectSchool"
|
v-model="dataForm.servicePublicSelectSchool"
|
||||||
:limit="5"
|
:limit="5"
|
||||||
|
:file-type="['doc', 'docx', 'pdf']"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload" />
|
upload-file-url="/purchase/purchasingfiles/upload" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!-- 默认:采购需求填报模板 -->
|
||||||
|
<template v-else>
|
||||||
|
<div class="mb10">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
link
|
||||||
|
icon="Download"
|
||||||
|
@click="downloadTemplate('purchase_requirement')"
|
||||||
|
class="mb10">
|
||||||
|
下载《采购需求填报模板》模版
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<upload-file
|
||||||
|
v-model="dataForm.purchaseRequirement"
|
||||||
|
:limit="5"
|
||||||
|
:file-type="['doc', 'docx', 'pdf']"
|
||||||
|
upload-file-url="/purchase/purchasingfiles/upload" />
|
||||||
|
</template>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<!-- 金额>=100万,政府采购意向表 -->
|
<!-- 金额>=100万,政府采购意向表 -->
|
||||||
@@ -594,8 +657,19 @@
|
|||||||
<upload-file
|
<upload-file
|
||||||
v-model="dataForm.governmentPurchaseIntent"
|
v-model="dataForm.governmentPurchaseIntent"
|
||||||
:limit="5"
|
:limit="5"
|
||||||
|
:file-type="['doc', 'docx', 'pdf']"
|
||||||
upload-file-url="/purchase/purchasingfiles/upload" />
|
upload-file-url="/purchase/purchasingfiles/upload" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<!-- 其他材料(zip压缩包) -->
|
||||||
|
<el-form-item label="其他材料" prop="otherMaterials" class="mb20">
|
||||||
|
<upload-file
|
||||||
|
v-model="dataForm.otherMaterials"
|
||||||
|
:limit="5"
|
||||||
|
:file-type="['zip']"
|
||||||
|
upload-file-url="/purchase/purchasingfiles/upload" />
|
||||||
|
<div class="template-note">支持上传zip格式的压缩包文件</div>
|
||||||
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -651,6 +725,8 @@ import { useMessage } from '/@/hooks/message';
|
|||||||
import UploadFile from '/@/components/Upload/index.vue';
|
import UploadFile from '/@/components/Upload/index.vue';
|
||||||
import other from '/@/utils/other';
|
import other from '/@/utils/other';
|
||||||
import { Document, Download } from '@element-plus/icons-vue';
|
import { Document, Download } from '@element-plus/icons-vue';
|
||||||
|
import { fetchList as getBusinessDeptList } from '/@/api/purchase/purchasingBusinessDept';
|
||||||
|
import { getPage as getSchoolLeaderPage } from '/@/api/finance/purchasingschoolleader';
|
||||||
|
|
||||||
// 路由
|
// 路由
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -704,6 +780,13 @@ const dataForm = reactive({
|
|||||||
recommendedSuppliersSchool: '',
|
recommendedSuppliersSchool: '',
|
||||||
serviceInviteSelectSchool: '',
|
serviceInviteSelectSchool: '',
|
||||||
servicePublicSelectSchoolAuto: '',
|
servicePublicSelectSchoolAuto: '',
|
||||||
|
// 业务分管处室和分管校领导
|
||||||
|
deptClassifyId: '',
|
||||||
|
deptClassifyName: '',
|
||||||
|
schoolLeaderUserId: '',
|
||||||
|
schoolLeaderName: '',
|
||||||
|
// 其他材料(zip压缩包)
|
||||||
|
otherMaterials: '',
|
||||||
});
|
});
|
||||||
const categoryTreeData = ref<any[]>([]);
|
const categoryTreeData = ref<any[]>([]);
|
||||||
const categoryCodePath = ref<string[]>([]); // 级联选择器的路径数组
|
const categoryCodePath = ref<string[]>([]); // 级联选择器的路径数组
|
||||||
@@ -713,6 +796,8 @@ const isSpecialList = ref<any[]>([]);
|
|||||||
const purchaseTypeDeptList = ref<any[]>([]);
|
const purchaseTypeDeptList = ref<any[]>([]);
|
||||||
const purchaseModeSchoolList = ref<any[]>([]);
|
const purchaseModeSchoolList = ref<any[]>([]);
|
||||||
const purchaseTypeUnionList = ref<any[]>([]);
|
const purchaseTypeUnionList = ref<any[]>([]);
|
||||||
|
const businessDeptList = ref<any[]>([]);
|
||||||
|
const schoolLeaderList = ref<any[]>([]);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
|
||||||
// 采购方式ID常量
|
// 采购方式ID常量
|
||||||
@@ -727,12 +812,16 @@ const PURCHASE_TYPE_IDS = {
|
|||||||
// 条件:特殊情况=否 且 集采=否 且 预算金额<5万 → 部门自行采购
|
// 条件:特殊情况=否 且 集采=否 且 预算金额<5万 → 部门自行采购
|
||||||
// 其他情况 → 学校统一采购
|
// 其他情况 → 学校统一采购
|
||||||
const isDeptPurchase = computed(() => {
|
const isDeptPurchase = computed(() => {
|
||||||
// 检查是否特殊情况是否为"否"(id: "1799c07f3a3b8a484f60c495ab9227b6")
|
// 检查是否特殊情况是否为"否"(通过 id 或 value 查找,value 为 '0')
|
||||||
const isSpecialNo = isSpecialList.value.find(item => item.id === '1799c07f3a3b8a484f60c495ab9227b6');
|
const isSpecialNo = isSpecialList.value.find(item =>
|
||||||
|
item.id === '1799c07f3a3b8a484f60c495ab9227b6' || item.value === '0'
|
||||||
|
);
|
||||||
const isSpecialNoValue = isSpecialNo ? isSpecialNo.value : null;
|
const isSpecialNoValue = isSpecialNo ? isSpecialNo.value : null;
|
||||||
|
|
||||||
// 检查是否集采是否为"否"(id: "8e60f8860c1ea2459a41a8ae64fe5518")
|
// 检查是否集采是否为"否"(通过 id 或 value 查找,value 为 '0')
|
||||||
const isCentralizedNo = isCentralizedList.value.find(item => item.id === '8e60f8860c1ea2459a41a8ae64fe5518');
|
const isCentralizedNo = isCentralizedList.value.find(item =>
|
||||||
|
item.id === '8e60f8860c1ea2459a41a8ae64fe5518' || item.value === '0'
|
||||||
|
);
|
||||||
const isCentralizedNoValue = isCentralizedNo ? isCentralizedNo.value : null;
|
const isCentralizedNoValue = isCentralizedNo ? isCentralizedNo.value : null;
|
||||||
|
|
||||||
// 三个条件必须同时满足:特殊情况=否 且 集采=否 且 预算金额<5万
|
// 三个条件必须同时满足:特殊情况=否 且 集采=否 且 预算金额<5万
|
||||||
@@ -746,9 +835,12 @@ const isDeptPurchase = computed(() => {
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
// 判断是否为紧急情况(ID: 6509b59e24c1c6568f4277e544f3e55e)
|
// 判断是否为紧急情况(通过 id 或 value 查找,value 为 '1')
|
||||||
const isUrgentSpecial = computed(() => {
|
const isUrgentSpecial = computed(() => {
|
||||||
const urgentItem = isSpecialList.value.find(item => item.id === '6509b59e24c1c6568f4277e544f3e55e');
|
const urgentItem = isSpecialList.value.find(item =>
|
||||||
|
item.id === '6509b59e24c1c6568f4277e544f3e55e' ||
|
||||||
|
(item.value === '1' && (item.label?.includes('紧急') || item.dictLabel?.includes('紧急')))
|
||||||
|
);
|
||||||
if (!urgentItem) return false;
|
if (!urgentItem) return false;
|
||||||
return dataForm.isSpecial === urgentItem.value;
|
return dataForm.isSpecial === urgentItem.value;
|
||||||
});
|
});
|
||||||
@@ -860,6 +952,20 @@ const showAutoPublicSelect = computed(() => {
|
|||||||
return budget >= 400000 && budget < 1000000 && isSpecialServiceCategory.value;
|
return budget >= 400000 && budget < 1000000 && isSpecialServiceCategory.value;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 获取需求文件的 prop 名称(用于表单验证)
|
||||||
|
const getRequirementFileProp = () => {
|
||||||
|
if (showAutoInviteSelectSchool.value) {
|
||||||
|
if (dataForm.hasRecommendedSupplierSchool === 'yes') {
|
||||||
|
return 'serviceInviteSelectSchool';
|
||||||
|
} else if (dataForm.hasRecommendedSupplierSchool === 'no') {
|
||||||
|
return 'servicePublicSelectSchoolAuto';
|
||||||
|
}
|
||||||
|
} else if (showAutoPublicSelect.value) {
|
||||||
|
return 'servicePublicSelectSchool';
|
||||||
|
}
|
||||||
|
return 'purchaseRequirement';
|
||||||
|
};
|
||||||
|
|
||||||
// 判断学校统一采购是否需要自动设置采购方式(5万<=金额<40万,服务类目,特殊服务类目)
|
// 判断学校统一采购是否需要自动设置采购方式(5万<=金额<40万,服务类目,特殊服务类目)
|
||||||
const isAutoSelectPurchaseTypeUnion = computed(() => {
|
const isAutoSelectPurchaseTypeUnion = computed(() => {
|
||||||
if (isDeptPurchase.value) return false;
|
if (isDeptPurchase.value) return false;
|
||||||
@@ -872,11 +978,13 @@ const isAutoSelectPurchaseTypeUnion = computed(() => {
|
|||||||
watch([() => dataForm.categoryCode, () => dataForm.budget], () => {
|
watch([() => dataForm.categoryCode, () => dataForm.budget], () => {
|
||||||
// 部门自行采购:自动设置网上商城
|
// 部门自行采购:自动设置网上商城
|
||||||
if (isAutoSelectPurchaseType.value && isDeptPurchase.value) {
|
if (isAutoSelectPurchaseType.value && isDeptPurchase.value) {
|
||||||
// 查找网上商城选项(通过id或value匹配)
|
// 查找网上商城选项(通过 id 或 label 匹配)
|
||||||
const onlineMallOption = purchaseTypeDeptList.value.find(item =>
|
const onlineMallOption = purchaseTypeDeptList.value.find(item => {
|
||||||
item.id === PURCHASE_TYPE_IDS.ONLINE_MALL ||
|
const label = item.label || item.dictLabel || item.name || '';
|
||||||
item.value === PURCHASE_TYPE_IDS.ONLINE_MALL
|
return item.id === PURCHASE_TYPE_IDS.ONLINE_MALL ||
|
||||||
);
|
item.value === PURCHASE_TYPE_IDS.ONLINE_MALL ||
|
||||||
|
label.includes('网上商城') || label.includes('商城');
|
||||||
|
});
|
||||||
if (onlineMallOption && dataForm.purchaseType !== onlineMallOption.value) {
|
if (onlineMallOption && dataForm.purchaseType !== onlineMallOption.value) {
|
||||||
dataForm.purchaseType = onlineMallOption.value;
|
dataForm.purchaseType = onlineMallOption.value;
|
||||||
}
|
}
|
||||||
@@ -1036,6 +1144,7 @@ const getFundSourceDict = async () => {
|
|||||||
fundSourceList.value = [];
|
fundSourceList.value = [];
|
||||||
if (res.data && Array.isArray(res.data)) {
|
if (res.data && Array.isArray(res.data)) {
|
||||||
fundSourceList.value = res.data.map((item: any) => ({
|
fundSourceList.value = res.data.map((item: any) => ({
|
||||||
|
id: item.id,
|
||||||
label: item.label || item.dictLabel || item.name,
|
label: item.label || item.dictLabel || item.name,
|
||||||
value: item.value || item.dictValue || item.code
|
value: item.value || item.dictValue || item.code
|
||||||
}));
|
}));
|
||||||
@@ -1134,7 +1243,7 @@ const getPurchaseTypeDeptDict = async () => {
|
|||||||
purchaseTypeDeptList.value = res.data.map((item: any) => ({
|
purchaseTypeDeptList.value = res.data.map((item: any) => ({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
label: item.label || item.dictLabel || item.name,
|
label: item.label || item.dictLabel || item.name,
|
||||||
value: item.id || item.dictValue || item.code
|
value: item.value || item.dictValue || item.code
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@@ -1149,6 +1258,7 @@ const getPurchaseModeSchoolDict = async () => {
|
|||||||
purchaseModeSchoolList.value = [];
|
purchaseModeSchoolList.value = [];
|
||||||
if (res.data && Array.isArray(res.data)) {
|
if (res.data && Array.isArray(res.data)) {
|
||||||
purchaseModeSchoolList.value = res.data.map((item: any) => ({
|
purchaseModeSchoolList.value = res.data.map((item: any) => ({
|
||||||
|
id: item.id,
|
||||||
label: item.label || item.dictLabel || item.name,
|
label: item.label || item.dictLabel || item.name,
|
||||||
value: item.value || item.dictValue || item.code
|
value: item.value || item.dictValue || item.code
|
||||||
}));
|
}));
|
||||||
@@ -1173,6 +1283,7 @@ const getPurchaseTypeUnionDict = async () => {
|
|||||||
purchaseTypeUnionList.value = [];
|
purchaseTypeUnionList.value = [];
|
||||||
if (res.data && Array.isArray(res.data)) {
|
if (res.data && Array.isArray(res.data)) {
|
||||||
purchaseTypeUnionList.value = res.data.map((item: any) => ({
|
purchaseTypeUnionList.value = res.data.map((item: any) => ({
|
||||||
|
id: item.id,
|
||||||
label: item.label || item.dictLabel || item.name,
|
label: item.label || item.dictLabel || item.name,
|
||||||
value: item.value || item.dictValue || item.code
|
value: item.value || item.dictValue || item.code
|
||||||
}));
|
}));
|
||||||
@@ -1182,6 +1293,72 @@ const getPurchaseTypeUnionDict = async () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 获取业务分管处室列表
|
||||||
|
const getBusinessDeptListData = async () => {
|
||||||
|
try {
|
||||||
|
const res = await getBusinessDeptList({ records: 1000 }); // 获取所有数据
|
||||||
|
if (res.data && res.data.records) {
|
||||||
|
businessDeptList.value = res.data.records.map((item: any) => ({
|
||||||
|
id: item.id,
|
||||||
|
deptId: item.deptId,
|
||||||
|
deptName: item.deptName,
|
||||||
|
userId: item.userId,
|
||||||
|
name: item.name,
|
||||||
|
username: item.username
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.error('获取业务分管处室列表失败:', err);
|
||||||
|
businessDeptList.value = [];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 获取分管校领导列表
|
||||||
|
const getSchoolLeaderListData = async () => {
|
||||||
|
try {
|
||||||
|
const res = await getSchoolLeaderPage({ records: 1000 }); // 获取所有数据
|
||||||
|
if (res.data && res.data.records) {
|
||||||
|
schoolLeaderList.value = res.data.records.map((item: any) => ({
|
||||||
|
id: item.id,
|
||||||
|
userId: item.userId,
|
||||||
|
name: item.name,
|
||||||
|
username: item.username
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.error('获取分管校领导列表失败:', err);
|
||||||
|
schoolLeaderList.value = [];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 处理业务分管处室选择变化
|
||||||
|
const handleBusinessDeptChange = (value: string) => {
|
||||||
|
if (value) {
|
||||||
|
const selected = businessDeptList.value.find(item => item.id === value);
|
||||||
|
if (selected) {
|
||||||
|
dataForm.deptClassifyId = selected.id;
|
||||||
|
dataForm.deptClassifyName = selected.deptName || '';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
dataForm.deptClassifyId = '';
|
||||||
|
dataForm.deptClassifyName = '';
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 处理分管校领导选择变化
|
||||||
|
const handleSchoolLeaderChange = (value: string) => {
|
||||||
|
if (value) {
|
||||||
|
const selected = schoolLeaderList.value.find(item => item.userId === value);
|
||||||
|
if (selected) {
|
||||||
|
dataForm.schoolLeaderUserId = selected.userId;
|
||||||
|
dataForm.schoolLeaderName = selected.name || '';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
dataForm.schoolLeaderUserId = '';
|
||||||
|
dataForm.schoolLeaderName = '';
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// 处理文件ID字符串转数组
|
// 处理文件ID字符串转数组
|
||||||
const getFileIdsArray = (fileIds: string | string[]): string[] => {
|
const getFileIdsArray = (fileIds: string | string[]): string[] => {
|
||||||
if (!fileIds) return [];
|
if (!fileIds) return [];
|
||||||
@@ -1234,7 +1411,7 @@ const handleSubmit = async () => {
|
|||||||
'serviceInviteSelect', 'servicePublicSelectAuto', 'purchaseRequirement',
|
'serviceInviteSelect', 'servicePublicSelectAuto', 'purchaseRequirement',
|
||||||
'meetingMinutes', 'feasibilityReport', 'meetingMinutesUrgent',
|
'meetingMinutes', 'feasibilityReport', 'meetingMinutesUrgent',
|
||||||
'meetingMinutesSingle', 'meetingMinutesImport', 'singleSourceProof', 'importApplication',
|
'meetingMinutesSingle', 'meetingMinutesImport', 'singleSourceProof', 'importApplication',
|
||||||
'governmentPurchaseIntent', 'servicePublicSelectSchool'
|
'governmentPurchaseIntent', 'servicePublicSelectSchool', 'otherMaterials'
|
||||||
];
|
];
|
||||||
|
|
||||||
fileFields.forEach(field => {
|
fileFields.forEach(field => {
|
||||||
@@ -1283,7 +1460,7 @@ const handleTempStore = async () => {
|
|||||||
'serviceInviteSelect', 'servicePublicSelectAuto', 'purchaseRequirement',
|
'serviceInviteSelect', 'servicePublicSelectAuto', 'purchaseRequirement',
|
||||||
'meetingMinutes', 'feasibilityReport', 'meetingMinutesUrgent',
|
'meetingMinutes', 'feasibilityReport', 'meetingMinutesUrgent',
|
||||||
'meetingMinutesSingle', 'meetingMinutesImport', 'singleSourceProof', 'importApplication',
|
'meetingMinutesSingle', 'meetingMinutesImport', 'singleSourceProof', 'importApplication',
|
||||||
'governmentPurchaseIntent', 'servicePublicSelectSchool'
|
'governmentPurchaseIntent', 'servicePublicSelectSchool', 'otherMaterials'
|
||||||
];
|
];
|
||||||
|
|
||||||
fileFields.forEach(field => {
|
fileFields.forEach(field => {
|
||||||
@@ -1366,7 +1543,26 @@ onMounted(async () => {
|
|||||||
getPurchaseTypeDeptDict(),
|
getPurchaseTypeDeptDict(),
|
||||||
getPurchaseModeSchoolDict(),
|
getPurchaseModeSchoolDict(),
|
||||||
getPurchaseTypeUnionDict(),
|
getPurchaseTypeUnionDict(),
|
||||||
|
getBusinessDeptListData(),
|
||||||
|
getSchoolLeaderListData(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
// 新增模式下设置默认值(只有在没有 id 的情况下才设置)
|
||||||
|
if (!dataForm.id) {
|
||||||
|
// 填报日期默认为当天
|
||||||
|
const today = new Date();
|
||||||
|
const year = today.getFullYear();
|
||||||
|
const month = String(today.getMonth() + 1).padStart(2, '0');
|
||||||
|
const day = String(today.getDate()).padStart(2, '0');
|
||||||
|
dataForm.applyDate = `${year}-${month}-${day}`;
|
||||||
|
|
||||||
|
// 是否集采默认为"否"(value: '0')
|
||||||
|
dataForm.isCentralized = '0';
|
||||||
|
|
||||||
|
// 是否特殊情况默认为"否"(value: '0')
|
||||||
|
dataForm.isSpecial = '0';
|
||||||
|
}
|
||||||
|
|
||||||
// 如果有 categoryCode,设置回显路径
|
// 如果有 categoryCode,设置回显路径
|
||||||
if (dataForm.categoryCode) {
|
if (dataForm.categoryCode) {
|
||||||
setCategoryCodePath();
|
setCategoryCodePath();
|
||||||
|
|||||||
Reference in New Issue
Block a user