소스 검색

家庭成员调整

zhengkaixin 3 년 전
부모
커밋
f6efb19efa

+ 2 - 4
src/projects/business/apis/Master/family.js

@@ -33,10 +33,8 @@ export function getPersonInfo(id) {
 //删除成员
 export function delPerson(id) {
 	return request({
-		url: '/mobile/personFamilyApi/delete',
-		data: Qs.stringify({
-			id: id
-		}),
+		url: '/base/personPopedom/deleteForce/'+id,
+		
 		method: 'post',
 	})
 }

+ 48 - 15
src/projects/business/views/Master/Company/RegisterExamine.vue

@@ -36,7 +36,7 @@
 											<div class="mui-media-object mui-pull-left vongi-buka"><img :src="item.faceImageUrl"></div>
 											<div class="mui-media-body">
 												{{item.name}}
-												<p class='mui-ellipsis'>申请注册为<span class="colorfe616c" v-text="item.personRoleName"></span></p>
+												<p class='mui-ellipsis'>申请注册为<span class="colorfe616c" v-text="item.personRoleName+(item.structureName?' '+item.structureName:'')"></span></p>
 												<p class='mui-ellipsis'>{{showTel(item.telephone)}}</p>
 												<h5 class="vongi-bksp-time" v-text="item.createTime.substr(5)"></h5>
 											</div>
@@ -58,7 +58,7 @@
 											<div class="mui-media-object mui-pull-left vongi-buka"><img :src="item.faceImageUrl"></div>
 											<div class="mui-media-body">
 												{{item.name}}
-												<p class='mui-ellipsis' v-text="item.personRoleName"></p>
+												<p class='mui-ellipsis' v-text="item.personRoleName+(item.structureName?' '+item.structureName:'')"></p>
 												<p class='mui-ellipsis'>{{showTel(item.telephone)}}</p>
 											</div>
 											<button type="button" :class="'mui-btn mui-btn-success mui-btn-outlined '+(item.status>0?(item.status==1?'status_a':'status_r'):'')"
@@ -169,7 +169,7 @@
 							this.firstRecordsTotal = response.recordsTotal;
 						}
 					}
