123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340 |
- {extend name="public/layout"}
- {block name="body"}
- <link rel="stylesheet" href="__LAYUI__/layui/css/layui.css" media="all">
- <script src="/static/js/jquery.min.js"></script>
- <style>
- .searchtitlebox{
- display: block;
- padding: 15px 10px;
- border: 1px solid #F0F0F0;
- background: #FCFCFC;
- margin-top: 5px;
- margin-bottom: 10px;
- position: relative;
- min-width: 800px;
- }
- .searchbox{
- display: block;
- text-align: center;
- }
- .searchbox input{
- display: inline-block;
- height: 26px;
- line-height: 26px;
- padding-left: 3px;
- vertical-align: middle;
- border: 2px solid #4479ba;
- }
- body{
- font-size: 12px;
- font-family: "宋体";
- padding-bottom: 40px;
- }
- .searchbox button{
- display: inline-block;
- 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;
- vertical-align: middle;
- }
- .tablebox{
- max-height: 760px;
- cursor: pointer;
- }
- .tablebox .layui-form.layui-border-box.layui-table-view{
- max-height: 760px !important;
- height: auto !important;
- }
- .layui-table-body{
- max-height: 670px !important;
- height: auto !important;
- }
- .tablebox,.layui-table td, .layui-table th{
- font-size: 13px !important;
- }
- .dingjingorder {
- height: 25px;
- width: 40px;
- background-color: #65c001;
- color: #FFF;
- text-align: center;
- line-height: 25px;
- z-index: 100;
- display: block;
- position: absolute;
- top: 1px;
- right: 3px;
- border-radius: 11px;
- font-size: 12px;
- }
- .addvx{
- position: absolute;
- top: -5px;
- right: 1px;
- height: 14px;
- line-height: 14px;
- font-size: 16px;
- color: #666;
- font-family: "宋体";
- }
- .statebox{
- width: 40px;
- text-align: center;
- z-index: 100;
- display: block;
- position: absolute;
- font-size: 12px;
- top: -5px;
- right: 0px;
- border-radius: 0px;
- background: #4285f4;
- color: #efefef;
- height: 20px;
- line-height: 20px;
- cursor: pointer;
- }
- .layui-table-cell{
- overflow: initial;
- }
- .state1box{
- display: block;
- border: 1px solid #a5c2f4;
- background: none;
- height: 20px;
- line-height: 20px;
- width: 40px;
- color: #a5c2f4;
- text-align: center;
- z-index: 100;
- display: block;
- position: absolute;
- top: 3px;
- right: 3px;
- border-radius: 11px;
- font-size: 12px;
- cursor: pointer;
- }
- .layui-table-view .layui-table td{
- cursor: pointer;
- overflow: hidden;
- }
- </style>
- <body>
- <div class="searchtitlebox">
- <div style="margin-bottom:8px;">您当前的操作 · <b>系统公共查询接口</b> · 记录管理 </div>
- <div class="searchbox">
- <input type="text" placeholder="请输入手机号或者小区名" autocomplete="off" size="45" autocomplete="off"/>
- <button class="searchbtn" type="button">快速搜索</button>
- </div>
- </div>
- <div class="tablebox">
- <table lay-filter="crmsearchlist" id="crmsearchlist"></table>
- </div>
- </body>
- <script src="__LAYUI__/layui/layui.js"></script>
- {/block}{block name="js"}
- <script type="text/html" id="community">
- {{d.community_name?d.community_name:''}}
- {{# if(d.jiaoding_time){ }}
- <span class="dingjingorder">定金</span>
- {{# }else{ }}
- {{# } }}
- </script>
- <script type="text/html" id="designername">
- {{d.designer?d.designer.name:''}}
- {{# if(d.signorder_time){ }}
- <span class="dingjingorder" style="background-color: #ff6600;">合同</span>
- {{# }else{ }}
-
- {{# } }}
- </script>
- <script type="text/html" id="empname">
- {{# if(d.employee){ }}
- {{d.employee.name}}
- {{# if(d.add_wechat=='是'){ }}
- <span class="addvx">v</span>
- {{# }else{ }}
- {{# } }}
- {{# }else{ }}
- <span style="color: #cccccc;">无</span>
- {{# if(d.add_wechat=='是'){ }}
- <span class="addvx">v</span>
- {{# }else{ }}
- {{# } }}
- {{# } }}
- </script>
- <script type="text/html" id="contact_date">
- {{d.last_contact_date?d.last_contact_date:0}}
- {{# if(d.state=='无效'){ }}
- <span class="state1box" onclick="getcrmtap('{{=d.id}}')">获取</span>
- {{# }else{ }}
- {{# } }}
-
- </script>
- <script type="text/html" id="addtimebox">
- {{d.addtime}}
- {{# if(d.state!='无效'){ }}
- <span class="statebox">{{d.state}}</span>
- {{# }else{ }}
- <span class="statebox">{{d.state}}</span>
- {{# } }}
-
- </script>
- <script type="text/javascript">
- var reload = null;
- layui.config({
- base: '__LAYUI__/',
- urlbase: '/sys'
- }).extend({
- index: 'lib/index' //主入口模块
- }).use(['table'], function () {
- var table = layui.table,
- $ = layui.$;
- // <!-- 搜索列表页面 接口 参数 keyname=>手机号或小区名称 -->
- $('.searchbtn').click(function(){
- searchfun($('.searchbox input').val());
- })
-
- //
- function searchfun(keyname) {
- table.render({
- elem: '#crmsearchlist',
- url: '{:url("community/search_list")}?keyname=' + keyname,
- page: true //是否显示分页
- , even: true
- ,limits: [17]
- ,limit: 17, //每页默认显示的数量,
- cols: [
- [
- {
- title: '客户姓名',
- field: 'name',
- align: 'center',
- },
- {
- title: '小区名',
- field: 'community_name',
- align: 'center',
- width:240,
- templet: '#community',
- },
- {
- title: '手机号',
- field: 'phone',
- align: 'center',
- },
- {
- title: '面积',
- field: 'square',
- align: 'center',
- },
- {
- title: '业务员',
- field: 'employee',
- align: 'center',
- templet: '#empname'
- },
- {
- title: '设计师',
- field: 'designer',
- align: 'center',
- templet: '#designername'
- },
- {
- title: '报名时间',
- field: 'sign_time',
- align: 'center',
- },
- {
- title: '首次见面',
- field: 'fisttime',
- align: 'center',
- },
- {
- title: '录入时间',
- field: 'addtime',
- align: 'center',
- width:256,
- templet: '#addtimebox'
- },
- {
- title: '最后回访',
- field: 'last_contact_date',
- align: 'center',
- width: 230,
- templet: '#contact_date'
- },
- {
- title: '重要级别',
- field: 'level',
- align: 'center',
- }
- ]
- ],
- page: true,
- limit: 17,
- height: 'full-120',
- text: '对不起,加载出现异常!'
- });
- table.on('row(crmsearchlist)', function (obj) {
- let data=obj.data;
- if (data.state != '无效') {
- if (data.signorder_time || data.jiaoding_time) {
- $.ajax({
- url: '{:url("community/checkCustomer")}'
- , data: {
- id: data.id,
- }
- , type: 'post'
- , success: function (rs) {
- if(rs.code==0){
- window.parent.signmsg(data.id,'community')
- }else{
- alert(rs.msg)
- }
- }
- })
-
- }
- }
- });
- }
- reload = function () {
- table.reload('crmsearchlist', { }, true);
- };
- })
- function getcrmtap(cid) {
- if(confirm('确定要获取到我的客户列表?') == true){
- window.parent.getinvalid(cid, 'search_list.html');
- // $.ajax({
- // url: '{:url("empcrm/fetchpoolitem")}'
- // , data: {
- // cid: cid,
- // }
- // , type: 'post'
- // , success: function (res) {
- // console.log(res)
- // if (res.code == 0) {
-
- // } else {
- // alert(res.msg)
- // }
- // }
- // });
- }
- }
- </script>
- {/block}
|