custome_detail.ftl 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715
  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 .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%;}
  39. .time-line-list>li:before{content:'';position: absolute;height: 1px;width: 30%;right:0;top: 15px; background-color: #32a3d8;}
  40. .time-line-list>li:after{content: '';position: absolute;height: 1px;width: 30%;left: 0;top: 15px;background:#32a3d8;}
  41. .time-line-list>li:first-child:after,.time-line-list>li:last-child:before{display: none;}
  42. .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;}
  43. .time-line-list>li:first-child .arrow{display: none;}
  44. .table-bg th{background-color: #e2f6ff;}
  45. .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #effaff;border: 1px solid #32a3d8;}
  46. .my-search-input{padding-left: 30px;background: url(${path}/common/images/cm/search.png) 6px center no-repeat;background-size: auto 60%; }
  47. .txt-red{color:red}
  48. .thString {font-weight: normal;}
  49. </style>
  50. <title>客诉基本信息</title>
  51. </head>
  52. <body>
  53. <article class="cl pd-20">
  54. <form action="" method="post" class="form form-horizontal" id="form-article-add">
  55. <div class="row cl">
  56. <label class="form-label col-3">
  57. <div class="tit-2">客诉基本信息</div>
  58. </label>
  59. <div class="formControls col-9">
  60. </div>
  61. </div>
  62. <table class="table table-border table-bg table-bordered" style="margin-top: 10px;">
  63. <thead>
  64. <tr>
  65. <th width="10">跟进客服:</th>
  66. <td width="10" style="font-weight: normal;"><span id="adminName"></span></td>
  67. <td width="10"></td>
  68. <th width="10">来源入口:</th>
  69. <td width="10" style="font-weight: normal;"><span id="customerSourceType"></span></td>
  70. </tr>
  71. <tr>
  72. <th width="10">咨询类型:</th>
  73. <td width="10" style="font-weight: normal;"><span id="customerCounselType"></span></td>
  74. <td width="10"></td>
  75. <th width="10">产品类别:</th>
  76. <td width="10" style="font-weight: normal;"><span id="typeName"></span></td>
  77. </tr>
  78. </thead>
  79. </table>
  80. <div class="row cl">
  81. <label class="form-label col-3">
  82. <div class="tit-2">客户信息</div>
  83. </label>
  84. <div class="formControls col-9">
  85. </div>
  86. </div>
  87. <table class="table table-border table-bg table-bordered" style="margin-top: 10px;">
  88. <thead>
  89. <tr>
  90. <th width="10">销售公司:</th>
  91. <td width="10" style="font-weight: normal;"><span id="companyName"></span></td>
  92. <td width="10"></td>
  93. <th width="10">店铺:</th>
  94. <td width="10" style="font-weight: normal;"><span id="storeName"></span></td>
  95. </tr>
  96. <tr>
  97. <th width="10">微信昵称:</th>
  98. <td width="10" style="font-weight: normal;"><span id="customerWechatName"></span></td>
  99. <td width="10"></td>
  100. <th width="10">用户姓名:</th>
  101. <td width="10" style="font-weight: normal;"><span id="customerName"></span></td>
  102. </tr>
  103. <tr>
  104. <th width="10">用户电话:</th>
  105. <td width="10" style="font-weight: normal;"><span id="customerTel"></span></td>
  106. <td width="10"></td>
  107. <th width="10"></th>
  108. <td width="10" style="font-weight: normal;"><span></span></td>
  109. </tr>
  110. </thead>
  111. </table>
  112. <div class="row cl">
  113. <label class="form-label col-3">
  114. <div class="tit-2">客诉问题</div>
  115. </label>
  116. <div class="formControls col-9">
  117. </div>
  118. </div>
  119. <table class="table table-border table-bg table-bordered" style="margin-top: 10px;">
  120. <thead>
  121. <tr>
  122. <th width="10">客诉问题:</th>
  123. <td width="10" style="font-weight: normal;"><span id="describeTitle"></span></td>
  124. <td width="10"></td>
  125. <th width="10">问题描述:</th>
  126. <td width="10" style="font-weight: normal;"><span id="questionProfile"></span></td>
  127. </tr>
  128. <tr>
  129. <th width="10">问题回复:</th>
  130. <td width="10" style="font-weight: normal;"><span id="describeContent"></span></td>
  131. <td width="10"></td>
  132. <th width="10">备注信息:</th>
  133. <td width="10" style="font-weight: normal;"><span id="customerDesc"></span></td>
  134. </tr>
  135. </thead>
  136. </table>
  137. <table class="table table-border table-bg table-bordered" style="margin-top: 10px;">
  138. <thead>
  139. <tr>
  140. <th width="10">
  141. 订单信息:
  142. </th>
  143. <th width="40" style="font-weight: normal;">
  144. <div class="row cl" id="tableHtml">
  145. <div class="formControls col-10 col-sm-10 text-c">
  146. <table class="table table-border table-bg table-bordered" >
  147. <thead>
  148. <tr>
  149. <th>销售</th>
  150. <th>订单号</th>
  151. <th>姓名</th>
  152. <th>电话</th>
  153. <th>订单金额</th>
  154. <th>购买产品</th>
  155. <th>购买日期</th>
  156. <th>地址</th>
  157. </tr>
  158. </thead>
  159. <tbody id="salesOrderHtml">
  160. <tr>
  161. <td id="companyName"></td>
  162. <td id="salesOrderId"></td>
  163. <td id="salesAddressName"></td>
  164. <td id="salesAddressTel"></td>
  165. <td id="salesPayMoney"></td>
  166. <td id="salesItem"></td>
  167. <td id="salesPayTime"></td>
  168. <td id=""></td>
  169. </tr>
  170. </tbody>
  171. </table>
  172. </div>
  173. </div>
  174. </th>
  175. </tr>
  176. </thead>
  177. </table>
  178. <table class="table table-border table-bg table-bordered" style="margin-top: 10px;">
  179. <thead>
  180. <tr>
  181. <th width="10">
  182. 处理结果(<span id="customerIsSolve" style="color: red"></span>)
  183. <span id="postage" style="color: red"></span>
  184. </th>
  185. <th width="40" style="font-weight: normal;">
  186. <div class="row cl">
  187. <label class="form-label col-1 col-sm-1"></label>
  188. <div class="formControls col-10 col-sm-10">
  189. <ul class="time-line-list">
  190. </ul>
  191. </div>
  192. </div>
  193. </th>
  194. </tr>
  195. </thead>
  196. </table>
  197. <table class="table table-border table-bg table-bordered" style="margin-top: 10px;">
  198. <thead>
  199. <tr>
  200. <th width="10">寄回产品:</th>
  201. <td width="10" style="font-weight: normal;"><span id="closeprodcue"></span></td>
  202. <td width="10"></td>
  203. <th width="10">寄送产品:</th>
  204. <td width="10" style="font-weight: normal;"><span id="sendprodcue"></span></td>
  205. </tr>
  206. <tr>
  207. <th width="10">TDS收集:</th>
  208. <td width="10" style="font-weight: normal;"><span id="customerTDS"></span></td>
  209. <td width="10"></td>
  210. <th width="10">收货地址:</th>
  211. <td width="10" style="font-weight: normal;"><div id="sendMergeAddressDiv"><span id="relationSendMergeAddress"></span></div></td>
  212. </tr>
  213. <tr>
  214. <th width="10">客服备注:</th>
  215. <td width="10" style="font-weight: normal;"><span id="describeHandleDesc"></span></td>
  216. <td width="10"></td>
  217. <th width="10"></th>
  218. <td width="10" style="font-weight: normal;"></td>
  219. </tr>
  220. </thead>
  221. </table>
  222. <#--<div id="div_costomer" style="display: none;">
  223. <div class="row cl" id="divCloseProdcue">
  224. <label class="form-label col-1 col-sm-1">寄回产品:</label>
  225. <div class="formControls col-7 col-sm-7">
  226. <div class="update-parts" id="closeprodcue"></div><br/>
  227. </div>
  228. </div>
  229. <div class="row cl" style="margin-top: 0px;">
  230. <label class="form-label col-1 col-sm-1"></label>
  231. <div class="formControls col-5 col-sm-5">
  232. <!--TDS收集&ndash;&gt;
  233. <label id="customerTDS"></label>
  234. <div style="border-bottom:#ddd 1px solid; overflow:hidden"></div>
  235. </div>
  236. </div>
  237. <div class="row cl" id="sendMergeAddressDiv">
  238. <label class="form-label col-1 col-sm-1">收货地址:</label>
  239. <div class="formControls col-5 col-sm-5">
  240. <label id="relationSendMergeAddress"></label>
  241. </div>
  242. </div>
  243. <div class="row cl" id="divSendProdcue">
  244. <label class="form-label col-1 col-sm-1">寄送产品:</label>
  245. <div class="formControls col-7 col-sm-7">
  246. <div class="update-parts" id="sendprodcue"></div>
  247. </div>
  248. </div>
  249. </div>
  250. <div class="row cl" style="display: none">
  251. <label class="form-label col-1 col-sm-1">客服备注:</label>
  252. <div class="formControls col-7 col-sm-7" id="describeHandleDesc" style="border: 1px solid #ddd;">
  253. </div>
  254. </div>--><#--
  255. <div class="row cl">
  256. <label class="form-label col-1 col-sm-1">回访信息:</label>
  257. <div class="formControls col-7 col-sm-7">
  258. <label id="txtVisit"></label>
  259. </div>
  260. </div>-->
  261. </form>
  262. </div>
  263. </article>
  264. <script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
  265. <script type="text/javascript" src="${path}/common/lib/webuploader/0.1.5/webuploader.min.js"></script>
  266. <script type="text/javascript" src="${path}/common/lib/icheck/jquery.icheck.min.js"></script>
  267. <script type="text/javascript" src="${path}/common/lib/cm.lib/jquery.provincesCity.js"></script>
  268. <script type="text/javascript" src="${path}/common/lib/cm.lib/provincesData.js"></script>
  269. <script type="text/javascript" src="${path}/common/lib/cm.lib/airCity.js"></script>
  270. <script type="text/javascript" src="${path}/common/lib/cm.lib/suggest.js"></script>
  271. <script type="text/javascript" charset="utf-8" src="${path}/common/lib/ueditor/1.4.3/ueditor.config.js"></script>
  272. <script type="text/javascript" charset="utf-8" src="${path}/common/lib/ueditor/1.4.3/ueditor.all.js"></script>
  273. <script type="text/javascript" charset="utf-8" src="${path}/common/lib/ueditor/1.4.3/ueditor.parse.js"></script>
  274. <script type="text/javascript" charset="utf-8" src="${path}/common/lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script>
  275. <script type="text/javascript">
  276. $(function(){
  277. $('.skin-minimal input').iCheck({
  278. checkboxClass: 'icheckbox-blue',
  279. radioClass: 'iradio-blue',
  280. increaseArea: '20%'
  281. });
  282. $("#province").ProvinceCity();
  283. $('.skin-minimal input').iCheck({
  284. checkboxClass: 'icheckbox-blue',
  285. radioClass: 'iradio-blue',
  286. increaseArea: '20%'
  287. });+
  288. $("#arrcity").suggest(citys,{hot_list:commoncitys,dataContainer:'#arrcity_3word',onSelect:function(result){
  289. console.log($(this)[0].value);
  290. // $("#city2").click()
  291. },
  292. attachObject:'#suggest'
  293. });
  294. //$("#city2").suggest(citys,{hot_list:commoncitys,attachObject:"#suggest2"})
  295. getCustomerInfo();
  296. });
  297. var sendprodcue = '';
  298. var sendprodcueshow = false; //寄送产品
  299. var closeprodcue = '';
  300. var closeprodcueshow = false; //寄回产品
  301. /**
  302. * 查询客诉基本信息
  303. */
  304. function getCustomerInfo() {
  305. $.ajax({
  306. cache: true,
  307. type: "POST",
  308. data: {"customerId":${customerId!''}},
  309. url: "${path}/admin/customer/get_customer_info",
  310. async: false,
  311. success: function(data){
  312. if (data.returnCode == 200) {
  313. console.log(data.returnMsg);
  314. var customer = data.returnMsg.customer;
  315. var customerCommon = data.returnMsg.customerCommon;
  316. var salesOrder = data.returnMsg.salesOrder;
  317. var orderList = data.returnMsg.orderList;
  318. if (customer.customerIsSolve != 1 && customer.customerIsSolve != 2) {
  319. resultshow(customer.customerIsSolve, customerCommon.relationBackStatus,customerCommon.relationSendStatus,
  320. customerCommon.maintenanceIsRepair,customerCommon.detectState);
  321. var postage = '';
  322. var postageMoney = 0;
  323. if (customerCommon.relationBackPostage != null) {
  324. postageMoney = customerCommon.relationBackPostage;
  325. }
  326. switch (customerCommon.relationIsTransfer) {
  327. case 0:
  328. postage = '不需要转账。';
  329. break;
  330. case 1:
  331. postage = '已转账邮费'+postageMoney/100+'元。';
  332. break;
  333. case 2:
  334. postage = '待转账邮费'+postageMoney/100+'元。';
  335. break;
  336. }
  337. $('#postage').html(postage);
  338. }
  339. $('#adminName').html(customer.adminName);
  340. var customerSource = '';
  341. switch (customer.customerSourceType) {
  342. case 1:customerSource = '400电话';break;
  343. case 2:customerSource = '微信公众号';break;
  344. case 3:customerSource = customer.customerSource;break;
  345. }
  346. $('#customerSourceType').html(customerSource);
  347. var customerCounsel = '';
  348. switch (customer.customerCounselType) {
  349. case 1:customerCounsel = '售前咨询';break;
  350. case 2:customerCounsel = '售后咨询';break;
  351. case 3:customerCounsel = '其他';break;
  352. }
  353. $('#customerCounselType').html(customerCounsel);
  354. $('#typeName').html(customer.typeName);
  355. $('#describeTitle').html(customer.describeTitle);
  356. $('#questionProfile').html(customer.describeHandleDesc);
  357. $('#describeContent').html(customer.describeContent);
  358. $('#customerDesc').html(customer.customerDesc);
  359. $('#customerName').html(customer.customerName);
  360. $('#customerTel').html(customer.customerTel);
  361. $('#companyName').html(customer.companyName);
  362. $('#storeName').html(customer.storeName);
  363. $('#customerName').html(customer.customerName);
  364. $('#customerTel').html(customer.customerTel);
  365. $('#customerWechatName').html(customer.customerWechatName);
  366. var txtcustomerIsSolve = '';
  367. switch (customer.customerIsSolve) {
  368. case 1:txtcustomerIsSolve = '已解决';break;
  369. case 2:txtcustomerIsSolve = '未解决';break;
  370. case 3:txtcustomerIsSolve = '换新';break;
  371. case 4:txtcustomerIsSolve = '维修';break;
  372. case 5:txtcustomerIsSolve = '补发';break;
  373. case 6:
  374. $('#sendMergeAddressDiv').hide();
  375. txtcustomerIsSolve = '退货';
  376. break;
  377. case 7:
  378. $('#sendMergeAddressDiv').hide();
  379. txtcustomerIsSolve = '无理由退货';
  380. break;
  381. }
  382. $('#customerIsSolve').html(txtcustomerIsSolve);
  383. // $('#companyName').html(convertUndefinedToEmpty(customer.companyName)+"-"+convertUndefinedToEmpty(customer.storeName));
  384. if(orderList != null && typeof(orderList)!="" && orderList.length > 0 ){
  385. var salesOrderHtml = "";
  386. $.each(orderList,function(index,item){
  387. var itemHtml = "";
  388. $.each(this.salesOrderItemList,function(index,item){
  389. itemHtml = this.itemProductName + '*' + this.itemNum
  390. })
  391. salesOrderHtml += '<tr>'
  392. + '<td id="">'+ convertUndefinedToEmpty(customer.companyName)+"-"+convertUndefinedToEmpty(customer.storeName) +'</td>'
  393. + '<td id="">'+ this.salesOrderId +'</td>'
  394. + '<td id="">'+ this.salesAddressName +'</td>'
  395. + '<td id="">'+ this.salesAddressTel +'</td>'
  396. + '<td id="">'+ this.salesPayMoney/100 +'</td>'
  397. + '<td id="">'+ itemHtml +'</td>'
  398. + '<td id="">'+ this.salesPayTime +'</td>'
  399. + '<td id="">'+ this.salesAddressInfo +'</td>'
  400. + '</tr>';
  401. })
  402. $("#salesOrderHtml").html(salesOrderHtml);
  403. }else{
  404. $("#tableHtml").hide();
  405. }
  406. // $('#salesOrderId').html(salesOrder.salesOrderId);
  407. // $('#salesAddressName').html(salesOrder.salesAddressName);
  408. // $('#salesAddressTel').html(salesOrder.salesAddressTel);
  409. // $('#salesPayMoney').html('¥'+salesOrder.salesPayMoney/100);
  410. // var salesItem = '';
  411. // $.each(salesOrder.salesOrderItemList,function(index,item){
  412. // salesItem = this.itemProductName + '*' + this.itemNum
  413. // })
  414. // $('#salesItem').html(salesItem);
  415. // $('#salesPayTime').html(salesOrder.salesPayTime);
  416. $('#relationSendMergeAddress').html( convertUndefinedToEmpty(customerCommon.relationSendMergeAddress)+"-"+convertUndefinedToEmpty(customerCommon.relationSendAddress));
  417. $('#describeHandleDesc').html(customer.describeHandleDesc);
  418. if (customerCommon.sendProdcues != null && customerCommon.sendProdcues.length > 0) {
  419. $.each(customerCommon.sendProdcues,function(index,item){
  420. sendprodcue += '<span style="margin-bottom: 10px;display: inline-block;float: left;">' + this.sendProduceName + '*' + this.sendProdcueNumber + '</span>';
  421. })
  422. }
  423. if (customerCommon.sendFittings != null && customerCommon.sendFittings.length > 0) {
  424. $.each(customerCommon.sendFittings,function(index,item){
  425. sendprodcue += '<span style="margin-bottom: 10px;display: inline-block;float: left;">' + this.sendFittingsName + '*' + this.sendFittingNumber + '</span>';
  426. })
  427. }
  428. if (customerCommon.closedProdcues != null && customerCommon.closedProdcues.length > 0) {
  429. $.each(customerCommon.closedProdcues,function(index,item){
  430. closeprodcue += '<span style="margin-bottom: 10px;display: inline-block;float: left;">' + this.closedProductName + '*' + this.closedProdcueNumber + '</span>';
  431. })
  432. }
  433. if (customerCommon.closedFittings != null && customerCommon.closedFittings.length > 0) {
  434. $.each(customerCommon.closedFittings,function(index,item){
  435. closeprodcue += '<span style="margin-bottom: 10px;display: inline-block;float: left;">' + this.closedFittingsName + '*' + this.closedFittingNumber + '</span>';
  436. })
  437. }
  438. $('#sendprodcue').html(sendprodcue+"<br/>");
  439. $('#closeprodcue').html(closeprodcue+"<br/>");
  440. if (sendprodcueshow) {
  441. $('#divSendProdcue').show();
  442. } else {
  443. $('#divSendProdcue').hide();
  444. }
  445. if (closeprodcueshow) {
  446. $('#divCloseProdcue').show();
  447. } else {
  448. $('#divCloseProdcue').hide();
  449. }
  450. var customerArea = "";
  451. if(customer.customerArea != null && customer.customerArea != ""){
  452. customerArea = convertUndefinedToEmpty(customer.customerArea)+",";
  453. }
  454. $('#customerTDS').html(customerArea+"进水"+
  455. (customer.customerInTDS==undefined?0:customer.customerInTDS)+"ppm"+",出水"+(customer.customerOutTDS==undefined?0:customer.customerOutTDS)+"ppm");
  456. if (customer.customerIsVisit == 2) {
  457. var visitTime = '';
  458. switch (customer.visitTimeSelect) {
  459. case 1:visitTime = '9:00-12:00';break;
  460. case 2:visitTime = '12:00-14:00';break;
  461. case 3:visitTime = '14:00-18:00';break;
  462. }
  463. /*var visitText = "";
  464. if(customer.visitStatus == 1 || customer.visitStatus == 2){
  465. visitText += '(<span class="txt-red">'+convertUndefinedToEmpty(customer.visitDesignatedAdminName)+'</span>)&nbsp;&nbsp;'+
  466. '需要在&nbsp;&nbsp;<span class="txt-red">'+convertUndefinedToEmpty(customer.visitDate)+
  467. '&nbsp;&nbsp;'+convertUndefinedToEmpty(visitTime)+'</span>对&nbsp;&nbsp;<span class="txt-red">'+
  468. convertUndefinedToEmpty(customer.visitName)+'&nbsp;&nbsp;'+
  469. convertUndefinedToEmpty(customer.visitTel)+'</span>&nbsp;&nbsp;进行回访<br>';
  470. }
  471. if(customer.visitStatus == 2){
  472. visitText += '(<span class="txt-red">'+convertUndefinedToEmpty(customer.visitDesignatedAdminName)+'</span>)&nbsp;&nbsp;'+
  473. '在&nbsp;&nbsp;<span class="txt-red">'+convertUndefinedToEmpty(customer.visitCompleteDate)+
  474. '&nbsp;&nbsp;</span>对&nbsp;&nbsp;<span class="txt-red">'+
  475. convertUndefinedToEmpty(customer.visitCompleteName)+'&nbsp;&nbsp;'+
  476. convertUndefinedToEmpty(customer.visitCompleteTel)+'</span>&nbsp;&nbsp;完成回访';
  477. }
  478. $('#txtVisit').html(visitText);*/
  479. }
  480. }
  481. },
  482. error: function(XmlHttpRequest, textStatus, errorThrown){
  483. }
  484. });
  485. }
  486. /*处理结果的执行状态*/
  487. var isSolve = {
  488. solved : [],
  489. noSolved : [],
  490. renewed : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","换新发货","发货通知用户","收货后回访"],
  491. maintain : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","产线维修","换新发货","发货通知用户","收货后回访"],
  492. reissue : ["录入客诉","生成E订单","督促仓库发货","仓库发货","发货通知用户","收货后回访"],
  493. backGoods : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","退款","退货完成"],
  494. noReasonBack : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","退款","退货完成"]
  495. }
  496. /*
  497. * 按条件展示步骤的对应颜色
  498. * backStatus:寄回状态
  499. * sendStatus:寄送状态
  500. */
  501. function resultshow(customerIsSolve, backStatus, sendStatus, maintenanceIsRepair, detectState) {
  502. var statusHtml = '<li id="div_li"><span class="arrow"></span><div id="div_number" class="number">status_index</div><div id="div_txt">status_html</div></li>';
  503. var result = [];
  504. var resultHtml = '';
  505. switch (customerIsSolve) {
  506. case 1:result = isSolve.solved;break;
  507. case 2:result = isSolve.noSolved;break;
  508. case 3:
  509. result = isSolve.renewed;
  510. $('#div_costomer').show();
  511. sendprodcueshow = true;
  512. closeprodcueshow = true;
  513. break;
  514. case 4:
  515. result = isSolve.maintain;
  516. $('#div_costomer').show();
  517. sendprodcueshow = true;
  518. closeprodcueshow = true;
  519. break;
  520. case 5:
  521. result = isSolve.reissue;
  522. $('#div_costomer').show();
  523. sendprodcueshow = true;
  524. break;
  525. case 6:
  526. result = isSolve.backGoods;
  527. $('#div_costomer').show();
  528. closeprodcueshow = true;
  529. break;
  530. case 7:
  531. result = isSolve.noReasonBack;
  532. $('#div_costomer').show();
  533. closeprodcueshow = true;
  534. break;
  535. }
  536. for(var i = 0;i < result.length;i++){
  537. var html = statusHtml.replace("status_index",i+1);
  538. html = html.replace("div_li","li-"+(i+1));
  539. html = html.replace("div_number","number-"+(i+1));
  540. html = html.replace("div_txt","txt-"+(i+1));
  541. html = html.replace("status_html",result[i]);
  542. resultHtml += html;
  543. }
  544. $(".time-line-list").html(resultHtml);
  545. $('#number-1').attr('class','red');
  546. $('#txt-1').attr('class','txt-red');
  547. if (customerIsSolve == 3) {
  548. switch (backStatus) {
  549. case 1:
  550. $('#number-2').attr('class','red');
  551. $('#txt-2').attr('class','txt-red');
  552. break;
  553. case 2:
  554. $('#number-2').attr('class','red');
  555. $('#number-3').attr('class','red');
  556. $('#txt-2').attr('class','txt-red');
  557. $('#txt-3').attr('class','txt-red');
  558. break;
  559. case 3:
  560. $('#number-2').attr('class','red');
  561. $('#number-3').attr('class','red');
  562. $('#number-4').attr('class','red');
  563. $('#txt-2').attr('class','txt-red');
  564. $('#txt-3').attr('class','txt-red');
  565. $('#txt-4').attr('class','txt-red');
  566. break;
  567. }
  568. switch (sendStatus) {
  569. case 1:
  570. $('#number-5').attr('class','red');
  571. $('#txt-5').attr('class','txt-red');
  572. break;
  573. case 2:
  574. $('#number-5').attr('class','red');
  575. $('#number-6').attr('class','red');
  576. $('#txt-5').attr('class','txt-red');
  577. $('#txt-6').attr('class','txt-red');
  578. break;
  579. case 3:
  580. $('#number-5').attr('class','red');
  581. $('#number-6').attr('class','red');
  582. $('#number-7').attr('class','red');
  583. $('#txt-5').attr('class','txt-red');
  584. $('#txt-6').attr('class','txt-red');
  585. $('#txt-7').attr('class','txt-red');
  586. break;
  587. }
  588. } else if (customerIsSolve == 4) {
  589. switch (backStatus) {
  590. case 1:
  591. $('#number-2').attr('class','red');
  592. $('#txt-2').attr('class','txt-red');
  593. break;
  594. case 2:
  595. $('#number-2').attr('class','red');
  596. $('#number-3').attr('class','red');
  597. $('#txt-2').attr('class','txt-red');
  598. $('#txt-3').attr('class','txt-red');
  599. break;
  600. case 3:
  601. $('#number-2').attr('class','red');
  602. $('#number-3').attr('class','red');
  603. $('#number-4').attr('class','red');
  604. $('#txt-2').attr('class','txt-red');
  605. $('#txt-3').attr('class','txt-red');
  606. $('#txt-4').attr('class','txt-red');
  607. break;
  608. }
  609. switch (sendStatus) {
  610. case 1:
  611. $('#number-7').attr('class','red');
  612. $('#txt-7').attr('class','txt-red');
  613. break;
  614. case 2:
  615. $('#number-7').attr('class','red');
  616. $('#number-8').attr('class','red');
  617. $('#txt-7').attr('class','txt-red');
  618. $('#txt-8').attr('class','txt-red');
  619. break;
  620. case 3:
  621. $('#number-7').attr('class','red');
  622. $('#number-8').attr('class','red');
  623. $('#number-9').attr('class','red');
  624. $('#txt-7').attr('class','txt-red');
  625. $('#txt-8').attr('class','txt-red');
  626. $('#txt-9').attr('class','txt-red');
  627. break;
  628. }
  629. if (detectState == 2 || detectState == 3 || detectState == 4) {
  630. $('#number-5').attr('class','red');
  631. $('#txt-5').attr('class','txt-red');
  632. }
  633. if (maintenanceIsRepair != null && maintenanceIsRepair != '') {
  634. $('#number-6').attr('class','red');
  635. $('#txt-6').attr('class','txt-red');
  636. }
  637. } else if (customerIsSolve == 5) {
  638. $('#number-2').attr('class','red');
  639. $('#txt-2').attr('class','txt-red');
  640. switch (sendStatus) {
  641. case 1:
  642. $('#number-3').attr('class','red');
  643. $('#txt-3').attr('class','txt-red');
  644. break;
  645. case 2:
  646. $('#number-3').attr('class','red');
  647. $('#number-4').attr('class','red');
  648. $('#number-5').attr('class','red');
  649. $('#txt-3').attr('class','txt-red');
  650. $('#txt-4').attr('class','txt-red');
  651. $('#txt-5').attr('class','txt-red');
  652. break;
  653. case 3:
  654. $('#number-3').attr('class','red');
  655. $('#number-4').attr('class','red');
  656. $('#number-5').attr('class','red');
  657. $('#number-6').attr('class','red');
  658. $('#txt-3').attr('class','txt-red');
  659. $('#txt-4').attr('class','txt-red');
  660. $('#txt-5').attr('class','txt-red');
  661. $('#txt-6').attr('class','txt-red');
  662. break;
  663. }
  664. } else if (customerIsSolve == 6 || customerIsSolve == 7) {
  665. switch (backStatus) {
  666. case 1:
  667. $('#number-2').attr('class', 'red');
  668. $('#txt-2').attr('class', 'txt-red');
  669. break;
  670. case 2:
  671. $('#number-2').attr('class', 'red');
  672. $('#number-3').attr('class', 'red');
  673. $('#txt-2').attr('class', 'txt-red');
  674. $('#txt-3').attr('class', 'txt-red');
  675. break;
  676. case 3:
  677. $('#number-2').attr('class', 'red');
  678. $('#number-3').attr('class', 'red');
  679. $('#number-4').attr('class', 'red');
  680. $('#txt-2').attr('class', 'txt-red');
  681. $('#txt-3').attr('class', 'txt-red');
  682. $('#txt-4').attr('class', 'txt-red');
  683. break;
  684. }
  685. if (detectState == 2 || detectState == 3 || detectState == 4) {
  686. $('#number-5').attr('class', 'red');
  687. $('#txt-5').attr('class', 'txt-red');
  688. }
  689. }
  690. }
  691. </script>
  692. </body>
  693. </html>