123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486 |
- <!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">
- <title>添加检测记录</title>
- <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;font-size: 16px;padding-left: 10px;color: #50a2ea;display: inline-block;}
- .tit-2:after{content: '';position: absolute;left: 0;top: 50%;height: 6px;width: 6px;border-radius: 6px;margin-top: -3px; background-color: #32a3d8;}
- .my-title{font-weight: 500;padding-left: 15px;position: relative;}
- .my-title:after{content: '';position: absolute;left: 0;top:12%;width: 3px;height: 80%;background: #32a3d8;}
- .my-input{padding: 8px 5px;width: 80%;border:1px solid rgba(0,0,0,.1);}
- .my-input-date{padding: 8px 10px;border:1px solid rgba(0,0,0,.1);width: 80%;background: url(http://s.iamberry.com/images/rili-1.png) 98.5% center no-repeat; background-size:auto 50%;}
- .input-box{margin: 18px 0;}
- .input-dic{float: left;margin:5px 10px 0 0;font-size: 14px;}
- .add-list{list-style-type: none;padding: 10px;background-color: #f5f5f5;width: 60%;float: left;margin: 0;}
- .add-list>li{margin: 10px 0;}
- .my-textarea{padding: 5px 10px;width: 77%;border:1px solid rgba(0,0,0,.1);margin-left: 12.5%;}
- .my-btn-reset{padding: 10px 20px;width: 150px; background-color: #fff;color: #32a3d8;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
- .my-btn-submit{padding: 10px 20px;width: 158px; background-color: #50a2ea;color: #fff;border: 1px solid #50a2ea;cursor:pointer;margin: 10px 10px 0 10px;}
- .my-select {
- border: 1px solid rgba(0,0,0,.1);
- padding: 6px 50px 6px 15px;
- height: 34px;
- -webkit-appearance: none;
- appearance: none;
- background: url(/common/images/pts/select-11.png) right center no-repeat;
- background-size: auto 100%;
- }
- .check-box, .radio-box{padding-left: 0;}
- 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;}
- .huanhang{ float:left}
- 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>
- <meta name="keywords" content="${path}">
- <meta name="description" content="H-ui.admin v3.0,是一款由国人开发的轻量级扁平化网站后台模板,完全免费开源的网站后台管理系统模版,适合中小型CMS后台系统。">
- </head>
- <body>
- <article class="page-container">
- <form class="form form-horizontal" id="form-admin-add">
- <div class="row cl">
- <label class="form-label col-3">
- <div class="tit-2">检测信息</div>
- </label>
- <div class="formControls col-9">
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-3 col-sm-3" style="padding-right: 10px;"><span class="c-red">*</span>所属公司:</label>
- <div class="formControls col-9 col-sm-9" style="padding-left: 5px;">
- <#if companyInfoList?? && (companyInfoList?size > 0) >
- <#list companyInfoList as companyInfo>
- <div class="radio-box">
- <input type="radio" name="companyId" <#if companyInfo_index == 0>checked="checked"</#if>value="${companyInfo.companyId!''}" datatype="*" nullmsg="请选择所属公司!">
- <label for="tel-1">${companyInfo.companyName!''}</label>
- </div>
- </#list>
- </#if>
- </div>
- </div>
- <#--<div class="input-box">
- <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;">客诉编号:</label>
- <div class="formControls col-xs-9 col-sm-9 skin-minimal" style="margin: 10px 0px;padding-left: 0;">
- <input class="my-input" type="text" style="width:510px;" name="customerId" id="customerId" placeholder="请输入客诉编号,如没有请留空"/>
- </div>
- </div>-->
- <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)>
- <#list listComplaintQuestionInfo as info>
- <option value="${info.questionId!""}">${info.questionName!""}</option>
- </#list>
- </#if>
- </select>
- </div>
- </div>
- <div class="input-box" >
- <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;"><span class="c-red">*</span>问题描述:</label>
- <div class="formControls col-xs-9 col-sm-9">
- <div class="radio-box">
- <textarea rows="2" style="width: 410px;margin-left: -15px;margin-top: 8px;" cols="20" name="questionDescription" id="questionDescription" class="my-textarea" placeholder="请输入问题描述!"></textarea>
- </div>
- </div>
- </div>
- <div class="input-box">
- <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;">业务员:</label>
- <div class="formControls col-xs-9 col-sm-9 skin-minimal" style="margin: 10px 0px;padding-left: 0;">
- <select id="salesmanAdminId" name="salesmanAdminId" class="chosen" style="width: 93%;">
- <option value="">请选择业务员</option>
- <#if (listAdmin?size > 0)>
- <#list listAdmin as info>
- <option value="${info.adminId!""}">${info.adminName!""}</option>
- </#list>
- </#if>
- </select>
- </div>
- </div>
- <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-9 col-sm-9 huanhang" style="margin: 10px 0px 10px 0;padding-left: 0;">
- <input class="my-input" type="text" name="detectName" id="detectName" placeholder="请输入客户姓名或昵称" style="width: 146px;"/>
- <input class="my-input" type="text" name="detectTel" id="detectTel" placeholder="请输入客户电话或手机号码" style="width: 146px;"/>
- </div>
- </div>
- <div class="input-box" id="updateDetect_3">
- <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-9 col-sm-9 huanhang" style="margin: 10px 0px 10px 0;padding-left: 0;">
- <select class="my-select" id="procTypeId" name="procTypeId" style="width: 158px;">
- </select>
- <select class="my-select" id="procMethodId" name="methodId" style="width: 158px;">
- </select>
- </div>
- </div>
- <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-9 col-sm-9 huanhang" style="margin: 10px 0px 10px 0;padding-left: 0;">
- <select id="productId" name="productId" class="my-select" style="width: 158px;">
- <#if (productList?size > 0)>
- <#list productList as product>
- <option value="${product.productId!""}">${product.productName!""}</option>
- </#list>
- </#if>
- </select>
- <select id="productColorId" name="productColorId" class="my-select" style="width: 158px;">
- <#if (productColorList?size > 0)>
- <#list productColorList as productColor>
- <option value="${productColor.colorId!""}">${productColor.colorName!""}</option>
- </#list>
- </#if>
- </select>
- </div>
- </div>
- <div class="input-box" >
- <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;">备注信息:</label>
- <div class="formControls col-xs-9 col-sm-9">
- <div class="radio-box">
- <textarea rows="3" style="width: 410px;margin-left: -15px;margin-top: 8px;" cols="20" name="detectItemDesc" id="detectItemDesc" class="my-textarea" placeholder="请输入备注!"></textarea>
- </div>
- </div>
- </div>
- <div class="input-box" style="margin-left: 30%">
- <button type="button" class="my-btn-submit" onclick="add();" style="margin-top: 50px;">确认提交</button>
- </div>
- </form>
- </article>
- <script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
- <script type="text/javascript">
- /**
- * 客诉处理方式回显 state
- */
- procType();
- $("#procTypeId").change(function (){
- var procTypeId = parseInt($(this).val());
- procMethod(procTypeId);
- });
- function procType(){
- var procTypeId;
- $.ajax({
- cache: true,
- type: "POST",
- url: "${path}/admin/proc/type",
- async: false,
- success: function(data){
- if (data.returnCode == 200) {
- var html = '';
- if (data.returnCode == 200) {
- for(var i=0;i<data.returnMsg.list.length;i++){
- listInfo = data.returnMsg.list[i];
- if(i == 1 ){
- procTypeId = listInfo.procTypeId;
- }
- if(listInfo.procTypeId === 2 || listInfo.procTypeId === 3 || listInfo.procTypeId === 4 ){
- html += '<option value="'+ listInfo.procTypeId +'">'+ listInfo.procTypeName +'</option>';
- }
- }
- }else{
- html = '';
- }
- $("[name='procTypeId']").html(html);
- }
- },
- error: function(XmlHttpRequest, textStatus, errorThrown){
- }
- })
- procMethod(procTypeId);
- }
- function procMethod(procTypeId){
- $.ajax({
- cache: true,
- type: "POST",
- data: {"procTypeId":procTypeId},
- url: "${path}/admin/proc/method",
- async: false,
- success: function(data){
- if (data.returnCode == 200) {
- var html = '';
- if (data.returnCode == 200) {
- for(var i=0;i<data.returnMsg.list.length;i++){
- listInfo = data.returnMsg.list[i];
- html += '<option value="'+ listInfo.procMethodId +'">'+ listInfo.procMethodName +'</option>';
- }
- }else{
- html = '';
- }
- $("#procMethodId").html(html);
- }
- },
- error: function(XmlHttpRequest, textStatus, errorThrown){
- }
- })
- }
- /**
- * 客诉处理方式回显 end
- */
- function inputSelect(){
- var input_select=$("#content").val();
- var option_length=$("#contentlist option").length;
- var option_id='';
- for(var i=0;i<option_length;i++){
- var option_value=$("#contentlist option").eq(i).attr('data-value');
- if(input_select==option_value){
- option_id=$("#contentlist option").eq(i).attr('data-id')
- break;
- }
- }
- $.ajax({
- cache: true,
- type: "POST",
- url: "${path}/admin/detect/getDetectionBasis",
- data:{basisId:option_id},
- async: false,
- success: function(data){
- if (data.returnCode == 200) {
- if(data.returnMsg.detectionBasis != null){
- $("#detectItemPhenomenon").val(data.returnMsg.detectionBasis.basisPhenomenon);
- $("#detectItemClassification").val(data.returnMsg.detectionBasis.basisClassification);
- $("#detectItemFailureCause").val(data.returnMsg.detectionBasis.basisFailureCause);
- $("#detectItemResults").val(data.returnMsg.detectionBasis.basisResults);
- $("#detectItemPoint").val(data.returnMsg.detectionBasis.basisPoint);
- $("#detectItemNalysis").val(data.returnMsg.detectionBasis.basisNalysis);
- $("#detectItemContent").val(data.returnMsg.detectionBasis.basisContent);
- }
- }
- },
- error: function(XmlHttpRequest, textStatus, errorThrown){
- layer.msg('添加错误',{icon: 5,time:1000});
- }
- });
- };
- //查询产品颜色信息
- $('#productId').change(function(){
- getProduct($(this).children('option:selected').val())
- })
- function getProduct(productId) {
- $.ajax({
- cache: true,
- type: "POST",
- url: "${path}/admin/product/get_product",
- data:{colorProductId:productId},// 你的formid
- async: false,
- success: function(data){
- if (data.returnCode == 200) {
- $("#productColorId").empty();
- if(data.returnMsg.productColorList.length > 0){
- for(var i=0;i<data.returnMsg.productColorList.length;i++){
- var productColor = data.returnMsg.productColorList[i];
- $("#productColorId").append('<option value='+productColor.colorId+'>'+productColor.colorName+'</option>');
- }
- }
- }
- },
- error: function(XmlHttpRequest, textStatus, errorThrown){
- layer.msg('添加错误',{icon: 5,time:1000});
- }
- });
- }
-
- function add() {
- var questionId = $("#questionId").val();
- if( questionId == null || questionId == "" ){
- layer.msg('请选择客户问题',{icon: 5,time:1000});
- return;
- }
- $.ajax({
- cache: true,
- type: "POST",
- url: "${path}/admin/detect/add_detect",
- data:$('#form-admin-add').serialize(),// 你的formid
- async: false,
- success: function(data){
- if (data.returnCode == 200) {
- layer.msg('添加成功',{icon: 1,time:1000},function () {
- location.replace(location.href);
- window.location.href= "${path}/admin/detect/select_detect_list";
- });
- } else {
- layer.msg('添加失败',{icon: 5,time:1000});
- }
- },
- error: function(XmlHttpRequest, textStatus, errorThrown){
- layer.msg('添加错误',{icon: 5,time:1000});
- }
- });
- }
- /*监听问题类型 选择事件*/
- $("[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: "没有找到结果!",//搜索无结果时显示的提示
- 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: '320px', //设置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。
- });
- $('.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时才能看出效果
- });
- </script>
- </body>
- </html>
|