linwenxin 6 hónapja
szülő
commit
cd3e25137a
1 módosított fájl, 27 hozzáadás és 8 törlés
  1. 27 8
      src/views/userManagement/masterManagement/index.vue

+ 27 - 8
src/views/userManagement/masterManagement/index.vue

@@ -311,7 +311,7 @@ export default {
           formItemAttributes: {
             label: '师傅编号',
             prop: 'workerNumber',
-            rules: [...required]
+            rules: []
           }
         },
         {
@@ -1337,13 +1337,32 @@ export default {
             this.$message({ type: 'warning', message: `复审日期必须必须在有效期内!` })
             return
           }
-          this.shenheClose()
-          workerManagerUpdate(this.getPam()).then(res => {
-            this.$message({ type: 'success', message: `保存成功!` })
-            this.guanbi()
-            this.$refs.pageRef.refreshList()
-            Close_?.()
-          })
+
+          if (this.formData.user.workerNumber) {
+            this.shenheClose()
+            workerManagerUpdate(this.getPam()).then(res => {
+              this.$message({ type: 'success', message: `保存成功!` })
+              this.guanbi()
+              this.$refs.pageRef.refreshList()
+              Close_?.()
+            })
+          } else {
+            this.$confirm('师傅编号为空, 是否继续?', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning'
+            })
+              .then(() => {
+                this.shenheClose()
+                workerManagerUpdate(this.getPam()).then(res => {
+                  this.$message({ type: 'success', message: `保存成功!` })
+                  this.guanbi()
+                  this.$refs.pageRef.refreshList()
+                  Close_?.()
+                })
+              })
+              .catch(() => {})
+          }
         }
       })
     },