Commit a8aaeab0 authored by TZW's avatar TZW

ccc

parent 557da31f
......@@ -182,7 +182,7 @@ function InitForm(props) {
}}
>
<FormRender
fields={fields.filter((it) => it.valueType != 'option')}
fields={fields?.filter((it) => it.valueType != 'option')}
colProps={colProps}
proformRef={proformRef}
/>
......
......@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-10 09:39:56
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-01-31 15:25:02
* @Last Modified time: 2023-01-31 17:38:49
*/
import * as React from 'react';
......@@ -12,7 +12,18 @@ import AutoTable from '@/components/AutoTable';
import PremButton from '@/components/PremButton';
import getcolumns from './columns';
import { doFetch } from '@/utils/doFetch';
import { message, Dropdown, Menu, Layout, Button, Image, Space, Divider, Tabs } from 'antd';
import {
message,
Dropdown,
Menu,
Layout,
Button,
Image,
Space,
Divider,
Tabs,
Tooltip,
} from 'antd';
import TreeRender from '@/components/TreeRender';
import { ProDescriptions } from '@ant-design/pro-components';
import InitForm from '@/components/InitForm';
......@@ -30,6 +41,7 @@ function Model(props) {
[currDrawer, setCurrDrawer] = useState({
visible: false,
}),
[resumeTab, setresumeTab] = useState(null),
currfields = {
1: [
{
......@@ -549,8 +561,8 @@ function Model(props) {
url: '/asset/equipmentLog/getAllResumeType',
params: { equipmentId: row?.id },
});
console.log(res);
setDrawer((s) => ({
await setresumeTab(res?.data?.dataList);
await setDrawer((s) => ({
...s,
visible: true,
type: 'resume',
......@@ -1499,7 +1511,6 @@ function Model(props) {
const Resume = () => {
const [selectArr, setSelectArr] = useState([]);
const [activeTab, setactiveTab] = useState(1);
useEffect(() => {
const fun = async () => {
const result = await doFetch({
......@@ -1512,363 +1523,520 @@ function Model(props) {
}
};
fun();
let dis = resumeTab?.filter((it) => it?.disabled);
if (dis.length > 0 && dis[0].key == 1) {
setactiveTab(
menulist?.filter((it) => !dis?.map((item) => item.key).includes(it?.key))[0]?.key,
);
} else {
setactiveTab(1);
}
}, []);
const fields = {
1: [
{
title: '改造日期',
dataIndex: 'reformDate',
key: 'reformDate',
valueType: 'date',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
title: '改造承包商',
dataIndex: 'supplierId',
key: 'supplierId',
valueType: 'select',
options: {
path: '/asset/equipmentSupplier/query/selection',
params: {},
const menulist = useMemo(() => {
console.log(activeTab);
const fields = {
1: [
{
title: '改造日期',
dataIndex: 'reformDate',
key: 'reformDate',
valueType: 'date',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
formItemProps: {
rules: [
{
required: true,
message: '此项为必填项',
},
],
{
title: '改造承包商',
dataIndex: 'supplierId',
key: 'supplierId',
valueType: 'select',
options: {
path: '/asset/equipmentSupplier/query/selection',
params: {},
},
formItemProps: {
rules: [
{
required: true,
message: '此项为必填项',
},
],
},
},
},
{
title: '改造内容',
dataIndex: 'reformContent',
key: 'reformContent',
valueType: 'textarea',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
title: '上传文件(上限为5个)',
key: 'urlIds',
valueType: 'UploadDragger',
// colProps: { span: 24 },
fieldProps: {
maxCount: 5,
name: 'file',
{
title: '改造内容',
dataIndex: 'reformContent',
key: 'reformContent',
valueType: 'textarea',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
formItemProps: {
rules: [
{
required: false,
message: '此项为必填项',
},
],
{
title: '上传文件(上限为5个)',
key: 'urlIds',
valueType: 'UploadDragger',
// colProps: { span: 24 },
fieldProps: {
maxCount: 5,
name: 'file',
},
formItemProps: {
rules: [
{
required: false,
message: '此项为必填项',
},
],
},
},
},
],
2: [
{
title: '报废日期',
dataIndex: 'scrapDate',
key: 'scrapDate',
valueType: 'date',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
title: '报废原因',
dataIndex: 'scrapReason',
key: 'scrapReason',
valueType: 'textarea',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
title: '上传文件(上限为5个)',
key: 'urlIds',
valueType: 'UploadDragger',
formItemProps: {
rules: [
{
required: false,
message: '此项为必填项',
},
],
],
2: [
{
title: '报废日期',
dataIndex: 'scrapDate',
key: 'scrapDate',
valueType: 'date',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
fieldProps: {
name: 'file',
maxCount: 5,
{
title: '报废原因',
dataIndex: 'scrapReason',
key: 'scrapReason',
valueType: 'textarea',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
},
],
3: [
{
title: '调入公司',
dataIndex: 'organizationName',
key: 'toOrganizationId',
valueType: 'select',
options: { path: '/auth/sysDepartment/query/organization/selectbox', params: {} },
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
title: '调入部门',
valueType: 'treeSelect',
dataIndex: 'departmentName',
key: 'toDepartmentId',
options: {
path: '/auth/sysDepartment/query/children/tree',
linkParams: {
toOrganizationId: 'parentId',
{
title: '上传文件(上限为5个)',
key: 'urlIds',
valueType: 'UploadDragger',
formItemProps: {
rules: [
{
required: false,
message: '此项为必填项',
},
],
},
fieldProps: {
name: 'file',
maxCount: 5,
},
},
},
{
title: '调入工厂',
dataIndex: 'factoryName',
key: 'toFactoryId',
valueType: 'select',
options: { path: '/auth/sysFactory/getAllFactorySelection', params: {} },
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
title: '调入车间',
dataIndex: 'shopName',
valueType: 'select',
options: {
path: '/auth/sysShop/getShopSelectionByFactory',
linkParams: {
toFactoryId: 'factoryId',
],
3: [
{
title: '调入公司',
dataIndex: 'organizationName',
key: 'toOrganizationId',
valueType: 'select',
options: { path: '/auth/sysDepartment/query/organization/selectbox', params: {} },
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
title: '调入部门',
valueType: 'treeSelect',
dataIndex: 'departmentName',
key: 'toDepartmentId',
options: {
path: '/auth/sysDepartment/query/children/tree',
linkParams: {
toOrganizationId: 'parentId',
},
},
},
key: 'toShopId',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
title: '调入工段',
dataIndex: 'sectionName',
key: 'toSectionId',
valueType: 'select',
options: {
path: '/auth/sysSection/getAllSectionSelectionByShop',
linkParams: {
toShopId: 'shopId',
{
title: '调入工厂',
dataIndex: 'factoryName',
key: 'toFactoryId',
valueType: 'select',
options: { path: '/auth/sysFactory/getAllFactorySelection', params: {} },
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
title: '调入车间',
dataIndex: 'shopName',
valueType: 'select',
options: {
path: '/auth/sysShop/getShopSelectionByFactory',
linkParams: {
toFactoryId: 'factoryId',
},
},
key: 'toShopId',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
},
{
title: '调入产线',
dataIndex: 'productionLines',
valueType: 'select',
key: 'toProductLineId',
options: {
path: '/auth/sysProductionLine/getAllProductLineSelectionByShop',
linkParams: {
toShopId: 'shopId',
{
title: '调入工段',
dataIndex: 'sectionName',
key: 'toSectionId',
valueType: 'select',
options: {
path: '/auth/sysSection/getAllSectionSelectionByShop',
linkParams: {
toShopId: 'shopId',
},
},
},
},
{
title: '调入位置号',
dataIndex: 'toPositionNo',
valueType: 'input',
key: 'toPositionNo',
},
{
title: '调拨日期',
dataIndex: 'transferDate',
key: 'transferDate',
valueType: 'date',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
title: '调拨原因',
dataIndex: 'transferReason',
key: 'transferReason',
valueType: 'textarea',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
],
4: [
{
title: '借用公司',
dataIndex: 'organizationName',
key: 'toOrganizationId',
valueType: 'select',
options: { path: '/auth/sysDepartment/query/organization/selectbox', params: {} },
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
title: '借用部门',
valueType: 'treeSelect',
dataIndex: 'departmentName',
key: 'toDepartmentId',
options: {
path: '/auth/sysDepartment/query/children/tree',
linkParams: {
toOrganizationId: 'parentId',
{
title: '调入产线',
dataIndex: 'productionLines',
valueType: 'select',
key: 'toProductLineId',
options: {
path: '/auth/sysProductionLine/getAllProductLineSelectionByShop',
linkParams: {
toShopId: 'shopId',
},
},
},
},
{
title: '借用工厂',
dataIndex: 'factoryName',
key: 'toFactoryId',
valueType: 'select',
options: { path: '/auth/sysFactory/getAllFactorySelection', params: {} },
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
title: '借用车间',
dataIndex: 'shopName',
valueType: 'select',
options: {
path: '/auth/sysShop/getShopSelectionByFactory',
linkParams: {
toFactoryId: 'factoryId',
{
title: '调入位置号',
dataIndex: 'toPositionNo',
valueType: 'input',
key: 'toPositionNo',
},
{
title: '调拨日期',
dataIndex: 'transferDate',
key: 'transferDate',
valueType: 'date',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
title: '调拨原因',
dataIndex: 'transferReason',
key: 'transferReason',
valueType: 'textarea',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
],
4: [
{
title: '借用公司',
dataIndex: 'organizationName',
key: 'toOrganizationId',
valueType: 'select',
options: { path: '/auth/sysDepartment/query/organization/selectbox', params: {} },
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
title: '借用部门',
valueType: 'treeSelect',
dataIndex: 'departmentName',
key: 'toDepartmentId',
options: {
path: '/auth/sysDepartment/query/children/tree',
linkParams: {
toOrganizationId: 'parentId',
},
},
},
key: 'toShopId',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
title: '借用工段',
dataIndex: 'sectionName',
key: 'toSectionId',
valueType: 'select',
options: {
path: '/auth/sysSection/getAllSectionSelectionByShop',
linkParams: {
toShopId: 'shopId',
{
title: '借用工厂',
dataIndex: 'factoryName',
key: 'toFactoryId',
valueType: 'select',
options: { path: '/auth/sysFactory/getAllFactorySelection', params: {} },
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
title: '借用车间',
dataIndex: 'shopName',
valueType: 'select',
options: {
path: '/auth/sysShop/getShopSelectionByFactory',
linkParams: {
toFactoryId: 'factoryId',
},
},
key: 'toShopId',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
},
{
title: '借用产线',
dataIndex: 'productionLines',
valueType: 'select',
key: 'toProductLineId',
options: {
path: '/auth/sysProductionLine/getAllProductLineSelectionByShop',
linkParams: {
toShopId: 'shopId',
{
title: '借用工段',
dataIndex: 'sectionName',
key: 'toSectionId',
valueType: 'select',
options: {
path: '/auth/sysSection/getAllSectionSelectionByShop',
linkParams: {
toShopId: 'shopId',
},
},
},
},
{
title: '借用位置号',
dataIndex: 'toPositionNo',
valueType: 'input',
key: 'toPositionNo',
},
{
title: '借用日期',
dataIndex: 'borrowDate',
key: 'borrowDate',
valueType: 'date',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
title: '预计归还日期',
dataIndex: 'planReturnDate',
key: 'planReturnDate',
valueType: 'date',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
title: '借用原因',
dataIndex: 'borrowReason',
key: 'borrowReason',
valueType: 'textarea',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
],
5: [
{
title: '接收公司',
dataIndex: 'returnOrganizationId',
key: 'returnOrganizationId',
valueType: 'select',
options: { path: '/auth/sysDepartment/query/organization/selectbox', params: {} },
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
title: '接收部门',
valueType: 'treeSelect',
dataIndex: 'returnDepartmentId',
key: 'returnDepartmentId',
options: {
path: '/auth/sysDepartment/query/children/tree',
linkParams: {
returnOrganizationId: 'parentId',
{
title: '借用产线',
dataIndex: 'productionLines',
valueType: 'select',
key: 'toProductLineId',
options: {
path: '/auth/sysProductionLine/getAllProductLineSelectionByShop',
linkParams: {
toShopId: 'shopId',
},
},
},
},
{
title: '接收工厂',
dataIndex: 'returnFactoryId',
key: 'returnFactoryId',
valueType: 'select',
options: { path: '/auth/sysFactory/getAllFactorySelection', params: {} },
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
title: '接收车间',
dataIndex: 'returnShopId',
valueType: 'select',
options: {
path: '/auth/sysShop/getShopSelectionByFactory',
linkParams: {
returnFactoryId: 'factoryId',
{
title: '借用位置号',
dataIndex: 'toPositionNo',
valueType: 'input',
key: 'toPositionNo',
},
{
title: '借用日期',
dataIndex: 'borrowDate',
key: 'borrowDate',
valueType: 'date',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
title: '预计归还日期',
dataIndex: 'planReturnDate',
key: 'planReturnDate',
valueType: 'date',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
title: '借用原因',
dataIndex: 'borrowReason',
key: 'borrowReason',
valueType: 'textarea',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
],
5: [
{
title: '接收公司',
dataIndex: 'returnOrganizationId',
key: 'returnOrganizationId',
valueType: 'select',
options: { path: '/auth/sysDepartment/query/organization/selectbox', params: {} },
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
title: '接收部门',
valueType: 'treeSelect',
dataIndex: 'returnDepartmentId',
key: 'returnDepartmentId',
options: {
path: '/auth/sysDepartment/query/children/tree',
linkParams: {
returnOrganizationId: 'parentId',
},
},
},
key: 'returnShopId',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
title: '接收工段',
dataIndex: 'returnSectionId',
key: 'returnSectionId',
valueType: 'select',
options: {
path: '/auth/sysSection/getAllSectionSelectionByShop',
linkParams: {
returnShopId: 'shopId',
{
title: '接收工厂',
dataIndex: 'returnFactoryId',
key: 'returnFactoryId',
valueType: 'select',
options: { path: '/auth/sysFactory/getAllFactorySelection', params: {} },
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
title: '接收车间',
dataIndex: 'returnShopId',
valueType: 'select',
options: {
path: '/auth/sysShop/getShopSelectionByFactory',
linkParams: {
returnFactoryId: 'factoryId',
},
},
key: 'returnShopId',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
},
{
title: '接收产线',
dataIndex: 'returnProductLineId',
valueType: 'select',
key: 'returnProductLineId',
options: {
path: '/auth/sysProductionLine/getAllProductLineSelectionByShop',
linkParams: {
returnShopId: 'shopId',
{
title: '接收工段',
dataIndex: 'returnSectionId',
key: 'returnSectionId',
valueType: 'select',
options: {
path: '/auth/sysSection/getAllSectionSelectionByShop',
linkParams: {
returnShopId: 'shopId',
},
},
},
{
title: '接收产线',
dataIndex: 'returnProductLineId',
valueType: 'select',
key: 'returnProductLineId',
options: {
path: '/auth/sysProductionLine/getAllProductLineSelectionByShop',
linkParams: {
returnShopId: 'shopId',
},
},
},
{
title: '接收位置号',
dataIndex: 'returnPositionNo',
valueType: 'input',
key: 'returnPositionNo',
},
{
title: '实际归还日期',
dataIndex: 'realReturnDate',
key: 'realReturnDate',
valueType: 'date',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
title: '备注',
dataIndex: 'remark',
key: 'remark',
valueType: 'textarea',
formItemProps: { rules: [{ required: false, message: '此项为必填项' }] },
},
],
};
let arr = [
{
label: '改造',
key: 1,
children: activeTab == 1 && (
<InitForm
fields={fields[activeTab]}
defaultFormValue={drawer?.item}
onFinish={async (vals) => {
//console.log(vals);
let res = await doFetch({
url: urlParams_resume.save,
params: { ...vals, type: '1', equipmentId: drawer?.item?.id },
});
if (res.code === '0000') {
message.success('登记成功!');
await setDrawer((s) => ({
...s,
visible: false,
item: null,
}));
actionRef.current.reload();
}
}}
/>
),
}, // remember to pass the key prop
{
label: '报废',
key: 2,
children: activeTab == 2 && (
<InitForm
fields={fields[activeTab]}
defaultFormValue={drawer?.item}
onFinish={async (vals) => {
let res = await doFetch({
url: urlParams_resume.save,
params: { ...vals, type: '2', equipmentId: drawer?.item?.id },
});
if (res.code === '0000') {
message.success('登记成功!');
await setDrawer((s) => ({
...s,
visible: false,
item: null,
}));
actionRef.current.reload();
}
}}
/>
),
},
{
label: '调拨',
key: 3,
children: activeTab == 3 && (
<InitForm
fields={fields[activeTab]}
defaultFormValue={drawer?.item}
onFinish={async (vals) => {
//console.log(vals);
let res = await doFetch({
url: urlParams_resume.save,
params: { ...vals, type: '3', equipmentId: drawer?.item?.id },
});
if (res.code === '0000') {
message.success('登记成功!');
await setDrawer((s) => ({
...s,
visible: false,
item: null,
}));
actionRef.current.reload();
}
}}
/>
),
},
{
label: '借用',
key: 4,
children: activeTab == 4 && (
<InitForm
defaultFormValue={drawer?.item}
fields={fields[activeTab]}
onFinish={async (vals) => {
//console.log(vals);
let res = await doFetch({
url: urlParams_resume.save,
params: { ...vals, type: '4', equipmentId: drawer?.item?.id },
});
if (res.code === '0000') {
message.success('登记成功!');
await setDrawer((s) => ({
...s,
visible: false,
item: null,
}));
actionRef.current.reload();
}
}}
/>
),
},
{
label: '归还',
key: 5,
children: activeTab == 5 && (
<InitForm
fields={fields[activeTab]}
defaultFormValue={drawer?.item}
onFinish={async (vals) => {
//console.log(vals);
let res = await doFetch({
url: urlParams_resume.save,
params: { ...vals, type: '5', equipmentId: drawer?.item?.id },
});
if (res.code === '0000') {
message.success('登记成功!');
await setDrawer((s) => ({
...s,
visible: false,
item: null,
}));
actionRef.current.reload();
}
}}
/>
),
},
{
title: '接收位置号',
dataIndex: 'returnPositionNo',
valueType: 'input',
key: 'returnPositionNo',
},
{
title: '实际归还日期',
dataIndex: 'realReturnDate',
key: 'realReturnDate',
valueType: 'date',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
title: '备注',
dataIndex: 'remark',
key: 'remark',
valueType: 'textarea',
formItemProps: { rules: [{ required: false, message: '此项为必填项' }] },
},
],
};
];
let dis = resumeTab?.filter((it) => it?.disabled);
arr.forEach((item) => {
dis?.forEach((it) => {
if (item?.key == it?.key) {
let string = item.label;
item.disabled = true;
item.label = (
<Tooltip placement="topLeft" title={it.disabledReason}>
<span>{string}</span>
</Tooltip>
);
}
});
});
return arr;
}, [activeTab]);
return (
<>
......@@ -1942,141 +2110,7 @@ function Model(props) {
]}
/>
<Divider />
<Tabs
activeKey={activeTab}
onChange={setactiveTab}
items={[
{
label: '改造',
key: 1,
children: activeTab == 1 && (
<InitForm
fields={fields[activeTab]}
defaultFormValue={drawer?.item}
onFinish={async (vals) => {
//console.log(vals);
let res = await doFetch({
url: urlParams_resume.save,
params: { ...vals, type: '1', equipmentId: drawer?.item?.id },
});
if (res.code === '0000') {
message.success('登记成功!');
await setDrawer((s) => ({
...s,
visible: false,
item: null,
}));
actionRef.current.reload();
}
}}
/>
),
}, // remember to pass the key prop
{
label: '报废',
key: 2,
children: activeTab == 2 && (
<InitForm
fields={fields[activeTab]}
defaultFormValue={drawer?.item}
onFinish={async (vals) => {
let res = await doFetch({
url: urlParams_resume.save,
params: { ...vals, type: '2', equipmentId: drawer?.item?.id },
});
if (res.code === '0000') {
message.success('登记成功!');
await setDrawer((s) => ({
...s,
visible: false,
item: null,
}));
actionRef.current.reload();
}
}}
/>
),
},
{
label: '调拨',
key: 3,
children: activeTab == 3 && (
<InitForm
fields={fields[activeTab]}
defaultFormValue={drawer?.item}
onFinish={async (vals) => {
//console.log(vals);
let res = await doFetch({
url: urlParams_resume.save,
params: { ...vals, type: '3', equipmentId: drawer?.item?.id },
});
if (res.code === '0000') {
message.success('登记成功!');
await setDrawer((s) => ({
...s,
visible: false,
item: null,
}));
actionRef.current.reload();
}
}}
/>
),
},
{
label: '借用',
key: 4,
children: activeTab == 4 && (
<InitForm
defaultFormValue={drawer?.item}
fields={fields[activeTab]}
onFinish={async (vals) => {
//console.log(vals);
let res = await doFetch({
url: urlParams_resume.save,
params: { ...vals, type: '4', equipmentId: drawer?.item?.id },
});
if (res.code === '0000') {
message.success('登记成功!');
await setDrawer((s) => ({
...s,
visible: false,
item: null,
}));
actionRef.current.reload();
}
}}
/>
),
},
{
label: '归还',
key: 5,
children: activeTab == 5 && (
<InitForm
fields={fields[activeTab]}
defaultFormValue={drawer?.item}
onFinish={async (vals) => {
//console.log(vals);
let res = await doFetch({
url: urlParams_resume.save,
params: { ...vals, type: '5', equipmentId: drawer?.item?.id },
});
if (res.code === '0000') {
message.success('登记成功!');
await setDrawer((s) => ({
...s,
visible: false,
item: null,
}));
actionRef.current.reload();
}
}}
/>
),
},
]}
/>
<Tabs activeKey={activeTab} onChange={setactiveTab} items={menulist} />
</>
);
};
......
......@@ -3,7 +3,7 @@
* @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-01-31 15:14:34
* @Last Modified time: 2023-01-31 17:43:42
*/
import * as React from 'react';
......@@ -1077,7 +1077,7 @@ function Failure(props) {
valueType: 'radio',
options: [
{ label: '通过', value: '1' },
{ label: '不通过', value: '2' },
{ label: '不通过', value: '0' },
],
formItemProps: {
rules: [
......@@ -1160,7 +1160,7 @@ function Failure(props) {
valueType: 'radio',
options: [
{ label: '通过', value: '1' },
{ label: '不通过', value: '2' },
{ label: '不通过', value: '0' },
],
formItemProps: {
rules: [
......@@ -1240,7 +1240,7 @@ function Failure(props) {
valueType: 'radio',
options: [
{ label: '通过', value: '1' },
{ label: '不通过', value: '2' },
{ label: '不通过', value: '0' },
],
formItemProps: {
rules: [
......@@ -1320,7 +1320,7 @@ function Failure(props) {
valueType: 'radio',
options: [
{ label: '通过', value: '1' },
{ label: '不通过', value: '2' },
{ label: '不通过', value: '0' },
],
formItemProps: {
rules: [
......
......@@ -80,7 +80,7 @@ function getcolumns(setdrawer, bus) {
<span
style={{
color: `${
row.nextTrackDate.valueOf() < dayjs().format('YYYY-MM-DD').valueOf()
row?.nextTrackDate?.valueOf() < dayjs().format('YYYY-MM-DD').valueOf()
? '#f50'
: 'rgba(0, 0, 0, 0.85)'
}`,
......
......@@ -3,7 +3,7 @@
* @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-01-31 09:20:37
* @Last Modified time: 2023-01-31 15:46:59
*/
import * as React from 'react';
......
......@@ -179,6 +179,7 @@ function getcolumns(setDrawer, ifs, formRef) {
width: 120,
valueType: 'treeSelect',
dataIndex: 'departmentName',
search: false,
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
key: 'departmentId',
options: {
......@@ -188,6 +189,22 @@ function getcolumns(setDrawer, ifs, formRef) {
},
},
},
{
title: '部门名称',
width: 120,
valueType: 'select',
dataIndex: 'departmentName',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
key: 'departmentId',
options: {
path: '/auth/sysDepartment/query/all/department/selection',
},
fieldProps: {
showSearch: true,
},
hideInForm: true,
hideInTable: true,
},
{
title: '角色名称',
dataIndex: 'roleNames',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment