| | |
| | | faid: 0, |
| | | maid: 0, |
| | | form: {}, |
| | | zinfid: undefined, |
| | | defaultProps: { |
| | | children: "children", |
| | | label: "label" |
| | |
| | | if(this.fid!="-1") |
| | | { |
| | | //查询不是本家的时候,可以选择的配偶信息 |
| | | alert(this.fid) |
| | | |
| | | getInfoByFid(this.fid).then(response=>{ |
| | | console.log("--------------------") |
| | |
| | | }, |
| | | handleFamily() |
| | | { |
| | | alert(this.form.isMyFamily) |
| | | |
| | | if(this.form.isMyFamily=="0") |
| | | this.isshowMri = true |
| | | }, |
| | | getAllIn(){ |
| | | // alert(123) |
| | | getAllInfo().then(response => { |
| | | // this.allInfo = response.data; |
| | | // console.log(response.data) |
| | | // alert(982) |
| | | }) |
| | | }, |
| | | getRole(){ |
| | | this.form.roleIds = [] |
| | | //alert(123) |
| | | this.form.roleIds.push(this.rt) |
| | | }, |
| | | getFamlilyInfo(){ |
| | |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const userId = row.userId || this.ids; |
| | | // alert(userId) |
| | | |
| | | // this.fid = response.data.familyId |
| | | //alert(this.fid) |
| | |
| | | |
| | | getIndividual(userId).then(response => { |
| | | // alert(123) |
| | | console.log('++++++++-----0000((((((9999))))))') |
| | | console.log(response.data) |
| | | if(response.data!=undefined) |
| | | { |
| | | _this.fid = response.data.familyId; |
| | | _this.zinfid = response.data.userId |
| | | } |
| | | } |
| | | ); |
| | |
| | | /** 提交按钮 */ |
| | | submitForm: function() { |
| | | this.$refs["form"].validate(valid => { |
| | | //alert(valid) |
| | | // alert(this.fid) |
| | | //alert(this.rt) |
| | | |
| | | // alert(this.form.roleIds) |
| | | let ps = true |
| | | // alert(this.rt) |
| | | // alert(this.fid) |
| | | |
| | | if(this.fid=="无") |
| | | this.fid = -1 |
| | | let _this = this |
| | |
| | | this.$modal.msgSuccess("家庭成员,必须要拥有家庭号!"); |
| | | return |
| | | } |
| | | // alert(ps) |
| | | |
| | | if(ps) |
| | | { |
| | | let fm = {} |
| | | fm.userId = _this.form.userId |
| | | |
| | | fm.userId = _this.zinfid; |
| | | fm.nickName = this.form.nickName |
| | | fm.roleId =this.rt |
| | | fm.sex = this.form.sex |
| | | fm.status = this.form.status |
| | | fm.familyId = this.fid |
| | | |
| | | fm.isMyFamily = this.form.isMyFamily |
| | | fm.spouseId = this.form.spouseId |
| | | fm.sysId = this.form.userId |
| | | |
| | | if(_this.fid==="无") |
| | | fm.familyId= -1 |
| | | else |
| | | fm.familyId = _this.fid |
| | | this.form.familyId = fm.familyId |
| | | |
| | | console.log(fm) |
| | | if (valid) { |
| | | if (this.form.userId != undefined) { |
| | | updateUser(this.form).then(response => { |
| | | updateUser(fm).then(response => { |
| | | |
| | | |
| | | updateUserInfo(fm).then(response=>{ |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.open = false; |
| | | this.open = false; |
| | | this.getList(); |
| | | _this.rt = undefined |
| | | _this.fid = "无" |
| | | this.isshowMar = false |
| | | this.isshowMri = false |
| | | }) |
| | | }); |
| | | // updateUserInfo(fm).then(response=>{ |
| | | // this.$modal.msgSuccess("修改成功"); |
| | | // this.open = false; |
| | | // this.getList(); |
| | | // _this.rt = undefined |
| | | // _this.fid = "无" |
| | | // this.isshowMar = false |
| | | // this.isshowMri = false |
| | | // }) |
| | | }); |
| | | } else { |
| | | // alert(this.form.ismarry) |
| | | // alert(987) |
| | | |
| | | addUser(this.form).then(response => { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.open = false; |