update_customer_info.ftl 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <#--new style begin-->
  5. <meta charset="utf-8">
  6. <meta name="renderer" content="webkit|ie-comp|ie-stand">
  7. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  8. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  9. <meta http-equiv="Cache-Control" content="no-siteapp" />
  10. <#include "/base/add_base.ftl">
  11. <link href="${path}/common/lib/jquery.ui/jquery-ui.css" rel="stylesheet" type="text/css"/>
  12. <link href="${path}/common/lib/webuploader/0.1.5/webuploader.css" rel="stylesheet" type="text/css"/>
  13. <link href="${path}/common/lib/icheck/icheck.css" rel="stylesheet" type="text/css"/>
  14. <style>
  15. .tit{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
  16. .tit:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
  17. .tit-2{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
  18. .tit-2:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
  19. #province select{margin-right:10px; width:100px;height: 31px;-webkit-appearance:none !important;appearance:none;background: url(${path}/common/images/cm/select-1.png) right center no-repeat;background-size: auto 100%;padding-left:3px;padding-right: 25px;}
  20. .my-btn-search{border: 1px solid #32a3d8;padding: 1px 25px;height: 32px;background-color: #32a3d8;color: #fff;}
  21. #suggest, #suggest2 {width:200px}
  22. .gray {color:gray}
  23. .ac_results {background:#fff;border:1px solid #7f9db9;position: absolute;z-index: 10000;display: none}
  24. .ac_results li a {white-space: nowrap;text-decoration:none;display:block;color:#05a;padding:1px 3px}
  25. .ac_results li {border:1px solid #fff}
  26. .ac_over, .ac_results li a:hover {background:#c8e3fc}
  27. .ac_results li a span {float:right}
  28. .ac_result_tip {border-bottom:1px dashed #666;padding:3px}
  29. .select-box{background: url(${path}/common/images/cm/select-1.png) right center no-repeat;background-size: auto 100%;}
  30. .select-box select{-webkit-appearance:none !important;background-color: transparent; appearance:none;padding-right: 25px;}
  31. .dalog-ask{position: absolute;left:60%;top:0;-webkit-transform: translateY(-30%);transform: translateY(-30%);display: none;background-color: #fff;z-index: 10;}
  32. .tag{ width:300px; min-height:300px; border:1px solid #32a3d8; position:relative;background-color: #fff;line-height: 1.5;padding: 10px 12px;}
  33. .tag em{display:block; border-width:15px; position:absolute; top:30%; left:-30px;border-style:solid dashed dashed; border-color:transparent #32a3d8 transparent transparent;font-size:0; line-height:0;}
  34. .dalog-ask .ask{color: #000;margin: 10px 0 5px 0;}
  35. .dalog-ask .answer{color: #666;margin-bottom: 10px;}
  36. .dalog-ask .answer:hover{color: #32a3d8;cursor: pointer;}
  37. .time-line-list{list-style: none;width: 100%;margin-left: -20px;}
  38. .time-line-list>li{position: relative;float: left; text-align: center;width: 100px;overflow: hidden;white-space: nowrap;word-break: break-all;padding: 2px 0;}
  39. .time-line-list .number{display: inline-block; padding: 2px; background: #32a3d8;border: 2px solid #fff;box-shadow:0 0 0 1px #32a3d8;width: 20px;height: 20px;color: #fff;line-height: 20px;border-radius: 50%;}
  40. .time-line-list .red{display: inline-block; padding: 2px; background: red;border: 2px solid #fff;box-shadow:0 0 0 1px #32a3d8;width: 20px;height: 20px;color: #fff;line-height: 20px;border-radius: 50%;}
  41. .time-line-list>li:before{content:'';position: absolute;height: 1px;width: 30%;right:0;top: 15px; background-color: #32a3d8;}
  42. .time-line-list>li:after{content: '';position: absolute;height: 1px;width: 30%;left: 0;top: 15px;background:#32a3d8;}
  43. .time-line-list>li:first-child:after,.time-line-list>li:last-child:before{display: none;}
  44. .time-line-list .arrow{border-width:7px; position:absolute; left:25%; top:9px;border-style:solid dashed dashed; border-color:transparent transparent transparent #32a3d8;font-size:0; line-height:0;}
  45. .time-line-list>li:first-child .arrow{display: none;}
  46. .table-bg th{background-color: #e2f6ff;}
  47. .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #effaff;border: 1px solid #32a3d8;}
  48. .my-search-input{padding-left: 30px;background: url(${path}/common/images/cm/search.png) 6px center no-repeat;background-size: auto 60%; }
  49. .txt-red{color:red}
  50. </style>
  51. <title>修改客户信息</title>
  52. </head>
  53. <body>
  54. <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
  55. <span class="c-gray en">&gt;</span> 客户信息管理
  56. <span class="c-gray en">&gt;</span> 修改客户信息
  57. <a class="btn radius r" style="line-height:1.6em;margin-top:3px;background: #32a3d8;color: #fff;border:1px solid #32a3d8;" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
  58. </nav>
  59. <div class="pd-20 cl">
  60. <form action="${path}/admin/customerBasic/updateCustomerInfo" method="post">
  61. <#--<form action="${path}/admin/customerBasic/save_customer_info" method="post" class="form form-horizontal" id="form-customerInfoAdmin-add" onkeydown="if(event.keyCode==13)return false;">-->
  62. <input type="hidden" id="saveCustomerInfo" name="saveCustomerInfo" value="">
  63. <input type="hidden" id="customerId" name="customerId" value="${customerBasicInfo.customerId!''}">
  64. <#--客户基本信息 start-->
  65. <div class="row cl">
  66. <label class="form-label col-2">
  67. <div class="tit-2">客户基本信息</div>
  68. </label>
  69. <div class="formControls col-9">
  70. </div>
  71. </div>
  72. <div class="row cl" style="margin-bottom: 10px;">
  73. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>客户类型:</label>
  74. <div class="formControls col-4 col-sm-4">
  75. <span class="select-box">
  76. <select name="customerType" class="select">
  77. <option value="1" <#if customerBasicInfo.customerType == 1>selected</#if>>个人</option>
  78. <option value="2"<#if customerBasicInfo.customerType == 2>selected</#if>>公司</option>
  79. </select>
  80. </span>
  81. </div>
  82. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>合作进度:</label>
  83. <div class="formControls col-4 col-sm-4">
  84. <span class="select-box">
  85. <select name="cooperativeState" class="select">
  86. <option value="1"<#if customerBasicInfo.cooperativeState == 1>selected</#if>>意向合作</option>
  87. <option value="2"<#if customerBasicInfo.cooperativeState == 2>selected</#if>>已经合作</option>
  88. <option value="3"<#if customerBasicInfo.cooperativeState == 3>selected</#if>>停止合作</option>
  89. </select>
  90. </span>
  91. </div>
  92. </div>
  93. <div class="row cl" style="margin-bottom: 10px;">
  94. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>客户名称:</label>
  95. <div class="formControls col-4 col-sm-4">
  96. <input type="text" class="input-text trim_input" placeholder="公司/客户 全称" id="customerName" name="customerName" value="${customerBasicInfo.customerName!''}">
  97. </div>
  98. <label class="form-label col-2 col-sm-2">客户行业:</label>
  99. <div class="formControls col-4 col-sm-4">
  100. <input type="text" class="input-text trim_input" placeholder="请输入行业名称" id="customerIndustry" name="customerIndustry" value="${customerBasicInfo.customerIndustry!''}">
  101. </div>
  102. </div>
  103. <div class="row cl" style="position: relative;margin-bottom: 10px;">
  104. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>客户地址:</label>
  105. <div class="formControls col-4 col-sm-4">
  106. <span class="select-box">
  107. <select name="customerProvinceCode" id="customerProvinceCode" class="select">
  108. <option value="">请选择省份</option>
  109. </select>
  110. </span>
  111. </div>
  112. <div class="formControls col-4 col-sm-4">
  113. <span class="select-box">
  114. <select name="customerCityCode" id="customerCityCode" class="select">
  115. <option value="">请选择城市</option>
  116. </select>
  117. </span>
  118. </div>
  119. </div>
  120. <div class="row cl" style="margin-bottom: 10px;">
  121. <label class="form-label col-2 col-sm-2"></label>
  122. <div class="formControls col-9 col-sm-9">
  123. <input type="text" class="input-text trim_input" placeholder="请输入客户的详细地址" id="customerAddress" name="customerAddress" value="${customerBasicInfo.customerAddress!''}">
  124. </div>
  125. </div>
  126. <#--客户基本信息 end-->
  127. <#--对接联系人信息-->
  128. <div class="row cl">
  129. <label class="form-label col-3">
  130. <div class="tit-2">对接联系人信息<span style="font-family:'Arial Normal', 'Arial';font-weight:400;font-size:14px;">(请确保真实性,公司将不定期抽验回访)</span></div>
  131. </label>
  132. <div class="formControls col-9">
  133. </div>
  134. </div>
  135. <div class="row cl">
  136. <div class="formControls col-9">
  137. <span class="c-red">*</span>姓名:<input type="text" class="input-text" style="width:90px;margin-right: 10px; margin-bottom: 10px;" placeholder="联系人姓名" id="contactName" name="contactName">
  138. <span class="c-red">*</span>电话:<input type="text" class="input-text" style="width:90px;margin-right: 10px;margin-bottom: 10px;" placeholder="联系人电话" id="contactPhone" name="contactPhone">
  139. <span class="c-red">*</span>职位/身份:<input type="text" class="input-text" style="width:90px;margin-right: 10px;margin-bottom: 10px;" placeholder="职位或身份" id="contactType" name="contactType">
  140. <span class="c-red">*</span>联系邮箱:<input type="text" class="input-text" style="width:90px;margin-right: 10px;margin-bottom: 10px;" placeholder="邮箱" id="contactEmail" name="contactEmail">
  141. <span class="c-red"><button type="button" style="cursor:pointer; float: right;height: 35px;margin-right: 30px;margin-bottom: 10px;" class="my-btn-search" onclick="toAddDockedContactInfo();">保存</button></span>
  142. </div>
  143. <div class="mt-20" style="margin: 20px;">
  144. <input type="hidden" id="dockedContactInfoJson" name="dockedContactInfoJson">
  145. <table class="table table-border table-bordered table-bg table-hover table-sort" id="contactTable">
  146. <thead>
  147. <tr class="text-c">
  148. <th width="100">联系人姓名</th>
  149. <th width="100">联系电话</th>
  150. <th width="100">职位/身份</th>
  151. <th width="100">联系邮箱</th>
  152. <th width="100">操作</th>
  153. </tr>
  154. </thead>
  155. <tbody id="contactListId">
  156. <#if listDockedContactInfo?? && (listDockedContactInfo?size > 0) >
  157. <#list listDockedContactInfo as list>
  158. <tr>
  159. <td>${list.contactName!''}</td>
  160. <td>${list.contactPhone!''}</td>
  161. <td>${list.contactType!''}</td>
  162. <td>${list.contactEmail!''}</td>
  163. <td><a href='javascript:;' onclick='deleteContact(this)'>删除</a></td>
  164. </tr>
  165. </#list>
  166. <#else>
  167. <tr><td colspan="5" class="td-manage text-c" >暂时没有联系人信息,请添加!</td></tr>
  168. </#if>
  169. </tbody>
  170. </table>
  171. </div>
  172. </div>
  173. <#--客户销售渠道信息备案-->
  174. <div class="row cl">
  175. <label class="form-label col-3">
  176. <div class="tit-2">客户销售渠道信息备案</div>
  177. </label>
  178. <div class="formControls col-9">
  179. </div>
  180. </div>
  181. <div class="row cl">
  182. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>渠道类别:</label>
  183. <div class="formControls col-1 col-sm-1">
  184. <span class="select-box">
  185. <select name="channelCategory" id="channelCategory" class="select">
  186. </select>
  187. </span>
  188. </div>
  189. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>渠道类型:</label>
  190. <div class="formControls col-1 col-sm-1">
  191. <span class="select-box">
  192. <select name="channelType" id="channelType" class="select">
  193. </select>
  194. </span>
  195. </div>
  196. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>渠道名称:</label>
  197. <div class="formControls col-1 col-sm-1">
  198. <input type="text" class="input-text" style="width:90px;margin-right: 0px;margin-bottom: 10px;" placeholder="填写具体店名" id="channelName" name="channelName">
  199. </div>
  200. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>销售产品:</label>
  201. <div class="formControls col-1 col-sm-1">
  202. <span class="select-box">
  203. <select name="promotingProducts" id="promotingProducts" class="select">
  204. </select>
  205. </span>
  206. </div>
  207. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>供货价格:</label>
  208. <div class="formControls col-1 col-sm-1">
  209. <span class="select-box">
  210. <select name="supplyPrice" id="supplyPrice" class="select">
  211. </select>
  212. </span>
  213. <input type="text" class="input-text" style="width:90px;margin-right: 0px;margin-bottom: 10px;" placeholder="填写供货价格" id="supplyPrice" name="supplyPrice">
  214. </div>
  215. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>账期:</label>
  216. <div class="formControls col-1 col-sm-1">
  217. <span class="select-box">
  218. <select name="accountPeriod" id="accountPeriod" class="select">
  219. <option value="1">先款</option>
  220. <option value="2">月结</option>
  221. <option value="3">两个月</option>
  222. </select>
  223. </span>
  224. </div>
  225. <button type="button" style="cursor:pointer; float: right;height: 35px;margin-right: 30px;margin-bottom: 10px;" class="my-btn-search" onclick="toAddChannelSaleInfo();">保存</button>
  226. <div class="mt-20" style="margin: 20px;">
  227. <input type="hidden" id="channelSaleInfoJson" name="channelSaleInfoJson">
  228. <table class="table table-border table-bordered table-bg table-hover table-sort" id="saleTable">
  229. <thead>
  230. <tr class="text-c">
  231. <th width="100">渠道类别</th>
  232. <th width="100">渠道类型</th>
  233. <th width="100">渠道/平台名称</th>
  234. <th width="100">销售产品型号</th>
  235. <th width="100">供货价(元)</th>
  236. <th width="100">账期 </th>
  237. <th width="100">操作</th>
  238. </tr>
  239. </thead>
  240. <tbody id="channelSaleListId">
  241. <#if listChannelSaleInfo?? && (listChannelSaleInfo?size > 0) >
  242. <#list listChannelSaleInfo as list>
  243. <tr>
  244. <td>${list.channelCategory!''}</td>
  245. <td>${list.channelType!''}</td>
  246. <td>${list.channelName!''}</td>
  247. <td>${list.promotingProducts!''}</td>
  248. <td>${list.supplyPrice!''}</td>
  249. <td>${list.accountPeriod!''}</td>
  250. <td><a href='javascript:;' onclick='deleteChannelSale(this)'>删除</a></td>
  251. </tr>
  252. </#list>
  253. <#else>
  254. <tr><td colspan="7" class="td-manage text-c" >暂时没有客户销售渠道信息,请添加!</td></tr>
  255. </#if>
  256. </tbody>
  257. </table>
  258. </div>
  259. </div>
  260. <#--付款/退款信息-->
  261. <div class="row cl">
  262. <label class="form-label col-3">
  263. <div class="tit-2">付款/退款信息<span style="font-family:'Arial Normal', 'Arial';font-weight:400;font-size:14px;">(请真实有效,用于财务收款确认或退款业务)</span></div>
  264. </label>
  265. <div class="formControls col-9">
  266. </div>
  267. </div>
  268. <#if billingInfo??>
  269. <div class="row cl" style="margin-bottom: 10px;">
  270. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>开户支行:</label>
  271. <div class="formControls col-2 col-sm-2">
  272. <input type="text" class="input-text trim_input" placeholder="开户支行" id="accountOpeningBranch" name="accountOpeningBranch" value="${billingInfo.accountOpeningBranch!''}">
  273. </div>1
  274. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>账户名称:</label>
  275. <div class="formControls col-2 col-sm-2 skin-minimal">
  276. <input type="text" class="input-text trim_input" placeholder="账户名称" id="accountName" name="accountName" value="${billingInfo.accountName!''}">
  277. </div>
  278. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>账号:</label>
  279. <div class="formControls col-2 col-sm-2 skin-minimal">
  280. <input type="text" class="input-text trim_input" placeholder="填写账号" id="accountNum" name="accountNum" value="${billingInfo.accountNum!''}">
  281. </div>
  282. </div>
  283. <div class="row cl" style="margin-bottom: 10px;">
  284. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>收款人姓名:</label>
  285. <div class="formControls col-2 col-sm-2 skin-minimal">
  286. <input type="text" class="input-text trim_input" placeholder="收款人姓名" id="receivablesName" name="receivablesName" value="${billingInfo.receivablesName!''}">
  287. </div>
  288. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>收款人手机:</label>
  289. <div class="formControls col-2 col-sm-2 skin-minimal">
  290. <input type="text" class="input-text trim_input" placeholder="收款人手机" id="receivablesPhone" name="receivablesPhone" value="${billingInfo.receivablesPhone!''}">
  291. </div>
  292. </div>
  293. <#else >
  294. <div class="row cl" style="margin-bottom: 10px;">
  295. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>开户支行:</label>
  296. <div class="formControls col-2 col-sm-2">
  297. <input type="text" class="input-text trim_input" placeholder="开户支行" id="accountOpeningBranch" name="accountOpeningBranch" value="">
  298. </div>
  299. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>账户名称:</label>
  300. <div class="formControls col-2 col-sm-2 skin-minimal">
  301. <input type="text" class="input-text trim_input" placeholder="账户名称" id="accountName" name="accountName" value="">
  302. </div>
  303. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>账号:</label>
  304. <div class="formControls col-2 col-sm-2 skin-minimal">
  305. <input type="text" class="input-text trim_input" placeholder="填写账号" id="accountNum" name="accountNum" value="">
  306. </div>
  307. </div>
  308. <div class="row cl" style="margin-bottom: 10px;">
  309. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>收款人姓名:</label>
  310. <div class="formControls col-2 col-sm-2 skin-minimal">
  311. <input type="text" class="input-text trim_input" placeholder="收款人姓名" id="receivablesName" name="receivablesName" value="">
  312. </div>
  313. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>收款人手机:</label>
  314. <div class="formControls col-2 col-sm-2 skin-minimal">
  315. <input type="text" class="input-text trim_input" placeholder="收款人手机" id="receivablesPhone" name="receivablesPhone" value="">
  316. </div>
  317. </div>
  318. </#if>
  319. <#--开票信息-->
  320. <div class="row cl" style="margin-bottom: 10px;">
  321. <label class="form-label col-3">
  322. <div class="tit-2">开票信息<span>*是否开票<input type="radio" value="1" name="outInvoice" checked="checked">开票</input><input type="radio" name="outInvoice" value="2">不开票</input></span></div>
  323. </label>
  324. <div class="formControls col-9">
  325. </div>
  326. </div>
  327. <#if ticketOpeningInfo??>
  328. <div class="row cl" style="margin-bottom: 10px;">
  329. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>发票类型:</label>
  330. <div class="formControls col-2 col-sm-2">
  331. <span class="select-box">
  332. <select name="ticketType" class="select">
  333. <option value="1" <#if ticketOpeningInfo.ticketType == 1>selected</#if>>专票</option>
  334. <option value="2" <#if ticketOpeningInfo.ticketType == 2>selected</#if>>普票</option>
  335. </select>
  336. </span>
  337. </div>
  338. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>开户支行:</label>
  339. <div class="formControls col-2 col-sm-2 skin-minimal">
  340. <input type="text" class="input-text trim_input" placeholder="开户支行名称" id="accountOpeningBranch" name="accountOpeningBranch" value="${ticketOpeningInfo.accountOpeningBranch!''}">
  341. </div>
  342. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>开票账户:</label>
  343. <div class="formControls col-2 col-sm-2 skin-minimal">
  344. <input type="text" class="input-text trim_input" placeholder="开票账户" id="ticketOpeningAccount" name="ticketOpeningAccount" value="${ticketOpeningInfo.ticketOpeningAccount!''}">
  345. </div>
  346. </div>
  347. <div class="row cl" style="margin-bottom: 10px;">
  348. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>企业名称:</label>
  349. <div class="formControls col-2 col-sm-2 skin-minimal">
  350. <input type="text" class="input-text trim_input" placeholder="企业名称" id="enterpriseName" name="enterpriseName" value="${ticketOpeningInfo.enterpriseName!''}">
  351. </div>
  352. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>纳税人识别号:</label>
  353. <div class="formControls col-2 col-sm-2 skin-minimal">
  354. <input type="text" class="input-text trim_input" placeholder="纳税人识别号" id="taxpayerIdentificationNum" name="taxpayerIdentificationNum" value="${ticketOpeningInfo.taxpayerIdentificationNum!''}">
  355. </div>
  356. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>开票电话:</label>
  357. <div class="formControls col-2 col-sm-2 skin-minimal">
  358. <input type="text" class="input-text trim_input" placeholder="开票电话" id="ticketOpeningPhone" name="ticketOpeningPhone" value="${ticketOpeningInfo.ticketOpeningPhone!''}">
  359. </div>
  360. </div>
  361. <div class="row cl" style="margin-bottom: 10px;">
  362. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>企业地址:</label>
  363. <div class="formControls col-2 col-sm-2 skin-minimal">
  364. <input type="text" class="input-text trim_input" placeholder="企业地址" id="enterpriseAddress" name="enterpriseAddress" value="${ticketOpeningInfo.enterpriseAddress!''}">
  365. </div>
  366. </div>
  367. <#else >
  368. <div class="row cl" style="margin-bottom: 10px;">
  369. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>发票类型:</label>
  370. <div class="formControls col-2 col-sm-2">
  371. <span class="select-box">
  372. <select name="ticketType" class="select">
  373. <option value="1">专票</option>
  374. <option value="2">普票</option>
  375. </select>
  376. </span>
  377. </div>
  378. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>开户支行:</label>
  379. <div class="formControls col-2 col-sm-2 skin-minimal">
  380. <input type="text" class="input-text trim_input" placeholder="开户支行名称" id="accountOpeningBranch" name="accountOpeningBranch" value="">
  381. </div>
  382. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>开票账户:</label>
  383. <div class="formControls col-2 col-sm-2 skin-minimal">
  384. <input type="text" class="input-text trim_input" placeholder="开票账户" id="ticketOpeningAccount" name="ticketOpeningAccount" value="">
  385. </div>
  386. </div>
  387. <div class="row cl" style="margin-bottom: 10px;">
  388. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>企业名称:</label>
  389. <div class="formControls col-2 col-sm-2 skin-minimal">
  390. <input type="text" class="input-text trim_input" placeholder="企业名称" id="enterpriseName" name="enterpriseName" value="">
  391. </div>
  392. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>纳税人识别号:</label>
  393. <div class="formControls col-2 col-sm-2 skin-minimal">
  394. <input type="text" class="input-text trim_input" placeholder="纳税人识别号" id="taxpayerIdentificationNum" name="taxpayerIdentificationNum" value="">
  395. </div>
  396. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>开票电话:</label>
  397. <div class="formControls col-2 col-sm-2 skin-minimal">
  398. <input type="text" class="input-text trim_input" placeholder="开票电话" id="ticketOpeningPhone" name="ticketOpeningPhone" value="">
  399. </div>
  400. </div>
  401. <div class="row cl" style="margin-bottom: 10px;">
  402. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>企业地址:</label>
  403. <div class="formControls col-2 col-sm-2 skin-minimal">
  404. <input type="text" class="input-text trim_input" placeholder="企业地址" id="enterpriseAddress" name="enterpriseAddress" value="">
  405. </div>
  406. </div>
  407. </#if>
  408. <#--客户备注-->
  409. <div class="row cl">
  410. <label class="form-label col-3">
  411. <div class="tit-2">客户备注</div>
  412. </label>
  413. <div class="formControls col-9">
  414. </div>
  415. </div>
  416. <div class="row cl">
  417. <label class="form-label">
  418. </label>
  419. <div class="formControls col-9">
  420. <textarea id="customerRemarks" name="customerRemarks" >${customerBasicInfo.customerRemarks!''}</textarea>
  421. </div>
  422. </div>
  423. <#--添加保存按钮-->
  424. <!-- Unnamed (矩形) -->
  425. <div class="class="row cl"">
  426. <!-- Unnamed () style="visibility: visible;"-->
  427. <div id="u30" class="my-btn-search" style="cursor:pointer; float: center;height: 35px;margin-right: 30px;margin-bottom: 10px;">
  428. <p><span onclick="addCustomerBasicInfo()">添加客户信息</span></p>
  429. </div>
  430. </div>
  431. <input type="hidden" id="provinceCode" value="${customerBasicInfo.customerProvinceCode!''}">
  432. <input type="hidden" id="cityCode" value="${customerBasicInfo.customerCityCode!''}">
  433. </form>
  434. </div>
  435. <#--业务js-->
  436. <#--<script type="text/javascript" src="${path}/common/js/customerSaveAdmin/save_customer_info.js"></script>-->
  437. <script>
  438. /*初始化页面参数*/
  439. $(function () {
  440. /* 初始化单选框样式 */
  441. //initCheck();
  442. /*初始化省份(大类)*/
  443. initProvince();
  444. //初始化市
  445. initCity('${customerBasicInfo.customerProvinceCode!''}');
  446. /*初始化渠道类别(大类)*/
  447. initChannelCategory();
  448. /*初始化销售产品(大类)*/
  449. initPromotingProducts();
  450. /*监听省份*/
  451. $("[name='customerProvinceCode']").change(function (){
  452. initCity($(this).val());
  453. })
  454. /*监听渠道类别*/
  455. $("[name='channelCategory']").change(function (){
  456. initChannelType($(this).val());
  457. })
  458. /*监听销售产品*/
  459. $("[name='promotingProducts']").change(function (){
  460. initSupplyPrice($(this).val());
  461. })
  462. })
  463. /*业务逻辑js控制 start*/
  464. $(document).on('click', '.dalog-ask .answer', function() {
  465. var customerProvinceCode = $(this).find(".customerProvinceCode").val();
  466. $("select[name='complaintId']").val(customerProvinceCode);
  467. initCity(customerProvinceCode); //根据省份初始化城市
  468. $(".dalog-ask").hide();
  469. });
  470. /*初始化省份*/
  471. function initProvince() {
  472. //默认查询参数为空
  473. var provinceListInfo = null;
  474. $.ajax({
  475. type: "POST",
  476. data: {
  477. provinceId : provinceListInfo
  478. },
  479. url: "${path}/admin/customerBasic/query_provinceList",
  480. async: true,
  481. success: function(data){
  482. var html = '<option value="">请选择省份</option>';
  483. var id;
  484. if (data.returnCode == 200) {
  485. for(var i=0;i<data.returnMsg.provinceList.length;i++){
  486. provinceListInfo = data.returnMsg.provinceList[i];
  487. if(i == 0 ){
  488. id = provinceListInfo.divisionCode;
  489. }
  490. html += '<option value="'+ provinceListInfo.divisionCode +'">'+ provinceListInfo.province +'</option>';
  491. }
  492. }else{
  493. html = '';
  494. }
  495. $("[name='customerProvinceCode']").html(html);
  496. $("#customerProvinceCode").val($("#provinceCode").val());
  497. },
  498. error: function(XmlHttpRequest, textStatus, errorThrown){
  499. }
  500. });
  501. }
  502. /*根据省份代号初始化城市*/
  503. function initCity(customerProvinceId){
  504. var cityListInfo = null;
  505. if(customerProvinceId == null || customerProvinceId == ""){
  506. var html = '<option value="">请选择城市</option>';
  507. $("[name='customerCityCode']").html(html);
  508. }else{
  509. $.ajax({
  510. type: "POST",
  511. data: {
  512. provinceId : customerProvinceId
  513. },
  514. url: "${path}/admin/customerBasic/query_cityList",
  515. async: true,
  516. success: function(data){
  517. var html = '<option value="">请选择城市</option>';
  518. if (data.returnCode == 200) {
  519. for(var i=0;i<data.returnMsg.cityList.length;i++){
  520. cityListInfo = data.returnMsg.cityList[i];
  521. html += '<option value="'+ cityListInfo.divisionCode +'">'+ cityListInfo.city +'</option>';
  522. }
  523. }else{
  524. html = '';
  525. }
  526. $("[name='customerCityCode']").html(html);
  527. $("#customerCityCode").val($("#cityCode").val());
  528. },
  529. error: function(XmlHttpRequest, textStatus, errorThrown){
  530. }
  531. });
  532. }
  533. }
  534. /*初始化渠道类别*/
  535. function initChannelCategory() {
  536. //默认查询参数为空
  537. var channelCategoryListInfo = null;
  538. $.ajax({
  539. type: "POST",
  540. data: {
  541. channelCategoryId : channelCategoryListInfo
  542. },
  543. url: "${path}/admin/customerBasic/query_channelCategoryList",
  544. async: true,
  545. success: function(data){
  546. var html = '<option value="">请选择渠道类别</option>';
  547. var id;
  548. if (data.returnCode == 200) {
  549. for(var i=0;i<data.returnMsg.channelCategoryList.length;i++){
  550. channelCategoryListInfo = data.returnMsg.channelCategoryList[i];
  551. if(i == 0 ){
  552. id = channelCategoryListInfo.channelCategory;
  553. }
  554. html += '<option value="'+ channelCategoryListInfo.channelCategory +'">'+ channelCategoryListInfo.channelName +'</option>';
  555. }
  556. }else{
  557. html = '';
  558. }
  559. $("[name='channelCategory']").html(html);
  560. },
  561. error: function(XmlHttpRequest, textStatus, errorThrown){
  562. }
  563. });
  564. }
  565. /*根据渠道类别初始化渠道类型*/
  566. function initChannelType(channelCategory){
  567. var channelTypeListInfo = null;
  568. /* if(channelCategory == null || channelCategory == ""){
  569. var html = '<option value="">请选择渠道类别</option>';
  570. $("[name='channelCategory']").html(html);
  571. }else{*/
  572. $.ajax({
  573. type: "POST",
  574. data: {
  575. channelCategoryId : channelCategory
  576. },
  577. url: "${path}/admin/customerBasic/query_channelTypeList",
  578. async: true,
  579. success: function(data){
  580. var html = '<option value="">请选择渠道类型</option>';
  581. if (data.returnCode == 200) {
  582. for(var i=0;i<data.returnMsg.channelTypeList.length;i++){
  583. channelTypeListInfo = data.returnMsg.channelTypeList[i];
  584. html += '<option value="'+ channelTypeListInfo.channelName +'">'+ channelTypeListInfo.channelType +'</option>';
  585. }
  586. }else{
  587. html = '';
  588. }
  589. $("[name='channelType']").html(html);
  590. },
  591. error: function(XmlHttpRequest, textStatus, errorThrown){
  592. }
  593. });
  594. //}
  595. }
  596. /*初始化销售产品*/
  597. function initPromotingProducts() {
  598. var promotingProductsInfo = null;
  599. $.ajax({
  600. type: "POST",
  601. data: {
  602. promotingProductsInfo : promotingProductsInfo
  603. },
  604. url: "${path}/admin/customerBasic/query_promotingProductsList",
  605. async: true,
  606. success: function(data){
  607. var html = '<option value="">请选择销售产品</option>';
  608. var id;
  609. if (data.returnCode == 200) {
  610. for(var i=0;i<data.returnMsg.promotingProductsList.length;i++){
  611. promotingProductsInfo = data.returnMsg.promotingProductsList[i];
  612. if(i == 0 ){
  613. id = promotingProductsInfo.productId;
  614. }
  615. html += '<option value="'+ promotingProductsInfo.productId +'">'+ promotingProductsInfo.productName +'</option>';
  616. }
  617. }else{
  618. html = '';
  619. }
  620. $("[name='promotingProducts']").html(html);
  621. },
  622. error: function(XmlHttpRequest, textStatus, errorThrown){
  623. }
  624. });
  625. }
  626. /*初始化产品价格*/
  627. function initSupplyPrice(promotingProductsId){
  628. //var supplyPriceInfo = null;
  629. if(promotingProductsId == null || promotingProductsId == ""){
  630. var html = '<option value="">请选择销售产品</option>';
  631. $("[name='promotingProducts']").html(html);
  632. }else{
  633. $.ajax({
  634. type: "POST",
  635. data: {
  636. promotingProductsId : promotingProductsId
  637. },
  638. url: "${path}/admin/customerBasic/query_supplyPriceList",
  639. async: true,
  640. success: function(data){
  641. var html = '<option value="">请选择产品价格</option>';
  642. if (data.returnCode == 200) {
  643. for(var i=0;i<data.returnMsg.supplyPriceList.length;i++){
  644. var supplyPriceInfo = data.returnMsg.supplyPriceList[i];
  645. html += '<option value="'+ supplyPriceInfo.colorId +'">'+ supplyPriceInfo.colorPrice +'</option>';
  646. }
  647. }else{
  648. html = '';
  649. }
  650. $("[name='supplyPrice']").html(html);
  651. },
  652. error: function(XmlHttpRequest, textStatus, errorThrown){
  653. }
  654. });
  655. }
  656. }
  657. /*保存对接联系人信息到列表*/
  658. function toAddDockedContactInfo() {
  659. //var dockedContactInfoList = new Array();
  660. var contactName = document.getElementById("contactName").value;
  661. var contactPhone = document.getElementById("contactPhone").value;
  662. var contactType = document.getElementById("contactType").value;
  663. var contactEmail = document.getElementById("contactEmail").value;
  664. //var operation = "删除";
  665. var operation = "<a href='javascript:;' onclick='deleteContact(this)'>删除</a>";
  666. //"<a href='javascript:;' onclick='del(this)'>删除</a>";
  667. row = document.getElementById("contactTable").insertRow();
  668. if(row!=null){
  669. cell=row.insertCell();
  670. cell.innerHTML=contactName;
  671. cell = row.insertCell();
  672. cell.innerHTML=contactPhone;
  673. cell = row.insertCell();
  674. cell.innerHTML=contactType;
  675. cell = row.insertCell();
  676. cell.innerHTML=contactEmail;
  677. cell = row.insertCell();
  678. cell.innerHTML=operation;
  679. }
  680. return false;
  681. }
  682. /*保存客户销售信息到列表*/
  683. function toAddChannelSaleInfo() {
  684. //var channelSaleInfoList = new Array();
  685. var channelCategory = document.getElementById("channelCategory").value;
  686. var channelType = document.getElementById("channelType").value;
  687. var channelName = document.getElementById("channelName").value;
  688. var promotingProducts = document.getElementById("promotingProducts").value;
  689. var supplyPrice = document.getElementById("supplyPrice").value;
  690. var accountPeriod = document.getElementById("accountPeriod").value;
  691. //var operation = "删除";
  692. var operation = "<a href='javascript:;' onclick='deleteChannelSale(this)'>删除</a>";
  693. row = document.getElementById("saleTable").insertRow();
  694. if(row!=null){
  695. cell=row.insertCell();
  696. cell.innerHTML=channelCategory;
  697. cell = row.insertCell();
  698. cell.innerHTML=channelType;
  699. cell = row.insertCell();
  700. cell.innerHTML=channelName;
  701. cell = row.insertCell();
  702. cell.innerHTML=promotingProducts;
  703. cell = row.insertCell();
  704. cell.innerHTML=supplyPrice;
  705. cell = row.insertCell();
  706. cell.innerHTML=accountPeriod;
  707. cell = row.insertCell();
  708. cell.innerHTML=operation;
  709. }
  710. return false;
  711. }
  712. /*添加客户信息*/
  713. function addCustomerBasicInfo() {
  714. var customerBasicInfoSaveForm = {};
  715. //客户基本信息
  716. var customerBasicInfo = {};
  717. customerBasicInfo.customerType = $("[name='customerType']").val();
  718. customerBasicInfo.cooperativeState = $("[name='cooperativeState']").val();
  719. customerBasicInfo.customerName = $("[name='customerName']").val();
  720. customerBasicInfo.customerIndustry = $("[name='customerIndustry']").val();
  721. customerBasicInfo.customerProvinceCode = $("[name='customerProvinceCode']").val();
  722. customerBasicInfo.customerCityCode = $("[name='customerCityCode']").val();
  723. customerBasicInfo.customerAddress = $("[name='customerAddress']").val();
  724. customerBasicInfo.customerRemarks = $("[name='customerRemarks']").val();
  725. //对接联系人信息
  726. var dockedContactInfoList = new Array();
  727. $("#contactListId").find("tr").each(function (){
  728. var dockedContactInfo = {};
  729. dockedContactInfo.contactName = $("[name='contactName']").val();
  730. dockedContactInfo.contactPhone = $("[name='contactPhone']").val();
  731. dockedContactInfo.contactType = $("[name='contactType']").val();
  732. dockedContactInfo.contactEmail = $("[name='contactEmail']").val();
  733. dockedContactInfoList.push(dockedContactInfo);
  734. })
  735. var dockedContactInfoListJson = $("#dockedContactInfoJson").val(JSON.stringify(dockedContactInfoList));
  736. //客户销售渠道信息
  737. var channelSaleInfoList = new Array();
  738. $("#channelSaleListId").find("tr").each(function (){
  739. var channelSaleInfo = {};
  740. channelSaleInfo.channelCategory = $("[name='channelCategory']").val();
  741. channelSaleInfo.channelType = $("[name='channelType']").val();
  742. channelSaleInfo.channelName = $("[name='channelName']").val();
  743. channelSaleInfo.promotingProducts = $("[name='promotingProducts']").val();
  744. channelSaleInfo.supplyPrice = $("[name='supplyPrice']").val();
  745. channelSaleInfo.accountPeriod = $("[name='accountPeriod']").val();
  746. channelSaleInfoList.push(channelSaleInfo);
  747. })
  748. var channelSaleInfoListJson = $("#channelSaleInfoJson").val(JSON.stringify(channelSaleInfoList));
  749. //alert("dockedContactInfoList:"+dockedContactInfoList.length);
  750. //alert("channelSaleInfoList:"+channelSaleInfoList.length);
  751. //付款/退款信息
  752. var billingInfo = {};
  753. billingInfo.accountOpeningBranch = $("[name='accountOpeningBranch']").val();
  754. billingInfo.accountName = $("[name='accountName']").val();
  755. billingInfo.accountNum = $("[name='accountNum']").val();
  756. billingInfo.receivablesName = $("[name='receivablesName']").val();
  757. billingInfo.receivablesPhone = $("[name='receivablesPhone']").val();
  758. //开票信息
  759. var ticketOpeningInfo = {};
  760. ticketOpeningInfo.ticketType = $("[name='ticketType']").val();
  761. ticketOpeningInfo.accountOpeningBranch = $("[name='accountOpeningBranch']").val();
  762. ticketOpeningInfo.ticketOpeningAccount = $("[name='ticketOpeningAccount']").val();
  763. ticketOpeningInfo.enterpriseName = $("[name='enterpriseName']").val();
  764. ticketOpeningInfo.taxpayerIdentificationNum = $("[name='taxpayerIdentificationNum']").val();
  765. ticketOpeningInfo.ticketOpeningPhone = $("[name='ticketOpeningPhone']").val();
  766. ticketOpeningInfo.enterpriseAddress = $("[name='enterpriseAddress']").val();
  767. //发送保存请求
  768. alert("request ...Start...");
  769. customerBasicInfoSaveForm.customerBasicInfo = customerBasicInfo;
  770. customerBasicInfoSaveForm.dockedContactInfoList = dockedContactInfoList;
  771. customerBasicInfoSaveForm.channelSaleInfoList = channelSaleInfoList;
  772. customerBasicInfoSaveForm.billingInfo = billingInfo;
  773. customerBasicInfoSaveForm.ticketOpeningInfo = ticketOpeningInfo;
  774. var saveStates = "";
  775. console.log(customerBasicInfoSaveForm);
  776. var customerInfoJson = JSON.stringify(customerBasicInfo);
  777. var billingInfoJson = JSON.stringify(billingInfo);
  778. var ticketOpeningInfoJson = JSON.stringify(ticketOpeningInfo);
  779. //$.post("${path}/admin/customerBasic/save_customer_info",customerBasicInfoSaveForm, function(res){});
  780. $.ajax({
  781. type: "POST",
  782. data: {
  783. customerInfoJson:customerInfoJson,
  784. /*dockedContactInfoListJson:dockedContactInfoListJson,
  785. channelSaleInfoListJson:dockedContactInfoListJson,*/
  786. dockedContactInfoList:dockedContactInfoList,
  787. channelSaleInfoList:channelSaleInfoList,
  788. billingInfoJson : billingInfoJson,
  789. ticketOpeningInfoJson:ticketOpeningInfoJson
  790. },
  791. url: "${path}/admin/customerBasic/save_customer_info",
  792. async: true,
  793. success: function(data){
  794. if (data.returnCode == 200) {
  795. saveStates = "保存成功";
  796. alert(saveStates);
  797. }else{
  798. saveStates = "保存失败";
  799. alert(saveStates);
  800. }
  801. },
  802. error: function(XmlHttpRequest, textStatus, errorThrown){
  803. saveStates = "保存失败";
  804. alert(saveStates);
  805. }
  806. });
  807. }
  808. // 删除对接联系人函数
  809. function deleteContact(x){
  810. $(x).parent().parent().remove();
  811. // tr.parentNode.removeChild(tr);
  812. }
  813. // 删除客户销售渠道信息函数
  814. function deleteChannelSale(x){
  815. var tr = x.parentNode.parentNode;
  816. tr.parentNode.removeChild(tr);
  817. }
  818. /*业务逻辑js控制 end*/
  819. </script>
  820. </body>
  821. </html>