mui.init({}) var UserCode = helper.cookies.get("usercode"); var openid = helper.cookies.get("openid"); var areaID = helper.request.queryString("areaID"); //var openid = "oXF5e1mWpX5DajW5_yjNLPKb8ThE"; $(function() { // 投诉咨询切换 $('.order_type').find('input[type="radio"]').on('change', function() { if($(this).val() === "1") { //投诉 $('#consult').show(); //receive $('#complaint').hide(); $('#spot').hide(); } else if($(this).val() === "2"){ $('#complaint').show(); $('#consult').hide(); $('#spot').hide(); }else if($(this).val() === "3"){ $('#spot').show(); $('#consult').hide(); $('#complaint').hide(); } }); // 完结不完结切换 $('.wjbwj').find('input[type="radio"]').on('change', function() { if($(this).val() === "1") { //投诉 //receive $('#zhipaiyin').hide(); $('#wanji').show(); $('#zhipaaa').hide(); $('#submit').hide(); } else if($(this).val() === "2"){ $('#zhipaiyin').show(); $('#wanji').hide(); $('#zhipaaa').hide(); $('#submit').hide(); } }); // 指派切换 $('.zhipp').find('input[type="radio"]').on('change', function() { if($(this).val() === "3") { //投诉 //receive $('#zhipaaa').show(); $('#buzp').show(); $('#submit').hide(); $('#wanji').hide(); } else if($(this).val() === "4"){ $('#zhipaaa').hide(); $('#buzp').hide(); $('#submit').show(); $('#wanji').hide(); } }); //工单有效性 $('#order_valid').find('input[type="radio"]').on('change', function() { //是否有效工单项(0有效,1无效) if($(this).val() === "1") { //无效 $('.order_note').show(); } else { $('.order_note').hide(); } }); //提交按钮 $('#submit').on('tap', function() { // var myreg = /^[1][3,4,5,7,8][0-9]{9}$/; var myreg11 = /^(([0\+]\d{2,3}-)?((0\d{2,3}))?(-)?)?(\d{7,8})(-(\d{3,}))?$/; var str = $("#order_tel").val(); if($('#order_name').val() == '') { mui.alert('请输入客户姓名!') //请输入工单类型 } else if($('#order_phone').val() == '') { mui.alert('请输入客户电话!') //请输入客户姓名 } else if($('#order_tel').val() == '') { mui.alert('请输入公司名称!') //请输入客户姓名 } else { $.ajax({ type: "post", dataType: 'json', url: huayi.config.callcenter_url + '/WxLogin/Add', async: true, data: { F_Source: $('#order_source').attr('data-index'), //工单来源 F_Type: $('.order_type').find('input[type="radio"]:checked').val(), //工单类型 // 咨询模块 F_AddressFull: $("#order_category").attr('data-index'), //问题类别 F_TS_Category: $("#order_productname").attr('data-index'), //产品名称 F_TS_Category: $("#order_qita").val(), //其他输入 F_ZX_Quantity: $("#order_Claimnumber").val(), //咨询数量 F_ZX_Area: $("#order_macrocell").attr('data-index'), //大区 F_ZX_Branch: $("#order_branch").attr('data-index'), //分公司 F_IncidentProvince: $("#choworder_rengin").attr('data-index'), //省 F_IncidentCity: $("#shouorder_shi").attr('data-index'), //市 F_IncidentCountry: $("#chouorder_xian").attr('data-index'), //县 F_IncidentTownship: $("#chouorder_xiang").attr('data-index'), //乡 //投诉模块 F_CustomerID: $("#order_coding").val(), //客户编码 F_MaterialID: $("#order_material").val(), //物料编码 F_QuestionType: $("#order_cate").attr('data-index'), //问题类别 F_QuestionType: $("#order_category").attr('data-index'), //问题类别 F_BatchNumber: $("#order_batch").val(), //生产批号 F_TS_Formula: $("#order_recipe").val(), //配方 F_TS_Category: $("#order_productname").attr('data-index'), //产品名称 F_TS_Category: $("#order_qi").val(), //其他输入 F_TS_Quantity: $("#order_Claimnumber").val(), //问题数量 F_TS_Level: $("#order_rank").attr('data-index'), //重要级别 //抽检模块 F_QuestionType: $("#order_response").attr('data-index'), //问题类别 F_CustomerID: $("#order_coding").val(), //客户编码 F_MaterialID: $("#order_material").val(), //物料编码 F_CJ_Time: $("#order_time").val(), //抽检时间 F_QuestionType: $("#order_response").attr('data-index'), //问题类别 F_CJ_Level: $("#order_Samplingle").attr('data-index'), //抽检级别 F_CJ_Unit: $("#order_lingunit").attr('data-index'), //抽检单位 F_CJ_TestUnit: $("#order_assay").val(), //化验单位 F_CJ_Tonnage: $("#order_tunnage").val(), //抽检吨数 F_CJ_BagNo: $("#order_algebra").val(), //抽检袋数 F_CJ_Outlay: $("#order_money").val(), //费用金额 //公共字段 F_CusName: $('#order_name').val(), //客户姓名 F_CusPhone: $('#order_phone').val(), //否 string 客户电话 F_CompanyName: $("#order_tel").val(), //公司名称 // F_IncidentDetailed: $("#order_tower").val(), //详细地址 F_SalesBase: $("#ower_relationship").attr('data-index'), //销售基地 F_Description: $("#order_reception").val(), //问题描述 F_WxOpenId: openid, //微信openid, // "token": $.cookie("token") // iseffective: $('#order_valid').find('input[type="radio"]:checked').val(), // 否 int 是否有效工单项(0有效,1无效) // note: $('#order_note').val(), // 无效原因 否 string 备注 (iseffective,1无效时填写备注) // clbm: $('#recive_type').attr('data-index'), //否 int 咨询类工单指派部门id // clid: $('#ower_recive').attr('data-index'), // 否 string 接收人id $(this) //$('#order_receiveUser option').find("option:selected").val(), }, success: function(data) { if(data.state == "success") { debugger //alert($('#order_reception').val()), //描述详情 mui.toast('创建成功'); $('#order_type').val(''); //工单类型 $('#order_name').val(''), //客户姓名 $('#order_tel').val(''), //否 string 联系电话 $("#order_rengin").attr(''), //区域名称 $("#order_pro").attr(''), //项目名称 $("#order_floor").attr(''), //楼号 $('#order_room').val(''), //房间号 $('#ower_relationship').attr(''), //房东关系 $('#order_response').find('input[type="radio"]:checked').val(), //否 int 客户反应 $('#complaintOrder_type').attr(''), //否 int 处理部门(投诉类型) $('#serviceOrder_type').attr(''), //否int 客服类类型 $('#is_quality_assurance').attr(''), //否 int 是,//否过质保 //$('#order_reception').val(''), //描述详情 $('#order_responsible').val(''), //否 string 受理人 $('#order_valid').find('input[type="radio"]:checked').val(), // 否 int 是否有效工单项(0有效,1无效) $('#order_note').val(''), // 无效原因 否 string 备注 (iseffective,1无效时填写备注) $('#recive_type').attr(''), //$('#order_transfer_dept').attr('data-id') 否 int 咨询类工单指派部门id $('#ower_recive').attr(''), // 否 string 接收人id $(this) window.location.href = "Have_list.html"; } else { mui.toast(data.message); } } }); } }) function getDepts() {} // 投诉省市县乡 var recivesww = []; $.ajax({ type: "get", url: huayi.config.callcenter_url + 'RegionCategory/GetAllList', async: false, data: { F_Layer: 1, F_RegionName: $('#touorder_rengin').attr('data-index'), }, dataType: 'json', success: function(res) { if(res.state.toLowerCase() === "success") { res = res.data; console.log(res) if(res && res.length > 0) { res.forEach(function(v, i) { var obj = {}; obj.value = v.F_RegionId; obj.text = v.F_RegionName; recivesww.push(obj); }); console.log(recivesww) // cityPicker5.setData(recive); } } //recive = res.data; //console.log(recive) //alert(JSON.stringify(data)); } }); function getRecect(){ var renyuaee = [] $.ajax({ url: huayi.config.callcenter_url + 'RegionCategory/GetAllList', type: 'get', data: { F_Layer: 2, F_RegionName: $('#touorder_rengin').attr('data-index'), }, dataType: "json", async: true, success: function(res) { if(res.state.toLowerCase() === "success") { res = res.data; console.log(res) if(res && res.length >0) { res.forEach(function(v, i) { var obj = {}; obj.value = v.F_RegionId; obj.text = v.F_RegionName; renyuaee.push(obj); //$('').appendTo('#order_recive'); }); console.log(renyuaee) RCiPickee2.setData(renyuaee); } } }, }); } //区县 function getRtt(){ var rener = [] $.ajax({ url: huayi.config.callcenter_url + 'RegionCategory/GetAllList', type: 'get', data: { F_Layer:3, F_RegionName: $('#touorder_shi').attr('data-index'), }, dataType: "json", async: true, success: function(res) { if(res.state.toLowerCase() === "success") { res = res.data; console.log(res) if(res && res.length >0) { res.forEach(function(v, i) { var obj = {}; obj.value = v.F_RegionId; obj.text = v.F_RegionName; rener.push(obj); //$('').appendTo('#order_recive'); }); console.log(rener) RCiPic2.setData(rener); } } }, }); } //乡 function villagoo(){ var viyy = [] $.ajax({ url: huayi.config.callcenter_url + 'RegionCategory/GetAllList', type: 'get', data: { F_Layer:4, F_RegionName: $('#touorder_xian').attr('data-index'), }, dataType: "json", async: true, success: function(res) { if(res.state.toLowerCase() === "success") { res = res.data; console.log(res) if(res && res.length >0) { res.forEach(function(v, i) { var obj = {}; obj.value = v.F_RegionId; obj.text = v.F_RegionName; viyy.push(obj); //$('').appendTo('#order_recive'); }); console.log(viyy) RCimm.setData(viyy); } } }, }); } // 咨询省市县乡 var recives = []; $.ajax({ type: "get", url: huayi.config.callcenter_url + 'RegionCategory/GetAllList', async: false, data: { F_Layer: 1, F_RegionName: $('#choworder_rengin').attr('data-index'), }, dataType: 'json', success: function(res) { if(res.state.toLowerCase() === "success") { res = res.data; console.log(res) if(res && res.length > 0) { res.forEach(function(v, i) { var obj = {}; obj.value = v.F_RegionId; obj.text = v.F_RegionName; recives.push(obj); }); console.log(recives) // cityPicker5.setData(recive); } } //recive = res.data; //console.log(recive) //alert(JSON.stringify(data)); } }); //市 function getRece(){ var renyuann = [] $.ajax({ url: huayi.config.callcenter_url + 'RegionCategory/GetAllList', type: 'get', data: { F_Layer: 2, F_RegionName: $('#choworder_rengin').attr('data-index'), }, dataType: "json", async: true, success: function(res) { if(res.state.toLowerCase() === "success") { res = res.data; console.log(res) if(res && res.length >0) { res.forEach(function(v, i) { var obj = {}; obj.value = v.F_RegionId; obj.text = v.F_RegionName; renyuann.push(obj); //$('').appendTo('#order_recive'); }); console.log(renyuann) RCiPickee1.setData(renyuann); } } }, }); } //区/县 function getReee(){ var rennn = [] $.ajax({ url: huayi.config.callcenter_url + 'RegionCategory/GetAllList', type: 'get', data: { F_Layer:3, F_RegionName: $('#shouorder_shi').attr('data-index'), }, dataType: "json", async: true, success: function(res) { if(res.state.toLowerCase() === "success") { res = res.data; console.log(res) if(res && res.length >0) { res.forEach(function(v, i) { var obj = {}; obj.value = v.F_RegionId; obj.text = v.F_RegionName; rennn.push(obj); //$('').appendTo('#order_recive'); }); console.log(rennn) RCiPi1.setData(rennn); } } }, }); } //乡 function villagee(){ var villl = [] $.ajax({ url: huayi.config.callcenter_url + 'RegionCategory/GetAllList', type: 'get', data: { F_Layer:4, F_RegionName: $('#chouorder_xian').attr('data-index'), }, dataType: "json", async: true, success: function(res) { if(res.state.toLowerCase() === "success") { res = res.data; console.log(res) if(res && res.length >0) { res.forEach(function(v, i) { var obj = {}; obj.value = v.F_RegionId; obj.text = v.F_RegionName; villl.push(obj); //$('').appendTo('#order_recive'); }); console.log(villl) RCi12.setData(villl); } } }, }); } //投诉省市县乡 // 省 var recive = []; $.ajax({ type: "get", url: huayi.config.callcenter_url + 'RegionCategory/GetAllList', async: false, data: { F_Layer: 1, F_RegionName: $('#order_rengin').attr('data-index'), }, dataType: 'json', success: function(res) { if(res.state.toLowerCase() === "success") { res = res.data; console.log(res) if(res && res.length > 0) { res.forEach(function(v, i) { var obj = {}; obj.value = v.F_RegionId; obj.text = v.F_RegionName; recive.push(obj); }); console.log(recive) // cityPicker5.setData(recive); } } //recive = res.data; //console.log(recive) //alert(JSON.stringify(data)); } }); //市 function getReceiveUser(){ var renyuan = [] $.ajax({ url: huayi.config.callcenter_url + 'RegionCategory/GetAllList', type: 'get', data: { F_Layer: 2, F_RegionName: $('#order_rengin').attr('data-index'), }, dataType: "json", async: true, success: function(res) { if(res.state.toLowerCase() === "success") { res = res.data; console.log(res) if(res && res.length >0) { res.forEach(function(v, i) { var obj = {}; obj.value = v.F_RegionId; obj.text = v.F_RegionName; renyuan.push(obj); //$('').appendTo('#order_recive'); }); console.log(renyuan) RCiPicke.setData(renyuan); } } }, }); } //区/县 function getRe(){ var ren = [] $.ajax({ url: huayi.config.callcenter_url + 'RegionCategory/GetAllList', type: 'get', data: { F_Layer:3, F_RegionName: $('#order_shi').attr('data-index'), }, dataType: "json", async: true, success: function(res) { if(res.state.toLowerCase() === "success") { res = res.data; console.log(res) if(res && res.length >0) { res.forEach(function(v, i) { var obj = {}; obj.value = v.F_RegionId; obj.text = v.F_RegionName; ren.push(obj); //$('').appendTo('#order_recive'); }); console.log(ren) RCiPi.setData(ren); } } }, }); } //乡 function village(){ var vil = [] $.ajax({ url: huayi.config.callcenter_url + 'RegionCategory/GetAllList', type: 'get', data: { F_Layer:4, F_RegionName: $('#order_xian').attr('data-index'), }, dataType: "json", async: true, success: function(res) { if(res.state.toLowerCase() === "success") { res = res.data; console.log(res) if(res && res.length >0) { res.forEach(function(v, i) { var obj = {}; obj.value = v.F_RegionId; obj.text = v.F_RegionName; vil.push(obj); //$('').appendTo('#order_recive'); }); console.log(vil) RCi.setData(vil); } } }, }); } Ajax(); function Ajax() { $.ajax({ url: huayi.config.callcenter_url + 'WxLogin/GetDpment', data: { OpenId: openid, //微信openid, }, async: true, dataType: 'json', type: 'get', //HTTP请求类型 success: function(data) { if(data.state.toLowerCase() == "success") { var result = data.data; $("#custo").text(result.F_UserName); $("#cus").text(result.F_UserCode); } }, error: function(xhr, type, errorThrown) { //异常处理; } }) } //销售基地 var keyList = []; // console.log(keyList); $.ajax({ type: "get", url: huayi.config.callcenter_url + 'Dictionary/GetDicValueListByFlagWx', async: false, data: { flag: 'XSJD' }, dataType: 'json', success: function(data) { var key_data = data.data; // console.log(data.data); $(key_data).each(function(i, n) { var obj = {}; obj.value = n.F_DictionaryValueId; obj.text = n.F_Name; keyList.push(obj) }) } }); //问题类别 var ke = []; $.ajax({ type: "get", url: huayi.config.callcenter_url + 'Dictionary/GetDicValueListByFlagWx', async: false, data: { flag: 'ZXWTLB', type:3, }, dataType: 'json', success: function(data) { var key_data = data.data; $(key_data).each(function(i, n) { var obj = {}; obj.value = n.F_DictionaryValueId; obj.text = n.F_Name; ke.push(obj) }) } }); //产品名称 var keee = []; $.ajax({ type: "get", url: huayi.config.callcenter_url + 'Dictionary/GetDicValueListByFlagWx', async: false, data: { flag: 'CPZL' }, dataType: 'json', success: function(data) { var key_data = data.data; // console.log(key_data); $(key_data).each(function(i, n) { var obj = {}; obj.value = n.F_DictionaryValueId; obj.text = n.F_Name; keee.push(obj) // console.log(ke); }) } }); //投诉产品名称 var letter = []; $.ajax({ type: "get", url: huayi.config.callcenter_url + 'Dictionary/GetDicValueListByFlagWx', async: false, data: { flag: 'CPZL' }, dataType: 'json', success: function(data) { var key_data = data.data; $(key_data).each(function(i, n) { var obj = {}; obj.value = n.F_DictionaryValueId; obj.text = n.F_Name; letter.push(obj) }) } }); //投诉重要级别 var rank = []; $.ajax({ type: "get", url: huayi.config.callcenter_url + 'Dictionary/GetDicValueListByFlagWx', async: false, data: { flag: 'ZYJB' }, dataType: 'json', success: function(data) { var key_data = data.data; // console.log(key_data); $(key_data).each(function(i, n) { var obj = {}; obj.value = n.F_DictionaryValueId; obj.text = n.F_Name; rank.push(obj) // console.log(ke); }) } }); //抽检抽检级别 var check = []; $.ajax({ type: "get", url: huayi.config.callcenter_url + 'Dictionary/GetDicValueListByFlagWx', async: false, data: { flag: 'CJJP' }, dataType: 'json', success: function(data) { var key_data = data.data; // console.log(key_data); $(key_data).each(function(i, n) { var obj = {}; obj.value = n.F_DictionaryValueId; obj.text = n.F_Name; check.push(obj) }) } }); //抽检抽检单位 var monad = []; $.ajax({ type: "get", url: huayi.config.callcenter_url + 'Dictionary/GetDicValueListByFlagWx', async: false, data: { flag: 'CJDW' }, dataType: 'json', success: function(data) { var key_data = data.data; // console.log(key_data); $(key_data).each(function(i, n) { var obj = {}; obj.value = n.F_DictionaryValueId; obj.text = n.F_Name; monad.push(obj) }) } }); //大区 var lisboa = []; $.ajax({ type: "get", url: huayi.config.callcenter_url + 'Department/GetList', async: false, data: { F_Layer: 1, F_RegionName: $('#order_macrocell').attr('data-index'), }, dataType: 'json', success: function(res) { if(res.state.toLowerCase() === "success") { res = res.data; console.log(res) if(res && res.length > 0) { res.forEach(function(v, i) { var obj = {}; obj.value = v.F_DeptId; obj.text = v.F_DeptName; lisboa.push(obj); }); console.log(lisboa) // cityPicker5.setData(recive); } } //recive = res.data; //console.log(recive) //alert(JSON.stringify(data)); } }); //分公司 function fengong(){ var filiale = [] $.ajax({ url: huayi.config.callcenter_url + 'Department/GetList', type: 'get', data: { F_Layer:2, F_RegionName: $('#order_macrocell').attr('data-index'), }, dataType: "json", async: true, success: function(res) { if(res.state.toLowerCase() === "success") { res = res.data; console.log(res) if(res && res.length >0) { res.forEach(function(v, i) { var obj = {}; obj.value = v.F_DeptId; obj.text = v.F_DeptName; filiale.push(obj); //$('').appendTo('#order_recive'); }); // console.log(vil) company.setData(filiale); } } }, }); } //投诉问题类别1 var complaints = []; $.ajax({ type: "get", url: huayi.config.callcenter_url + 'WorkOrder/GetQuestionNameType', async: false, data: { type:1, QuestionName:$('#order_cat').attr('data-index'), }, dataType: 'json', success: function(res) { if(res.state.toLowerCase() === "success") { res = res.data; console.log(res) if(res && res.length > 0) { res.forEach(function(v, i) { var obj = {}; obj.value = v.id; obj.text = v.text; complaints.push(obj); }); console.log(lisboa) // cityPicker5.setData(recive); } } //recive = res.data; //console.log(recive) //alert(JSON.stringify(data)); } }); //投诉问题类别2 function range(){ var more = [] $.ajax({ url: huayi.config.callcenter_url + 'WorkOrder/GetQuestionNameType', type: 'get', data: { QuestionName:$('#order_cat').attr('data-index'), type:1, }, dataType: "json", async: true, success: function(res) { if(res.state.toLowerCase() === "success") { res = res.data; console.log(res) if(res && res.length >0) { res.forEach(function(v, i) { var obj = {}; obj.value = v.id; obj.text = v.text; more .push(obj); //$('').appendTo('#order_recive'); }); // console.log(more) com.setData(more); } } }, }); } //投诉问题类别3 function which(){ var vector = [] $.ajax({ url: huayi.config.callcenter_url + 'WorkOrder/GetQuestionNameType', type: 'get', data: { QuestionName:$('#order_question').attr('data-index'), type:1, }, dataType: "json", async: true, success: function(res) { if(res.state.toLowerCase() === "success") { res = res.data; console.log(res) if(res && res.length >0) { res.forEach(function(v, i) { var obj = {}; obj.value = v.id; obj.text = v.text; vector .push(obj); //$('').appendTo('#order_recive'); }); // console.log(vector) since.setData(vector); } } }, }); } (function($, doc) { $.init(); $.ready(function() { //接收部门 // var Rickers1 = new $.PopPicker({ // layer: 2 // }); // Rickers1.setData(recccc); // var RCs = doc.getElementById('showUserPicker1'); // var sults1 = doc.getElementById('recive_type'); // var sults2 = doc.getElementById('recive_type1'); // var sults3 = doc.getElementById('recive_type2'); // RCs.addEventListener('tap', function(event) { // Rickers1.show(function(items) { // console.log(items) // if(items[1].text == undefined) { // sults1.value = items[0].text; // sults1.setAttribute("data-index", items[0].id); // } else { // sults1.value = items[1].text // sults1.setAttribute("data-index", items[1].id); // } // //RCResults.value =items[0].text + "-" + items[1].text + "-" + items[2].text; // //RCResults.setAttribute("data-index", items[0].id); // //RCResults2.setAttribute("data-index", items[1].id); // //RCResults3.setAttribute("data-index", items[2].id); // //返回 false 可以阻止选择框的关闭 // //return false; // }); // }, false); // 接收人员 // city5 = new $.PopPicker(); // var showCityPickerButton5 = doc.getElementById('showCityPicker5'); // var cityt5 = doc.getElementById('ower_recive'); // showCityPickerButton5.addEventListener('tap', function(event) { // geveUser(); // city5.show(function(items) { // if (items[0].text!=undefined) { // cityt5.value = items[0].text; // cityt5.setAttribute("data-index", items[0].value); // } // // //返回 false 可以阻止选择框的关闭 // //return false; // }); // }, false); // 投诉省 var RCiPp = new $.PopPicker({ F_Layer: 1, }); RCiPp.setData(recivesww); var RCss12 = doc.getElementById('touhuTi'); var RCResultss1 = doc.getElementById('touorder_rengin'); RCss12.addEventListener('tap', function(event) { RCiPp.show(function(items) { console.log(items[0].text) RCResultss1.value =items[0].text RCResultss1.setAttribute("data-index", items[0].text); //RCResults.value =items[0].text + "-" + items[1].text + "-" + items[2].text; //RCResults.setAttribute("data-index", items[0].id); //返回 false 可以阻止选择框的关闭 //return false; }); }, false); //市 RCiPickee2 = new $.PopPicker({ F_Layer: 1, }); var RCss22 = doc.getElementById('touZhuTiPicker'); var RCResultss22 = doc.getElementById('touorder_shi'); RCss22.addEventListener('tap', function(event) { getRecect(); RCiPickee2.show(function(items) { RCResultss22.value =items[0].text RCResultss22.setAttribute("data-index", items[0].text); //RCResults.value =items[0].text + "-" + items[1].text + "-" + items[2].text; //RCResults.setAttribute("data-index", items[0].id); //返回 false 可以阻止选择框的关闭 //return false; }); }, false); RCiPic2 = new $.PopPicker({ F_Layer: 1, }); var RCss33 = doc.getElementById('toucounty'); var RCResultss33 = doc.getElementById('touorder_xian'); RCss33.addEventListener('tap', function(event) { getRtt(); RCiPic2.show(function(items) { RCResultss33.value =items[0].text RCResultss33.setAttribute("data-index", items[0].text); //RCResults.value =items[0].text + "-" + items[1].text + "-" + items[2].text; //RCResults.setAttribute("data-index", items[0].id); //返回 false 可以阻止选择框的关闭 //return false; }); }, false); //乡 RCimm = new $.PopPicker({ F_Layer: 1, }); var RCs44= doc.getElementById('toutowns'); var RCResults44 = doc.getElementById('touorder_xiang'); RCs44.addEventListener('tap', function(event) { villagoo(); RCimm.show(function(items) { RCResults44.value =items[0].text RCResults44.setAttribute("data-index", items[0].text); //RCResults.value =items[0].text + "-" + items[1].text + "-" + items[2].text; //RCResults.setAttribute("data-index", items[0].id); //返回 false 可以阻止选择框的关闭 //return false; }); }, false); // 咨询 省 var RCiP = new $.PopPicker({ F_Layer: 1, }); RCiP.setData(recives); var RCss1 = doc.getElementById('chouhuTi'); var RCResultss = doc.getElementById('choworder_rengin'); RCss1.addEventListener('tap', function(event) { RCiP.show(function(items) { console.log(items[0].text) RCResultss.value =items[0].text RCResultss.setAttribute("data-index", items[0].text); //RCResults.value =items[0].text + "-" + items[1].text + "-" + items[2].text; //RCResults.setAttribute("data-index", items[0].id); //返回 false 可以阻止选择框的关闭 //return false; }); }, false); //市 RCiPickee1 = new $.PopPicker({ F_Layer: 1, }); var RCss2 = doc.getElementById('chowZhuTiPicker'); var RCResultss2 = doc.getElementById('shouorder_shi'); RCss2.addEventListener('tap', function(event) { getRece(); RCiPickee1.show(function(items) { RCResultss2.value =items[0].text RCResultss2.setAttribute("data-index", items[0].text); //RCResults.value =items[0].text + "-" + items[1].text + "-" + items[2].text; //RCResults.setAttribute("data-index", items[0].id); //返回 false 可以阻止选择框的关闭 //return false; }); }, false); //区/县 RCiPi1 = new $.PopPicker({ F_Layer: 1, }); var RCs22 = doc.getElementById('chowcounty'); var RCResults22 = doc.getElementById('chouorder_xian'); RCs22.addEventListener('tap', function(event) { getReee(); RCiPi1.show(function(items) { RCResults22.value =items[0].text RCResults22.setAttribute("data-index", items[0].text); //RCResults.value =items[0].text + "-" + items[1].text + "-" + items[2].text; //RCResults.setAttribute("data-index", items[0].id); //返回 false 可以阻止选择框的关闭 //return false; }); }, false); //乡 RCi12 = new $.PopPicker({ F_Layer: 1, }); var RCs33= doc.getElementById('chowtowns'); var RCResults33 = doc.getElementById('chouorder_xiang'); RCs33.addEventListener('tap', function(event) { villagee(); RCi12.show(function(items) { RCResults33.value =items[0].text RCResults33.setAttribute("data-index", items[0].text); //RCResults.value =items[0].text + "-" + items[1].text + "-" + items[2].text; //RCResults.setAttribute("data-index", items[0].id); //返回 false 可以阻止选择框的关闭 //return false; }); }, false); // 省 var RCiPickers = new $.PopPicker({ F_Layer: 1, }); RCiPickers.setData(recive); var RCs = doc.getElementById('showZhuTi'); var RCResults = doc.getElementById('order_rengin'); RCs.addEventListener('tap', function(event) { RCiPickers.show(function(items) { console.log(items[0].text) RCResults.value =items[0].text RCResults.setAttribute("data-index", items[0].text); //RCResults.value =items[0].text + "-" + items[1].text + "-" + items[2].text; //RCResults.setAttribute("data-index", items[0].id); //返回 false 可以阻止选择框的关闭 //return false; }); }, false); //市 RCiPicke = new $.PopPicker({ F_Layer: 1, }); var RCs1 = doc.getElementById('showZhuTiPicker'); var RCResults1 = doc.getElementById('order_shi'); RCs1.addEventListener('tap', function(event) { getReceiveUser(); RCiPicke.show(function(items) { RCResults1.value =items[0].text RCResults1.setAttribute("data-index", items[0].text); //RCResults.value =items[0].text + "-" + items[1].text + "-" + items[2].text; //RCResults.setAttribute("data-index", items[0].id); //返回 false 可以阻止选择框的关闭 //return false; }); }, false); //区/县 RCiPi = new $.PopPicker({ F_Layer: 1, }); var RCs2 = doc.getElementById('county'); var RCResults2 = doc.getElementById('order_xian'); RCs2.addEventListener('tap', function(event) { getRe(); RCiPi.show(function(items) { RCResults2.value =items[0].text RCResults2.setAttribute("data-index", items[0].text); //RCResults.value =items[0].text + "-" + items[1].text + "-" + items[2].text; //RCResults.setAttribute("data-index", items[0].id); //返回 false 可以阻止选择框的关闭 //return false; }); }, false); //乡 RCi = new $.PopPicker({ F_Layer: 1, }); var RCs3= doc.getElementById('towns'); var RCResults3 = doc.getElementById('order_xiang'); RCs3.addEventListener('tap', function(event) { village(); RCi.show(function(items) { RCResults3.value =items[0].text RCResults3.setAttribute("data-index", items[0].text); //RCResults.value =items[0].text + "-" + items[1].text + "-" + items[2].text; //RCResults.setAttribute("data-index", items[0].id); //返回 false 可以阻止选择框的关闭 //return false; }); }, false); //销售基地 var cityPicker3 = new $.PopPicker(); cityPicker3.setData(keyList); var showCityPickerButton = doc.getElementById('showCityPicker3'); var cityResult3 = doc.getElementById('ower_relationship'); showCityPickerButton.addEventListener('tap', function(event) { cityPicker3.show(function(items) { cityResult3.value = items[0].text; cityResult3.setAttribute("data-index", items[0].value); //返回 false 可以阻止选择框的关闭 //return false; }); }, false); //问题类别 var city = new $.PopPicker(); city.setData(ke); var showCityPickerButton = doc.getElementById('question'); var cityResult = doc.getElementById('order_category'); showCityPickerButton.addEventListener('tap', function(event) { city.show(function(items) { cityResult.value = items[0].text; cityResult.setAttribute("data-index", items[0].value); //返回 false 可以阻止选择框的关闭 //return false; }); }, false); //产品名称 var cityc = new $.PopPicker(); cityc.setData(keee); var showCityPickerButton1 = doc.getElementById('product'); var cityResultc1 = doc.getElementById('order_productname'); showCityPickerButton1.addEventListener('tap', function(event) { cityc.show(function(items) { cityResultc1.value = items[0].text; cityResultc1.setAttribute("data-index", items[0].value); //返回 false 可以阻止选择框的关闭 //return false; }); }, false); //投诉问题类别 // var tou = new $.PopPicker(); // tou.setData(tousu); // var showCityPickerButton = doc.getElementById('quest'); // var cityResult = doc.getElementById('order_cat'); // showCityPickerButton.addEventListener('tap', function(event) { // tou.show(function(items) { // cityResult.value = items[0].text; // cityResult.setAttribute("data-index", items[0].value); // //返回 false 可以阻止选择框的关闭 // //return false; // }); // }, false); //投诉产品名称 var lett = new $.PopPicker(); lett.setData(letter); var showCityPickerButton2 = doc.getElementById('produ'); var cityResultc2 = doc.getElementById('order_product'); showCityPickerButton2.addEventListener('tap', function(event) { lett.show(function(items) { cityResultc2.value = items[0].text; cityResultc2.setAttribute("data-index", items[0].value); //返回 false 可以阻止选择框的关闭 //return false; }); }, false); //投诉重要级别 var level = new $.PopPicker(); level.setData(rank); var showCityPickerButton3 = doc.getElementById('rank'); var cityResultc3 = doc.getElementById('order_rank'); showCityPickerButton3.addEventListener('tap', function(event) { level.show(function(items) { cityResultc3.value = items[0].text; cityResultc3.setAttribute("data-index", items[0].value); //返回 false 可以阻止选择框的关闭 //return false; }); }, false); //抽检抽检级别 var spott = new $.PopPicker(); spott.setData(check); var showCityPickerButton4 = doc.getElementById('samp'); var cityResultc4 = doc.getElementById('order_samplingle'); showCityPickerButton4.addEventListener('tap', function(event) { spott.show(function(items) { cityResultc4.value = items[0].text; cityResultc4.setAttribute("data-index", items[0].value); //返回 false 可以阻止选择框的关闭 //return false; }); }, false); //抽检抽检单位 var unit = new $.PopPicker(); unit.setData(monad); var showCityPick5 = doc.getElementById('ling'); var cityResultc5 = doc.getElementById('order_lingunit'); showCityPick5.addEventListener('tap', function(event) { unit.show(function(items) { cityResultc5.value = items[0].text; cityResultc5.setAttribute("data-index", items[0].value); //返回 false 可以阻止选择框的关闭 //return false; }); }, false); var manager = new $.PopPicker({ F_Layer: 1, }); manager.setData(lisboa); var RCs5 = doc.getElementById('qregion'); var RCResults5 = doc.getElementById('order_macrocell'); RCs5.addEventListener('tap', function(event) { manager.show(function(items) { console.log(items[0].text) RCResults5.value =items[0].text RCResults5.setAttribute("data-index", items[0].text); //RCResults.value =items[0].text + "-" + items[1].text + "-" + items[2].text; //RCResults.setAttribute("data-index", items[0].id); //返回 false 可以阻止选择框的关闭 //return false; }); }, false); //分公司 company = new $.PopPicker({ F_Layer: 2, }); var RCs4 = doc.getElementById('filial'); var RCResults8 = doc.getElementById('order_branch'); RCs4.addEventListener('tap', function(event) { fengong(); company.show(function(items) { RCResults8.value =items[0].text RCResults8.setAttribute("data-index", items[0].text); //RCResults.value =items[0].text + "-" + items[1].text + "-" + items[2].text; //RCResults.setAttribute("data-index", items[0].id); //返回 false 可以阻止选择框的关闭 //return false; }); }, false); //投诉问题类别1 var complai = new $.PopPicker({ pid:0, }); complai.setData(complaints); var RCs12 = doc.getElementById('quest'); var RCResults12 = doc.getElementById('order_cat'); RCs12.addEventListener('tap', function(event) { complai.show(function(items) { console.log(items[0].text) RCResults12.value =items[0].text RCResults12.setAttribute("data-index", items[0].text); //RCResults.value =items[0].text + "-" + items[1].text + "-" + items[2].text; //RCResults.setAttribute("data-index", items[0].id); //返回 false 可以阻止选择框的关闭 //return false; }); }, false); //问题类别2 com = new $.PopPicker({ pid:1, }); console.log() var RCs13= doc.getElementById('que'); var RCResults13 = doc.getElementById('order_question'); RCs13.addEventListener('tap', function(event) { range(); com.show(function(items) { RCResults13.value =items[0].text RCResults13.setAttribute("data-index", items[0].text); //RCResults.value =items[0].text + "-" + items[1].text + "-" + items[2].text; //RCResults.setAttribute("data-index", items[0].id); //返回 false 可以阻止选择框的关闭 //return false; }); }, false); //问题类别3 since = new $.PopPicker({ pid:1, }); var RCs14= doc.getElementById('matter'); var RCResults14 = doc.getElementById('order_matter'); RCs14.addEventListener('tap', function(event) { which(); since.show(function(items) { RCResults14.value =items[0].text RCResults14.setAttribute("data-index", items[0].text); //RCResults.value =items[0].text + "-" + items[1].text + "-" + items[2].text; //RCResults.setAttribute("data-index", items[0].id); //返回 false 可以阻止选择框的关闭 //return false; }); }, false); }) })(mui, document); }) $("#order_productname").click(function(){ }) $('#order_productname').find('input[data-index=""]').on('change', function() { if($(this).val() == "624") { //业务办理 $('#qtqcr').show(); }else{ $('#qtqcr').hide(); } }); $('#order_coding').blur(function () { // alert($(this).val()); // $('#material').show(); if($(this).val()==''){ $('#tianxie').show(); $('#xiangqingm').hide(); }else { $('#tianxie').hide(); $('#xiangqingm').show(); } //根据客户编号获取信息 $.ajax({ url: huayi.config.callcenter_url + 'CustomerNew/GetCodeCustomer', data: { code:$('#order_coding').val(), OpenId: openid, //微信openid, }, async: true, dataType: 'json', type: 'get', //HTTP请求类型 success: function(data) { if(data.state.toLowerCase() == "success") { var result = data.data; $('#yewu').text(result.F_Salesman); $('#dianhua').text(result.F_SalesPhone); $('#daqu').text(result.F_AreaName); $('#fengsi').text(result.F_BranchName); $('#jyppai').text(result.F_Brands); } }, error: function(xhr, type, errorThrown) { //异常处理; } }) }); $('#order_material').blur(function () { // alert($(this).val()); // $('#material').show(); if($(this).val()==''){ $('#wuliaotian').show(); $('#wuliao').hide(); }else { $('#wuliaotian').hide(); $('#wuliao').show(); } //根据物料编码获取信息 $.ajax({ url: huayi.config.callcenter_url + 'MaterialManage/GetCodeModel', data: { code:$('#order_material').val(), OpenId: openid, //微信openid, }, async: true, dataType: 'json', type: 'get', //HTTP请求类型 success: function(data) { if(data.state.toLowerCase() == "success") { var result = data.data; $("#wname").text(data.model.F_MaterialName);//物料名称 $("#xhao").text(data.model.F_Model),//型号 $("#gge").text(data.model.F_Specs);//规格 $("#yijif").text(data.model.F_Level1);//一级分类 $("#erjif").text(data.model.F_Level2);//二级分类 $("#sanjif").text(data.model.F_Level3);//三级分类 $('#pinp').text(data.model.F_Brand);//品牌 $('#fhffx').text(data.model.F_MaterialEffect); //复合肥肥效 $('#cpxx').text(data.model.F_Pipeline); //产品线tensions $("#gyii").text(data.model.F_Craft);//工艺 } }, error: function(xhr, type, errorThrown) { //异常处理; } }) });