Commit fd24e336 authored by TZW's avatar TZW

保养

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