diff --git a/src/views/forceNotice/inclusion/handle.vue b/src/views/forceNotice/inclusion/handle.vue index 8ac9aee..d57499e 100644 --- a/src/views/forceNotice/inclusion/handle.vue +++ b/src/views/forceNotice/inclusion/handle.vue @@ -276,6 +276,16 @@ export default { span: 12, isView: ({ formData }) => { return formData.status !== '0' + }, + onChange: ({ formData }) => { + if (!formData && !formData.noticeFrom) return; + const fromDate = new Date(formData.noticeFrom); + const toDate = new Date(fromDate.getTime() + 90 * 24 * 60 * 60 * 1000); + const year = toDate.getFullYear(); + const month = String(toDate.getMonth() + 1).padStart(2, '0'); + const day = String(toDate.getDate()).padStart(2, '0'); + const toDateStr = `${year}-${month}-${day}`; + formData.noticeTo = toDateStr; } }, { @@ -284,7 +294,8 @@ export default { prop: 'noticeTo', required: true, formProps: { - valueFormat: 'yyyy-MM-dd' + valueFormat: 'yyyy-MM-dd', + disabled: true }, span: 12, isView: ({ formData }) => {