- (function(){
- var userId = getItemValueAsString("SALE_FOLLOWERS");
- var source = getItemValueAsString("客户来源");
- var customer = getItemValueAsString("客户联系人");
- var corporateName = getItemValueAsString("CUSTOMER");
- var type = getItemValueAsString("客户类型");
- var phone = getItemValueAsString("联系人号码");
- var demand = getItemValueAsString("客户需求");
- var province = getItemValueAsString("省份");
- var city = getItemValueAsString("城市");
- var docid = getId();
- var formid ="__s3llndccZynQjxG2NtF";
- var domainid = getDomainid();
- var applicationId = getApplication();
- var UserProcessBean = new Packages.cn.myapps.authtime.user.service.UserProcessBean();
- var UserVO = UserProcessBean.doView(userId);
- var email = UserVO.getEmail();
- var LOGINNO = UserVO.getLoginno();
- var Url ="";
-
- var address = province+"-"+ city;
- var emailHtml="";
- var subject ="客户线索分配提醒【"+format(getToday(),"yyyy-MM-dd HH:mm:ss")+"】"
- emailHtml+='<style class="fox_global_style">div.fox_html_content { line-height: 1.5; }div.fox_html_content { font-size: 14px; font-family: "Microsoft YaHei UI"; color: rgb(0, 0, 0); line-height: 1.5; }</style>'+
- '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1">'+
- '<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center" style="background: #FFF;">'+
- '<tbody>'+
- '<tr>'+
- '<td style="padding: 0 15px;">'+
- '<table cellpadding="0" cellspacing="0" border="0" width="100%" style="padding-top: 5px;">'+
- '<tbody><tr height="35">'+
- '<td style="font-weight: 700; color: #666; font-size: 12px;">线索分配明细<span style="font-weight: normal; font-family: Arial, Helvetica, sans-serif;"> Clue allocation details</span>'+
- '</td>'+
- '</tr>'+
- '</tbody>'+
- '</table>'+
- '</td>'+
- '</tr>'+
- '<tr>'+
- '<td width="100%" style="padding: 0 15px;">'+
- '<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center" style="text-align: center; border-collapse: collapse;">'+
- '<tbody><tr height="56" style="background: #f2f2f2;">'+
- '<td width="87" align="center" style="border-top: 2px solid #CFCFCF; border-right: 1px solid #CFCFCF; border-bottom: 1px solid #CFCFCF; border-left: 1px solid #CFCFCF; font-size: 12px; color: #666;">客户来源<br>Customer source</td>'+
- '<td width="87" align="center" style="border-top: 2px solid #CFCFCF; border-right: 1px solid #CFCFCF; border-bottom: 1px solid #CFCFCF; font-size: 12px; color: #666;">客户公司名称<br>Customer company name</td>'+
- '<td width="87" align="center" style="border-top: 2px solid #CFCFCF; border-right: 1px solid #CFCFCF; border-bottom: 1px solid #CFCFCF; font-size: 12px; color: #666;">客户联系人姓名<br>Customer contact name</td>'+
- '<td width="87" align="center" style="border-top: 2px solid #CFCFCF; border-right: 1px solid #CFCFCF; border-bottom: 1px solid #CFCFCF; font-size: 12px; color: #666;">客户联系人号码<br>Customer contact number</td>'+
- '<td width="87" align="center" style="border-top: 2px solid #CFCFCF; border-right: 1px solid #CFCFCF; border-bottom: 1px solid #CFCFCF; font-size: 12px; color: #666;">客户类型<br>Customer type</td>'+
- '<td width="87" align="center" style="border-top: 2px solid #CFCFCF; border-right: 1px solid #CFCFCF; border-bottom: 1px solid #CFCFCF; font-size: 12px; color: #666;">客户地址<br>Customer address</td>'+
- '<td width="87" align="center" style="border-top: 2px solid #CFCFCF; border-right: 1px solid #CFCFCF; border-bottom: 1px solid #CFCFCF; font-size: 12px; color: #666;">客户需求<br>Customer demand</td>'+
- '<tr height="36"><td style="border-bottom: solid 1px #cfcfcf;border-left: solid 1px #cfcfcf; border-right: solid 1px #cfcfcf; font-size: 12px; color: #666; font-family: Arial, Helvetica, sans-serif;">'+source+'</td>'+
- '<td style="border-bottom: solid 1px #cfcfcf;border-left: solid 1px #cfcfcf; border-right: solid 1px #cfcfcf; font-size: 12px; color: #666; font-family: Arial, Helvetica, sans-serif;">'+corporateName+'</td>'+
- '<td style="border-bottom: solid 1px #cfcfcf;border-left: solid 1px #cfcfcf; border-right: solid 1px #cfcfcf; font-size: 12px; color: #666; font-family: Arial, Helvetica, sans-serif;">'+customer+'</td>'+
- '<td style="border-bottom: solid 1px #cfcfcf;border-left: solid 1px #cfcfcf; border-right: solid 1px #cfcfcf; font-size: 12px; color: #666; font-family: Arial, Helvetica, sans-serif;">'+phone+'</td>'+
- '<td style="border-bottom: solid 1px #cfcfcf;border-left: solid 1px #cfcfcf; border-right: solid 1px #cfcfcf; font-size: 12px; color: #666; font-family: Arial, Helvetica, sans-serif;">'+type+'</td>'+
- '<td style="border-bottom: solid 1px #cfcfcf;border-left: solid 1px #cfcfcf; border-right: solid 1px #cfcfcf; font-size: 12px; color: #666; font-family: Arial, Helvetica, sans-serif;">'+address+'</td>'+
- '<td style="border-bottom: solid 1px #cfcfcf;border-left: solid 1px #cfcfcf; border-right: solid 1px #cfcfcf; font-size: 12px; color: #666; font-family: Arial, Helvetica, sans-serif;">'+demand+'</td></tr></tbody></table></tbody></table></meta">';
- println("emailHtml-->"+emailHtml);
- sendEmailBySystemUser(email,subject,emailHtml);
- var url1="actionContent="+formid+"&docId="+docid+"&openType=from_weixin_message";
- url1 = "http://office.teemlink.com:9090/Z0Y3B/mobile/index.html?application="+applicationId+"#/open?linkType=00&" + url1;
- url1 = encodeURIComponent(url1);
- var url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxb11b73237f69f7ea&redirect_uri="+url1+"&response_type=code&scope=snsapi_base&agentid=1000022&state="+domainid+"#wechat_redirect";
- var text1 = "客户来源:"+source+"\n客户公司名称:"+corporateName+"\n客户联系人姓名:"+customer+"\n客户联系人号码:"+phone+"\n<a href='"+url+"'>更多详情</a>";
- Packages.cn.myapps.support.weixin.WeixinServiceProxy.sendTextMessage(LOGINNO,text1,domainid,applicationId);
-
- })()
复制代码 |