Commit 09b97e6e authored by TZW's avatar TZW

1125

parent bc536daa
......@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-25 09:18:03
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-25 14:17:48
* @Last Modified time: 2022-11-25 17:42:18
*/
import * as React from 'react';
......@@ -11,6 +11,7 @@ import DrawerPro from '@/components/DrawerPro';
import AutoTable from '@/components/AutoTable';
import PremButton from '@/components/PremButton';
import getcolumns from './columns';
import { doFetch } from '@/utils/doFetch';
function Failure(props) {
const actionRef = useRef(),
......@@ -117,17 +118,20 @@ function Failure(props) {
},
},
},
{ title: '故障描述', dataIndex: 'faultDescription', key: 'faultDescription' },
{ title: '故障图片', dataIndex: 'pictureId', key: 'pictureId', valueType: 'updateImage' },
{
title: '工单状态',
dataIndex: 'statusName',
key: 'status',
valueType: 'radio',
options: [
{ label: '待维修', value: '1' },
{ label: '维修中', value: '2' },
],
title: '故障描述',
valueType: 'textarea',
dataIndex: 'faultDescription',
key: 'faultDescription',
},
{
title: '故障图片',
dataIndex: 'pictureId',
key: 'pictureId',
valueType: 'uploadImage',
fieldProps: {
limit: 2,
},
},
];
const columns = useMemo(() => {
......@@ -171,9 +175,29 @@ function Failure(props) {
setdrawer((s) => ({
...s,
visible: true,
item: null,
item: {
isShutdown: 1,
},
title: '新增',
val: 'add',
onFinish: async (vals) => {
console.log(vals);
let params = {
...vals,
};
let res = await doFetch({
url: urlParams.save,
params,
});
if (res.code === '0000') {
message.success('新增保修单成功!');
setdrawer((s) => ({
...s,
visible: false,
}));
actionRef.current.reload();
}
},
}));
},
},
......
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