From 7725b0f1fce3512ec1574ac407970f2ed726b7ec Mon Sep 17 00:00:00 2001 From: wyw <571921741@qq.com> Date: Sat, 9 May 2026 17:12:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=92=AD=E6=94=BE=E8=AE=BE=E7=BD=AE=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=8F=90=E7=A4=BA=E8=AF=AD=E4=B8=8E=E5=85=B3=E8=81=94?= =?UTF-8?q?=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/files/edit/PF159.js | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/files/edit/PF159.js b/src/files/edit/PF159.js index cea51b3..9addf43 100644 --- a/src/files/edit/PF159.js +++ b/src/files/edit/PF159.js @@ -1,3 +1,4 @@ +import { message } from "antd/lib/index"; import React, { useState } from 'react'; import { Form, Col } from 'antd' import { extendInclude, extendRule, initFilter } from "../../utils/common"; @@ -9,12 +10,29 @@ import 'braft-editor/dist/index.css'; */ export default { - onBeforeEdit: ({ isNew, login, stateData }) => { + onBeforeEdit: ({ isNew, login, stateData, setFieldValue }) => { if (isNew) { stateData.STATUS = 0 + setFieldValue('V_ISSHOWCONTROL', true); } }, onBeforeSaveHandleRecord(params) { params.record.STATUS = params.customParams + }, + onChange: ({ value, colInfo, getFieldValue, setFieldVisible, setFieldValue, setFieldEditable, stateData }) => { + if (colInfo.FIELD_NAME == 'V_ISAUTO') { + if (value == true) { + setFieldValue('V_ISSILENT', true); + setFieldEditable('V_ISSILENT', false); + } else { + setFieldEditable('V_ISSILENT', true); + } + } else if (colInfo.FIELD_NAME == 'V_ISSHOWCONTROL') { + if (value == false) { + if (stateData.V_ISAUTO == undefined || stateData.V_ISAUTO == false) { + message.warn("必须自动才能不显示控制器"); + } + } + } } }; \ No newline at end of file