Commit fd24e336 authored by TZW's avatar TZW

保养

parent 1f24c6c6
......@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2023-01-16 15:35:00
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-01-16 17:33:58
* @Last Modified time: 2023-01-17 10:51:25
*/
import * as React from 'react';
......@@ -202,7 +202,10 @@ function Plan(props) {
okText: '确认',
cancelText: '取消',
onConfirm: async () => {
await runAsync({ url: '/check/umEquipmentCheckPlan/shut', params: { id: row?.id } });
await runAsync({
url: '/maintain/umMaintainPlan/customsDeclaration',
params: { id: row?.id },
});
},
}}
btn={{
......@@ -249,6 +252,7 @@ function Plan(props) {
title: '调整日期',
val: 'detailaddon',
id: row?.id,
from: 'tz',
}));
},
}}
......@@ -276,23 +280,27 @@ function Plan(props) {
<Popconfirm
title="是否开启或停用?"
onConfirm={async () => {
if (row.checkEnable == 1) {
if (row.isStopStatus == 1) {
await runAsync({
url: '/check/umEquipmentCheckPlan/enable',
params: { id: row.id, checkEnable: 2 },
url: '/maintain/umMaintainPlan/enableDeactivate',
params: { id: row.id, isStopFlag: 2 },
});
}
}}
okText="确定"
cancelText="取消"
disabled={!(row.status == 1 || (row.status == 2 && row.checkLoop == 2))}
disabled={
!(row.maintainStatus == 1 || (row.maintainStatus == 2 && row.isCycle == 2))
}
>
<Switch
checked={row.checkEnable == 1 ? true : false}
checked={row.isStopStatus == 1 ? true : false}
checkedChildren="开启"
unCheckedChildren="停用"
defaultChecked={false}
disabled={!(row.status == 1 || (row.status == 2 && row.checkLoop == 2))}
disabled={
!(row.maintainStatus == 1 || (row.maintainStatus == 2 && row.isCycle == 2))
}
/>
</Popconfirm>
) : (
......@@ -313,6 +321,7 @@ function Plan(props) {
title: '调整日期',
val: 'detailaddon',
id: row?.id,
from: 'tq',
}));
}
}}
......@@ -422,6 +431,9 @@ function Plan(props) {
onFinish={async (vals) => {
delete vals.isCycle;
delete vals.maintainFrequency;
if (drawer?.from == 'tq') {
vals.isStopFlag = 1;
}
await runAsync({
url: '/maintain/umMaintainPlan/enableDeactivate',
params: { ...vals, id: drawer?.item?.id },
......
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