检查任务制定 取消 修改为弹窗输入原因后取消
按钮 自定义 添加 子弹窗关闭后可直接关闭当前弹窗的方法 添加 统一的 取消弹窗(不好看因为保持和一般弹窗一致 那么小的功能也是一个全屏弹窗)
This commit is contained in:
parent
1ff98a57e8
commit
ee38efab39
@ -1562,7 +1562,7 @@ class EditComponent extends EditBaseComponent {
|
|||||||
}
|
}
|
||||||
this.useCodeRules = null;
|
this.useCodeRules = null;
|
||||||
if (typeof onSave === 'function') {
|
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 ||//仅编辑时关闭
|
if (closeType === 1 && this.billStatus === 1 ||//仅编辑时关闭
|
||||||
closeType === 2 && this.billStatus !== 1 ||//仅新增时关闭
|
closeType === 2 && this.billStatus !== 1 ||//仅新增时关闭
|
||||||
@ -1772,6 +1772,7 @@ class EditComponent extends EditBaseComponent {
|
|||||||
onCancel: onCancel,
|
onCancel: onCancel,
|
||||||
saveHeadRecord: (values, onComplete) => { return this.saveHeadRecord(values, onComplete); },
|
saveHeadRecord: (values, onComplete) => { return this.saveHeadRecord(values, onComplete); },
|
||||||
saveRowRecord: (params) => { this.saveRowRecord(params); },
|
saveRowRecord: (params) => { this.saveRowRecord(params); },
|
||||||
|
closeForm: () => { this.props.data.onCancel() },
|
||||||
});
|
});
|
||||||
if (btnParam) {
|
if (btnParam) {
|
||||||
btnParam.disabled = btnParam.isReturn;
|
btnParam.disabled = btnParam.isReturn;
|
||||||
|
|||||||
@ -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 { 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 {
|
export default {
|
||||||
onBeforeSaveHandleRecord(params) {
|
onBeforeSaveHandleRecord(params) {
|
||||||
params.record.TaskID = params.data.TaskID //TaskID传递消息表ID
|
params.record.TaskID = params.data.TaskID //TaskID传递消息表ID
|
||||||
@ -274,18 +276,41 @@ export default {
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
btnCancel: ({ record, onCancel, data, dispatch }) => {
|
//取消
|
||||||
let json = initFilter(record.ORG_ID, record.ID, null, null, null, data.TaskID);
|
btnCancel: ({ record, data, closeForm, login, btn }) => {
|
||||||
dispatch({
|
const data1 = {
|
||||||
type: 'app/getDataByPost',
|
content: <FormPage formCode={btn.FORM_CODE} data={{
|
||||||
url: 'BS/BSSafeCheck/Cancel',
|
id: (record ? record.ID : ''),
|
||||||
payload: json,
|
TaskID: (record ? data.TaskID : ''),
|
||||||
onlyData: false,
|
homeReload: true,
|
||||||
onComplete: (ret) => {
|
rules: [record],
|
||||||
if (ret.IsSuccessful == true) {
|
close: () => {
|
||||||
message.success('执行成功', null, onCancel())
|
closeForm();
|
||||||
}
|
},
|
||||||
}
|
onCancel: () => {
|
||||||
})
|
//wyw 此方法要有不能被删除 别处会重写
|
||||||
|
},
|
||||||
|
}} />,
|
||||||
|
};
|
||||||
|
return {
|
||||||
|
content: <ShowModal data={data1} login={login} title={btn.LABEL}>
|
||||||
|
<Button type={btn.CSS} icon={btn.ICON}>{btn.LABEL}</Button>
|
||||||
|
</ShowModal>
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
// 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())
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// },
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
28
src/files/edit/BS078.js
Normal file
28
src/files/edit/BS078.js
Normal file
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user