|
@@ -368,7 +368,7 @@
|
|
|
</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: 190px;" placeholder="" class="input-text my-search-input" placeholder="请输入城市名称搜索" type="text" name="arrcity" id="arrcity" />
|
|
@@ -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;">
|
|
@@ -762,6 +762,13 @@
|
|
|
/*监听客诉类型选择事件*/
|
|
|
$("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);
|
|
|
})
|
|
|
|
|
@@ -818,13 +825,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 (){
|
|
@@ -878,23 +885,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() {
|
|
@@ -1087,7 +1086,7 @@
|
|
|
$("#TDScollectShow").show();
|
|
|
$("#sendAddressInfo").show();
|
|
|
$("#sendAddressByPhone").show();
|
|
|
- $("#updateProduct").show();
|
|
|
+ $("#updateProduct").hide(); //换新产品
|
|
|
$("#postageAccount").show(); //邮费转账账户
|
|
|
visitByType(2); //需要回访
|
|
|
break;
|
|
@@ -1107,7 +1106,7 @@
|
|
|
$("#TDScollectShow").show();
|
|
|
$("#sendAddressInfo").show();
|
|
|
$("#sendAddressByPhone").show();
|
|
|
- $("#updateProduct").show();
|
|
|
+ $("#updateProduct").hide();//维修产品
|
|
|
$("#postageAccount").show(); //邮费转账账户
|
|
|
visitByType(2); //需要回访
|
|
|
break;
|
|
@@ -1181,15 +1180,16 @@
|
|
|
resultHtml += html;
|
|
|
}
|
|
|
|
|
|
- /* 根据处理类型来切换 产品列表的列名称 */
|
|
|
- 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]);
|
|
|
+ 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);
|
|
|
}
|
|
|
|
|
@@ -1547,13 +1547,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/100 +'</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;
|
|
@@ -1628,8 +1628,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;
|
|
@@ -1713,11 +1716,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");
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1781,7 +1784,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 = "";
|
|
@@ -1805,7 +1808,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 = "";
|
|
@@ -1832,8 +1835,6 @@
|
|
|
|
|
|
$("#addProduct").html(html);
|
|
|
|
|
|
-// initCheck(); //因为需要展示产品,所以再次初始化多选框
|
|
|
-
|
|
|
setBackProduct(html); //设置寄回产品
|
|
|
|
|
|
monitorProduct(); //监听产品变化
|
|
@@ -1897,42 +1898,20 @@
|
|
|
if(html != null && html != "" && typeof(html) != "undefined"){
|
|
|
$("#back-product").html(html);
|
|
|
}else{
|
|
|
- return false;
|
|
|
-// $("#addProduct").find(".input-color-number").each(function(){
|
|
|
-// var number = $(this).val();
|
|
|
-// if(number != null && number != ""){
|
|
|
-// var product = new Object();
|
|
|
-// product.productId = $(this).parent().find(".input-produce-id").val();
|
|
|
-// product.colorId = $(this).parent().find(".input-color-id").val();
|
|
|
-// //换新、维修,退货,无理由退货,
|
|
|
-// if(allCustomerType == 3 || allCustomerType == 4 || allCustomerType == 6 || allCustomerType == 7){
|
|
|
-// product.closedProdcueNumber = number;
|
|
|
-// closedProdcues.push(product);
|
|
|
-// }else if(allCustomerType == 5){
|
|
|
-// product.sendProdcueNumber = number;
|
|
|
-// sendProdcues.push(product);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// })
|
|
|
-//
|
|
|
-// $("#addProduct").find(".input-fittings-number").each(function(){
|
|
|
-// var number = $(this).val();
|
|
|
-// if(number != null && number != ""){
|
|
|
-// var fittings = new Object();
|
|
|
-// fittings.productId = $(this).parent().find(".input-produce-id").val();
|
|
|
-// fittings.fittingsId = $(this).parent().find(".input-fittings-id").val();
|
|
|
-// //换新、维修,退货,无理由退货,
|
|
|
-// if(allCustomerType == 3 || allCustomerType == 4 || allCustomerType == 6 || allCustomerType == 7){
|
|
|
-// fittings.closedFittingNumber = number;
|
|
|
-// closedFittings.push(fittings);
|
|
|
-// }else if(allCustomerType == 5){
|
|
|
-// fittings.sendFittingNumber = number;
|
|
|
-// sendFittings.push(fittings);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// })
|
|
|
-
|
|
|
-
|
|
|
+ $("#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);
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1943,14 +1922,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(){
|
|
@@ -1998,9 +2009,7 @@
|
|
|
if(customerSourceType == 3){
|
|
|
var customerSourceOld = $("#customerSourceOld").val();
|
|
|
if(customerSourceOld == null || customerSourceOld == "" || typeof(customerSourceOld)=="undefined"){
|
|
|
-
|
|
|
vailErrorMsg($("#customerSourceOld"),"未填写来源入口");
|
|
|
-
|
|
|
return false;
|
|
|
}else{
|
|
|
$("#customerSource").val(customerSourceOld);
|
|
@@ -2172,6 +2181,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 > 16 && visitTimeSelect == 3) {
|
|
|
+ vailErrorMsg($("#datemin"),"该时间已超过当前时间,请重新选择回访时间!");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
return true;
|
|
|
}
|
|
|
|