Commit 7c22521b authored by TZW's avatar TZW

bug

parent 2b93e5dc
...@@ -125,7 +125,12 @@ export default (props) => { ...@@ -125,7 +125,12 @@ export default (props) => {
<div style={{ fontSize: 16, fontWeight: 500 }}>{props.pagetitle}</div> <div style={{ fontSize: 16, fontWeight: 500 }}>{props.pagetitle}</div>
<div className="center">{renderextra()}</div> <div className="center">{renderextra()}</div>
</div> </div>
<Tabs items={items} onChange={props.onTabChange} activeTabKey={props.activeTabKey} /> <Tabs
items={items}
onChange={props.onTabChange}
destroyInactiveTabPane
activeTabKey={props.activeTabKey}
/>
</div> </div>
)} )}
</div> </div>
......
...@@ -7,7 +7,6 @@ import { doFetch } from '@/utils/doFetch'; ...@@ -7,7 +7,6 @@ import { doFetch } from '@/utils/doFetch';
const EditTable = (props) => { const EditTable = (props) => {
const { const {
actionRef, //表格动作
formRef, //表单Ref formRef, //表单Ref
rowKey, // key rowKey, // key
columns = [], //columns columns = [], //columns
...@@ -22,7 +21,7 @@ const EditTable = (props) => { ...@@ -22,7 +21,7 @@ const EditTable = (props) => {
dataSource, dataSource,
} = props; } = props;
const actionRefs = actionRef ?? useRef(), let actionRefs = useRef(),
formRefs = formRef ?? useRef(), formRefs = formRef ?? useRef(),
ifspagination = pagination == 'false' || pagination === false, ifspagination = pagination == 'false' || pagination === false,
[size, setsize] = useState('small'); [size, setsize] = useState('small');
......
...@@ -1578,7 +1578,7 @@ function TableSelect({ item, value, onChange, params = {} }) { ...@@ -1578,7 +1578,7 @@ function TableSelect({ item, value, onChange, params = {} }) {
const rowKey = item?.rowKey ?? 'id'; const rowKey = item?.rowKey ?? 'id';
const [chooses, setchooses] = useState([]); //mark 标记 const [chooses, setchooses] = useState([]); //mark 标记
const [activetab, setactivetab] = useState(1); const [activetab, setactivetab] = useState(1);
const actionRef = useRef(); let actionRef = useRef();
const menu = (selectedRows) => ( const menu = (selectedRows) => (
<Menu <Menu
......
...@@ -14,6 +14,7 @@ import styles from './index.less'; ...@@ -14,6 +14,7 @@ import styles from './index.less';
import FormItems from './FormItems'; import FormItems from './FormItems';
import ExtendField from '@/components/ExtendField'; import ExtendField from '@/components/ExtendField';
import { Input, Col } from 'antd'; import { Input, Col } from 'antd';
import { useDebounceFn } from 'ahooks';
function upperCase(str) { function upperCase(str) {
const newStr = str.slice(0, 1).toUpperCase() + str.slice(1); const newStr = str.slice(0, 1).toUpperCase() + str.slice(1);
...@@ -115,13 +116,14 @@ function InitForm(props) { ...@@ -115,13 +116,14 @@ function InitForm(props) {
style = {}, style = {},
} = props; } = props;
const { run } = useDebounceFn(onFinish, { wait: 400 });
let proformRef = useRef(); let proformRef = useRef();
proformRef = formRef ?? proformRef; proformRef = formRef ?? proformRef;
return ( return (
<ProForm <ProForm
style={{ overflow: 'hidden', ...style }} style={{ overflow: 'hidden', ...style }}
formRef={proformRef} formRef={proformRef}
onFinish={onFinish} onFinish={run}
formKey={formKey ?? parseInt(Math.random() * 1000000)} formKey={formKey ?? parseInt(Math.random() * 1000000)}
params={params} params={params}
submitter={submitter ?? true} submitter={submitter ?? true}
......
...@@ -14,6 +14,7 @@ function treeForeach(tree, func) { ...@@ -14,6 +14,7 @@ function treeForeach(tree, func) {
} }
const TagView = ({ children, home }) => { const TagView = ({ children, home }) => {
console.log(children, home);
const [tagList, setTagList] = useState([]); const [tagList, setTagList] = useState([]);
const [currentPath, setCurrentPath] = useState(); const [currentPath, setCurrentPath] = useState();
...@@ -61,6 +62,7 @@ const TagView = ({ children, home }) => { ...@@ -61,6 +62,7 @@ const TagView = ({ children, home }) => {
} }
// 判断是否已打开过该页面 // 判断是否已打开过该页面
let hasOpen = false; let hasOpen = false;
console.log('routeContext', routeContext, 'tagList', tagList);
if (currentMenu.path) { if (currentMenu.path) {
const tagsCopy = tagList.map((item) => { const tagsCopy = tagList.map((item) => {
if (currentMenu?.path === item.path) { if (currentMenu?.path === item.path) {
...@@ -85,6 +87,7 @@ const TagView = ({ children, home }) => { ...@@ -85,6 +87,7 @@ const TagView = ({ children, home }) => {
active: true, active: true,
}); });
} }
return setTagList(tagsCopy); return setTagList(tagsCopy);
} }
}; };
......
...@@ -11,7 +11,7 @@ const clearCache = () => { ...@@ -11,7 +11,7 @@ const clearCache = () => {
caches caches
.keys() .keys()
.then((keys) => { .then((keys) => {
keys.forEach?.((key) => { keys?.forEach?.((key) => {
caches.delete(key); caches.delete(key);
}); });
}) })
......
...@@ -8,7 +8,7 @@ import getcolumns from './columns'; ...@@ -8,7 +8,7 @@ import getcolumns from './columns';
import { useRequest } from 'ahooks'; import { useRequest } from 'ahooks';
import { doFetch } from '@/utils/doFetch'; import { doFetch } from '@/utils/doFetch';
function Order(props) { function Order(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
open: false, open: false,
...@@ -178,8 +178,8 @@ function Order(props) { ...@@ -178,8 +178,8 @@ function Order(props) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimes', key: 'createTime',
}, },
{ {
title: '工单状态', title: '工单状态',
......
...@@ -12,7 +12,7 @@ import { doFetch } from '@/utils/doFetch'; ...@@ -12,7 +12,7 @@ import { doFetch } from '@/utils/doFetch';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import InitForm from '@/components/InitForm'; import InitForm from '@/components/InitForm';
function Plan(props) { function Plan(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
open: false, open: false,
...@@ -323,8 +323,8 @@ function Plan(props) { ...@@ -323,8 +323,8 @@ function Plan(props) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimes', key: 'createTime',
}, },
{ {
title: '状态', title: '状态',
......
...@@ -8,161 +8,166 @@ import { useRequest } from 'ahooks'; ...@@ -8,161 +8,166 @@ import { useRequest } from 'ahooks';
import { doFetch } from '@/utils/doFetch'; import { doFetch } from '@/utils/doFetch';
function Project({ equipmentCheckStandardId }) { function Project({ equipmentCheckStandardId }) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
open: false, open: false,
}); });
const pathconfig = useMemo(() => { const pathconfig = useMemo(() => {
let pathconf = procolumns(setdrawer)?.pathconfig ?? {}; let pathconf = procolumns(setdrawer)?.pathconfig ?? {};
return pathconf; return pathconf;
}, []); }, []);
const { run, loading, runAsync } = useRequest(doFetch, { const { run, loading, runAsync } = useRequest(doFetch, {
manual: true, manual: true,
onSuccess: (res, params) => { onSuccess: (res, params) => {
if (res?.code == '0000') { if (res?.code == '0000') {
actionRef?.current?.reload(); actionRef?.current?.reload();
setdrawer((s) => ({ setdrawer((s) => ({
...s, ...s,
open: false, open: false,
})); }));
} }
}, },
}); });
const detail = (text, row, _, action) => {
return (
<PremButton
btn={{
size: 'small',
type: 'link',
onClick: () => {
setdrawer((s) => ({
...s,
open: true,
item: row,
title: '详情',
val: 'detail',
title: '详细信息',
}));
},
}}
>
详情
</PremButton>
);
};
const edit = (text, row, _, action) => { const detail = (text, row, _, action) => {
return ( return (
<PremButton <PremButton
btn={{ btn={{
size: 'small', size: 'small',
onClick: () => { type: 'link',
setdrawer((s) => ({ onClick: () => {
...s, setdrawer((s) => ({
open: true, ...s,
item: row, open: true,
title: '编辑', item: row,
val: 'edit', title: '详情',
id: row?.id val: 'detail',
})); title: '详细信息',
}, }));
}} },
> }}
编辑 >
</PremButton> 详情
); </PremButton>
}; );
};
const remove = (text, row, _, action) => {
return (
<PremButton
pop={{
title: '是否删除?',
okText: '确认',
cancelText: '取消',
onConfirm: async () => {
await runAsync({ url: pathconfig?.delete || '/delete', params: { id: row?.id } });
},
}}
btn={{
size: 'small',
type: 'danger',
}}
>
删除
</PremButton>
);
};
const columns = useMemo(() => { const edit = (text, row, _, action) => {
let defcolumn = procolumns(drawer?.id)?.columns; return (
return defcolumn.concat({ <PremButton
title: '操作', btn={{
valueType: 'option', size: 'small',
width: 150, onClick: () => {
render: (text, row, _, action) => [ setdrawer((s) => ({
pathconfig?.enableedit && edit(text, row, _, action), ...s,
pathconfig?.enabledelete && remove(text, row, _, action), open: true,
], item: row,
}); title: '编辑',
}, [drawer?.id]); val: 'edit',
id: row?.id,
}));
},
}}
>
编辑
</PremButton>
);
};
const remove = (text, row, _, action) => {
return ( return (
<div style={{ position: 'relative' }}> <PremButton
<AutoTable pop={{
columns={columns} title: '是否删除?',
actionRef={actionRef} okText: '确认',
path={pathconfig?.list || '/ngic-auth/sysUser/query/page'} cancelText: '取消',
pageextra={pathconfig?.enableadd ? 'add' : null} onConfirm: async () => {
resizeable={false} await runAsync({ url: pathconfig?.delete || '/delete', params: { id: row?.id } });
addconfig={{ },
// access: 'sysDepartment_save', }}
btn: { btn={{
type: 'primary', size: 'small',
disabled: false, type: 'danger',
onClick: () => { }}
setdrawer((s) => ({ >
...s, 删除
open: true, </PremButton>
item: null, );
title: '新增', };
val: 'add',
id: null
})); const columns = useMemo(() => {
}, let defcolumn = procolumns(drawer?.id)?.columns;
}, return defcolumn.concat({
}} title: '操作',
extraparams={{ equipmentCheckStandardId }} valueType: 'option',
/> width: 150,
render: (text, row, _, action) => [
pathconfig?.enableedit && edit(text, row, _, action),
pathconfig?.enabledelete && remove(text, row, _, action),
],
});
}, [drawer?.id]);
<ModalPro return (
fields={columns} <div style={{ position: 'relative' }}>
params={{ id: drawer?.item?.id }} <AutoTable
formRef={formRef} columns={columns}
placement="right" actionRef={actionRef}
detailpath={pathconfig?.detail || null} path={pathconfig?.list || '/ngic-auth/sysUser/query/page'}
detailData={drawer?.item} pageextra={pathconfig?.enableadd ? 'add' : null}
defaultFormValue={drawer?.item} resizeable={false}
onClose={() => { addconfig={{
setdrawer((s) => ({ // access: 'sysDepartment_save',
...s, btn: {
open: false, type: 'primary',
})); disabled: false,
}} onClick: () => {
{...drawer} setdrawer((s) => ({
onFinish={async (vals) => { ...s,
if (drawer?.val == 'add') { open: true,
await runAsync({ url: pathconfig?.add || '/add', params: { ...vals, equipmentCheckStandardId } }); item: null,
} else if (drawer?.val == 'edit') { title: '新增',
await runAsync({ url: pathconfig?.edit || '/edit', params: { ...vals, id: drawer?.item?.id, equipmentCheckStandardId } }); val: 'add',
} id: null,
}} }));
/> },
</div> },
); }}
extraparams={{ equipmentCheckStandardId }}
/>
<ModalPro
fields={columns}
params={{ id: drawer?.item?.id }}
formRef={formRef}
placement="right"
detailpath={pathconfig?.detail || null}
detailData={drawer?.item}
defaultFormValue={drawer?.item}
onClose={() => {
setdrawer((s) => ({
...s,
open: false,
}));
}}
{...drawer}
onFinish={async (vals) => {
if (drawer?.val == 'add') {
await runAsync({
url: pathconfig?.add || '/add',
params: { ...vals, equipmentCheckStandardId },
});
} else if (drawer?.val == 'edit') {
await runAsync({
url: pathconfig?.edit || '/edit',
params: { ...vals, id: drawer?.item?.id, equipmentCheckStandardId },
});
}
}}
/>
</div>
);
} }
export default Project; export default Project;
\ No newline at end of file
...@@ -6,9 +6,9 @@ import PremButton from '@/components/PremButton'; ...@@ -6,9 +6,9 @@ import PremButton from '@/components/PremButton';
import getcolumns from './columns'; import getcolumns from './columns';
import { useRequest } from 'ahooks'; import { useRequest } from 'ahooks';
import { doFetch } from '@/utils/doFetch'; import { doFetch } from '@/utils/doFetch';
import Project from "./Project"; import Project from './Project';
function Standard(props) { function Standard(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
open: false, open: false,
...@@ -65,7 +65,7 @@ function Standard(props) { ...@@ -65,7 +65,7 @@ function Standard(props) {
item: row, item: row,
title: '编辑', title: '编辑',
val: 'edit', val: 'edit',
id: row?.id id: row?.id,
})); }));
}, },
}} }}
...@@ -86,7 +86,7 @@ function Standard(props) { ...@@ -86,7 +86,7 @@ function Standard(props) {
item: row, item: row,
title: '点检项目', title: '点检项目',
val: 'detailaddon', val: 'detailaddon',
id: row?.id id: row?.id,
})); }));
}, },
}} }}
...@@ -153,8 +153,7 @@ function Standard(props) { ...@@ -153,8 +153,7 @@ function Standard(props) {
item: null, item: null,
title: '新增', title: '新增',
val: 'add', val: 'add',
id: null id: null,
})); }));
}, },
}, },
...@@ -180,7 +179,10 @@ function Standard(props) { ...@@ -180,7 +179,10 @@ function Standard(props) {
if (drawer?.val == 'add') { if (drawer?.val == 'add') {
await runAsync({ url: pathconfig?.add || '/add', params: { ...vals } }); await runAsync({ url: pathconfig?.add || '/add', params: { ...vals } });
} else if (drawer?.val == 'edit') { } else if (drawer?.val == 'edit') {
await runAsync({ url: pathconfig?.edit || '/edit', params: { ...vals, id: drawer?.item?.id } }); await runAsync({
url: pathconfig?.edit || '/edit',
params: { ...vals, id: drawer?.item?.id },
});
} }
}} }}
> >
...@@ -190,4 +192,4 @@ function Standard(props) { ...@@ -190,4 +192,4 @@ function Standard(props) {
); );
} }
export default Standard; export default Standard;
\ No newline at end of file
...@@ -10,7 +10,7 @@ import { useRequest } from 'ahooks'; ...@@ -10,7 +10,7 @@ import { useRequest } from 'ahooks';
import { doFetch } from '@/utils/doFetch'; import { doFetch } from '@/utils/doFetch';
function Task(props) { function Task(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
open: false, open: false,
...@@ -251,8 +251,8 @@ function Task(props) { ...@@ -251,8 +251,8 @@ function Task(props) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimes', key: 'createTime',
}, },
{ {
title: '工单状态', title: '工单状态',
...@@ -355,8 +355,8 @@ function Task(props) { ...@@ -355,8 +355,8 @@ function Task(props) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimes', key: 'createTime',
}, },
{ {
title: '工单状态', title: '工单状态',
......
...@@ -37,7 +37,7 @@ function Model(props) { ...@@ -37,7 +37,7 @@ function Model(props) {
// Can not select days before today and today // Can not select days before today and today
return current && current > dayjs().endOf('day'); return current && current > dayjs().endOf('day');
}; };
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(), formRef = useRef(),
[drawer, setDrawer] = useState({ [drawer, setDrawer] = useState({
visible: false, visible: false,
......
...@@ -15,7 +15,7 @@ import { doFetch } from '@/utils/doFetch'; ...@@ -15,7 +15,7 @@ import { doFetch } from '@/utils/doFetch';
import { message } from 'antd'; import { message } from 'antd';
function Model(props) { function Model(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setDrawer] = useState({ const [drawer, setDrawer] = useState({
visible: false, visible: false,
......
...@@ -18,7 +18,7 @@ import { Image, message, Divider } from 'antd'; ...@@ -18,7 +18,7 @@ import { Image, message, Divider } from 'antd';
import { ProDescriptions } from '@ant-design/pro-components'; import { ProDescriptions } from '@ant-design/pro-components';
function Supplier(props) { function Supplier(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setDrawer] = useState({ const [drawer, setDrawer] = useState({
visible: false, visible: false,
...@@ -293,7 +293,7 @@ function Supplier(props) { ...@@ -293,7 +293,7 @@ function Supplier(props) {
); );
}; };
const columns = useMemo(() => { const columns = useMemo(() => {
let defcolumn = getcolumns(false,actionRef); let defcolumn = getcolumns(false, actionRef);
defcolumn[1].render = (text, row) => { defcolumn[1].render = (text, row) => {
return ( return (
<a <a
......
...@@ -15,7 +15,7 @@ import { doFetch } from '@/utils/doFetch'; ...@@ -15,7 +15,7 @@ import { doFetch } from '@/utils/doFetch';
import { message } from 'antd'; import { message } from 'antd';
function Type(props) { function Type(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setDrawer] = useState({ const [drawer, setDrawer] = useState({
visible: false, visible: false,
......
...@@ -8,7 +8,7 @@ import { useRequest } from 'ahooks'; ...@@ -8,7 +8,7 @@ import { useRequest } from 'ahooks';
import { doFetch } from '@/utils/doFetch'; import { doFetch } from '@/utils/doFetch';
function Project({ equipmentMaintainStandardId }) { function Project({ equipmentMaintainStandardId }) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
open: false, open: false,
......
...@@ -16,7 +16,7 @@ import { doFetch } from '@/utils/doFetch'; ...@@ -16,7 +16,7 @@ import { doFetch } from '@/utils/doFetch';
import Project from './Project'; import Project from './Project';
function Criterion(props) { function Criterion(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
open: false, open: false,
......
...@@ -9,7 +9,7 @@ import { doFetch } from '@/utils/doFetch'; ...@@ -9,7 +9,7 @@ import { doFetch } from '@/utils/doFetch';
import DetailNode from '@/components/DetailNode'; import DetailNode from '@/components/DetailNode';
import getDetailColumns from '../workOrder/detailColumns'; import getDetailColumns from '../workOrder/detailColumns';
function Orders(props) { function Orders(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
open: false, open: false,
...@@ -168,8 +168,8 @@ function Orders(props) { ...@@ -168,8 +168,8 @@ function Orders(props) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimes', key: 'createTime',
}, },
{ {
title: '工单状态', title: '工单状态',
......
...@@ -18,7 +18,7 @@ import dayjs from 'dayjs'; ...@@ -18,7 +18,7 @@ import dayjs from 'dayjs';
import { doFetch } from '@/utils/doFetch'; import { doFetch } from '@/utils/doFetch';
import InitForm from '@/components/InitForm'; import InitForm from '@/components/InitForm';
function Plan(props) { function Plan(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
open: false, open: false,
...@@ -270,8 +270,8 @@ function Plan(props) { ...@@ -270,8 +270,8 @@ function Plan(props) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimes', key: 'createTime',
}, },
{ {
title: '状态', title: '状态',
......
...@@ -23,7 +23,7 @@ import DetailNode from '@/components/DetailNode'; ...@@ -23,7 +23,7 @@ import DetailNode from '@/components/DetailNode';
function WorkOrder(props) { function WorkOrder(props) {
const { initialState, setInitialState } = useModel('@@initialState'); const { initialState, setInitialState } = useModel('@@initialState');
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
open: false, open: false,
...@@ -273,8 +273,8 @@ function WorkOrder(props) { ...@@ -273,8 +273,8 @@ function WorkOrder(props) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimes', key: 'createTime',
}, },
{ {
title: '工单状态', title: '工单状态',
...@@ -615,8 +615,8 @@ function WorkOrder(props) { ...@@ -615,8 +615,8 @@ function WorkOrder(props) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimes', key: 'createTime',
}, },
{ {
title: '工单状态', title: '工单状态',
...@@ -642,8 +642,8 @@ function WorkOrder(props) { ...@@ -642,8 +642,8 @@ function WorkOrder(props) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimes', key: 'createTime',
}, },
{ {
title: '工单状态', title: '工单状态',
......
...@@ -17,7 +17,7 @@ import Addform from '@/components/Addform'; ...@@ -17,7 +17,7 @@ import Addform from '@/components/Addform';
import Detail from '@/components/RepaireDetail/Detail'; import Detail from '@/components/RepaireDetail/Detail';
function Failure(props) { function Failure(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
open: false, open: false,
...@@ -116,8 +116,8 @@ function Failure(props) { ...@@ -116,8 +116,8 @@ function Failure(props) {
return [ return [
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimes', key: 'createTime',
}, },
{ {
title: '工单状态', title: '工单状态',
...@@ -134,8 +134,8 @@ function Failure(props) { ...@@ -134,8 +134,8 @@ function Failure(props) {
return [ return [
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimes', key: 'createTime',
}, },
{ {
title: '工单状态', title: '工单状态',
......
...@@ -29,7 +29,7 @@ const pathconfig = { ...@@ -29,7 +29,7 @@ const pathconfig = {
}; };
function Fault(props) { function Fault(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
open: false, open: false,
......
...@@ -21,7 +21,7 @@ import Detail from '@/components/RepaireDetail/Detail'; ...@@ -21,7 +21,7 @@ import Detail from '@/components/RepaireDetail/Detail';
import { useModel } from '@umijs/max'; import { useModel } from '@umijs/max';
function Failure(props) { function Failure(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const { initialState, error, refresh, setInitialState } = useModel('@@initialState'); const { initialState, error, refresh, setInitialState } = useModel('@@initialState');
console.log(initialState); console.log(initialState);
...@@ -1453,8 +1453,8 @@ function Failure(props) { ...@@ -1453,8 +1453,8 @@ function Failure(props) {
return [ return [
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimes', key: 'createTime',
}, },
{ {
title: '工单状态', title: '工单状态',
...@@ -1481,8 +1481,8 @@ function Failure(props) { ...@@ -1481,8 +1481,8 @@ function Failure(props) {
return [ return [
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimes', key: 'createTime',
}, },
{ {
title: '工单状态', title: '工单状态',
......
...@@ -70,7 +70,7 @@ function getcolumns(setdrawer, bus) { ...@@ -70,7 +70,7 @@ function getcolumns(setdrawer, bus) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimeList', key: 'createTimeList',
valueType: 'dateTimeRange', valueType: 'dateTimeRange',
fieldProps: { fieldProps: {
...@@ -178,7 +178,7 @@ function getcolumns(setdrawer, bus) { ...@@ -178,7 +178,7 @@ function getcolumns(setdrawer, bus) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimeList', key: 'createTimeList',
valueType: 'dateTimeRange', valueType: 'dateTimeRange',
fieldProps: { fieldProps: {
...@@ -286,7 +286,7 @@ function getcolumns(setdrawer, bus) { ...@@ -286,7 +286,7 @@ function getcolumns(setdrawer, bus) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimeList', key: 'createTimeList',
valueType: 'dateTimeRange', valueType: 'dateTimeRange',
fieldProps: { fieldProps: {
......
...@@ -21,7 +21,7 @@ import Detail from '@/components/RepaireDetail/Detail'; ...@@ -21,7 +21,7 @@ import Detail from '@/components/RepaireDetail/Detail';
import { useModel } from '@umijs/max'; import { useModel } from '@umijs/max';
function Failure(props) { function Failure(props) {
const { initialState, setInitialState } = useModel('@@initialState'); const { initialState, setInitialState } = useModel('@@initialState');
const actionRef = useRef(), let actionRef = useRef(),
containderef = useRef(), containderef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
...@@ -457,8 +457,8 @@ function Failure(props) { ...@@ -457,8 +457,8 @@ function Failure(props) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimes', key: 'createTime',
}, },
{ {
title: '工单状态', title: '工单状态',
...@@ -495,8 +495,8 @@ function Failure(props) { ...@@ -495,8 +495,8 @@ function Failure(props) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimes', key: 'createTime',
}, },
{ {
title: '工单状态', title: '工单状态',
......
...@@ -178,9 +178,9 @@ function getcolumns(setdrawer, bus) { ...@@ -178,9 +178,9 @@ function getcolumns(setdrawer, bus) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
valueType: 'dateTimeRange', valueType: 'dateTimeRange',
key: 'createTimes', key: 'createTime',
fieldProps: { fieldProps: {
showTime: { showTime: {
format: 'HH:mm', format: 'HH:mm',
...@@ -273,7 +273,7 @@ function getcolumns(setdrawer, bus) { ...@@ -273,7 +273,7 @@ function getcolumns(setdrawer, bus) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimeList', key: 'createTimeList',
valueType: 'dateTimeRange', valueType: 'dateTimeRange',
fieldProps: { fieldProps: {
......
...@@ -18,7 +18,7 @@ import OrderHandle from './RepairOrderHandle'; ...@@ -18,7 +18,7 @@ import OrderHandle from './RepairOrderHandle';
import { message } from 'antd'; import { message } from 'antd';
import Detail from '@/components/RepaireDetail/Detail'; import Detail from '@/components/RepaireDetail/Detail';
function Platform(props) { function Platform(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
open: false, open: false,
...@@ -313,8 +313,8 @@ function Platform(props) { ...@@ -313,8 +313,8 @@ function Platform(props) {
basecolumns={[ basecolumns={[
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimes', key: 'createTime',
}, },
{ {
title: '工单状态', title: '工单状态',
...@@ -356,8 +356,8 @@ function Platform(props) { ...@@ -356,8 +356,8 @@ function Platform(props) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimes', key: 'createTime',
}, },
{ {
title: '工单状态', title: '工单状态',
...@@ -404,8 +404,8 @@ function Platform(props) { ...@@ -404,8 +404,8 @@ function Platform(props) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimes', key: 'createTime',
}, },
{ {
title: '工单状态', title: '工单状态',
......
...@@ -49,7 +49,7 @@ function getcolumns(setdrawer, bus) { ...@@ -49,7 +49,7 @@ function getcolumns(setdrawer, bus) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimeList', key: 'createTimeList',
valueType: 'dateTimeRange', valueType: 'dateTimeRange',
fieldProps: { fieldProps: {
...@@ -184,7 +184,7 @@ function getcolumns(setdrawer, bus) { ...@@ -184,7 +184,7 @@ function getcolumns(setdrawer, bus) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimeList', key: 'createTimeList',
valueType: 'dateTimeRange', valueType: 'dateTimeRange',
fieldProps: { fieldProps: {
...@@ -292,7 +292,7 @@ function getcolumns(setdrawer, bus) { ...@@ -292,7 +292,7 @@ function getcolumns(setdrawer, bus) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimeList', key: 'createTimeList',
valueType: 'dateTimeRange', valueType: 'dateTimeRange',
fieldProps: { fieldProps: {
......
...@@ -22,7 +22,7 @@ import OrderHandle from '../platform/RepairOrderHandle'; ...@@ -22,7 +22,7 @@ import OrderHandle from '../platform/RepairOrderHandle';
import { useModel } from '@umijs/max'; import { useModel } from '@umijs/max';
function Failure(props) { function Failure(props) {
const { initialState, setInitialState } = useModel('@@initialState'); const { initialState, setInitialState } = useModel('@@initialState');
const actionRef = useRef(), let actionRef = useRef(),
containderef = useRef(), containderef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
...@@ -575,8 +575,8 @@ function Failure(props) { ...@@ -575,8 +575,8 @@ function Failure(props) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimes', key: 'createTime',
}, },
{ {
title: '工单状态', title: '工单状态',
...@@ -618,8 +618,8 @@ function Failure(props) { ...@@ -618,8 +618,8 @@ function Failure(props) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimes', key: 'createTime',
}, },
{ {
title: '工单状态', title: '工单状态',
......
...@@ -15,7 +15,7 @@ import { doFetch } from '@/utils/doFetch'; ...@@ -15,7 +15,7 @@ import { doFetch } from '@/utils/doFetch';
import { message } from 'antd'; import { message } from 'antd';
function Factory(props) { function Factory(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setDrawer] = useState({ const [drawer, setDrawer] = useState({
visible: false, visible: false,
......
...@@ -14,7 +14,7 @@ import { doFetch } from '@/utils/doFetch'; ...@@ -14,7 +14,7 @@ import { doFetch } from '@/utils/doFetch';
import { message } from 'antd'; import { message } from 'antd';
function Type(props) { function Type(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setDrawer] = useState({ const [drawer, setDrawer] = useState({
visible: false, visible: false,
......
...@@ -15,7 +15,7 @@ import { doFetch } from '@/utils/doFetch'; ...@@ -15,7 +15,7 @@ import { doFetch } from '@/utils/doFetch';
import { message } from 'antd'; import { message } from 'antd';
function Section(props) { function Section(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
visible: false, visible: false,
......
...@@ -17,7 +17,7 @@ import { Drawer } from 'antd'; ...@@ -17,7 +17,7 @@ import { Drawer } from 'antd';
import PermissionTree from '@/components/PermissionTree/Permissiontree'; import PermissionTree from '@/components/PermissionTree/Permissiontree';
function Role(props) { function Role(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setDrawer] = useState({ const [drawer, setDrawer] = useState({
visible: false, visible: false,
......
...@@ -15,7 +15,7 @@ import { doFetch } from '@/utils/doFetch'; ...@@ -15,7 +15,7 @@ import { doFetch } from '@/utils/doFetch';
import { message } from 'antd'; import { message } from 'antd';
function Section(props) { function Section(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
visible: false, visible: false,
......
...@@ -9,10 +9,12 @@ function getcolumns(setDrawer, ifs, formRef) { ...@@ -9,10 +9,12 @@ function getcolumns(setDrawer, ifs, formRef) {
// })); // }));
return [ return [
{ {
title: '用户名', title: '用户名-姓名',
dataIndex: 'username', dataIndex: 'username',
width: 120, width: 120,
key: 'username', key: 'username',
hideInTable: true,
search: false,
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] }, formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
fieldProps: { fieldProps: {
placeholder: '请输入', placeholder: '请输入',
...@@ -26,6 +28,14 @@ function getcolumns(setDrawer, ifs, formRef) { ...@@ -26,6 +28,14 @@ function getcolumns(setDrawer, ifs, formRef) {
}, },
disabled: ifs, disabled: ifs,
}, },
{
title: '用户名',
dataIndex: 'username',
hideInForm: true,
width: 120,
key: 'username',
},
// { // {
// title: '用户名', // title: '用户名',
// dataIndex: 'username', // dataIndex: 'username',
......
...@@ -23,7 +23,7 @@ function User(props) { ...@@ -23,7 +23,7 @@ function User(props) {
const { initialState, loading, error, refresh, setInitialState } = useModel('@@initialState'); const { initialState, loading, error, refresh, setInitialState } = useModel('@@initialState');
const [username, setusername] = useState(null); const [username, setusername] = useState(null);
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setDrawer] = useState({ const [drawer, setDrawer] = useState({
visible: false, visible: false,
......
...@@ -15,7 +15,7 @@ import { message } from 'antd'; ...@@ -15,7 +15,7 @@ import { message } from 'antd';
import { doFetch } from '@/utils/doFetch'; import { doFetch } from '@/utils/doFetch';
function Factory(props) { function Factory(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
visible: false, visible: false,
......
...@@ -8,7 +8,7 @@ import { useRequest } from 'ahooks'; ...@@ -8,7 +8,7 @@ import { useRequest } from 'ahooks';
import { doFetch } from '@/utils/doFetch'; import { doFetch } from '@/utils/doFetch';
function Edgestore(props) { function Edgestore(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
open: false, open: false,
......
...@@ -216,7 +216,7 @@ function getcolumns(setdrawer) { ...@@ -216,7 +216,7 @@ function getcolumns(setdrawer) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimeList', key: 'createTimeList',
fieldProps: { fieldProps: {
showTime: { showTime: {
...@@ -227,7 +227,7 @@ function getcolumns(setdrawer) { ...@@ -227,7 +227,7 @@ function getcolumns(setdrawer) {
hideInForm: true, hideInForm: true,
valueType: 'dateTimeRange', valueType: 'dateTimeRange',
render: (text, row) => { render: (text, row) => {
return <span style={{ fontSize: 14 }}>{row?.createTimes}</span>; return <span style={{ fontSize: 14 }}>{row?.createTime}</span>;
}, },
}, },
{ {
...@@ -399,7 +399,7 @@ function getcolumns(setdrawer) { ...@@ -399,7 +399,7 @@ function getcolumns(setdrawer) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimeList', key: 'createTimeList',
hideInForm: true, hideInForm: true,
valueType: 'dateTimeRange', valueType: 'dateTimeRange',
...@@ -410,7 +410,7 @@ function getcolumns(setdrawer) { ...@@ -410,7 +410,7 @@ function getcolumns(setdrawer) {
format: 'YYYY-MM-DD HH:mm', format: 'YYYY-MM-DD HH:mm',
}, },
render: (text, row) => { render: (text, row) => {
return <span>{row?.createTimes}</span>; return <span>{row?.createTime}</span>;
}, },
}, },
{ {
......
...@@ -8,11 +8,11 @@ import { useRequest } from 'ahooks'; ...@@ -8,11 +8,11 @@ import { useRequest } from 'ahooks';
import { doFetch } from '@/utils/doFetch'; import { doFetch } from '@/utils/doFetch';
function Instore(props) { function Instore(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
open: false, open: false,
}), }),
[activeTabKey, setactiveTabKey] = useState('1'); [activeTabKey, setactiveTabKey] = useState('1');
const { run, loading } = useRequest(doFetch, { const { run, loading } = useRequest(doFetch, {
......
...@@ -194,7 +194,7 @@ function getcolumns(setdrawer) { ...@@ -194,7 +194,7 @@ function getcolumns(setdrawer) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimeList', key: 'createTimeList',
fieldProps: { fieldProps: {
showTime: { showTime: {
...@@ -205,7 +205,7 @@ function getcolumns(setdrawer) { ...@@ -205,7 +205,7 @@ function getcolumns(setdrawer) {
hideInForm: true, hideInForm: true,
valueType: 'dateRange', valueType: 'dateRange',
render: (text, row) => { render: (text, row) => {
return <span>{row?.createTimes}</span>; return <span>{row?.createTime}</span>;
}, },
hideInForm: true, hideInForm: true,
}, },
...@@ -400,7 +400,7 @@ function getcolumns(setdrawer) { ...@@ -400,7 +400,7 @@ function getcolumns(setdrawer) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimeList', key: 'createTimeList',
fieldProps: { fieldProps: {
showTime: { showTime: {
...@@ -411,7 +411,7 @@ function getcolumns(setdrawer) { ...@@ -411,7 +411,7 @@ function getcolumns(setdrawer) {
hideInForm: true, hideInForm: true,
valueType: 'dateRange', valueType: 'dateRange',
render: (text, row) => { render: (text, row) => {
return <span>{row?.createTimes}</span>; return <span>{row?.createTime}</span>;
}, },
hideInForm: true, hideInForm: true,
}, },
......
...@@ -11,7 +11,7 @@ import EditTable from '@/components/InitForm/EditTable'; ...@@ -11,7 +11,7 @@ import EditTable from '@/components/InitForm/EditTable';
import { Button } from 'antd'; import { Button } from 'antd';
function Outstore(props) { function Outstore(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
open: false, open: false,
...@@ -62,19 +62,20 @@ function Outstore(props) { ...@@ -62,19 +62,20 @@ function Outstore(props) {
btn={{ btn={{
size: 'small', size: 'small',
onClick: () => { onClick: () => {
doFetch({ actionRef.current.reload();
url: '/sparepart/outWarehouseTask/queryByBeforeOut', // doFetch({
params: { id: row?.id }, // url: '/sparepart/outWarehouseTask/queryByBeforeOut',
}).then((res) => { // params: { id: row?.id },
setdrawer((s) => ({ // }).then((res) => {
...s, // setdrawer((s) => ({
open: true, // ...s,
item: row, // open: true,
title: '出库', // item: row,
val: 'only', // title: '出库',
submitdata: res?.data?.data?.taskSpareList ?? [], // val: 'only',
})); // submitdata: res?.data?.data?.taskSpareList ?? [],
}); // }));
// });
}, },
}} }}
> >
...@@ -268,11 +269,12 @@ function Outstore(props) { ...@@ -268,11 +269,12 @@ function Outstore(props) {
rowSelection={{ rowSelection={{
columnWidth: 44, columnWidth: 44,
preserveSelectedRowKeys: true, preserveSelectedRowKeys: true,
selectedRowKeys: value selectedRowKeys:
? value value && value.length > 0
?.filter?.((it) => it?.id == record.id)[0] ? value
?.taskSpareSupplierList?.map?.((it) => it?.spareSupplierStockId) ?.filter?.((it) => it?.id == record.id)[0]
: [], ?.taskSpareSupplierList?.map?.((it) => it?.spareSupplierStockId)
: [],
onChange: (selectedKeys, selectedRows) => { onChange: (selectedKeys, selectedRows) => {
const curval = const curval =
value?.filter?.((it) => it?.id == record.id)[0] value?.filter?.((it) => it?.id == record.id)[0]
......
...@@ -8,7 +8,7 @@ import { useRequest } from 'ahooks'; ...@@ -8,7 +8,7 @@ import { useRequest } from 'ahooks';
import { doFetch } from '@/utils/doFetch'; import { doFetch } from '@/utils/doFetch';
function Personalstore(props) { function Personalstore(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
open: false, open: false,
......
...@@ -8,7 +8,7 @@ import { useRequest } from 'ahooks'; ...@@ -8,7 +8,7 @@ import { useRequest } from 'ahooks';
import { doFetch } from '@/utils/doFetch'; import { doFetch } from '@/utils/doFetch';
function Record(props) { function Record(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
open: false, open: false,
......
...@@ -157,12 +157,12 @@ function getcolumns(type, fullName) { ...@@ -157,12 +157,12 @@ function getcolumns(type, fullName) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimeList', key: 'createTimeList',
hideInForm: true, hideInForm: true,
valueType: 'dateRange', valueType: 'dateRange',
render: (text, row) => { render: (text, row) => {
return <span>{row?.createTimes}</span>; return <span>{row?.createTime}</span>;
}, },
hideInForm: true, hideInForm: true,
}, },
...@@ -411,12 +411,12 @@ function getcolumns(type, fullName) { ...@@ -411,12 +411,12 @@ function getcolumns(type, fullName) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimeList', key: 'createTimeList',
hideInForm: true, hideInForm: true,
valueType: 'dateRange', valueType: 'dateRange',
render: (text, row) => { render: (text, row) => {
return <span>{row?.createTimes}</span>; return <span>{row?.createTime}</span>;
}, },
hideInForm: true, hideInForm: true,
}, },
......
...@@ -12,7 +12,7 @@ import { message, Divider } from 'antd'; ...@@ -12,7 +12,7 @@ import { message, Divider } from 'antd';
import { useModel } from '@umijs/max'; import { useModel } from '@umijs/max';
function Requisition(props) { function Requisition(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
open: false, open: false,
......
...@@ -10,7 +10,7 @@ import { message } from 'antd'; ...@@ -10,7 +10,7 @@ import { message } from 'antd';
import TreeRender from '@/components/TreeRender'; import TreeRender from '@/components/TreeRender';
function Setting(props) { function Setting(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
open: false, open: false,
......
...@@ -149,12 +149,12 @@ function getcolumns(type, fullName) { ...@@ -149,12 +149,12 @@ function getcolumns(type, fullName) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimeList', key: 'createTimeList',
hideInForm: true, hideInForm: true,
valueType: 'dateRange', valueType: 'dateRange',
render: (text, row) => { render: (text, row) => {
return <span>{row?.createTimes}</span>; return <span>{row?.createTime}</span>;
}, },
hideInForm: true, hideInForm: true,
}, },
...@@ -386,12 +386,12 @@ function getcolumns(type, fullName) { ...@@ -386,12 +386,12 @@ function getcolumns(type, fullName) {
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTimes', dataIndex: 'createTime',
key: 'createTimeList', key: 'createTimeList',
hideInForm: true, hideInForm: true,
valueType: 'dateRange', valueType: 'dateRange',
render: (text, row) => { render: (text, row) => {
return <span>{row?.createTimes}</span>; return <span>{row?.createTime}</span>;
}, },
hideInForm: true, hideInForm: true,
}, },
......
...@@ -11,7 +11,7 @@ import { message, Divider } from 'antd'; ...@@ -11,7 +11,7 @@ import { message, Divider } from 'antd';
import { useModel } from '@umijs/max'; import { useModel } from '@umijs/max';
function Spareback(props) { function Spareback(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
open: false, open: false,
......
...@@ -27,7 +27,7 @@ function ExtraTable({ spareStockId }) { ...@@ -27,7 +27,7 @@ function ExtraTable({ spareStockId }) {
} }
function Stock(props) { function Stock(props) {
const actionRef = useRef(); let actionRef = useRef();
const pathconfig = useMemo(() => { const pathconfig = useMemo(() => {
let pathconf = getcolumns()?.pathconfig ?? {}; let pathconf = getcolumns()?.pathconfig ?? {};
return pathconf; return pathconf;
......
...@@ -10,7 +10,7 @@ import extraColumns from '@/utils/extraColumns'; ...@@ -10,7 +10,7 @@ import extraColumns from '@/utils/extraColumns';
import { message } from 'antd'; import { message } from 'antd';
function Supplier(props) { function Supplier(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
open: false, open: false,
......
...@@ -14,7 +14,7 @@ import { doFetch } from '@/utils/doFetch'; ...@@ -14,7 +14,7 @@ import { doFetch } from '@/utils/doFetch';
import { message } from 'antd'; import { message } from 'antd';
function Type(props) { function Type(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setDrawer] = useState({ const [drawer, setDrawer] = useState({
visible: false, visible: false,
......
...@@ -20,7 +20,7 @@ import InitForm from '@/components/InitForm'; ...@@ -20,7 +20,7 @@ import InitForm from '@/components/InitForm';
const { Sider, Content } = Layout; const { Sider, Content } = Layout;
function Field(props) { function Field(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(), formRef = useRef(),
[drawer, setDrawer] = useState({ [drawer, setDrawer] = useState({
visible: false, visible: false,
......
...@@ -8,7 +8,7 @@ import { useRequest } from 'ahooks'; ...@@ -8,7 +8,7 @@ import { useRequest } from 'ahooks';
import { doFetch } from '@/utils/doFetch'; import { doFetch } from '@/utils/doFetch';
function Project({ businessMsgOptionId }) { function Project({ businessMsgOptionId }) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
open: false, open: false,
......
...@@ -12,7 +12,7 @@ import copy from 'copy-to-clipboard'; ...@@ -12,7 +12,7 @@ import copy from 'copy-to-clipboard';
import Notice from './Notice'; import Notice from './Notice';
function Pushsetting(props) { function Pushsetting(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
open: false, open: false,
......
...@@ -17,7 +17,7 @@ import AddRules from './AddRules'; ...@@ -17,7 +17,7 @@ import AddRules from './AddRules';
import _ from 'lodash'; import _ from 'lodash';
function Rules(props) { function Rules(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setDrawer] = useState({ const [drawer, setDrawer] = useState({
visible: false, visible: false,
......
...@@ -6,7 +6,7 @@ import PremButton from '@/components/PremButton'; ...@@ -6,7 +6,7 @@ import PremButton from '@/components/PremButton';
import getcolumns from './columns'; import getcolumns from './columns';
function Welcome(props) { function Welcome(props) {
const actionRef = useRef(), let actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
visible: false, visible: false,
......
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