nullTag.php 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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>" . htmlspecialchars($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. </head>
  20. <body class="clear">
  21. <?php require_once 'panel.php'; ?>
  22. <div id="man_zone">
  23. <div class="fastSelect clear">
  24. <H1>无标签客户</H1>
  25. </div>
  26. <div width="100%" border="0" cellpadding="3" cellspacing="1" class="table2">
  27. <div class="theader">
  28. <div class="col2">序号</div>
  29. <div class="col3">客户编号</div>
  30. <div class="col4">渠道来源</div>
  31. <div class="col5">区域</div>
  32. <div class="col6">客户类型</div>
  33. <div class="col7">跟进阶段</div>
  34. <div class="col8">录入时间</div>
  35. <div class="col10">操作</div>
  36. </div>
  37. <?php
  38. $sqlStr = "SELECT id, cs_code, cs_from, cs_country, cs_type, cs_deal, cs_addtime, cs_tel, cs_email,
  39. cs_whatsapp, cs_wechat, cs_linkedin, cs_facebook, cs_alibaba, cs_note
  40. FROM customer
  41. WHERE cs_belong=" . $_SESSION['employee_id'] . "
  42. AND id NOT IN (SELECT customerId FROM tagTable)";
  43. $result = $conn->query($sqlStr);
  44. $tempNum = 0;
  45. while ($row = $result->fetch_assoc()) {
  46. $tempNum++;
  47. ?>
  48. <div class="tline">
  49. <div class="col2"><?= $tempNum ?></div>
  50. <div class="col3 slidepanel"><?= htmlspecialchars($row['cs_code']) ?></div>
  51. <div class="col4">
  52. <?php
  53. $qudaoResult = $conn->query("SELECT ch_name FROM qudao WHERE id=" . (int)$row['cs_from']);
  54. echo ($qudaoRow = $qudaoResult->fetch_assoc()) ? htmlspecialchars($qudaoRow['ch_name']) : '未填写';
  55. ?>
  56. </div>
  57. <div class="col5">
  58. <?php
  59. $countryResult = $conn->query("SELECT countryName FROM country WHERE id=" . (int)$row['cs_country']);
  60. echo ($countryRow = $countryResult->fetch_assoc()) ? htmlspecialchars($countryRow['countryName']) : '未填写';
  61. ?>
  62. </div>
  63. <div class="col6">
  64. <?php
  65. $typeResult = $conn->query("SELECT businessType FROM clientType WHERE id=" . (int)$row['cs_type']);
  66. echo ($typeRow = $typeResult->fetch_assoc()) ? htmlspecialchars($typeRow['businessType']) : '未填写';
  67. ?>
  68. </div>
  69. <div class="col7">
  70. <?php
  71. if ($row['cs_deal'] == 3) {
  72. echo "<span style='color:red;'>成交</span>";
  73. } elseif ($row['cs_deal'] == 2) {
  74. echo "明确需求";
  75. } elseif ($row['cs_deal'] == 1) {
  76. echo "明确需求";
  77. } else {
  78. echo "无响应";
  79. }
  80. ?>
  81. </div>
  82. <div class="col8"><?= $row['cs_addtime'] ?></div>
  83. <div class="col10"><a href="customerEdit.php?Keys=<?= $keys ?? '' ?>&Ord=<?= $ord ?? '' ?>&Page=<?= $page ?? '' ?>&act=edit&id=<?= $row['id'] ?>" class="ico_edit ico">修改</a></div>
  84. </div>
  85. <div class="notepanel clear">
  86. <div class="noteItem">联系方式</div>
  87. <div class="lx">
  88. <div class="tel"><?= htmlspecialchars($row['cs_tel']) ?></div>
  89. <div class="mail"><a href="mailto:<?= htmlspecialchars($row['cs_email']) ?>"><?= htmlspecialchars($row['cs_email']) ?></a></div>
  90. <div class="whatsapp"><?= htmlspecialchars($row['cs_whatsapp']) ?></div>
  91. <div class="wechat"><?= htmlspecialchars($row['cs_wechat']) ?></div>
  92. <div class="linkedin"><?= htmlspecialchars($row['cs_linkedin']) ?></div>
  93. <div class="facebook"><?= htmlspecialchars($row['cs_facebook']) ?></div>
  94. <div class="alibaba"><?= htmlspecialchars($row['cs_alibaba']) ?></div>
  95. </div>
  96. <div class="noteItem2">备注</div>
  97. <div class="notecontent"><?= htmlUnCode($row['cs_note']) ?></div>
  98. <div class="coltag mytag" data-id="<?= $row['id'] ?>" data-em="<?= $_SESSION['employee_id'] ?>"><?= $tagStr ?></div>
  99. </div>
  100. <?php
  101. }
  102. ?>
  103. </div>
  104. </div>
  105. </body>
  106. </html>