修改实施采购途径
This commit is contained in:
@@ -26,18 +26,11 @@
|
|||||||
<el-divider content-position="left">
|
<el-divider content-position="left">
|
||||||
<span class="section-title">基础信息</span>
|
<span class="section-title">基础信息</span>
|
||||||
</el-divider>
|
</el-divider>
|
||||||
<el-text v-if="!isEditMode && !isViewMode" type="info" size="small" class="mb12" style="display: block">
|
<el-text v-if="!isEditMode && !isViewMode" type="info" size="small" class="mb12" style="display: block"> 暂存时,基础信息必填 </el-text>
|
||||||
暂存时,基础信息必填
|
|
||||||
</el-text>
|
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<el-col :span="8" class="mb12">
|
<el-col :span="8" class="mb12">
|
||||||
<el-form-item label="采购项目名称" prop="projectName">
|
<el-form-item label="采购项目名称" prop="projectName">
|
||||||
<el-input
|
<el-input v-model="dataForm.projectName" placeholder="请输入采购项目名称" clearable :disabled="flowFieldDisabled('projectName')" />
|
||||||
v-model="dataForm.projectName"
|
|
||||||
placeholder="请输入采购项目名称"
|
|
||||||
clearable
|
|
||||||
:disabled="flowFieldDisabled('projectName')"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8" class="mb12">
|
<el-col :span="8" class="mb12">
|
||||||
@@ -203,7 +196,13 @@
|
|||||||
:disabled="isPurchaseTypeDisabled"
|
:disabled="isPurchaseTypeDisabled"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
<el-option v-for="item in purchaseTypeDeptOptions" :key="item.value" :label="item.label" :value="item.value" :disabled="item.disabled" />
|
<el-option
|
||||||
|
v-for="item in purchaseTypeDeptOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
:disabled="item.disabled"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -399,16 +398,16 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<el-col :span="8" class="mb12">
|
<el-col :span="8" class="mb12">
|
||||||
<el-form-item label="实施采购途径" prop="implementChannel" :required="isImplementChannelRequired">
|
<el-form-item label="实施采购途径" prop="implementType" :required="isImplementTypeRequired">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="dataForm.implementChannel"
|
v-model="dataForm.implementType"
|
||||||
placeholder="请选择实施采购途径"
|
placeholder="请选择实施采购途径"
|
||||||
clearable
|
clearable
|
||||||
:disabled="schoolUnifiedPurchaseFormDisabled"
|
:disabled="schoolUnifiedPurchaseFormDisabled"
|
||||||
@change="handleImplementChannelChange"
|
@change="handleImplementTypeChange"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
<el-option v-for="item in implementChannelList" :key="item.value" :label="item.label" :value="item.value" />
|
<el-option v-for="item in implementTypeList" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -987,7 +986,6 @@ const dataForm = reactive({
|
|||||||
isSpecial: '',
|
isSpecial: '',
|
||||||
hasAssets: '0',
|
hasAssets: '0',
|
||||||
purchaseMode: '',
|
purchaseMode: '',
|
||||||
implementChannel: '', // 实施采购途径:框架协议、网上商城
|
|
||||||
purchaseType: '',
|
purchaseType: '',
|
||||||
purchaseTypeUnion: '',
|
purchaseTypeUnion: '',
|
||||||
purchaseChannel: '',
|
purchaseChannel: '',
|
||||||
@@ -1058,8 +1056,10 @@ const isSpecialList = ref<any[]>([]);
|
|||||||
const purchaseTypeDeptList = ref<any[]>([]);
|
const purchaseTypeDeptList = ref<any[]>([]);
|
||||||
/** 部门采购方式字典(委托采购中心采购时使用) */
|
/** 部门采购方式字典(委托采购中心采购时使用) */
|
||||||
const purchaseTypeDeptDelegationList = ref<any[]>([]);
|
const purchaseTypeDeptDelegationList = ref<any[]>([]);
|
||||||
/** 实施采购途径选项:框架协议、网上商城 */
|
/** 实施采购途径选项:1:自行组织采购 2:委托代理采购 5:框架协议 8:网上商城 */
|
||||||
const implementChannelList = ref<any[]>([
|
const implementTypeList = ref<any[]>([
|
||||||
|
{ value: '1', label: '自行组织采购' },
|
||||||
|
{ value: '2', label: '委托代理采购' },
|
||||||
{ value: '5', label: '框架协议' },
|
{ value: '5', label: '框架协议' },
|
||||||
{ value: '8', label: '网上商城' },
|
{ value: '8', label: '网上商城' },
|
||||||
]);
|
]);
|
||||||
@@ -1229,7 +1229,7 @@ const isPurchaseTypeUnionRequired = computed(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// 学校统一采购 - 实施采购途径是否必填
|
// 学校统一采购 - 实施采购途径是否必填
|
||||||
const isImplementChannelRequired = computed(() => {
|
const isImplementTypeRequired = computed(() => {
|
||||||
// 审核阶段:采购中心必填
|
// 审核阶段:采购中心必填
|
||||||
if (isFlowEmbed.value && isPurchaseCenter.value) {
|
if (isFlowEmbed.value && isPurchaseCenter.value) {
|
||||||
return true;
|
return true;
|
||||||
@@ -1407,19 +1407,24 @@ const calcEntrustCenterType = (): 'service_online' | 'other' | '' => {
|
|||||||
return 'other';
|
return 'other';
|
||||||
};
|
};
|
||||||
|
|
||||||
// 实施采购途径变化时,自动设置采购方式
|
// 实施采购途径变化时,根据选择自动设置采购方式
|
||||||
// 框架协议 → 采购方式自动选择"框架协议"
|
// 5:框架协议 → 采购方式自动选择"框架协议"
|
||||||
// 网上商城 → 采购方式自动选择"网上商城"
|
// 8:网上商城 → 采购方式自动选择"网上商城"
|
||||||
const handleImplementChannelChange = (value: string) => {
|
// 1:自行组织采购、2:委托代理采购 → 清空采购方式,由用户手动选择
|
||||||
|
const handleImplementTypeChange = (value: string) => {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
// 清空实施采购途径时,清空采购方式
|
// 清空实施采购途径时,清空采购方式
|
||||||
dataForm.purchaseType = '';
|
dataForm.purchaseType = '';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据实施采购途径自动设置采购方式
|
// 仅当选择框架协议(5)或网上商城(8)时,自动设置采购方式
|
||||||
// value 与 PurchaseTypeEnum 编码一致:5=框架协议,8=网上商城
|
if (value === '5' || value === '8') {
|
||||||
dataForm.purchaseType = value;
|
dataForm.purchaseType = value;
|
||||||
|
} else {
|
||||||
|
// 其他选项清空采购方式,由用户手动选择
|
||||||
|
dataForm.purchaseType = '';
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 监听采购途径变化,清理所有与采购方式相关的材料字段,同时如果已选择品目则重新计算entrustCenterType
|
// 监听采购途径变化,清理所有与采购方式相关的材料字段,同时如果已选择品目则重新计算entrustCenterType
|
||||||
@@ -1769,7 +1774,7 @@ const dataRules = reactive({
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
// 学校统一采购 + 采购中心审核:实施采购途径必填
|
// 学校统一采购 + 采购中心审核:实施采购途径必填
|
||||||
implementChannel: [
|
implementType: [
|
||||||
{
|
{
|
||||||
validator: (_rule: any, value: string, callback: (e?: Error) => void) => {
|
validator: (_rule: any, value: string, callback: (e?: Error) => void) => {
|
||||||
if (!isDeptPurchase.value && isFlowEmbed.value && isPurchaseCenter.value) {
|
if (!isDeptPurchase.value && isFlowEmbed.value && isPurchaseCenter.value) {
|
||||||
@@ -1901,7 +1906,6 @@ async function loadDetail(applyId: string | number) {
|
|||||||
isCentralized: detail.isCentralized != null ? String(detail.isCentralized) : '',
|
isCentralized: detail.isCentralized != null ? String(detail.isCentralized) : '',
|
||||||
isSpecial: detail.isSpecial != null ? String(detail.isSpecial) : '',
|
isSpecial: detail.isSpecial != null ? String(detail.isSpecial) : '',
|
||||||
purchaseMode: detail.purchaseMode != null ? String(detail.purchaseMode) : '',
|
purchaseMode: detail.purchaseMode != null ? String(detail.purchaseMode) : '',
|
||||||
implementChannel: detail.implementChannel != null ? String(detail.implementChannel) : '',
|
|
||||||
purchaseType:
|
purchaseType:
|
||||||
detail.purchaseType === DEPT_PURCHASE_TYPE.ENTRUST_CENTER
|
detail.purchaseType === DEPT_PURCHASE_TYPE.ENTRUST_CENTER
|
||||||
? ''
|
? ''
|
||||||
|
|||||||
Reference in New Issue
Block a user