采购更新

This commit is contained in:
吴红兵
2026-02-28 11:25:49 +08:00
parent 5220e3e369
commit 4dccb704bb
4 changed files with 81 additions and 27 deletions

View File

@@ -1,28 +1,48 @@
<template> <template>
<el-dialog <el-dialog
:title="dataForm.id ? '编辑' : '新增'" :title="dataForm.id ? '编辑' : '新增'"
v-model="visible" v-model="visible"
width="600px" width="600px"
:close-on-click-modal="false" :close-on-click-modal="false"
draggable> draggable>
<el-form <el-form
ref="formRef" ref="formRef"
:model="dataForm" :model="dataForm"
:rules="dataRules" :rules="dataRules"
label-width="100px" label-width="100px"
v-loading="loading"> v-loading="loading">
<el-form-item label="代理名称" prop="agentName"> <el-form-item label="代理名称" prop="agentName">
<el-input <el-input
v-model="dataForm.agentName" v-model="dataForm.agentName"
placeholder="请输入代理名称" placeholder="请输入代理名称"
clearable /> clearable />
</el-form-item> </el-form-item>
<el-form-item label="联系人" prop="contactPerson">
<el-input
v-model="dataForm.contactPerson"
placeholder="请输入联系人"
clearable />
</el-form-item>
<el-form-item label="联系电话" prop="contactPhone">
<el-input
v-model="dataForm.contactPhone"
placeholder="请输入联系电话"
clearable />
</el-form-item>
<el-form-item label="登录用户名" prop="username">
<el-input
v-model="dataForm.username"
placeholder="请输入登录用户名(不填则自动生成)"
clearable
:disabled="!!dataForm.id" />
<div class="form-tip" v-if="!dataForm.id">新增时自动创建系统用户默认密码Aa123456角色招标代理</div>
</el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input <el-input
v-model="dataForm.remark" v-model="dataForm.remark"
type="textarea" type="textarea"
:rows="3" :rows="3"
placeholder="请输入备注" placeholder="请输入备注"
clearable /> clearable />
</el-form-item> </el-form-item>
</el-form> </el-form>
@@ -48,6 +68,9 @@ const formRef = ref();
const dataForm = reactive({ const dataForm = reactive({
id: '', id: '',
agentName: '', agentName: '',
contactPerson: '',
contactPhone: '',
username: '',
remark: '', remark: '',
}); });
const visible = ref(false); const visible = ref(false);
@@ -64,6 +87,9 @@ const openDialog = async (type: string, rowData?: any) => {
visible.value = true; visible.value = true;
dataForm.id = ''; dataForm.id = '';
dataForm.agentName = ''; dataForm.agentName = '';
dataForm.contactPerson = '';
dataForm.contactPhone = '';
dataForm.username = '';
dataForm.remark = ''; dataForm.remark = '';
nextTick(() => { nextTick(() => {
@@ -76,6 +102,9 @@ const openDialog = async (type: string, rowData?: any) => {
Object.assign(dataForm, { Object.assign(dataForm, {
id: res.data.id || '', id: res.data.id || '',
agentName: res.data.agentName || '', agentName: res.data.agentName || '',
contactPerson: res.data.contactPerson || '',
contactPhone: res.data.contactPhone || '',
username: res.data.username || '',
remark: res.data.remark || '', remark: res.data.remark || '',
}); });
} }
@@ -124,5 +153,10 @@ defineExpose({
</script> </script>
<style scoped> <style scoped>
.form-tip {
font-size: 12px;
color: #909399;
margin-top: 4px;
}
</style> </style>

View File

@@ -75,7 +75,25 @@
<span style="margin-left: 4px">代理名称</span> <span style="margin-left: 4px">代理名称</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="remark" label="备注" min-width="300" show-overflow-tooltip> <el-table-column prop="contactPerson" label="联系人" width="120" show-overflow-tooltip>
<template #header>
<el-icon><User /></el-icon>
<span style="margin-left: 4px">联系人</span>
</template>
</el-table-column>
<el-table-column prop="contactPhone" label="联系电话" width="140" show-overflow-tooltip>
<template #header>
<el-icon><Phone /></el-icon>
<span style="margin-left: 4px">联系电话</span>
</template>
</el-table-column>
<el-table-column prop="username" label="登录用户名" width="140" show-overflow-tooltip>
<template #header>
<el-icon><UserFilled /></el-icon>
<span style="margin-left: 4px">登录用户名</span>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" min-width="200" show-overflow-tooltip>
<template #header> <template #header>
<el-icon><EditPen /></el-icon> <el-icon><EditPen /></el-icon>
<span style="margin-left: 4px">备注</span> <span style="margin-left: 4px">备注</span>
@@ -206,7 +224,7 @@ import { BasicTableProps, useTable } from "/@/hooks/table";
import { getPage, delObj, getAgentSummary } from "/@/api/finance/purchaseagent"; import { getPage, delObj, getAgentSummary } from "/@/api/finance/purchaseagent";
import { deptTree } from '/@/api/admin/dept'; import { deptTree } from '/@/api/admin/dept';
import { useMessage, useMessageBox } from "/@/hooks/message"; import { useMessage, useMessageBox } from "/@/hooks/message";
import { List, Document, EditPen, Clock, Search } from '@element-plus/icons-vue' import { List, Document, EditPen, Clock, Search, User, Phone, UserFilled } from '@element-plus/icons-vue'
// 引入组件 // 引入组件
const FormDialog = defineAsyncComponent(() => import('./form.vue')); const FormDialog = defineAsyncComponent(() => import('./form.vue'));

View File

@@ -91,13 +91,13 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" class="mb12" v-if="!isEntrustCenterChannel || (isFlowEmbed && isPurchaseCenter)"> <el-col :span="8" class="mb12" >
<el-form-item label="采购方式" prop="purchaseType" :required="!isEntrustCenterChannel"> <el-form-item label="采购方式" prop="purchaseType" :required="!isEntrustCenterChannel">
<el-select <el-select
v-model="dataForm.purchaseType" v-model="dataForm.purchaseType"
placeholder="请选择采购方式" placeholder="请选择采购方式"
clearable clearable
:disabled="(isFlowEmbed && isPurchaseCenter) ? false : (isDeptSelfMallLocked || isAutoSelectPurchaseType)" :disabled="(isFlowEmbed && isPurchaseCenter) ? false : (isDeptSelfMallLocked || isAutoSelectPurchaseType || isEntrustCenterChannel)"
style="width: 100%"> style="width: 100%">
<el-option <el-option
v-for="item in purchaseTypeDeptList" v-for="item in purchaseTypeDeptList"
@@ -408,7 +408,7 @@
<li> <li>
<strong>委托采购中心采购</strong> <strong>委托采购中心采购</strong>
部门自行采购中选择委托采购中心采购作为采购途径时申请阶段隐藏采购方式由采购中心在审核环节选择 部门自行采购中选择委托采购中心采购作为采购途径时申请阶段隐藏采购方式由采购中心在审核环节选择
对服务类特殊品目且金额在 5 ~ 40 万区间时采购中心会优先推荐网上商城服务网上商城方式 对服务类特殊品目采购中心会优先推荐网上商城服务网上商城方式
</li> </li>
</ul> </ul>
</el-scrollbar> </el-scrollbar>
@@ -979,8 +979,9 @@ watch(
return; return;
} }
// 部门自行采购 & 采购途径为委托采购中心采购”且为申请阶段:采购方式隐藏且不设置 // 部门自行采购 & 采购途径为委托采购中心采购”且为新增申请阶段:采购方式隐藏且不设置
if (isDeptPurchase.value && isEntrustCenterChannel.value && !isFlowEmbed.value) { // 注意:查看模式和编辑模式不清空已有的采购方式
if (isDeptPurchase.value && isEntrustCenterChannel.value && !isFlowEmbed.value && !isViewMode.value && !isEditMode.value) {
dataForm.purchaseType = ''; dataForm.purchaseType = '';
return; return;
} }
@@ -1003,12 +1004,13 @@ watch(
} }
} }
// 部门自行采购 & 采购途径为委托采购中心采购” & 采购中心审批节点:根据特殊服务类目自动设置网上商城 // 部门自行采购 & 采购途径为委托采购中心采购” & 采购中心审批节点:默认设置网上商城
if (isAutoSelectPurchaseType.value && isDeptPurchase.value && isEntrustCenterChannel.value && isFlowEmbed.value && isPurchaseCenter.value) { if (isDeptPurchase.value && isEntrustCenterChannel.value && isFlowEmbed.value && isPurchaseCenter.value) {
const onlineMallOption = purchaseTypeDeptList.value.find(item => item.value === DEPT_PURCHASE_TYPE.ONLINE_MALL); const onlineMallOption = purchaseTypeDeptList.value.find(item => item.value === DEPT_PURCHASE_TYPE.ONLINE_MALL);
if (onlineMallOption && dataForm.purchaseType !== onlineMallOption.value) { if (onlineMallOption && dataForm.purchaseType !== onlineMallOption.value) {
dataForm.purchaseType = onlineMallOption.value; dataForm.purchaseType = onlineMallOption.value;
} }
return;
} }
// 学校统一采购审批阶段:自动设置网上商城采购方式 // 学校统一采购审批阶段:自动设置网上商城采购方式

View File

@@ -10,7 +10,7 @@
@queryTable="getDataList"></right-toolbar> @queryTable="getDataList"></right-toolbar>
</div> </div>
</el-row> </el-row>
<el-table :data="state.dataList" v-loading="state.loading" style="width: 100%" <el-table :data="state.dataList" v-loading="state.loading" style="width: 100%;display: none"
@sort-change="sortChangeHandle"> @sort-change="sortChangeHandle">
<el-table-column type="index" :label="t('jfcomment.index')" width="40"/> <el-table-column type="index" :label="t('jfcomment.index')" width="40"/>
<el-table-column prop="flowKey" :label="t('jfcomment.flowKey')" show-overflow-tooltip :width="data.width"> <el-table-column prop="flowKey" :label="t('jfcomment.flowKey')" show-overflow-tooltip :width="data.width">
@@ -103,7 +103,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" <pagination style="display: none" @size-change="sizeChangeHandle" @current-change="currentChangeHandle"
v-bind="state.pagination"/> v-bind="state.pagination"/>
</div> </div>
<el-timeline style="margin-top: 22px; margin-left: 12px"> <el-timeline style="margin-top: 22px; margin-left: 12px">
@@ -116,7 +116,7 @@
:timestamp="item.endTime"> :timestamp="item.endTime">
<div style="align-items: center; display: flex;"> <div style="align-items: center; display: flex;">
<span style="margin-right: 15px"> <span style="margin-right: 15px">
{{ item.jobName }} {{ item.userName }} {{ item.nodeName }} {{ item.userName }}
</span> </span>
<span style="margin-right: 15px"> <span style="margin-right: 15px">
<convert-role-name :value="item"></convert-role-name> <convert-role-name :value="item"></convert-role-name>