123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225 |
- {Template header}
- <body>
- <div class="warp">
- <div class="fixed">
- <ul class="search">
- <li>店铺名称:<select name="shop" class="select" style="width:180px;">
- <option value="">请选择</option>
- {loop usershop() as $val}
- <option value="{$val['id']}">{$val['shopname']}</option>{/loop}</select></li>
- <li>客户类型:<select name="level" class="select" style="width:180px;">
- <option value="">请选择</option>
- <option value="1">网红</option>
- <option value="2">批发</option>
- <option value="3">店铺转线下</option>
- <option value="4">线下其他</option>
- <option value="5">店内客户</option>
- <option value="0">未定义</option>
- </select></li>
- <li>国家:<select name="country" class="select class">
- <option value="">请选择</option>
- {loop country(1000) as $val}
- <option value="{$val['id']}">{$val['name']}</option>
- {/loop}
- </select>
- </li>
- <li>交易次数:<select name="num" class="select" style="width:180px;">
- <option value="">不限制</option>
- <option value="0">0</option>
- <option value="1">1</option>
- <option value="2">2</option>
- <option value="3">3</option>
- <option value="4">4</option>
- <option value="5">5</option>
- <option value="6">6</option>
- <option value="7">7</option>
- <option value="8">8</option>
- <option value="9">9</option>
- <option value="10">10+</option>
- <option value="2a">2次及以上</option>
- </select></li>
- <li>电话号码:<input value="" name="numphone" type="text" ></li>
- <li>客户名称:<input value="" name="name" type="text" ></li>
- <li>客户邮箱:<input value="" name="email" type="text" style="width:200px;"></li>
- <li>客户地址:<input value="" name="address" type="text" style="width:300px;"></li>
- <li>下单时间:<input id="timetk" value="2017-01-01 00:00" name="timetk" type="text" onClick="laydate({istime: true,format:'YYYY-MM-DD hh:mm'})">
- 至 <input id="timetj" value="{date('Y-m-d 00:00',time()+24*3600)}" name="timetj" type="text" onClick="laydate({istime: true,format:'YYYY-MM-DD hh:mm'})"></li>
- <li><span>确 定</span></li>
- </ul>
- <div class="control">
- <a href="javascript:void(0);" class="window" data-h="/customer/add/" data-t="客户管理 - 添加">新增客户</a>
- {if $vip == 1}
- <a href="javascript:void(0);" class="check">删 除</a>
- {/if}
- <a href="javascript:void(0);" id="excel">导入客户</a>
- <a href="/customer/down?excela=1">下载导入模板</a>
- {if $userkz != 1}
- <a href="javascript:void(0);" class="ctex" data-ex="1">下载老客户订单列表</a>
- <a href="javascript:void(0);" class="ctex" data-ex="2">下载老客户列表</a>
- <a href="javascript:void(0);" class="indexexcel">按条件导出</a>
- {/if}
- <a href="javascript:void(0);" id="temuexcel">导入TEMU客户</a>
- </div>
- <table class="datatitle data" border="0" style="border-collapse:collapse;">
- <tr>
- <td><label onClick="swapCheck()"><input name="checkbox" type="checkbox" class="regular-checkbox"></label></td>
- <td>所属店铺</td>
- <td>客户来源</td>
- <td>客户名称</td>
- <td>客户邮箱</td>
- <td>客户电话</td>
- <td>国家</td>
- <td>客户类型</td>
- <td>总额</td>
- <td>次数</td>
- <td>客单价</td>
- <td>最后购买日期</td>
- <td>备注</td>
- <td>操作</td>
- </tr>
- </table>
- </div>
- <table class="datatext data" border="0" style="border-collapse:collapse;">
- </table>
- <div class="bomf"></div>
- </div>
- <script>
- var dataurl = "/customer";var fdataurl = "/customer";
- var editurl = "/customer/edit/";
- var editdj = 4;
- var editt = "客户管理 - 修改";
- var customon = 1;
- function custom(){
- $(".data tr").each(function() {
- $(this).find('td:eq(1)').css("width","8%");
- $(this).find('td:eq(2)').css("width","6%");
- $(this).find('td:eq(3)').css("width","10%");
- $(this).find('td:eq(4)').css("width","15%");
- $(this).find('td:eq(8)').css("width","5%");
- $(this).find('td:eq(9)').css("width","3%");
- $(this).find('td:eq(10)').css("width","4%");
- $(this).find('td:eq(12)').css("width","13%");
- });}
- $(document).ready(function() {
- var button = $("#temuexcel"), interval;
- var fileType = "pic", fileNum = "one";
- new AjaxUpload(button, {
- action: dataurl+"/temuexcel",
- name: "userfile",
- onSubmit: function(file, ext) {
- if (fileType == "pic") {
- if (ext && /^(xls|xlsx)$/.test(ext)) {
- this.setData({
- info: "文件类型为xls"
- });
- } else {
- $(".ts p").html("上传的文件类型不正确");
- $(".ts").fadeIn();
- setTimeout('$(".ts").fadeOut()', 700);
- return false;
- }
- }
- $(".express p:eq(0)").html("<i class='fa fa-2x fa-cog fa-spin'></i> 正在处理中,请稍后...");
- $(".express p:eq(1)").html("");
- $(".express").show();
- if (fileNum == "one") {
- this.disable();
- }
- },
- onComplete: function(file, response) {
- eval("var obj=" + response);
- if (obj.success) {
- $(".express").hide();
- $(".express p:eq(0)").html("<i class='fa fa-2x fa-check-square-o'></i> "+obj.msg);
- $(".express p:eq(1)").html("<font class='sx'>确 定</font><font class='sx'>取 消</font>");
- $(".express").show();
- } else {
- $(".express").hide();
- $(".ts p").html(obj.msg);
- $(".ts").fadeIn();
- setTimeout('$(".ts").fadeOut()', 700);
- return false;
- }
- window.clearInterval(interval);
- this.enable();
- }
- });
- var button = $("#excel"), interval;
- var fileType = "pic", fileNum = "one";
- new AjaxUpload(button, {
- action: dataurl+"/excela",
- name: "userfile",
- onSubmit: function(file, ext) {
- if (fileType == "pic") {
- if (ext && /^(xls|xlsx)$/.test(ext)) {
- this.setData({
- info: "文件类型为xls"
- });
- } else {
- $(".ts p").html("上传的文件类型不正确");
- $(".ts").fadeIn();
- setTimeout('$(".ts").fadeOut()', 700);
- return false;
- }
- }
- $(".express p:eq(0)").html("<i class='fa fa-2x fa-cog fa-spin'></i> 正在处理中,请稍后...");
- $(".express p:eq(1)").html("");
- $(".express").show();
- if (fileNum == "one") {
- this.disable();
- }
- },
- onComplete: function(file, response) {
- eval("var obj=" + response);
- if (obj.success) {
- $(".express").hide();
- $(".express p:eq(0)").html("<i class='fa fa-2x fa-check-square-o'></i> "+obj.msg);
- $(".express p:eq(1)").html("<font class='sx'>确 定</font><font class='sx'>取 消</font>");
- $(".express").show();
- } else {
- $(".express").hide();
- $(".ts p").html(obj.msg);
- $(".ts").fadeIn();
- setTimeout('$(".ts").fadeOut()', 700);
- return false;
- }
- window.clearInterval(interval);
- this.enable();
- }
- });
- });
- $(".ctex").click(function() {
- var f = "";
- $(".select").each(function() {
- f = f + $(this).attr("name") + "=" + $(this).children("option:selected").val() + "&";
- });
- $("input:text").each(function() {
- f = f + $(this).attr("name") + "=" + $(this).val() + "&";
- });
- window.location.href = "/customer/excel?excel="+$(this).data("ex")+"&"+f;
- });
- $(".indexexcel").click(function() {
- var f = "";
- var a = "";
- $(".datatext input[name='check']:checked").each(function() {
- a = a + $(this).val()+",";
- });
- f = f + "sid=" + a + "&";
- $(".select").each(function() {
- f = f + $(this).attr("name") + "=" + $(this).children("option:selected").val() + "&";
- });
- $("input:text").each(function() {
- f = f + $(this).attr("name") + "=" + encodeURIComponent($(this).val()) + "&";
- });
- $("input:hidden").each(function() {
- f = f + $(this).attr("name") + "=" + $(this).val() + "&";
- });
- window.location.href = "/customer/indexexcel?excel=1&"+f;
- });
- </script>
- <script src="{$theme}js/ajaxupload.3.5.js"></script>
- <script type="text/javascript" src="{$theme}js/laydate.js"></script>
- {Template footer}
|