Browse Source

bug fix:201

chris 1 year ago
parent
commit
5aabd87fbc

+ 1 - 1
src/views/modules/cus/communicate-add-or-update.vue

@@ -666,7 +666,7 @@ export default {
     worderAdd () {
       this.worderVisible = true
       this.$nextTick(() => {
-        this.$refs.worder.init(0, null, 'addItem')
+        this.$refs.worder.init(0, null, 'addItem', null, 'communicate')
       })
     },
     updateWorderHandle (row) {

+ 17 - 8
src/views/modules/worder/add-or-update-dialog.vue

@@ -168,7 +168,7 @@ export default {
       this.visible = false
     },
     // 初始化。type:{addItem:仅回调方法返回数据,update:调用接口更新}
-    async init (id, item, type, projectName) {
+    async init (id, item, type, projectName, bizType) {
       this.id = id || 0
       this.type = type || 'addItem'
       if (item) {
@@ -181,13 +181,22 @@ export default {
         this.dataForm = item
       } else {
         this.isModify = false
-        this.dataForm = {
-          taskName: projectName,
-          content: '尽快报价',
-          planCompletionTime: new Date(),
-          ranks: '1',
-          taskType: 'routine',
-          recordId: Math.round(Math.random() * 1000000)
+        if (bizType === 'communicate') {
+          this.dataForm = {
+            planCompletionTime: new Date(),
+            ranks: '1',
+            taskType: 'routine',
+            recordId: Math.round(Math.random() * 1000000)
+          }
+        } else {
+          this.dataForm = {
+            taskName: projectName,
+            content: '尽快报价',
+            planCompletionTime: new Date(),
+            ranks: '1',
+            taskType: 'routine',
+            recordId: Math.round(Math.random() * 1000000)
+          }
         }
       }
       this.userList = []

+ 7 - 1
src/views/modules/worder/add-or-update.vue

@@ -176,9 +176,15 @@ export default {
             if (t.fileName) { t.name = t.fileName }
           })
         }
-        this.dataForm = item
+        this.dataForm = {
+          ...item,
+          ranks: '1',
+          planCompletionTime: new Date()
+        }
       } else {
         this.dataForm = {
+          ranks: '1',
+          planCompletionTime: new Date(),
           recordId: Math.round(Math.random() * 1000000)
         }
       }