chenc 3 years ago
parent
commit
c9a3e7b175

+ 6 - 0
src/views/system/UserList.vue

@@ -255,6 +255,12 @@
             width: 100,
             dataIndex: 'phone'
           },
+          {
+            title: '公司',
+            align: "center",
+            width: 180,
+            dataIndex: 'pkOrgName'
+          },
           {
             title: '部门',
             align: "center",

+ 4 - 0
src/views/system/modules/DepartWindow.vue

@@ -122,6 +122,10 @@ export default {
       // 触发表单验证
       this.form.validateFields(err => {
         if (!err) {
+          //获取公司选择的公司数据
+          if(this.orgDefaultValue){
+            this.onChange(this.orgDefaultValue);
+          }
           that.confirmLoading = true
           if (this.userId == null) {
             getAction(this.url.userId)

+ 6 - 3
src/views/system/modules/UserModal.vue

@@ -332,6 +332,9 @@
           }, 5)
         }
         that.userId = record.id;
+        //修改赋值公司id
+        this.orgObject.pkOrg=record.pkOrg
+        this.orgObject.pkOrgName=record.pkOrgName
         this.userObject=record
         that.visible = true;
         that.model = Object.assign({}, record);
@@ -403,9 +406,9 @@
       },
       moment,
       handleSubmit () {
-        if(!this.orgObject.pkOrg){
-          this.$message.warning("请选择公司");
-        }
+        // if(!this.orgObject.pkOrg){
+        //   this.$message.warning("请选择公司");
+        // }
         const that = this;
         // 触发表单验证
         this.form.validateFields((err, values) => {