From ee38efab39bec053d7ecb4d39e6bf3123af9d912 Mon Sep 17 00:00:00 2001 From: wyw <571921741@qq.com> Date: Tue, 6 Aug 2024 15:24:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A3=80=E6=9F=A5=E4=BB=BB=E5=8A=A1=E5=88=B6?= =?UTF-8?q?=E5=AE=9A=20=E5=8F=96=E6=B6=88=20=E4=BF=AE=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E8=BE=93=E5=85=A5=E5=8E=9F=E5=9B=A0=E5=90=8E?= =?UTF-8?q?=E5=8F=96=E6=B6=88=20=E6=8C=89=E9=92=AE=20=20=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=20=20=E6=B7=BB=E5=8A=A0=20=E5=AD=90=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E5=90=8E=E5=8F=AF=E7=9B=B4=E6=8E=A5=E5=85=B3?= =?UTF-8?q?=E9=97=AD=E5=BD=93=E5=89=8D=E5=BC=B9=E7=AA=97=E7=9A=84=E6=96=B9?= =?UTF-8?q?=E6=B3=95=20=E6=B7=BB=E5=8A=A0=20=E7=BB=9F=E4=B8=80=E7=9A=84=20?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E5=BC=B9=E7=AA=97=EF=BC=88=E4=B8=8D=E5=A5=BD?= =?UTF-8?q?=E7=9C=8B=E5=9B=A0=E4=B8=BA=E4=BF=9D=E6=8C=81=E5=92=8C=E4=B8=80?= =?UTF-8?q?=E8=88=AC=E5=BC=B9=E7=AA=97=E4=B8=80=E8=87=B4=20=20=E9=82=A3?= =?UTF-8?q?=E4=B9=88=E5=B0=8F=E7=9A=84=E5=8A=9F=E8=83=BD=E4=B9=9F=E6=98=AF?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E5=85=A8=E5=B1=8F=E5=BC=B9=E7=AA=97=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/baseComponents/EditComponent/index.js | 3 +- src/files/edit/BS032.js | 53 +++++++++++++++++------ src/files/edit/BS078.js | 28 ++++++++++++ 3 files changed, 69 insertions(+), 15 deletions(-) create mode 100644 src/files/edit/BS078.js diff --git a/src/baseComponents/EditComponent/index.js b/src/baseComponents/EditComponent/index.js index 3f8a49d..6e38e02 100644 --- a/src/baseComponents/EditComponent/index.js +++ b/src/baseComponents/EditComponent/index.js @@ -1562,7 +1562,7 @@ class EditComponent extends EditBaseComponent { } this.useCodeRules = null; if (typeof onSave === 'function') { - onSave(this.state.data, this.clearData,this.setStateData); + onSave(this.state.data, this.clearData, this.setStateData); } if (closeType === 1 && this.billStatus === 1 ||//仅编辑时关闭 closeType === 2 && this.billStatus !== 1 ||//仅新增时关闭 @@ -1772,6 +1772,7 @@ class EditComponent extends EditBaseComponent { onCancel: onCancel, saveHeadRecord: (values, onComplete) => { return this.saveHeadRecord(values, onComplete); }, saveRowRecord: (params) => { this.saveRowRecord(params); }, + closeForm: () => { this.props.data.onCancel() }, }); if (btnParam) { btnParam.disabled = btnParam.isReturn; diff --git a/src/files/edit/BS032.js b/src/files/edit/BS032.js index d0cde32..7bea8b4 100644 --- a/src/files/edit/BS032.js +++ b/src/files/edit/BS032.js @@ -1,5 +1,7 @@ -import { message, notification } from 'antd' +import { Button, message, notification } from 'antd' import { extendInclude, extendRule, getDataFieldValue, initFilter, empty, extendOrder, guid, onBeforeSaveHandleRecordLog, auditOptionShow } from "../../utils/common"; +import ShowModal from '../../components/common/ShowModal'; +import FormPage from '../../components/FormPage'; export default { onBeforeSaveHandleRecord(params) { params.record.TaskID = params.data.TaskID //TaskID传递消息表ID @@ -274,18 +276,41 @@ export default { return ''; } }, - btnCancel: ({ record, onCancel, data, dispatch }) => { - let json = initFilter(record.ORG_ID, record.ID, null, null, null, data.TaskID); - dispatch({ - type: 'app/getDataByPost', - url: 'BS/BSSafeCheck/Cancel', - payload: json, - onlyData: false, - onComplete: (ret) => { - if (ret.IsSuccessful == true) { - message.success('执行成功', null, onCancel()) - } - } - }) + //取消 + btnCancel: ({ record, data, closeForm, login, btn }) => { + const data1 = { + content: { + closeForm(); + }, + onCancel: () => { + //wyw 此方法要有不能被删除 别处会重写 + }, + }} />, + }; + return { + content: + + + } }, + // btnCancel: ({ record, onCancel, data, dispatch }) => { + // let json = initFilter(record.ORG_ID, record.ID, null, null, null, data.TaskID); + // dispatch({ + // type: 'app/getDataByPost', + // url: 'BS/BSSafeCheck/Cancel', + // payload: json, + // onlyData: false, + // onComplete: (ret) => { + // if (ret.IsSuccessful == true) { + // message.success('执行成功', null, onCancel()) + // } + // } + // }) + // }, + } diff --git a/src/files/edit/BS078.js b/src/files/edit/BS078.js new file mode 100644 index 0000000..80b7ae4 --- /dev/null +++ b/src/files/edit/BS078.js @@ -0,0 +1,28 @@ +import ConfirmButton from '../../components/common/ConfirmButton'; +import { Button, message } from 'antd' +import storage from '../../utils/storage' +import config from "../../config.js" +import { extendInclude, extendRule, getDataFieldValue, initFilter, empty, extendOrder, guid, getSubTableData, onBeforeSaveHandleRecordLog, auditOptionShow2 } from "../../utils/common"; +import Item from 'antd/lib/list/Item'; +import styles from '../../components/CustomPages/HI/StepForm.css'; +import EditRowShowModal from '../../components/common/EditRowShowModal'; +import FormPage from '../../components/FormPage'; +export default { + onBeforeEdit: ({ data, setFieldEditable, setFieldValueByBatch }) => { + if (data.rules && data.rules.length > 0) { + // var parentInfo = data.rules[0].value + var parentInfo = data.rules[0]//.value + if (parentInfo != null && parentInfo.ID != null) { + let temps = []; + // temps.push({ field: "ID", value: parentInfo.ID }); + // temps.push({ field: "TaskID", value: data.TaskID }); + // temps.push({ field: "ORG_ID", value: parentInfo.ORG_ID }); + temps.push({ field: "OrgId", value: parentInfo.ORG_ID }); + temps.push({ field: "Keyword", value: parentInfo.ID }); + temps.push({ field: "Parameter1", value: data.TaskID }); + temps.push({ field: "Parameter3", value: parentInfo.ID }); + setFieldValueByBatch(temps); + } + } + }, +}