customersmt.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. {Template header}
  2. <body>
  3. <div class="warp">
  4. <div class="fixed">
  5. <ul class="search">
  6. <li>店铺名称:<select name="shop" class="select" style="width:180px;">
  7. <option value="">请选择</option>
  8. {loop usershop() as $val}
  9. <option value="{$val['id']}">{$val['shopname']}</option>{/loop}</select></li>
  10. <li>客户类型:<select name="level" class="select" style="width:180px;">
  11. <option value="">请选择</option>
  12. <option value="1">网红</option>
  13. <option value="2">批发</option>
  14. <option value="3">店铺转线下</option>
  15. <option value="4">线下其他</option>
  16. </select></li>
  17. <li>买家ID:<input value="" name="fullname" type="text" ></li>
  18. <li>收件人名称:<input value="" name="name" type="text" ></li>
  19. <li>客户地址:<input value="" name="address" type="text" style="width:300px;"></li>
  20. <li>下单时间:<input id="timetk" value="{date('Y-m-d',time()-30*24*3600)}" name="timetk" type="text" onclick="laydate({istime: true,format:'YYYY-MM-DD'})">
  21. 至&nbsp;&nbsp;&nbsp;&nbsp; <input id="timetj" value="{date('Y-m-d',time()+24*3600)}" name="timetj" type="text" onclick="laydate({istime: true,format:'YYYY-MM-DD'})"></li>
  22. <li><span>确 定</span></li>
  23. </ul>
  24. <div class="control">
  25. <a href="javascript:void(0);" class="window" data-h="/customersmt/add/" data-t="客户管理 - 添加">新增客户</a>
  26. <a href="javascript:void(0);" class="check">删 除</a>
  27. <a href="javascript:void(0);" id="excel">导入客户</a>
  28. <a href="/customersmt/down?excela=1">下载导入模板</a>
  29. </div>
  30. <table class="datatitle data" border="0" style="border-collapse:collapse;">
  31. <tr>
  32. <td><label onClick="swapCheck()"><input name="checkbox" type="checkbox" class="regular-checkbox"></label></td>
  33. <td>所属店铺</td>
  34. <td>客户来源</td>
  35. <td>客户名称</td>
  36. <td>客户ID</td>
  37. <td>国家</td>
  38. <td>客户类型</td>
  39. <td>成交总额</td>
  40. <td>成交次数</td>
  41. <td>最后购买日期</td>
  42. <td>备注</td>
  43. <td>操作</td>
  44. </tr>
  45. </table>
  46. </div>
  47. <table class="datatext data" border="0" style="border-collapse:collapse;">
  48. </table>
  49. <div class="bomf"></div>
  50. </div>
  51. <script>
  52. var dataurl = "/customersmt";var fdataurl = "/customersmt";
  53. var editurl = "/customersmt/edit/";
  54. var editdj = 3;
  55. var editt = "客户管理 - 修改";
  56. var customon = 1;
  57. function custom(){
  58. $(".data tr").each(function() {
  59. $(this).find('td:eq(1)').css("width","8%");
  60. $(this).find('td:eq(2)').css("width","6%");
  61. $(this).find('td:eq(3)').css("width","10%");
  62. $(this).find('td:eq(4)').css("width","15%");
  63. $(this).find('td:eq(7)').css("width","5%");
  64. $(this).find('td:eq(8)').css("width","5%");
  65. $(this).find('td:eq(10)').css("width","13%");
  66. });}
  67. $(document).ready(function() {
  68. var button = $("#excel"), interval;
  69. var fileType = "pic", fileNum = "one";
  70. new AjaxUpload(button, {
  71. action: dataurl+"/excela",
  72. name: "userfile",
  73. onSubmit: function(file, ext) {
  74. if (fileType == "pic") {
  75. if (ext && /^(xls|xlsx)$/.test(ext)) {
  76. this.setData({
  77. info: "文件类型为xls"
  78. });
  79. } else {
  80. $(".ts p").html("上传的文件类型不正确");
  81. $(".ts").fadeIn();
  82. setTimeout('$(".ts").fadeOut()', 700);
  83. return false;
  84. }
  85. }
  86. $(".express p:eq(0)").html("<i class='fa fa-2x fa-cog fa-spin'></i> &nbsp; 正在处理中,请稍后...");
  87. $(".express p:eq(1)").html("");
  88. $(".express").show();
  89. if (fileNum == "one") {
  90. this.disable();
  91. }
  92. },
  93. onComplete: function(file, response) {
  94. eval("var obj=" + response);
  95. if (obj.success) {
  96. $(".express").hide();
  97. $(".express p:eq(0)").html("<i class='fa fa-2x fa-check-square-o'></i> &nbsp; "+obj.msg);
  98. $(".express p:eq(1)").html("<font class='sx'>确 定</font><font class='sx'>取 消</font>");
  99. $(".express").show();
  100. } else {
  101. $(".express").hide();
  102. $(".ts p").html(obj.msg);
  103. $(".ts").fadeIn();
  104. setTimeout('$(".ts").fadeOut()', 700);
  105. return false;
  106. }
  107. window.clearInterval(interval);
  108. this.enable();
  109. }
  110. });
  111. });
  112. $(".ctex").click(function() {
  113. var f = "";
  114. $(".select").each(function() {
  115. f = f + $(this).attr("name") + "=" + $(this).children("option:selected").val() + "&";
  116. });
  117. $("input:text").each(function() {
  118. f = f + $(this).attr("name") + "=" + $(this).val() + "&";
  119. });
  120. window.location.href = "/customersmt/excel?excel="+$(this).data("ex")+"&"+f;
  121. });
  122. </script>
  123. <script src="{$theme}js/ajaxupload.3.5.js"></script>
  124. <script type="text/javascript" src="{$theme}js/laydate.js"></script>
  125. {Template footer}