add_customer.ftl 63 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="renderer" content="webkit|ie-comp|ie-stand">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  8. <meta http-equiv="Cache-Control" content="no-siteapp" />
  9. <#include "/base/add_base.ftl">
  10. <link href="${path}/common/lib/jquery.ui/jquery-ui.css" rel="stylesheet" type="text/css"/>
  11. <link href="${path}/common/lib/webuploader/0.1.5/webuploader.css" rel="stylesheet" type="text/css"/>
  12. <link href="${path}/common/lib/icheck/icheck.css" rel="stylesheet" type="text/css"/>
  13. <style>
  14. .tit{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
  15. .tit:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
  16. .tit-2{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
  17. .tit-2:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
  18. #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;}
  19. #suggest, #suggest2 {width:200px}
  20. .gray {color:gray}
  21. .ac_results {background:#fff;border:1px solid #7f9db9;position: absolute;z-index: 10000;display: none}
  22. .ac_results li a {white-space: nowrap;text-decoration:none;display:block;color:#05a;padding:1px 3px}
  23. .ac_results li {border:1px solid #fff}
  24. .ac_over, .ac_results li a:hover {background:#c8e3fc}
  25. .ac_results li a span {float:right}
  26. .ac_result_tip {border-bottom:1px dashed #666;padding:3px}
  27. .select-box{background: url(${path}/common/images/cm/select-1.png) right center no-repeat;background-size: auto 100%;}
  28. .select-box select{-webkit-appearance:none !important;background-color: transparent; appearance:none;padding-right: 25px;}
  29. .dalog-ask{position: absolute;left:60%;top:0;-webkit-transform: translateY(-30%);transform: translateY(-30%);display: none;background-color: #fff;z-index: 10;}
  30. .tag{ width:300px; min-height:300px; border:1px solid #32a3d8; position:relative;background-color: #fff;line-height: 1.5;padding: 10px 12px;}
  31. .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;}
  32. .dalog-ask .ask{color: #000;margin: 10px 0 5px 0;}
  33. .dalog-ask .answer{color: #666;margin-bottom: 10px;}
  34. .dalog-ask .answer:hover{color: #32a3d8;cursor: pointer;}
  35. .time-line-list{list-style: none;width: 100%;margin-left: -20px;}
  36. .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;}
  37. .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%;}
  38. .time-line-list>li:before{content:'';position: absolute;height: 1px;width: 30%;right:0;top: 15px; background-color: #32a3d8;}
  39. .time-line-list>li:after{content: '';position: absolute;height: 1px;width: 30%;left: 0;top: 15px;background:#32a3d8;}
  40. .time-line-list>li:first-child:after,.time-line-list>li:last-child:before{display: none;}
  41. .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;}
  42. .time-line-list>li:first-child .arrow{display: none;}
  43. .table-bg th{background-color: #e2f6ff;}
  44. .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #effaff;border: 1px solid #32a3d8;}
  45. .my-search-input{padding-left: 30px;background: url(${path}/common/images/cm/search.png) 6px center no-repeat;background-size: auto 60%; }
  46. .input-produce{height: 25px;line-height: 25px}
  47. .color-div{height: 30px;}
  48. </style>
  49. <title>添加客诉 - 客诉管理 - RST</title>
  50. </head>
  51. <body>
  52. <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
  53. <span class="c-gray en">&gt;</span> 客诉管理
  54. <span class="c-gray en">&gt;</span> 添加客诉
  55. <a class="btn radius r"
  56. style="line-height:1.6em;margin-top:3px;background: #32a3d8;color: #fff;border:1px solid #32a3d8;"
  57. href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
  58. </nav>
  59. <article class="page-container" style="padding: 10px;">
  60. <div class="pd-20 cl">
  61. <form action="" method="post" class="form form-horizontal" id="form-customer-add">
  62. <div class="row cl">
  63. <label class="form-label col-3">
  64. <div class="tit-2">客诉基本信息</div>
  65. </label>
  66. <div class="formControls col-9">
  67. </div>
  68. </div>
  69. <div class="row cl">
  70. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>跟进客服:</label>
  71. <div class="formControls col-4 col-sm-4"> <span class="select-box">
  72. <select name="adminId" id="adminId" class="select">
  73. </select>
  74. </span>
  75. </div>
  76. </div>
  77. <div class="row cl">
  78. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>来源入口:</label>
  79. <div class="formControls col-10 col-sm-10 skin-minimal">
  80. <div class="radio-box">
  81. <input type="radio" id="tel-1" name="sex" datatype="*" checked nullmsg="请选择来源入口!">
  82. <label for="tel-1">400电话</label>
  83. </div>
  84. <div class="radio-box">
  85. <input type="radio" id="tel-2" name="sex">
  86. <label for="tel-2">微信公众号</label>
  87. </div>
  88. <div class="radio-box">
  89. <input type="radio" id="tel-3" name="sex">
  90. <label for="tel-3">其他</label>
  91. <input type="text" style="width: 150px;margin-left: 10px;" class="input-text" value="" placeholder="" id="" name="">
  92. </div>
  93. </div>
  94. </div>
  95. <div class="row cl">
  96. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>咨询类型:</label>
  97. <div class="formControls col-10 col-sm-10 skin-minimal">
  98. <div class="radio-box">
  99. <input type="radio" class="customerCounselType" id="customer-type-1" name="customerCounselType" value="1" checked >
  100. <label for="customer-type-1">售前咨询</label>
  101. </div>
  102. <div class="radio-box">
  103. <input type="radio" class="customerCounselType" id="customer-type-2" name="customerCounselType" value="2" >
  104. <label for="customer-type-2">售后咨询</label>
  105. </div>
  106. </div>
  107. </div>
  108. <div class="row cl">
  109. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>产品类型:</label>
  110. <div class="formControls col-10 col-sm-10 skin-minimal" id="produceTypeHtml">
  111. <#--<div class="radio-box">
  112. <input type="radio" id="tel-3" name="produceType" datatype="*" nullmsg="请选择产品类型!">
  113. <label for="tel-3">净水机</label>
  114. </div>
  115. <div class="radio-box">
  116. <input type="radio" id="tel-3" name="produceType" datatype="*" nullmsg="请选择产品类型!">
  117. <label for="tel-4">冲奶机</label>
  118. </div>-->
  119. </div>
  120. </div>
  121. <div class="row cl" style="position: relative;">
  122. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>客诉问题:</label>
  123. <div class="formControls col-2 col-sm-2"> <span class="select-box">
  124. <select name="complaintId" class="select">
  125. <#--<option value="0">使用操作</option>-->
  126. <#--<option value="1">使用操作</option>-->
  127. </select>
  128. </span>
  129. </div>
  130. <div class="formControls col-2 col-sm-2"> <span class="select-box">
  131. <select name="smallClassId" class="select">
  132. <#--<option value="0">使用操作制水出水</option>
  133. <option value="1">使用操作制水出水</option>-->
  134. </select>
  135. </span>
  136. </div>
  137. <div class="formControls col-2 col-sm-2">
  138. <div class="clearfix">
  139. <input type="text" placeholder="搜索关键词" class="input-text ac_input" name="questionId" value="" id="search_text" autocomplete="off" style="width:60%"><button type="button" class="btn btn-primary" id="search_button">搜索</button>
  140. </div>
  141. </div>
  142. <div class="dalog-ask">
  143. <div class="tag">
  144. <em></em>
  145. <strong>相关QA</strong>
  146. <ul id="question">
  147. <#--<li class="ask">1、净水机面板操作不灵敏,是怎么回事?</li>
  148. <li class="answer">答:<span>4净水机面板操作不灵敏,是怎么回事。1、净水机面板操作不灵敏,是怎么回事?1、净水机面板操作不灵敏,是怎么回事?1、净水机面板操作不灵敏,是怎么回事?</span></li>-->
  149. </ul>
  150. </div>
  151. </div>
  152. </div>
  153. <div class="row cl">
  154. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>问题内容:</label>
  155. <div class="formControls col-5 col-sm-5">
  156. <textarea name="" cols="" rows="2" class="textarea" placeholder="说点什么..." id="answer-textarea"></textarea>
  157. </div>
  158. </div>
  159. <div class="row cl">
  160. <label class="form-label col-1 col-sm-1"></label>
  161. <div class="formControls col-2 col-sm-2">
  162. <input type="text" class="input-text" value="" placeholder="请输入手机号" id="" name="">
  163. </div>
  164. <div class="formControls col-2 col-sm-2">
  165. <input type="button" class="btn btn-primary" value="发短信給用户">
  166. </div>
  167. </div>
  168. <div class="row cl">
  169. <label class="form-label col-1 col-sm-1">
  170. <div class="tit">处理结果</div>
  171. </label>
  172. <div class="formControls col-10 col-sm-10">
  173. </div>
  174. </div>
  175. <div class="row cl">
  176. <label class="form-label col-1 col-sm-1"></label>
  177. <div class="formControls col-10 col-sm-10 skin-minimal">
  178. <div class="radio-box" id="solved">
  179. <input type="radio" id="customer-process-1" value="1" name="customerIsSolve" checked>
  180. <label for="customer-process-1">已解决</label>
  181. </div>
  182. <div class="radio-box" id="noSolved">
  183. <input type="radio" id="customer-process-2" value="2" name="customerIsSolve">
  184. <label for="customer-process-2">未解决</label>
  185. </div>
  186. <div class="radio-box" id="renewed">
  187. <input type="radio" id="customer-process-3" value="3" name="customerIsSolve">
  188. <label for="customer-process-3">换新</label>
  189. </div>
  190. <div class="radio-box" id="maintain">
  191. <input type="radio" id="customer-process-4" value="4" name="customerIsSolve">
  192. <label for="customer-process-4">维修</label>
  193. </div>
  194. <div class="radio-box" id="reissue">
  195. <input type="radio" id="customer-process-5" value="5" name="customerIsSolve">
  196. <label for="customer-process-5">补发</label>
  197. </div>
  198. <div class="radio-box" id="backGoods">
  199. <input type="radio" id="customer-process-6" value="6" name="customerIsSolve">
  200. <label for="customer-process-6">退货</label>
  201. </div>
  202. <div class="radio-box" id="noReasonBack">
  203. <input type="radio" id="customer-process-7" value="7" name="customerIsSolve">
  204. <label for="customer-process-7">无理由退货</label>
  205. </div>
  206. </div>
  207. </div>
  208. <div class="row cl">
  209. <label class="form-label col-1 col-sm-1"></label>
  210. <div class="formControls col-10 col-sm-10">
  211. <ul class="time-line-list" id="processResultStatus">
  212. <#-- <li><span class="arrow"></span><div class="number">1</div><div>录入客诉</div></li>
  213. <li><span class="arrow"></span><div class="number">2</div><div>督促用户寄回</div></li>
  214. <li><span class="arrow"></span><div class="number">3</div><div>录入快递单号</div></li>
  215. <li><span class="arrow"></span><div class="number">4</div><div>仓库收货</div></li>
  216. <li><span class="arrow"></span><div class="number">5</div><div>换新发货</div></li>
  217. <li><span class="arrow"></span><div class="number">6</div><div>发货通知用户</div></li>
  218. <li><span class="arrow"></span><div class="number">7</div><div>收货后回访</div></li>-->
  219. </ul>
  220. </div>
  221. </div>
  222. <div class="row cl" id="orderHead">
  223. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>订单信息:</label>
  224. <div class="formControls col-1 col-sm-1">
  225. <button type="button" class="btn btn-primary" id="selectOrder">搜索订单</button>
  226. </div>
  227. </div>
  228. <div class="row cl" id="order">
  229. <label class="form-label col-1 col-sm-1"></label>
  230. <div class="formControls col-9 col-sm-9 text-c">
  231. <table class="table table-border table-bg table-bordered">
  232. <tr>
  233. <th style="text-align: center;">销售</th>
  234. <th style="text-align: center;">订单号</th>
  235. <th style="text-align: center;">姓名</th>
  236. <th style="text-align: center;">电话</th>
  237. <th style="text-align: center;">订单金额</th>
  238. <th style="text-align: center;">购买产品</th>
  239. <th style="text-align: center;">购买日期</th>
  240. </tr>
  241. <tr id="showOrder">
  242. <#-- <td>爱贝源-微信商城</td>
  243. <td>1290387806</td>
  244. <td>何小小</td>
  245. <td>1882222888</td>
  246. <td>¥3680</td>
  247. <td>Watero净水机</td>
  248. <td>2017-06-06</td>-->
  249. </tr>
  250. <#--<tr id="showOrderAddress">-->
  251. <#--</tr>-->
  252. </table>
  253. </div>
  254. </div>
  255. <div class="row cl" id="recipientInfo">
  256. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>收件信息:</label>
  257. <div class="formControls col-2 col-sm-2">
  258. <input type="text" class="input-text" value="" placeholder="填写收件人姓名" id="sendName" name="sendName">
  259. </div>
  260. <div class="formControls col-2 col-sm-2">
  261. <input type="text" class="input-text" value="" placeholder="填写收件人手机号" id="sendTel" name="sendTel">
  262. </div>
  263. </div>
  264. <div class="row cl" id="recipientAddress">
  265. <input type="hidden" id="addressInfo">
  266. <label class="form-label col-1 col-sm-1"></label>
  267. <div class="formControls col-2 col-sm-2">
  268. <span class="select-box">
  269. <select id="province" class="select">
  270. </select>
  271. </span>
  272. </div>
  273. <div class="formControls col-2 col-sm-2">
  274. <span class="select-box">
  275. <select id="city" class="select">
  276. </select>
  277. </span>
  278. </div>
  279. <div class="formControls col-2 col-sm-2">
  280. <span class="select-box">
  281. <select id="district" class="select">
  282. </select>
  283. </span>
  284. </div>
  285. </div>
  286. <div class="row cl" id="recipientAddressText">
  287. <label class="form-label col-1 col-sm-1"></label>
  288. <div class="formControls col-5 col-sm-5">
  289. <textarea name="" id="sendAddress" cols="" rows="2" class="textarea" placeholder="请填写详细地址"></textarea>
  290. <span id="addrssMsg"></span>
  291. </div>
  292. </div>
  293. <div class="row cl" id="renewedProduct">
  294. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>换新产品:</label>
  295. <div class="formControls col-9 col-sm-9 text-c" id="produceSelect">
  296. <table class="table table-border table-bg table-bordered">
  297. <thead>
  298. <tr class="text-c">
  299. <th style="text-align: center;" width="60">产品名称</th>
  300. <th style="text-align: center;" width="60">产品颜色</th>
  301. <th style="text-align: center;" width="60">产品配件</th>
  302. </tr>
  303. </thead>
  304. <tbody id="addProduct">
  305. <tr >
  306. <td>冲奶机</td>
  307. <td>
  308. <div>
  309. 白色
  310. <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">
  311. </div>
  312. <div>
  313. 白色
  314. <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">
  315. </div>
  316. </td>
  317. <td>
  318. <div>
  319. 水箱
  320. <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">
  321. </div>
  322. <div>
  323. 水箱
  324. <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">
  325. </div>
  326. </td>
  327. </tr>
  328. </tbody>
  329. </table>
  330. </div>
  331. </div>
  332. <div class="row cl" id="TDScollect">
  333. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>TDS收集:</label>
  334. <div class="formControls col-2 col-sm-2" style="position: relative;">
  335. <input type="hidden" name="arrcity_3word" id="arrcity_3word" value="" />
  336. <input style="width: 140px;" placeholder="" class="input-text my-search-input" type="text" name="arrcity" id="arrcity" />
  337. <div id="suggest" class="ac_results"></div>
  338. </div>
  339. <div class="formControls col-2 col-sm-2">
  340. <span class="select-box">
  341. <select name="" class="select" id="TDSArea">
  342. <option value="0">罗湖区</option>
  343. <option value="1">福田区</option>
  344. </select>
  345. </span>
  346. </div>
  347. <div class="formControls col-2 col-sm-2">
  348. <input type="text" class="input-text" value="" placeholder="进水tds数值" id="" name="">
  349. </div>
  350. <div class="formControls col-2 col-sm-2">
  351. <input type="text" class="input-text" value="" placeholder="出水tds数值" id="" name="">
  352. </div>
  353. </div>
  354. <div class="row cl" id="TDScollectShow">
  355. <label class="form-label col-1 col-sm-1"></label>
  356. <div class="formControls col-6 col-sm-6">
  357. tds收集:广东省-深圳市-福田区 进水:100ppm 出水:100ppm
  358. </div>
  359. </div>
  360. <div class="row cl" id="sendAddressInfo">
  361. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>寄回信息:</label>
  362. <div class="formControls col-5 col-sm-5">
  363. <textarea name="" cols="" rows="2" class="textarea" placeholder="说点什么...">邮寄地址:东莞清溪三中金龙工业区徐福记对面优尼雅电子科技,杨春有,13592708169邮寄备注:您好,麻烦您那边把机器邮寄前请将水箱、接水台中的水倒掉并擦干,不要留有水渍,避免运输途中水或奶粉
  364. 溅入机器内部造成不必要的损失;用原包装或泡沫等材质包裹好机身。避免运输途中造成机器     磕碰、损坏。
  365. 请勿寄顺丰、圆通、EMS以及到付件快递,其他快递物流随意,寄回时,麻烦您在产品里面留下故障原因说明,
  366. 提示:寄回后把单号给我们提供下然后提供下您的姓名、地址和电话方便我们修好后给您寄回去。</textarea>
  367. </div>
  368. </div>
  369. <div class="row cl" id="sendAddressByPhone">
  370. <label class="form-label col-1 col-sm-1"></label>
  371. <div class="formControls col-2 col-sm-2">
  372. <input type="text" class="input-text" value="" placeholder="请输入手机号" id="" name="">
  373. </div>
  374. <div class="formControls col-2 col-sm-2">
  375. <input type="button" class="btn btn-primary" value="发短信給用户">
  376. </div>
  377. </div>
  378. <div class="row cl" id="updateProduct">
  379. <label class="form-label col-1 col-sm-1">更换产品:</label>
  380. <div class="formControls col-7 col-sm-7" id="back-product">
  381. <table class="table table-border table-bg table-bordered">
  382. <thead>
  383. <tr class="text-c">
  384. <th style="text-align: center;" width="60">产品名称</th>
  385. <th style="text-align: center;" width="60">产品颜色</th>
  386. <th style="text-align: center;" width="60">产品配件</th>
  387. </tr>
  388. </thead>
  389. <tbody id="addProduct">
  390. <tr >
  391. <td>冲奶机</td>
  392. <td>
  393. <div>
  394. 白色
  395. <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">
  396. </div>
  397. <div>
  398. 白色
  399. <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">
  400. </div>
  401. </td>
  402. <td>
  403. <div>
  404. 水箱
  405. <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">
  406. </div>
  407. <div>
  408. 水箱
  409. <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">
  410. </div>
  411. </td>
  412. </tr>
  413. </tbody>
  414. </table>
  415. </div>
  416. </div>
  417. <div class="row cl">
  418. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>处理描述:</label>
  419. <div class="formControls col-5 col-sm-5">
  420. <textarea name="" cols="" rows="2" class="textarea" placeholder="说点什么..."></textarea>
  421. </div>
  422. </div>
  423. <div class="row cl">
  424. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>回访信息:</label>
  425. <div class="formControls col-10 col-sm-10 skin-minimal">
  426. <div class="radio-box">
  427. <input type="radio" id="customer-visit-1" name="customerIsVisit" value="2" checked>
  428. <label for="customer-visit-1">需要回访</label>
  429. </div>
  430. <div class="radio-box">
  431. <input type="radio" id="customer-visit-2" name="customerIsVisit" value="1">
  432. <label for="customer-visit-2">不需要回访</label>
  433. </div>
  434. </div>
  435. </div>
  436. <div id="needToVisit">
  437. <div class="row cl" id="needToVisit">
  438. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>回访人:</label>
  439. <div class="formControls col-2 col-sm-2">
  440. <input type="text" class="input-text" value="" placeholder="填写回访人姓名" id="" name="">
  441. </div>
  442. <div class="formControls col-2 col-sm-2">
  443. <input type="text" class="input-text" value="" placeholder="填写回访人手机号" id="" name="">
  444. </div>
  445. </div>
  446. <div class="row cl">
  447. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>回访日期:</label>
  448. <div class="formControls col-2 col-sm-2">
  449. <input type="text" placeholder="请选择回访日期" id="datemin" class="input-text Wdate" readonly="readonly">
  450. </div>
  451. </div>
  452. <div class="row cl">
  453. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>回访时间:</label>
  454. <div class="formControls col-10 col-sm-10 skin-minimal">
  455. <div class="radio-box">
  456. <input type="radio" id="visit-time-1" name="visitTimeSelect">
  457. <label for="visit-time-1">09:00-12:00</label>
  458. </div>
  459. <div class="radio-box">
  460. <input type="radio" id="visit-time-2" name="visitTimeSelect">
  461. <label for="visit-time-2">12:00-14:00</label>
  462. </div>
  463. <div class="radio-box">
  464. <input type="radio" id="visit-time-3" name="visitTimeSelect">
  465. <label for="visit-time-3">14:00-18:00</label>
  466. </div>
  467. </div>
  468. </div>
  469. <div class="row cl">
  470. <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>提醒人:</label>
  471. <div class="formControls col-4 col-sm-4"> <span class="select-box">
  472. <select name="" class="select" id="visitAdminId">
  473. </select>
  474. </span>
  475. </div>
  476. </div>
  477. <div class="cl" style="display: table;width: 100%;">
  478. <label class="form-label col-1 col-sm-1"></label>
  479. <div class="formControls col-4 col-sm-4">
  480. <span class="c-red" id="visitAdminIdMsg">您将为自己指定一个回访任务</span>
  481. </div>
  482. </div>
  483. </div>
  484. <div class="row cl">
  485. <div class="col-2 col-sm-2 col-offset-3">
  486. <button onClick="save_submit();" class="btn btn-block btn-primary size-XL" type="submit">确认录入</button>
  487. </div>
  488. </div>
  489. </form>
  490. </div>
  491. </article>
  492. <script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
  493. <script type="text/javascript" src="${path}/common/lib/webuploader/0.1.5/webuploader.min.js"></script>
  494. <script type="text/javascript" src="${path}/common/lib/icheck/jquery.icheck.min.js"></script>
  495. <script type="text/javascript" src="${path}/common/lib/cm.lib/jquery.provincesCity.js"></script>
  496. <script type="text/javascript" src="${path}/common/lib/cm.lib/provincesData.js"></script>
  497. <script type="text/javascript" src="${path}/common/lib/cm.lib/airCity.js"></script>
  498. <#--<script type="text/javascript" src="${path}/common/lib/cm.lib/dimensions.js"></script>-->
  499. <script type="text/javascript" src="${path}/common/lib/cm.lib/suggest.js"></script>
  500. <script type="text/javascript">
  501. $(function(){
  502. $("#province").ProvinceCity();
  503. $('.skin-minimal input').iCheck({
  504. checkboxClass: 'icheckbox-blue',
  505. radioClass: 'iradio-blue',
  506. increaseArea: '20%'
  507. });
  508. $("#arrcity").suggest(citys,{hot_list:commoncitys,dataContainer:'#arrcity_3word',onSelect:function(result){
  509. console.log($(this)[0].value);
  510. $("#city2").click()
  511. },
  512. attachObject:'#suggest'
  513. });
  514. $("#city2").suggest(citys,{hot_list:commoncitys,attachObject:"#suggest2"})
  515. });
  516. $(document).on('click', '.dalog-ask .answer', function() {
  517. $("#answer-textarea").text($(this).find("span").text());
  518. //$(".dalog-ask").hide(); 隐藏qa
  519. });
  520. </script>
  521. <script type="text/javascript">
  522. /*处理结果的执行状态*/
  523. var isSolve = {
  524. solved : [],
  525. noSolved : [],
  526. renewed : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","换新发货","发货通知用户","收货后回访"],
  527. maintain : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","产线维修","换新发货","发货通知用户","收货后回访"],
  528. reissue : ["录入客诉","生成E订单","督促仓库发货","仓库发货","发货通知用户","收货后回访"],
  529. backGoods : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","退款","退货完成"],
  530. noReasonBack : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","退款","退货完成"]
  531. }
  532. /*个人id*/
  533. var adminId = 0;
  534. /* 咨询类型 1:售前咨询 2:售后咨询 3:其他 */
  535. var allCustomerInfoType = 1;
  536. /*全局标识当前状态 type : 1 :已解决 2:未解决 3:换新 4:维修 5:补发 6:退货 7:无理由退货*/
  537. var allCustomerType = 1;
  538. /*初始化页面参数*/
  539. $(function () {
  540. /* 初始化单选框样式 */
  541. initCheck();
  542. /*初始化问题分类*/
  543. initComplaintTypeInfo();
  544. /*初始化客服*/
  545. initSysAdmin();
  546. /*初始化回访跟踪客服*/
  547. initVisitSysAdmin();
  548. /*初始化产品类型 -- 客诉头部的产品类型单选 */
  549. initProduceType();
  550. /*初始化选择处理结果 -- type : 1 :已解决 2:未解决 3:换新 4:维修 5:补发 6:退货 7:无理由退货 */
  551. initProcessResult(1);
  552. /*监听客诉类型选择事件*/
  553. $("input[name='customerCounselType']").change(function (){
  554. allCustomerInfoType = parseInt($(this).val());
  555. initProcessResult(allCustomerType);
  556. })
  557. /*监听处理结果选择事件*/
  558. $("[name='customerIsSolve']").change(function(){
  559. allCustomerType = parseInt($(this).val());
  560. initProcessResult(parseInt($(this).val()));
  561. })
  562. /*监听问题类型 选择事件*/
  563. $("[name='complaintId']").change(function(){
  564. initComplaintSmallClassInfo($(this).val());
  565. })
  566. /*监听问题关键字搜索*/
  567. $(document).on('click', '#search_button', function() {
  568. initComplaintQuestionInfo();
  569. });
  570. /*搜索订单事件*/
  571. $(document).on('click', '#selectOrder', function() {
  572. selectOrder();
  573. });
  574. /*监听省选择事件*/
  575. $(document).on('change', '#province', function() {
  576. var proId = $("#province").val();
  577. var cityId = setCity("",proId,2)
  578. setDistrict("",cityId,2)
  579. });
  580. /*监听市选择事件*/
  581. $(document).on('change', '#city', function() {
  582. var city = $("#city").val();
  583. setDistrict("",city,2)
  584. });
  585. /*监听回访类型选择事件 是否需要回访 1:不需要回访 2:需要回复 */
  586. $("input[name='customerIsVisit']").change(function (){
  587. if($(this).val() == 2){
  588. $("#needToVisit").show();
  589. }else{
  590. $("#needToVisit").hide();
  591. }
  592. })
  593. /*监听回访选择客服的选择事件*/
  594. $(document).on('change', '#visitAdminId', function() {
  595. var visitAdminName = $("#visitAdminId").find("option:selected").text();
  596. var visitAdminId = $("#visitAdminId").val();
  597. if(convertUndefinedToEmpty(visitAdminId) == adminId){
  598. showVisitMsg(1);
  599. }else{
  600. showVisitMsg(2,visitAdminName);
  601. }
  602. });
  603. })
  604. /*初始化单选框样式*/
  605. function initCheck(){
  606. $('.skin-minimal input').iCheck({
  607. checkboxClass: 'icheckbox-blue',
  608. radioClass: 'iradio-blue',
  609. increaseArea: '20%'
  610. });
  611. }
  612. /*初始化客服*/
  613. function initSysAdmin() {
  614. var sysAminList = getSysAdmin();
  615. var html = "";
  616. for(var i=0;i<sysAminList.length;i++){
  617. var adminList = sysAminList[i];
  618. if(adminId != null && adminId != "" && adminId != 0 && adminId == adminList.adminId ){
  619. html += '<option value="'+ adminList.adminId +'" selected>'+ adminList.adminName +'</option>';
  620. }else{
  621. html += '<option value="'+ adminList.adminId +'">'+ adminList.adminName +'</option>';
  622. }
  623. }
  624. $("#adminId").html(html);
  625. }
  626. /*初始化回访客服的选择*/
  627. function initVisitSysAdmin(){
  628. var sysAminList = getSysAdmin();
  629. var html = "";
  630. var flag = false;
  631. for(var i=0;i<sysAminList.length;i++){
  632. var adminList = sysAminList[i];
  633. if(adminId != null && adminId != "" && adminId != 0 && adminId == adminList.adminId ){
  634. html += '<option value="'+ adminList.adminId +'" selected>'+ adminList.adminName +'</option>';
  635. flag = true;
  636. }else{
  637. html += '<option value="'+ adminList.adminId +'">'+ adminList.adminName +'</option>';
  638. }
  639. }
  640. $("#visitAdminId").html(html);
  641. if(flag){
  642. showVisitMsg(1);
  643. }
  644. }
  645. /**
  646. * 用于显示回访指派任务提示信息
  647. * 1 :自己
  648. * 2 :其他人
  649. */
  650. function showVisitMsg(type,adminName) {
  651. if(type == 1){
  652. $("#visitAdminIdMsg").html("您将为自己指定一个回访任务");
  653. }else{
  654. $("#visitAdminIdMsg").html("您将为"+ adminName +"指定一个回访任务");
  655. }
  656. }
  657. /*获取客服*/
  658. function getSysAdmin(){
  659. var sysAminList;
  660. $.ajax({
  661. type: "POST",
  662. data: {
  663. },
  664. url: "${path}/admin/customer/select_sys_admin",
  665. async: false,
  666. success: function(data){
  667. if (data.returnCode == 200) {
  668. sysAminList = data.returnMsg.adminList;
  669. adminId = data.returnMsg.adminId;
  670. }
  671. },
  672. error: function(XmlHttpRequest, textStatus, errorThrown){
  673. }
  674. });
  675. return sysAminList;
  676. }
  677. /*初始化产品类型 -- 客诉头部的产品类型单选*/
  678. function initProduceType(){
  679. var html = "";
  680. $.ajax({
  681. type: "POST",
  682. data: {
  683. },
  684. url: "${path}/admin/customer/select_produce_type",
  685. async: false,
  686. success: function(data){
  687. if (data.returnCode == 200) {
  688. var check = "checked";
  689. for(var i=0;i<data.returnMsg.productTypeList.length;i++){
  690. var produce = data.returnMsg.productTypeList[i];
  691. html += ' <div class="radio-box">' +
  692. '<input type="radio" id="produce-type-'+ i +'" name="produceType" datatype="*" value="'+ produce.typeId +'" '+ check +' nullmsg="请选择产品类型!" >' +
  693. ' <label for="produce-type-'+ i +'">'+ produce.typeName +'</label>' +
  694. ' </div>';
  695. check = "";
  696. }
  697. }else{
  698. html = '';
  699. }
  700. },
  701. error: function(XmlHttpRequest, textStatus, errorThrown){
  702. }
  703. });
  704. $("#produceTypeHtml").html(html);
  705. initCheck();
  706. }
  707. /**
  708. * 选择处理结果-- 默认选择已解决
  709. * type : 1 :已解决 2:未解决 3:换新 4:维修 5:补发 6:退货 7:无理由退货
  710. */
  711. function initProcessResult(type){
  712. if(type == null || type == ""){
  713. type = 1;
  714. }
  715. var statusHtml = '<li><span class="arrow"></span><div class="number">status_index</div><div>status_html</div></li>';
  716. var resultHtml = '';
  717. var result = {};
  718. $("#solved").show(); //已解决
  719. $("#noSolved").show();//未解决
  720. if(allCustomerInfoType == 1){ //售前
  721. $("#renewed").hide();
  722. $("#maintain").hide();
  723. $("#reissue").hide();
  724. $("#backGoods").hide();
  725. $("#noReasonBack").hide();
  726. switch(type)
  727. {
  728. case 1:
  729. otherHied();
  730. break;
  731. case 2:
  732. otherHied();
  733. break;
  734. default:
  735. break;
  736. }
  737. }else if(allCustomerInfoType == 2){ //售后
  738. $("#renewed").show();
  739. $("#maintain").show();
  740. $("#reissue").show();
  741. $("#backGoods").show();
  742. $("#noReasonBack").show();
  743. switch(type)
  744. {
  745. case 1:
  746. otherHied();
  747. break;
  748. case 2:
  749. otherHied();
  750. break;
  751. case 3: //换新
  752. result = isSolve.renewed;
  753. $("#processResultStatus").show();
  754. $("#orderHead").show();
  755. $("#order").show();
  756. $("#recipientInfo").show();
  757. $("#recipientAddress").show();
  758. $("#recipientAddressText").show();
  759. $("#renewedProduct").show();
  760. $("#TDScollect").show();
  761. $("#TDScollectShow").show();
  762. $("#sendAddressInfo").show();
  763. $("#sendAddressByPhone").show();
  764. $("#updateProduct").show();
  765. break;
  766. case 4: //维修
  767. result = isSolve.maintain;
  768. $("#processResultStatus").show();
  769. $("#orderHead").show();
  770. $("#order").show();
  771. $("#recipientInfo").show();
  772. $("#recipientAddress").show();
  773. $("#recipientAddressText").show();
  774. $("#renewedProduct").show();
  775. $("#TDScollect").show();
  776. $("#TDScollectShow").show();
  777. $("#sendAddressInfo").show();
  778. $("#sendAddressByPhone").show();
  779. $("#updateProduct").show();
  780. break;
  781. case 5://补发
  782. result = isSolve.reissue;
  783. $("#processResultStatus").show();
  784. $("#orderHead").show();
  785. $("#order").show();
  786. $("#recipientInfo").show();
  787. $("#recipientAddress").show();
  788. $("#recipientAddressText").show();
  789. $("#renewedProduct").show();
  790. $("#TDScollect").show();
  791. $("#TDScollectShow").show();
  792. $("#sendAddressInfo").hide();
  793. $("#sendAddressByPhone").hide();
  794. $("#updateProduct").hide();
  795. break;
  796. case 6: //退货
  797. result = isSolve.backGoods;
  798. $("#processResultStatus").show();
  799. $("#orderHead").show();
  800. $("#order").show();
  801. $("#recipientInfo").show();
  802. $("#recipientAddress").show();
  803. $("#recipientAddressText").show();
  804. $("#renewedProduct").show();
  805. $("#TDScollect").show();
  806. $("#TDScollectShow").show();
  807. $("#sendAddressInfo").show();
  808. $("#sendAddressByPhone").show();
  809. $("#updateProduct").hide();
  810. break;
  811. case 7://无理由退货
  812. result = isSolve.noReasonBack;
  813. $("#processResultStatus").show();
  814. $("#orderHead").show();
  815. $("#order").show();
  816. $("#recipientInfo").show();
  817. $("#recipientAddress").show();
  818. $("#recipientAddressText").show();
  819. $("#renewedProduct").show();
  820. $("#TDScollect").show();
  821. $("#TDScollectShow").show();
  822. $("#sendAddressInfo").show();
  823. $("#sendAddressByPhone").show();
  824. $("#updateProduct").hide();
  825. break;
  826. default:
  827. break;
  828. }
  829. }
  830. for(var i=0;i< result.length;i++){
  831. var html = statusHtml.replace("status_index",i+1);
  832. html = html.replace("status_html",result[i]);
  833. resultHtml += html;
  834. }
  835. $("#processResultStatus").html(resultHtml);
  836. }
  837. /*已解决|未解决 */
  838. function otherHied(){
  839. $("#processResultStatus").hide(); //处理结果的执行状态 已解决未解决没有该信息
  840. $("#orderHead").hide();
  841. $("#order").hide();
  842. $("#recipientInfo").hide();
  843. $("#recipientAddress").hide();
  844. $("#recipientAddressText").hide();
  845. $("#renewedProduct").hide();
  846. $("#TDScollect").hide();
  847. $("#TDScollectShow").hide();
  848. $("#sendAddressInfo").hide();
  849. $("#sendAddressByPhone").hide();
  850. $("#updateProduct").hide();
  851. }
  852. /*初始化问题大类*/
  853. function initComplaintTypeInfo() {
  854. //默认为售前咨询
  855. var customerCounselTypeOverall = 1;
  856. var html = "";
  857. $.ajax({
  858. type: "POST",
  859. data: {
  860. complaintConsultingType : customerCounselTypeOverall
  861. },
  862. url: "${path}/admin/complaintQuestion/list_complaintType",
  863. async: false,
  864. success: function(data){
  865. var id;
  866. if (data.returnCode == 200) {
  867. for(var i=0;i<data.returnMsg.complaintTypeInfoList.length;i++){
  868. var complaintTypeInfo = data.returnMsg.complaintTypeInfoList[i];
  869. if(i == 0 ){
  870. id = complaintTypeInfo.complaintId;
  871. }
  872. html += '<option value="'+ complaintTypeInfo.complaintId +'">'+ complaintTypeInfo.complaintClassName +'</option>';
  873. }
  874. }else{
  875. html = '';
  876. }
  877. $("[name='complaintId']").html(html);
  878. initComplaintSmallClassInfo(id)
  879. },
  880. error: function(XmlHttpRequest, textStatus, errorThrown){
  881. }
  882. });
  883. }
  884. /*显示小类*/
  885. function initComplaintSmallClassInfo(complaintId){
  886. var html = "";
  887. $.ajax({
  888. type: "POST",
  889. data: {
  890. complaintId : complaintId
  891. },
  892. url: "${path}/admin/complaintQuestion/list_complaintSmallClass",
  893. async: false,
  894. success: function(data){
  895. if (data.returnCode == 200) {
  896. for(var i=0;i<data.returnMsg.complaintSmallClassInfoList.length;i++){
  897. var ComplaintSmallClassInfo = data.returnMsg.complaintSmallClassInfoList[i];
  898. html += '<option value="'+ ComplaintSmallClassInfo.smallClassId +'">'+ ComplaintSmallClassInfo.smallClassName +'</option>';
  899. }
  900. }else{
  901. html = '';
  902. }
  903. $("[name='smallClassId']").html(html);
  904. },
  905. error: function(XmlHttpRequest, textStatus, errorThrown){
  906. }
  907. });
  908. }
  909. /**
  910. * 搜索QA 显示
  911. */
  912. function initComplaintQuestionInfo(){
  913. var complaintId = $("[name='complaintId']").val();
  914. var smallClassId = $("[name='smallClassId']").val();;
  915. var questionName = $("[name='questionId']").val();;;
  916. var html = "";
  917. $.ajax({
  918. type: "POST",
  919. data: {
  920. complaintId : complaintId,
  921. smallClassId : smallClassId,
  922. questionName : questionName
  923. },
  924. url: "${path}/admin/complaintQuestion/list_complaintQuestion",
  925. async: false,
  926. success: function(data){
  927. if (data.returnCode == 200) {
  928. for(var i=0;i<data.returnMsg.complaintQuestionInfoList.length;i++){
  929. var complaintQuestion= data.returnMsg.complaintQuestionInfoList[i];
  930. html += '<li class="ask">'+ complaintQuestion.questionName +'</li>' +
  931. '<li class="answer" style="height: 65px;overflow: hidden;">答:<span>'+ complaintQuestion.questionProfile +'</span></li>';
  932. }
  933. }else{
  934. html = '';
  935. }
  936. $("#question").html(html);
  937. },
  938. error: function(XmlHttpRequest, textStatus, errorThrown){
  939. }
  940. });
  941. $(".dalog-ask").show();
  942. }
  943. /**
  944. * 发送短信
  945. * @param phone 手机号码
  946. * @param desc 发送内容
  947. * @param node 返回结果显示节点
  948. */
  949. function sendPhone(phone,desc,node){
  950. }
  951. /***
  952. * 打开搜索订单框
  953. */
  954. function selectOrder(){
  955. layer_show("搜索订单","${path}/admin/customer/select_order","1000","350");
  956. }
  957. /**
  958. * 显示选择的订单
  959. */
  960. function setSelectOrder(orderId){
  961. var html = '';
  962. var address = ''; //地址
  963. var orderItemList = {};
  964. $.ajax({
  965. type: "POST",
  966. data: {
  967. salesId : orderId
  968. },
  969. url: "${path}/admin/customer/select_salesOrder",
  970. async: false,
  971. success: function(data){
  972. if (data.returnCode == 200) {
  973. for(var i=0;i<data.returnMsg.salesOrderList.length;i++){
  974. var salesOrder = data.returnMsg.salesOrderList[i];
  975. var productsHtml = '';
  976. var salesOrderItem = salesOrder.salesOrderItemList;
  977. orderItemList = salesOrder.salesOrderItemList;
  978. for(var j=0;j<salesOrderItem.length;j++){
  979. var item = salesOrderItem[j].itemProductName + "*" + salesOrderItem[j].itemNum;
  980. if(j==0){
  981. productsHtml += item
  982. }else{
  983. productsHtml += '<br>'+ item
  984. }
  985. }
  986. var time = formatDate(new Date(salesOrder.salesCreateTime),"yyyy-MM-dd");
  987. html += '' +
  988. ' <td>'+ convertUndefinedToEmpty(salesOrder.companyName) +'-'+ convertUndefinedToEmpty(salesOrder.storeName) +'</td>' +
  989. ' <td>'+ salesOrder.salesId +'</td>' +
  990. ' <td>'+ salesOrder.salesAddressName +'</td>' +
  991. ' <td>'+ salesOrder.salesAddressTel +'</td>' +
  992. ' <td>'+ salesOrder.salesAmount +'</td>' +
  993. ' <td>'+ productsHtml +'</td>' +
  994. ' <td>'+ time +'</td>' +
  995. '';
  996. //address = '<td colspan="1">收货地址</td><td colspan="6" class="td-manage text-c" >'+ salesOrder.salesAddressInfo +'&nbsp;&nbsp;&nbsp;&nbsp;<a style="color: #0a6999;text-decoration: underline;" href="javascript:void(0);" title="编辑" onclick="updateAdress()">修改地址</a></td>' ;
  997. address = salesOrder.salesAddressInfo;
  998. $("#sendName").val(salesOrder.salesAddressName); //订单名称
  999. $("#sendTel").val(salesOrder.salesAddressTel); //订单电话号码
  1000. }
  1001. // $("#showOrderAddress").html(address);
  1002. }else{
  1003. html = '';
  1004. }
  1005. $("#showOrder").html(html); //显示订单
  1006. },
  1007. error: function(XmlHttpRequest, textStatus, errorThrown){
  1008. }
  1009. });
  1010. $("#addressInfo").val(address);
  1011. setAdress(); //显示地址
  1012. setProduce(orderItemList); //显示产品
  1013. }
  1014. /**
  1015. * 设置地址
  1016. */
  1017. function setAdress(){
  1018. var addres = $("#addressInfo").val();
  1019. $("#addrssMsg").html("");
  1020. if(addres == null){
  1021. $("#addrssMsg").html("*未能获取到地址,请手动选择地址");
  1022. return;
  1023. }
  1024. var addresList = addres.split("-");
  1025. if(addresList[0] == null || addresList[1]==null || addresList[2]==null || addresList[3]==null){
  1026. $("#addrssMsg").html("*未能获取到地址,请手动选择地址");
  1027. return;
  1028. }
  1029. var proId = setPro(getAddress(addresList[0],0),1);
  1030. var cityId = setCity(getAddress(addresList[1],1),proId,1);
  1031. setDistrict(getAddress(addresList[2],2),cityId,1);
  1032. $("#sendAddress").val(addresList[3]);
  1033. }
  1034. /***
  1035. * 删除 “省”,“市”,“区”关键字
  1036. * type : 0:省 2:市 3:区
  1037. */
  1038. function getAddress(addrss,type) {
  1039. var abbreviation = "";
  1040. if(addrss == ""){
  1041. abbreviation = "";
  1042. }else{
  1043. switch(type)
  1044. {
  1045. case 0:
  1046. var proReg = new RegExp("省","g");
  1047. abbreviation = addrss.replace(proReg,"");
  1048. break;
  1049. case 1:
  1050. var cityReg = new RegExp("市","g");
  1051. abbreviation = addrss.replace(cityReg,"");
  1052. break;
  1053. case 2:
  1054. var districtReg = new RegExp("市","g");
  1055. abbreviation = addrss.replace(districtReg,"");
  1056. break;
  1057. default:
  1058. break;
  1059. }
  1060. }
  1061. return abbreviation
  1062. }
  1063. /**
  1064. * 设置省
  1065. * type 1:搜索订单赋值 2:只查询全部,默认第一个
  1066. */
  1067. function setPro(provinceName,type) {
  1068. var proId = '';
  1069. var province = listProvince();
  1070. var selectPro = {};
  1071. if(type == 1){
  1072. selectPro = listProvince("",provinceName);
  1073. }else if(type == 2){
  1074. selectPro = null;
  1075. }
  1076. if(province!=null){
  1077. var provinceHtml = ''
  1078. for(var i=0;i<province.length;i++){
  1079. if(selectPro!= null && province[i].provinceId == selectPro[0].provinceId){
  1080. proId = selectPro[0].provinceId;
  1081. provinceHtml += '<option value="'+ province[i].provinceId +'" selected>'+ province[i].province +'</option>';
  1082. }else{
  1083. provinceHtml += '<option value="'+ province[i].provinceId +'">'+ province[i].province +'</option>';
  1084. }
  1085. }
  1086. $("#province").html(provinceHtml);
  1087. }
  1088. return proId;
  1089. }
  1090. /**
  1091. * 设置市
  1092. * type 1:搜索订单赋值 2:只查询全部,默认第一个
  1093. */
  1094. function setCity(cityName,proId,type) {
  1095. var cityId = '';
  1096. var city = listCity(proId,"");
  1097. var selectCity = {};
  1098. if(type == 1){
  1099. selectCity = listCity(proId,cityName);
  1100. }else if(type == 2){
  1101. selectCity = null;
  1102. cityId = city[0].cityId;
  1103. }
  1104. if(city!=null){
  1105. var cityHtml = ''
  1106. for(var i=0;i<city.length;i++){
  1107. if(selectCity != null && city[i].cityId == selectCity[0].cityId){
  1108. cityId = city[i].cityId;
  1109. cityHtml += '<option value="'+ city[i].cityId +'" selected>'+ city[i].city +'</option>';
  1110. }else{
  1111. cityHtml += '<option value="'+ city[i].cityId +'">'+ city[i].city +'</option>';
  1112. }
  1113. }
  1114. $("#city").html(cityHtml);
  1115. }
  1116. return cityId;
  1117. }
  1118. /**
  1119. * 设置区
  1120. * type 1:搜索订单赋值 2:只查询全部,默认第一个
  1121. */
  1122. function setDistrict(districtName,cityId,type) {
  1123. var district = listDistrict(cityId,"");
  1124. var selectDistrict = {};
  1125. if(type == 1){
  1126. selectDistrict = listDistrict(cityId,districtName);
  1127. }else if(type == 2){
  1128. selectDistrict = null;
  1129. }
  1130. if(district!=null){
  1131. var districtHtml = ''
  1132. for(var i=0;i<district.length;i++){
  1133. if(selectDistrict != null && district[i].districtId == selectDistrict[0].districtId){
  1134. districtHtml += '<option value="'+ district[i].districtId +'" selected>'+ district[i].district +'</option>';
  1135. }else{
  1136. districtHtml += '<option value="'+ district[i].districtId +'">'+ district[i].district +'</option>';
  1137. }
  1138. }
  1139. $("#district").html(districtHtml);
  1140. }
  1141. }
  1142. /**
  1143. * 展示产品
  1144. * @param orderItemList
  1145. */
  1146. function setProduce(orderItemList) {
  1147. var productList = getProduct() ; //所有产品
  1148. var html = "";
  1149. var productTypeNo = 0;
  1150. for(var i=0;i<productList.length;i++) {
  1151. var product = productList[i];
  1152. var produceFittings = getProduceFittings(product.productId); //获取该产品的所有配件
  1153. var colorList = product.colorList; //该产品的所有颜色
  1154. var productType = product.productType;
  1155. var colorHtml = '';
  1156. if(colorList != null && colorList.length >0 ){
  1157. for(var k=0;k<orderItemList.length;k++){
  1158. var item = orderItemList[k];
  1159. for(var j=0;j<colorList.length;j++){
  1160. var color = colorList[j];
  1161. var number = "";
  1162. if(item.itemColorId == color.colorId){
  1163. number = item.itemNum;
  1164. }
  1165. if(color.colorProductId == product.productId) {
  1166. colorHtml += '<div class="color-div">' +
  1167. '<input type="hidden" value="' + color.colorId + '">' +
  1168. '<span>' + color.colorName + '<span>&nbsp;&nbsp;' +
  1169. '<input type="text" class="input-text input-produce input-pro-number" style="width: 40px;text-align: center;" value="'+ number +'" placeholder="" id="" name="">' +
  1170. '</div>';
  1171. }
  1172. }
  1173. }
  1174. }else{
  1175. colorHtml += '<span>暂无该产品的颜色!<span>';
  1176. }
  1177. var produceFittingsHtml = '';
  1178. if(produceFittings != null && produceFittings.length > 0){
  1179. for(var m=0;m<produceFittings.length;m++){
  1180. var produceFit = produceFittings[m];
  1181. if(produceFit.productId == product.productId){
  1182. produceFittingsHtml += '<div class="color-div">' +
  1183. '<input type="hidden" value="' + produceFit.fittingsId +'">'+
  1184. '<span>' + produceFit.fittingsName +'<span>&nbsp;&nbsp;'+
  1185. '<input type="text" class="input-text input-produce input-pro-number" style="width: 40px;text-align: center;" value="" placeholder="" id="" name="">' +
  1186. '</div>';
  1187. }
  1188. }
  1189. }else{
  1190. produceFittingsHtml += '<span>暂无产品配件!<span>';
  1191. }
  1192. var produceHtml = '<input type="hidden" value="'+ product.productId +'">' +
  1193. '<span>'+ product.productName +'</span>';
  1194. html += ' <tr >' +
  1195. ' <td>'+ produceHtml +'</td>' +
  1196. ' <td>' +
  1197. colorHtml +
  1198. ' </td>' +
  1199. ' <td>' +
  1200. produceFittingsHtml +
  1201. ' </td>' +
  1202. '</tr>';
  1203. }
  1204. $("#addProduct").html(html);
  1205. initCheck(); //因为需要展示产品,所以再次初始化多选框
  1206. setBackProduct(); //设置寄回产品
  1207. monitorProduct(); //监听产品变化
  1208. }
  1209. /*获取产品*/
  1210. function getProduct(){
  1211. var productList;
  1212. $.ajax({
  1213. type: "POST",
  1214. data: {
  1215. },
  1216. url: "${path}/admin/customer/select_produce",
  1217. async: false,
  1218. success: function(data){
  1219. if (data.returnCode == 200) {
  1220. productList = data.returnMsg.productList;
  1221. }else{
  1222. }
  1223. },
  1224. error: function(XmlHttpRequest, textStatus, errorThrown){
  1225. }
  1226. });
  1227. return productList;
  1228. }
  1229. /*获取产品配件*/
  1230. function getProduceFittings(productId){
  1231. var produceFittings;
  1232. $.ajax({
  1233. type: "get",
  1234. data: {
  1235. productId : productId
  1236. },
  1237. url: "${path}/admin/customer/select_produce_fittings",
  1238. async: false,
  1239. success: function(data){
  1240. if (data.returnCode == 200) {
  1241. produceFittings = data.returnMsg.produceFittingsList;
  1242. }
  1243. },
  1244. error: function(XmlHttpRequest, textStatus, errorThrown){
  1245. }
  1246. });
  1247. return produceFittings;
  1248. }
  1249. /*监听产品变化*/
  1250. function monitorProduct(){
  1251. /*产品数量*/
  1252. $(".input-pro-number").blur(function (){
  1253. setBackProduct();
  1254. })
  1255. }
  1256. /*添加产品*/
  1257. function addProduct(){
  1258. var html = '';
  1259. var productList = getProduct();
  1260. var produceHtml = '<select name="" class="select" style="width: 100px;">';
  1261. for(var i=0;i<productList.length;i++){
  1262. }
  1263. html+= '<div class="formControls col-1 col-sm-1">\n' +
  1264. ' <a><img src="${path}/common/images/cm/add-produce.png" width="21" height="21"></button></a>\n' +
  1265. ' </div>'
  1266. html += '<div class="skin-minimal">' +
  1267. ' <div class="check-box">' +
  1268. ' <input type="checkbox" id="checkbox-1" checked>' +
  1269. '' +
  1270. ' <label for="checkbox-1">净水机</label> -' +
  1271. '' +
  1272. ' <label for="checkbox-1">净水机</label>' +
  1273. '' +
  1274. ' <select name="" class="select" style="width: 100px;">' +
  1275. ' <option value="0">黑色</option>' +
  1276. ' <option value="1">白色</option>' +
  1277. ' </select>' +
  1278. ' <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">' +
  1279. ' </div>' +
  1280. '' +
  1281. ' <div class="check-box">' +
  1282. ' <input type="checkbox" id="checkbox-2" checked>' +
  1283. ' <label for="checkbox-2">水箱</label>' +
  1284. ' <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">' +
  1285. ' </div>' +
  1286. ' <div class="check-box">' +
  1287. ' <input type="checkbox" id="checkbox-3" checked>' +
  1288. ' <label for="checkbox-2">T1</label>' +
  1289. ' <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">' +
  1290. ' </div>' +
  1291. ' <div class="check-box">' +
  1292. ' <input type="checkbox" id="checkbox-4" checked>' +
  1293. ' <label for="checkbox-2">T2</label>' +
  1294. ' <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">' +
  1295. ' </div>' +
  1296. ' </div>'
  1297. }
  1298. /*设置寄回产品*/
  1299. function setBackProduct() {
  1300. var html = '';
  1301. $("#back-product").html(html);
  1302. }
  1303. /* 添加客诉 */
  1304. function addCustomer(){
  1305. }
  1306. /*提示错误信息*/
  1307. function showErrorMsg(node,msg){
  1308. }
  1309. </script>
  1310. <!--/请在上方写此页面业务相关的脚本-->
  1311. </body>
  1312. </html>