-
+					
 					this.listForm.pageIndex++;
 					this.isLoading = false;
 				}).catch(error => {
@@ -235,20 +235,35 @@
 						if (e.index == 1) {
 							//同意
 							if (_this.subForm.status == 1) {
-								_this.set_register_examine_form(_this.subForm);
-								if (_this.hasSceneId1) {
-									_this.$router.push({
-										name: 'MasterCompanyRegisterSelectDepartment',
-									})
-								} else {
-									_this.$router.push({
-										name: 'MasterCompanyRegisterSelectDevice',
-										query: {
-											hasSceneId1: _this.hasSceneId1 ? '1' : '0',
-											hasSceneId4: _this.hasSceneId4 ? '1' : '0',
-										}
+								if(_this.hasSceneId2){//场景值2 直接同意
+									//同意
+									_this.isLoading = true;
+									API_Company.doApply(_this.subForm).then(response => {
+										_this.isLoading = false;
+										mui.toast('处理成功');
+										_this.listForm.pageIndex = 1;
+										_this.getList();
+									}).catch(error => {
+										_this.isLoading = false;
+										mui.toast(error);
 									})
+								}else{
+									_this.set_register_examine_form(_this.subForm);
+									if (_this.hasSceneId1) {
+										_this.$router.push({
+											name: 'MasterCompanyRegisterSelectDepartment',
+										})
+									} else {
+										_this.$router.push({
+											name: 'MasterCompanyRegisterSelectDevice',
+											query: {
+												hasSceneId1: _this.hasSceneId1 ? '1' : '0',
+												hasSceneId4: _this.hasSceneId4 ? '1' : '0',
+											}
+										})
+									}
 								}
+								
 							} else {
 								//拒绝
 								_this.isLoading = true;
@@ -300,6 +315,24 @@
 					console.log(newValue)
 				}
 			},
+			hasSceneId2: {
+				// 全是场景2
+				get: function() {
+					
+					for (var i = 0; i < this.recordList.length; i++) {
+						if (this.selectIdList.indexOf(this.recordList[i]['id']) > -1 && this.recordList[i]['sceneId'] == '2') {
+							
+						}else{
+							return false;
+						}
+					}
+					return true;
+				},
+				// setter
+				set: function(newValue) {
+					console.log(newValue)
+				}
+			},
 			hasSceneId4: {
 				// getter
 				get: function() {

+ 35 - 13
src/projects/business/views/Master/Company/RegisterInfo.vue

@@ -146,7 +146,11 @@
 					this.subForm.status = status;
 					this.subForm.content = status == 1 ? '同意' : '拒绝';
 					//this.openFromVisible = true;
+					
+					 
 					this.doAction();
+					
+					
 				}
 			},
 			//检测表单
@@ -158,30 +162,48 @@
 					return true;
 				}
 			},
+			
+			
 			//同意拒绝
 			doAction() {
 				this.subForm.ids = this.selectIdList.join(',');
 				if (this.checkForm()) {
 					var _this = this;
 					var btnArray = ['否', '是'];
-					mui.confirm('是否' + _this.subForm.content + '所勾选的注册申请?', '提示', btnArray, function(e) {
+					mui.confirm('是否' + _this.subForm.content + '注册申请?', '提示', btnArray, function(e) {
 						if (e.index == 1) {
+							
 							//同意
 							if (_this.subForm.status == 1) {
-								_this.set_register_examine_form(_this.subForm);
-								if (_this.hasSceneId1) {
-									_this.$router.push({
-										name: 'MasterCompanyRegisterSelectDepartment',
-									})
-								} else {
-									_this.$router.push({
-										name: 'MasterCompanyRegisterSelectDevice',
-										query: {
-											hasSceneId1: _this.hasSceneId1 ? '1' : '0',
-											hasSceneId4: _this.hasSceneId4 ? '1' : '0',
-										}
+								//场景值2的审批 业主
+								if(_this.detail.sceneId==2){
+									//直接同意无需选择
+									_this.isLoading = true;
+									API_Company.doApply(_this.subForm).then(response => {
+										_this.isLoading = false;
+										mui.toast('处理成功');
+										_this.getDetail();
+									}).catch(error => {
+										_this.isLoading = false;
+										mui.toast(error);
 									})
+								}else{
+									_this.set_register_examine_form(_this.subForm);
+									if (_this.hasSceneId1) {
+										_this.$router.push({
+											name: 'MasterCompanyRegisterSelectDepartment',
+										})
+									} else {
+										_this.$router.push({
+											name: 'MasterCompanyRegisterSelectDevice',
+											query: {
+												hasSceneId1: _this.hasSceneId1 ? '1' : '0',
+												hasSceneId4: _this.hasSceneId4 ? '1' : '0',
+											}
+										})
+									}
 								}
+								
 							} else {
 								//拒绝
 								_this.isLoading = true;

+ 2 - 2
src/projects/business/views/Master/Family/Add.vue

@@ -84,7 +84,7 @@
 				isLoading: false,
 
 				rightLink: {
-					show: true,
+					show: false,
 					icon: 'mui-icon-trash',
 					style: 'color:#FF6666',
 					title: ''
@@ -235,7 +235,7 @@
 			},
 			del() {
 				this.isLoading = true;
-				API_Family.delPerson(this.subForm.id).then(response => {
+				API_Family.delPersonPope(this.subForm.id).then(response => {
 					this.isLoading = false;
 
 					mui.toast('删除成功');

+ 13 - 0
src/projects/business/views/Master/Family/Home.vue

@@ -16,6 +16,7 @@
 						</div>
 						<!-- <span class=" mui-badge vongi-badge-primary">家属</span> -->
 					</router-link>
+				<button type="button" @click="del(item.popedomId)" class="mui-btn mui-btn-danger ">删除</button>
 				</li>
 			</ul>
 		</div>
@@ -66,6 +67,18 @@
 		},
 		created() {},
 		methods: {
+			del(id){
+				this.isLoading = true;
+				API_Family.delPerson(id).then(response => {
+					mui.toast("删除成功");
+					this.listForm.pageIndex =1;
+					this.getList() ;
+					this.isLoading = false;
+				}).catch(error => {
+					this.isLoading = false;
+					mui.toast(error);
+				})
+			},
 			//获取列表
 			getList() {
 				this.isLoading = true;

+ 6 - 0
src/projects/business/views/Master/Home.vue

@@ -190,6 +190,10 @@
 			//选择角色
 			selectRole() {
 				var roleList = [];
+				if(this.roleList.length==0){
+					mui.toast("加载中..");
+					return
+				}
 				for (var i = 0; i < this.roleList.length; i++) {
 					var preName = this.person_popedom.id == this.roleList[i]['id'] ? '(当前)' : '';
 					roleList.push({
@@ -200,6 +204,8 @@
 				var _this = this;
 				var picker = new mui.PopPicker();
 				picker.setData(roleList);
+				picker.pickers[0].setSelectedValue(this.person_popedom.id , 2000);
+
 				picker.show(function(selectItems) {
 					_this.switchRole(selectItems[0].value);
 				})

+ 1 - 1
src/projects/business/views/Master/Tenant/Add.vue

@@ -84,7 +84,7 @@
 				isLoading: false,
 
 				rightLink: {
-					show: true,
+					show: false,
 					icon: 'mui-icon-trash',
 					style: 'color:#FF6666',
 					title: ''

+ 14 - 0
src/projects/business/views/Master/Tenant/Home.vue

@@ -14,6 +14,8 @@
 								<p class='mui-ellipsis' v-text="item.phone"></p>
 							</div>
 						</div>
+						<button type="button" @click="del(item.popedomId)" class="mui-btn mui-btn-danger ">删除</button>
+						
 						<!-- <span class=" mui-badge vongi-badge-primary">家属</span> -->
 					</router-link>
 				</li>
@@ -66,6 +68,18 @@
 		},
 		created() {},
 		methods: {
+			del(id){
+				this.isLoading = true;
+				API_Family.delPerson(id).then(response => {
+					mui.toast("删除成功");
+					this.listForm.pageIndex =1;
+					this.getList() ;
+					this.isLoading = false;
+				}).catch(error => {
+					this.isLoading = false;
+					mui.toast(error);
+				})
+			},
 			//获取列表
 			getList() {
 				this.isLoading = true;

+ 1 - 1
src/projects/home/views/Register/Business/Step4.vue

@@ -140,7 +140,7 @@
 					fixedNumber: [5, 7]
 				},
 
-				agreement: 0,
+				agreement: 1,
 			}
 		},
 		created() {

+ 1 - 1
src/projects/home/views/Register/Pension/Step4.vue

@@ -150,7 +150,7 @@
 					fixedNumber: [5, 7]
 				},
 				
-				agreement: 0,
+				agreement: 1,
 			}
 		},
 		created() {

+ 1 - 1
src/projects/home/views/Register/Residence/Step4.vue

@@ -141,7 +141,7 @@
 					fixedNumber: [5, 7]
 				},
 
-				agreement: 0,
+				agreement: 1,
 			}
 		},
 		created() {