123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- <?php
- require_once 'conn.php';
- checkLogin();
- $tagStr = "";
- $result = $conn->query("SELECT DISTINCT tagName FROM tagtable WHERE employeeId=" . $_SESSION['employee_id']);
- while ($row = $result->fetch_assoc()) {
- $tagStr .= "<span>" . htmlspecialcharsFix($row['tagName']) . "</span>,";
- }
- ?>
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>管理区域</title>
- <link rel="stylesheet" href="css/common.css" type="text/css" />
- <link rel="stylesheet" href="css/alert.css" type="text/css" />
- <script src="system/js/jquery-1.7.2.min.js"></script>
- <script src="js/js.js"></script>
- <style>
- body {
- margin: 0;
- padding: 20px;
- background: #fff;
- }
- #man_zone {
- margin-left: 0;
- }
- </style>
- </head>
- <body class="clear">
- <?php // require_once 'panel.php'; ?>
- <div id="man_zone">
- <div class="fastSelect clear">
- <H1>无标签客户</H1>
- </div>
- <div width="100%" border="0" cellpadding="3" cellspacing="1" class="table2">
- <div class="theader">
- <div class="col2">序号</div>
- <div class="col3">客户编号</div>
- <div class="col4">渠道来源</div>
- <div class="col5">区域</div>
- <div class="col6">客户类型</div>
- <div class="col7">跟进阶段</div>
- <div class="col8">录入时间</div>
- <div class="col10">操作</div>
- </div>
- <?php
- $sqlStr = "SELECT c.id, c.cs_code, c.cs_from, c.cs_country, c.cs_type, c.cs_deal, c.cs_addtime,
- c.cs_note, cc.tel as cs_tel, cc.email as cs_email, cc.whatsapp as cs_whatsapp,
- cc.wechat as cs_wechat, cc.linkedin as cs_linkedin, cc.facebook as cs_facebook,
- cc.alibaba as cs_alibaba
- FROM customer c
- LEFT JOIN customer_contact cc ON c.id = cc.customer_id
- WHERE c.cs_belong=" . $_SESSION['employee_id'] . "
- AND c.id NOT IN (SELECT customerId FROM tagtable)";
- $result = $conn->query($sqlStr);
- $tempNum = 0;
- while ($row = $result->fetch_assoc()) {
- $tempNum++;
- ?>
- <div class="tline">
- <div class="col2"><?= $tempNum ?></div>
- <div class="col3 slidepanel"><?= htmlspecialcharsFix($row['cs_code']) ?></div>
- <div class="col4">
- <?php
- $qudaoResult = $conn->query("SELECT ch_name FROM qudao WHERE id=" . (int)$row['cs_from']);
- echo ($qudaoRow = $qudaoResult->fetch_assoc()) ? htmlspecialcharsFix($qudaoRow['ch_name']) : '未填写';
- ?>
- </div>
- <div class="col5">
- <?php
- $countryResult = $conn->query("SELECT countryName FROM country WHERE id=" . (int)$row['cs_country']);
- echo ($countryRow = $countryResult->fetch_assoc()) ? htmlspecialcharsFix($countryRow['countryName']) : '未填写';
- ?>
- </div>
- <div class="col6">
- <?php
- $typeResult = $conn->query("SELECT businessType FROM clienttype WHERE id=" . (int)$row['cs_type']);
- echo ($typeRow = $typeResult->fetch_assoc()) ? htmlspecialcharsFix($typeRow['businessType']) : '未填写';
- ?>
- </div>
- <div class="col7">
- <?php
- if ($row['cs_deal'] == 3) {
- echo "<span style='color:red;'>成交</span>";
- } elseif ($row['cs_deal'] == 2) {
- echo "明确需求";
- } elseif ($row['cs_deal'] == 1) {
- echo "明确需求";
- } else {
- echo "无响应";
- }
- ?>
- </div>
- <div class="col8"><?= $row['cs_addtime'] ?></div>
- <div class="col10"><a href="customerEdit.php?Keys=<?= $keys ?? '' ?>&Ord=<?= $ord ?? '' ?>&Page=<?= $page ?? '' ?>&act=edit&id=<?= $row['id'] ?>" class="ico_edit ico">修改</a></div>
- </div>
- <div class="notepanel clear">
- <div class="noteItem">联系方式</div>
- <div class="lx">
- <div class="tel"><?= htmlspecialcharsFix($row['cs_tel']) ?></div>
- <div class="mail"><a href="mailto:<?= htmlspecialcharsFix($row['cs_email']) ?>"><?= htmlspecialcharsFix($row['cs_email']) ?></a></div>
- <div class="whatsapp"><?= htmlspecialcharsFix($row['cs_whatsapp']) ?></div>
- <div class="wechat"><?= htmlspecialcharsFix($row['cs_wechat']) ?></div>
- <div class="linkedin"><?= htmlspecialcharsFix($row['cs_linkedin']) ?></div>
- <div class="facebook"><?= htmlspecialcharsFix($row['cs_facebook']) ?></div>
- <div class="alibaba"><?= htmlspecialcharsFix($row['cs_alibaba']) ?></div>
- </div>
- <div class="noteItem2">备注</div>
- <div class="notecontent"><?= htmlUnCode($row['cs_note']) ?></div>
- <div class="coltag mytag" data-id="<?= $row['id'] ?>" data-em="<?= $_SESSION['employee_id'] ?>"><?= $tagStr ?></div>
- </div>
- <?php
- }
- ?>
- </div>
- </div>
- </body>
- </html>
|