|
|
|
|
@ -90,8 +90,15 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="交流对象" prop="exchangeObject">
|
|
|
|
|
<el-input v-model="form.exchangeObject" placeholder="拜访客户名称" :disabled="isFormDisabled" />
|
|
|
|
|
<el-form-item label="交流对象" prop="customerId">
|
|
|
|
|
<el-select v-model="form.customerId" placeholder="请选择客户" :disabled="isFormDisabled" filterable clearable style="width: 100%">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="customer in customerList"
|
|
|
|
|
:key="customer.customerId"
|
|
|
|
|
:label="customer.customerName"
|
|
|
|
|
:value="customer.customerId"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
@ -244,6 +251,7 @@ import { CodeRuleEnum, FlowCodeEnum } from '@/enums/OAEnum';
|
|
|
|
|
import { getInfo } from '@/api/login';
|
|
|
|
|
import { listUser } from '@/api/system/user'; // 导入用户列表API
|
|
|
|
|
import { allListDept } from '@/api/system/dept'; // 导入部门列表API
|
|
|
|
|
import { getCrmCustomerInfoList } from '@/api/oa/crm/customerInfo'; // 导入客户列表API
|
|
|
|
|
import { ProjectInfoVO } from '@/api/oa/erp/projectInfo/types';
|
|
|
|
|
import dayjs from 'dayjs';
|
|
|
|
|
|
|
|
|
|
@ -266,6 +274,7 @@ const projectSelectRef = ref<InstanceType<typeof ProjectSelect>>();
|
|
|
|
|
|
|
|
|
|
const userList = ref<any[]>([]); // 用户列表
|
|
|
|
|
const deptInfoList = ref<any[]>([]); // 部门列表
|
|
|
|
|
const customerList = ref<any[]>([]); // 客户列表
|
|
|
|
|
|
|
|
|
|
// 默认抄送人员的昵称列表
|
|
|
|
|
const defaultCopyUserNames = ['米兰', '于洋', '张兰艳', '张东辉', '冯俊杰'];
|
|
|
|
|
@ -320,6 +329,7 @@ const data = reactive({
|
|
|
|
|
// 动态校验
|
|
|
|
|
projectId: [{ required: true, message: '项目名称不能为空', trigger: 'change' }],
|
|
|
|
|
exchangeObject: [{ required: true, message: '交流对象不能为空', trigger: 'blur' }],
|
|
|
|
|
customerId: [{ required: true, message: '请选择交流对象(客户)', trigger: 'change' }],
|
|
|
|
|
businessDirection: [{ required: true, message: '业务方向不能为空', trigger: 'change' }],
|
|
|
|
|
exchangePurpose: [{ required: true, message: '交流目的不能为空', trigger: 'blur' }],
|
|
|
|
|
exchangeProcess: [{ required: true, message: '交流过程简述不能为空', trigger: 'blur' }],
|
|
|
|
|
@ -357,6 +367,10 @@ onMounted(async () => {
|
|
|
|
|
const deptRes = await allListDept({ deptCategory: '03' } as any);
|
|
|
|
|
deptInfoList.value = deptRes.data || [];
|
|
|
|
|
|
|
|
|
|
// 加载客户列表 (用于交流对象选择)
|
|
|
|
|
const customerRes = await getCrmCustomerInfoList({});
|
|
|
|
|
customerList.value = customerRes.data || [];
|
|
|
|
|
|
|
|
|
|
// 自动填充申请人信息
|
|
|
|
|
if (!id) {
|
|
|
|
|
try {
|
|
|
|
|
|