Commit bd57fd24 authored by TZW's avatar TZW

12061610

parent 52481c49
...@@ -70,7 +70,7 @@ function getcolumns(setdrawer) { ...@@ -70,7 +70,7 @@ function getcolumns(setdrawer) {
enabledetail: false, enabledetail: false,
add: '', add: '',
edit: '', edit: '',
list: '/repair/umFailureRepair/queryNoFinishList', list: '/repair/umRepairOrder/queryMyDealwithList',
delete: '/repair/umFailureRepair/deleteById', delete: '/repair/umFailureRepair/deleteById',
detail: '', detail: '',
}, },
...@@ -145,7 +145,7 @@ function getcolumns(setdrawer) { ...@@ -145,7 +145,7 @@ function getcolumns(setdrawer) {
enabledetail: true, enabledetail: true,
add: '', add: '',
edit: '', edit: '',
list: '/repair/umFailureRepair/queryFinishList', list: '/repair/umRepairOrder/queryList',
delete: '/repair/umFailureRepair/deleteById', delete: '/repair/umFailureRepair/deleteById',
detail: '', detail: '',
}, },
...@@ -226,7 +226,7 @@ function getcolumns(setdrawer) { ...@@ -226,7 +226,7 @@ function getcolumns(setdrawer) {
enabledetail: true, enabledetail: true,
add: '', add: '',
edit: '', edit: '',
list: '/repair/umFailureRepair/queryFinishList', list: '/repair/umRepairOrderHis/queryList',
delete: '/repair/umFailureRepair/deleteById', delete: '/repair/umFailureRepair/deleteById',
detail: '', detail: '',
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,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: 2022-12-06 09:16:46 * @Last Modified time: 2022-12-06 13:28:43
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -13,6 +13,7 @@ import PremButton from '@/components/PremButton'; ...@@ -13,6 +13,7 @@ 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 { Dropdown, Menu, Button } from 'antd';
function Failure(props) { function Failure(props) {
const actionRef = useRef(), const actionRef = useRef(),
...@@ -100,6 +101,137 @@ function Failure(props) { ...@@ -100,6 +101,137 @@ function Failure(props) {
); );
}; };
const more = (text, row, _, action) => {
const menu = (
<Menu
items={[
{
label: (
<a
onClick={() => {
setDrawer((s) => ({
...s,
visible: true,
type: 'editChildEquipment',
item: {
id: row.id,
},
val: 'only',
title: '编辑子设备',
// onFinish: async (vals) => {
// console.log(1);
// let params = {
// ...vals,
// id: row.id,
// };
// let res = await doFetch({
// url: urlParams.save,
// params,
// });
// if (res.code === '0000') {
// message.success('新增成功!');
// setDrawer((s) => ({
// ...s,
// visible: false,
// }));
// actionRef.current.reload();
// }
// },
}));
}}
>
接单/派单
</a>
),
key: '0',
},
{
label: (
<a
onClick={() => {
setDrawer((s) => ({
...s,
visible: true,
type: 'resume',
item: {
id: row.id,
},
val: 'only',
title: '履历登记',
// onFinish: async (vals) => {
// console.log(1);
// let params = {
// ...vals,
// id: row.id,
// };
// let res = await doFetch({
// url: urlParams.save,
// params,
// });
// if (res.code === '0000') {
// message.success('新增成功!');
// setDrawer((s) => ({
// ...s,
// visible: false,
// }));
// actionRef.current.reload();
// }
// },
}));
}}
>
完成维修
</a>
),
key: '1',
},
{
label: <a>转追踪</a>,
key: '2',
},
{
label: <a>转外协</a>,
key: '3',
},
{
label: <a>转单</a>,
key: '4',
},
{
label: <a>退单</a>,
key: '5',
},
{
label: <a>效果验证</a>,
key: '6',
},
{
label: <a>追踪审核</a>,
key: '7',
},
{
label: <a>外协审核</a>,
key: '8',
},
{
label: <a>退单审核</a>,
key: '9',
},
]}
/>
);
return (
<Dropdown
overlay={menu}
trigger={['click']}
arrow={true}
getPopupContainer={() => containderef.current}
>
<Button size="small">更多</Button>
</Dropdown>
);
};
const columns = useMemo(() => { const columns = useMemo(() => {
let defcolumn = getcolumns(setdrawer).filter((it) => it.key == activeTabKey)[0]?.columns; let defcolumn = getcolumns(setdrawer).filter((it) => it.key == activeTabKey)[0]?.columns;
let defpath = getcolumns(setdrawer).filter((it) => it.key == activeTabKey)[0]?.pathconfig ?? {}; let defpath = getcolumns(setdrawer).filter((it) => it.key == activeTabKey)[0]?.pathconfig ?? {};
...@@ -107,11 +239,7 @@ function Failure(props) { ...@@ -107,11 +239,7 @@ function Failure(props) {
title: '操作', title: '操作',
valueType: 'option', valueType: 'option',
width: 150, width: 150,
render: (text, row, _, action) => [ render: (text, row, _, action) => [more(text, row, _, action)],
defpath?.enabledetail && detail(text, row, _, action),
defpath?.enableedit && edit(text, row, _, action),
defpath?.enabledelete && remove(text, row, _, action),
],
}); });
}, [activeTabKey]); }, [activeTabKey]);
...@@ -136,7 +264,7 @@ function Failure(props) { ...@@ -136,7 +264,7 @@ function Failure(props) {
path={pathconfig?.list || '/ngic-auth/sysUser/query/page'} path={pathconfig?.list || '/ngic-auth/sysUser/query/page'}
actionRef={actionRef} actionRef={actionRef}
pageextra={pathconfig?.enableadd ? 'add' : null} pageextra={pathconfig?.enableadd ? 'add' : null}
resizeable={true} resizeable={false}
addconfig={{ addconfig={{
// access: 'sysDepartment_save', // access: 'sysDepartment_save',
btn: { btn: {
......
...@@ -70,7 +70,7 @@ function getcolumns(setdrawer) { ...@@ -70,7 +70,7 @@ function getcolumns(setdrawer) {
enabledetail: false, enabledetail: false,
add: '', add: '',
edit: '', edit: '',
list: '/repair/umFailureRepair/queryNoFinishList', list: '/repair/umOtherUnitsOrder/queryMyDealwithList',
delete: '/repair/umFailureRepair/deleteById', delete: '/repair/umFailureRepair/deleteById',
detail: '', detail: '',
}, },
...@@ -145,7 +145,7 @@ function getcolumns(setdrawer) { ...@@ -145,7 +145,7 @@ function getcolumns(setdrawer) {
enabledetail: false, enabledetail: false,
add: '', add: '',
edit: '', edit: '',
list: '/repair/umFailureRepair/queryNoFinishList', list: '/repair/umOtherUnitsOrder/queryList',
delete: '/repair/umFailureRepair/deleteById', delete: '/repair/umFailureRepair/deleteById',
detail: '', detail: '',
}, },
...@@ -220,7 +220,7 @@ function getcolumns(setdrawer) { ...@@ -220,7 +220,7 @@ function getcolumns(setdrawer) {
enabledetail: false, enabledetail: false,
add: '', add: '',
edit: '', edit: '',
list: '/repair/umFailureRepair/queryNoFinishList', list: '/repair/umOtherUnitsOrderHis/queryList',
delete: '/repair/umFailureRepair/deleteById', delete: '/repair/umFailureRepair/deleteById',
detail: '', detail: '',
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,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: 2022-12-06 09:16:55 * @Last Modified time: 2022-12-06 16:05:58
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -131,7 +131,7 @@ function Failure(props) { ...@@ -131,7 +131,7 @@ function Failure(props) {
return ( return (
<div style={{ position: 'relative' }}> <div style={{ position: 'relative' }}>
<AutoTable <AutoTable
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'}
actionRef={actionRef} actionRef={actionRef}
......
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