nullTag.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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 id, cs_code, cs_from, cs_country, cs_type, cs_deal, cs_addtime, cs_tel, cs_email,
  49. cs_whatsapp, cs_wechat, cs_linkedin, cs_facebook, cs_alibaba, cs_note
  50. FROM customer
  51. WHERE cs_belong=" . $_SESSION['employee_id'] . "
  52. AND id NOT IN (SELECT customerId FROM tagTable)";
  53. $result = $conn->query($sqlStr);
  54. $tempNum = 0;
  55. while ($row = $result->fetch_assoc()) {
  56. $tempNum++;
  57. ?>
  58. <div class="tline">
  59. <div class="col2"><?= $tempNum ?></div>
  60. <div class="col3 slidepanel"><?= htmlspecialcharsFix($row['cs_code']) ?></div>
  61. <div class="col4">
  62. <?php
  63. $qudaoResult = $conn->query("SELECT ch_name FROM qudao WHERE id=" . (int)$row['cs_from']);
  64. echo ($qudaoRow = $qudaoResult->fetch_assoc()) ? htmlspecialcharsFix($qudaoRow['ch_name']) : '未填写';
  65. ?>
  66. </div>
  67. <div class="col5">
  68. <?php
  69. $countryResult = $conn->query("SELECT countryName FROM country WHERE id=" . (int)$row['cs_country']);
  70. echo ($countryRow = $countryResult->fetch_assoc()) ? htmlspecialcharsFix($countryRow['countryName']) : '未填写';
  71. ?>
  72. </div>
  73. <div class="col6">
  74. <?php
  75. $typeResult = $conn->query("SELECT businessType FROM clientType WHERE id=" . (int)$row['cs_type']);
  76. echo ($typeRow = $typeResult->fetch_assoc()) ? htmlspecialcharsFix($typeRow['businessType']) : '未填写';
  77. ?>
  78. </div>
  79. <div class="col7">
  80. <?php
  81. if ($row['cs_deal'] == 3) {
  82. echo "<span style='color:red;'>成交</span>";
  83. } elseif ($row['cs_deal'] == 2) {
  84. echo "明确需求";
  85. } elseif ($row['cs_deal'] == 1) {
  86. echo "明确需求";
  87. } else {
  88. echo "无响应";
  89. }
  90. ?>
  91. </div>
  92. <div class="col8"><?= $row['cs_addtime'] ?></div>
  93. <div class="col10"><a href="customerEdit.php?Keys=<?= $keys ?? '' ?>&Ord=<?= $ord ?? '' ?>&Page=<?= $page ?? '' ?>&act=edit&id=<?= $row['id'] ?>" class="ico_edit ico">修改</a></div>
  94. </div>
  95. <div class="notepanel clear">
  96. <div class="noteItem">联系方式</div>
  97. <div class="lx">
  98. <div class="tel"><?= htmlspecialcharsFix($row['cs_tel']) ?></div>
  99. <div class="mail"><a href="mailto:<?= htmlspecialcharsFix($row['cs_email']) ?>"><?= htmlspecialcharsFix($row['cs_email']) ?></a></div>
  100. <div class="whatsapp"><?= htmlspecialcharsFix($row['cs_whatsapp']) ?></div>
  101. <div class="wechat"><?= htmlspecialcharsFix($row['cs_wechat']) ?></div>
  102. <div class="linkedin"><?= htmlspecialcharsFix($row['cs_linkedin']) ?></div>
  103. <div class="facebook"><?= htmlspecialcharsFix($row['cs_facebook']) ?></div>
  104. <div class="alibaba"><?= htmlspecialcharsFix($row['cs_alibaba']) ?></div>
  105. </div>
  106. <div class="noteItem2">备注</div>
  107. <div class="notecontent"><?= htmlUnCode($row['cs_note']) ?></div>
  108. <div class="coltag mytag" data-id="<?= $row['id'] ?>" data-em="<?= $_SESSION['employee_id'] ?>"><?= $tagStr ?></div>
  109. </div>
  110. <?php
  111. }
  112. ?>
  113. </div>
  114. </div>
  115. </body>
  116. </html>