|
@@ -759,7 +759,7 @@ export default {
|
|
|
//1.2 提交表单
|
|
|
addToServe() {
|
|
|
//先进行验证
|
|
|
- console.log(this.form, '-------------form--------');
|
|
|
+ console.log(this.form, '-------------form1--------');
|
|
|
this.$refs.form.validate(valid => {
|
|
|
|
|
|
if (valid) {
|
|
@@ -781,12 +781,13 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- if (formCopy.jobtime != '' || formCopy.jobtime != null) {
|
|
|
+ if (formCopy.jobtime != '' && formCopy.jobtime != null && formCopy.jobtime != undefined) {
|
|
|
formCopy.jobtime = formatLocalDate(formCopy.jobtime);
|
|
|
} else {
|
|
|
formCopy.jobtime = null;
|
|
|
}
|
|
|
- if (formCopy.birth != '' || formCopy.birth != null) {
|
|
|
+ console.log(formCopy.birth, "-----------------birth----------");
|
|
|
+ if (formCopy.birth != '' && formCopy.birth != null && formCopy.birth != undefined) {
|
|
|
formCopy.birth = formatLocalDate(formCopy.birth);
|
|
|
} else {
|
|
|
formCopy.birth = null;
|
|
@@ -956,16 +957,19 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- if (formCopy.jobtime != '' || formCopy.jobtime != null) {
|
|
|
+ if (formCopy.jobtime != '' && formCopy.jobtime != null && formCopy.jobtime != undefined) {
|
|
|
formCopy.jobtime = formatLocalDate(formCopy.jobtime);
|
|
|
} else {
|
|
|
formCopy.jobtime = null;
|
|
|
}
|
|
|
- if (formCopy.birth != '' || formCopy.birth != null) {
|
|
|
+ console.log(formCopy.birth, "-----------------birth----------");
|
|
|
+ if (formCopy.birth != '' && formCopy.birth != null && formCopy.birth != undefined) {
|
|
|
formCopy.birth = formatLocalDate(formCopy.birth);
|
|
|
} else {
|
|
|
formCopy.birth = null;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
formCopy.job_timeList.forEach(item => {
|
|
|
item = formatLocalDate(item);
|
|
|
});
|