feat: 项目管理负责人查询
This commit is contained in:
@@ -26,6 +26,11 @@ export function getCustomerPage(params: PageParam) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 查询客户分页 */
|
||||||
|
export function getCustomerList() {
|
||||||
|
return requestClient.get<CustomerApi.Customer[]>('/license/customer/list');
|
||||||
|
}
|
||||||
|
|
||||||
/** 查询客户详情 */
|
/** 查询客户详情 */
|
||||||
export function getCustomer(id: number) {
|
export function getCustomer(id: number) {
|
||||||
return requestClient.get<CustomerApi.Customer>(
|
return requestClient.get<CustomerApi.Customer>(
|
||||||
@@ -54,7 +59,7 @@ export function exportCustomer(params: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 客户名称是否唯一 */
|
/** 客户名称是否唯一 */
|
||||||
async function isCustomerNameUnique(
|
export async function isCustomerNameUnique(
|
||||||
name: string,
|
name: string,
|
||||||
id?: CustomerApi.Customer['id'],
|
id?: CustomerApi.Customer['id'],
|
||||||
) {
|
) {
|
||||||
@@ -64,7 +69,7 @@ async function isCustomerNameUnique(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 客户编号是否唯一 */
|
/** 客户编号是否唯一 */
|
||||||
async function isCustomerCodeUnique(
|
export async function isCustomerCodeUnique(
|
||||||
code: number,
|
code: number,
|
||||||
id?: CustomerApi.Customer['id'],
|
id?: CustomerApi.Customer['id'],
|
||||||
) {
|
) {
|
||||||
@@ -74,8 +79,6 @@ async function isCustomerCodeUnique(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 查询当前最大sn */
|
/** 查询当前最大sn */
|
||||||
async function getMaxSn() {
|
export async function getMaxSn() {
|
||||||
return requestClient.get<boolean>('/license/customer/max-sn');
|
return requestClient.get<boolean>('/license/customer/max-sn');
|
||||||
}
|
}
|
||||||
|
|
||||||
export { getMaxSn, isCustomerCodeUnique, isCustomerNameUnique };
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import type { ProjectApi } from '#/api/license/project';
|
|||||||
|
|
||||||
import { useAccess } from '@vben/access';
|
import { useAccess } from '@vben/access';
|
||||||
|
|
||||||
|
import { getCustomerList } from '#/api/license/customer';
|
||||||
import { getSimpleUserList } from '#/api/system/user';
|
import { getSimpleUserList } from '#/api/system/user';
|
||||||
import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
|
import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
|
||||||
|
|
||||||
@@ -20,15 +21,6 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
show: () => false,
|
show: () => false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
fieldName: 'customerId',
|
|
||||||
label: '客户ID',
|
|
||||||
rules: 'required',
|
|
||||||
component: 'Input',
|
|
||||||
componentProps: {
|
|
||||||
placeholder: '请输入客户ID',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
fieldName: 'name',
|
fieldName: 'name',
|
||||||
label: '项目名称',
|
label: '项目名称',
|
||||||
@@ -47,6 +39,25 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
placeholder: '请输入项目编号',
|
placeholder: '请输入项目编号',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
fieldName: 'customerId',
|
||||||
|
label: '所属客户',
|
||||||
|
rules: 'required',
|
||||||
|
component: 'ApiSelect',
|
||||||
|
componentProps: {
|
||||||
|
api: async () => {
|
||||||
|
const data = await getCustomerList();
|
||||||
|
return data.map((item) => ({
|
||||||
|
// label: `${item.name}(${item.code})`,
|
||||||
|
label: item.name,
|
||||||
|
value: item.id,
|
||||||
|
}));
|
||||||
|
},
|
||||||
|
showSearch: true,
|
||||||
|
filterOption: (input: string, option: any) =>
|
||||||
|
option.label.toLowerCase().includes(input.toLowerCase()),
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'contractCode',
|
fieldName: 'contractCode',
|
||||||
label: '合同编号',
|
label: '合同编号',
|
||||||
@@ -59,12 +70,23 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
{
|
{
|
||||||
fieldName: 'businessStatus',
|
fieldName: 'businessStatus',
|
||||||
label: '商务状态',
|
label: '商务状态',
|
||||||
|
rules: 'required',
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
options: getDictOptions(DICT_TYPE.LIC_BUSINESS_STATUS, 'number'),
|
options: getDictOptions(DICT_TYPE.LIC_BUSINESS_STATUS, 'number'),
|
||||||
placeholder: '请选择商务状态',
|
placeholder: '请选择商务状态',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
fieldName: 'status',
|
||||||
|
label: '项目状态',
|
||||||
|
rules: 'required',
|
||||||
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
options: getDictOptions(DICT_TYPE.LIC_PROJECT_STATUS, 'number'),
|
||||||
|
placeholder: '请选择项目状态',
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'businessOwner',
|
fieldName: 'businessOwner',
|
||||||
label: '业务负责人',
|
label: '业务负责人',
|
||||||
@@ -153,16 +175,6 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
valueFormat: 'x',
|
valueFormat: 'x',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
fieldName: 'status',
|
|
||||||
label: '项目状态',
|
|
||||||
rules: 'required',
|
|
||||||
component: 'Select',
|
|
||||||
componentProps: {
|
|
||||||
options: getDictOptions(DICT_TYPE.LIC_PROJECT_STATUS, 'number'),
|
|
||||||
placeholder: '请选择项目状态',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
fieldName: 'envInfo',
|
fieldName: 'envInfo',
|
||||||
label: '环境信息',
|
label: '环境信息',
|
||||||
@@ -344,6 +356,11 @@ export function useGridColumns(
|
|||||||
title: '项目编号',
|
title: '项目编号',
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: 'customerName',
|
||||||
|
title: '所属客户',
|
||||||
|
minWidth: 120,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'contractCode',
|
field: 'contractCode',
|
||||||
title: '合同编号',
|
title: '合同编号',
|
||||||
@@ -359,27 +376,27 @@ export function useGridColumns(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'businessOwner',
|
field: 'businessOwnerName',
|
||||||
title: '业务负责人',
|
title: '业务负责人',
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'customerOwner',
|
field: 'customerOwnerName',
|
||||||
title: '客户对接人',
|
title: '客户对接人',
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'technicalOwnerA',
|
field: 'technicalOwnerAName',
|
||||||
title: '技术负责人1',
|
title: '技术负责人1',
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'technicalOwnerB',
|
field: 'technicalOwnerBName',
|
||||||
title: '技术负责人2',
|
title: '技术负责人2',
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'technicalOwnerC',
|
field: 'technicalOwnerCName',
|
||||||
title: '技术负责人3',
|
title: '技术负责人3',
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user