Procházet zdrojové kódy

feature:打卡合作伙伴联系人改为必填,解决切换合作伙伴联系人没有删除的问题

liuzl před 2 roky
rodič
revize
119eb4a7e8

+ 1 - 0
components/SelectPartners.vue

@@ -85,6 +85,7 @@
         }
       },
       open() {
+        this.selected = null
         this.selectVisible = true
         this.getUserList()
       },

+ 4 - 1
components/SelectPartnersConcat.vue

@@ -85,7 +85,10 @@
           }
         }
       },
-      open() {
+      open(userValue) {
+        console.log(userValue)
+        this.userValue = userValue || null
+        this.selected = null
         this.selectVisible = true
         this.getUserList()
       },

+ 14 - 1
pages/home/checkIn.vue

@@ -201,6 +201,13 @@
               message: `请选择用户`,
             },
           ],
+          partnerContactName: [
+            {
+              required: true,
+              trigger: ['blur', 'change'],
+              message: `请选择合作伙伴联系人`,
+            },
+          ],
         },
       }
     },
@@ -217,6 +224,12 @@
       'form.punchType'(val) {
         this.form.targetId = undefined
         this.form.targetName = undefined
+        this.form.partnerContactId = null
+        this.form.partnerContactName = null
+      },
+      'form.targetId'(val) {
+        this.form.partnerContactId = null
+        this.form.partnerContactName = null
       },
     },
     methods: {
@@ -268,7 +281,7 @@
         }
       },
       openPartnersConcat() {
-        this.$refs.partnersConcat.open()
+        this.$refs.partnersConcat.open(this.form.partnerContactId)
       },
       getLocation() {
         this.show = true