|
@@ -183,31 +183,31 @@
|
|
|
<label class="form-label col-1 col-sm-1"></label>
|
|
|
<div class="formControls col-10 col-sm-10 skin-minimal">
|
|
|
<div class="radio-box">
|
|
|
- <input type="radio" id="a-7" name="bbb">
|
|
|
+ <input type="radio" id="a-7" value="1" name="customerIsSolve" checked>
|
|
|
<label for="a-7">已解决</label>
|
|
|
</div>
|
|
|
<div class="radio-box">
|
|
|
- <input type="radio" id="a-7" name="bbb">
|
|
|
+ <input type="radio" id="a-7" value="2" name="customerIsSolve">
|
|
|
<label for="a-7">未解决</label>
|
|
|
</div>
|
|
|
<div class="radio-box">
|
|
|
- <input type="radio" id="a-7" name="bbb">
|
|
|
+ <input type="radio" id="a-7" value="3" name="customerIsSolve">
|
|
|
<label for="a-7">换新</label>
|
|
|
</div>
|
|
|
<div class="radio-box">
|
|
|
- <input type="radio" id="a-7" name="bbb">
|
|
|
+ <input type="radio" id="a-7" value="4" name="customerIsSolve">
|
|
|
<label for="a-7">维修</label>
|
|
|
</div>
|
|
|
<div class="radio-box">
|
|
|
- <input type="radio" id="a-7" name="bbb">
|
|
|
+ <input type="radio" id="a-7" value="5" name="customerIsSolve">
|
|
|
<label for="a-7">补发</label>
|
|
|
</div>
|
|
|
<div class="radio-box">
|
|
|
- <input type="radio" id="a-7" name="bbb">
|
|
|
+ <input type="radio" id="a-7" value="6" name="customerIsSolve">
|
|
|
<label for="a-7">退货</label>
|
|
|
</div>
|
|
|
<div class="radio-box">
|
|
|
- <input type="radio" id="a-7" name="bbb">
|
|
|
+ <input type="radio" id="a-7" value="7" name="customerIsSolve">
|
|
|
<label for="a-7">无理由退货</label>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -289,9 +289,7 @@
|
|
|
</select>
|
|
|
</span>
|
|
|
</div>
|
|
|
- <div class="formControls col-1 col-sm-1">
|
|
|
- <button type="button" class="btn btn-primary">修改收货地址</button>
|
|
|
- </div>
|
|
|
+
|
|
|
</div>
|
|
|
<div class="row cl">
|
|
|
<label class="form-label col-1 col-sm-1"></label>
|
|
@@ -302,16 +300,14 @@
|
|
|
</div>
|
|
|
<div class="row cl">
|
|
|
<label class="form-label col-1 col-sm-1"><span class="c-red">*</span>换新产品:</label>
|
|
|
- <div class="formControls col-10 col-sm-10">
|
|
|
- <div class="skin-minimal">
|
|
|
+ <div class="formControls col-10 col-sm-10" id="produceSelect">
|
|
|
+ <#--<div class="skin-minimal">
|
|
|
<div class="check-box">
|
|
|
<input type="checkbox" id="checkbox-1" checked>
|
|
|
- <label for="checkbox-1">净水机</label>
|
|
|
- <select name="" class="select" style="width: 100px;">
|
|
|
- <option value="0">WX-12</option>
|
|
|
- <option value="1">WX-13</option>
|
|
|
- </select>
|
|
|
|
|
|
+ <label for="checkbox-1">净水机</label> -
|
|
|
+
|
|
|
+ <label for="checkbox-1">净水机</label>
|
|
|
|
|
|
<select name="" class="select" style="width: 100px;">
|
|
|
<option value="0">黑色</option>
|
|
@@ -320,7 +316,6 @@
|
|
|
<input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">
|
|
|
</div>
|
|
|
|
|
|
-
|
|
|
<div class="check-box">
|
|
|
<input type="checkbox" id="checkbox-2" checked>
|
|
|
<label for="checkbox-2">水箱</label>
|
|
@@ -336,7 +331,14 @@
|
|
|
<label for="checkbox-2">T2</label>
|
|
|
<input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div>-->
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div class="row cl">
|
|
|
+ <label class="form-label col-1 col-sm-1"></label>
|
|
|
+ <div class="formControls col-1 col-sm-1">
|
|
|
+ <button type="button" class="btn btn-primary">添加产品</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
@@ -387,10 +389,12 @@
|
|
|
</div>
|
|
|
</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-7 col-sm-7">
|
|
|
- <div class="update-parts">更换:<span>红色净水机(wx-1)x 1台</span><span>水箱 x 1件</span><span>t1 x 1件</span><span>t2 x 1件</span></div>
|
|
|
+ <div class="update-parts" style="margin-bottom: 10px;"><span>红色净水机(wx-1)x 1台</span><span>水箱 x 1件</span><span>t1 x 1件</span><span>t2 x 1件</span></div>
|
|
|
+ <div class="update-parts" style="margin-bottom: 10px;"><span>红色净水机(wx-1)x 1台</span><span>水箱 x 1件</span><span>t1 x 1件</span><span>t2 x 1件</span></div>
|
|
|
</div>
|
|
|
+
|
|
|
</div>
|
|
|
<div class="row cl">
|
|
|
<label class="form-label col-1 col-sm-1"><span class="c-red">*</span>处理描述:</label>
|
|
@@ -506,15 +510,18 @@
|
|
|
|
|
|
/*处理结果的执行状态*/
|
|
|
var isSolve = {
|
|
|
- solved : {},
|
|
|
- noSolved : {},
|
|
|
- renewed : {"录入客诉","督促用户寄回","录入快递单号","仓库收货","换新发货","发货通知用户","收货后回访"},
|
|
|
- maintain : {"录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","产线维修","换新发货","发货通知用户","收货后回访"},
|
|
|
- reissue : {"录入客诉","生成E订单","督促仓库发货","仓库发货","发货通知用户","收货后回访"},
|
|
|
- backGoods :{"录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","退款","退货完成"},
|
|
|
- noReasonBack :{"录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","退款","退货完成"}
|
|
|
+ solved : [],
|
|
|
+ noSolved : [],
|
|
|
+ renewed : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","换新发货","发货通知用户","收货后回访"],
|
|
|
+ maintain : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","产线维修","换新发货","发货通知用户","收货后回访"],
|
|
|
+ reissue : ["录入客诉","生成E订单","督促仓库发货","仓库发货","发货通知用户","收货后回访"],
|
|
|
+ backGoods : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","退款","退货完成"],
|
|
|
+ noReasonBack : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","退款","退货完成"]
|
|
|
}
|
|
|
|
|
|
+ /*全局标识当前状态 type : 1 :已解决 2:未解决 3:换新 4:维修 5:补发 6:退货 7:无理由退货*/
|
|
|
+ var allCustomerType = 1;
|
|
|
+
|
|
|
/*初始化页面参数*/
|
|
|
$(function () {
|
|
|
|
|
@@ -524,12 +531,18 @@
|
|
|
/*初始化客服*/
|
|
|
initSysAdmin();
|
|
|
|
|
|
- /*初始化产品类型*/
|
|
|
+ /*初始化产品类型 -- 客诉头部的产品类型单选 */
|
|
|
initProduceType();
|
|
|
|
|
|
- /*初始化选择处理结果*/
|
|
|
+ /*初始化选择处理结果 -- type : 1 :已解决 2:未解决 3:换新 4:维修 5:补发 6:退货 7:无理由退货 */
|
|
|
initProcessResult(1);
|
|
|
|
|
|
+ /*监听处理结果选择事件*/
|
|
|
+ $("[name='customerIsSolve']").change(function(){
|
|
|
+ initProcessResult(parseInt($(this).val()));
|
|
|
+ allCustomerType = parseInt($(this).val());
|
|
|
+ })
|
|
|
+
|
|
|
/*监听问题类型 选择事件*/
|
|
|
$("[name='complaintId']").change(function(){
|
|
|
initComplaintSmallClassInfo($(this).val());
|
|
@@ -559,12 +572,18 @@
|
|
|
});
|
|
|
|
|
|
/* 初始化单选框样式 */
|
|
|
+ initCheck();
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+ /*初始化单选框样式*/
|
|
|
+ function initCheck(){
|
|
|
$('.skin-minimal input').iCheck({
|
|
|
checkboxClass: 'icheckbox-blue',
|
|
|
radioClass: 'iradio-blue',
|
|
|
increaseArea: '20%'
|
|
|
});
|
|
|
- })
|
|
|
+ }
|
|
|
|
|
|
/*初始化客服*/
|
|
|
function initSysAdmin() {
|
|
@@ -595,7 +614,7 @@
|
|
|
$("#adminId").html(html);
|
|
|
}
|
|
|
|
|
|
- /*初始化产品类型*/
|
|
|
+ /*初始化产品类型 -- 客诉头部的产品类型单选*/
|
|
|
function initProduceType(){
|
|
|
var html = "";
|
|
|
$.ajax({
|
|
@@ -627,29 +646,53 @@
|
|
|
|
|
|
/**
|
|
|
* 选择处理结果-- 默认选择已解决
|
|
|
- * type : 0 :已解决 1:未解决 2:换新 3:维修 4:补发 5:退货 6:无理由退货
|
|
|
+ * type : 1 :已解决 2:未解决 3:换新 4:维修 5:补发 6:退货 7:无理由退货
|
|
|
*/
|
|
|
function initProcessResult(type){
|
|
|
if(type == null || type == ""){
|
|
|
- type = 0;
|
|
|
+ type = 1;
|
|
|
}
|
|
|
- var statusHtml = ' <li><span class="arrow"></span><div class="number">status_index</div><div>status_html</div></li>';
|
|
|
+ var statusHtml = '<li><span class="arrow"></span><div class="number">status_index</div><div>status_html</div></li>';
|
|
|
var resultHtml = '';
|
|
|
+ var result = {};
|
|
|
switch(type)
|
|
|
{
|
|
|
- case 0:
|
|
|
- $("#processResultStatus").hide();
|
|
|
- break;
|
|
|
case 1:
|
|
|
$("#processResultStatus").hide();
|
|
|
break;
|
|
|
case 2:
|
|
|
- resultHtml
|
|
|
- isSolve();
|
|
|
+ $("#processResultStatus").hide();
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ result = isSolve.renewed;
|
|
|
+ $("#processResultStatus").show();
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ result = isSolve.maintain;
|
|
|
+ $("#processResultStatus").show();
|
|
|
+ break;
|
|
|
+ case 5:
|
|
|
+ result = isSolve.reissue;
|
|
|
+ $("#processResultStatus").show();
|
|
|
+ break;
|
|
|
+ case 6:
|
|
|
+ result = isSolve.backGoods;
|
|
|
+ $("#processResultStatus").show();
|
|
|
+ break;
|
|
|
+ case 7:
|
|
|
+ result = isSolve.noReasonBack;
|
|
|
+ $("#processResultStatus").show();
|
|
|
break;
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
+
|
|
|
+ for(var i=0;i< result.length;i++){
|
|
|
+ var html = statusHtml.replace("status_index",i+1);
|
|
|
+ html = html.replace("status_html",result[i]);
|
|
|
+ resultHtml += html;
|
|
|
+ }
|
|
|
+
|
|
|
$("#processResultStatus").html(resultHtml);
|
|
|
}
|
|
|
|
|
@@ -771,7 +814,7 @@
|
|
|
function setSelectOrder(orderId){
|
|
|
var html = '';
|
|
|
var address = ''; //地址
|
|
|
- var produceList = {};
|
|
|
+ var orderItemList = {};
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
data: {
|
|
@@ -786,7 +829,7 @@
|
|
|
|
|
|
var productsHtml = '';
|
|
|
var salesOrderItem = salesOrder.salesOrderItemList;
|
|
|
- produceList = salesOrder.salesOrderItemList;
|
|
|
+ orderItemList = salesOrder.salesOrderItemList;
|
|
|
for(var j=0;j<salesOrderItem.length;j++){
|
|
|
var item = salesOrderItem[j].itemProductName + "*" + salesOrderItem[j].itemNum;
|
|
|
if(j==0){
|
|
@@ -822,9 +865,7 @@
|
|
|
});
|
|
|
$("#addressInfo").val(address);
|
|
|
setAdress(); //显示地址
|
|
|
-
|
|
|
- setProduce(produceList); //显示产品
|
|
|
-
|
|
|
+ setProduce(orderItemList); //显示产品
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -966,9 +1007,155 @@
|
|
|
* 展示产品
|
|
|
* @param produceList
|
|
|
*/
|
|
|
- function setProduce(produceList) {
|
|
|
-
|
|
|
+ function setProduce(orderItemList) {
|
|
|
+ var html = "";
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ data: {
|
|
|
+ },
|
|
|
+ url: "${path}/admin/customer/select_produce",
|
|
|
+ async: false,
|
|
|
+ success: function(data){
|
|
|
+ if (data.returnCode == 200) {
|
|
|
+ for(var i=0;i<data.returnMsg.productList.length;i++){
|
|
|
+ var product = data.returnMsg.productList[i]; //所有产品
|
|
|
+ var produceFittings = getProduceFittings(product.productId); //获取该产品的所有配件
|
|
|
+ var colorList = product.colorList; //该产品的所有颜色
|
|
|
+
|
|
|
+ var isColorSelect = false;
|
|
|
+ var selectColor = new Array(); //颜色选择html和颜色数量对应 对象
|
|
|
+ if(colorList != null){
|
|
|
+ for(var m=0;m<orderItemList.length;m++){
|
|
|
+ var colorNumber = 1;
|
|
|
+ var colorHtml = '';
|
|
|
+ for(var j=0;j<colorList.length;j++){
|
|
|
+ var colors = {};
|
|
|
+ if(colorList[j].colorId == orderItemList[m].itemColorId){
|
|
|
+ colorHtml += '<option value="'+ colorList[j].colorId +'" selected>'+ colorList[j].colorName +'</option>';
|
|
|
+ isColorSelect = true;
|
|
|
+ colorNumber = orderItemList[m].itemNum;
|
|
|
+ }else{
|
|
|
+ colorHtml += '<option value="'+ colorList[j].colorId +'">'+ colorList[j].colorName +'</option>';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ colors.colorNumber = colorNumber;
|
|
|
+ colors.colorHtml = colorHtml;
|
|
|
+ selectColor.push(colors);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ var fittingsHtml = '';
|
|
|
+ if(produceFittings != null){
|
|
|
+ for(var k=0;k<produceFittings.length;k++){
|
|
|
+ fittingsHtml += '<div class="check-box">' +
|
|
|
+ '<input type="checkbox" id="checkbox-2" name="ck-produce-fittings" value="'+ produceFittings[k].fittingsId +'">' +
|
|
|
+ '<label for="checkbox-2">'+ produceFittings[k].fittingsName +'</label>' +
|
|
|
+ '<input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="produceFittings">' +
|
|
|
+ '</div>';
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ var isChecked = '';
|
|
|
+ if(isColorSelect){
|
|
|
+ isChecked = 'checked';
|
|
|
+ }
|
|
|
+ for(var f=0;f<selectColor.length;f++){
|
|
|
+ html += '<div class="skin-minimal">' +
|
|
|
+ ' <div class="check-box">' +
|
|
|
+ ' <input type="checkbox" name="ck-produce" id="checkbox-'+ i +'" '+ isChecked +'>' +
|
|
|
+ '' +
|
|
|
+ ' <label for="checkbox-'+ i +'" name="produceName">'+ convertUndefinedToEmpty(product.typeName) +'</label> -' +
|
|
|
+ ' <input type="hidden" name="productType" value="">' +
|
|
|
+ '' +
|
|
|
+ ' <label for="checkbox-'+ i +'">'+ convertUndefinedToEmpty(product.productName) +'</label>' +
|
|
|
+ ' <input type="hidden" name="productId" value="">' +
|
|
|
+ '' +
|
|
|
+ ' <select class="select colorId" name="colorId" style="width: 100px;">' +
|
|
|
+ selectColor[f].colorHtml +
|
|
|
+ ' </select>' +
|
|
|
+ ' <input type="text" class="input-text" style="width: 40px;text-align: center;" value="'+ selectColor[f].colorNumber +'" placeholder="" id="" name="produceNumber">' +
|
|
|
+ ' </div>' +
|
|
|
+ fittingsHtml +
|
|
|
+ ' </div>';
|
|
|
+
|
|
|
+ if(!isColorSelect){
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ html = '';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $("#produceSelect").html(html);
|
|
|
+
|
|
|
+ initCheck(); //因为需要展示产品,所以再次初始化多选框
|
|
|
+
|
|
|
+ setBackProduct(); //设置寄回产品
|
|
|
+
|
|
|
+ monitorProduct(); //监听产品变化
|
|
|
+ }
|
|
|
+
|
|
|
+ /*获取产品配件*/
|
|
|
+ function getProduceFittings(productId){
|
|
|
+ var produceFittings;
|
|
|
+ $.ajax({
|
|
|
+ type: "get",
|
|
|
+ data: {
|
|
|
+ productId : productId
|
|
|
+ },
|
|
|
+ url: "${path}/admin/customer/select_produce_fittings",
|
|
|
+ async: false,
|
|
|
+ success: function(data){
|
|
|
+ if (data.returnCode == 200) {
|
|
|
+ produceFittings = data.returnMsg.produceFittingsList;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return produceFittings;
|
|
|
+ }
|
|
|
+
|
|
|
+ /*监听产品变化*/
|
|
|
+ function monitorProduct(){
|
|
|
+ /*产品的多选框*/
|
|
|
+ $("#produceSelect").find("input[name='ck-produce']").change(function (){
|
|
|
+ setBackProduct();
|
|
|
+ })
|
|
|
+ /*选择产品颜色*/
|
|
|
+ $("#produceSelect").find(".colorId").change(function (){
|
|
|
+ setBackProduct();
|
|
|
+ })
|
|
|
+ /*产品数量*/
|
|
|
+ $("#produceSelect").find("input[name='produceNumber']").blur(function (){
|
|
|
+ setBackProduct();
|
|
|
+ })
|
|
|
+ /*配件数量*/
|
|
|
+ $("#produceSelect").find("input[name='produceFittings']").blur(function (){
|
|
|
+ setBackProduct();
|
|
|
+ })
|
|
|
+ /*配件多选框*/
|
|
|
+ $("#produceSelect").find("input[name='ck-produce-fittings']").click(function (){
|
|
|
+ setBackProduct();
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ /*设置寄回产品*/
|
|
|
+ function setBackProduct() {
|
|
|
+ $("#produceSelect").find(".skin-minimal").each(function (){
|
|
|
+ var isChecked = $(this).find("input[name='ck-produce']").attr('checked');
|
|
|
+ var produceName = $(this).find("input[name='produceName']").eq(0).html();
|
|
|
+ alert(isChecked + "--" +produceName);
|
|
|
+// if(){
|
|
|
+// html = '<div class="update-parts" style="margin-bottom: 10px;"><span>红色净水机(wx-1)x 1台</span><span>水箱 x 1件</span><span>t1 x 1件</span><span>t2 x 1件</span></div>';
|
|
|
+// }
|
|
|
+ })
|
|
|
}
|
|
|
+
|
|
|
</script>
|
|
|
<!--/请在上方写此页面业务相关的脚本-->
|
|
|
</body>
|