dev_hs
杨树林 6 years ago
parent 6ddc053878
commit 95b705cb04

@ -28,14 +28,14 @@ function disabledDateTime() {
}; };
} }
function disabledDate(current) { // function disabledDate(current) {
console.log(current); // console.log(current);
return current && current < moment().endOf('day').subtract(1, 'days'); // return current && current < moment().endOf('day').subtract(1, 'days');
} // }
function disabledDateysl(current) { // function disabledDateysl(current) {
console.log(current); // console.log(current);
return current && current < moment().endOf('day').add(1, 'days'); // return current && current < moment().endOf('day').add(1, 'days');
} // }
class Goldsubject extends Component { class Goldsubject extends Component {
@ -66,12 +66,12 @@ class Goldsubject extends Component {
const { datatime } = this.state; const { datatime } = this.state;
var datatimes=""; var datatimes="";
// if(datatime!==undefined){ if(datatime!==undefined){
// datatimes=datatime; datatimes=datatime;
datatimes=moment(datatime, dateFormat); datatimes=moment(datatimes, dateFormat).subtract(0, 'days');;
// }else { }else {
// datatimes=datatime; datatimes=datatime;
// } }
if (!startValue || !datatimes) { if (!startValue || !datatimes) {
return false; return false;
} }
@ -84,12 +84,12 @@ class Goldsubject extends Component {
// console.log(moment(new Date(), dateFormat).add(2, 'days')); // console.log(moment(new Date(), dateFormat).add(2, 'days'));
const { datatimetwo } = this.state; const { datatimetwo } = this.state;
var startvalue=""; var startvalue="";
// if(datatimetwo!==undefined){ if(datatimetwo!==undefined){
// startvalue=datatimetwo; startvalue=datatimetwo;
startvalue=moment(datatimetwo, dateFormat); startvalue=moment(startvalue, dateFormat).add(1, 'days');
// }else { }else {
// startvalue=datatimetwo; startvalue=datatimetwo;
// } }
// console.log("结束时间"); // console.log("结束时间");
// console.log(endValue); // console.log(endValue);
// console.log(startvalue); // console.log(startvalue);
@ -313,9 +313,7 @@ class Goldsubject extends Component {
// console.log('Received values of form: ', values); // console.log('Received values of form: ', values);
var datasysl={
let url = "/courses/" + coursesId + ".json";
axios.put(url, {
// subject_id:128, //这是带过来的值 编辑就不要传值了 // subject_id:128, //这是带过来的值 编辑就不要传值了
name: values.classroom, name: values.classroom,
class_period: values.period, class_period: values.period,
@ -325,7 +323,12 @@ class Goldsubject extends Component {
is_public: this.state.is_public, //这是也是带过来的值 is_public: this.state.is_public, //这是也是带过来的值
course_module_types: values.checkboxgroup, course_module_types: values.checkboxgroup,
school:values.school school:values.school
} };
console.log("327");
console.log(datasysl);
let url = "/courses/" + coursesId + ".json";
axios.put(url,
datasysl
).then((response) => { ).then((response) => {
// debugger // debugger
if (response.data.status === 0) { if (response.data.status === 0) {
@ -359,12 +362,9 @@ class Goldsubject extends Component {
}); });
} else { } else {
debugger
this.props.form.validateFields((err, values) => { this.props.form.validateFields((err, values) => {
console.log("错误信息信息信息2"); console.log("错误信息信息信息2");
console.log(err); console.log(err);
console.log("xingxixingxi");
if (err) { if (err) {
return; return;
} }

@ -1315,7 +1315,7 @@ class Trainingjobsetting extends Component {
}) })
if(this.state.allowreplenishment === true) { if(this.state.allowreplenishment === true) {
if(end_time=== undefined || end_time===""){ if(this.state.end_time=== undefined || this.state.end_time===""){
}else { }else {
this.setState({ this.setState({
@ -1323,7 +1323,7 @@ class Trainingjobsetting extends Component {
deadline:moment(handleDateString(dateString)).add(1, 'months').format('YYYY-MM-DD HH:mm'), deadline:moment(handleDateString(dateString)).add(1, 'months').format('YYYY-MM-DD HH:mm'),
}) })
} }
if(late_time===undefined || late_time===""){ if(this.state.late_time===undefined || this.state.late_time===""){
}else{ }else{
this.setState({ this.setState({
@ -1342,7 +1342,7 @@ class Trainingjobsetting extends Component {
} }
}else{ }else{
if(end_time=== undefined || end_time===""){ if(this.state.end_time=== undefined || this.state.end_time===""){
}else { }else {
this.setState({ this.setState({

Loading…
Cancel
Save