Commit abffbb3f authored by TZW's avatar TZW

11111

parent a1f5b176
......@@ -3,7 +3,7 @@
* @Author: Li Hanlin
* @Date: 2022-12-05 10:13:42
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-01-29 16:25:57
* @Last Modified time: 2023-01-30 11:15:44
*/
import * as React from 'react';
......@@ -124,10 +124,9 @@ function Platform(props) {
btn={{
size: 'small',
type: 'primary',
onClick: async () => {
onClick: async (vals) => {
let params = {
...vals,
id,
id: row?.id,
};
let res = await doFetch({
url: '/repair/umOtherUnitsOrder/orderReceiving',
......
......@@ -3,7 +3,7 @@
* @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-01-29 16:29:20
* @Last Modified time: 2023-01-30 11:12:49
*/
import * as React from 'react';
......@@ -331,112 +331,125 @@ function Failure(props) {
// 更多
const more = (text, row, _, action) => {
const menu = (
<Menu
items={[
{
label:
row?.status == 0 || row?.status == 1 ? (
<PremButton
btn={{
onClick: async () => {
let params = {
id: row?.id,
};
let res = await doFetch({
url: '/repair/umTrackOrder/orderReceiving',
params,
});
if (res.code === '0000') {
message.success('接单成功!');
setdrawer((s) => ({
...s,
open: false,
}));
actionRef.current.reload();
}
},
}}
>
接单
</PremButton>
) : (
<PremButton
btn={{
onClick: async () => {
let params = {
id: row?.id,
};
let res = await doFetch({
url: '/repair/umTrackOrder/dispatchById',
params,
});
if (res.code === '0000') {
message.success('派单成功!');
setdrawer((s) => ({
...s,
open: false,
}));
actionRef.current.reload();
}
},
}}
>
派单
</PremButton>
),
key: '0',
// disabled: true,
},
{
label: (
<PremButton
btn={{
onClick: () => {
let menulist = [];
if (row?.status == '1') {
menulist = [
{
label: (
<PremButton
btn={{
onClick: async () => {
let params = {
id: row?.id,
};
let res = await doFetch({
url: '/repair/umTrackOrder/orderReceiving',
params,
});
if (res.code === '0000') {
message.success('接单成功!');
setdrawer((s) => ({
...s,
open: true,
type: 'track',
item: { ...row, trackCycle: String(row?.trackCycle) },
// detailpath: '/repair/umTrackTraceinfo/queryByTrackOrderId',
// params: { trackOrderId: row?.id },
val: 'only',
title: '追踪信息',
open: false,
}));
},
}}
>
追踪
</PremButton>
),
key: '1',
},
{
label: (
<PremButton
btn={{
onClick: () => {
actionRef.current.reload();
}
},
}}
>
接单
</PremButton>
),
key: '0',
// disabled: true,
},
];
} else if (row?.status == '2') {
menulist = [
{
label: (
<PremButton
btn={{
onClick: async () => {
let params = {
id: row?.id,
};
let res = await doFetch({
url: '/repair/umTrackOrder/dispatchById',
params,
});
if (res.code === '0000') {
message.success('派单成功!');
setdrawer((s) => ({
...s,
open: true,
val: 'only',
title: '验证',
item: row,
detailpath: '/repair/umTrackTraceinfo/queryByTrackOrderId',
params: { trackOrderId: row?.id },
type: 'check',
open: false,
}));
},
}}
>
验证
</PremButton>
),
key: '2',
},
]}
/>
);
actionRef.current.reload();
}
},
}}
>
派单
</PremButton>
),
key: '0',
// disabled: true,
},
];
} else if (row?.status == '3') {
menulist = [
{
label: (
<PremButton
btn={{
onClick: () => {
setdrawer((s) => ({
...s,
open: true,
type: 'track',
item: { ...row, trackCycle: String(row?.trackCycle) },
// detailpath: '/repair/umTrackTraceinfo/queryByTrackOrderId',
// params: { trackOrderId: row?.id },
val: 'only',
title: '追踪信息',
}));
},
}}
>
追踪
</PremButton>
),
key: '1',
},
];
} else if (row?.status == '4') {
menulist = [
{
label: (
<PremButton
btn={{
onClick: () => {
setdrawer((s) => ({
...s,
open: true,
val: 'only',
title: '验证',
item: row,
detailpath: '/repair/umTrackTraceinfo/queryByTrackOrderId',
params: { trackOrderId: row?.id },
type: 'check',
}));
},
}}
>
验证
</PremButton>
),
key: '2',
},
];
}
const menu = <Menu items={menulist} />;
return (
<Dropdown
overlay={menu}
......
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