wgl пре 4 година
родитељ
комит
abe2f15012

+ 2 - 1
src/projects/pension/router/master.js

@@ -363,9 +363,10 @@ const routesMaster = [
 						name: 'MasterRelativesPhoneSave',
 						component: () => import('../views/Master/Relatives/PhoneSave.vue'),
 						meta: {
-							requireAuth: false,
+							requireAuth: true,
 							role: [],
 							title: '通讯录联系人新增修改',
+							form: true
 						}
 					},
 				],

+ 21 - 1
src/projects/pension/views/Master/Relatives/PhoneSave.vue

@@ -24,7 +24,7 @@
 			</div>
 			<div class="vongi-btn vongi-login-btn">
 				<button class="mui-btn mui-btn-pink" @click="save">保 存</button>
-				<button class="mui-btn mui-btn-danger mui-btn-outlined">删除联系人</button>
+				<button v-show="actionType=='edit'" @click="del" class="mui-btn mui-btn-danger mui-btn-outlined">删除联系人</button>
 			</div>
 		</div>
 
@@ -114,6 +114,26 @@
 					})
 				}
 			},
+			//删除
+			del() {
+				var _this = this;
+				var btnArray = ['取消', '确定'];
+				mui.confirm('确定删除此联系人吗?', '删除联系人', btnArray, function(e) {
+					if (e.index == 1) {
+						_this.isLoading = true;
+						API_Relatives.delPhoneNumber(_this.subForm.bookId).then(response => {
+							_this.isLoading = false;
+
+							mui.toast('处理成功');
+							_this.$router.go(-1);
+
+						}).catch(error => {
+							_this.isLoading = false;
+							mui.toast(error);
+						})
+					}
+				});
+			},
 			asynCallBack() {},
 		},
 		mounted() {