|
@@ -111,11 +111,11 @@
|
|
|
<label class="form-label col-1 col-sm-1"><span class="c-red">*</span>咨询类型:</label>
|
|
|
<div class="formControls col-10 col-sm-10 skin-minimal">
|
|
|
<div class="radio-box">
|
|
|
- <input type="radio" class="customerCounselType" id="customer-type-1" name="customerCounselType" value="1" checked >
|
|
|
+ <input type="radio" class="customerCounselType" id="customer-type-1" name="customerCounselType" value="1" >
|
|
|
<label for="customer-type-1">售前咨询</label>
|
|
|
</div>
|
|
|
<div class="radio-box">
|
|
|
- <input type="radio" class="customerCounselType" id="customer-type-2" name="customerCounselType" value="2" >
|
|
|
+ <input type="radio" class="customerCounselType" id="customer-type-2" name="customerCounselType" value="2" checked>
|
|
|
<label for="customer-type-2">售后咨询</label>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -165,7 +165,7 @@
|
|
|
<em></em>
|
|
|
<strong>相关QA</strong>
|
|
|
<a href="javascript:void(0)" style="margin-left: 200px;" onclick="closeQA()">关闭</a>
|
|
|
- <ul id="question">
|
|
|
+ <ul id="question" style="padding-top: 15px">
|
|
|
<#--<li class="ask">1、净水机面板操作不灵敏,是怎么回事?</li>
|
|
|
<li class="answer">答:<span>4净水机面板操作不灵敏,是怎么回事。1、净水机面板操作不灵敏,是怎么回事?1、净水机面板操作不灵敏,是怎么回事?1、净水机面板操作不灵敏,是怎么回事?</span></li>-->
|
|
|
</ul>
|
|
@@ -224,7 +224,7 @@
|
|
|
<label class="form-label col-1 col-sm-1">处理类型:</label>
|
|
|
<div class="formControls col-10 col-sm-10 skin-minimal">
|
|
|
<div class="radio-box" id="solved">
|
|
|
- <input type="radio" id="customer-process-1" value="1" name="customerIsSolve" checked>
|
|
|
+ <input type="radio" id="customer-process-1" value="1" name="customerIsSolve" >
|
|
|
<label for="customer-process-1">已解决</label>
|
|
|
</div>
|
|
|
<div class="radio-box" id="noSolved">
|
|
@@ -232,11 +232,11 @@
|
|
|
<label for="customer-process-2">未解决</label>
|
|
|
</div>
|
|
|
<div class="radio-box" id="renewed" style="display: none">
|
|
|
- <input type="radio" id="customer-process-3" value="3" name="customerIsSolve">
|
|
|
+ <input type="radio" id="customer-process-3" value="3" name="customerIsSolve" checked>
|
|
|
<label for="customer-process-3">换新</label>
|
|
|
</div>
|
|
|
<div class="radio-box" id="maintain" style="display: none">
|
|
|
- <input type="radio" id="customer-process-4" value="4" name="customerIsSolve">
|
|
|
+ <input type="radio" id="customer-process-4" value="4" name="customerIsSolve" >
|
|
|
<label for="customer-process-4">维修</label>
|
|
|
</div>
|
|
|
<div class="radio-box" id="reissue" style="display: none">
|
|
@@ -351,7 +351,7 @@
|
|
|
|
|
|
<table class="table table-border table-bg table-bordered">
|
|
|
<thead>
|
|
|
- <tr class="text-c">
|
|
|
+ <tr class="text-c" id="table1">
|
|
|
<th style="text-align: center;" width="60">产品名称</th>
|
|
|
<th style="text-align: center;" width="60">产品颜色</th>
|
|
|
<th style="text-align: center;" width="60">产品配件</th>
|
|
@@ -368,10 +368,10 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="row cl" id="TDScollect" style="display: none;">
|
|
|
- <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>TDS收集:</label>
|
|
|
+ <label class="form-label col-1 col-sm-1">TDS收集:</label>
|
|
|
<div class="formControls col-2 col-sm-2" style="position: relative;">
|
|
|
<input type="hidden" name="arrcity_3word" id="arrcity_3word" value="" />
|
|
|
- <input style="width: 140px;" placeholder="" class="input-text my-search-input" placeholder="请输入城市名称搜索" type="text" name="arrcity" id="arrcity" />
|
|
|
+ <input style="width: 190px;" placeholder="" class="input-text my-search-input" placeholder="请输入城市名称搜索" type="text" name="arrcity" id="arrcity" />
|
|
|
<div id="suggest" class="ac_results"></div>
|
|
|
</div>
|
|
|
<div class="formControls col-2 col-sm-2">
|
|
@@ -383,10 +383,10 @@
|
|
|
</div>
|
|
|
<input type="hidden" name="customerArea" id="customerArea">
|
|
|
<div class="formControls col-2 col-sm-2">
|
|
|
- <input type="text" class="input-text" value="" placeholder="进水TDS数值,最大999" id="customerInTDS" name="customerInTDS" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
|
|
|
+ <input type="text" class="input-text" value="" placeholder="进水TDS数值,最大999" id="customerInTDS" name="customerInTDS" onkeyup="TDSLinkage($(this),999)" onpaste="TDSLinkage($(this),999)">
|
|
|
</div>
|
|
|
<div class="formControls col-2 col-sm-2">
|
|
|
- <input type="text" class="input-text" value="" placeholder="出水TDS数值,最大999" id="customerOutTDS" name="customerOutTDS" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
|
|
|
+ <input type="text" class="input-text" value="" placeholder="出水TDS数值,最大999" id="customerOutTDS" name="customerOutTDS" onkeyup="TDSLinkage($(this),999)" onpaste="TDSLinkage($(this),999)">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="row cl" id="TDScollectShow" style="display: none;">
|
|
@@ -421,11 +421,11 @@
|
|
|
|
|
|
<table class="table table-border table-bg table-bordered">
|
|
|
<thead>
|
|
|
- <tr class="text-c">
|
|
|
- <th style="text-align: center;" width="60">产品名称</th>
|
|
|
- <th style="text-align: center;" width="60">产品颜色</th>
|
|
|
- <th style="text-align: center;" width="60">产品配件</th>
|
|
|
- </tr>
|
|
|
+ <tr class="text-c" id="table2">
|
|
|
+ <th style="text-align: center;" width="60">产品名称</th>
|
|
|
+ <th style="text-align: center;" width="60">产品颜色</th>
|
|
|
+ <th style="text-align: center;" width="60">产品配件</th>
|
|
|
+ </tr>
|
|
|
</thead>
|
|
|
<tbody id="back-product">
|
|
|
<tr id="showOrder">
|
|
@@ -437,7 +437,8 @@
|
|
|
|
|
|
</div>
|
|
|
<div class="row cl">
|
|
|
- <label class="form-label col-1 col-sm-1">处理描述:</label>
|
|
|
+ <#--处理描述-->
|
|
|
+ <label class="form-label col-1 col-sm-1">客诉备注:</label>
|
|
|
<div class="formControls col-5 col-sm-5">
|
|
|
<script id="describeHandleDescText" type="text/plain" style="width:983px;height:250px;"></script>
|
|
|
</script>
|
|
@@ -551,15 +552,14 @@
|
|
|
});
|
|
|
|
|
|
$(document).on('click', '.dalog-ask .answer', function() {
|
|
|
- var msg = $(this).find("span").html();
|
|
|
- UE.getEditor('describeContentText').setContent(msg);
|
|
|
|
|
|
- $("#questionId").val($(this).find(".quesId").val());
|
|
|
+ var questionId = $(this).find(".quesId").val()
|
|
|
+ var title = $(this).find("span").html();
|
|
|
+ var desc = $(this).find("#questionProfile").html()
|
|
|
|
|
|
- var title = $(this).prev().html();
|
|
|
+ $("#questionId").val(questionId);
|
|
|
$("#describeTitle").val(title);
|
|
|
-
|
|
|
- //$("#questionId").val(.find(".quesId").val());
|
|
|
+ UE.getEditor('describeContentText').setContent(desc);
|
|
|
|
|
|
//$("#answer-textarea").text();
|
|
|
$(".dalog-ask").hide(); //隐藏qa
|
|
@@ -684,6 +684,8 @@
|
|
|
elementPathEnabled : false /*去掉元素路径*/
|
|
|
});
|
|
|
|
|
|
+ var isInitSendAddressSms = false;
|
|
|
+
|
|
|
sendAddressSms.ready(function() {
|
|
|
sendAddressSms.setHeight(130); //固定高度
|
|
|
});
|
|
@@ -701,11 +703,22 @@
|
|
|
noReasonBack : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","退款","退货完成"]
|
|
|
}
|
|
|
|
|
|
+ /*处理结果的变更状态 产品列表表头信息*/
|
|
|
+ var isSolveTitleMsg = {
|
|
|
+ solved : [[],[]],
|
|
|
+ noSolved : [[],[]],
|
|
|
+ renewed : [["退回产品","退回产品颜色","退回产品配件"],["更换产品","更换产品颜色","更换产品配件"]],
|
|
|
+ maintain : [["需要维修的产品","需要维修的产品颜色","需要维修的产品配件"],["维修产品","维修产品颜色","维修产品配件"]],
|
|
|
+ reissue : [["补发产品","补发产品颜色","补发产品配件"],[]],
|
|
|
+ backGoods : [["退回产品","退回产品颜色","退回产品配件"],[]],
|
|
|
+ noReasonBack : [["退回产品","退回产品颜色","退回产品配件"],[]]
|
|
|
+ }
|
|
|
+
|
|
|
/*个人id*/
|
|
|
var adminId = 0;
|
|
|
|
|
|
/* 咨询类型 1:售前咨询 2:售后咨询 3:其他 */
|
|
|
- var allCustomerInfoType = 1;
|
|
|
+ var allCustomerInfoType;
|
|
|
|
|
|
/*全局标识当前状态 type : 1 :已解决 2:未解决 3:换新 4:维修 5:补发 6:退货 7:无理由退货*/
|
|
|
var allCustomerType = 1;
|
|
@@ -735,7 +748,7 @@
|
|
|
initVisitSysAdmin();
|
|
|
|
|
|
/*初始化选择处理结果 -- type : 1 :已解决 2:未解决 3:换新 4:维修 5:补发 6:退货 7:无理由退货 */
|
|
|
- initProcessResult(1);
|
|
|
+ initProcessResult(3);
|
|
|
|
|
|
/*监听来源入口选择事件*/
|
|
|
$("input[name='customerSourceType']").change(function (){
|
|
@@ -750,12 +763,18 @@
|
|
|
/*监听客诉类型选择事件*/
|
|
|
$("input[name='customerCounselType']").change(function (){
|
|
|
allCustomerInfoType = parseInt($(this).val());
|
|
|
+ if(allCustomerInfoType == 1){
|
|
|
+ $("#customer-process-1").iCheck('check'); //设置已解决
|
|
|
+ allCustomerType = 1;
|
|
|
+ }else{
|
|
|
+ $("#customer-process-3").iCheck('check'); //设置换新
|
|
|
+ allCustomerType =3;
|
|
|
+ }
|
|
|
initProcessResult(allCustomerType);
|
|
|
})
|
|
|
|
|
|
/*监听处理结果选择事件*/
|
|
|
$("[name='customerIsSolve']").change(function(){
|
|
|
- allCustomerType = parseInt($(this).val());
|
|
|
initProcessResult(parseInt($(this).val()));
|
|
|
})
|
|
|
|
|
@@ -807,13 +826,13 @@
|
|
|
setTDSCollect();
|
|
|
});
|
|
|
/*实时监听文本框-- TDS进水*/
|
|
|
- document.getElementById("customerInTDS").addEventListener("input", function(){
|
|
|
- setTDSCollect();
|
|
|
- });
|
|
|
+// document.getElementById("customerInTDS").addEventListener("input", function(){
|
|
|
+// setTDSCollect();
|
|
|
+// });
|
|
|
/*实时监听文本框-- TDS出水*/
|
|
|
- document.getElementById("customerOutTDS").addEventListener("input", function(){
|
|
|
- setTDSCollect();
|
|
|
- });
|
|
|
+// document.getElementById("customerOutTDS").addEventListener("input", function(){
|
|
|
+// setTDSCollect();
|
|
|
+// });
|
|
|
|
|
|
/* 监听手机号 失去焦点时 将其他手机号码未填的 */
|
|
|
$(".associated-phone").blur(function (){
|
|
@@ -867,23 +886,15 @@
|
|
|
* */
|
|
|
function visitByType(type){
|
|
|
if(1 == type){ //不需要回访
|
|
|
- $("#customer-visit-2").prop("checked",true); //不需要回访
|
|
|
- initCheckByNode($("#customer-visit-2"));
|
|
|
+ $("#customer-visit-2").iCheck('check'); //设置不需要回访
|
|
|
$("#needToVisit").css("display","none");
|
|
|
}else{
|
|
|
- $("#customer-visit-1").prop("checked",true); //需要回访
|
|
|
- initCheckByNode($("#customer-visit-1"));
|
|
|
+ $("#customer-visit-1").iCheck('check'); //设置需要回访
|
|
|
$("#needToVisit").css("display","block");
|
|
|
}
|
|
|
initVisitEvent();
|
|
|
}
|
|
|
|
|
|
-// function keyFun(node){
|
|
|
-// var c=$(node);
|
|
|
-// var temp_amount=c.val().replace(/[^\d]/g,'');
|
|
|
-// $(node).val(Number(temp_amount));
|
|
|
-// }
|
|
|
-
|
|
|
/*初始化客服*/
|
|
|
var sysAminList;
|
|
|
function initSysAdmin() {
|
|
@@ -996,9 +1007,17 @@
|
|
|
if(type == null || type == ""){
|
|
|
type = 1;
|
|
|
}
|
|
|
+
|
|
|
+ allCustomerType = type;
|
|
|
+
|
|
|
+ if(allCustomerInfoType == null || allCustomerInfoType == ""){
|
|
|
+ allCustomerInfoType = $("input[name='customerCounselType']:checked").val();
|
|
|
+ }
|
|
|
+
|
|
|
var statusHtml = '<li><span class="arrow"></span><div class="number">status_index</div><div>status_html</div></li>';
|
|
|
var resultHtml = '';
|
|
|
var result = {};
|
|
|
+ var resultProductTableTitle = {};
|
|
|
|
|
|
$("#solved").show(); //已解决
|
|
|
$("#noSolved").show();//未解决
|
|
@@ -1024,9 +1043,9 @@
|
|
|
}
|
|
|
}else if(allCustomerInfoType == 2){ //售后
|
|
|
|
|
|
- var msg = UE.getEditor('sendAddressSms').getContent();
|
|
|
- if(msg == null || msg == ""){
|
|
|
+ if(!isInitSendAddressSms){
|
|
|
initComplaintQuestionInfo("m");
|
|
|
+ isInitSendAddressSms = true;
|
|
|
}
|
|
|
|
|
|
/* 在选择售后类型是,直接初始化省市区,使用isInitAddress 变量来判断 */
|
|
@@ -1054,6 +1073,7 @@
|
|
|
break;
|
|
|
case 3: //换新
|
|
|
result = isSolve.renewed;
|
|
|
+ resultProductTableTitle = isSolveTitleMsg.renewed;
|
|
|
$("#relationProduct").html("换新产品");
|
|
|
$("#processResultStatus").show();
|
|
|
$("#orderHead").show();
|
|
@@ -1067,12 +1087,13 @@
|
|
|
$("#TDScollectShow").show();
|
|
|
$("#sendAddressInfo").show();
|
|
|
$("#sendAddressByPhone").show();
|
|
|
- $("#updateProduct").show();
|
|
|
+ $("#updateProduct").hide(); //换新产品
|
|
|
$("#postageAccount").show(); //邮费转账账户
|
|
|
visitByType(2); //需要回访
|
|
|
break;
|
|
|
case 4: //维修
|
|
|
result = isSolve.maintain;
|
|
|
+ resultProductTableTitle = isSolveTitleMsg.maintain;
|
|
|
$("#relationProduct").html("维修产品");
|
|
|
$("#processResultStatus").show();
|
|
|
$("#orderHead").show();
|
|
@@ -1086,12 +1107,13 @@
|
|
|
$("#TDScollectShow").show();
|
|
|
$("#sendAddressInfo").show();
|
|
|
$("#sendAddressByPhone").show();
|
|
|
- $("#updateProduct").show();
|
|
|
+ $("#updateProduct").hide();//维修产品
|
|
|
$("#postageAccount").show(); //邮费转账账户
|
|
|
visitByType(2); //需要回访
|
|
|
break;
|
|
|
case 5://补发
|
|
|
result = isSolve.reissue;
|
|
|
+ resultProductTableTitle = isSolveTitleMsg.reissue;
|
|
|
$("#relationProduct").html("补发产品");
|
|
|
$("#processResultStatus").show();
|
|
|
$("#orderHead").show();
|
|
@@ -1111,6 +1133,7 @@
|
|
|
break;
|
|
|
case 6: //退货
|
|
|
result = isSolve.backGoods;
|
|
|
+ resultProductTableTitle = isSolveTitleMsg.backGoods;
|
|
|
$("#relationProduct").html("退货产品");
|
|
|
$("#processResultStatus").show();
|
|
|
$("#orderHead").show();
|
|
@@ -1130,6 +1153,7 @@
|
|
|
break;
|
|
|
case 7://无理由退货
|
|
|
result = isSolve.noReasonBack;
|
|
|
+ resultProductTableTitle = isSolveTitleMsg.noReasonBack;
|
|
|
$("#relationProduct").html("退货产品");
|
|
|
$("#processResultStatus").show();
|
|
|
$("#orderHead").show();
|
|
@@ -1156,6 +1180,17 @@
|
|
|
html = html.replace("status_html",result[i]);
|
|
|
resultHtml += html;
|
|
|
}
|
|
|
+
|
|
|
+ if(resultProductTableTitle != null && resultProductTableTitle.length > 0){
|
|
|
+ /* 根据处理类型来切换 产品列表的列名称 */
|
|
|
+ for(var i=0;i<resultProductTableTitle[0].length;i++){
|
|
|
+ $("#table1").find("th").eq(i).html(resultProductTableTitle[0][i]);
|
|
|
+ }
|
|
|
+ for(var i=0;i<resultProductTableTitle[1].length;i++){
|
|
|
+ $("#table2").find("th").eq(i).html(resultProductTableTitle[1][i]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
$("#processResultStatus").html(resultHtml);
|
|
|
}
|
|
|
|
|
@@ -1179,8 +1214,8 @@
|
|
|
/*初始化问题大类*/
|
|
|
function initComplaintTypeInfo() {
|
|
|
//默认为售前咨询
|
|
|
- var customerCounselTypeOverall = allCustomerInfoType;
|
|
|
-
|
|
|
+ //var customerCounselTypeOverall = allCustomerInfoType;
|
|
|
+ var customerCounselTypeOverall = null;
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
data: {
|
|
@@ -1274,9 +1309,14 @@
|
|
|
if (data.returnCode == 200) {
|
|
|
for(var i=0;i<data.returnMsg.complaintQuestionInfoList.length;i++){
|
|
|
var complaintQuestion= data.returnMsg.complaintQuestionInfoList[i];
|
|
|
- html += '<li class="ask">'+ complaintQuestion.questionName +'' +
|
|
|
- '</li>' +
|
|
|
- '<li class="answer" style="height: 65px;overflow: hidden;">答:<span>'+ complaintQuestion.questionProfile +'</span><input class="quesId" type="hidden" value="'+ complaintQuestion.questionId +'"></li>';
|
|
|
+ //html += '<li class="ask">'+ complaintQuestion.questionName +'' +
|
|
|
+ // '</li>' +
|
|
|
+ // '<li class="answer" style="height: 65px;overflow: hidden;">答:<span>'+ complaintQuestion.questionProfile +'</span><input class="quesId" type="hidden" value="'+ complaintQuestion.questionId +'"></li>';
|
|
|
+ html += '' +
|
|
|
+ '<li class="answer" style="height: 20px;overflow: hidden;border-bottom: 1px solid #ddd;"><span>'+ complaintQuestion.questionName +'</span>' +
|
|
|
+ '<input class="quesId" type="hidden" value="'+ complaintQuestion.questionId +'">' +
|
|
|
+ '<div id="questionProfile" style="display: block">'+ complaintQuestion.questionProfile +'</div>' +
|
|
|
+ '</li>';
|
|
|
}
|
|
|
}else{
|
|
|
html = '<span style="font-size: 12px; margin-top: 10px; display: block;">未搜索到QA信息,请更换关键字或者直接录入到系统!</span>';
|
|
@@ -1288,13 +1328,21 @@
|
|
|
if (data.returnCode == 200) {
|
|
|
msg = data.returnMsg.complaintQuestionInfoList[0].questionProfile;
|
|
|
}
|
|
|
- UE.getEditor('sendAddressSms').setContent(msg,false);
|
|
|
+ addSmsMsg(msg);
|
|
|
}
|
|
|
},
|
|
|
error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
|
}
|
|
|
});
|
|
|
+ }
|
|
|
+
|
|
|
+ /*添加邮寄信息*/
|
|
|
+ function addSmsMsg(msg){
|
|
|
+ sendAddressSms.addListener("ready", function () {
|
|
|
+ // editor准备好之后才可以使用
|
|
|
+ sendAddressSms.setContent(msg);
|
|
|
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -1500,13 +1548,13 @@
|
|
|
}
|
|
|
var time = formatDate(new Date(salesOrder.salesCreateTime),"yyyy-MM-dd");
|
|
|
html += '' +
|
|
|
- ' <td>'+ convertUndefinedToEmpty(salesOrder.companyName) +'-'+ convertUndefinedToEmpty(salesOrder.storeName) +'</td>' +
|
|
|
- ' <td>'+ salesOrder.salesId +'</td>' +
|
|
|
- ' <td>'+ salesOrder.salesAddressName +'</td>' +
|
|
|
- ' <td>'+ salesOrder.salesAddressTel +'</td>' +
|
|
|
- ' <td>'+ salesOrder.salesAmount +'</td>' +
|
|
|
- ' <td>'+ productsHtml +'</td>' +
|
|
|
- ' <td>'+ time +'</td>' +
|
|
|
+ ' <td style="text-align: center;">'+ convertUndefinedToEmpty(salesOrder.companyName) +'-'+ convertUndefinedToEmpty(salesOrder.storeName) +'</td>' +
|
|
|
+ ' <td style="text-align: center;">'+ salesOrder.salesId +'</td>' +
|
|
|
+ ' <td style="text-align: center;">'+ salesOrder.salesAddressName +'</td>' +
|
|
|
+ ' <td style="text-align: center;">'+ salesOrder.salesAddressTel +'</td>' +
|
|
|
+ ' <td style="text-align: center;">'+ salesOrder.salesAmount/100 +'</td>' +
|
|
|
+ ' <td style="text-align: center;">'+ productsHtml +'</td>' +
|
|
|
+ ' <td style="text-align: center;">'+ time +'</td>' +
|
|
|
'';
|
|
|
//address = '<td colspan="1">收货地址</td><td colspan="6" class="td-manage text-c" >'+ salesOrder.salesAddressInfo +' <a style="color: #0a6999;text-decoration: underline;" href="javascript:void(0);" title="编辑" onclick="updateAdress()">修改地址</a></td>' ;
|
|
|
address = salesOrder.salesAddressInfo;
|
|
@@ -1581,8 +1629,11 @@
|
|
|
abbreviation = addrss.replace(cityReg,"");
|
|
|
break;
|
|
|
case 2:
|
|
|
- var districtReg = new RegExp("市","g");
|
|
|
+ var districtReg = new RegExp("区","g");
|
|
|
abbreviation = addrss.replace(districtReg,"");
|
|
|
+
|
|
|
+ districtReg = new RegExp("市","g");
|
|
|
+ abbreviation = abbreviation.replace(districtReg,"");
|
|
|
break;
|
|
|
default:
|
|
|
break;
|
|
@@ -1666,11 +1717,11 @@
|
|
|
var disId = "";
|
|
|
$("#district").html(districtHtml);
|
|
|
if(selectDistrict != null && selectDistrict.length > 0 ){
|
|
|
- disId = selectDistrict[0].cityId;
|
|
|
+ disId = selectDistrict[0].districtId;
|
|
|
}else{
|
|
|
- disId = district[0].cityId;
|
|
|
+ disId = district[0].districtId;
|
|
|
}
|
|
|
- $("#city option[value='" + disId + "']").attr("selected","true");
|
|
|
+ $("#district option[value='" + disId + "']").attr("selected","true");
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1734,7 +1785,7 @@
|
|
|
' <td width="15" style="'+ fristInputStyle +' padding: 0px;width: 25px;">' +
|
|
|
' <input type="hidden" class="input-produce-id" value="' + color.colorProductId + '">' +
|
|
|
' <input type="hidden" class="input-color-id" value="' + color.colorId + '">' +
|
|
|
- ' <input type="text" class="input-text input-color-number number-input" style="width: 100%;border: none;text-align: center;" value="'+ number +'" placeholder="产品数量" id="" name="" onkeyup="keyFun($(this))" onpaste="keyFun($(this))" >' +
|
|
|
+ ' <input type="text" class="input-text input-color-number number-input" style="width: 100%;border: none;text-align: center;" value="'+ number +'" placeholder="产品数量" id="color-' + color.colorProductId + '-' + color.colorId + '" name="" onkeyup="keyFun($(this))" onpaste="keyFun($(this))" >' +
|
|
|
' </td>' +
|
|
|
' </tr>';
|
|
|
fristInputStyle = "";
|
|
@@ -1758,7 +1809,7 @@
|
|
|
' <td width="15" style="'+ fristInputStyle +'padding: 0px;width: 25px;">' +
|
|
|
' <input type="hidden" class="input-produce-id" value="' + produceFit.productId + '">' +
|
|
|
' <input type="hidden" class="input-fittings-id" value="' + produceFit.fittingsId +'">' +
|
|
|
- ' <input type="text" class="input-text input-fittings-number" style="width: 100%;border: none;text-align: center;" value="'+ number +'" placeholder="配件数量" id="" name="" onkeyup="keyFun($(this))" onpaste="keyFun($(this))" >' +
|
|
|
+ ' <input type="text" class="input-text input-fittings-number" style="width: 100%;border: none;text-align: center;" value="'+ number +'" placeholder="配件数量" id="fittings-' + produceFit.productId + '-' + produceFit.fittingsId +'" name="" onkeyup="keyFun($(this))" onpaste="keyFun($(this))" >' +
|
|
|
' </td>' +
|
|
|
' </tr>';
|
|
|
fristInputStyle = "";
|
|
@@ -1785,8 +1836,6 @@
|
|
|
|
|
|
$("#addProduct").html(html);
|
|
|
|
|
|
-// initCheck(); //因为需要展示产品,所以再次初始化多选框
|
|
|
-
|
|
|
setBackProduct(html); //设置寄回产品
|
|
|
|
|
|
monitorProduct(); //监听产品变化
|
|
@@ -1850,7 +1899,20 @@
|
|
|
if(html != null && html != "" && typeof(html) != "undefined"){
|
|
|
$("#back-product").html(html);
|
|
|
}else{
|
|
|
-
|
|
|
+ $("#addProduct").find(".input-color-number").each(function(){
|
|
|
+ var number = $(this).val();
|
|
|
+ if(number != null && number != ""){
|
|
|
+ var colorNodeId = $(this).attr("id");
|
|
|
+ $("#back-product").find("#"+colorNodeId).val(number);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ $("#addProduct").find(".input-fittings-number").each(function(){
|
|
|
+ var number = $(this).val();
|
|
|
+ if(number != null && number != ""){
|
|
|
+ var fittingsNodeId = $(this).attr("id");
|
|
|
+ $("#back-product").find("#"+fittingsNodeId).val(number);
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1861,14 +1923,46 @@
|
|
|
|
|
|
if(TDSAddress != null && TDSAddress != ""){
|
|
|
$("#DTS-address").html("地址:" + TDSAddress);
|
|
|
- var customerInTDS = $("#customerInTDS").val();
|
|
|
- var customerOutTDS = $("#customerOutTDS").val()
|
|
|
- if(customerInTDS != null && customerInTDS != "" && customerOutTDS != null && customerOutTDS != ""){
|
|
|
- $("#DTS-in").html("进水:" + customerInTDS + " PPM");
|
|
|
- $("#DTS-out").html("出水:" + customerOutTDS + " PPM");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /*TDS联动处理*/
|
|
|
+ function TDSLinkage(node,maxNumber,minNumber){
|
|
|
+ setTDSCollect();
|
|
|
+
|
|
|
+ var number = 0;
|
|
|
+ var c=$(node);
|
|
|
+ if(c.val() == ""){
|
|
|
+ $(node).val("");
|
|
|
+ }else{
|
|
|
+ var temp_amount=c.val().replace(/[^\d]/g,'');
|
|
|
+ number = Number(temp_amount)
|
|
|
+ if(maxNumber!= null && maxNumber!= "" && number > maxNumber){
|
|
|
+ number = maxNumber;
|
|
|
+ }
|
|
|
+ if(minNumber!= null && minNumber!= "" && number < minNumber){
|
|
|
+ number = minNumber;
|
|
|
}
|
|
|
+ $(node).val(number);
|
|
|
+ }
|
|
|
+
|
|
|
+ var nodeName = $(node).attr("id");
|
|
|
+ if(nodeName == "customerInTDS" ){
|
|
|
+ $("#DTS-in").html("进水:" + number + " PPM");
|
|
|
+ }else if(nodeName == "customerOutTDS" ){
|
|
|
+ $("#DTS-out").html("出水:" + number + " PPM");
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取当前节点,将当前节点的val值除了数字其他的删掉
|
|
|
+ * @param node
|
|
|
+ * @param maxNumber 最大值
|
|
|
+ * @param minNumber 最小值
|
|
|
+ */
|
|
|
+ function keyFun(node,maxNumber,minNumber){
|
|
|
+
|
|
|
+ }
|
|
|
</script>
|
|
|
<script>
|
|
|
$(function(){
|
|
@@ -1916,9 +2010,7 @@
|
|
|
if(customerSourceType == 3){
|
|
|
var customerSourceOld = $("#customerSourceOld").val();
|
|
|
if(customerSourceOld == null || customerSourceOld == "" || typeof(customerSourceOld)=="undefined"){
|
|
|
-
|
|
|
vailErrorMsg($("#customerSourceOld"),"未填写来源入口");
|
|
|
-
|
|
|
return false;
|
|
|
}else{
|
|
|
$("#customerSource").val(customerSourceOld);
|
|
@@ -2090,6 +2182,25 @@
|
|
|
$("#closedProdcues").val(JSON.stringify(closedProdcues));
|
|
|
$("#closedFittings").val(JSON.stringify(closedFittings));
|
|
|
|
|
|
+ var visitTimeSelect = $("input[name='visitTimeSelect']").val();
|
|
|
+ var visit_date = $('#datemin').val();
|
|
|
+ var myDate = new Date();
|
|
|
+ var date = myDate.getFullYear()+"-"+(myDate.getMonth()+1)+"-"+myDate.getDate();
|
|
|
+ var hours = myDate.getHours();
|
|
|
+ //如果两个时间相等,则判断可选的回访时间
|
|
|
+ if(Date.parse(visit_date) == Date.parse(date)){
|
|
|
+ if (hours > 12 && visitTimeSelect == 1) {
|
|
|
+ vailErrorMsg($("#datemin"),"该时间已超过当前时间,请重新选择回访时间!");
|
|
|
+ return false;
|
|
|
+ } else if (hours > 14 && visitTimeSelect == 2) {
|
|
|
+ vailErrorMsg($("#datemin"),"该时间已超过当前时间,请重新选择回访时间!");
|
|
|
+ return false;
|
|
|
+ } else if (hours > 18 && visitTimeSelect == 3) {
|
|
|
+ vailErrorMsg($("#datemin"),"该时间已超过当前时间,请重新选择回访时间!");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
return true;
|
|
|
}
|
|
|
|