|
@@ -45,6 +45,8 @@
|
|
|
.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%; }
|
|
|
+ input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
|
|
|
+ input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
|
|
|
</style>
|
|
|
<title>完成签收 - 客诉管理 - RST</title>
|
|
|
</head>
|
|
@@ -60,140 +62,124 @@
|
|
|
<div class="pd-20 cl">
|
|
|
<form action="" method="post" class="form form-horizontal" id="form-signclosed-add">
|
|
|
<div class="row cl">
|
|
|
- <label class="form-label col-3 col-sm-3">寄送信息:</label>
|
|
|
- <div class="formControls col-4 col-sm-4">
|
|
|
- <#if (signclosedList?size > 0)>
|
|
|
- <#list signclosedList as signclosed>
|
|
|
- <span class="label label-success radius">
|
|
|
- <#if signclosed.signclosedProductType == 1>
|
|
|
- ${signclosed.productName!''}-${signclosed.colorName!''}*${signclosed.productNum!''}台
|
|
|
- <#else>
|
|
|
- ${signclosed.productName!''}*${signclosed.productNum!''}件
|
|
|
- </#if>
|
|
|
- </span>
|
|
|
+ <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>快递信息:</label>
|
|
|
+ <div class="formControls col-2 col-sm-2 skin-minimal">
|
|
|
+ <span class="select-box">
|
|
|
+ <select id="signclosedLogistics" name="signclosedLogistics" class="select">
|
|
|
+ <#if logisticsInfoList?? && (logisticsInfoList?size > 0) >
|
|
|
+ <#list logisticsInfoList as logisticsInfo>
|
|
|
+ <option value="${logisticsInfo.logisticsRstCode!''}" <#if complaintSignclosedInfo.signclosedLogistics == logisticsInfo.logisticsRstCode>selected</#if>>${logisticsInfo.logisticsName!''}(${logisticsInfo.logisticsRstCode!''})</option>
|
|
|
</#list>
|
|
|
</#if>
|
|
|
+ </select>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div class="formControls col-2 col-sm-2">
|
|
|
+ <input type="text" style="" value="${complaintSignclosedInfo.signclosedLogisticsNumber!''}" class="input-text" placeholder="填写物流单号或条码枪扫描" id="signclosedLogisticsNumber" name="signclosedLogisticsNumber">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="row cl">
|
|
|
- <label class="form-label col-3 col-sm-3">客服备注:</label>
|
|
|
- <div class="formControls col-4 col-sm-4" style="margin-left: -0.2%">
|
|
|
- <#if complaintSignclosedInfo?? >${complaintSignclosedInfo.describeHandleDesc!''}</#if>
|
|
|
+ <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>签收日期:</label>
|
|
|
+ <div class="formControls col-2 col-sm-2">
|
|
|
+ <input type="text" style="" value="" class="input-text my-input-date Wdate" placeholder="签收日期" onClick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M-%d'})" id="signclosed_date" name="signclosed_date" readonly="readonly"/>
|
|
|
+ <#--<input type="text" style="" value="${complaintSignclosedInfo.signclosedDate?string("yyyy-MM-dd")!''}" class="input-text my-input-date Wdate" placeholder="签收日期" onClick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M-%d'})" id="signclosed_date" name="signclosed_date" readonly="readonly"/>-->
|
|
|
</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">
|
|
|
- <div>
|
|
|
- <input type="text" oninput="selectProduct();" onpropertychange="selectProduct();" class="input-text" style="width: 100%;" id="selectProcuct" name="selectProcuct" placeholder="请输入产品名称搜索">
|
|
|
- </div>
|
|
|
- <table class="table table-border table-bg table-bordered">
|
|
|
+ <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>签收产品:</label>
|
|
|
+ <div class="formControls col-8 col-sm-8">
|
|
|
+ <input type="button" class="btn btn-primary add-order-button" onclick="add_product()" value="添加产品" >
|
|
|
+ <table class="table table-border table-bg table-bordered" style="margin-top: 10px;" id="all_add_product">
|
|
|
<thead>
|
|
|
- <tr class="text-c">
|
|
|
- <th style="text-align: center;" width="80">产品名称</th>
|
|
|
- <th style="text-align: center;" width="130">产品颜色</th>
|
|
|
- <th style="text-align: center;" width="100">产品配件</th>
|
|
|
+ <tr class="text-c" id="table1">
|
|
|
+ <th style="text-align: center;" width="30" >产品名称</th>
|
|
|
+ <th style="text-align: center;" width="25" >产品颜色</th>
|
|
|
+ <th style="text-align: center;" width="10">售价</th>
|
|
|
+ <th style="text-align: center;" width="10">数量</th>
|
|
|
+ <th style="text-align: center;" width="10">操作</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
- <tbody id="addProduct">
|
|
|
- <#if (signclosedList?size > 0)>
|
|
|
- <#list signclosedList as signclosed>
|
|
|
- <tr>
|
|
|
- <#if signclosed.signclosedProductType == 1>
|
|
|
- <td>${signclosed.productName!''}</td>
|
|
|
- <td style="margin: 0px;padding: 0px;height: 20px;">
|
|
|
- <table border="0">
|
|
|
- <td id="tdColorId${signclosed.signclosedProductColor!''}" style="border-top: 1px solid #ddd;">
|
|
|
- <input type="checkbox" checked value="${signclosed.signclosedProductColor!''}" name="alreadyColorName" datatype="*">${signclosed.colorName!''}
|
|
|
- <input type="text" style="width: 50px;margin-left: 10px;" value="${signclosed.productNum!''}" class="input-text" oninput="generateInput( ${signclosed.signclosedProductColor!''})" onpropertychange="generateInput(${signclosed.signclosedProductColor!''})" placeholder="数量" id="alreadyColorId${signclosed.signclosedProductColor!''}" name="alreadyColorId${signclosed.signclosedProductColor!''}"><br>
|
|
|
- <#list 1..signclosed.productNum as t>
|
|
|
- <input type="text" class="input-text" style="width: 110px;" placeholder="机器编号" name="machineNumber${signclosed.signclosedProductColor!''}" >
|
|
|
- </#list>
|
|
|
- </td>
|
|
|
- </table>
|
|
|
- </td>
|
|
|
- <td> </td>
|
|
|
+ <tbody id="add_product">
|
|
|
+ <#if complaintSignclosedInfo.signclosedProductInfoList??>
|
|
|
+ <#if (complaintSignclosedInfo.signclosedProductInfoList?size > 0)>
|
|
|
+ <#list complaintSignclosedInfo.signclosedProductInfoList as info>
|
|
|
+ <tr class="text-c">
|
|
|
+ <input type="hidden" class="color_id" id="" value="${info.signclosedProductColor!''}" >
|
|
|
+ <td>${info.productName!''}</td>
|
|
|
+ <td>${info.colorName!''}</td>
|
|
|
+ <td>${info.colorPrice!''}</td>
|
|
|
+ <td><input type="text" class="input-text input-number item-num" style="width: 100%;border: none;text-align: center;" name="" id="" placeholder="产品数量" value="${info.productNum!''}" onkeyup="keyFun($(this),999,1)" onpaste="keyFun($(this),999,1)"></td>
|
|
|
+ <td><a href="javascript:void(0)" class="del_product all_down" onclick="delProduct($(this))" >删除</a></td>
|
|
|
+ </tr>
|
|
|
+ </#list>
|
|
|
</#if>
|
|
|
- <#if signclosed.signclosedProductType == 2>
|
|
|
- <td></td>
|
|
|
- <td></td>
|
|
|
- <td><input type="checkbox" checked value="${signclosed.signclosedProductId!''}" name="alreadyFittingsName" datatype="*">${signclosed.productName!''}
|
|
|
- <input type="text" style="width: 50px;margin-left: 10px;" class="input-text" value="${signclosed.productNum!''}" placeholder="数量" id="alreadyFittingsId${signclosed.signclosedProductId!''}" name="alreadyFittingsId${signclosed.signclosedProductId!''}"><br>
|
|
|
- </td>
|
|
|
- </#if>
|
|
|
- </tr>
|
|
|
- </#list>
|
|
|
- </#if>
|
|
|
+ </#if>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
|
|
|
+ <input type="hidden" id="orderItemString" name="orderItemString" value="" >
|
|
|
|
|
|
+ </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-4 col-sm-4" style="margin-left: -0.9%">
|
|
|
- <input type="text" style="width: 150px;margin-left: 10px;" class="input-text" placeholder="寄件方姓名/公司名称" id="signclosedSendName" name="signclosedSendName" onkeyup="value=value.replace(/[A-Za-z\d]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[A-Za-z\d]/g,''))">
|
|
|
- <input type="text" style="width: 150px;margin-left: 10px;" class="input-text" placeholder="寄件方联系电话" id="signclosedSendTel" name="signclosedSendTel">
|
|
|
+ <div class="formControls col-2 col-sm-2">
|
|
|
+ <input type="text" value="${complaintSignclosedInfo.signclosedSendName!''}" class="input-text" placeholder="寄件方姓名/公司名称" id="signclosedSendName" name="signclosedSendName">
|
|
|
+ </div>
|
|
|
+ <div class="formControls col-2 col-sm-2">
|
|
|
+ <input type="text" value="${complaintSignclosedInfo.signclosedSendTel!''}" 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-4 col-sm-4 skin-minimal">
|
|
|
- <span class="select-box" style="width: 150px;">
|
|
|
- <select name="signclosedAddrProvinces" id="province" class="select">
|
|
|
+ <div class="row cl address_info" style="position: relative;">
|
|
|
+ <label class="form-label col-3 col-sm-3"></label>
|
|
|
+ <div class="formControls col-2 col-sm-2" style="">
|
|
|
+ <span class="select-box">
|
|
|
+ <select class="select init_province" id="provinces">
|
|
|
|
|
|
- </select>
|
|
|
- </span>
|
|
|
- <span class="select-box" style="width: 150px;margin-left: 7px;">
|
|
|
- <select name="signclosedAddrCity" id="city" class="select">
|
|
|
-
|
|
|
- </select>
|
|
|
+ </select>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div class="formControls col-2 col-sm-2">
|
|
|
+ <span class="select-box">
|
|
|
+ <select class="select init_city" id="city" >
|
|
|
+ </select>
|
|
|
</span>
|
|
|
</div>
|
|
|
- <div class="formControls col-3 col-sm-3 skin-minimal">
|
|
|
-
|
|
|
- </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" style="margin-left: -0.9%">
|
|
|
- <input type="text" style="width: 150px;margin-left: 10px;" class="input-text my-input-date Wdate" placeholder="签收日期" onClick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M-%d'})" id="signclosed_date" name="signclosed_date" readonly="readonly"/>
|
|
|
+ <div class="formControls col-2 col-sm-2" style="position: relative;">
|
|
|
+ <span class="select-box">
|
|
|
+ <select class="select init_country" id="area" >
|
|
|
+ </select>
|
|
|
+ </span>
|
|
|
</div>
|
|
|
+ <input type="hidden" name="signclosedAddrProvinces" id="signclosedAddrProvinces" >
|
|
|
+ <input type="hidden" name="signclosedAddrCity" id="signclosedAddrCity" >
|
|
|
+ <input type="hidden" name="signclosedAddrArea" id="signclosedAddrArea" >
|
|
|
</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-5" name="signclosedIsFittings" value="2" datatype="*" checked>
|
|
|
- <label for="tel-5">不缺配件</label>
|
|
|
- </div>
|
|
|
- <div class="radio-box">
|
|
|
- <input type="radio" id="tel-4" name="signclosedIsFittings" value="1" datatype="*">
|
|
|
- <label for="tel-4">缺少配件</label>
|
|
|
- </div>
|
|
|
+ <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>签收图片:</label>
|
|
|
+ <div class="formControls col-xs-2 col-sm-2" id="fileDiv" style="width: 17%;width: 100px;height: 100px;">
|
|
|
+ <input type="file" name="file" id="fileid" style="opacity: 0; position: absolute; width: 90px;height: 80px;">
|
|
|
+ <img alt="介绍图" src="${path}/common/images/pts/addparts.jpg" id="partsImg" width="90px;" height="80px;">
|
|
|
</div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="row cl" id="objectsStateId">
|
|
|
- <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-12" name="signclosedObjectsState" value="1" datatype="*" checked >
|
|
|
- <label for="tel-12">正常签收</label>
|
|
|
- </div>
|
|
|
- <div class="radio-box">
|
|
|
- <input type="radio" id="tel-13" name="signclosedObjectsState" value="2" datatype="*">
|
|
|
- <label for="tel-13">物件不对</label>
|
|
|
- </div>
|
|
|
+ <div id="imgDiv">
|
|
|
+ <#if complaintSignclosedInfo.signclosedImgInfoList??>
|
|
|
+ <#if (complaintSignclosedInfo.signclosedImgInfoList?size > 0)>
|
|
|
+ <#list complaintSignclosedInfo.signclosedImgInfoList as info>
|
|
|
+ <div class="col-xs-8 col-sm-8" onclick="deleteImg(this);" style="width: 17%;width: 100px;height: 100px;">
|
|
|
+ <img src="${info.imgUrl!''}" width="90" height="80">
|
|
|
+ <input type="hidden" name="componentsImg" value="${info.imgUrl!''}"/>
|
|
|
+ </div>
|
|
|
+ </#list>
|
|
|
+ </#if>
|
|
|
+ </#if>
|
|
|
</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>
|
|
|
+ <textarea name="signclosedDesc" id="signclosedDesc" cols="" rows="2" class="textarea" placeholder="请填写备注">${complaintSignclosedInfo.signclosedDesc!''}</textarea>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="row cl">
|
|
@@ -214,6 +200,8 @@
|
|
|
<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" src="${path}/common/js/common/address.js"></script>
|
|
|
+<script type="text/javascript" src="${path}/common/lib/jquery/1.9.1/ajaxfileupload.js"></script>
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
/*初始化单选框样式*/
|
|
@@ -225,114 +213,105 @@
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- //动态回显产品js state
|
|
|
- function selectProduct(){
|
|
|
- var productName = $("#selectProcuct").val();
|
|
|
- if(productName == null || productName == ""){
|
|
|
- var productTable = '<td colspan="3">暂无数据!</td>';
|
|
|
- $("#addProduct").html(productTable);
|
|
|
- return false;
|
|
|
- }
|
|
|
- $.ajax({
|
|
|
- cache: true,
|
|
|
- type: "POST",
|
|
|
- url: "${path}/admin/signclosed/select_product",
|
|
|
- data:{'productName':productName},
|
|
|
- async: false,
|
|
|
- success: function(data){
|
|
|
- if (data.returnCode == 200) {
|
|
|
- $("#addProduct").html("");
|
|
|
- $.each(data.returnMsg.productList,function(i,value) {
|
|
|
- var colorTable = '';
|
|
|
- var fittingsTable = '';
|
|
|
+ /***
|
|
|
+ * 删除图片
|
|
|
+ */
|
|
|
+ function deleteImg(obj){
|
|
|
+ layer.confirm("确认要删除该图片吗", { title: "确认" }, function (index) {
|
|
|
+ layer.close(index);
|
|
|
+ obj.remove();
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
- /*var colorlength = value.colorList.length;
|
|
|
- var fittingslength = value.fittingsList.length;*/
|
|
|
- if(value.colorList != null) {
|
|
|
- if (value.colorList.length > 0) {
|
|
|
- $.each(value.colorList, function (i, value) {
|
|
|
- colorTable = colorTable + '<td id="tdColorId' + value.colorId + '" style="border-top: 1px solid #ddd; "><input type="checkbox" value="' + value.colorId + '" name="alreadyColorName" datatype="*">' + value.colorName + ''
|
|
|
- + '<input type="text" style="width: 50px;margin-left: 10px;" class="input-text" oninput="generateInput(' + value.colorId + ')" onpropertychange="generateInput(' + value.colorId + ')" placeholder="数量" id="alreadyColorId' + value.colorId + '" name="alreadyColorId' + value.colorId + '"><br>' +
|
|
|
- '</td>'
|
|
|
- });
|
|
|
- }else{
|
|
|
- colorTable = '<span>暂无颜色,请先添加产品颜色</span>';
|
|
|
- }
|
|
|
- }else {
|
|
|
- colorTable = '<span>暂无颜色,请先添加产品颜色</span>';
|
|
|
- }
|
|
|
- if(value.fittingsList != null) {
|
|
|
- if (value.fittingsList.length > 0) {
|
|
|
- $.each(value.fittingsList, function (i, value) {
|
|
|
- fittingsTable = fittingsTable + '<input type="checkbox" style="margin-left: 5px;" value="' + value.fittingsId + '" name="alreadyFittingsName" datatype="*">' + value.fittingsName + ''
|
|
|
- + '<input type="text" style="width: 50px;" class="input-text" value="" placeholder="数量" id="alreadyFittingsId' + value.fittingsId + '" name="alreadyFittingsId' + value.fittingsId + '"><br>'
|
|
|
- });
|
|
|
- }else{
|
|
|
- fittingsTable = '<span>暂无配件,请先添加配件</span>';
|
|
|
- }
|
|
|
- }else{
|
|
|
- fittingsTable = '<span>暂无配件,请先添加配件</span>';
|
|
|
- }
|
|
|
- var productTable = '<tr>'
|
|
|
- +'<td>'+value.productName+'</td>'
|
|
|
- +'<td style="margin: 0px;padding: 0px;height: 20px;"><table border="0" style="height: 65px;">'+colorTable+'</table></td>'
|
|
|
- +'<td style="margin: 0px;padding: 0px;height: 20px;">'+fittingsTable+'</td>'
|
|
|
- +'</tr>';
|
|
|
- $("#addProduct").append(productTable);
|
|
|
- });
|
|
|
- }else{
|
|
|
- var productTable = '<td colspan="3">暂无数据!</td>';
|
|
|
- $("#addProduct").html(productTable);
|
|
|
+ $('#fileid').change(function() {
|
|
|
+ fileUpload();
|
|
|
+ });
|
|
|
+
|
|
|
+ function fileUpload() {
|
|
|
+ $.ajaxFileUpload({
|
|
|
+ url:"${path}/admin/machineParts/fileUpload",
|
|
|
+ secureuri:false,
|
|
|
+ fileElementId:"fileid",//文件选择框的id属性
|
|
|
+ dataType: 'json', //json
|
|
|
+ success: function (data) {
|
|
|
+ if(data.returnCode == 200){
|
|
|
+ /*<input type="file" name="file" id="fileid" style="opacity: 0; position: absolute; width: 90px;height: 80px;">*/
|
|
|
+ $("#imgDiv").append('<div class="col-xs-8 col-sm-8" onclick="deleteImg(this);" style="width: 17%;width: 100px;height: 100px;">'
|
|
|
+ +'<img src="'+root_path+data.returnMsg.imgUrl+'" width="90" height="80">'
|
|
|
+ +'<input type="hidden" name="componentsImg" value="'+data.returnMsg.imgUrl+'"/>'
|
|
|
+ +'</div>');
|
|
|
|
|
|
+ }else{
|
|
|
+ layer.msg('上传失败,请重试!',{icon: 5,time:2000});
|
|
|
}
|
|
|
- },
|
|
|
- error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
|
- layer.msg('查询错误,请刷新页面重试',{icon: 5,time:1000});
|
|
|
}
|
|
|
});
|
|
|
+ $('#fileid').change(function() {
|
|
|
+ fileUpload();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ /*初始化省市区*/
|
|
|
+ /*$(".address_info").initAddress();*/
|
|
|
+ /*var ulc = initAddress($(".address_info"));
|
|
|
+ var sc = initSalesChannel($(".sales_channel"));*/
|
|
|
+ var provicesId = setAddressPro();
|
|
|
+ var cityId = setAddressCity('${complaintSignclosedInfo.signclosedAddrProvinces!''}');
|
|
|
+ setAddressDis('${complaintSignclosedInfo.signclosedAddrCity!''}');
|
|
|
+ /*alert('${complaintSignclosedInfo.signclosedAddrProvinces!''}'+'${complaintSignclosedInfo.signclosedAddrCity!''}');*/
|
|
|
+ /*设置省*/
|
|
|
+ function setAddressPro(){
|
|
|
+ var provinceHtml = "";
|
|
|
+ var provices = listProvince();
|
|
|
+ for(var i=0;i<provices.length;i++){
|
|
|
+ provinceHtml += '<option value="'+ provices[i].provinceId +'">'+ provices[i].province +'</option>';
|
|
|
+ }
|
|
|
+ $("#provinces").html(provinceHtml);
|
|
|
+ $("#provinces").val('${complaintSignclosedInfo.signclosedAddrProvinces!''}');
|
|
|
+ return provices[0].provinceId;
|
|
|
}
|
|
|
|
|
|
- //填写数量后动态生成相同数量的文本框
|
|
|
- function generateInput(colorId){
|
|
|
- var inputList = "";
|
|
|
- var number = $("#alreadyColorId"+colorId).val();
|
|
|
- var machineNumberName = "machineNumber"+colorId;
|
|
|
- if(!/^\d+$/.test(number)){
|
|
|
- layer.msg('请输入正确的数量',{icon: 5,time:1000});
|
|
|
- $('input[name='+machineNumberName+']').remove();
|
|
|
- return false;
|
|
|
+ /*设置市*/
|
|
|
+ function setAddressCity(proId){
|
|
|
+ var cityHtml = ''
|
|
|
+ var city = listCity( proId,"");
|
|
|
+ for(var i=0;i<city.length;i++){
|
|
|
+ cityHtml += '<option value="'+ city[i].cityId +'">'+ city[i].city +'</option>';
|
|
|
}
|
|
|
- $('input[name='+machineNumberName+']').remove();
|
|
|
- for (var i = 1;i<=number;i++){
|
|
|
- inputList = inputList + '<input type="text" class="input-text" style="width: 110px;" placeholder="机器编号" name="machineNumber' + colorId + '" >';
|
|
|
+ $("#city").html(cityHtml);
|
|
|
+ $("#city").val('${complaintSignclosedInfo.signclosedAddrCity!''}');
|
|
|
+ return city[0].cityId;
|
|
|
+ }
|
|
|
+ /*设置区*/
|
|
|
+ function setAddressDis(cityId){
|
|
|
+ var districtHtml = ''
|
|
|
+ var district = listDistrict(cityId ,"");
|
|
|
+ for(var i=0;i<district.length;i++){
|
|
|
+ districtHtml += '<option value="'+ district[i].districtId +'">'+ district[i].district +'</option>';
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
- $("#tdColorId"+colorId).append(inputList);
|
|
|
+ $("#area").html(districtHtml);
|
|
|
+ $("#area").val('${complaintSignclosedInfo.signclosedAddrArea!''}');
|
|
|
}
|
|
|
- //动态回显产品js end
|
|
|
-
|
|
|
|
|
|
|
|
|
$(function(){
|
|
|
- var province = listProvince(null,null);
|
|
|
+ /*var province = listProvince(null,null);
|
|
|
var provinceHtml = '';
|
|
|
for(var i=0;i<province.length;i++){
|
|
|
- provinceHtml += '<option value="'+ province[i].provinceId +'">'+ province[i].province +'</option>';
|
|
|
+ provinceHtml += '<option value="'+ province[i].provinceId +'">'+ province[i].province +'</option>';
|
|
|
}
|
|
|
- $("#province").html(provinceHtml);
|
|
|
+ $("#provinces").html(provinceHtml);
|
|
|
|
|
|
- var city = listCity(null,null);
|
|
|
+ var city = listCity(null,null);
|
|
|
var cityHtml = '';
|
|
|
for(var i=0;i<city.length;i++){
|
|
|
cityHtml += '<option value="'+ city[i].cityId +'">'+ city[i].city +'</option>';
|
|
|
}
|
|
|
- $("#city").html(cityHtml);
|
|
|
+ $("#city").html(cityHtml);*/
|
|
|
|
|
|
|
|
|
/*监听省选择事件*/
|
|
|
- $(document).on('change', '#province', function() {
|
|
|
- var proId = $("#province").val();
|
|
|
+ $(document).on('change', '#provinces', function() {
|
|
|
+ var proId = $("#provinces").val();
|
|
|
var city = listCity(proId,null);
|
|
|
var cityHtml = '';
|
|
|
for(var i=0;i<city.length;i++){
|
|
@@ -340,20 +319,42 @@
|
|
|
}
|
|
|
$("#city").html(cityHtml);
|
|
|
});
|
|
|
+ /*监听市选择事件*/
|
|
|
+ $(document).on('change', '#city', function() {
|
|
|
+ var city = $("#city").val();
|
|
|
+ setAddressDis(city);
|
|
|
+ });
|
|
|
});
|
|
|
|
|
|
|
|
|
function add() {
|
|
|
+ var typeCompany = parseInt($("input:radio[name='companyId']:checked").val());
|
|
|
+ if(typeCompany === null || typeCompany === ""){
|
|
|
+ layer.msg('请选择所属公司',{icon: 5,time:1000});
|
|
|
+ return;
|
|
|
+ }else{
|
|
|
+ $("#signclosedCompanyId").val(typeCompany);
|
|
|
+ }
|
|
|
+
|
|
|
+ var signclosedLogistics = $("#signclosedLogistics").val();
|
|
|
+ if( signclosedLogistics == null || signclosedLogistics == "" ){
|
|
|
+ layer.msg('请选择物流公司',{icon: 5,time:1000});
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var signclosedLogisticsNumber = $("#signclosedLogisticsNumber").val();
|
|
|
+ if( signclosedLogisticsNumber == null || signclosedLogisticsNumber == "" ){
|
|
|
+ layer.msg('物流单号不能为空',{icon: 5,time:1000});
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if( signclosedLogisticsNumber.length > 300 ){
|
|
|
+ layer.msg('物流单号长度不得大于20个字符',{icon: 5,time:1000});
|
|
|
+ return;
|
|
|
+ }
|
|
|
var signclosedSendName = $("#signclosedSendName").val();
|
|
|
if( signclosedSendName == null || signclosedSendName == "" ){
|
|
|
layer.msg('寄件人姓名不能为空',{icon: 5,time:1000});
|
|
|
return;
|
|
|
}
|
|
|
- /*var reg=/^[\u2E80-\u9FFF]+$/;
|
|
|
- if(!reg.text(signclosedSendName)){
|
|
|
- layer.msg('寄件人姓名格式错误',{icon: 5,time:1000});
|
|
|
- return;
|
|
|
- }*/
|
|
|
if( signclosedSendName.length > 10 ){
|
|
|
layer.msg('寄件人姓名长度不得大于10个字符',{icon: 5,time:1000});
|
|
|
return;
|
|
@@ -367,16 +368,17 @@
|
|
|
layer.msg('寄件人电话长度不得大于11个字符',{icon: 5,time:1000});
|
|
|
return;
|
|
|
}
|
|
|
- var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
|
|
|
+ /*var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
|
|
|
if(!myreg.test(signclosedSendTel)){
|
|
|
layer.msg('寄件人电话格式不正确',{icon: 5,time:1000});
|
|
|
return;
|
|
|
- }
|
|
|
+ }*/
|
|
|
var signclosed_date = $("#signclosed_date").val();
|
|
|
if( signclosed_date == null || signclosed_date == "" ){
|
|
|
- layer.msg('签收日期不能为空',{icon: 5,time:1000});
|
|
|
+ layer.msg('请选择签收日期',{icon: 5,time:1000});
|
|
|
return;
|
|
|
}
|
|
|
+
|
|
|
var signclosedDesc = $("#signclosedDesc").val();
|
|
|
if( signclosedDesc != null || signclosedDesc == "" ){
|
|
|
if( signclosedDesc.length > 300 ){
|
|
@@ -384,6 +386,32 @@
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
+ //设置省市县
|
|
|
+ var provinces = $("#provinces").find("option:selected").val();
|
|
|
+ var city = $("#city").find("option:selected").val();
|
|
|
+ var area = $("#area").find("option:selected").val();
|
|
|
+ $("#signclosedAddrProvinces").val(provinces);
|
|
|
+ $("#signclosedAddrCity").val(city);
|
|
|
+ $("#signclosedAddrArea").val(area);
|
|
|
+
|
|
|
+ //选择产品
|
|
|
+ var flag = false;
|
|
|
+ /*封装订单项*/
|
|
|
+ var orderItemArray = new Array();
|
|
|
+ $("#add_product").find("tr").each(function(){
|
|
|
+ var orderItem = new Object();
|
|
|
+ orderItem.itemColorId = $(this).find(".color_id").val();
|
|
|
+ orderItem.itemNum = $(this).find(".item-num").val();
|
|
|
+ orderItemArray.push(orderItem);
|
|
|
+ flag = true;
|
|
|
+ })
|
|
|
+ if(!flag){
|
|
|
+ vailErrorMsg($(".add-order-button"),"必须要有一个产品");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ $("#orderItemString").val(JSON.stringify(orderItemArray));
|
|
|
+
|
|
|
$.ajax({
|
|
|
cache: true,
|
|
|
type: "POST",
|
|
@@ -392,15 +420,15 @@
|
|
|
async: false,
|
|
|
success: function(data){
|
|
|
if (data.returnCode == 200) {
|
|
|
- //询问框
|
|
|
- layer.msg('签收成功,请及时转入品检部门',{icon: 1,time:3000},function () {
|
|
|
+ layer.msg('签收成功',{icon: 1,time:1000},function () {
|
|
|
+ location.replace(location.href);
|
|
|
window.location.href= "${path}/admin/signclosed/select_signclosed_list";
|
|
|
});
|
|
|
- } else if(data.returnCode == 501) {
|
|
|
- layer.msg('机器编号未填写',{icon: 5,time:1000});
|
|
|
} else if(data.returnCode == 502) {
|
|
|
layer.msg('请至少选择一件已签收的产品',{icon: 5,time:1000});
|
|
|
- }else {
|
|
|
+ } else if(data.returnCode == 503) {
|
|
|
+ layer.msg('有产品数量未填写,如本次签收没有此产品,请删除',{icon: 5,time:1000});
|
|
|
+ }else{
|
|
|
layer.msg('添加失败',{icon: 5,time:1000});
|
|
|
}
|
|
|
},
|
|
@@ -409,6 +437,19 @@
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+ /**
|
|
|
+ * 删除商品
|
|
|
+ */
|
|
|
+ function delProduct($this){
|
|
|
+ $this.parents("tr").remove();
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 打开商品列表
|
|
|
+ */
|
|
|
+ function add_product() {
|
|
|
+ layer_show("商品列表", "${path}/admin/salesOrder/to_add_product","1000","500");
|
|
|
+ }
|
|
|
</script>
|
|
|
<!--/请在上方写此页面业务相关的脚本-->
|
|
|
</body>
|