123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399 |
- {extend name="public/layout"}
- {block name="body"}
- <link rel="stylesheet" href="__LAYUI__/layui/css/layui.css" media="all">
- <link rel="stylesheet" href=" /static/css/common.css">
- <script src="/static/js/jquery.min.js"></script>
- <style>
- body {
- padding-bottom: 40px;
- background-color: #F3F3F3;
- }
- div{
- margin: 0 auto;
- }
- .message_title {
- padding: 15px 10px;
- border: 1px solid #F0F0F0;
- background: #FCFCFC;
- margin-top: 5px;
- margin-bottom: 10px;
- position: relative;
- min-width: 800px;
- }
- .message_title span{ float:right; margin-right:10px;}
- h2 {
-
- margin: 10px 0;
- }
- textarea {
- padding: 5px;
- }
- select {
- height: 26px;
- line-height: auto;
- vertical-align: middle;
- box-sizing: content-box;
- font-size: 13px;
- -webkit-appearance: menulist-button;
- border: #CCC solid 1px;
- }
- .btnx {
- border: none;
- width: 98px;
- height: 30px;
- color: #fff;
- font-size: 14px;
- font-weight: bold;
- text-align: center;
- background: url(__STATIC__/img/icon-sub.png) no-repeat;
- cursor: pointer;
- }
- #customer_detail{
- display: block;
- width: 435px;
- height: 100%;
- position: absolute;
- top: 0;
- left:0;
- }
- .rightbox{
- display: block;
- width: calc(100% - 435px);
- margin-left: 435px;
- }
- .maintable{table-layout:fixed;_width:100%;width:100%; border:1px solid #DFDFDF;
- border-collapse: separate !important;
- background-color:#FFF; border-right:0; border-bottom:2px solid #DFDFDF;}
- .maintable th{ background-color:#F2F3F7; border-right:1px solid #DFDFDF; border-bottom:1px solid #DFDFDF; line-height:25px; padding:5px; text-align:center; font-family:Arial; font-size:12px; letter-spacing:1px; color:#333}
- .maintable td{border-right:1px solid #DFDFDF; border-bottom:1px solid #EAEAEC; padding:7px; line-height:25px; font-size:13px; position:relative;}
- .maintable td{ text-align:center;cursor:pointer}
- .maintable h2{border-bottom:1px solid #999; margin:0; font-weight:bold; font-size:15px; margin-bottom:10px; margin-top:5px; text-indent:3px; font-family:Arial; letter-spacing:1px;}
- .maintable td label{ cursor:pointer}
- .btnnew {
- margin-left: 4px;
- cursor: pointer;
- color: #000;
- background: url(/static/img/btn_bg.gif) repeat-x !important;
- border: 1px solid #C0C0C0;
- padding: 0 12px;
- height: 28px;
- font-weight: 500 !important;
- }
- .footerbox{
- display: block;
- }
- #channel_id,#source_id{
- height: 36px;
- box-sizing: border-box;
- margin-left: 8px;
- }
- .submitbtn{
- height: 36px;
- box-sizing: border-box;
- margin-left: 8px;
- background-size: 100% 100%;
- }
- #rangeDepart1 xm-select{
- min-height: 28px;
- line-height: 28px;
- }
- #rangeDepart1 xm-select .xm-label .scroll .label-content {
- padding: 2px 10px;
- line-height: 22px;
- }
- #rangeDepart1 xm-select .xm-label .xm-label-block{
- height: 22px;
- line-height: 22px;
- margin: 0 5px;
- }
- .onclickbg-old:hover {
- background-color: #f2f2f2;
- }
- </style>
- <body class="clearfix">
- <div class="message_title proofreadbox" style="padding-bottom:15px; width:900px;">
- <div style="margin-bottom:8px;">
- <h2 style="text-align:center;">数据校对公共接口</h2>
- <div id="seafrom" style="margin:0px; text-align:center" >
- <p style="margin-top:30px;">
- <textarea name="numbers" cols="80" rows="20" id="numbers" style="border:2px solid #4479ba;"></textarea>
- </p>
- <div class="footerbox tcenter" style="margin-bottom:20px; margin-top:10px;">
- <div class="inline-block clearfix">
- <div class="left" style="width: 200px;">
- <div id="rangeDepart" class="wleft"></div>
- </div>
- <select class="left" name="source_id" id="source_id">
- <option value="">==来源==</option>
- {volist name="source_list" id="vo"}
- <option value="{$vo.id}">{$vo.source}</option>
- {/volist}
- </select>
- {if $root_id == 2319 || $root_id == 994}
- <select class="left" name="channel_id" id="channel_id">
- <option value="">==线索渠道==</option>
- <option value="1">匹配飞鱼腾讯</option>
- </select>
- {/if}
- <input class="left submitbtn btnx" type="submit" value="快速校对" data-type="1" title="快速校对" style="vertical-align:middle" />
- </div>
- </div>
- </div>
- <p style=" text-align:center; margin-top:50px;">
- 备注:每行只能填写一个手机号码
- </p>
- </div>
- </div>
- <iframe id="customer_detail" style="display: none;" src=""></iframe>
- <div class="tablebox" style="display: none;">
- <div class="clearfix" style="margin: 10px 0px 20px 10px;">
- <div id="rangeDepart1" class="left" style="width:200px;"></div>
- <select name="source_id" class="left" id="source_id1">
- <option value="">==来源==</option>
- {volist name="source_list" id="vo"}
- <option value="{$vo.id}">{$vo.source}</option>
- {/volist}
- </select>
- {if $root_id == 2319 || $root_id == 994}
- <select class="left" name="channel_id" id="channel_id1">
- <option value="">==线索渠道==</option>
- <option value="1">匹配飞鱼腾讯</option>
- </select>
- {/if}
- <input type="submit" value="快速校对" data-type="2" class="btnx btnnew left" title="快速校对" style="vertical-align:middle" />
- </div>
- <div class="message_title" style="margin:15px auto; height:30px;">
- <span>点击这里返回校对中心:<input type="button" value=" 点击返回 " class="btn goback"></span>
- </div>
- <table class="maintable" border="0" cellspacing="0" cellpadding="0" id="maintable" width="100%">
- <thead>
- <tr>
- <th >序号</th>
- <th >手机号码</th>
- <th >客户姓名</th>
- <th >小区名称</th>
- <th >面积</th>
- <th >房屋状态</th>
- <th >客服专员</th>
- <th >来源</th>
- <th >报名时间</th>
- <th >状态</th>
- <th >隶属部门</th>
- <th >详情</th>
- </tr>
- </thead>
- <tbody>
- </tbody>
- </table>
- <div class="message_title" style="margin:15px auto; height:30px;">
- 备注:系统会自动过滤重复的手机号码,如果输入的线索数量和查询的结果数量不一致,请核对是不是有重复线索。
- </div>
- </div>
- </body>
- <script src="__LAYUI__/layui/layui.js"></script>
- <script src="__STATIC__/layui/layui/lay/modules/xm-select.js" type="text/javascript" charset="utf-8"></script>
- {/block}{block name="js"}
- <script type="text/javascript">
- var reload=null, resizefun=null;
- layui.config({
- base: '__LAYUI__/',
- urlbase: '/sys'
- }).extend({
- index: 'lib/index' //主入口模块
- }).use(['table', 'laydate'], function () {
- var table = layui.table, laydate = layui.laydate,
- $ = layui.$;
- var departTree = xmSelect.render({
- el: "#rangeDepart",
- name: 'org',
- autoRow: true,
- filterable: true,
- tips: '请选择',
- radio: true,
- tree: {
- show: true,
- showFolderIcon: true,
- showLine: true,
- indent: 20,
- expandedKeys: [ -3 ],
- //是否严格遵守父子模式
- strict: false,
- },
- height: "200px",
- data: [],
- //文本显示模式
- //处理方式
- });
- var departTree1 = xmSelect.render({
- el: "#rangeDepart1",
- name: 'org',
- autoRow: true,
- filterable: true,
- tips: '请选择',
- radio: true,
- tree: {
- show: true,
- showFolderIcon: true,
- showLine: true,
- indent: 20,
- expandedKeys: [ -3 ],
- //是否严格遵守父子模式
- strict: false,
- },
- height: "200px",
- data: [],
- //文本显示模式
- //处理方式
- });
-
- $.ajax({
- url: '{:url("managerEmp/get_person")}',
- type: "post",
- data: {},
- success: function(res) {
- departTree.update({data:res})
- departTree1.update({data:res})
- }
- })
- $('.btnx').click(function(){
-
- let type = $(this).prop("dataset").type;
- if($('#numbers').val()==''){
- alert("请输入校对数据的列表!");
- seafrom.numbers.focus();
- return false;
- }
- let phstr = $('#numbers').val().split('\n').join(',');
- let pharr = phstr.split(',');
- var myreg = /^[1][2,3,4,5,6,7,8,9][0-9]{9}$/;
- for(let item of pharr){
- if(!myreg.test(item)){
- alert(item+'号码格式错误');
- return false;
- }
- }
- if(type==1){
- let obj= departTree.getValue();
- departTree1.setValue(obj)
- }
-
- $('.tablebox').show();
- $('.proofreadbox').hide();
-
- phonefun(type);
- })
- resizefun = function () {
- phonefun();
- };
- reload = function () {
- phonefun();
- };
- function phonefun(type){
- let org_id = '';
- let source_id = '';
- if(type == 1){
- org_id= departTree.getValue('value')[0];
- // org_id = $('#org_id').val();
- source_id = $('#source_id').val();
- channel_id = $('#channel_id').val();
- }
- if(type == 2){
- org_id = departTree1.getValue('value')[0];
- source_id = $('#source_id1').val();
- channel_id = $('#channel_id').val();
- }
- $.ajax({
- url: '{:url("manager_emp/proofread")}'
- , data: {
- phone: $('#numbers').val().split('\n').join(','),
- org_id : org_id,
- source_id : source_id,
- channel_id : channel_id
- }
- , type: 'post'
- , success: function (res) {
- if (res.code == 0) {
- let str="";
- for(let i in res.data){
- let phone=res.data[i].phone.split('');
- if(!res.data[i].data){
- str+=`<tr class="">
- <td align="center">${i*1+1}</td>
- <td colspan="11" align="center" class="red"><strong style="letter-spacing:1px">${phone[0]+''+phone[1]+phone[2]+'****'+phone[phone.length-4]+phone[phone.length-3]+phone[phone.length-2]+phone[phone.length-1]}</strong>,没有查询结果</td>
- </tr>`;
- }else{
- str+=`<tr data-org_id="${res.data[i].data.org_id}" data-id="${res.data[i].data.id}" class="onclickbg-old">
- <td align="center">${i*1+1}</td>
- <td align="center">
- ${phone[0]+''+phone[1]+phone[2]+'****'+phone[phone.length-4]+phone[phone.length-3]+phone[phone.length-2]+phone[phone.length-1]+'<br>'}
- ${res.data[i].data.phone1 ? res.data[i].data.phone1+'<br>' : ''}
- ${res.data[i].data.phone2 ? res.data[i].data.phone2 : ''}
- </td>
- <td align="center">${res.data[i].data.name?res.data[i].data.name:'未知'}</td>
- <td align="center">${res.data[i].data.community_name?res.data[i].data.community_name:''}</td>
- <td align="center">${res.data[i].data.square?res.data[i].data.square:''}</td>
- <td align="center">${res.data[i].data.house_status?res.data[i].data.house_status:''}</td>
- <td align="center">${res.data[i].data.employee?res.data[i].data.employee.name:''}</td>
- <td align="center">${res.data[i].data.source?res.data[i].data.source.source:''}</td>
- <td align="center">${res.data[i].data.sign_time?res.data[i].data.sign_time:''}</td>
- <td align="center">${res.data[i].data.state?res.data[i].data.state:''}</td>
- <td align="center">${res.data[i].data.org_name?res.data[i].data.org_name:''}</td>
- <td align="center">查看</td>
- </tr>`;
- }
- }
- $('.maintable tbody').html(str);
- $('.onclickbg-old').click(function(){
- let id= $(this).data('id');
- let org_id = $(this).data('org_id');
- if(id > 0){
- $('#customer_detail')[0].src = "/empcrm/empcrm/addlog.html?cid=" + id +'&org_id=' + org_id;
- $('.tablebox').addClass('rightbox');
- for (let i = 0; i < $('.maintable tbody tr').length; i++) {
- $($('.maintable tbody tr')[i]).removeClass('onclickbg');
- }
- $('#customer_detail').show();
- $(this).addClass('onclickbg')
- }
- })
- }else if(res.code == 403){
- $(".exitbtn").trigger("click");
- } else {
- alert(res.msg)
- }
- }
- });
- }
- })
- function removealog(params) {
- $('#customer_detail').hide();
- $('.tablebox').removeClass('rightbox');
- }
- $('.goback').click(function(){
- $('.tablebox').hide();
- $('.proofreadbox').show();
- })
- function GetRequest() {
- var url = location.search; //获取url中"?"符后的字串
- var theRequest = new Object();
- if (url.indexOf("?") != -1) {
- var str = url.substr(1);
- strs = str.split("&");
- for (var i = 0; i < strs.length; i++) {
- theRequest[strs[i].split("=")[0]] = (strs[i].split("=")[1]);
- }
- }
- return theRequest;
- }
- </script>
- {/block}
|