Commit b077a8ab authored by TZW's avatar TZW

1

parent c08a9aa5
......@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-08 17:52:09
* @Last Modified time: 2022-12-08 19:39:12
*/
import * as React from 'react';
......@@ -160,25 +160,6 @@ function Failure(props) {
},
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,
// open: false,
// }));
// actionRef.current.reload();
// }
// },
}));
}}
>
......@@ -188,7 +169,24 @@ function Failure(props) {
key: '1',
},
{
label: <a>转追踪</a>,
label: (
<a
onClick={() => {
setdrawer((s) => ({
...s,
open: true,
type: 'zzz',
item: {
id: row.id,
},
val: 'only',
title: '转追踪',
}));
}}
>
转追踪
</a>
),
key: '2',
},
{
......@@ -356,18 +354,90 @@ function Failure(props) {
<>
<InitForm
fields={columns}
onFinish={(vals) => {
console.log(vals);
onFinish={async (vals) => {
let params = {
repairComplete: {
faultType: vals.faultType,
faultName: vals.faultName,
faultCause: vals.faultCause,
repairType: vals.repairType,
isShutdown: vals.isShutdown,
repairContent: vals.repairContent,
},
id: row.id,
};
let res = await doFetch({
url: '/repair/umRepairOrder/completeRepair',
params,
});
if (res.code === '0000') {
message.success('新增成功!');
setdrawer((s) => ({
...s,
open: false,
}));
actionRef.current.reload();
}
}}
{...drawer}
/>
</>
);
};
// 转追踪
const Toracking = () => {
return (
<>
<InitForm
fields={[
{
title: '申请追踪原因',
dataIndex: 'reason',
key: 'reason',
formItemProps: {
rules: [
{
required: true,
message: '此项为必填项',
},
],
},
},
]}
/>
</>
);
};
const Toout = () => {
return (
<>
<InitForm
fields={[
{
title: '申请外协原因',
dataIndex: 'reason',
key: 'reason',
formItemProps: {
rules: [
{
required: true,
message: '此项为必填项',
},
],
},
},
]}
/>
</>
);
};
const selectType = {
jd: <Recevive />,
wcwx: <Finishrepair />,
zzz: <Toracking />,
zzzong: <Toout />,
};
const columns = useMemo(() => {
......
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