Commit 7c22521b authored by TZW's avatar TZW

bug

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