Browse Source

修改客诉问题

liujiankang 7 years ago
parent
commit
38506b8241

+ 1 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/add_customer.ftl

@@ -215,7 +215,7 @@
                     <input type="button" class="btn btn-primary" value="发送问题回复给用户" onclick="sendPhone('p','p-msg');">
                 </div>
                 <div class="formControls col-2 col-sm-2" style="width: 10%;    margin-left: 40px;">
-                    <input type="button" class="btn btn-primary" value="保存QA" onclick="saveQuestion();">
+                    <input type="button" class="btn btn-primary" value="保存QA" onclick="saveQuestion(1);">
                 </div>
                 <div class="formControls col-2 col-sm-2 msg-phone">
                     <div id="p-msg" style="color: #e00"></div>

+ 11 - 4
watero-rst-web/src/main/webapp/common/js/customer/customer.js

@@ -820,8 +820,8 @@ function sendPhone(type,node){
     });
 }
 
-/*保存QA问题*/
-function saveQuestion(){
+/*保存QA问题  type=1 表示为用户点击 type=2表示自动触发*/
+function saveQuestion(type){
     var index = layer.load(1, {
         shade: [0.5,'#fff'] //0.1透明度的白色背景
     });
@@ -863,9 +863,14 @@ function saveQuestion(){
         success: function(data){
             if (data.returnCode == 200) {
                 $("#questionId").val(data.returnMsg.questionId);
-                layer.msg(data.resultMsg, {icon: 1, time: 3000});
+                if(type == 1){
+                    layer.msg(data.resultMsg, {icon: 1, time: 3000});
+                }
+
             }else{
-                layer.msg(data.resultMsg, {icon: 5, time: 3000});
+                if(type == 1) {
+                    layer.msg(data.resultMsg, {icon: 5, time: 3000});
+                }
             }
             layer.close(index);
         },
@@ -1397,6 +1402,8 @@ $(function(){
 
 /* 添加客诉的准备 */
 function addCustomerReady(){
+    //保存AQ
+    saveQuestion(2);
     /* 录入电话号码和姓名到客诉基本信息里面  */
     /*if(allCustomerType == 3 || allCustomerType == 4 || allCustomerType == 5 || allCustomerType == 6 || allCustomerType == 7){
         $("#customerName").val($("#sendName").val());