Browse Source

邀请企业邮箱

jack 8 years ago
parent
commit
8b01066778
1 changed files with 24 additions and 2 deletions
  1. 24 2
      cmp-portal/js/cmp-staffList.js

+ 24 - 2
cmp-portal/js/cmp-staffList.js

@ -141,7 +141,7 @@ $(document).ready(function() {
141 141
		}
142 142
	})
143 143
	$("button:contains('邀请')").on("click",function(){
144
		var oMail=$(this).val();
144
		var oMail=$("#mail").val();
145 145
		var gunf = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
146 146
		if(oMail.trim().length==0) {
147 147
			$.MsgBox.Alert('提示', '请输入您企业员工的邮箱地址');
@ -151,7 +151,29 @@ $(document).ready(function() {
151 151
			$.MsgBox.Alert('提示', '请输入正确的邮箱地址');
152 152
			return;
153 153
		}else{
154
			
154
			$.ajax({
155
			url: "/ajax/inviteStaffMail",
156
			type: "GET",
157
			timeout: 10000,
158
			dataType: "json",
159
			data: {
160
				"orgId": id,
161
				"mail" :oMail
162
			},
163
			success: function(data, textState) {
164
				if(data.success) {
165
					if(data.data){
166
						$.MsgBox.Alert('提示', '已发送邀请邮件');
167
						$("#mail").val("");
168
					}
169
				}else{
170
					$.MsgBox.Alert('提示',data.msg);
171
				}
172
			},
173
			error: function(XMLHttpRequest, textStats, errorThrown) {
174
				$.MsgBox.Alert('提示', '服务器请求失败')
175
			}
176
		})
155 177
		}
156 178
	})
157 179
})