|
|
|
|
@ -357,6 +357,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.form["faburiqi"] = this.$moment(new Date()).format("YYYY-MM-DD");
|
|
|
|
|
this.form["shenhebumen"] = this.$store.state.user.department?.id;
|
|
|
|
|
this.$refs["elForm"].clearValidate();
|
|
|
|
|
},
|
|
|
|
|
show() {
|
|
|
|
|
@ -601,8 +602,8 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
if (i.field === 'shenhebumen') {
|
|
|
|
|
this.form[i.field] = this.$store.state.user.department?.id
|
|
|
|
|
if (i.field === "shenhebumen") {
|
|
|
|
|
this.form[i.field] = this.$store.state.user.department?.id;
|
|
|
|
|
}
|
|
|
|
|
if (i.field === "faburiqi") {
|
|
|
|
|
this.form[i.field] = this.$moment(new Date()).format(
|
|
|
|
|
@ -614,7 +615,17 @@ export default {
|
|
|
|
|
/^\/manage\/form/.test(this.$route.fullPath)
|
|
|
|
|
) {
|
|
|
|
|
this.rules[i.field] = [
|
|
|
|
|
{ required: true, message: `请选择${i.name}` },
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: `请选择${i.name}`,
|
|
|
|
|
validator: (rule, value, callback) => {
|
|
|
|
|
if (this.file[i.field] && this.file[i.field].length > 0) {
|
|
|
|
|
callback();
|
|
|
|
|
} else {
|
|
|
|
|
callback(new Error("请选择附件"));
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -633,6 +644,9 @@ export default {
|
|
|
|
|
this.init();
|
|
|
|
|
this.$refs["elForm"].clearValidate();
|
|
|
|
|
delete this.form.id;
|
|
|
|
|
for (let key in this.file) {
|
|
|
|
|
this.file[key] = [];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|