Commit 6786a15d authored by TZW's avatar TZW

bug

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