mui.init({}) var UserCode = helper.cookies.get("usercode"); var id = helper.request.queryString("id"); var itype = helper.request.queryString("itype"); var areaID = helper.request.queryString("areaID"); var openid = helper.cookies.get("openid"); //var openid = "oXF5e1mWpX5DajW5_yjNLPKb8ThE"; $(function() { //返回列表 $('.return').on('tap', function() { window.location.href = "details.html?id=" + id + '&itype=' + itype; }); $(".order_unit").on("click",function(){ var ichk=$("input:checkbox:checked").map(function(){ return $(this).val(); }).get().join(","); $("#zerenSel").val(ichk); }) //提交按钮 $('#submit').on('tap', function() { var str_ary = ''; $(".image-box").each(function(i, n) { var a = $(n).attr("indexs"); if(a) { if(str_ary) { str_ary = str_ary + ',' + a; } else { str_ary = a; } } }) if($('#recive_type').val== '') { mui.alert('请输入处理说明!') //请输入处理说明 } else { $.ajax({ type: "post", dataType: 'json', url: huayi.config.callcenter_url + 'WxLogin/DealWorkOrder', async: true, data: { orderid: id, //否 strubg 工单编号 OpenId: openid, //微信openid, isend: 0, //否 int 你看一下前端是什么参数 cont: $("#order_reception").val(), //否 int 指派说明 isover:$('.order_type').find('input[type="radio"]:checked').val(), //是否处理工单 uncont: $('#ower_recive').attr('data-index'), //未处理原因 //投诉类市场管理科 ProductBase: $('#ower_production').attr('data-index'), //生产基地 //投诉类市场管理科 isvisit:$('.order_pay').find('input[type="radio"]:checked').val(), //是否回访 QualityEventLevel: $('#ower_event').attr('data-index'), //事件等级 ClaimAmount: $('#order_money').val(), //索赔金额 ResponsibleUnit:$("#zerenSel").val(), //责任单位 ApprovalOpinions: $('.order_opinion').find('input[type="radio"]:checked').val(), //审批意见 ApprovalDisagree:$("#order_idea").val(), //不同意意见 CompensationMethod: $('.order_coin').find('input[type="radio"]:checked').val(), //补偿方式 CompensationMoney:$("#order_make").val(), //补偿钱款 CResponsibleUnits: $('#ower_ponding').attr('data-index'), //对应责任单位 Fquantity:$("#order_amount").val(), //实收数量 ImprovementRequirements:$("#order_demand").val(), //改进要求 CApprovalNo:$("#order_odd").val(), //审批工作流单号 // 抽检类市场管理科 // 抽检类质量管理部 isvisit: $('.order_return').find('input[type="radio"]:checked').val(), //是否否回访 IsRecord: $('.order_records').find('input[type="radio"]:checked').val(), //是否备案 // 销售内勤 ReturnAccount:$("#order_account").val(), //确认返账金额 // 质量管理科 Fquantity:$("#order_receipts").val(), //确认实收数量 F_Files: str_ary // openid: 'oXF5e1mWpX5DajW5_yjNLPKb8ThE', //微信openid 测试用 }, success: function(data) { debugger if(data.state == "success") { debugger mui.toast('成功'); if (itype==2) { window.location.href="haveorder_list.html"; } else{ window.location.href="haveorder_list.html"; } } else { mui.toast(data.message); } } }); } }) Ajax() //获取详情 function Ajax() { $.ajax({ url: huayi.config.callcenter_url + 'WxLogin/GetDetails', data: { id: id, //工单编号 OpenId: openid, //微信openid, }, async: true, dataType: 'json', type: 'get', //HTTP请求类型 success: function(data) { if(data.state.toLowerCase() == "success") { var result = data.rows[0]; $("#F_Annotation").text(data.rows[0].F_Annotation) if(result.Source == 0) { $("#source").hide(); } else { $("#source").show(); } var itype=result.F_State; if(itype == 0) { $(".dispose1").show(); $(".dispose2").show(); }else if(itype == 1) { $(".dispose1").hide(); } else if(itype == 2) { $(".dispose2").show(); } else if(itype == 3) { $(".dispose3").show(); } if (result.GDLXName=="咨询") { $(".Work_lastDealDiv").hide(); //受理人 $("#source").hide(); //投诉 } else{ $(".Work_lastDealDiv").show(); //受理人 $("#source").show(); //投诉 } var builName if (result.buildingname==null) { builName="" } else{ builName=result.buildingname } var proName if (result.proname==null) { proName="" } else{ proName=result.proname } var complain if (result.ComplaintDepartment==null) { complain="" } else{ complain=result.ComplaintDepartment } $(".WordID").text(result.ID); $("#Work_classname").text(result.F_TypeName); //工单类型 $("#section").text(result.F_DeptName); //部门 if($("#Work_classname").text()=="抽检"){ if($("#section").text()=="市场管理科"){ $("#cccc").show(); $("#aaaa").show(); } }else if($("#Work_classname").text()=="投诉"){ if($("#section").text()=="市场管理科"){ $("#aaaa").show(); } }else if($("#Work_classname").text()=="咨询"){ if($("#section").text()=="市场管理科"){ $("#aaaa").show(); } } if($("#Work_classname").text()=="抽检"){ if($("#section").text()=="质量管理部"){ $("#dddd").show(); } }else if($("#Work_classname").text()=="投诉"){ if($("#section").text()=="质量管理部"){ $("#bbbb").show(); } }else if($("#Work_classname").text()=="咨询"){ if($("#section").text()=="质量管理部"){ $("#bbbbb").show(); } } if($("#Work_classname").text()=="销售内勤"){ if($("#section").text()=="质量管理部"){ $("#eeee").show(); } } } }, error: function(xhr, type, errorThrown) { //异常处理; } }) } //未处理原因 var monad = []; $.ajax({ type: "get", url: huayi.config.callcenter_url + 'Dictionary/GetDicValueListByFlagWx', async: false, data: { flag: 'WCLYY' }, 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 base = []; $.ajax({ type: "get", url: huayi.config.callcenter_url + 'Dictionary/GetDicValueListByFlagWx', async: false, data: { flag: 'SCSCJD' }, 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; base.push(obj) }) } }); //事件等级 var grade = []; $.ajax({ type: "get", url: huayi.config.callcenter_url + 'Dictionary/GetDicValueListByFlagWx', async: false, data: { flag: 'ZLSJDJ' }, 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; grade.push(obj) }) } }); //对应责任单位 var parallelism = []; $.ajax({ type: "get", url: huayi.config.callcenter_url + 'Dictionary/GetDicValueListByFlagWx', async: false, data: { flag: 'ZLZRDW' }, 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; parallelism.push(obj) }) } }); //生产基地 var base = []; $.ajax({ type: "get", url: huayi.config.callcenter_url + 'Dictionary/GetDicValueListByFlagWx', async: false, data: { flag: 'SCSCJD' }, 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; base.push(obj) }) } }); (function($, doc) { $.init(); $.ready(function() { //未处理原因 var cityc = new $.PopPicker(); cityc.setData(monad); var showCityPickerButton1 = doc.getElementById('showCityPicker5'); var cityResultc1 = doc.getElementById('ower_recive'); 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 matrix = new $.PopPicker(); matrix.setData(base); var showCityPickerButton2 = doc.getElementById('production'); var cityResultc2 = doc.getElementById('ower_production'); showCityPickerButton2.addEventListener('tap', function(event) { matrix.show(function(items) { cityResultc2.value = items[0].text; cityResultc2.setAttribute("data-index", items[0].text); //返回 false 可以阻止选择框的关闭 //return false; }); }, false); //事件等级 var affair = new $.PopPicker(); affair.setData(grade); var showCityPickerButton4 = doc.getElementById('eventle'); var cityResultc4 = doc.getElementById('ower_event'); showCityPickerButton4.addEventListener('tap', function(event) { affair.show(function(items) { cityResultc4.value = items[0].text; cityResultc4.setAttribute("data-index", items[0].value); //返回 false 可以阻止选择框的关闭 //return false; }); }, false); }) })(mui, document); }) $('.order_type').find('input[type="radio"]').on('change', function() { if($(this).val() == "0") { //业务办理 $('#showCityPicker5').show(); }else{ $('#showCityPicker5').hide(); } }); $('.order_coin').find('input[type="radio"]').on('change', function() { if($(this).val() == "钱款") { //业务办理 $('.make').show(); }else{ $('.make').hide(); } }); $('.order_opinion').find('input[type="radio"]').on('change', function() { if($(this).val() == "不同意") { //业务办理 $('.F_Address').show(); }else{ $('.F_Address').hide(); } });