| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387 |
- 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";
- //alert(id);
- $(function() {
- // 接收人员
- // $('#order_recive').on('tap', function() {
- // //alert("ddd");
- // getReceiveUser();
- // $("#order_recive option").remove();
- // });
- //返回列表
- $('.return').on('tap', function() {
- // if (itype==0) {
- // window.location.href = "client_index.html"
- // }if (itype==1) {
- // window.location.href = "client_index.html"
- // } else if (itype==2){
- // window.location.href = "pend_index.html"
- // } else if (itype==3){
- // window.location.href = "finsh_index.html"
- // }
- window.location.href = "details.html?id=" + id + '&itype=' + itype;
- });
- //提交按钮
- $('#submit').on('tap', function() {
- 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").text(), //否 int 指派说明
- isover:$('.order_type').find('input[type="radio"]:checked').val(), //是否处理工单
- uncont: $('#ower_recive').attr('data-index'), //未处理原因
- dealType:$('.order_rise').find('input[type="radio"]:checked').val(), //处理方式
-
- // 投诉类市场管理科
- ProductBase: $('#ower_production').attr('data-index'), //生产基地
- QualityMonth:$("#order_quality").val(), //质保期限
- // 投诉类市场管理科
- isvisit:$('.order_pay').find('input[type="radio"]:checked').val(), //是否回访
- QualityEventLevel: $('#ower_event').attr('data-index'), //事件等级
- ClaimAmount: $('#order_money').attr('data-index'), //索赔金额
- ResponsibleUnit:$('.order_unit').find('input[type="checkbox"]:checked').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(), //审批工作流单号
- // 抽检类市场管理科
- ProductBase: $('#ower_result').attr('data-index'), //生产基地
- QualityMonth:$("#order_spection").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(), //确认实收数量
-
-
- // 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];
- if(result.Source == 0) {
- $("#source").hide();
- } else {
- $("#source").show();
- }
- var itype=result.F_State;
- // alert(itype)
- 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();
- }
- }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 keyList = [];
- // console.log(keyList);
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + 'Dictionary/GetDicValueListByFlagWx',
- async: false,
- data: {
- flag: 'SCCS'
- },
- 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 keyl = [];
- // console.log(keyList);
- $.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(data.data);
- $(key_data).each(function(i, n) {
- var obj = {};
- obj.value = n.F_DictionaryValueId;
- obj.text = n.F_Name;
- keyl.push(obj)
- })
- }
- });
- //对应责任单位
- var pding = [];
- // console.log(keyList);
- $.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;
- // console.log(data.data);
- $(key_data).each(function(i, n) {
- var obj = {};
- obj.value = n.F_DictionaryValueId;
- obj.text = n.F_Name;
- pding.push(obj)
- })
- }
- });
-
- (function($, doc) {
- $.init();
- $.ready(function() {
- //接收部门
- // var RCiPickers = new $.PopPicker({
- // layer: 2
- // });
- // RCiPickers.setData(recive);
- // var RCs = doc.getElementById('showUserPicker1');
- // var RCResults = doc.getElementById('recive_type');
- // var RCResults2 = doc.getElementById('recive_type1');
- // var RCResults3 = doc.getElementById('recive_type2');
- // RCs.addEventListener('tap', function(event) {
- // RCiPickers.show(function(items) {
- // console.log(items)
- // if(items[1].text == undefined) {
- // RCResults.value = items[0].text;
- // RCResults.setAttribute("data-index", items[0].id);
- // } else {
- // RCResults.value = items[1].text
- // RCResults.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);
- // 接收人员
- // cityPicker5 = new $.PopPicker();
- // var showCityPickerButton5 = doc.getElementById('showCityPicker5');
- // var cityResult5 = doc.getElementById('ower_recive');
- // showCityPickerButton5.addEventListener('tap', function(event) {
- // getReceiveUser();
- // cityPicker5.show(function(items) {
- // if (items[0].text!=undefined) {
- // cityResult5.value = items[0].text;
- // cityResult5.setAttribute("data-index", items[0].value);
- // }
- //
- // //返回 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 eventle = new $.PopPicker();
- eventle.setData(keyl);
- var showCityPickerButton = doc.getElementById('eventle');
- var eventle = doc.getElementById('ower_event');
- 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 cityPicker3 = new $.PopPicker();
- // cityPicker3.setData(keyList);
- // var showCityPickerButton = doc.getElementById('ponding');
- // var cityResult3 = doc.getElementById('ower_ponding');
- // 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);
-
- })
-
- })(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();
- }
- });
|