浏览代码

Merge branch 'blueBranch' into allTestUrgent

qymljy 4 月之前
父节点
当前提交
b30513de34
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      src/HDrpManagement/projectChange/modules/modules/contract/components/add.vue

+ 8 - 0
src/HDrpManagement/projectChange/modules/modules/contract/components/add.vue

@@ -524,6 +524,7 @@ export default {
     },
     addBtn (type) {
       this.form = Object.assign({},this.form,this.data)
+      this.form.signdate = this.getTodayDate()
       if (this.flagTag != 2){
         this.$message.error('当前项目报备审核未通过,不可创建合同');
       }else {
@@ -550,6 +551,13 @@ export default {
       //   })
       // }
     },
+    getTodayDate() {
+      const today = new Date();
+      const year = today.getFullYear();
+      const month = String(today.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需+1
+      const day = String(today.getDate()).padStart(2, '0');
+      return `${year}-${month}-${day}`;
+    },
     async onSubmit () {
       this.$refs.form.validate(async val => {
         if (val) {