|
|
@ -1,5 +1,5 @@
|
|
|
|
import React,{ Component } from "react";
|
|
|
|
import React,{ Component } from "react";
|
|
|
|
import { Modal,Checkbox,Upload,Button,Icon,message} from "antd";
|
|
|
|
import { Modal,Checkbox,Upload,Button,Icon,message,notification} from "antd";
|
|
|
|
import { WordsBtn,getUrl, getUploadActionUrl} from 'educoder';
|
|
|
|
import { WordsBtn,getUrl, getUploadActionUrl} from 'educoder';
|
|
|
|
import axios from 'axios';
|
|
|
|
import axios from 'axios';
|
|
|
|
import Modals from '../../modals/Modals';
|
|
|
|
import Modals from '../../modals/Modals';
|
|
|
@ -110,6 +110,7 @@ class AccessoryModal extends Component{
|
|
|
|
this.props.Cancel()
|
|
|
|
this.props.Cancel()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Saves=()=>{
|
|
|
|
Saves=()=>{
|
|
|
|
|
|
|
|
|
|
|
|
let id=this.props.categoryid;
|
|
|
|
let id=this.props.categoryid;
|
|
|
|
let {fileList,description} =this.state;
|
|
|
|
let {fileList,description} =this.state;
|
|
|
|
|
|
|
|
|
|
|
@ -131,10 +132,12 @@ class AccessoryModal extends Component{
|
|
|
|
description:description,
|
|
|
|
description:description,
|
|
|
|
attachment_ids:newfileList
|
|
|
|
attachment_ids:newfileList
|
|
|
|
}).then((result)=>{
|
|
|
|
}).then((result)=>{
|
|
|
|
console.log(result)
|
|
|
|
|
|
|
|
if(result !== undefined){
|
|
|
|
if(result.data.status===0){
|
|
|
|
this.props.setupdate()
|
|
|
|
debugger
|
|
|
|
this.props.showNotification('提交成功')
|
|
|
|
this.props.Cancel()
|
|
|
|
|
|
|
|
this.props.setupdate()
|
|
|
|
|
|
|
|
|
|
|
|
// this.setState({
|
|
|
|
// this.setState({
|
|
|
|
// Modalstype:true,
|
|
|
|
// Modalstype:true,
|
|
|
|
// Modalstopval:result.data.message,
|
|
|
|
// Modalstopval:result.data.message,
|
|
|
@ -142,9 +145,16 @@ class AccessoryModal extends Component{
|
|
|
|
// loadtype:true
|
|
|
|
// loadtype:true
|
|
|
|
// })
|
|
|
|
// })
|
|
|
|
this.ModalCancelModalCancel()
|
|
|
|
this.ModalCancelModalCancel()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
notification.open({
|
|
|
|
|
|
|
|
message: '提示',
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
'提交成功'
|
|
|
|
|
|
|
|
});
|
|
|
|
if(this.props.seeworks!=undefined){
|
|
|
|
if(this.props.seeworks!=undefined){
|
|
|
|
this.props.history.push(this.props.seeworks);
|
|
|
|
this.props.history.push(this.props.seeworks);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}).catch((error)=>{
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
|
|
|
|
|
|
@ -170,10 +180,12 @@ class AccessoryModal extends Component{
|
|
|
|
description:description,
|
|
|
|
description:description,
|
|
|
|
attachment_ids:newfileList
|
|
|
|
attachment_ids:newfileList
|
|
|
|
}).then((result)=>{
|
|
|
|
}).then((result)=>{
|
|
|
|
console.log(result)
|
|
|
|
|
|
|
|
if(result.data.status===0){
|
|
|
|
if(result.data.status===0){
|
|
|
|
|
|
|
|
debugger
|
|
|
|
|
|
|
|
this.props.Cancel()
|
|
|
|
this.props.setupdate()
|
|
|
|
this.props.setupdate()
|
|
|
|
this.props.showNotification('提交成功')
|
|
|
|
|
|
|
|
// this.setState({
|
|
|
|
// this.setState({
|
|
|
|
// Modalstype:true,
|
|
|
|
// Modalstype:true,
|
|
|
|
// Modalstopval:result.data.message,
|
|
|
|
// Modalstopval:result.data.message,
|
|
|
@ -182,9 +194,15 @@ class AccessoryModal extends Component{
|
|
|
|
// })
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
|
|
this.ModalCancelModalCancel()
|
|
|
|
this.ModalCancelModalCancel()
|
|
|
|
|
|
|
|
notification.open({
|
|
|
|
|
|
|
|
message: '提示',
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
'提交成功'
|
|
|
|
|
|
|
|
});
|
|
|
|
if(this.props.seeworks!=undefined){
|
|
|
|
if(this.props.seeworks!=undefined){
|
|
|
|
this.props.history.push(this.props.seeworks);
|
|
|
|
this.props.history.push(this.props.seeworks);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}).catch((error)=>{
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
|
|
|
|
|
|
|