|
@@ -434,15 +434,10 @@ function initProcessResult(procMethodIsBack,procMethodIsSend){
|
|
|
allCustomerInfoType = $("input[name='customerCounselType']:checked").val();
|
|
|
}
|
|
|
|
|
|
+ otherHied(); //全部隐藏
|
|
|
+
|
|
|
if(allCustomerInfoType == 1){ //售前
|
|
|
- $("#renewed").hide();
|
|
|
- $("#maintain").hide();
|
|
|
- $("#reissue").hide();
|
|
|
- $("#backGoods").hide();
|
|
|
- $("#noReasonBack").hide();
|
|
|
$("#customerCostsDiv").hide();
|
|
|
- $("#sendInformationTitle").hide();
|
|
|
- otherHied();
|
|
|
}else if(allCustomerInfoType == 2){ //售后
|
|
|
$("#customerCostsDiv").hide();
|
|
|
if(!isInitSendAddressSms){
|
|
@@ -465,7 +460,6 @@ function initProcessResult(procMethodIsBack,procMethodIsSend){
|
|
|
$("#TDScollect").show();
|
|
|
|
|
|
if((procMethodIsBack == 2 && procMethodIsSend == 2) || isNeedSelectOrder == 2){ //不需要寄回,不需要寄出就是 已解决,未解决
|
|
|
- otherHied();
|
|
|
visitByType(1);
|
|
|
}
|
|
|
|
|
@@ -474,29 +468,21 @@ function initProcessResult(procMethodIsBack,procMethodIsSend){
|
|
|
$("#customerCostsDiv").hide(); //工厂报价
|
|
|
}
|
|
|
|
|
|
- if((procMethodIsBack == 1 || procMethodIsSend == 1) && isNeedSelectOrder == 1){ //是否需要寄回 1:需要寄回 2:不需要寄回
|
|
|
- // result = isSolve.renewed;
|
|
|
- // resultProductTableTitle = isSolveTitleMsg.renewed;
|
|
|
- // $("#relationProduct").html(""); //寄回产品
|
|
|
- $("#processResultStatus").show();
|
|
|
- $("#orderHead").show();
|
|
|
- $("#order").show();
|
|
|
- $("#renewedProduct").show();
|
|
|
- $("#sendAddressInfo").show();
|
|
|
- $("#sendAddressByPhone").show();
|
|
|
- $("#updateProduct").show(); //换新产品
|
|
|
+ if((procMethodIsBack == 1 || procMethodIsSend == 1) && isNeedSelectOrder == 1){ //是否有订单
|
|
|
+ if(procMethodIsBack == 1 ){ //需要寄回
|
|
|
+ $(".renewedProduct").show();
|
|
|
+ }
|
|
|
+ if(procMethodIsSend == 1){ //需要寄出
|
|
|
+ $(".updateProduct").show();
|
|
|
+ }
|
|
|
+ //订单信息
|
|
|
+ $(".orderHead").show();
|
|
|
+ $(".sendAddressInfo").show();
|
|
|
$("#postageAccount").show(); //邮费转账账户
|
|
|
- $("#sendInformationTitle").show();
|
|
|
- $("#sendAddressSmsHtml").show();
|
|
|
|
|
|
//地址信息
|
|
|
- $("#recipientInfoTitle").show();
|
|
|
- $("#recipientInfo").show();
|
|
|
- $("#recipientAddress").show();
|
|
|
- $("#recipientAddressText").show();
|
|
|
- $("#renewedProduct").show();
|
|
|
- $("#updateProduct").show();
|
|
|
- //地址信息
|
|
|
+ $(".recipientInfo").show();
|
|
|
+ $(".recipientAddress").show();
|
|
|
|
|
|
visitByType(2); //需要回访
|
|
|
if(customerInfoType == 1){
|
|
@@ -508,44 +494,16 @@ function initProcessResult(procMethodIsBack,procMethodIsSend){
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- // 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;
|
|
|
- // }
|
|
|
-
|
|
|
- // 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);
|
|
|
-
|
|
|
- // opentionSelectOrderDiv();
|
|
|
}
|
|
|
|
|
|
/*已解决|未解决 */
|
|
|
function otherHied(customerInfoType){
|
|
|
- // $("#salesChannelsSelect").show(); //展示销售公司
|
|
|
- // $("#TDScollect").show();
|
|
|
- // $("#TDScollectShow").show();
|
|
|
-
|
|
|
- $("#processResultStatus").hide(); //处理结果的执行状态 已解决未解决没有该信息
|
|
|
- $("#orderHead").hide();
|
|
|
- $("#order").hide();
|
|
|
- $("#recipientInfo").hide();
|
|
|
- $("#recipientInfoTitle").hide();
|
|
|
- $("#recipientAddress").hide();
|
|
|
- $("#recipientAddressText").hide();
|
|
|
- $("#renewedProduct").hide();
|
|
|
- $("#sendAddressInfo").hide();
|
|
|
- $("#sendAddressByPhone").hide();
|
|
|
- $("#updateProduct").hide();
|
|
|
- $("#sendInformationTitle").hide();
|
|
|
+ $(".orderHead").hide();
|
|
|
+ $(".recipientInfo").hide();
|
|
|
+ $(".recipientAddress").hide();
|
|
|
+ $(".sendAddressInfo").hide();
|
|
|
+ $(".renewedProduct").hide();
|
|
|
+ $(".updateProduct").hide();
|
|
|
}
|
|
|
|
|
|
/*初始化问题大类*/
|
|
@@ -993,7 +951,6 @@ function setSelectOrder(orderId){
|
|
|
$("#storeId").val(storeId);
|
|
|
$("#ids").val(orderId);
|
|
|
getCompany();
|
|
|
-
|
|
|
layer.close(index);
|
|
|
},
|
|
|
error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
@@ -1188,14 +1145,7 @@ function setProduce(orderItemList) {
|
|
|
var colorHtml = '';
|
|
|
for(var k=0;k<orderItemList.length;k++){
|
|
|
var item = orderItemList[k];
|
|
|
- var fiHidden = "";
|
|
|
- var fiHtml = "";
|
|
|
- if(item.itemIsSource == 1){
|
|
|
- fiHidden = "text"
|
|
|
- }else{
|
|
|
- fiHidden = "hidden"
|
|
|
- fiHtml = "-"
|
|
|
- }
|
|
|
+ var fiHtml = "-";
|
|
|
colorHtml += '<tr >'
|
|
|
+ '<td style="text-align: center;" >' + item.itemProductName + '</td>'
|
|
|
+ '<td style="text-align: center;" >' + item.itemProductColor + '</td>'
|
|
@@ -1204,14 +1154,24 @@ function setProduce(orderItemList) {
|
|
|
+ '<input type="hidden" class="input-produce-id" value="' + item.itemProductId + '">'
|
|
|
+ '<input type="hidden" class="input-fc-id" value="' + item.itemColorId +'">'
|
|
|
+ '<input type="hidden" class="input-69code" value="' + item.itemColorBar +'">'
|
|
|
- + fiHtml
|
|
|
- + '<input type="'+ fiHidden +'" class="input-text input-number input-code" style="width: 100%;border: none;text-align: center;" value="" placeholder="机器编号" name="" id="item-' + item.itemProductId + '-' + item.itemColorId +'" number="'+ item.itemNum +'" " onkeyup="keyFunString($(this),30)" onpaste="keyFunString($(this),30)" >'
|
|
|
+ + '<input type="" class="input-text input-number input-code" style="width: 100%;border: none;text-align: center;" value="" placeholder="机器编号" name="" id="item-' + item.itemProductId + '-' + item.itemColorId +'" number="'+ item.itemNum +'" " onkeyup="keyFunString($(this),30)" onpaste="keyFunString($(this),30)" >'
|
|
|
+ '</td>'
|
|
|
+ + '<td style="text-align: center;" ><a href="javascript:void(0)" onclick="delColor(this)" >删除</a></td>'
|
|
|
+ '</tr>';
|
|
|
}
|
|
|
- $("#addProduct").html(colorHtml);
|
|
|
- // setBackProduct(html); //设置寄回产品
|
|
|
- //monitorProduct(); //监听产品变化
|
|
|
+ if(allProcMethodIsBack == 1 ){ //需要寄回
|
|
|
+ $("#addBackProduct").html(colorHtml);
|
|
|
+ }
|
|
|
+ if(allProcMethodIsSend == 1){ //需要寄出
|
|
|
+ $("#addSendProduct").html(colorHtml);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 删除颜色
|
|
|
+ */
|
|
|
+function delColor(node) {
|
|
|
+ $(node).parent().parent().remove();
|
|
|
}
|
|
|
|
|
|
/*获取产品*/
|
|
@@ -1255,37 +1215,6 @@ function getProduceFittings(productId){
|
|
|
return produceFittings;
|
|
|
}
|
|
|
|
|
|
-// /*监听产品变化 -- 暂时不用
|
|
|
-// */
|
|
|
-// function monitorProduct(){
|
|
|
-// /*产品数量*/
|
|
|
-// $("#addProduct").find(".input-color-number").blur(function (){
|
|
|
-// setBackProduct();
|
|
|
-// })
|
|
|
-// /*产品配件*/
|
|
|
-// $("#addProduct").find(".input-fittings-number").blur(function (){
|
|
|
-// setBackProduct();
|
|
|
-// })
|
|
|
-// }
|
|
|
-
|
|
|
-/*设置寄回产品 -- 暂时不用 */
|
|
|
-// function setBackProduct(html) {
|
|
|
-// if(html != null && html != "" && typeof(html) != "undefined"){
|
|
|
-// $("#back-product").html(html);
|
|
|
-// }else{
|
|
|
-// $("#addProduct").find(".input-color-number").each(function(){
|
|
|
-// var number = $(this).val();
|
|
|
-// var colorNodeId = $(this).attr("id");
|
|
|
-// $("#back-product").find("#"+colorNodeId).val(number);
|
|
|
-// })
|
|
|
-// $("#addProduct").find(".input-fittings-number").each(function(){
|
|
|
-// var number = $(this).val();
|
|
|
-// var fittingsNodeId = $(this).attr("id");
|
|
|
-// $("#back-product").find("#"+fittingsNodeId).val(number);
|
|
|
-// })
|
|
|
-// }
|
|
|
-// }
|
|
|
-
|
|
|
/*设置TDS收集信息*/
|
|
|
function setTDSCollect(){
|
|
|
var TDSArea = $("#TDSArea").find("option:selected").text();
|
|
@@ -1402,24 +1331,22 @@ function opentionSelectOrder(){
|
|
|
/**
|
|
|
* 展示订单
|
|
|
*/
|
|
|
-function opentionSelectOrderDiv(){
|
|
|
- if(isNeedSelectOrder == 2 || (allProcMethodIsBack == 2 && allProcMethodIsSend == 2) ){ //不展示
|
|
|
- $("#orderHead").hide();
|
|
|
- $("#order").hide();
|
|
|
- $("#renewedProduct").hide();
|
|
|
- $("#updateProduct").hide();
|
|
|
- }else{ //展示
|
|
|
- $("#orderHead").show();
|
|
|
- $("#order").show();
|
|
|
- if(allProcMethodIsBack == 1){
|
|
|
- $("#renewedProduct").show();
|
|
|
- $("#updateProduct").show();
|
|
|
- }else{
|
|
|
- $("#renewedProduct").hide();
|
|
|
- $("#updateProduct").hide();
|
|
|
- }
|
|
|
- }
|
|
|
-};
|
|
|
+// function opentionSelectOrderDiv(){
|
|
|
+// if(isNeedSelectOrder == 2 || (allProcMethodIsBack == 2 && allProcMethodIsSend == 2) ){ //不展示
|
|
|
+// $(".orderHead").hide();
|
|
|
+// $(".renewedProduct").hide();
|
|
|
+// $(".updateProduct").hide();
|
|
|
+// }else{ //展示
|
|
|
+// $(".orderHead").show();
|
|
|
+// if(allProcMethodIsBack == 1){
|
|
|
+// $(".renewedProduct").show();
|
|
|
+// $(".updateProduct").show();
|
|
|
+// }else{
|
|
|
+// $(".renewedProduct").hide();
|
|
|
+// $(".updateProduct").hide();
|
|
|
+// }
|
|
|
+// }
|
|
|
+// };
|
|
|
|
|
|
/*===============================客诉提交 -- start -- =============================== */
|
|
|
$(function(){
|
|
@@ -1554,10 +1481,24 @@ function addCustomerReady(){
|
|
|
|
|
|
/* --- 类型:售后 处理结果:维修/换新/补发/退货/无理由退货 -- 处理产品 start---- */
|
|
|
if(isNeedSelectOrder == 1 && (allProcMethodIsBack == 1 || allProcMethodIsSend == 1 ) ) { //需要订单
|
|
|
- var sendProdcues = new Array(); //寄出产品表
|
|
|
+ // 寄回
|
|
|
var closedProdcues = new Array(); //获取寄回,寄出直接复制寄回
|
|
|
+ $("#addBackProduct").find(".input-code").each(function () {
|
|
|
+ var machineNo = $(this).val(); //机器编号
|
|
|
+ var number = $(this).parents("tr").find(".input-itemNum").eq(0).val(); //数量
|
|
|
+ if (number != null && number != "" && number != 0) {
|
|
|
+ var product = new Object();
|
|
|
+ product.colorBar = $(this).parent().find(".input-69code").val();
|
|
|
+ product.sendProdcueNumber = number;
|
|
|
+ product.closedProdcueNumber = number;
|
|
|
+ product.closedProdcueMachineNo = machineNo;
|
|
|
+ closedProdcues.push(product);
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
- $("#addProduct").find(".input-code").each(function () {
|
|
|
+ //寄出
|
|
|
+ var sendProdcues = new Array(); //寄出产品表
|
|
|
+ $("#addSendProduct").find(".input-code").each(function () {
|
|
|
var machineNo = $(this).val(); //机器编号
|
|
|
var number = $(this).parents("tr").find(".input-itemNum").eq(0).val(); //数量
|
|
|
if (number != null && number != "" && number != 0) {
|
|
@@ -1566,14 +1507,9 @@ function addCustomerReady(){
|
|
|
product.sendProdcueNumber = number;
|
|
|
product.closedProdcueNumber = number;
|
|
|
product.closedProdcueMachineNo = machineNo;
|
|
|
- if (allProcMethodIsBack == 1 ){
|
|
|
- closedProdcues.push(product);
|
|
|
- }
|
|
|
- if (allProcMethodIsSend == 1 ){
|
|
|
- sendProdcues.push(product);
|
|
|
- }
|
|
|
+ sendProdcues.push(product);
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
$("#sendProdcues").val(JSON.stringify(sendProdcues));
|
|
|
$("#closedProdcues").val(JSON.stringify(closedProdcues));
|
|
|
}
|
|
@@ -1722,4 +1658,75 @@ function selectOnCustomer() {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-/*根据客户信息查询老的客诉---end--*/
|
|
|
+/*根据客户信息查询老的客诉---end--*/
|
|
|
+
|
|
|
+/**
|
|
|
+ * 添加产品
|
|
|
+ */
|
|
|
+function addProduct(type) {
|
|
|
+ productAddType = type;
|
|
|
+ layer_show("商品列表",url_path + "/admin/salesOrder/to_add_product","1000","500");
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 选择商品回调
|
|
|
+ * @param colorIds
|
|
|
+ */
|
|
|
+function setSelectProduct(colorIds){
|
|
|
+ var index = layer.load(1, {
|
|
|
+ shade: [0.5,'#fff'] //0.1透明度的白色背景
|
|
|
+ });
|
|
|
+
|
|
|
+ var colorIdArray = colorIds.split("_");
|
|
|
+ for(var i=0;i<colorIdArray.length;i++){
|
|
|
+ var colorId = colorIdArray[i];
|
|
|
+ if(colorId == ""){
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ var flag = true;
|
|
|
+ $("#add_product").find("tr").each(function (){
|
|
|
+ var colId = $(this).find(".color_id").eq(0).val();
|
|
|
+ if(colId == colorId){
|
|
|
+ flag = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if(!flag){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ data: { colorId : colorId},
|
|
|
+ url: url_path +"/admin/product/get_product",
|
|
|
+ success: function(data){
|
|
|
+ var html = "";
|
|
|
+ if (data.returnCode == 200 && data.returnMsg.productColorList.length > 0 ) {
|
|
|
+ for(var i=0;i<data.returnMsg.productColorList.length;i++){
|
|
|
+ var productColor = data.returnMsg.productColorList[i];
|
|
|
+ html += '<tr >'
|
|
|
+ + '<td style="text-align: center;" >' + cufte(productColor.productName) + '</td>'
|
|
|
+ + '<td style="text-align: center;" >' + cufte(productColor.colorName) + '</td>'
|
|
|
+ + '<td style="text-align: center;"><input type="text" style="width: 100%;border: none;text-align: center;" class="input-text input-number input-itemNum" value="1" placeholder="产品数量" onkeyup="keyFun($(this),999,1)" onpaste="keyFun($(this),999,1)"></td>'
|
|
|
+ + '<td style="text-align: center;" >'
|
|
|
+ + '<input type="hidden" class="input-produce-id" value="' + productColor.colorProductId + '">'
|
|
|
+ + '<input type="hidden" class="input-fc-id" value="' + productColor.colorId +'">'
|
|
|
+ + '<input type="hidden" class="input-69code" value="' + productColor.colorBar +'">'
|
|
|
+ + '<input type="" class="input-text input-number input-code" style="width: 100%;border: none;text-align: center;" value="" placeholder="机器编号" name="" id="item-' + productColor.colorProductId + '-' + productColor.colorId +'" number="1" " onkeyup="keyFunString($(this),30)" onpaste="keyFunString($(this),30)" >'
|
|
|
+ + '</td>'
|
|
|
+ + '<td style="text-align: center;" ><a href="javascript:void(0)" onclick="delColor(this)" >删除</a></td>'
|
|
|
+ + '</tr>';
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ layer.msg("添加产品失败!", {icon: 5, time: 3000});
|
|
|
+ }
|
|
|
+ if(productAddType == 2){
|
|
|
+ $("#addSendProduct").append(html);
|
|
|
+ }else if(productAddType == 1){
|
|
|
+ $("#addBackProduct").append(html);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ layer.close(index);
|
|
|
+}
|