Commit 6786a15d authored by TZW's avatar TZW

bug

parent bf190c12
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
"editor.formatOnSave": true, "editor.formatOnSave": true,
"prettier.requireConfig": true, "prettier.requireConfig": true,
"editor.defaultFormatter": "esbenp.prettier-vscode", "editor.defaultFormatter": "esbenp.prettier-vscode",
"cSpell.words": ["onselecte", "setdrawer", "Sider"] "cSpell.words": ["onselecte", "pagetitle", "setdrawer", "Sider"]
} }
...@@ -29,7 +29,7 @@ export default (props) => { ...@@ -29,7 +29,7 @@ export default (props) => {
), ),
}; };
//右上角 extra 类型 1.reactDom 2.string 以逗号隔开 为none时不显示 //右上角 pageextra 类型 1.reactDom 2.string 以逗号隔开 为none时不显示
const renderextra = () => { const renderextra = () => {
if (props.pageextra && !isString(props.pageextra)) { if (props.pageextra && !isString(props.pageextra)) {
if (typeof props?.pageextra == 'function') { if (typeof props?.pageextra == 'function') {
...@@ -50,9 +50,8 @@ export default (props) => { ...@@ -50,9 +50,8 @@ export default (props) => {
}); });
} }
}; };
const match = useMatch({ path: '/welcome' });
const items = useMemo(() => { const items = useMemo(() => {
if (props.nocardtab && props.tabList) { if (props.tabList) {
return props.tabList.map((it) => { return props.tabList.map((it) => {
return { return {
label: it.tab, label: it.tab,
...@@ -60,20 +59,20 @@ export default (props) => { ...@@ -60,20 +59,20 @@ export default (props) => {
children: ( children: (
<> <>
<div style={{ display: 'flex', width: '100%' }}> <div style={{ display: 'flex', width: '100%' }}>
{(childposition == 'left' || !childposition) && props.children} {(props.childposition == 'left' || !props.childposition) && props.children}
<div <div
style={{ style={{
flex: 1, flex: 1,
overflow: 'hidden', overflow: 'hidden',
paddingLeft: `${childposition == 'left' && props.children ? '15px' : '0'}`, paddingLeft: `${props.childposition == 'left' ? '15px' : '0'}`,
}} }}
> >
{childposition == 'top' && props.children} {props.childposition == 'top' && props.children}
<Mtable {...props} activeTabKey={null} /> <Mtable {...props} iscurrent={props?.activeTabKey == it.key} />
</div> </div>
{(childposition == 'right' || !childposition) && props.children} {(props.childposition == 'right' || !props.childposition) && props.children}
</div> </div>
{childposition == 'bottom' && props.children} {props.childposition == 'bottom' && props.children}
</> </>
), ),
}; };
...@@ -85,16 +84,16 @@ export default (props) => { ...@@ -85,16 +84,16 @@ export default (props) => {
{props.withCard === false ? ( {props.withCard === false ? (
<> <>
<div style={{ display: 'flex', width: '100%' }}> <div style={{ display: 'flex', width: '100%' }}>
{(childposition == 'left' || !childposition) && props.children} {(props.childposition == 'left' || !props.childposition) && props.children}
<div style={{ flex: 1, width: '100%' }}> <div style={{ flex: 1, width: '100%' }}>
{childposition == 'top' && props.children} {props.childposition == 'top' && props.children}
<Mtable {...props} /> <Mtable {...props} />
</div> </div>
{(childposition == 'right' || !childposition) && props.children} {(props.childposition == 'right' || !props.childposition) && props.children}
</div> </div>
{childposition == 'bottom' && props.children} {props.childposition == 'bottom' && props.children}
</> </>
) : !props.nocardtab ? ( ) : !props.tabList ? (
<Card <Card
bordered={props.bordered === false ? false : true} bordered={props.bordered === false ? false : true}
style={{ height: '100%' }} style={{ height: '100%' }}
...@@ -105,20 +104,20 @@ export default (props) => { ...@@ -105,20 +104,20 @@ export default (props) => {
onTabChange={props.onTabChange} onTabChange={props.onTabChange}
> >
<div style={{ display: 'flex', width: '100%' }}> <div style={{ display: 'flex', width: '100%' }}>
{(childposition == 'left' || !childposition) && props.children} {(props.childposition == 'left' || !props.childposition) && props.children}
<div <div
style={{ style={{
flex: 1, flex: 1,
overflow: 'hidden', overflow: 'hidden',
paddingLeft: `${childposition == 'left' && props.children ? '15px' : '0'}`, paddingLeft: `${props.childposition == 'left' ? '15px' : '0'}`,
}} }}
> >
{childposition == 'top' && props.children} {props.childposition == 'top' && props.children}
<Mtable {...props} /> <Mtable {...props} />
</div> </div>
{(childposition == 'right' || !childposition) && props.children} {(props.childposition == 'right' || !props.childposition) && props.children}
</div> </div>
{childposition == 'bottom' && props.children} {props.childposition == 'bottom' && props.children}
</Card> </Card>
) : ( ) : (
<div className="tabsTable"> <div className="tabsTable">
......
...@@ -42,6 +42,7 @@ const Mtable = (props) => { ...@@ -42,6 +42,7 @@ const Mtable = (props) => {
getDefaultSelected, //存在默认选中向上返回选中值 getDefaultSelected, //存在默认选中向上返回选中值
resizeable = false, resizeable = false,
dataSource, dataSource,
iscurrent = true,
} = props; } = props;
const actionRefs = actionRef ?? useRef(), const actionRefs = actionRef ?? useRef(),
formRefs = formRef ?? useRef(), formRefs = formRef ?? useRef(),
...@@ -275,9 +276,9 @@ const Mtable = (props) => { ...@@ -275,9 +276,9 @@ const Mtable = (props) => {
if (resizeable) { if (resizeable) {
await initDrage(); await initDrage();
} }
actionRefs?.current?.reload(); iscurrent && actionRefs?.current?.reload();
actionRefs?.current?.reset(); // actionRefs?.current?.reset();
}, [columns, extraparams, path, activeTabKey, refreshDep]); }, [columns, extraparams, path, activeTabKey, refreshDep, iscurrent]);
//缩放表格 //缩放表格
const handleResize = const handleResize =
......
...@@ -400,7 +400,7 @@ function getcolumns(setdrawer) { ...@@ -400,7 +400,7 @@ function getcolumns(setdrawer) {
hideInForm: true, hideInForm: true,
valueType: 'dateRange', valueType: 'dateRange',
render: (text, row, _, action) => { render: (text, row, _, action) => {
return <span>{row.checkCloseDate}</span>; return <span style={{ color: 'rgba(0, 0, 0, 0.85)' }}>{row.checkCloseDate}</span>;
}, },
}, },
{ {
......
...@@ -582,6 +582,7 @@ function Task(props) { ...@@ -582,6 +582,7 @@ function Task(props) {
actionRef={actionRef} actionRef={actionRef}
pageextra={pathconfig?.enableadd ? 'add' : null} pageextra={pathconfig?.enableadd ? 'add' : null}
resizeable={false} resizeable={false}
nocardtab={true}
addconfig={{ addconfig={{
// access: 'sysDepartment_save', // access: 'sysDepartment_save',
btn: { btn: {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: Li Hanlin * @Author: Li Hanlin
* @Date: 2023-01-16 15:35:00 * @Date: 2023-01-16 15:35:00
* @Last Modified by: Li Hanlin * @Last Modified by: Li Hanlin
* @Last Modified time: 2023-02-09 13:46:49 * @Last Modified time: 2023-02-09 17:32:05
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -589,6 +589,13 @@ function Plan(props) { ...@@ -589,6 +589,13 @@ function Plan(props) {
: columns : columns
} }
detailpath={pathconfig?.detail || null} detailpath={pathconfig?.detail || null}
onValuesChange={(changedValues, allValues) => {
if (Object.keys(changedValues)[0] == 'maintainFrequency') {
formRef?.current?.setFieldsValue({
paramList: [],
});
}
}}
// detailData={drawer?.item} // detailData={drawer?.item}
defaultFormValue={drawer?.item} defaultFormValue={drawer?.item}
params={{ id: drawer?.item?.id }} params={{ id: drawer?.item?.id }}
......
...@@ -94,7 +94,8 @@ function getcolumns(setdrawer) { ...@@ -94,7 +94,8 @@ function getcolumns(setdrawer) {
<span <span
style={{ style={{
color: `${ color: `${
dayjs(row.planMaintainDate).valueOf() < dayjs().format('YYYY-MM-DD').valueOf() dayjs(row.planMaintainDate).valueOf() <
dayjs(dayjs().format('YYYY-MM-DD')).valueOf()
? '#f50' ? '#f50'
: 'rgba(0, 0, 0, 0.85)' : 'rgba(0, 0, 0, 0.85)'
}`, }`,
...@@ -253,7 +254,8 @@ function getcolumns(setdrawer) { ...@@ -253,7 +254,8 @@ function getcolumns(setdrawer) {
<span <span
style={{ style={{
color: `${ color: `${
dayjs(row.planMaintainDate).valueOf() < dayjs().format('YYYY-MM-DD').valueOf() dayjs(row.planMaintainDate).valueOf() <
dayjs(dayjs().format('YYYY-MM-DD')).valueOf()
? '#f50' ? '#f50'
: 'rgba(0, 0, 0, 0.85)' : 'rgba(0, 0, 0, 0.85)'
}`, }`,
...@@ -407,22 +409,6 @@ function getcolumns(setdrawer) { ...@@ -407,22 +409,6 @@ function getcolumns(setdrawer) {
dataIndex: 'planMaintainDate', dataIndex: 'planMaintainDate',
key: 'planMaintainDateList', key: 'planMaintainDateList',
valueType: 'dateRange', valueType: 'dateRange',
render: (text, row, _, action) => {
return (
<span
style={{
color: `${
dayjs(row.planMaintainDate).valueOf() <
dayjs(dayjs().format('YYYY-MM-DD')).valueOf()
? '#f50'
: 'rgba(0, 0, 0, 0.85)'
}`,
}}
>
{row.planMaintainDate}
</span>
);
},
}, },
{ {
title: '接单时间', title: '接单时间',
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: Li Hanlin * @Author: Li Hanlin
* @Date: 2023-01-19 09:53:59 * @Date: 2023-01-19 09:53:59
* @Last Modified by: Li Hanlin * @Last Modified by: Li Hanlin
* @Last Modified time: 2023-02-08 13:22:27 * @Last Modified time: 2023-02-09 16:14:02
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -17,9 +17,12 @@ import AutoTables from '@/components/AutoTable/mtable'; ...@@ -17,9 +17,12 @@ import AutoTables from '@/components/AutoTable/mtable';
import { Radio, InputNumber, Input, Divider } from 'antd'; import { Radio, InputNumber, Input, Divider } from 'antd';
import InitForm from '@/components/InitForm'; import InitForm from '@/components/InitForm';
import getDetailColumns from './detailColumns'; import getDetailColumns from './detailColumns';
import { useModel } from '@umijs/max';
import DetailNode from '@/components/DetailNode'; import DetailNode from '@/components/DetailNode';
function WorkOrder(props) { function WorkOrder(props) {
const { initialState, setInitialState } = useModel('@@initialState');
const actionRef = useRef(), const actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
...@@ -667,6 +670,7 @@ function WorkOrder(props) { ...@@ -667,6 +670,7 @@ function WorkOrder(props) {
pagetitle={<h3 className="page-title">保养工单</h3>} pagetitle={<h3 className="page-title">保养工单</h3>}
columns={columns} columns={columns}
path={pathconfig?.list || '/ngic-auth/sysUser/query/page'} path={pathconfig?.list || '/ngic-auth/sysUser/query/page'}
extraparams={activeTabKey == 1 ? { maintainUserId: initialState?.currentUser?.id } : null}
actionRef={actionRef} actionRef={actionRef}
pageextra={pathconfig?.enableadd ? 'add' : null} pageextra={pathconfig?.enableadd ? 'add' : null}
resizeable={false} resizeable={false}
......
...@@ -101,7 +101,7 @@ function getcolumns(setdrawer, bus) { ...@@ -101,7 +101,7 @@ function getcolumns(setdrawer, bus) {
{ {
title: '最新追踪人员', title: '最新追踪人员',
dataIndex: 'newRepairUserName', dataIndex: 'newRepairUserName',
key: 'newRepairUserName', key: 'newRepairUserId',
valueType: 'select', valueType: 'select',
fieldProps: { fieldProps: {
showSearch: true, showSearch: true,
...@@ -220,8 +220,8 @@ function getcolumns(setdrawer, bus) { ...@@ -220,8 +220,8 @@ function getcolumns(setdrawer, bus) {
}, },
{ {
title: '来源单号', title: '来源单号',
dataIndex: 'repairNo', dataIndex: 'dataSourcesNo',
key: 'repairNo', key: 'dataSourcesNo',
}, },
{ {
title: '工单状态', title: '工单状态',
...@@ -340,8 +340,8 @@ function getcolumns(setdrawer, bus) { ...@@ -340,8 +340,8 @@ function getcolumns(setdrawer, bus) {
}, },
{ {
title: '来源单号', title: '来源单号',
dataIndex: 'repairNo', dataIndex: 'dataSourcesNo',
key: 'repairNo', key: 'dataSourcesNo',
}, },
{ {
title: '工单状态', title: '工单状态',
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: Li Hanlin * @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03 * @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin * @Last Modified by: Li Hanlin
* @Last Modified time: 2023-02-09 10:41:27 * @Last Modified time: 2023-02-09 15:41:35
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -426,7 +426,7 @@ function Failure(props) { ...@@ -426,7 +426,7 @@ function Failure(props) {
trackResult: 1, trackResult: 1,
isFinishTrack: 2, isFinishTrack: 2,
}, },
// detailpath: '/repair/umTrackTraceinfo/queryByTrackOrderId', detailpath: '',
// params: { trackOrderId: row?.id }, // params: { trackOrderId: row?.id },
val: 'only', val: 'only',
title: '追踪信息', title: '追踪信息',
......
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