Jelajahi Sumber

修改了客诉页面

liuzhiwei 7 tahun lalu
induk
melakukan
9c041639f3

+ 24 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/add_visit.ftl

@@ -132,6 +132,27 @@
         msg = '';
         var visitTimeSelect = $('input[name="visitTimeSelect"]:checked').val();
         var visitAdminId = $("#visitAdminId option:selected").val();
+
+        var visit_date = $('#visitDate').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) {
+                msg = '该时间已超过当前时间,请重新选择回访时间!';
+                flag = false;
+                return;
+            } else if (hours > 14 && visitTimeSelect == 2) {
+                msg = '该时间已超过当前时间,请重新选择回访时间!';
+                flag = false;
+                return;
+            } else if (hours > 16 && visitTimeSelect == 3) {
+                msg = '该时间已超过当前时间,请重新选择回访时间!';
+                flag = false;
+                return;
+            }
+        }
         if (!uname.test($('#visitName').val().trim())) {
             msg = '回访人姓名格式不正确,请重新填写!';
             flag = false;
@@ -157,6 +178,8 @@
             flag = false;
             return;
         }
+
+
     }
 
     /**
@@ -164,6 +187,7 @@
      */
     function addVisitInfo() {
         checkValue();
+        flag = false;
         if (flag) {
             $.ajax({
                 cache: true,

+ 19 - 16
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/custome_detail.ftl

@@ -148,10 +148,11 @@
             </div>
             <div class="row cl" id="divCloseProdcue">
                 <label class="form-label col-1 col-sm-1">寄回产品:</label>
-                <div class="formControls col-5 col-sm-5">
-                    <label id="closeprodcue"></label>
+                <div class="formControls col-7 col-sm-7">
+                    <div class="update-parts" id="closeprodcue"></div><br/>
                     <!--TDS收集-->
                     <label id="customerTDS"></label>
+                    <div style="border-bottom:#ddd 1px solid; overflow:hidden"></div>
                 </div>
 
             </div>
@@ -164,21 +165,20 @@
             </div>
             <div class="row cl" id="divSendProdcue">
                 <label class="form-label col-1 col-sm-1">寄送产品:</label>
-                <div class="formControls col-10 col-sm-10">
-                    <label id="sendprodcue"></label>
+                <div class="formControls col-7 col-sm-7">
+                    <div class="update-parts" id="sendprodcue"></div>
                 </div>
             </div>
         </div>
 
         <div class="row cl">
             <label class="form-label col-1 col-sm-1">处理描述:</label>
-            <div class="formControls col-5 col-sm-5">
-                <textarea id="describeHandleDesc" cols="" rows="2" class="textarea" placeholder="说点什么..."></textarea>
+            <div class="formControls col-7 col-sm-7" id="describeHandleDesc" style="border: 1px solid #ddd;">
             </div>
         </div>
         <div class="row cl">
             <label class="form-label col-1 col-sm-1">回访信息:</label>
-            <div class="formControls col-5 col-sm-5">
+            <div class="formControls col-7 col-sm-7">
                 <label id="txtVisit"></label>
             </div>
         </div>
@@ -289,26 +289,26 @@
                     $('#salesItem').html(salesItem);
                     $('#salesPayTime').html(salesOrder.salesPayTime);
                     $('#relationSendMergeAddress').html(customerCommon.relationSendMergeAddress+"-"+customerCommon.relationSendAddress);
-                    $('#describeHandleDesc').val(customer.describeHandleDesc);
+                    $('#describeHandleDesc').html(customer.describeHandleDesc);
 
                     if (customerCommon.sendProdcues != null && customerCommon.sendProdcues.length > 0) {
                         $.each(customerCommon.sendProdcues,function(index,item){
-                            sendprodcue += this.sendProduceName + '*' + this.sendProdcueNumber
+                            sendprodcue += '<span style="margin-bottom: 10px;display: inline-block;float: left;">' + this.sendProduceName + '*' + this.sendProdcueNumber + '</span>';
                         })
                     }
                     if (customerCommon.sendFittings != null && customerCommon.sendFittings.length > 0) {
                         $.each(customerCommon.sendFittings,function(index,item){
-                            sendprodcue += this.sendProductName + '*' + this.sendFittingNumber
+                            sendprodcue += '<span style="margin-bottom: 10px;display: inline-block;float: left;">' + this.sendProductName + '*' + this.sendFittingNumber + '</span>';
                         })
                     }
                     if (customerCommon.closedProdcues != null && customerCommon.closedProdcues.length > 0) {
                         $.each(customerCommon.closedProdcues,function(index,item){
-                            closeprodcue += this.closedProductName + '*' + this.closedProdcueNumber
+                            closeprodcue += '<span style="margin-bottom: 10px;display: inline-block;float: left;">' + this.closedProductName + '*' + this.closedProdcueNumber + '</span>';
                         })
                     }
                     if (customerCommon.closedFittings != null && customerCommon.closedFittings.length > 0) {
                         $.each(customerCommon.closedFittings,function(index,item){
-                            closeprodcue += this.fittingName + '*' + this.closedFittingNumber
+                            closeprodcue += '<span style="margin-bottom: 10px;display: inline-block;float: left;">' + this.fittingName + '*' + this.closedFittingNumber + '</span>';
                         })
                     }
                     $('#sendprodcue').html(sendprodcue+"<br/>");
@@ -323,7 +323,7 @@
                     } else {
                         $('#divCloseProdcue').hide();
                     }
-                    $('#customerTDS').html("TDS收集:"+customerCommon.relationSendMergeAddress+",进水"+
+                    $('#customerTDS').html("<strong>TDS收集:</strong>"+customerCommon.relationSendMergeAddress+",进水"+
                             (customer.customerInTDS==undefined?0:customer.customerInTDS)+"ppm"+",出水"+(customer.customerOutTDS==undefined?0:customer.customerOutTDS)+"ppm");
 
                     if (customer.customerIsVisit == '2') {
@@ -333,9 +333,12 @@
                             case 2:visitTime = '12:00-14:00';break;
                             case 3:visitTime = '14:00-18:00';break;
                         }
-                        $('#txtVisit').html("("+customer.visitName+")&nbsp;&nbsp;"+"在&nbsp;&nbsp;"+customer.visitDate+
-                                "&nbsp;&nbsp;"+visitTime+"对&nbsp;&nbsp;"+customer.visitCompleteName+"&nbsp;&nbsp;"+
-                                customer.visitCompleteTel+"&nbsp;&nbsp;完成回访");
+                        var visitText = '(<span class="txt-red">'+convertUndefinedToEmpty(customer.visitName)+'</span>)&nbsp;&nbsp;'+
+                                        '在&nbsp;&nbsp;<span class="txt-red">'+convertUndefinedToEmpty(customer.visitDate)+
+                                        '&nbsp;&nbsp;'+convertUndefinedToEmpty(visitTime)+'</span>对&nbsp;&nbsp;<span class="txt-red">'+
+                                        convertUndefinedToEmpty(customer.visitCompleteName)+'&nbsp;&nbsp;'+
+                                        convertUndefinedToEmpty(customer.visitCompleteTel)+'</span>&nbsp;&nbsp;完成回访';
+                        $('#txtVisit').html(visitText);
                     }
                 }
             },