proofread.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  1. {extend name="public/layout"}
  2. {block name="body"}
  3. <link rel="stylesheet" href="__LAYUI__/layui/css/layui.css" media="all">
  4. <link rel="stylesheet" href=" /static/css/common.css">
  5. <script src="/static/js/jquery.min.js"></script>
  6. <style>
  7. body {
  8. padding-bottom: 40px;
  9. background-color: #F3F3F3;
  10. }
  11. div{
  12. margin: 0 auto;
  13. }
  14. .message_title {
  15. padding: 15px 10px;
  16. border: 1px solid #F0F0F0;
  17. background: #FCFCFC;
  18. margin-top: 5px;
  19. margin-bottom: 10px;
  20. position: relative;
  21. min-width: 800px;
  22. }
  23. .message_title span{ float:right; margin-right:10px;}
  24. h2 {
  25. margin: 10px 0;
  26. }
  27. textarea {
  28. padding: 5px;
  29. }
  30. select {
  31. height: 26px;
  32. line-height: auto;
  33. vertical-align: middle;
  34. box-sizing: content-box;
  35. font-size: 13px;
  36. -webkit-appearance: menulist-button;
  37. border: #CCC solid 1px;
  38. }
  39. .btnx {
  40. border: none;
  41. width: 98px;
  42. height: 30px;
  43. color: #fff;
  44. font-size: 14px;
  45. font-weight: bold;
  46. text-align: center;
  47. background: url(__STATIC__/img/icon-sub.png) no-repeat;
  48. cursor: pointer;
  49. }
  50. #customer_detail{
  51. display: block;
  52. width: 435px;
  53. height: 100%;
  54. position: absolute;
  55. top: 0;
  56. left:0;
  57. }
  58. .rightbox{
  59. display: block;
  60. width: calc(100% - 435px);
  61. margin-left: 435px;
  62. }
  63. .maintable{table-layout:fixed;_width:100%;width:100%; border:1px solid #DFDFDF;
  64. border-collapse: separate !important;
  65. background-color:#FFF; border-right:0; border-bottom:2px solid #DFDFDF;}
  66. .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}
  67. .maintable td{border-right:1px solid #DFDFDF; border-bottom:1px solid #EAEAEC; padding:7px; line-height:25px; font-size:13px; position:relative;}
  68. .maintable td{ text-align:center;cursor:pointer}
  69. .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;}
  70. .maintable td label{ cursor:pointer}
  71. .btnnew {
  72. margin-left: 4px;
  73. cursor: pointer;
  74. color: #000;
  75. background: url(/static/img/btn_bg.gif) repeat-x !important;
  76. border: 1px solid #C0C0C0;
  77. padding: 0 12px;
  78. height: 28px;
  79. font-weight: 500 !important;
  80. }
  81. .footerbox{
  82. display: block;
  83. }
  84. #channel_id,#source_id{
  85. height: 36px;
  86. box-sizing: border-box;
  87. margin-left: 8px;
  88. }
  89. .submitbtn{
  90. height: 36px;
  91. box-sizing: border-box;
  92. margin-left: 8px;
  93. background-size: 100% 100%;
  94. }
  95. #rangeDepart1 xm-select{
  96. min-height: 28px;
  97. line-height: 28px;
  98. }
  99. #rangeDepart1 xm-select .xm-label .scroll .label-content {
  100. padding: 2px 10px;
  101. line-height: 22px;
  102. }
  103. #rangeDepart1 xm-select .xm-label .xm-label-block{
  104. height: 22px;
  105. line-height: 22px;
  106. margin: 0 5px;
  107. }
  108. .onclickbg-old:hover {
  109. background-color: #f2f2f2;
  110. }
  111. </style>
  112. <body class="clearfix">
  113. <div class="message_title proofreadbox" style="padding-bottom:15px; width:900px;">
  114. <div style="margin-bottom:8px;">
  115. <h2 style="text-align:center;">数据校对公共接口</h2>
  116. <div id="seafrom" style="margin:0px; text-align:center" >
  117. <p style="margin-top:30px;">
  118. <textarea name="numbers" cols="80" rows="20" id="numbers" style="border:2px solid #4479ba;"></textarea>
  119. </p>
  120. <div class="footerbox tcenter" style="margin-bottom:20px; margin-top:10px;">
  121. <div class="inline-block clearfix">
  122. <div class="left" style="width: 200px;">
  123. <div id="rangeDepart" class="wleft"></div>
  124. </div>
  125. <select class="left" name="source_id" id="source_id">
  126. <option value="">==来源==</option>
  127. {volist name="source_list" id="vo"}
  128. <option value="{$vo.id}">{$vo.source}</option>
  129. {/volist}
  130. </select>
  131. {if $root_id == 2319 || $root_id == 994}
  132. <select class="left" name="channel_id" id="channel_id">
  133. <option value="">==线索渠道==</option>
  134. <option value="1">匹配飞鱼腾讯</option>
  135. </select>
  136. {/if}
  137. <input class="left submitbtn btnx" type="submit" value="快速校对" data-type="1" title="快速校对" style="vertical-align:middle" />
  138. </div>
  139. </div>
  140. </div>
  141. <p style=" text-align:center; margin-top:50px;">
  142. 备注:每行只能填写一个手机号码
  143. </p>
  144. </div>
  145. </div>
  146. <iframe id="customer_detail" style="display: none;" src=""></iframe>
  147. <div class="tablebox" style="display: none;">
  148. <div class="clearfix" style="margin: 10px 0px 20px 10px;">
  149. <div id="rangeDepart1" class="left" style="width:200px;"></div>
  150. <select name="source_id" class="left" id="source_id1">
  151. <option value="">==来源==</option>
  152. {volist name="source_list" id="vo"}
  153. <option value="{$vo.id}">{$vo.source}</option>
  154. {/volist}
  155. </select>
  156. {if $root_id == 2319 || $root_id == 994}
  157. <select class="left" name="channel_id" id="channel_id1">
  158. <option value="">==线索渠道==</option>
  159. <option value="1">匹配飞鱼腾讯</option>
  160. </select>
  161. {/if}
  162. <input type="submit" value="快速校对" data-type="2" class="btnx btnnew left" title="快速校对" style="vertical-align:middle" />
  163. </div>
  164. <div class="message_title" style="margin:15px auto; height:30px;">
  165. <span>点击这里返回校对中心:<input type="button" value=" 点击返回 " class="btn goback"></span>
  166. </div>
  167. <table class="maintable" border="0" cellspacing="0" cellpadding="0" id="maintable" width="100%">
  168. <thead>
  169. <tr>
  170. <th >序号</th>
  171. <th >手机号码</th>
  172. <th >客户姓名</th>
  173. <th >小区名称</th>
  174. <th >面积</th>
  175. <th >房屋状态</th>
  176. <th >客服专员</th>
  177. <th >来源</th>
  178. <th >报名时间</th>
  179. <th >状态</th>
  180. <th >隶属部门</th>
  181. <th >详情</th>
  182. </tr>
  183. </thead>
  184. <tbody>
  185. </tbody>
  186. </table>
  187. <div class="message_title" style="margin:15px auto; height:30px;">
  188. 备注:系统会自动过滤重复的手机号码,如果输入的线索数量和查询的结果数量不一致,请核对是不是有重复线索。
  189. </div>
  190. </div>
  191. </body>
  192. <script src="__LAYUI__/layui/layui.js"></script>
  193. <script src="__STATIC__/layui/layui/lay/modules/xm-select.js" type="text/javascript" charset="utf-8"></script>
  194. {/block}{block name="js"}
  195. <script type="text/javascript">
  196. var reload=null, resizefun=null;
  197. layui.config({
  198. base: '__LAYUI__/',
  199. urlbase: '/sys'
  200. }).extend({
  201. index: 'lib/index' //主入口模块
  202. }).use(['table', 'laydate'], function () {
  203. var table = layui.table, laydate = layui.laydate,
  204. $ = layui.$;
  205. var departTree = xmSelect.render({
  206. el: "#rangeDepart",
  207. name: 'org',
  208. autoRow: true,
  209. filterable: true,
  210. tips: '请选择',
  211. radio: true,
  212. tree: {
  213. show: true,
  214. showFolderIcon: true,
  215. showLine: true,
  216. indent: 20,
  217. expandedKeys: [ -3 ],
  218. //是否严格遵守父子模式
  219. strict: false,
  220. },
  221. height: "200px",
  222. data: [],
  223. //文本显示模式
  224. //处理方式
  225. });
  226. var departTree1 = xmSelect.render({
  227. el: "#rangeDepart1",
  228. name: 'org',
  229. autoRow: true,
  230. filterable: true,
  231. tips: '请选择',
  232. radio: true,
  233. tree: {
  234. show: true,
  235. showFolderIcon: true,
  236. showLine: true,
  237. indent: 20,
  238. expandedKeys: [ -3 ],
  239. //是否严格遵守父子模式
  240. strict: false,
  241. },
  242. height: "200px",
  243. data: [],
  244. //文本显示模式
  245. //处理方式
  246. });
  247. $.ajax({
  248. url: '{:url("managerEmp/get_person")}',
  249. type: "post",
  250. data: {},
  251. success: function(res) {
  252. departTree.update({data:res})
  253. departTree1.update({data:res})
  254. }
  255. })
  256. $('.btnx').click(function(){
  257. let type = $(this).prop("dataset").type;
  258. if($('#numbers').val()==''){
  259. alert("请输入校对数据的列表!");
  260. seafrom.numbers.focus();
  261. return false;
  262. }
  263. let phstr = $('#numbers').val().split('\n').join(',');
  264. let pharr = phstr.split(',');
  265. var myreg = /^[1][2,3,4,5,6,7,8,9][0-9]{9}$/;
  266. for(let item of pharr){
  267. if(!myreg.test(item)){
  268. alert(item+'号码格式错误');
  269. return false;
  270. }
  271. }
  272. if(type==1){
  273. let obj= departTree.getValue();
  274. departTree1.setValue(obj)
  275. }
  276. $('.tablebox').show();
  277. $('.proofreadbox').hide();
  278. phonefun(type);
  279. })
  280. resizefun = function () {
  281. phonefun();
  282. };
  283. reload = function () {
  284. phonefun();
  285. };
  286. function phonefun(type){
  287. let org_id = '';
  288. let source_id = '';
  289. if(type == 1){
  290. org_id= departTree.getValue('value')[0];
  291. // org_id = $('#org_id').val();
  292. source_id = $('#source_id').val();
  293. channel_id = $('#channel_id').val();
  294. }
  295. if(type == 2){
  296. org_id = departTree1.getValue('value')[0];
  297. source_id = $('#source_id1').val();
  298. channel_id = $('#channel_id').val();
  299. }
  300. $.ajax({
  301. url: '{:url("manager_emp/proofread")}'
  302. , data: {
  303. phone: $('#numbers').val().split('\n').join(','),
  304. org_id : org_id,
  305. source_id : source_id,
  306. channel_id : channel_id
  307. }
  308. , type: 'post'
  309. , success: function (res) {
  310. if (res.code == 0) {
  311. let str="";
  312. for(let i in res.data){
  313. let phone=res.data[i].phone.split('');
  314. if(!res.data[i].data){
  315. str+=`<tr class="">
  316. <td align="center">${i*1+1}</td>
  317. <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>
  318. </tr>`;
  319. }else{
  320. str+=`<tr data-org_id="${res.data[i].data.org_id}" data-id="${res.data[i].data.id}" class="onclickbg-old">
  321. <td align="center">${i*1+1}</td>
  322. <td align="center">
  323. ${phone[0]+''+phone[1]+phone[2]+'****'+phone[phone.length-4]+phone[phone.length-3]+phone[phone.length-2]+phone[phone.length-1]+'<br>'}
  324. ${res.data[i].data.phone1 ? res.data[i].data.phone1+'<br>' : ''}
  325. ${res.data[i].data.phone2 ? res.data[i].data.phone2 : ''}
  326. </td>
  327. <td align="center">${res.data[i].data.name?res.data[i].data.name:'未知'}</td>
  328. <td align="center">${res.data[i].data.community_name?res.data[i].data.community_name:''}</td>
  329. <td align="center">${res.data[i].data.square?res.data[i].data.square:''}</td>
  330. <td align="center">${res.data[i].data.house_status?res.data[i].data.house_status:''}</td>
  331. <td align="center">${res.data[i].data.employee?res.data[i].data.employee.name:''}</td>
  332. <td align="center">${res.data[i].data.source?res.data[i].data.source.source:''}</td>
  333. <td align="center">${res.data[i].data.sign_time?res.data[i].data.sign_time:''}</td>
  334. <td align="center">${res.data[i].data.state?res.data[i].data.state:''}</td>
  335. <td align="center">${res.data[i].data.org_name?res.data[i].data.org_name:''}</td>
  336. <td align="center">查看</td>
  337. </tr>`;
  338. }
  339. }
  340. $('.maintable tbody').html(str);
  341. $('.onclickbg-old').click(function(){
  342. let id= $(this).data('id');
  343. let org_id = $(this).data('org_id');
  344. if(id > 0){
  345. $('#customer_detail')[0].src = "/empcrm/empcrm/addlog.html?cid=" + id +'&org_id=' + org_id;
  346. $('.tablebox').addClass('rightbox');
  347. for (let i = 0; i < $('.maintable tbody tr').length; i++) {
  348. $($('.maintable tbody tr')[i]).removeClass('onclickbg');
  349. }
  350. $('#customer_detail').show();
  351. $(this).addClass('onclickbg')
  352. }
  353. })
  354. }else if(res.code == 403){
  355. $(".exitbtn").trigger("click");
  356. } else {
  357. alert(res.msg)
  358. }
  359. }
  360. });
  361. }
  362. })
  363. function removealog(params) {
  364. $('#customer_detail').hide();
  365. $('.tablebox').removeClass('rightbox');
  366. }
  367. $('.goback').click(function(){
  368. $('.tablebox').hide();
  369. $('.proofreadbox').show();
  370. })
  371. function GetRequest() {
  372. var url = location.search; //获取url中"?"符后的字串
  373. var theRequest = new Object();
  374. if (url.indexOf("?") != -1) {
  375. var str = url.substr(1);
  376. strs = str.split("&");
  377. for (var i = 0; i < strs.length; i++) {
  378. theRequest[strs[i].split("=")[0]] = (strs[i].split("=")[1]);
  379. }
  380. }
  381. return theRequest;
  382. }
  383. </script>
  384. {/block}