|
@@ -23,16 +23,19 @@ const UpdateSeal = props => {
|
23
|
23
|
}
|
24
|
24
|
|
25
|
25
|
function close(e){
|
26
|
|
- props.onSuccess(e)
|
|
26
|
+ props.onCancel(e)
|
27
|
27
|
}
|
28
|
28
|
|
|
29
|
+ function success(e){
|
|
30
|
+ props.onSuccess(e)
|
|
31
|
+ }
|
29
|
32
|
function handleSubmit (e) {
|
30
|
33
|
e.preventDefault();
|
31
|
34
|
props.form.validateFields((err, values) => {
|
32
|
35
|
if (!err){
|
33
|
36
|
request({ ...apis.seal.updateSealById, urlData:{id: sealId}, data: { ...values, id: sealId, companyId: companyId },}).then((data) => {
|
34
|
37
|
message.info("保存成功")
|
35
|
|
- close({visable:false, sealId:'', companyId: companyId})
|
|
38
|
+ success({visable:false, sealId:'', companyId: companyId})
|
36
|
39
|
}).catch((err) => {
|
37
|
40
|
message.info(err.msg || err.message)
|
38
|
41
|
})
|
|
@@ -82,7 +85,7 @@ const UpdateSeal = props => {
|
82
|
85
|
const { getFieldDecorator } = props.form
|
83
|
86
|
|
84
|
87
|
return (
|
85
|
|
- <Modal footer={null} title="修改印章" visible={props.visible} onCancel={() => close({visable:false, sealId:''})} width={800}>
|
|
88
|
+ <Modal footer={null} title="修改印章" visible={props.visible} onCancel={() => close({visable:false, companyId:companyId, sealId:''})} width={800}>
|
86
|
89
|
<Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={handleSubmit}>
|
87
|
90
|
<Form.Item label="印章名称">
|
88
|
91
|
{getFieldDecorator('sealName',{initialValue:sealData.sealName,
|
|
@@ -104,7 +107,7 @@ const UpdateSeal = props => {
|
104
|
107
|
<Form.Item style={{ width: '400px', margin: 'auto', display: 'flex', justifyContent: 'space-between' }}>
|
105
|
108
|
<Button type="primary" htmlType="submit">确定</Button>
|
106
|
109
|
|
107
|
|
- <Button onClick={() => close({visable:false, sealId:''})}>取消</Button>
|
|
110
|
+ <Button onClick={() => close({visable:false, companyId: companyId, sealId:''})}>取消</Button>
|
108
|
111
|
</Form.Item>
|
109
|
112
|
</Form>
|
110
|
113
|
</Modal>
|