This commit is contained in:
zhutianqi
2021-12-30 18:08:19 +08:00
parent bb64874a2e
commit a8e2bc9a3c
2 changed files with 13 additions and 1 deletions
@@ -35,6 +35,7 @@
<el-form-item label="完成时间" prop="date" class="add-form-item form-item-disabled"> <el-form-item label="完成时间" prop="date" class="add-form-item form-item-disabled">
<el-date-picker <el-date-picker
v-model="form.date" v-model="form.date"
:picker-options="pickerOptions"
type="date" type="date"
placeholder="请选择完成时间"> placeholder="请选择完成时间">
</el-date-picker> </el-date-picker>
@@ -261,6 +262,11 @@
name: "bzdyStep1-1", name: "bzdyStep1-1",
data() { data() {
return { return {
pickerOptions: {
disabledDate(time) {
return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择今天的
}
},
drawerTitle2: '', drawerTitle2: '',
type2: '', type2: '',
foldFormFlag: false, foldFormFlag: false,
@@ -355,7 +361,11 @@
bpnId: this.$route.query.bpnId bpnId: this.$route.query.bpnId
}).then(res => { }).then(res => {
let mes = JSON.parse(res.mes) let mes = JSON.parse(res.mes)
if (mes.form.date) {
mes.form.date = new Date(this.$moment(mes.form.date).format('YYYY-MM-DD')) mes.form.date = new Date(this.$moment(mes.form.date).format('YYYY-MM-DD'))
} else {
mes.form.date = ''
}
this.form = mes.form this.form = mes.form
this.roleForm = mes.roleForm this.roleForm = mes.roleForm
this.commentText = mes.commentText this.commentText = mes.commentText
@@ -535,6 +535,8 @@ export default {
roleForm: this.roleForm, roleForm: this.roleForm,
commentText: this.commentText commentText: this.commentText
})) }))
console.log(this.form);
return
saveTaskFirst(_formData).then(res => { saveTaskFirst(_formData).then(res => {
this.saveLoading = false this.saveLoading = false
this.$message.success('保存成功') this.$message.success('保存成功')