customerAdd.php 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. <?php
  2. require_once 'conn.php';
  3. checkLogin();
  4. ?>
  5. <!DOCTYPE html>
  6. <html xmlns="http://www.w3.org/1999/xhtml">
  7. <head>
  8. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  9. <title>管理区域</title>
  10. <link rel="stylesheet" href="css/common.css" type="text/css" />
  11. <script src="js/jquery-1.7.2.min.js"></script>
  12. <script src="js/js.js"></script>
  13. <script src="js/xheditor-1.1.9/xheditor-1.1.9-zh-cn.min.js"></script>
  14. <script src="js/Hz2Py-szm-min.js"></script>
  15. <script src="js/ySearchSelect.js"></script>
  16. <script>
  17. $(document).ready(function(){
  18. $('.txt2').xheditor({
  19. tools:'full',
  20. hoverExecDelay:-1,
  21. urlBase:'system',
  22. upLinkUrl:"upload.php",
  23. upLinkExt:"zip,rar,txt,pdf",
  24. upImgUrl:"upload.php",
  25. upImgExt:"jpg,jpeg,gif,png",
  26. upFlashUrl:"upload.php",
  27. upFlashExt:"swf",
  28. upMediaUrl:"upload.php",
  29. upMediaExt:"wmv,avi,wma,mp3,mid"
  30. });
  31. });
  32. </script>
  33. </head>
  34. <body class="clear">
  35. <?php require_once 'panel.php'; ?>
  36. <div id="man_zone">
  37. <form name="form1" id="form1" method="post" action="customerSave.php<?= $hrefstr ?? '' ?>" onSubmit="return checkInput();">
  38. <table width="100%" border="0" cellpadding="3" cellspacing="1" class="table1">
  39. <tbody>
  40. <tr>
  41. <th width="8%">客户编号</th>
  42. <td>
  43. <input type="text" id="cs_code" name="cs_code" value="" class="txt1" />
  44. <input type="hidden" name="cs_addtime" value="<?= date('Y-m-d H:i:s') ?>" />
  45. </td>
  46. </tr>
  47. <tr>
  48. <th width="8%">公司名称</th>
  49. <td><input type="text" id="cs_company" name="cs_company" value="" class="txt1" /></td>
  50. </tr>
  51. <tr>
  52. <th width="8%">联系人</th>
  53. <td><input type="text" id="cs_name" name="cs_name" value="" class="txt1" /></td>
  54. </tr>
  55. <tr>
  56. <th width="8%">地区</th>
  57. <td>
  58. <div class="layui-input-inline">
  59. <div class="layui-form-select ySearchSelect y1">
  60. <div class="layui-input">请选择客户区域</div>
  61. <input name="cs_country" id="cs_country" type="hidden">
  62. <i class="layui-edge"></i>
  63. <ul>
  64. <?php
  65. $result = $conn->query("SELECT id, countryCode, countryName FROM country");
  66. while ($row = $result->fetch_assoc()) {
  67. echo "<li class=\"on\" data-c=\"{$row['id']}\">(+{$row['countryCode']}){$row['countryName']}</li>";
  68. }
  69. ?>
  70. <p>无匹配项</p>
  71. </ul>
  72. </div>
  73. </div>
  74. <script>
  75. $(function () {
  76. $(".y1").ySearchSelect();
  77. })
  78. </script>
  79. </td>
  80. </tr>
  81. <tr>
  82. <th width="8%">来源</th>
  83. <td>
  84. <select id="cs_from" name="cs_from">
  85. <option value="0">请选择来源</option>
  86. <?php
  87. $result = $conn->query("SELECT id, ch_name FROM qudao");
  88. while ($row = $result->fetch_assoc()) {
  89. echo "<option value=\"{$row['id']}\">{$row['ch_name']}</option>";
  90. }
  91. ?>
  92. </select>
  93. </td>
  94. </tr>
  95. <tr>
  96. <th rowspan="7">联系方式</th>
  97. <td><input type="text" id="cs_tel" name="cs_tel" value="" class="txt1 tel" placeholder="电话格式:区号+号码 如:+86 15012345678" /></td>
  98. </tr>
  99. <tr>
  100. <td><input type="text" id="cs_wechat" name="cs_wechat" value="" class="txt1 wechat" placeholder="微信"/></td>
  101. </tr>
  102. <tr>
  103. <td>
  104. <input type="text" id="cs_whatsapp" name="cs_whatsapp" value="" class="txt-short2 whatsapp" placeholder="Whatsapp 格式:区号+号码 如:+86 15012345678"/>
  105. <span class="syncphone">同步到电话联方式</span>
  106. </td>
  107. </tr>
  108. <tr>
  109. <td><input type="text" id="cs_email" name="cs_email" value="" class="txt1 mail" placeholder="邮件" /></td>
  110. </tr>
  111. <tr>
  112. <td><input type="text" id="cs_linkedin" name="cs_linkedin" value="" class="txt1 linkedin" placeholder="领英链接"/></td>
  113. </tr>
  114. <tr>
  115. <td><input type="text" id="cs_facebook" name="cs_facebook" value="" class="txt1 facebook" placeholder="Facebook" /></td>
  116. </tr>
  117. <tr>
  118. <td><input type="text" id="cs_alibaba" name="cs_alibaba" value="" class="txt1 alibaba" placeholder="阿里巴巴会员名" /></td>
  119. </tr>
  120. <tr>
  121. <th>地址</th>
  122. <td><input type="text" id="cs_address" name="cs_address" value="" class="txt1" /></td>
  123. </tr>
  124. <tr>
  125. <th>业务类型</th>
  126. <td>
  127. <?php
  128. $result = $conn->query("SELECT id, businessType FROM clientType");
  129. while ($row = $result->fetch_assoc()) {
  130. echo "<input type=\"radio\" name=\"cs_type\" value=\"{$row['id']}\" id=\"fortype{$row['id']}\">
  131. <label for=\"fortype{$row['id']}\">{$row['businessType']}</label>";
  132. }
  133. ?>
  134. </td>
  135. </tr>
  136. <tr>
  137. <th>跟进阶段</th>
  138. <td>
  139. <input type="radio" id="fordeal1" class="cs_deal" name="cs_deal" value="0"><label for="fordeal1">无响应</label>
  140. <input type="radio" id="fordeal2" class="cs_deal" name="cs_deal" value="1" checked="checked"><label for="fordeal2">背景调查</label>
  141. <input type="radio" id="fordeal3" class="cs_deal" name="cs_deal" value="2"><label for="fordeal3">明确需求</label>
  142. <input type="radio" id="fordeal4" class="cs_deal" name="cs_deal" value="3"><label for="fordeal4">已成交</label>
  143. </td>
  144. </tr>
  145. <tr>
  146. <th>其他</th>
  147. <td>
  148. <input type="checkbox" id="belongClient" class="cs_belongClient" name="cs_belongClient" value="1">
  149. <label for="belongClient">客户的客户</label>
  150. </td>
  151. </tr>
  152. <tr>
  153. <th>自定义标签</th>
  154. <td>
  155. <div class="taglist"></div>
  156. <input type="hidden" id="mytag" name="mytag" value="">
  157. <div class="commontag clear">
  158. <i class="tag">美特柏品牌客户</i>,
  159. <i class="tag">OEM定制客户</i>,
  160. <i class="tag">小型B端客户</i>,
  161. <i class="tag">C端客户</i>,
  162. <i class="tag">贸易公司</i>,
  163. <i class="tag">档口客户</i>
  164. <?php
  165. $stmt = $conn->prepare("SELECT DISTINCT tagName FROM tagTable WHERE employeeId = ?");
  166. $stmt->bind_param("i", $_SESSION['employee_id']);
  167. $stmt->execute();
  168. $result = $stmt->get_result();
  169. while ($row = $result->fetch_assoc()) {
  170. echo "<i class=\"tag\">" . htmlspecialchars(textUncode($row['tagName'])) . "</i>,";
  171. }
  172. ?>
  173. </div>
  174. <input type="text" id="tapinput" class="txt-short" placeholder="添加新标签,按Enter添加">
  175. </td>
  176. </tr>
  177. <tr>
  178. <th width="8%">备注</th>
  179. <td><textarea name="cs_note" class="txt2" placeholder=""></textarea></td>
  180. </tr>
  181. <tr>
  182. <th></th>
  183. <td>
  184. <input type="button" name="save" id="save" value="确定" class="btn1" onclick="subform();" />
  185. <input type="button" value="返回" class="btn1" onClick="location.href='customers.php'" />
  186. </td>
  187. </tr>
  188. </tbody>
  189. </table>
  190. </form>
  191. </div>
  192. </body>
  193. </html>