fix: 修复可选客户项目;字段名等
This commit is contained in:
@@ -47,6 +47,13 @@ export function getCustomerList() {
|
|||||||
return requestClient.get<CustomerApi.Customer[]>('/license/customer/list');
|
return requestClient.get<CustomerApi.Customer[]>('/license/customer/list');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 查询可选择的客户列表 */
|
||||||
|
export function getLicenseCustomerList() {
|
||||||
|
return requestClient.get<CustomerApi.Customer[]>(
|
||||||
|
'/license/customer/license-list',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/** 查询客户详情 */
|
/** 查询客户详情 */
|
||||||
export function getCustomer(id: number) {
|
export function getCustomer(id: number) {
|
||||||
return requestClient.get<CustomerApi.Customer>(
|
return requestClient.get<CustomerApi.Customer>(
|
||||||
|
|||||||
@@ -43,6 +43,16 @@ export function getProjectList(params: any) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 查询可选择的项目列表 */
|
||||||
|
export function getLicenseProjectList(params: any) {
|
||||||
|
return requestClient.get<ProjectApi.Project[]>(
|
||||||
|
'/license/project/license-list',
|
||||||
|
{
|
||||||
|
params,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/** 查询项目详情 */
|
/** 查询项目详情 */
|
||||||
export function getProject(id: number) {
|
export function getProject(id: number) {
|
||||||
return requestClient.get<ProjectApi.Project>(`/license/project/get?id=${id}`);
|
return requestClient.get<ProjectApi.Project>(`/license/project/get?id=${id}`);
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
"licenseContent": "License Content",
|
"licenseContent": "License Content",
|
||||||
"applicant": "Applicant",
|
"applicant": "Applicant",
|
||||||
"approver": "License Administrator",
|
"approver": "License Administrator",
|
||||||
|
"approverName": "Approver",
|
||||||
|
"approveTime": "Approval Time",
|
||||||
"status": "Status",
|
"status": "Status",
|
||||||
"remark": "Remark",
|
"remark": "Remark",
|
||||||
"creationTime": "Creation Time",
|
"creationTime": "Creation Time",
|
||||||
|
|||||||
@@ -23,6 +23,6 @@
|
|||||||
"progress": "Comment",
|
"progress": "Comment",
|
||||||
"updateTime": "Last Modified Time",
|
"updateTime": "Last Modified Time",
|
||||||
"commentNum": "Comment Count",
|
"commentNum": "Comment Count",
|
||||||
"softwareVersion": "Operating System Platform",
|
"softwareVersion": "Software Version",
|
||||||
"operatingSystem": "Software Version"
|
"operatingSystem": "Operating System Platform"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
"licenseContent": "License内容",
|
"licenseContent": "License内容",
|
||||||
"applicant": "申请人",
|
"applicant": "申请人",
|
||||||
"approver": "License管理员",
|
"approver": "License管理员",
|
||||||
|
"approverName": "审批人",
|
||||||
|
"approveTime": "审批时间",
|
||||||
"status": "状态",
|
"status": "状态",
|
||||||
"remark": "说明",
|
"remark": "说明",
|
||||||
"creationTime": "创建时间",
|
"creationTime": "创建时间",
|
||||||
@@ -35,5 +37,5 @@
|
|||||||
"reapply": "重新申请",
|
"reapply": "重新申请",
|
||||||
"reapplyAction": "重新申请{0}",
|
"reapplyAction": "重新申请{0}",
|
||||||
"history": "历史",
|
"history": "历史",
|
||||||
"applyCount": "申请次数"
|
"applyCount": "license申请次数"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,6 @@
|
|||||||
"progress": "评论",
|
"progress": "评论",
|
||||||
"updateTime": "最后修改时间",
|
"updateTime": "最后修改时间",
|
||||||
"commentNum": "评论数",
|
"commentNum": "评论数",
|
||||||
"softwareVersion": "操作系统平台",
|
"softwareVersion": "软件版本",
|
||||||
"operatingSystem": "软件版本"
|
"operatingSystem": "操作系统平台"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ import { formatDate, formatDateTime } from '@vben/utils';
|
|||||||
import dayjs, { Dayjs } from 'dayjs';
|
import dayjs, { Dayjs } from 'dayjs';
|
||||||
|
|
||||||
import { z } from '#/adapter/form';
|
import { z } from '#/adapter/form';
|
||||||
import { getCustomerList } from '#/api/license/customer';
|
import { getLicenseCustomerList } from '#/api/license/customer';
|
||||||
import { isLicenseSnUnique } from '#/api/license/license';
|
import { isLicenseSnUnique } from '#/api/license/license';
|
||||||
import { getProjectList } from '#/api/license/project';
|
import { getLicenseProjectList } from '#/api/license/project';
|
||||||
import { getLicenseAdminList, getSimpleUserList } from '#/api/system/user';
|
import { getLicenseAdminList, getSimpleUserList } from '#/api/system/user';
|
||||||
import { DictTag } from '#/components/dict-tag';
|
import { DictTag } from '#/components/dict-tag';
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
@@ -46,7 +46,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
},
|
},
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: async () => {
|
api: async () => {
|
||||||
customerList.value = await getCustomerList();
|
customerList.value = await getLicenseCustomerList();
|
||||||
return customerList.value;
|
return customerList.value;
|
||||||
},
|
},
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
@@ -71,7 +71,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
},
|
},
|
||||||
dependencies: {
|
dependencies: {
|
||||||
componentProps: async (values) => {
|
componentProps: async (values) => {
|
||||||
projectList.value = await getProjectList({
|
projectList.value = await getLicenseProjectList({
|
||||||
customerId: values.customerId,
|
customerId: values.customerId,
|
||||||
});
|
});
|
||||||
const hasProject = projectList.value.find((project) => {
|
const hasProject = projectList.value.find((project) => {
|
||||||
@@ -304,12 +304,12 @@ export function useGridColumns(): VxeTableGridOptions<LicenseApi.License>['colum
|
|||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
field: 'customerName',
|
field: 'customerName',
|
||||||
title: $t('license.customer'),
|
title: $t('customer.customerName'),
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'projectName',
|
field: 'projectName',
|
||||||
title: $t('license.project'),
|
title: $t('project.name'),
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -367,7 +367,7 @@ export function useGridColumns(): VxeTableGridOptions<LicenseApi.License>['colum
|
|||||||
{
|
{
|
||||||
field: 'applyCount',
|
field: 'applyCount',
|
||||||
title: $t('license.applyCount'),
|
title: $t('license.applyCount'),
|
||||||
minWidth: 70,
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'operation',
|
field: 'operation',
|
||||||
@@ -384,11 +384,11 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
|||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
field: 'customerName',
|
field: 'customerName',
|
||||||
label: $t('license.customer'),
|
label: $t('customer.customerName'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'projectName',
|
field: 'projectName',
|
||||||
label: $t('license.project'),
|
label: $t('project.name'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'serialNo',
|
field: 'serialNo',
|
||||||
@@ -465,6 +465,11 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
|||||||
return formatDateTime(data?.applicationTime) as string;
|
return formatDateTime(data?.applicationTime) as string;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: 'approverName',
|
||||||
|
label: $t('license.approverName'),
|
||||||
|
hidden: (data) => data.status !== 3,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'status',
|
field: 'status',
|
||||||
label: $t('license.status'),
|
label: $t('license.status'),
|
||||||
|
|||||||
@@ -225,15 +225,6 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
options: getDictOptions(DICT_TYPE.LIC_ENV_INFO, 'number'),
|
options: getDictOptions(DICT_TYPE.LIC_ENV_INFO, 'number'),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
fieldName: 'softwareVersion',
|
|
||||||
label: $t('project.softwareVersion'),
|
|
||||||
rules: 'required',
|
|
||||||
component: 'Select',
|
|
||||||
componentProps: {
|
|
||||||
options: getDictOptions(DICT_TYPE.LIC_SOFTWARE_VERSION, 'number'),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
fieldName: 'operatingSystem',
|
fieldName: 'operatingSystem',
|
||||||
label: $t('project.operatingSystem'),
|
label: $t('project.operatingSystem'),
|
||||||
@@ -243,6 +234,15 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
options: getDictOptions(DICT_TYPE.LIC_OPERATING_SYSTEM, 'number'),
|
options: getDictOptions(DICT_TYPE.LIC_OPERATING_SYSTEM, 'number'),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
fieldName: 'softwareVersion',
|
||||||
|
label: $t('project.softwareVersion'),
|
||||||
|
rules: 'required',
|
||||||
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
options: getDictOptions(DICT_TYPE.LIC_SOFTWARE_VERSION, 'number'),
|
||||||
|
},
|
||||||
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -409,7 +409,7 @@ export function useGridColumns(
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'customerName',
|
field: 'customerName',
|
||||||
title: $t('project.belongCustomer'),
|
title: $t('customer.customerName'),
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -490,16 +490,6 @@ export function useGridColumns(
|
|||||||
props: { type: DICT_TYPE.LIC_ENV_INFO },
|
props: { type: DICT_TYPE.LIC_ENV_INFO },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
field: 'softwareVersion',
|
|
||||||
title: $t('project.softwareVersion'),
|
|
||||||
visible: false,
|
|
||||||
minWidth: 120,
|
|
||||||
cellRender: {
|
|
||||||
name: 'CellDict',
|
|
||||||
props: { type: DICT_TYPE.LIC_SOFTWARE_VERSION },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
field: 'operatingSystem',
|
field: 'operatingSystem',
|
||||||
title: $t('project.operatingSystem'),
|
title: $t('project.operatingSystem'),
|
||||||
@@ -510,6 +500,16 @@ export function useGridColumns(
|
|||||||
props: { type: DICT_TYPE.LIC_OPERATING_SYSTEM },
|
props: { type: DICT_TYPE.LIC_OPERATING_SYSTEM },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: 'softwareVersion',
|
||||||
|
title: $t('project.softwareVersion'),
|
||||||
|
visible: false,
|
||||||
|
minWidth: 120,
|
||||||
|
cellRender: {
|
||||||
|
name: 'CellDict',
|
||||||
|
props: { type: DICT_TYPE.LIC_SOFTWARE_VERSION },
|
||||||
|
},
|
||||||
|
},
|
||||||
// {
|
// {
|
||||||
// field: 'remark',
|
// field: 'remark',
|
||||||
// title: $t('project.remarks'),
|
// title: $t('project.remarks'),
|
||||||
@@ -524,7 +524,7 @@ export function useGridColumns(
|
|||||||
{
|
{
|
||||||
field: 'applyCount',
|
field: 'applyCount',
|
||||||
title: $t('license.applyCount'),
|
title: $t('license.applyCount'),
|
||||||
minWidth: 70,
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'updateTime',
|
field: 'updateTime',
|
||||||
|
|||||||
Reference in New Issue
Block a user