|
@@ -69,6 +69,12 @@
|
|
|
<div class="input-box">
|
|
|
<label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>客户问题:</label>
|
|
|
<div class="formControls col-xs-9 col-sm-9 skin-minimal" style="margin: 10px 0px;padding-left: 0;">
|
|
|
+ <select name="complaintId" id="complaintId" class="chosen3" style="width: 43px;">
|
|
|
+
|
|
|
+ </select>
|
|
|
+ <select name="smallClassId" id="smallClassId" class="chosen3" style="width: 43px;">
|
|
|
+
|
|
|
+ </select>
|
|
|
<select id="questionId" name="questionId" class="chosen" style="width: 93%;">
|
|
|
<option value="">请选择客户问题</option>
|
|
|
<#if (listComplaintQuestionInfo?size > 0)>
|
|
@@ -341,6 +347,113 @@
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ /*监听问题类型 选择事件*/
|
|
|
+ $("[name='complaintId']").change(function(){
|
|
|
+ initComplaintSmallClassInfo($(this).val());
|
|
|
+ });
|
|
|
+
|
|
|
+ initComplaintTypeInfo();
|
|
|
+ /*初始化问题大类*/
|
|
|
+ function initComplaintTypeInfo() {
|
|
|
+ var customerCounselTypeOverall = null;
|
|
|
+ var complaintType = null;
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ data: {
|
|
|
+ complaintConsultingType : customerCounselTypeOverall,
|
|
|
+ complaintType : complaintType
|
|
|
+ },
|
|
|
+ url: "${path}/admin/complaintQuestion/list_complaintType",
|
|
|
+ async: true,
|
|
|
+ success: function(data){
|
|
|
+ var html = '';
|
|
|
+ var id;
|
|
|
+ if (data.returnCode == 200) {
|
|
|
+ for(var i=0;i<data.returnMsg.complaintTypeInfoList.length;i++){
|
|
|
+ var complaintTypeInfo = data.returnMsg.complaintTypeInfoList[i];
|
|
|
+ if(i == 0 ){
|
|
|
+ id = complaintTypeInfo.complaintId;
|
|
|
+ }
|
|
|
+ html += '<option value="'+ complaintTypeInfo.complaintId +'">'+ complaintTypeInfo.complaintClassName +'</option>';
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ html = '';
|
|
|
+ }
|
|
|
+ $("[name='complaintId']").html(html);
|
|
|
+ $("#complaintId").trigger("chosen:updated");//初始化
|
|
|
+ initComplaintSmallClassInfo(id);
|
|
|
+ },
|
|
|
+ error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ /*显示小类*/
|
|
|
+ function initComplaintSmallClassInfo(complaintId,smallId){
|
|
|
+ if(complaintId == null || complaintId == ""){
|
|
|
+ var html = '';
|
|
|
+ $("[name='smallClassId']").html(html);
|
|
|
+ }else{
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ data: {
|
|
|
+ complaintId : complaintId
|
|
|
+ },
|
|
|
+ url: "${path}/admin/complaintQuestion/list_complaintSmallClass",
|
|
|
+ async: true,
|
|
|
+ success: function(data){
|
|
|
+ var html = '';
|
|
|
+ if (data.returnCode == 200) {
|
|
|
+ for(var i=0;i<data.returnMsg.complaintSmallClassInfoList.length;i++){
|
|
|
+ var ComplaintSmallClassInfo = data.returnMsg.complaintSmallClassInfoList[i];
|
|
|
+ html += '<option value="'+ ComplaintSmallClassInfo.smallClassId +'">'+ ComplaintSmallClassInfo.smallClassName +'</option>';
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ html = '';
|
|
|
+ }
|
|
|
+ $("[name='smallClassId']").html(html);
|
|
|
+ $("#smallClassId").trigger("chosen:updated");//初始化
|
|
|
+ if(smallId != null && smallId != "" && typeof(smallId)!="undefined" ){
|
|
|
+ $("select[name='smallClassId']").val(smallId);
|
|
|
+ }
|
|
|
+ listQuestion();
|
|
|
+ },
|
|
|
+ error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /*监听问题类型 选择事件*/
|
|
|
+ $("[name='smallClassId']").change(function(){
|
|
|
+ listQuestion();
|
|
|
+ });
|
|
|
+ function listQuestion(){
|
|
|
+ var smallClassId = $("#smallClassId").val();
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ data: {
|
|
|
+ smallClassId : smallClassId
|
|
|
+ },
|
|
|
+ url: "${path}/admin/complaintQuestion/list_question_all",
|
|
|
+ async: false,
|
|
|
+ success: function(data){
|
|
|
+ var html = "";
|
|
|
+ if (data.returnCode == 200) {
|
|
|
+ for(var i=0;i<data.returnMsg.complaintQuestionInfoList.length;i++){
|
|
|
+ var complaintQuestion= data.returnMsg.complaintQuestionInfoList[i];
|
|
|
+ html += '<option value="'+ complaintQuestion.questionId +'">'+ complaintQuestion.questionName +'</option>';
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ html = '';
|
|
|
+ }
|
|
|
+ $("#questionId").html(html);
|
|
|
+ $("#questionId").trigger("chosen:updated");//初始化
|
|
|
+ },
|
|
|
+ error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
$('.chosen').chosen({
|
|
|
no_results_text: "没有找到结果!",//搜索无结果时显示的提示
|
|
@@ -358,6 +471,23 @@
|
|
|
group_search: false, //选项组是否可搜。此处搜索不可搜
|
|
|
include_group_label_in_selected: true //选中选项是否显示选项分组。false不显示,true显示。默认false。
|
|
|
});
|
|
|
+ $('.chosen3').chosen({
|
|
|
+ no_results_text: "没有找到结果!",//搜索无结果时显示的提示
|
|
|
+ search_contains:true, //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置为false,则要求从选项开头开始匹配
|
|
|
+ allow_single_deselect:true, //单选下拉框是否允许取消选择。如果允许,选中选项会有一个x号可以删除选项
|
|
|
+ disable_search: false, //禁用搜索。设置为true,则无法搜索选项。
|
|
|
+ disable_search_threshold: 0, //当选项少等于于指定个数时禁用搜索。
|
|
|
+ inherit_select_classes: true, //是否继承原下拉框的样式类,此处设为继承
|
|
|
+ placeholder_text_single: '选择国家', //单选选择框的默认提示信息,当选项为空时会显示。如果原下拉框设置了data-placeholder,会覆盖这里的值。
|
|
|
+ width: '120px', //设置chosen下拉框的宽度。即使原下拉框本身设置了宽度,也会被width覆盖。
|
|
|
+ max_shown_results: 1000, //下拉框最大显示选项数量
|
|
|
+ display_disabled_options: false,
|
|
|
+ single_backstroke_delete: false, //false表示按两次删除键才能删除选项,true表示按一次删除键即可删除
|
|
|
+ case_sensitive_search: false, //搜索大小写敏感。此处设为不敏感
|
|
|
+ group_search: false, //选项组是否可搜。此处搜索不可搜
|
|
|
+ include_group_label_in_selected: true //选中选项是否显示选项分组。false不显示,true显示。默认false。
|
|
|
+ });
|
|
|
+
|
|
|
$('.chosen2').chosen({
|
|
|
search_contains:false,
|
|
|
enable_split_word_search: true //分词搜索,选项词可通过空格或'[]'分隔。search_contains为false时才能看出效果
|