Browse Source

【ID1005701】修改bug单

zhangdan 4 years ago
parent
commit
83a1dcd990

+ 1 - 1
src/views/userInfo/editLdNumModal.vue

@@ -114,10 +114,10 @@ export default {
             console.log(res, 'rrrrrrrrr')
             console.log(res, 'rrrrrrrrr')
             if (res.status == 200) {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$message.success(res.message)
-              location.reload()
               // _this.$router.push({ path: `/userInfo/userManageList/list` })
               // _this.$router.push({ path: `/userInfo/userManageList/list` })
               setTimeout(function () {
               setTimeout(function () {
                 _this.isShow = false
                 _this.isShow = false
+				 location.reload()
               }, 300)
               }, 300)
             }
             }
           })
           })

+ 2 - 3
src/views/userInfo/editUserPhoneModal.vue

@@ -64,11 +64,10 @@ export default {
             console.log(res, 'rrrrrrrrr')
             console.log(res, 'rrrrrrrrr')
             if (res.status == 200) {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$message.success(res.message)
-              location.reload()
-              // _this.$emit('refresh')
-   		  // _this.$router.push({ path: `/userInfo/userManageList/list` })
+              // _this.$router.push({ path: `/userInfo/userManageList/list` })
               setTimeout(function () {
               setTimeout(function () {
                 _this.isShow = false
                 _this.isShow = false
+                location.reload()
               }, 300)
               }, 300)
             }
             }
           })
           })

+ 20 - 8
src/views/userInfo/editUseridentityModal.vue

@@ -42,8 +42,13 @@ export default {
     userId: {
     userId: {
       type: String,
       type: String,
       default: ''
       default: ''
+    },
+    customerRoleDictValue: {
+      type: Object,
+      default: function () {
+        return {}
+      }
     }
     }
-
   },
   },
   data () {
   data () {
     return {
     return {
@@ -66,11 +71,10 @@ export default {
             console.log(res, 'rrrrrrrrr')
             console.log(res, 'rrrrrrrrr')
             if (res.status == 200) {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$message.success(res.message)
-			   location.reload()
-              // _this.$emit('refresh')
               // _this.$router.push({ path: `/userInfo/userManageList/list` })
               // _this.$router.push({ path: `/userInfo/userManageList/list` })
               setTimeout(function () {
               setTimeout(function () {
                 _this.isShow = false
                 _this.isShow = false
+                location.reload()
               }, 300)
               }, 300)
             }
             }
           })
           })
@@ -82,14 +86,22 @@ export default {
     openUseridentityMoadl (newValue, oldValue) {
     openUseridentityMoadl (newValue, oldValue) {
       this.isShow = newValue
       this.isShow = newValue
     },
     },
-    isShow (val) {
+    isShow (newValue, oldValue) {
       console.log(this.userId)
       console.log(this.userId)
-      if (!val) {
+	  if (newValue) {
+	      this.formData = Object.assign({}, this.customerRoleDictValue)
+	      console.log(this.formData, 'this.formData')
+	  } else {
         this.$emit('close')
         this.$emit('close')
-      } else {
-   	  this.form.resetFields()
-      }
+	  }
+      //    if (!newValue) {
+      //      this.$emit('close')
+      //    } else {
+      // 	  this.form.resetFields()
+	  // this.formData = Object.assign({}, this.customerRoleDictValue)
+      //    }
     }
     }
+
   }
   }
 }
 }
 </script>
 </script>

+ 3 - 1
src/views/userInfo/userDetails.vue

@@ -69,7 +69,7 @@
     <!-- 修改乐豆余额弹窗 -->
     <!-- 修改乐豆余额弹窗 -->
     <edit-ldNum-modal :customerNo="customerNo" :openLdNumModal="openLdNumModal" @close="openLdNumModal=false"></edit-ldNum-modal>
     <edit-ldNum-modal :customerNo="customerNo" :openLdNumModal="openLdNumModal" @close="openLdNumModal=false"></edit-ldNum-modal>
     <!-- 修改用户身份 -->
     <!-- 修改用户身份 -->
-    <edit-useridentity-modal :userId="userId" :openUseridentityMoadl="openUseridentityMoadl" @close="openUseridentityMoadl=false"></edit-useridentity-modal>
+    <edit-useridentity-modal :userId="userId" :customerRoleDictValue="customerRoleDictValue" :openUseridentityMoadl="openUseridentityMoadl" @close="openUseridentityMoadl=false"></edit-useridentity-modal>
   </a-card>
   </a-card>
 </template>
 </template>
 
 
@@ -93,6 +93,7 @@ export default {
       openUserPhoneMoadl: false, // 默认关闭手机号码弹窗
       openUserPhoneMoadl: false, // 默认关闭手机号码弹窗
       customerNo: '', // 用户编号
       customerNo: '', // 用户编号
       openLdNumModal: false, // 默认关闭乐豆余额弹窗
       openLdNumModal: false, // 默认关闭乐豆余额弹窗
+	  customerRoleDictValue: {}, // 用户身份
       openUseridentityMoadl: false, // 默认关闭用户身份弹窗
       openUseridentityMoadl: false, // 默认关闭用户身份弹窗
       page: {}, // 详情数据
       page: {}, // 详情数据
       adderss: ''
       adderss: ''
@@ -112,6 +113,7 @@ export default {
     // 修改用户身份
     // 修改用户身份
     editUseridentity (page) {
     editUseridentity (page) {
       this.userId = this.page.id
       this.userId = this.page.id
+	  this.customerRoleDictValue = this.page
       this.openUseridentityMoadl = true
       this.openUseridentityMoadl = true
     },
     },
     // 返回列表
     // 返回列表