| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090 |
- /**
- * 修改工单
- * */
- //获取 id
- var oid = helper.request.queryString("oid");
- $(function() {
- autosize($('textarea'));
- //获取工单来源 获取业务办理 获取工单类型
- $.when(helper.getDropList.getlistDropByDic($('#order_source'), 'GDLY'),
- helper.getDropList.getlistDropByDic($('#order_handle'), 'YWLX'),
- helper.getDropList.getOrderRadios($('#order_type'), 'GDLX', 'inlineRadioOptions'))
- .then(function(){
- if(oid) {
- getWorkOrderDetails(oid); //获取工单信息
- }
- });
-
- //工单有效性
- $('#order_iseffective').find('input[type="radio"]').on('change', function() {
- //是否有效工单项(0有效,1无效)
- if($(this).val() === "1") { //无效
- $('.order_note').show();
- } else {
- $('.order_note').hide();
- }
- });
-
- //新增工单创建
- $('#save_order').on('click', orderSave);
- });
- function clearInter() {
- clearInterval(timer);
- }
- var callId = helper.request.queryString("cid");
- // $(function() {
- //
- // autosize($('textarea'));
- // getWorkOrderDetails()
- //
- $('#save_order').click(function(){//ID为test的元素点击时
- orderSave();
- });
- // // 指派按钮
- // $('#save_vsv').click(function(){//ID为test的元素点击时
- // dealWorkOrder();
- // });
- // $('#empty').click(function(){//ID为test的元素点击时
- // cleanOrde();
- // });
- // });
- //投诉和抽检客户 物料编号清空
- function emptyct(){
- $('#number').val('');
- $('#salesman').val('');
- $('#telephone').val('');
- $('#District').val('');
- $('#Branice').val('');
- $('#manage').val('');
-
- $('#Code').val('');
- $('#material_name').val('');
- $('#model_number').val('');
- $('#specifications').val('');
- $('#category1').val('');
- $('#category2').val('');
- $('#category3').val('');
- $('#brand_name').val('');
- $('#efficiency').val('');
- $('#product_line').val('');
- $('#process').val('');
- $('#enter_formula').val('');
-
-
- }
- var catt;//问题类别
- var cttt;//投诉问题类别
- var comdi;//产品名称
- var coint; //销售基地
- var stion; //问题数量
- var shengch; //生产批次号
- var jyppai;
- var daqu;
- var fengo;
- var orderIsover;
- function typePro(){
- orderIsover=$('input:radio[name="type"]:checked').val();
- if(orderIsover === '1'){
- debugger
- catt = $('#category').val();//问题类别
- comdi = $('#ProductName').val();//产品名称
- stion = $('#Product_Quantity').val();//问题数量
- coint=$('#xiaoshou').val();//销售基地
- daqu='';
- fengo='';
- jyppai='';
- cttt='';
- shengch='';
- emptyct()
- $('#wlbm').hide();
- $('#wlmcc').hide();
- $('#clie').hide();
- $('#mate').hide();
- }else if(orderIsover=== '2'){
- daqu=$('#chdaqu').val();
- fengo=$('#chfen').val();
- jyppai=$('#brand_name').val();
- comdi = $('#product_name').val();//产品名称
- cttt = $("#cate").val();
- // if($("#catego").val()){
- // cttt = $("#cat").val()+"|"+$("#catego").val();
- // if($("#cate").val()){
- // cttt = $("#cat").val()+"|"+$("#catego").val()+"|"+$("#cate").val();
- // }
- // }
- catt = $("#cate").val();
- shengch=$('#Batch_number').val();//生产批次号
- stion = $('#quantity').val();//问题数量
- coint=$('#Sales_base').val();//销售基地
- }else if(orderIsover === '3'){
- daqu=$('#District').val();
- fengo=$('#Branice').val();
- jyppai=$('#brand_name').val();
- shengch=$('#batch_num').val();//生产批次号
- catt = $('#chou_wtlb').val();
- // cttt=$('#chou_wtlb').val();
- comdi ='';
- coint='';
- stion='';
- }else if(orderIsover === '4'){
- catt = $('#cateq').val();//问题类别
- comdi = $('#Produ_ctName').val();//产品名称
- stion = $('#Product_Quantity').val();//问题数量
- coint=$('#xiaosh').val();//销售基地
- daqu='';
- fengo='';
- jyppai='';
- cttt='';
- shengch='';
- emptyct()
- $('#wlbm').hide();
- $('#wlmcc').hide();
- $('#clie').hide();
- $('#mate').hide();
- // alert(catt)
- }
- }
- // 保存
- function orderSave() {
- typePro();
- var wURL = '';
- var oid = '';
- oid = helper.request.queryString("oid");
- var isDetail = helper.request.queryString("isDetail");
- // if(!regexs.userNameReg.test($.trim($('#order_name').val()))) {
- // layer.confirm('请输入有效的客户姓名(2-20位汉字可以包含·•)!', {
- // icon: 2,
- // btn: ['确定']
- // });
- // return;
- // }
- //
- // if(!regexs.phone.test($.trim($('#order_tel').val()))) {
- // layer.confirm('请输入正确的电话!', {
- // icon: 2,
- // btn: ['确定']
- // });
- // return;
- // }
- var order_handle = $('#order_handles').is(':visible') ? $('#order_handle').val() : 0;
- $.post(huayi.config.callcenter_url + "WorkOrderNew/Update", {
- F_ID: oid, //int 工单id;
- F_Source:$('#godanlx').val(),//
- // F_CompanyName: $('#order_company').val(),// 公司名称
- F_Type: $('#order_isover').find('input[type="radio"]:checked').val(), //工单类型
- //公共字段
- F_CusName: $('#kehuxing').val(),//客户姓名
- F_CusPhone: $('#kehudian').val(),//客户电话
- F_IncidentProvince: $('#sheng').val(),//string 省
- F_IncidentCity: $('#shi').val(),// 市
- F_IncidentCountry: $('#quxian').val(),//区/县
- F_IncidentTownship: $('#xiang').val(),//乡
- F_IncidentDetailed: $('#xiangxi').val(),//详细地址
- F_Description: $('#reception').val(),//问题描述
- //咨询模块
- F_QuestionType:catt,//问题类别
- F_TS_Category: comdi,//产品名称
- F_ZX_Quantity: $('#Product_Quantity').val(),//问题数量
- F_SalesBase:coint,//销售基地
- //投诉模块
- F_BatchNumber:shengch,//生产批号
- F_TS_Formula: $('#formula').val(),//配方
- F_TS_Quantity:$('#quantity').val(),//问题数量(吨)
- F_TS_Level: $('#level').val(),//重要界别
- F_CustomerID: $('#number').val(),//客户编号
- F_Salesman: $('#salesman').val(),//业务员
- F_SalesPhone: $('#telephone').val(),//电话
- F_ZX_Area: $('#District').val(),//大区
- F_ZX_Branch: $('#Branice').val(),//分公司
- F_Brand: $('#manage').val(),//经营品牌
-
- F_MaterialID: $('#Code').val(),//客户编号
- F_CustomerID: $('#number').val(),//客户编号
- F_Model: $('#model_number').val(),//型号
- F_Specs: $('#specifications').val(),//规格
- F_Level1: $('#category1').val(),//一级分类
- F_Level2: $('#category2').val(),//二级分类
- F_Level3: $('#category3').val(),//三级分类
- F_Brand: $('#brand_name').val(),//品牌
- F_MaterialEffect: $('#efficiency').val(),//复合肥肥效
- F_Pipeline: $('#product_line').val(),//产品线
- F_Craft: $('#process').val(),//工艺
- F_Formula: $('#enter_formula').val(),//配方
-
- //抽检模块
- // F_CusName: $('#kxing').val(),//客户姓名
- // F_CusPhone: $('#kdian').val(),//客户电话
- // F_QuestionType:catt, //问题类别
- F_CJ_Time: $('#der_time').val(),//抽检时间
- F_CJ_Level: $('#der_level').val(),//抽检级别
- F_CJ_Unit: $('#der_Company').val(),//抽检单位
- F_CJ_TestUnit: $('#der_Test').val(),//化验单位
- F_CJ_Tonnage: $('#der_Tonnage').val(),//抽检吨数
- F_CJ_BagNo: $('#der_Ton').val(),//抽检袋数
- F_CJ_Outlay: $('#der_Amount').val(),//公关费用金额
-
- token: $.cookie("token")
- }, function(result) {
- result = $.parseJSON(result);
- if(result.state.toLowerCase() == "success") {
- if(isDetail === "true") {
- parent.parent.layer.closeAll();
- parent.parent.$('#derlist').bootstrapTable('refresh');
- parent.parent.layer.msg("修改成功");
- }
- else {
- var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
- parent.layer.close(index); //再执行关闭
- parent.$('#workorderlist').bootstrapTable('refresh');
- parent.$('.Closed').trigger('click');
- parent.layer.msg("保存成功");
- }
- top.workcount();
- }
- })
- }
- //获取工单详情
- function getWorkOrderDetails(oid) {
- $.getJSON(huayi.config.callcenter_url + 'WorkOrderNew/GetDetails', {
- id: oid,
- "token": $.cookie("token")
- }, function(result) {
- if(result.state.toLowerCase() == "success") {
- if(result.rows && result.rows.length > 0) {
- var data = result.rows[0];
- $("#lygon").text(data.F_SourceName);
- // 咨询模块
- $("#category option:selected").text(data.F_QuestionType);//问题类别
- $("#ProductName option:selected").text(data.F_ZX_ProName);//产品名称
- $('#Product_Quantity').val(data.F_ZX_Quantity);//问题数量
- $("#xiaoshou option:selected").text(data.F_SalesBase);//销售基地
- // 投诉模块
- $("#product_name option:selected").text(data.F_ZX_ProName);//产品名称
- $('#quantity').val(data.F_TS_Quantity);//问题数量
- $('#Batch_number').val();//生产批次
- $("#Sales_base option:selected").text(data.F_SalesBase);//销售基地
- $("#level option:selected").text(data.F_TS_Level);//重要级别
- $("#cat option:selected").text(data.F_QuestionTypeone);//问题类别1
- $("#catego option:selected").text(data.F_QuestionTypetwo);//问题类别2
- $("#cate option:selected").text(data.F_QuestionType);//问题类别3
- // 抽检模块
- $("#chou_wtlb option:selected").text(data.F_QuestionType);//问题类别
- $("#der_level option:selected").text(data.F_CJ_Level);//抽检级别
- $('#batch_num').val(data.F_SC_QualityMonth);//生产批次号
- $("#der_Company option:selected").text(data.F_CJ_Unit);//抽检单位
- $('#der_Test').val(data.F_CJ_TestUnit);//化验单位
- $('#der_Tonnage').val(data.F_CJ_Tonnage);//抽检吨数
- $('#der_Ton').val(data.F_CJ_BagNo);//抽检袋数
- $('#der_Amount').val(data.F_CJ_Outlay);//公关费用金额
- $('#der_time').val(data.F_CJ_Time);//抽检时间
- // 建议及其他
- $("#cateq option:selected").text(data.F_QuestionType);//问题类别
- $("#Produ_ctName option:selected").text(data.F_QuestionType);//产品名称
- $('#Product_Quan').val();//问题数量
- $("#xiaosh option:selected").text(data.F_SalesBase);//销售基地
- // 公共模块
- $('#number').val(data.F_CustomerID);//客户编码
- $('#salesman').val(data.F_Salesman);//业务员
- $('#telephone').val(data.F_SalesPhone);//电话
- $("#chdaqu option:selected").text(data.F_AreaName);//大区
- $("#chfen option:selected").text(data.F_BranchName);//分公司
- $('#manage').val();//经营品牌
- //物料
- $('#Code').val(data.F_MaterialID);//物料编码
- $('#material_name').val(data.F_MaterialName);//物料名称
- $('#model_number').val(data.F_Model);//型号
- $('#specifications').val(data.F_Specs);//规格
- $('#category1').val(data.F_Level1);//一级分类
- $('#category2').val(data.F_Level2);//二级分类
- $('#category3').val(data.F_Level3);//三级分类
- $('#brand_name').val(data.F_Brand);//品牌
- $('#efficiency').val(data.F_MaterialEffect);//复合肥肥效
- $('#product_line').val(data.F_Pipeline);//产品线
- $('#process').val(data.F_Craft);//工艺
- $('#enter_formula').val(data.F_TS_Formula);//配方
- $('#kehuxing').val(data.F_CusName);//客户姓名
- $('#kehudian').val(data.F_CusPhone);//客户电话
- $("#sheng option:selected").text(data.F_IncidentProvince);// 省
- $("#shi option:selected").text(data.F_IncidentCity);//市
- $("#quxian option:selected").text(data.F_IncidentCountry);//区县
- $("#xiang option:selected").text(data.F_IncidentTownship);//乡
- $("#xiangxi").val(data.F_IncidentDetailed);//详细
- $('#reception').val(data.F_Description);//问题描述
- if(data.F_TypeName === "咨询") {
- $('#PageArrival').show(); //receive
- $('#Duration').hide();
- $('#Depth').hide();
- $('#Page').hide();
- $('#wlbm').hide();
- $('#wlmcc').hide();
- } else if(data.F_TypeName === "投诉") {
- $('#PageArrival').hide(); //receive
- $('#Duration').show();
- $('#Depth').hide();
- $('#Page').hide();
- $('#wlbm').show();
- $('#wlmcc').show();
- }else if(data.F_TypeName === "抽检"){
- $('#PageArrival').hide(); //receive
- $('#Duration').hide();
- $('#Depth').show();
- $('#Page').hide();
- $('#wlbm').show();
- $('#wlmcc').show();
- }else if(data.F_TypeName === "建议及其他"){
- $('#PageArrival').hide(); //receive
- $('#Duration').hide();
- $('#Depth').hide();
- $('#Page').show();
- $('#wlbm').hide();
- $('#wlmcc').hide();
- }
- }
- }
- });
- }
- //三级联动下拉
- $(document).ready(function () {
- var wid = helper.request.queryString("wid");
- LY($("#sheng"));//省
- SHENG($("#shengji"));
- XSJD($("#xiaoshou"));//销售基地
- XSJD($("#xiaosh"));//建议及其他销售基地
- XSJD($("#Sales_base"));//建议及其他销售基地
- ZXWTLB($("#category")); //咨询问题类别
- // ZXWTLB($("#categg")); //问题类别
- ZXCPMC($("#ProductName"));
- // ZXCPMC($("#ProductName"));
- ZXCPMC($("#product_name"));
- ZXCPMC($("#Produ_ctName"));//建议及其他产品名称
- DQ($("#District"));
- //投诉模块
- WTLB1($("#cat"));//问题类型1
- CPZL($("#Product_Category"));//产品名称
- WTLBCJ($("#chou_wtlb"));//抽检问题类型
- ZYJB($("#level"));//重要级别
- CJJP($("#der_level"));//抽检级别
- CJDW($("#der_Company"));//抽检单位
-
- DQQ($("#customer_comaddress")); //大区
- QDLX($("#customer_taxPointDes"));//添加客户渠道类型
- QDLX($("#channel"));//来电弹屏渠道类型
- XYDJ($("#customer_invoiceRange"));
- JYPP($("#customer_Qualification"));
- JYPP($("#management"));
- CAPI($("#customer_FinancialManager"));
- YFPP($("#customer_feeEx"));
- YFPP($("#fertilizer"));
- });
-
-
- // 客户信息里的 省/市/区/县
- // 咨询模块 省
- function LY(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "RegionCategory/GetAllList", {
- "token": $.cookie("token"),
- F_Layer: 1,
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_RegionName + "'>" + n.F_RegionName + "</option>").appendTo(obj);
- })
- }
- })
- }
- //市
- function LB(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "RegionCategory/GetAllList", {
- "token": $.cookie("token"),
- F_Layer: 2,
- F_RegionName:$('#sheng').val()
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_RegionName + "'>" + n.F_RegionName + "</option>").appendTo(obj);
- })
- }
-
- })
- }
- // 区/县
- function ZT(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "RegionCategory/GetAllList", {
- "token": $.cookie("token"),
- F_Layer: 3,
- F_RegionName:$('#shi').val()
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_RegionName + "'>" + n.F_RegionName + "</option>").appendTo(obj);
- })
- }
- })
- }
- // 乡
- function XX(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "RegionCategory/GetAllList", {
- "token": $.cookie("token"),
- F_Layer: 4,
- F_RegionName:$('#quxian').val()
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_RegionName + "'>" + n.F_RegionName + "</option>").appendTo(obj);
- })
- }
- })
- }
-
- $('#sheng').on('change',function(){
- $.getJSON(huayi.config.callcenter_url + "RegionCategory/GetAllList", {
- "token": $.cookie("token"),
- F_Layer: 2,
- F_RegionName:$('#sheng').val(),
-
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_RegionName + "'>" + n.F_RegionName + "</option>").appendTo("#shi");
- })
- LB($("#shi"));
- }
- })
- });
- $('#shi').on('change',function(){
- $.getJSON(huayi.config.callcenter_url + "RegionCategory/GetAllList", {
- "token": $.cookie("token"),
- F_Layer: 3,
- F_RegionName:$('#shi').val()
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_RegionName + "'>" + n.F_RegionName + "</option>").appendTo("#quxian");
- })
- ZT($("#quxian"));
- }
- })
- });
- $('#quxian').on('change',function(){
- $.getJSON(huayi.config.callcenter_url + "RegionCategory/GetAllList", {
- "token": $.cookie("token"),
- F_Layer: 4,
- F_RegionName:$('#quxian').val()
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_RegionName + "'>" + n.F_RegionName + "</option>").appendTo("#xiang");
- })
- XX($('#xiang'));
- }
- })
- });
-
-
-
-
- function SHENG(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "RegionCategory/GetAllList", {
- "token": $.cookie("token"),
- F_Layer: 1,
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_RegionName + "'>" + n.F_RegionName + "</option>").appendTo(obj);
- })
- }
- })
- }
- //市
- function SHI(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "RegionCategory/GetAllList", {
- "token": $.cookie("token"),
- F_Layer: 2,
- F_RegionName:$('#shengji').val()
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_RegionName + "'>" + n.F_RegionName + "</option>").appendTo(obj);
- })
- }
-
- })
- }
- // 区/县
- function QUXIAN(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "RegionCategory/GetAllList", {
- "token": $.cookie("token"),
- F_Layer: 3,
- F_RegionName:$('#shiji').val()
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_RegionName + "'>" + n.F_RegionName + "</option>").appendTo(obj);
- })
- }
- })
- }
- // 乡
- function XIANG(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "RegionCategory/GetAllList", {
- "token": $.cookie("token"),
- F_Layer: 4,
- F_RegionName:$('#quxianji').val()
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_RegionName + "'>" + n.F_RegionName + "</option>").appendTo(obj);
- })
- }
- })
- }
-
- $('#shengji').on('change',function(){
- $.getJSON(huayi.config.callcenter_url + "RegionCategory/GetAllList", {
- "token": $.cookie("token"),
- F_Layer: 2,
- F_RegionName:$('#shengji').val(),
-
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_RegionName + "'>" + n.F_RegionName + "</option>").appendTo("#shiji");
- })
- SHI($("#shiji"));
- }
- })
- });
- $('#shiji').on('change',function(){
- $.getJSON(huayi.config.callcenter_url + "RegionCategory/GetAllList", {
- "token": $.cookie("token"),
- F_Layer: 3,
- F_RegionName:$('#shiji').val()
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_RegionName + "'>" + n.F_RegionName + "</option>").appendTo("#quxianji");
- })
- QUXIAN($("#quxianji"));
- }
- })
- });
- $('#quxianji').on('change',function(){
- $.getJSON(huayi.config.callcenter_url + "RegionCategory/GetAllList", {
- "token": $.cookie("token"),
- F_Layer: 4,
- F_RegionName:$('#quxianji').val()
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_RegionName + "'>" + n.F_RegionName + "</option>").appendTo("#xiangji");
- })
- XIANG($("#xiangji"));
- }
- })
- });
- //销售基地
- function XSJD(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag", {
- "token": $.cookie("token"),
- flag:"XSJD",
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_Name + "'>" + n.F_Name + "</option>").appendTo(obj);
- })
- }
- })
- }
- //问题类别
- function ZXWTLB(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "WorkOrder/GetQuestionNameType", {
- "token": $.cookie("token"),
- type: 3,
- // pid:0,
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.id + "'>" + n.text + "</option>").appendTo(obj);
- })
- }
- })
- }
- function ZXCPMC(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag", {
- "token": $.cookie("token"),
- flag:"CPZL",
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_Name + "'>" + n.F_Name + "</option>").appendTo(obj);
- })
- }
- })
- }
- function DQ(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "Department/GetList", {
- "token": $.cookie("token"),
- F_Layer: 1,
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_DeptId + "'>" + n.F_DeptName + "</option>").appendTo(obj);
- })
- }
- })
- }
- function FENGONGSI(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "Department/GetList", {
- "token": $.cookie("token"),
- F_Layer: 2,
- F_DeptName:$("#District").find("option:selected").text(),
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_DeptId + "'>" + n.F_DeptName + "</option>").appendTo(obj);
- })
- }
- })
- }
- $('#District').on('change',function(){
- $.getJSON(huayi.config.callcenter_url + "Department/GetList", {
- "token": $.cookie("token"),
- F_Layer: 2,
- F_DeptName:$("#District").find("option:selected").text(),
-
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_DeptId + "'>" + n.F_DeptName + "</option>").appendTo("#Branice");
- })
- FENGONGSI($("#Branice"));
- }
- })
- });
- //抽检问题类别
- function WTLBCJ(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "WorkOrder/GetQuestionType", {
- "token": $.cookie("token"),
- type: 2,
- pid:0,
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.id + "'>" + n.text + "</option>").appendTo(obj);
- })
- }
- })
- }
- //问题类别1
- function WTLB1(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "WorkOrder/GetQuestionType", {
- "token": $.cookie("token"),
- type: 1,
- pid:0,
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.id + "'>" + n.text + "</option>").appendTo(obj);
- })
- }
- })
- }
- //问题类别2
- function WTLB2(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "WorkOrder/GetQuestionType", {
- "token": $.cookie("token"),
- type: 1,
- pid:$('#cat').val(),
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.id + "'>" + n.text + "</option>").appendTo(obj);
- })
- }
-
- })
- }
- // 问题类别3
- function WTLB3(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "WorkOrder/GetQuestionType", {
- "token": $.cookie("token"),
- type: 1,
- pid:$('#catego').val(),
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.id + "'>" + n.text + "</option>").appendTo(obj);
- })
- }
- })
- }
- $('#cat').on('change',function(){
- // alert($('#cat').val())
- WTLB2($("#catego"));//问题类型2
-
- // $.getJSON(huayi.config.callcenter_url + "WorkOrder/GetQuestionType", {
- // "token": $.cookie("token"),
- // type: 1,
- //
- // pid:$('#cat').val(),
- // }, function (data) {
- // if (data.state.toLowerCase() == "success") {
- // var content = data.data;
- // $(content).each(function (i, n) {
- // $("<option value='" + n.id + "'>" + n.text + "</option>").appendTo("#catego");
- // })
- //
- // }
- // })
- });
- $('#catego').on('change',function(){
- // alert($("#catego").val())
- WTLB3($("#cate"));//问题类型3
- // $.getJSON(huayi.config.callcenter_url + "WorkOrder/GetQuestionType", {
- // "token": $.cookie("token"),
- // type: 1,
- //
- // pid:$('#catego').val()
- // }, function (data) {
- // if (data.state.toLowerCase() == "success") {
- // var content = data.data;
- // $(content).each(function (i, n) {
- // $("<option value='" + n.id + "'>" + n.text + "</option>").appendTo("#cate");
- // })
- //
- // }
- // })
- });
- //产品种类
- function CPZL(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag", {
- "token": $.cookie("token"),
- flag:"CPZL",
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_Name + "'>" + n.F_Name + "</option>").appendTo(obj);
- })
- }
- })
- }
- //重要界别
- function ZYJB(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag", {
- "token": $.cookie("token"),
- flag:"ZYJB",
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_Name + "'>" + n.F_Name + "</option>").appendTo(obj);
- })
- }
- })
- }
- //抽检模块
- function CJJP(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag", {
- "token": $.cookie("token"),
- flag:"CJJP",
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_Name + "'>" + n.F_Name + "</option>").appendTo(obj);
- })
- }
- })
- }
- function CJDW(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag", {
- "token": $.cookie("token"),
- flag:"CJDW",
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_Name + "'>" + n.F_Name + "</option>").appendTo(obj);
- })
- }
- })
- }
- //。。。。。。。。。。。。。。。。。。。。。。。
- function YFPP(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag", {
- "token": $.cookie("token"),
- flag:"YFPP",
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_Name + "'>" + n.F_Name + "</option>").appendTo(obj);
- })
- }
- })
- }
- //渠道类型
- function QDLX(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag", {
- "token": $.cookie("token"),
- flag:"QDLX",
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_Name + "'>" + n.F_Name + "</option>").appendTo(obj);
- })
- }
- })
- }
- //信用等级
- function XYDJ(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag", {
- "token": $.cookie("token"),
- flag:"XYDJ",
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_Name + "'>" + n.F_Name + "</option>").appendTo(obj);
- })
- }
- })
- }
- //经营品牌
- function JYPP(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag", {
- "token": $.cookie("token"),
- flag:"JYPP",
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_Name + "'>" + n.F_Name + "</option>").appendTo(obj);
- })
- }
- })
- }
- //产品
- function CAPI(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag", {
- "token": $.cookie("token"),
- flag:"CAPI",
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_Name + "'>" + n.F_Name + "</option>").appendTo(obj);
- })
- }
- })
- }
- function DQQ(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "Department/GetList", {
- "token": $.cookie("token"),
- F_Layer: 1,
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_DeptId + "'>" + n.F_DeptName + "</option>").appendTo(obj);
- })
- }
- })
- }
- function KEFENGONG(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "Department/GetList", {
- "token": $.cookie("token"),
- F_Layer: 2,
- F_DeptName:$("#customer_comaddress").find("option:selected").text(),
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_DeptId + "'>" + n.F_DeptName + "</option>").appendTo(obj);
- })
- }
- })
- }
-
-
-
- $('#customer_comaddress').on('change',function(){
- $.getJSON(huayi.config.callcenter_url + "Department/GetList", {
- "token": $.cookie("token"),
- F_Layer: 2,
- F_DeptName:$("#customer_comaddress").find("option:selected").text(),
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_DeptId + "'>" + n.F_DeptName + "</option>").appendTo("#customer_legalName");
- })
- KEFENGONG($("#customer_legalName"));
- }
- })
- });
- //工单类型点选
- $('.r_order_type').find('input[type="radio"]').on('change', function() {
- if($(this).val() === "1") { //咨询
- $('#PageArrival').show(); //receive
- $('#Duration').hide();
- $('#Depth').hide();
- $('#Page').hide();
- $('#wlbm').hide();
- $('#wlmcc').hide();
- } else if($(this).val() === "2"){ //投诉
- $('#PageArrival').hide(); //receive
- $('#Duration').show();
- $('#Depth').hide();
- $('#Page').hide();
- $('#wlbm').show();
- $('#wlmcc').show();
- }else if($(this).val() === "3"){ //抽检
- $('#PageArrival').hide(); //receive
- $('#Duration').hide();
- $('#Depth').show();
- $('#Page').hide();
- $('#wlbm').show();
- $('#wlmcc').show();
- }else if($(this).val() === "4"){ //建议其他
- $('#PageArrival').hide(); //receive
- $('#Duration').hide();
- $('#Depth').hide();
- $('#Page').show();
- $('#wlbm').hide();
- $('#wlmcc').hide();
- }
- });
-
-
- $("#customer_code").blur(function(){
- ischeckNum();
- })
|