|
@@ -0,0 +1,711 @@
|
|
|
+<!DOCTYPE HTML>
|
|
|
+<html>
|
|
|
+<head>
|
|
|
+ <meta charset="utf-8">
|
|
|
+ <meta name="renderer" content="webkit|ie-comp|ie-stand">
|
|
|
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
|
+ <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
|
|
|
+ <meta http-equiv="Cache-Control" content="no-siteapp" />
|
|
|
+<#include "/base/add_base.ftl">
|
|
|
+ <link href="${path}/common/lib/jquery.ui/jquery-ui.css" rel="stylesheet" type="text/css"/>
|
|
|
+ <link href="${path}/common/lib/webuploader/0.1.5/webuploader.css" rel="stylesheet" type="text/css"/>
|
|
|
+ <link href="${path}/common/lib/icheck/icheck.css" rel="stylesheet" type="text/css"/>
|
|
|
+ <style>
|
|
|
+ .tit{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
|
|
|
+ .tit:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
|
|
|
+ .tit-2{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
|
|
|
+ .tit-2:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
|
|
|
+ #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;}
|
|
|
+
|
|
|
+ #suggest, #suggest2 {width:200px}
|
|
|
+ .gray {color:gray}
|
|
|
+ .ac_results {background:#fff;border:1px solid #7f9db9;position: absolute;z-index: 10000;display: none}
|
|
|
+ .ac_results li a {white-space: nowrap;text-decoration:none;display:block;color:#05a;padding:1px 3px}
|
|
|
+ .ac_results li {border:1px solid #fff}
|
|
|
+ .ac_over, .ac_results li a:hover {background:#c8e3fc}
|
|
|
+ .ac_results li a span {float:right}
|
|
|
+ .ac_result_tip {border-bottom:1px dashed #666;padding:3px}
|
|
|
+
|
|
|
+ .select-box{background: url(${path}/common/images/cm/select-1.png) right center no-repeat;background-size: auto 100%;}
|
|
|
+ .select-box select{-webkit-appearance:none !important;background-color: transparent; appearance:none;padding-right: 25px;}
|
|
|
+ .dalog-ask{position: absolute;left:60%;top:0;-webkit-transform: translateY(-30%);transform: translateY(-30%);display: none;background-color: #fff;z-index: 10;}
|
|
|
+ .tag{ width:300px; min-height:300px; border:1px solid #32a3d8; position:relative;background-color: #fff;line-height: 1.5;padding: 10px 12px;}
|
|
|
+ .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;}
|
|
|
+ .dalog-ask .ask{color: #000;margin: 10px 0 5px 0;}
|
|
|
+ .dalog-ask .answer{color: #666;margin-bottom: 10px;}
|
|
|
+ .dalog-ask .answer:hover{color: #32a3d8;cursor: pointer;}
|
|
|
+ .time-line-list{list-style: none;width: 100%;margin-left: -20px;}
|
|
|
+ .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;}
|
|
|
+ .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%;}
|
|
|
+ .time-line-list>li:before{content:'';position: absolute;height: 1px;width: 30%;right:0;top: 15px; background-color: #32a3d8;}
|
|
|
+ .time-line-list>li:after{content: '';position: absolute;height: 1px;width: 30%;left: 0;top: 15px;background:#32a3d8;}
|
|
|
+ .time-line-list>li:first-child:after,.time-line-list>li:last-child:before{display: none;}
|
|
|
+ .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;}
|
|
|
+ .time-line-list>li:first-child .arrow{display: none;}
|
|
|
+ .table-bg th{background-color: #e2f6ff;}
|
|
|
+ .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #effaff;border: 1px solid #32a3d8;}
|
|
|
+ .my-search-input{padding-left: 30px;background: url(${path}/common/images/cm/search.png) 6px center no-repeat;background-size: auto 60%; }
|
|
|
+ </style>
|
|
|
+ <title>添加客诉 - 客诉管理 - RST</title>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+<nav class="breadcrumb"><i class="Hui-iconfont"></i> 首页
|
|
|
+ <span class="c-gray en">></span> 客诉管理
|
|
|
+ <span class="c-gray en">></span> 添加签收
|
|
|
+ <a class="btn radius r"
|
|
|
+ style="line-height:1.6em;margin-top:3px;background: #32a3d8;color: #fff;border:1px solid #32a3d8;"
|
|
|
+ href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont"></i></a>
|
|
|
+</nav>
|
|
|
+<article class="page-container" style="padding: 10px;">
|
|
|
+ <div class="pd-20 cl">
|
|
|
+ <form action="" method="post" class="form form-horizontal" id="form-article-add">
|
|
|
+ <div class="row cl">
|
|
|
+ <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>签收类型:</label>
|
|
|
+ <div class="radio-box">
|
|
|
+ <input type="radio" id="tel-1" name="signclosedType" datatype="*" checked nullmsg="请选择签收类型!">
|
|
|
+ <label for="tel-1">客诉寄回</label>
|
|
|
+ </div>
|
|
|
+ <div class="radio-box">
|
|
|
+ <input type="radio" id="tel-2" name="signclosedType">
|
|
|
+ <label for="tel-2">代理商退货</label>
|
|
|
+ </div>
|
|
|
+ <div class="radio-box">
|
|
|
+ <input type="radio" id="tel-3" name="signclosedType">
|
|
|
+ <label for="tel-3">其他</label>
|
|
|
+ <input type="text" style="width: 150px;margin-left: 10px;" class="input-text" placeholder="选择其他时有值" id="signclosedTypeName" name="signclosedTypeName">
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div class="row cl">
|
|
|
+ <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>寄回产品:</label>
|
|
|
+ <div class="formControls col-8 col-sm-8 text-c" id="produceSelect">
|
|
|
+ <table class="table table-border table-bg table-bordered">
|
|
|
+ <thead>
|
|
|
+ <tr class="text-c">
|
|
|
+ <th style="text-align: center;" width="100">产品名称</th>
|
|
|
+ <th style="text-align: center;" width="100">产品颜色</th>
|
|
|
+ <th style="text-align: center;" width="100">产品配件</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody id="addProduct">
|
|
|
+ <#if (productList?size > 0)>
|
|
|
+ <#list productList as product>
|
|
|
+ <tr >
|
|
|
+
|
|
|
+
|
|
|
+ <td>${product.productName!''}</td>
|
|
|
+ <td>
|
|
|
+ <#if (product.colorList?size > 0)>
|
|
|
+ <#list product.colorList as colorList>
|
|
|
+ ${colorList.colorName!''}<input type="text" style="width: 50px;margin-left: 10px;" class="input-text" value="" placeholder="数量" id="" name=""><br>
|
|
|
+ </#list>
|
|
|
+ <#else>
|
|
|
+ 暂无颜色,请先添加产品颜色
|
|
|
+ </#if>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <#if (product.fittingsList?size > 0)>
|
|
|
+ <#list product.fittingsList as fittingsList>
|
|
|
+ ${fittingsList.fittingsName!''}<input type="text" style="width: 50px;margin-left: 10px;" class="input-text" value="" placeholder="数量" id="" name=""><br>
|
|
|
+ </#list>
|
|
|
+ <#else>
|
|
|
+ 暂无配件,请先添加配件
|
|
|
+ </#if>
|
|
|
+ </td>
|
|
|
+
|
|
|
+ </tr>
|
|
|
+ </#list>
|
|
|
+ </#if>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="row cl">
|
|
|
+ <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>寄回物流:</label>
|
|
|
+ <div class="formControls col-3 col-sm-3 skin-minimal">
|
|
|
+ <span class="select-box">
|
|
|
+ <select name="signclosedLogistics" class="select">
|
|
|
+ <option value="">请选择物流公司</option>
|
|
|
+ <option value="sto">申通快递</option>
|
|
|
+ <option value="yto">圆通快递</option>
|
|
|
+ <option value="sf">顺丰快递</option>
|
|
|
+ <option value="ems">邮政EMS</option>
|
|
|
+ <option value="zto">中通快递</option>
|
|
|
+ <option value="zjs">宅急送</option>
|
|
|
+ <option value="yunda">韵达快递</option>
|
|
|
+ <option value="cces">cces快递</option>
|
|
|
+ <option value="pick">上门提货</option>
|
|
|
+ <option value="htky">汇通快递</option>
|
|
|
+ <option value="ttkdex">天天快递</option>
|
|
|
+ <option value="stars">星晨急便</option>
|
|
|
+ <option value="jd">京东快递</option>
|
|
|
+ <option value="01">其他</option>
|
|
|
+ <option value="02">上门送货</option>
|
|
|
+ </select>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <input type="text" style="width: 150px;margin-left: 10px;" class="input-text" placeholder="物流单号" id="signclosedLogisticsNumber" name="signclosedLogisticsNumber">
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="row cl">
|
|
|
+ <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>寄件人信息:</label>
|
|
|
+ <div class="formControls col-4 col-sm-4 skin-minimal">
|
|
|
+ <input type="text" style="width: 150px;margin-left: 10px;" class="input-text" placeholder="寄件方姓名/公司名称" id="signclosedSendName" name="signclosedSendName">
|
|
|
+ <input type="text" style="width: 150px;margin-left: 10px;" class="input-text" placeholder="寄件方联系电话" id="signclosedSendTel" name="signclosedSendTel">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="row cl" style="position: relative;">
|
|
|
+ <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>寄件区域:</label>
|
|
|
+ <div class="formControls col-3 col-sm-3 skin-minimal">
|
|
|
+ <span class="select-box">
|
|
|
+ <select name="signclosedAddrProvinces" id="province" class="select">
|
|
|
+
|
|
|
+
|
|
|
+ </select>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div class="formControls col-3 col-sm-3 skin-minimal">
|
|
|
+ <span class="select-box">
|
|
|
+ <select name="signclosedAddrCity" id="city" class="select">
|
|
|
+
|
|
|
+
|
|
|
+ </select>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="row cl" id="renewedProduct">
|
|
|
+ <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>签收产品:</label>
|
|
|
+ <div class="formControls col-8 col-sm-8 text-c" id="produceSelect">
|
|
|
+ <table class="table table-border table-bg table-bordered">
|
|
|
+ <thead>
|
|
|
+ <tr class="text-c">
|
|
|
+ <th style="text-align: center;" width="100">产品名称</th>
|
|
|
+ <th style="text-align: center;" width="100">产品颜色</th>
|
|
|
+ <th style="text-align: center;" width="100">产品配件</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody id="addProduct">
|
|
|
+ <#if (productList?size > 0)>
|
|
|
+ <#list productList as product>
|
|
|
+ <tr >
|
|
|
+
|
|
|
+
|
|
|
+ <td>${product.productName!''}</td>
|
|
|
+ <td>
|
|
|
+ <#if (product.colorList?size > 0)>
|
|
|
+ <#list product.colorList as colorList>
|
|
|
+ ${colorList.colorName!''}<input type="text" style="width: 50px;margin-left: 10px;" class="input-text" value="" placeholder="数量" id="" name=""><br>
|
|
|
+ </#list>
|
|
|
+ <#else>
|
|
|
+ 暂无颜色,请先添加产品颜色
|
|
|
+ </#if>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <#if (product.fittingsList?size > 0)>
|
|
|
+ <#list product.fittingsList as fittingsList>
|
|
|
+ ${fittingsList.fittingsName!''}<input type="text" style="width: 50px;margin-left: 10px;" class="input-text" value="" placeholder="数量" id="" name=""><br>
|
|
|
+ </#list>
|
|
|
+ <#else>
|
|
|
+ 暂无配件,请先添加配件
|
|
|
+ </#if>
|
|
|
+ </td>
|
|
|
+
|
|
|
+ </tr>
|
|
|
+ </#list>
|
|
|
+ </#if>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <div class="row cl">
|
|
|
+ <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>是否少配件:</label>
|
|
|
+ <div class="formControls col-5 col-sm-5 skin-minimal">
|
|
|
+ <div class="radio-box">
|
|
|
+ <input type="radio" id="tel-4" name="signclosedIsFittings" datatype="*" checked >
|
|
|
+ <label for="tel-4">缺少配件</label>
|
|
|
+ </div>
|
|
|
+ <div class="radio-box">
|
|
|
+ <input type="radio" id="tel-5" name="signclosedIsFittings" datatype="*">
|
|
|
+ <label for="tel-5">不缺配件</label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="row cl">
|
|
|
+ <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>签收日期:</label>
|
|
|
+ <div class="formControls col-5 col-sm-5 skin-minimal">
|
|
|
+ <input type="text" style="width: 150px;margin-left: 10px;" class="input-text" placeholder="签收日期" id="signclosedDate" name="signclosedDate">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="row cl">
|
|
|
+ <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>是否品检:</label>
|
|
|
+ <div class="formControls col-5 col-sm-5 skin-minimal">
|
|
|
+ <div class="radio-box">
|
|
|
+ <input type="radio" id="tel-6" name="signclosedIsQuality" datatype="*" checked >
|
|
|
+ <label for="tel-6">需要品检</label>
|
|
|
+ </div>
|
|
|
+ <div class="radio-box">
|
|
|
+ <input type="radio" id="tel-7" name="signclosedIsQuality" datatype="*">
|
|
|
+ <label for="tel-7">不需要品检</label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="row cl">
|
|
|
+ <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>是否已转入:</label>
|
|
|
+ <div class="formControls col-5 col-sm-5 skin-minimal">
|
|
|
+ <div class="radio-box">
|
|
|
+ <input type="radio" id="tel-8" name="signclosedIsInto" datatype="*" checked >
|
|
|
+ <label for="tel-8">已转入品检</label>
|
|
|
+ </div>
|
|
|
+ <div class="radio-box">
|
|
|
+ <input type="radio" id="tel-9" name="signclosedIsInto" datatype="*">
|
|
|
+ <label for="tel-9">未转入品检</label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="row cl">
|
|
|
+ <label class="form-label col-3 col-sm-3">备注:</label>
|
|
|
+ <div class="formControls col-5 col-sm-5">
|
|
|
+ <textarea name="signclosedDesc" id="signclosedDesc" cols="" rows="2" class="textarea" placeholder="请填写备注"></textarea>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="row cl">
|
|
|
+ <div class="col-2 col-sm-2 col-offset-3">
|
|
|
+ <button onClick="save_submit();" class="btn btn-block btn-primary size-XL" type="submit">确认录入</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+</article>
|
|
|
+
|
|
|
+<script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
|
|
|
+<script type="text/javascript" src="${path}/common/lib/webuploader/0.1.5/webuploader.min.js"></script>
|
|
|
+<script type="text/javascript" src="${path}/common/lib/icheck/jquery.icheck.min.js"></script>
|
|
|
+<script type="text/javascript" src="${path}/common/lib/cm.lib/jquery.provincesCity.js"></script>
|
|
|
+<script type="text/javascript" src="${path}/common/lib/cm.lib/provincesData.js"></script>
|
|
|
+<script type="text/javascript" src="${path}/common/lib/cm.lib/airCity.js"></script>
|
|
|
+<#--<script type="text/javascript" src="${path}/common/lib/cm.lib/dimensions.js"></script>-->
|
|
|
+<script type="text/javascript" src="${path}/common/lib/cm.lib/suggest.js"></script>
|
|
|
+<script type="text/javascript">
|
|
|
+ $(function(){
|
|
|
+ });
|
|
|
+
|
|
|
+ $(document).on('click', '.dalog-ask .answer', function() {
|
|
|
+ $("#answer-textarea").text($(this).find("span").text());
|
|
|
+ });
|
|
|
+
|
|
|
+</script>
|
|
|
+<script type="text/javascript">
|
|
|
+
|
|
|
+ /*处理结果的执行状态*/
|
|
|
+ var isSolve = {
|
|
|
+ solved : [],
|
|
|
+ noSolved : [],
|
|
|
+ renewed : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","换新发货","发货通知用户","收货后回访"],
|
|
|
+ maintain : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","产线维修","换新发货","发货通知用户","收货后回访"],
|
|
|
+ reissue : ["录入客诉","生成E订单","督促仓库发货","仓库发货","发货通知用户","收货后回访"],
|
|
|
+ backGoods : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","退款","退货完成"],
|
|
|
+ noReasonBack : ["录入客诉","督促用户寄回","录入快递单号","仓库收货","品质检测","退款","退货完成"]
|
|
|
+ }
|
|
|
+
|
|
|
+ /*全局标识当前状态 type : 1 :已解决 2:未解决 3:换新 4:维修 5:补发 6:退货 7:无理由退货*/
|
|
|
+ var allCustomerType = 1;
|
|
|
+
|
|
|
+ /*初始化页面参数*/
|
|
|
+ $(function () {
|
|
|
+
|
|
|
+ /*初始化问题分类*/
|
|
|
+ initComplaintTypeInfo();
|
|
|
+
|
|
|
+ /*初始化客服*/
|
|
|
+ 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());
|
|
|
+ })
|
|
|
+
|
|
|
+ /*监听问题关键字搜索*/
|
|
|
+ $(document).on('click', '#search_button', function() {
|
|
|
+ initComplaintQuestionInfo();
|
|
|
+ });
|
|
|
+
|
|
|
+ /*搜索订单事件*/
|
|
|
+ $(document).on('click', '#selectOrder', function() {
|
|
|
+ selectOrder();
|
|
|
+ });
|
|
|
+
|
|
|
+ /*监听省选择事件*/
|
|
|
+ $(document).on('change', '#province', function() {
|
|
|
+ var proId = $("#province").val();
|
|
|
+ var cityId = setCity("",proId,2)
|
|
|
+ setDistrict("",cityId,2)
|
|
|
+ });
|
|
|
+
|
|
|
+ /*监听市选择事件*/
|
|
|
+ $(document).on('change', '#city', function() {
|
|
|
+ var city = $("#city").val();
|
|
|
+ setDistrict("",city,2)
|
|
|
+ });
|
|
|
+
|
|
|
+ /* 初始化单选框样式 */
|
|
|
+ initCheck();
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+ /*初始化单选框样式*/
|
|
|
+ function initCheck(){
|
|
|
+ $('.skin-minimal input').iCheck({
|
|
|
+ checkboxClass: 'icheckbox-blue',
|
|
|
+ radioClass: 'iradio-blue',
|
|
|
+ increaseArea: '20%'
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /*初始化产品类型 -- 客诉头部的产品类型单选*/
|
|
|
+ function initProduceType(){
|
|
|
+ var html = "";
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ data: {
|
|
|
+ },
|
|
|
+ url: "${path}/admin/customer/select_produce_type",
|
|
|
+ async: false,
|
|
|
+ success: function(data){
|
|
|
+ if (data.returnCode == 200) {
|
|
|
+ var check = "checked";
|
|
|
+ for(var i=0;i<data.returnMsg.productTypeList.length;i++){
|
|
|
+ var produce = data.returnMsg.productTypeList[i];
|
|
|
+ html += ' <div class="radio-box">' +
|
|
|
+ '<input type="radio" id="tel-3" name="produceType" datatype="*" value="'+ produce.typeId +'" '+ check +' nullmsg="请选择产品类型!" >' +
|
|
|
+ ' <label for="tel-3">'+ produce.typeName +'</label>' +
|
|
|
+ ' </div>';
|
|
|
+ check = "";
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ html = '';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $("#produceTypeHtml").html(html);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 设置地址
|
|
|
+ */
|
|
|
+ function setAdress(){
|
|
|
+ var addres = $("#addressInfo").val();
|
|
|
+
|
|
|
+ $("#addrssMsg").html("");
|
|
|
+ if(addres == null){
|
|
|
+ $("#addrssMsg").html("*未能获取到地址,请手动选择地址");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var addresList = addres.split("-");
|
|
|
+ if(addresList[0] == null || addresList[1]==null || addresList[2]==null || addresList[3]==null){
|
|
|
+ $("#addrssMsg").html("*未能获取到地址,请手动选择地址");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var proId = setPro(getAddress(addresList[0],0),1);
|
|
|
+ var cityId = setCity(getAddress(addresList[1],1),proId,1);
|
|
|
+ setDistrict(getAddress(addresList[2],2),cityId,1);
|
|
|
+ $("#sendAddress").val(addresList[3]);
|
|
|
+ }
|
|
|
+
|
|
|
+ /***
|
|
|
+ * 删除 “省”,“市”,“区”关键字
|
|
|
+ * type : 0:省 2:市 3:区
|
|
|
+ */
|
|
|
+ function getAddress(addrss,type) {
|
|
|
+ var abbreviation = "";
|
|
|
+ if(addrss == ""){
|
|
|
+ abbreviation = "";
|
|
|
+ }else{
|
|
|
+ switch(type)
|
|
|
+ {
|
|
|
+ case 0:
|
|
|
+ var proReg = new RegExp("省","g");
|
|
|
+ abbreviation = addrss.replace(proReg,"");
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ var cityReg = new RegExp("市","g");
|
|
|
+ abbreviation = addrss.replace(cityReg,"");
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ var districtReg = new RegExp("市","g");
|
|
|
+ abbreviation = addrss.replace(districtReg,"");
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return abbreviation
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 设置省
|
|
|
+ * type 1:搜索订单赋值 2:只查询全部,默认第一个
|
|
|
+ */
|
|
|
+ function setPro(provinceName,type) {
|
|
|
+ var proId = '';
|
|
|
+ var province = listProvince();
|
|
|
+ var selectPro = {};
|
|
|
+ if(type == 1){
|
|
|
+ selectPro = listProvince("",provinceName);
|
|
|
+ }else if(type == 2){
|
|
|
+ selectPro = null;
|
|
|
+ }
|
|
|
+ if(province!=null){
|
|
|
+ var provinceHtml = ''
|
|
|
+ for(var i=0;i<province.length;i++){
|
|
|
+ if(selectPro!= null && province[i].provinceId == selectPro[0].provinceId){
|
|
|
+ proId = selectPro[0].provinceId;
|
|
|
+ provinceHtml += '<option value="'+ province[i].provinceId +'" selected>'+ province[i].province +'</option>';
|
|
|
+ }else{
|
|
|
+ provinceHtml += '<option value="'+ province[i].provinceId +'">'+ province[i].province +'</option>';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $("#province").html(provinceHtml);
|
|
|
+ }
|
|
|
+ return proId;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 设置市
|
|
|
+ * type 1:搜索订单赋值 2:只查询全部,默认第一个
|
|
|
+ */
|
|
|
+ function setCity(cityName,proId,type) {
|
|
|
+ var cityId = '';
|
|
|
+ var city = listCity(proId,"");
|
|
|
+ var selectCity = {};
|
|
|
+ if(type == 1){
|
|
|
+ selectCity = listCity(proId,cityName);
|
|
|
+ }else if(type == 2){
|
|
|
+ selectCity = null;
|
|
|
+ cityId = city[0].cityId;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(city!=null){
|
|
|
+ var cityHtml = ''
|
|
|
+ for(var i=0;i<city.length;i++){
|
|
|
+ if(selectCity != null && city[i].cityId == selectCity[0].cityId){
|
|
|
+ cityId = city[i].cityId;
|
|
|
+ cityHtml += '<option value="'+ city[i].cityId +'" selected>'+ city[i].city +'</option>';
|
|
|
+ }else{
|
|
|
+ cityHtml += '<option value="'+ city[i].cityId +'">'+ city[i].city +'</option>';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $("#city").html(cityHtml);
|
|
|
+ }
|
|
|
+ return cityId;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 设置区
|
|
|
+ * type 1:搜索订单赋值 2:只查询全部,默认第一个
|
|
|
+ */
|
|
|
+ function setDistrict(districtName,cityId,type) {
|
|
|
+ var district = listDistrict(cityId,"");
|
|
|
+ var selectDistrict = {};
|
|
|
+ if(type == 1){
|
|
|
+ selectDistrict = listDistrict(cityId,districtName);
|
|
|
+ }else if(type == 2){
|
|
|
+ selectDistrict = null;
|
|
|
+ }
|
|
|
+ if(district!=null){
|
|
|
+ var districtHtml = ''
|
|
|
+ for(var i=0;i<district.length;i++){
|
|
|
+ if(selectDistrict != null && district[i].districtId == selectDistrict[0].districtId){
|
|
|
+ districtHtml += '<option value="'+ district[i].districtId +'" selected>'+ district[i].district +'</option>';
|
|
|
+ }else{
|
|
|
+ districtHtml += '<option value="'+ district[i].districtId +'">'+ district[i].district +'</option>';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $("#district").html(districtHtml);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 展示产品
|
|
|
+ * @param 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>
|
|
|
+</html>
|