nullTag.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <?php
  2. require_once 'conn.php';
  3. checkLogin();
  4. $tagStr = "";
  5. $result = $conn->query("SELECT DISTINCT tagName FROM tagtable WHERE employeeId=" . $_SESSION['employee_id']);
  6. while ($row = $result->fetch_assoc()) {
  7. $tagStr .= "<span>" . htmlspecialcharsFix($row['tagName']) . "</span>,";
  8. }
  9. ?>
  10. <!DOCTYPE html>
  11. <html xmlns="http://www.w3.org/1999/xhtml">
  12. <head>
  13. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  14. <title>管理区域</title>
  15. <link rel="stylesheet" href="css/common.css" type="text/css" />
  16. <link rel="stylesheet" href="css/alert.css" type="text/css" />
  17. <script src="system/js/jquery-1.7.2.min.js"></script>
  18. <script src="js/js.js"></script>
  19. <style>
  20. body {
  21. margin: 0;
  22. padding: 20px;
  23. background: #fff;
  24. }
  25. #man_zone {
  26. margin-left: 0;
  27. }
  28. </style>
  29. </head>
  30. <body class="clear">
  31. <?php // require_once 'panel.php'; ?>
  32. <div id="man_zone">
  33. <div class="fastSelect clear">
  34. <H1>无标签客户</H1>
  35. </div>
  36. <div width="100%" border="0" cellpadding="3" cellspacing="1" class="table2">
  37. <div class="theader">
  38. <div class="col2">序号</div>
  39. <div class="col3">客户编号</div>
  40. <div class="col4">渠道来源</div>
  41. <div class="col5">区域</div>
  42. <div class="col6">客户类型</div>
  43. <div class="col7">跟进阶段</div>
  44. <div class="col8">录入时间</div>
  45. <div class="col10">操作</div>
  46. </div>
  47. <?php
  48. $sqlStr = "SELECT c.id, c.cs_code, c.cs_from, c.cs_country, c.cs_type, c.cs_deal, c.cs_addtime,
  49. c.cs_note, cc.tel as cs_tel, cc.email as cs_email, cc.whatsapp as cs_whatsapp,
  50. cc.wechat as cs_wechat, cc.linkedin as cs_linkedin, cc.facebook as cs_facebook,
  51. cc.alibaba as cs_alibaba
  52. FROM customer c
  53. LEFT JOIN customer_contact cc ON c.id = cc.customer_id
  54. WHERE c.cs_belong=" . $_SESSION['employee_id'] . "
  55. AND c.id NOT IN (SELECT customerId FROM tagtable)";
  56. $result = $conn->query($sqlStr);
  57. $tempNum = 0;
  58. while ($row = $result->fetch_assoc()) {
  59. $tempNum++;
  60. ?>
  61. <div class="tline">
  62. <div class="col2"><?= $tempNum ?></div>
  63. <div class="col3 slidepanel"><?= htmlspecialcharsFix($row['cs_code']) ?></div>
  64. <div class="col4">
  65. <?php
  66. $qudaoResult = $conn->query("SELECT ch_name FROM qudao WHERE id=" . (int)$row['cs_from']);
  67. echo ($qudaoRow = $qudaoResult->fetch_assoc()) ? htmlspecialcharsFix($qudaoRow['ch_name']) : '未填写';
  68. ?>
  69. </div>
  70. <div class="col5">
  71. <?php
  72. $countryResult = $conn->query("SELECT countryName FROM country WHERE id=" . (int)$row['cs_country']);
  73. echo ($countryRow = $countryResult->fetch_assoc()) ? htmlspecialcharsFix($countryRow['countryName']) : '未填写';
  74. ?>
  75. </div>
  76. <div class="col6">
  77. <?php
  78. $typeResult = $conn->query("SELECT businessType FROM clienttype WHERE id=" . (int)$row['cs_type']);
  79. echo ($typeRow = $typeResult->fetch_assoc()) ? htmlspecialcharsFix($typeRow['businessType']) : '未填写';
  80. ?>
  81. </div>
  82. <div class="col7">
  83. <?php
  84. if ($row['cs_deal'] == 3) {
  85. echo "<span style='color:red;'>成交</span>";
  86. } elseif ($row['cs_deal'] == 2) {
  87. echo "明确需求";
  88. } elseif ($row['cs_deal'] == 1) {
  89. echo "明确需求";
  90. } else {
  91. echo "无响应";
  92. }
  93. ?>
  94. </div>
  95. <div class="col8"><?= $row['cs_addtime'] ?></div>
  96. <div class="col10"><a href="customerEdit.php?Keys=<?= $keys ?? '' ?>&Ord=<?= $ord ?? '' ?>&Page=<?= $page ?? '' ?>&act=edit&id=<?= $row['id'] ?>" class="ico_edit ico">修改</a></div>
  97. </div>
  98. <div class="notepanel clear">
  99. <div class="noteItem">联系方式</div>
  100. <div class="lx">
  101. <div class="tel"><?= htmlspecialcharsFix($row['cs_tel']) ?></div>
  102. <div class="mail"><a href="mailto:<?= htmlspecialcharsFix($row['cs_email']) ?>"><?= htmlspecialcharsFix($row['cs_email']) ?></a></div>
  103. <div class="whatsapp"><?= htmlspecialcharsFix($row['cs_whatsapp']) ?></div>
  104. <div class="wechat"><?= htmlspecialcharsFix($row['cs_wechat']) ?></div>
  105. <div class="linkedin"><?= htmlspecialcharsFix($row['cs_linkedin']) ?></div>
  106. <div class="facebook"><?= htmlspecialcharsFix($row['cs_facebook']) ?></div>
  107. <div class="alibaba"><?= htmlspecialcharsFix($row['cs_alibaba']) ?></div>
  108. </div>
  109. <div class="noteItem2">备注</div>
  110. <div class="notecontent"><?= htmlUnCode($row['cs_note']) ?></div>
  111. <div class="coltag mytag" data-id="<?= $row['id'] ?>" data-em="<?= $_SESSION['employee_id'] ?>"><?= $tagStr ?></div>
  112. </div>
  113. <?php
  114. }
  115. ?>
  116. </div>
  117. </div>
  118. </body>
  119. </html>