update_customer_info.ftl 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829
  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. <tr><td colspan="7" class="td-manage text-c" >暂时没有客户销售渠道信息,请添加!</td></tr>
  242. </tbody>
  243. </table>
  244. </div>
  245. </div>
  246. <#--付款/退款信息-->
  247. <div class="row cl">
  248. <label class="form-label col-3">
  249. <div class="tit-2">付款/退款信息<span style="font-family:'Arial Normal', 'Arial';font-weight:400;font-size:14px;">(请真实有效,用于财务收款确认或退款业务)</span></div>
  250. </label>
  251. <div class="formControls col-9">
  252. </div>
  253. </div>
  254. <#if billingInfo??>
  255. <div class="row cl" style="margin-bottom: 10px;">
  256. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>开户支行:</label>
  257. <div class="formControls col-2 col-sm-2">
  258. <input type="text" class="input-text trim_input" placeholder="开户支行" id="accountOpeningBranch" name="accountOpeningBranch" value="${billingInfo.accountOpeningBranch!''}">
  259. </div>1
  260. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>账户名称:</label>
  261. <div class="formControls col-2 col-sm-2 skin-minimal">
  262. <input type="text" class="input-text trim_input" placeholder="账户名称" id="accountName" name="accountName" value="${billingInfo.accountName!''}">
  263. </div>
  264. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>账号:</label>
  265. <div class="formControls col-2 col-sm-2 skin-minimal">
  266. <input type="text" class="input-text trim_input" placeholder="填写账号" id="accountNum" name="accountNum" value="${billingInfo.accountNum!''}">
  267. </div>
  268. </div>
  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 skin-minimal">
  272. <input type="text" class="input-text trim_input" placeholder="收款人姓名" id="receivablesName" name="receivablesName" value="${billingInfo.receivablesName!''}">
  273. </div>
  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="receivablesPhone" name="receivablesPhone" value="${billingInfo.receivablesPhone!''}">
  277. </div>
  278. </div>
  279. <#else >
  280. <div class="row cl" style="margin-bottom: 10px;">
  281. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>开户支行:</label>
  282. <div class="formControls col-2 col-sm-2">
  283. <input type="text" class="input-text trim_input" placeholder="开户支行" id="accountOpeningBranch" name="accountOpeningBranch" value="">
  284. </div>
  285. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>账户名称:</label>
  286. <div class="formControls col-2 col-sm-2 skin-minimal">
  287. <input type="text" class="input-text trim_input" placeholder="账户名称" id="accountName" name="accountName" value="">
  288. </div>
  289. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>账号:</label>
  290. <div class="formControls col-2 col-sm-2 skin-minimal">
  291. <input type="text" class="input-text trim_input" placeholder="填写账号" id="accountNum" name="accountNum" value="">
  292. </div>
  293. </div>
  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 skin-minimal">
  297. <input type="text" class="input-text trim_input" placeholder="收款人姓名" id="receivablesName" name="receivablesName" 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="receivablesPhone" name="receivablesPhone" value="">
  302. </div>
  303. </div>
  304. </#if>
  305. <#--开票信息-->
  306. <div class="row cl" style="margin-bottom: 10px;">
  307. <label class="form-label col-3">
  308. <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>
  309. </label>
  310. <div class="formControls col-9">
  311. </div>
  312. </div>
  313. <#if ticketOpeningInfo??>
  314. <div class="row cl" style="margin-bottom: 10px;">
  315. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>发票类型:</label>
  316. <div class="formControls col-2 col-sm-2">
  317. <span class="select-box">
  318. <select name="ticketType" class="select">
  319. <option value="1" <#if ticketOpeningInfo.ticketType == 1>selected</#if>>专票</option>
  320. <option value="2" <#if ticketOpeningInfo.ticketType == 2>selected</#if>>普票</option>
  321. </select>
  322. </span>
  323. </div>
  324. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>开户支行:</label>
  325. <div class="formControls col-2 col-sm-2 skin-minimal">
  326. <input type="text" class="input-text trim_input" placeholder="开户支行名称" id="accountOpeningBranch" name="accountOpeningBranch" value="${ticketOpeningInfo.accountOpeningBranch!''}">
  327. </div>
  328. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>开票账户:</label>
  329. <div class="formControls col-2 col-sm-2 skin-minimal">
  330. <input type="text" class="input-text trim_input" placeholder="开票账户" id="ticketOpeningAccount" name="ticketOpeningAccount" value="${ticketOpeningInfo.ticketOpeningAccount!''}">
  331. </div>
  332. </div>
  333. <div class="row cl" style="margin-bottom: 10px;">
  334. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>企业名称:</label>
  335. <div class="formControls col-2 col-sm-2 skin-minimal">
  336. <input type="text" class="input-text trim_input" placeholder="企业名称" id="enterpriseName" name="enterpriseName" value="${ticketOpeningInfo.enterpriseName!''}">
  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="taxpayerIdentificationNum" name="taxpayerIdentificationNum" value="${ticketOpeningInfo.taxpayerIdentificationNum!''}">
  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="ticketOpeningPhone" name="ticketOpeningPhone" value="${ticketOpeningInfo.ticketOpeningPhone!''}">
  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="enterpriseAddress" name="enterpriseAddress" value="${ticketOpeningInfo.enterpriseAddress!''}">
  351. </div>
  352. </div>
  353. <#else >
  354. <div class="row cl" style="margin-bottom: 10px;">
  355. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>发票类型:</label>
  356. <div class="formControls col-2 col-sm-2">
  357. <span class="select-box">
  358. <select name="ticketType" class="select">
  359. <option value="1">专票</option>
  360. <option value="2">普票</option>
  361. </select>
  362. </span>
  363. </div>
  364. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>开户支行:</label>
  365. <div class="formControls col-2 col-sm-2 skin-minimal">
  366. <input type="text" class="input-text trim_input" placeholder="开户支行名称" id="accountOpeningBranch" name="accountOpeningBranch" value="">
  367. </div>
  368. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>开票账户:</label>
  369. <div class="formControls col-2 col-sm-2 skin-minimal">
  370. <input type="text" class="input-text trim_input" placeholder="开票账户" id="ticketOpeningAccount" name="ticketOpeningAccount" value="">
  371. </div>
  372. </div>
  373. <div class="row cl" style="margin-bottom: 10px;">
  374. <label class="form-label col-2 col-sm-2"><span class="c-red">*</span>企业名称:</label>
  375. <div class="formControls col-2 col-sm-2 skin-minimal">
  376. <input type="text" class="input-text trim_input" placeholder="企业名称" id="enterpriseName" name="enterpriseName" value="">
  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="taxpayerIdentificationNum" name="taxpayerIdentificationNum" 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="ticketOpeningPhone" name="ticketOpeningPhone" 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="enterpriseAddress" name="enterpriseAddress" value="">
  391. </div>
  392. </div>
  393. </#if>
  394. <#--客户备注-->
  395. <div class="row cl">
  396. <label class="form-label col-3">
  397. <div class="tit-2">客户备注</div>
  398. </label>
  399. <div class="formControls col-9">
  400. </div>
  401. </div>
  402. <div class="row cl">
  403. <label class="form-label">
  404. </label>
  405. <div class="formControls col-9">
  406. <textarea id="customerRemarks" name="customerRemarks" >${customerBasicInfo.customerRemarks!''}</textarea>
  407. </div>
  408. </div>
  409. <#--添加保存按钮-->
  410. <!-- Unnamed (矩形) -->
  411. <div class="class="row cl"">
  412. <!-- Unnamed () style="visibility: visible;"-->
  413. <div id="u30" class="my-btn-search" style="cursor:pointer; float: center;height: 35px;margin-right: 30px;margin-bottom: 10px;">
  414. <p><span onclick="addCustomerBasicInfo()">添加客户信息</span></p>
  415. </div>
  416. </div>
  417. <input type="hidden" id="provinceCode" value="${customerBasicInfo.customerProvinceCode!''}">
  418. <input type="hidden" id="cityCode" value="${customerBasicInfo.customerCityCode!''}">
  419. </form>
  420. </div>
  421. <#--业务js-->
  422. <#--<script type="text/javascript" src="${path}/common/js/customerSaveAdmin/save_customer_info.js"></script>-->
  423. <script>
  424. /*初始化页面参数*/
  425. $(function () {
  426. /* 初始化单选框样式 */
  427. //initCheck();
  428. /*初始化省份(大类)*/
  429. initProvince();
  430. //初始化市
  431. initCity('${customerBasicInfo.customerProvinceCode!''}');
  432. /*初始化渠道类别(大类)*/
  433. initChannelCategory();
  434. /*初始化销售产品(大类)*/
  435. initPromotingProducts();
  436. /*监听省份*/
  437. $("[name='customerProvinceCode']").change(function (){
  438. initCity($(this).val());
  439. })
  440. /*监听渠道类别*/
  441. $("[name='channelCategory']").change(function (){
  442. initChannelType($(this).val());
  443. })
  444. /*监听销售产品*/
  445. $("[name='promotingProducts']").change(function (){
  446. initSupplyPrice($(this).val());
  447. })
  448. })
  449. /*业务逻辑js控制 start*/
  450. $(document).on('click', '.dalog-ask .answer', function() {
  451. var customerProvinceCode = $(this).find(".customerProvinceCode").val();
  452. $("select[name='complaintId']").val(customerProvinceCode);
  453. initCity(customerProvinceCode); //根据省份初始化城市
  454. $(".dalog-ask").hide();
  455. });
  456. /*初始化省份*/
  457. function initProvince() {
  458. //默认查询参数为空
  459. var provinceListInfo = null;
  460. $.ajax({
  461. type: "POST",
  462. data: {
  463. provinceId : provinceListInfo
  464. },
  465. url: "${path}/admin/customerBasic/query_provinceList",
  466. async: true,
  467. success: function(data){
  468. var html = '<option value="">请选择省份</option>';
  469. var id;
  470. if (data.returnCode == 200) {
  471. for(var i=0;i<data.returnMsg.provinceList.length;i++){
  472. provinceListInfo = data.returnMsg.provinceList[i];
  473. if(i == 0 ){
  474. id = provinceListInfo.divisionCode;
  475. }
  476. html += '<option value="'+ provinceListInfo.divisionCode +'">'+ provinceListInfo.province +'</option>';
  477. }
  478. }else{
  479. html = '';
  480. }
  481. $("[name='customerProvinceCode']").html(html);
  482. $("#customerProvinceCode").val($("#provinceCode").val());
  483. },
  484. error: function(XmlHttpRequest, textStatus, errorThrown){
  485. }
  486. });
  487. }
  488. /*根据省份代号初始化城市*/
  489. function initCity(customerProvinceId){
  490. var cityListInfo = null;
  491. if(customerProvinceId == null || customerProvinceId == ""){
  492. var html = '<option value="">请选择城市</option>';
  493. $("[name='customerCityCode']").html(html);
  494. }else{
  495. $.ajax({
  496. type: "POST",
  497. data: {
  498. provinceId : customerProvinceId
  499. },
  500. url: "${path}/admin/customerBasic/query_cityList",
  501. async: true,
  502. success: function(data){
  503. var html = '<option value="">请选择城市</option>';
  504. if (data.returnCode == 200) {
  505. for(var i=0;i<data.returnMsg.cityList.length;i++){
  506. cityListInfo = data.returnMsg.cityList[i];
  507. html += '<option value="'+ cityListInfo.divisionCode +'">'+ cityListInfo.city +'</option>';
  508. }
  509. }else{
  510. html = '';
  511. }
  512. $("[name='customerCityCode']").html(html);
  513. $("#customerCityCode").val($("#cityCode").val());
  514. },
  515. error: function(XmlHttpRequest, textStatus, errorThrown){
  516. }
  517. });
  518. }
  519. }
  520. /*初始化渠道类别*/
  521. function initChannelCategory() {
  522. //默认查询参数为空
  523. var channelCategoryListInfo = null;
  524. $.ajax({
  525. type: "POST",
  526. data: {
  527. channelCategoryId : channelCategoryListInfo
  528. },
  529. url: "${path}/admin/customerBasic/query_channelCategoryList",
  530. async: true,
  531. success: function(data){
  532. var html = '<option value="">请选择渠道类别</option>';
  533. var id;
  534. if (data.returnCode == 200) {
  535. for(var i=0;i<data.returnMsg.channelCategoryList.length;i++){
  536. channelCategoryListInfo = data.returnMsg.channelCategoryList[i];
  537. if(i == 0 ){
  538. id = channelCategoryListInfo.channelCategory;
  539. }
  540. html += '<option value="'+ channelCategoryListInfo.channelCategory +'">'+ channelCategoryListInfo.channelName +'</option>';
  541. }
  542. }else{
  543. html = '';
  544. }
  545. $("[name='channelCategory']").html(html);
  546. },
  547. error: function(XmlHttpRequest, textStatus, errorThrown){
  548. }
  549. });
  550. }
  551. /*根据渠道类别初始化渠道类型*/
  552. function initChannelType(channelCategory){
  553. var channelTypeListInfo = null;
  554. /* if(channelCategory == null || channelCategory == ""){
  555. var html = '<option value="">请选择渠道类别</option>';
  556. $("[name='channelCategory']").html(html);
  557. }else{*/
  558. $.ajax({
  559. type: "POST",
  560. data: {
  561. channelCategoryId : channelCategory
  562. },
  563. url: "${path}/admin/customerBasic/query_channelTypeList",
  564. async: true,
  565. success: function(data){
  566. var html = '<option value="">请选择渠道类型</option>';
  567. if (data.returnCode == 200) {
  568. for(var i=0;i<data.returnMsg.channelTypeList.length;i++){
  569. channelTypeListInfo = data.returnMsg.channelTypeList[i];
  570. html += '<option value="'+ channelTypeListInfo.channelName +'">'+ channelTypeListInfo.channelType +'</option>';
  571. }
  572. }else{
  573. html = '';
  574. }
  575. $("[name='channelType']").html(html);
  576. },
  577. error: function(XmlHttpRequest, textStatus, errorThrown){
  578. }
  579. });
  580. //}
  581. }
  582. /*初始化销售产品*/
  583. function initPromotingProducts() {
  584. var promotingProductsInfo = null;
  585. $.ajax({
  586. type: "POST",
  587. data: {
  588. promotingProductsInfo : promotingProductsInfo
  589. },
  590. url: "${path}/admin/customerBasic/query_promotingProductsList",
  591. async: true,
  592. success: function(data){
  593. var html = '<option value="">请选择销售产品</option>';
  594. var id;
  595. if (data.returnCode == 200) {
  596. for(var i=0;i<data.returnMsg.promotingProductsList.length;i++){
  597. promotingProductsInfo = data.returnMsg.promotingProductsList[i];
  598. if(i == 0 ){
  599. id = promotingProductsInfo.productId;
  600. }
  601. html += '<option value="'+ promotingProductsInfo.productId +'">'+ promotingProductsInfo.productName +'</option>';
  602. }
  603. }else{
  604. html = '';
  605. }
  606. $("[name='promotingProducts']").html(html);
  607. },
  608. error: function(XmlHttpRequest, textStatus, errorThrown){
  609. }
  610. });
  611. }
  612. /*初始化产品价格*/
  613. function initSupplyPrice(promotingProductsId){
  614. //var supplyPriceInfo = null;
  615. if(promotingProductsId == null || promotingProductsId == ""){
  616. var html = '<option value="">请选择销售产品</option>';
  617. $("[name='promotingProducts']").html(html);
  618. }else{
  619. $.ajax({
  620. type: "POST",
  621. data: {
  622. promotingProductsId : promotingProductsId
  623. },
  624. url: "${path}/admin/customerBasic/query_supplyPriceList",
  625. async: true,
  626. success: function(data){
  627. var html = '<option value="">请选择产品价格</option>';
  628. if (data.returnCode == 200) {
  629. for(var i=0;i<data.returnMsg.supplyPriceList.length;i++){
  630. var supplyPriceInfo = data.returnMsg.supplyPriceList[i];
  631. html += '<option value="'+ supplyPriceInfo.colorId +'">'+ supplyPriceInfo.colorPrice +'</option>';
  632. }
  633. }else{
  634. html = '';
  635. }
  636. $("[name='supplyPrice']").html(html);
  637. },
  638. error: function(XmlHttpRequest, textStatus, errorThrown){
  639. }
  640. });
  641. }
  642. }
  643. /*保存对接联系人信息到列表*/
  644. function toAddDockedContactInfo() {
  645. //var dockedContactInfoList = new Array();
  646. var contactName = document.getElementById("contactName").value;
  647. var contactPhone = document.getElementById("contactPhone").value;
  648. var contactType = document.getElementById("contactType").value;
  649. var contactEmail = document.getElementById("contactEmail").value;
  650. //var operation = "删除";
  651. var operation = "<a href='javascript:;' onclick='deleteContact(this)'>删除</a>";
  652. //"<a href='javascript:;' onclick='del(this)'>删除</a>";
  653. row = document.getElementById("contactTable").insertRow();
  654. if(row!=null){
  655. cell=row.insertCell();
  656. cell.innerHTML=contactName;
  657. cell = row.insertCell();
  658. cell.innerHTML=contactPhone;
  659. cell = row.insertCell();
  660. cell.innerHTML=contactType;
  661. cell = row.insertCell();
  662. cell.innerHTML=contactEmail;
  663. cell = row.insertCell();
  664. cell.innerHTML=operation;
  665. }
  666. return false;
  667. }
  668. /*保存客户销售信息到列表*/
  669. function toAddChannelSaleInfo() {
  670. //var channelSaleInfoList = new Array();
  671. var channelCategory = document.getElementById("channelCategory").value;
  672. var channelType = document.getElementById("channelType").value;
  673. var channelName = document.getElementById("channelName").value;
  674. var promotingProducts = document.getElementById("promotingProducts").value;
  675. var supplyPrice = document.getElementById("supplyPrice").value;
  676. var accountPeriod = document.getElementById("accountPeriod").value;
  677. //var operation = "删除";
  678. var operation = "<a href='javascript:;' onclick='deleteChannelSale(this)'>删除</a>";
  679. row = document.getElementById("saleTable").insertRow();
  680. if(row!=null){
  681. cell=row.insertCell();
  682. cell.innerHTML=channelCategory;
  683. cell = row.insertCell();
  684. cell.innerHTML=channelType;
  685. cell = row.insertCell();
  686. cell.innerHTML=channelName;
  687. cell = row.insertCell();
  688. cell.innerHTML=promotingProducts;
  689. cell = row.insertCell();
  690. cell.innerHTML=supplyPrice;
  691. cell = row.insertCell();
  692. cell.innerHTML=accountPeriod;
  693. cell = row.insertCell();
  694. cell.innerHTML=operation;
  695. }
  696. return false;
  697. }
  698. /*添加客户信息*/
  699. function addCustomerBasicInfo() {
  700. var customerBasicInfoSaveForm = {};
  701. //客户基本信息
  702. var customerBasicInfo = {};
  703. customerBasicInfo.customerType = $("[name='customerType']").val();
  704. customerBasicInfo.cooperativeState = $("[name='cooperativeState']").val();
  705. customerBasicInfo.customerName = $("[name='customerName']").val();
  706. customerBasicInfo.customerIndustry = $("[name='customerIndustry']").val();
  707. customerBasicInfo.customerProvinceCode = $("[name='customerProvinceCode']").val();
  708. customerBasicInfo.customerCityCode = $("[name='customerCityCode']").val();
  709. customerBasicInfo.customerAddress = $("[name='customerAddress']").val();
  710. customerBasicInfo.customerRemarks = $("[name='customerRemarks']").val();
  711. //对接联系人信息
  712. var dockedContactInfoList = new Array();
  713. $("#contactListId").find("tr").each(function (){
  714. var dockedContactInfo = {};
  715. dockedContactInfo.contactName = $("[name='contactName']").val();
  716. dockedContactInfo.contactPhone = $("[name='contactPhone']").val();
  717. dockedContactInfo.contactType = $("[name='contactType']").val();
  718. dockedContactInfo.contactEmail = $("[name='contactEmail']").val();
  719. dockedContactInfoList.push(dockedContactInfo);
  720. })
  721. var dockedContactInfoListJson = $("#dockedContactInfoJson").val(JSON.stringify(dockedContactInfoList));
  722. //客户销售渠道信息
  723. var channelSaleInfoList = new Array();
  724. $("#channelSaleListId").find("tr").each(function (){
  725. var channelSaleInfo = {};
  726. channelSaleInfo.channelCategory = $("[name='channelCategory']").val();
  727. channelSaleInfo.channelType = $("[name='channelType']").val();
  728. channelSaleInfo.channelName = $("[name='channelName']").val();
  729. channelSaleInfo.promotingProducts = $("[name='promotingProducts']").val();
  730. channelSaleInfo.supplyPrice = $("[name='supplyPrice']").val();
  731. channelSaleInfo.accountPeriod = $("[name='accountPeriod']").val();
  732. channelSaleInfoList.push(channelSaleInfo);
  733. })
  734. var channelSaleInfoListJson = $("#channelSaleInfoJson").val(JSON.stringify(channelSaleInfoList));
  735. //alert("dockedContactInfoList:"+dockedContactInfoList.length);
  736. //alert("channelSaleInfoList:"+channelSaleInfoList.length);
  737. //付款/退款信息
  738. var billingInfo = {};
  739. billingInfo.accountOpeningBranch = $("[name='accountOpeningBranch']").val();
  740. billingInfo.accountName = $("[name='accountName']").val();
  741. billingInfo.accountNum = $("[name='accountNum']").val();
  742. billingInfo.receivablesName = $("[name='receivablesName']").val();
  743. billingInfo.receivablesPhone = $("[name='receivablesPhone']").val();
  744. //开票信息
  745. var ticketOpeningInfo = {};
  746. ticketOpeningInfo.ticketType = $("[name='ticketType']").val();
  747. ticketOpeningInfo.accountOpeningBranch = $("[name='accountOpeningBranch']").val();
  748. ticketOpeningInfo.ticketOpeningAccount = $("[name='ticketOpeningAccount']").val();
  749. ticketOpeningInfo.enterpriseName = $("[name='enterpriseName']").val();
  750. ticketOpeningInfo.taxpayerIdentificationNum = $("[name='taxpayerIdentificationNum']").val();
  751. ticketOpeningInfo.ticketOpeningPhone = $("[name='ticketOpeningPhone']").val();
  752. ticketOpeningInfo.enterpriseAddress = $("[name='enterpriseAddress']").val();
  753. //发送保存请求
  754. alert("request ...Start...");
  755. customerBasicInfoSaveForm.customerBasicInfo = customerBasicInfo;
  756. customerBasicInfoSaveForm.dockedContactInfoList = dockedContactInfoList;
  757. customerBasicInfoSaveForm.channelSaleInfoList = channelSaleInfoList;
  758. customerBasicInfoSaveForm.billingInfo = billingInfo;
  759. customerBasicInfoSaveForm.ticketOpeningInfo = ticketOpeningInfo;
  760. var saveStates = "";
  761. console.log(customerBasicInfoSaveForm);
  762. var customerInfoJson = JSON.stringify(customerBasicInfo);
  763. var billingInfoJson = JSON.stringify(billingInfo);
  764. var ticketOpeningInfoJson = JSON.stringify(ticketOpeningInfo);
  765. //$.post("${path}/admin/customerBasic/save_customer_info",customerBasicInfoSaveForm, function(res){});
  766. $.ajax({
  767. type: "POST",
  768. data: {
  769. customerInfoJson:customerInfoJson,
  770. /*dockedContactInfoListJson:dockedContactInfoListJson,
  771. channelSaleInfoListJson:dockedContactInfoListJson,*/
  772. dockedContactInfoList:dockedContactInfoList,
  773. channelSaleInfoList:channelSaleInfoList,
  774. billingInfoJson : billingInfoJson,
  775. ticketOpeningInfoJson:ticketOpeningInfoJson
  776. },
  777. url: "${path}/admin/customerBasic/save_customer_info",
  778. async: true,
  779. success: function(data){
  780. if (data.returnCode == 200) {
  781. saveStates = "保存成功";
  782. alert(saveStates);
  783. }else{
  784. saveStates = "保存失败";
  785. alert(saveStates);
  786. }
  787. },
  788. error: function(XmlHttpRequest, textStatus, errorThrown){
  789. saveStates = "保存失败";
  790. alert(saveStates);
  791. }
  792. });
  793. }
  794. // 删除对接联系人函数
  795. function deleteContact(x){
  796. $(x).parent().parent().remove();
  797. // tr.parentNode.removeChild(tr);
  798. }
  799. // 删除客户销售渠道信息函数
  800. function deleteChannelSale(x){
  801. var tr = x.parentNode.parentNode;
  802. tr.parentNode.removeChild(tr);
  803. }
  804. /*业务逻辑js控制 end*/
  805. </script>
  806. </body>
  807. </html>