From e66da0174a6c3cf900b9788e29c9df7228c7c2cc Mon Sep 17 00:00:00 2001 From: zhangjinan <836496117@qq.com> Date: Thu, 03 May 2018 18:03:07 +0800 Subject: [PATCH] 提交 删除 console --- publish/js/customMin/customS_min.js | 1823 +++++++++++++++++++++++++++++----------------------------- 1 files changed, 911 insertions(+), 912 deletions(-) diff --git a/publish/js/customMin/customS_min.js b/publish/js/customMin/customS_min.js index 080e190..4d159f4 100644 --- a/publish/js/customMin/customS_min.js +++ b/publish/js/customMin/customS_min.js @@ -35,7 +35,7 @@ // itemvalue = customBase.getItemValue(itemId,type); // } // if(value == 8888){ -// ////console.log(itemvalue) +// //// // } // if(itemvalue == undefined || itemvalue == '' || itemvalue == 0){ // customBase.setItemValue(itemId,type,value,"","",num); @@ -43,8 +43,8 @@ //} //customBase.submitForm = function(){ -// ////console.log(window.customBase); -// ////console.log(window.customShow); +// //// +// //// // var submit_data = { // "formId":customShow.options.formid, // "dataRowNUm":customShow.options.dataRowNum @@ -79,10 +79,10 @@ // var customShow = window.customShow; // // 2017/10/17 李元杰 msgInfo渲染 // customBase.groupInfo(res_data) -//// ////console.log(window.customBase); +//// //// // _.each(res_data.data,function(redata){ // var cu_item = customBase.options.customItems[redata.fieldKey]; -// ////console.log(cu_item) +// //// // if(cu_item != undefined && cu_item.type != "dropdownlist" && cu_item.type != "subform"){ // customBase.query_set_value(cu_item.id,cu_item.type,redata.value); // } @@ -97,7 +97,7 @@ // var check_minfo = undefined; // _.each(redata.msgInfo.header,function(minfo){ // if(minfo.validate){ -// //console.log(minfo) +// // // $("#"+base_item_id+"ActiveId").find("h8[name='el_title']").append("<span class='" + classname + "'>" + minfo.name + ":" + minfo.value + "</span>"); // check_minfo = minfo; // }else{ @@ -119,13 +119,13 @@ // }); // } // var sub_type = customShow.options.customItemShow.item[base_item_id].tag_Attribute.allcopy; -//// ////console.log(sub_type); +//// //// // _.each(redata.child,function(recd,i){ // _.each(recd.items,function(recd_item){ -// ////console.log(recd_item); -// ////console.log(customShow.options.customItemShow); +// //// +// //// // var cu_cd_item = customBase.options.customItems[recd_item.fieldKey]; -// ////console.log(cu_cd_item); +// //// // if(cu_cd_item != undefined && cu_cd_item.type != "dropdownlist"){ // customBase.query_set_value(cu_cd_item.id,cu_cd_item.type,recd_item.value,i); // } @@ -133,10 +133,10 @@ // var base_item_cd = $("[fieldKey='" + recd_item.fieldKey + "']:eq('" + i + "')"); // var base_item_id_cd = base_item_cd.attr('id'); // var base_item_type_cd = base_item_cd.attr('type'); -//// ////console.log(base_item_cd); -//// ////console.log(base_item_id_cd); -//// ////console.log(base_item_type_cd); -//// ////console.log(recd_item); +//// //// +//// //// +//// //// +//// //// // if(sub_type){ // $("[id='"+base_item_id_cd+"ActiveId']:eq('" + i + "')").find("." + classname).remove(); // }else{ @@ -146,8 +146,8 @@ // if(recd_item.msgInfo){ // var check_minfo_cd = undefined; // _.each(recd_item.msgInfo.header,function(minfo_cd){ -//// ////console.log($("#"+base_item_id_cd+"ActiveId")); -//// ////console.log($("[id='"+base_item_id_cd+"ActiveId']:eq('" + i + "')")); +//// //// +//// //// // if(minfo_cd.validate){ // check_minfo_cd = minfo_cd; // if(sub_type){ @@ -187,8 +187,8 @@ //// if(base_item.length > 0){ //// var base_item_id = base_item.attr('id'); //// var base_item_type = base_item.attr('type'); -//// ////console.log(base_item_id); -//// ////console.log($("#"+base_item_id+"ActiveId").find(".listen_check")); +//// //// +//// //// //// if($("#"+base_item_id+"ActiveId").find(".listen_check").length == 0){ //// $("#"+base_item_id+"ActiveId").find("h8[name='el_title']").append("<span class='listen_check'>" + redata.amount + "</span>"); //// }else{ @@ -217,9 +217,9 @@ // }else{ // var now_value = customBase.getItemValue(base_item_id, base_item_type)[i]; // } -// ////console.log(base_item_id); -// ////console.log($("#" + base_item_id + "ActiveId")); -// ////console.log($("[id='"+base_item_id+"ActiveId']:eq('" + i + "')")); +// //// +// //// +// //// // if(sub_type){ // $("[id='"+base_item_id+"ActiveId']:eq('" + i + "')").find("." + classname).css("color", "#333"); // if(now_value != minfo.value) { @@ -342,7 +342,7 @@ setItem: function (itemId, type, value, showClass) { //被选择项目设定 checkboxRadioItem = function (itemList, value) { - console.log(itemList) + if (typeof value == "string") { value = [value]; } @@ -403,7 +403,7 @@ }, setItem: function (itemId, value, showClass) { itemId = itemId+"Item"; - console.log(value) + var rValue = value.join(",");//html回显bug修改 李伟民 0201 if(showClass ==undefined){ showClass = 'customViewUEditorCss'; @@ -463,7 +463,7 @@ return itemListReturn; }, setItem: function (itemId, value, showClass, dropdowntype) { - console.log(value) + // var select2Item = customBase.options.dropdownlistText[itemId]; // //单多选框数据设定 // //2017/10/27 马习同修改 @@ -474,8 +474,8 @@ // itemAttr = customItem[key]; // } // } - // console.log(_.cloneDeep(customItem)) - // console.log(itemAttr); + // + // // //2017/10/27 马习同修改 // setelect2Item = function (itemId,value){ // if(typeof value == "string"){ @@ -495,15 +495,15 @@ // //多个下拉菜单 马习同 // var itemList = $("."+showClass+" #itemId_"+itemAttr.parentsubFormNum+" ."+itemId+"value"); // var itemList1 = $("."+showClass+" ."+itemId+"value"); - // console.log(itemList); - // console.log(itemList1); - // console.log(value) + // + // + // // if(itemList.length ==1){ // setelect2Item(itemList[0],value); // }else{ // for (var i = 0; i < itemList.length; i++) { - // console.log(value) - // console.log(itemList[i],value[i]) + // + // // setelect2Item(itemList1[i],value[i]); // } // } @@ -561,7 +561,7 @@ }, setItem: function (itemId, value, showClass, dropdowntype) { //2017/10/27 马习同修改 - console.log(value); + var customItem = customBase.options.customItems; var itemAttr = ""; for (let key in customItem) { @@ -577,7 +577,7 @@ } else { var itemList = $("#" + itemId); } - console.log(itemList); + if (itemList.length == 1) { // setelect2Item(itemId,value,0); xhSelect.setValue(itemId, value, 0) @@ -622,7 +622,7 @@ // fileReturn.push(customBase.options.uploaderItemReady[itemId][i]); } }; - //////console.log(fileReturn); + ////// return fileReturn; }, setItem: function (itemId, value) { @@ -639,7 +639,7 @@ if (treeItem[i].getAttribute("value") == "") { var treeItem = {}; } else { - ////console.log(selectItme[i].getAttribute("value")); + //// dataItemJSson = $.parseJSON(treeItem[i].getAttribute("value")); } @@ -654,7 +654,7 @@ }, setItem: function (itemId, value) { var treeDiv = $('div#' + itemId); - console.log(value) + // 判断是否在子表单内 var isSubformTree = false; _.forIn(customShow.options.customItemShow.item, function (value, key) { @@ -670,7 +670,7 @@ // 更新数据的时候需要在div上绑定一个存储数据的value // 单选 if(value) - console.log(value); + // if(value == ' '){ // if(value == ' '){ // value = window.getEnclocal('businessTypeAuto'); @@ -685,12 +685,12 @@ } } $('#' + itemId).attr('value', JSON.stringify(dataObj)) - console.log(value) - console.log(itemId) + + var b = $('#'+itemId + "tree") - console.log($('#'+itemId + "tree")) + var treeObj = $.fn.zTree.getZTreeObj(itemId + "tree"); - console.log(treeObj) + if (treeObj == null) { return; } @@ -701,9 +701,9 @@ for (var i = 0, l = value.length; i < l; i++) { if (treeObj.setting.check.chkStyle == "radio") { // 单选 - console.log(value) + var nodes = treeObj.getNodeByParam("id", value[i], null); - console.log(nodes); + if (_.isNull(nodes)) { // treeObj.checkAllNodes(false); // return false; @@ -711,7 +711,7 @@ if (value == nodes.id) { value = nodes.name; } - console.log(value) + if (nodes != null) { // 2017 /11/6 选中 //选择节点设定 @@ -723,9 +723,9 @@ // 多选 for (var j = 0; j < value[i].length; j++) { //取得设定节点 - console.log(value[j]); + var nodes = treeObj.getNodeByParam("id", value[j], null); - console.log(nodes) + if (_.isNull(nodes)) { // treeObj.checkAllNodes(false); // return false; @@ -733,7 +733,7 @@ if (value[j] == nodes.id) { value[j] = nodes.name; } - console.log(nodes) + if (nodes != null) { // 2017 /11/6 选中 //选择节点设定 @@ -760,7 +760,7 @@ var valueData = []; // 更新数据的时候需要在div上绑定一个存储数据的value // 单选 - console.log(value); + // 不在子表单里的树更新时需要的数据 if(value){ if (typeof value[0] == "string" && value[0]!= '') { @@ -789,7 +789,7 @@ // var treeObj = $.fn.zTree.getZTreeObj(itemId + "tree1"); // 单选 var nodes = treeObj.getNodeByParam("id", value[i], null); - console.log(nodes) + if (_.isNull(nodes)) { var tid = ''; @@ -797,7 +797,7 @@ for (var i = 0; i < nodes.length; i++) { tid = nodes[i].tId } - console.log(tid) + // 强行制空 $('#'+tid+'_check').click() $('#' + tid + '_check').click() @@ -809,18 +809,18 @@ if (nodes != null) { // 2017 /11/6 选中 //选择节点设定 - console.log(nodes) + treeObj.checkNode(nodes, true, true); treeObj.expandAll(true); - console.log(treeObj) + var tid = ''; nodes11 = treeObj.getCheckedNodes(true); - console.log(nodes11) + for (var i = 0; i < nodes11.length; i++) { tid = nodes11[i].tId } - console.log(tid); - // console.log($('#'+tid+'_check')) + + // // $('#'+tid+'_check').click() // $('#'+tid+'_check').click() @@ -830,9 +830,9 @@ // 多选 for (var j = 0; j < value[i].length; j++) { //取得设定节点 - console.log(value[i][j]); + var nodes = treeObj.getNodeByParam("id", value[i][j], null); - console.log(nodes) + if (_.isNull(nodes)) { // treeObj.checkAllNodes(false); // return false; @@ -840,13 +840,13 @@ if (value[i][j] == nodes.id) { value[i][j] = nodes.name; } - console.log(nodes) + if (nodes != null) { // 2017 /11/6 选中 //选择节点设定 treeObj.checkNode(nodes, true, true); treeObj.expandAll(true); - console.log(treeObj) + } } @@ -875,7 +875,7 @@ $($(showItem[i])[0]).remove(); } var treeDiv = $('div#' + itemId); - console.log(treeDiv) + // 插入input里的value var iptValue = []; var iptValueObj = {}; @@ -894,14 +894,14 @@ // 2017/11/6 回显的地方 // 单选 if (treeObj.setting.check.chkStyle == "radio") { - console.log($(treeDiv[j])) - console.log(value); + + for (var i = 0; i < value.length; i++) { if (value[i] == '') { - console.log(1) + // dataObj = {} } else { - console.log(2) + if (i == j) { dataObj[value[i]] = '1'; } @@ -909,11 +909,11 @@ } $(treeDiv[j]).attr('value', JSON.stringify(dataObj)) dataObj = {} - console.log(j) - console.log(value[j]) + + var nodes = treeObj.getNodeByParam("id", value[j], null); - console.log(nodes) - console.log(treeObj) + + if (_.isNull(nodes)) { // treeObj.checkAllNodes(false); var tid = ''; @@ -921,7 +921,7 @@ for (var i = 0; i < nodes.length; i++) { tid = nodes[i].tId } - console.log(tid) + $('#' + tid + '_check').click() $(treeDiv[j]).prev().find('.citySel').val('') } else { @@ -931,8 +931,8 @@ if (nodes != null) { // 2017 /11/6 选中 //选择节点设定 - console.log(treeObj); - console.log(nodes) + + treeObj.checkNode(nodes, true, true); treeObj.expandAll(true); } @@ -944,15 +944,15 @@ } else { // 多选 - console.log(value[j]) + if (typeof value[j] == "string") { var strValue = value[j].split(','); // 导入excel时状态多选为字符串形式 if (strValue.length > 1) { - console.log(strValue) + for (var n = 0; n < strValue.length; n++) { var nodes = treeObj.getNodeByParam("id", strValue[n], null); - console.log(nodes) + if (strValue[n] == '') { } else { @@ -1068,33 +1068,33 @@ mytext: { getItem: function (itemId) { // var newmytextObj = $('#'+itemId+' ul'); - // console.log(newmytextObj); + // // var chooseFormData = {}; // var str = []; // _.each(newmytextObj,(opt,i)=>{ // var $mytextObj = $('#'+opt.id+' [class="data1 DATAROWNUM"]'); // var $mytextObj2 = $('#'+opt.id+' [class="data2 DATAROWNUM"]'); - //// console.log($mytextObj); - //// console.log($mytextObj2); - //// console.log($mytextObj.html()); - //// console.log($mytextObj2.html()); + //// + //// + //// + //// //// for(let i = 0;i < $mytextObj.length ;i++){ //// var $myText = $mytextObj.eq(i).html(); - //// console.log($myText) - //// console.log($mytextObj2.eq(i).html()) + //// + //// //// chooseFormData[$myText] = $mytextObj2.eq(i).html(); //// //// } //// dataArr1.push($mytextObj2.html()); - // console.log(i); - // console.log(newmytextObj.length); + // + // // if(i<newmytextObj.length-1){ // str += $mytextObj2.html()+","; // }else{ // str += $mytextObj2.html(); // } // }) - // console.log(str) + // var str = $('#' + itemId).attr("mxtVal");//关联数据 取值 11-07 李伟民 return str; @@ -1102,7 +1102,7 @@ }, setItem: function (itemId, value) { - console.log(value); + if (!_.isString(value)) { var new_value = []; _.each(value.list, function (v) { @@ -1289,9 +1289,9 @@ } //设定表单画面项目 12/7 customBase.setItemValue = function (itemId, type, value, showClass, dropdowntype, num) { - console.log(type) - console.log(value) - console.log(itemId) + + + var item; if (showClass == "") { showClass = 'customViewUEditorCss'; @@ -1309,9 +1309,9 @@ } else if (type == 'tree') { customBase.itemEdit['tree'].setItem(itemId, value); } else if (type == 'dropdownlistText') { - //console.log(value); + // customBase.itemEdit[type].setItem(itemId, value, showClass, dropdowntype); - //console.log(1); + // customBase.itemEdit["dropdownlistText2"].setItem(itemId, value, showClass, dropdowntype); } else if (type == 'splitline' || type == 'subform' || type == 'tag' || type == 'tab') { } else if (type == 'image') { @@ -1348,7 +1348,7 @@ //文件上传 customBase.uploaderFileShow = function (potion) { - console.log(potion); + var itemId = potion.id; customBase.options.uploaderItem[itemId] = {}; @@ -1403,7 +1403,7 @@ // var $list = $uploadimg, var fileDir = fileid.path; var suffix = fileDir.substr(fileDir.lastIndexOf(".")+1); - console.log(fileItem.path) + if(suffix == "mp4"){ $li = $( '<div id="' + fileid + '" class="thumbnail01">' + @@ -1528,8 +1528,8 @@ // 文件上传成功,给item添加成功class, 用样式标记上传成功。 uploader.on('uploadSuccess', function (file, response) { - //////console.log(file); - //////console.log(response); + ////// + ////// $("#" + itemId + "mesageErrDiv").remove(); $(".customViewUEditorCss #" + itemId).popover('hide') @@ -1566,11 +1566,11 @@ //图片上传 customBase.uploaderShow = function (potion) { var customShowFlag = window.getEnclocal("customShowFlag") - console.log(customShowFlag); - console.log(customBase.options); - console.log(customShow.options.customItemShow.item); + + + var customItem = customShow.options.customItemShow.item; - //////console.log(potion); + ////// var itemId = potion.id; // var uploader; customBase.options.uploaderItem[itemId] = {}; @@ -1587,7 +1587,7 @@ '</div>' ); var $list = $uploadimg.find("#" + potion.id + "fileList"); - console.log($('#' + itemId)) + var $addLi = $( '<div id="' + potion.id + 'imgPicker" class="file-item thumbnail">' + '<div style="background:url(./../../formEngine/resources/css/image.png) no-repeat ;width: 100px;height: 100px;>" </div>' + @@ -1622,9 +1622,9 @@ } } //数据编辑的情况下,数据表示 - console.log(arrItemReady) + if (arrItemReady > 0) { - console.log(potion.ItemReady) + for (fileid in potion.ItemReady) { if (potion.ItemReady.hasOwnProperty(fileid)) { var fileItem = potion.ItemReady[fileid]; @@ -1655,12 +1655,12 @@ if (potion.imagetype == "single") { $addLi.removeClass("cfg_contentNone"); } - console.log($(this)) + event.stopPropagation(); }); // $list为容器jQuery实例 $list.prepend($li); - console.log($('#customShow').children()) + } } @@ -1670,7 +1670,7 @@ setTimeout(function () { $addLi.addClass("cfg_contentNone"); }, 10); - console.log($('#customShow').children()) + } @@ -1764,11 +1764,11 @@ $img.replaceWith('<span>不能预览</span>'); return; } - // //////console.log(customBase.options.uploaderItem[itemId][file.id]); + // ////// // customBase.options.uploaderItem[itemId][file.id]["base64"] = src; $img.attr('src', src); // 12/21 - console.log($img) + $img.attr('data-original', src); // 发布页面查看大图 曲辰明 3-27 @@ -1791,18 +1791,18 @@ .appendTo($li) .find('span'); } - //////console.log(percentage); + ////// $percent.css('width', percentage * 100 + '%'); }); // 文件上传成功,给item添加成功class, 用样式标记上传成功。 uploader.on('uploadSuccess', function (file, response) { - //////console.log(file); - //////console.log(response); + ////// + ////// $('#' + file.id).addClass('upload-state-done'); // customBase.options.uploaderFileName[file.id] = response.data; customBase.options.uploaderItem[itemId][file.id] = response.data; - // //////console.log(customBase.options.uploaderItem[itemId][file.id]); + // ////// customBase.options.uploaderItem[itemId][file.id]["base64"] = $("#" + file.id + " .fileQueuedAddItem")[0].getAttribute("src"); }); @@ -1825,16 +1825,16 @@ }); }, customBase.uploaderTemp); // 12/19 - console.log($uploadimg) - console.log($('#customViewUEditor').find('#itemId_1').children()) + + var $uploaderItems = $($("#customViewUEditor #" + potion.id)[0]); var imgId = $uploaderItems.attr('id'); var srcUrl = $uploaderItems.find('img').attr('src'); // $uploaderItem.find('img').attr('data-original',srcUrl); - console.log($('#' + imgId).children().children()) + - console.log($('#' + imgId).find('#itemId_1fileList').find('label')) + $('#' + imgId).find('#itemId_1fileList').find('label').css({ 'height': '150px', 'width': '150px' @@ -1846,8 +1846,8 @@ viewer.update(); } }); - console.log($('#customShow').children()) - console.log($("[style='opacity: 0; width: 100%; height: 100%; display: block; cursor: pointer; background: rgb(255, 255, 255)']")) + + } @@ -2287,7 +2287,7 @@ // 成功 if (cur === 'error' || cur === 'invalid') { - //////////console.log( file.statusText ); + ////////// showError(file.statusText); percentages[file.id][1] = 1; } else if (cur === 'interrupt') { @@ -2621,7 +2621,6 @@ } oNode += '<hr style="border:0px;background-color:' + hrcolor + ';color:' + hrcolor + ';float: left;width: 1px;height:' + lineheight + 'px;margin-top:' + margin_top + 'px;"/>'; // oNode += '<span style="width:'+linewidth+'px;float:left;line-height:'+height+'px;">'+items[i+1]+'</span>'; - ////////////console.log(items[i+1]); if (items[i + 1] == "nbsp") { // items[0] = "0"; oNode += '<span style="width:' + linewidth + 'px;float:left;line-height:' + height + 'px;color:#fff;">' + ' ' + '</span>'; @@ -2672,18 +2671,18 @@ callback(text, barWidth, barHeight, sizeWidthHeight); } customBase.zTreeOnClick = function (event, treeId, treeNode) { - console.log(this); - console.log(event); - console.log(treeId); - console.log(treeNode); + + + + if (treeNode.checked) { // 单击事件 by kill if ($('#span_' + treeNode.id).val() == undefined || $('#span_' + treeNode.id).val() == "") { var i = $('#' + treeId).children(':first').children(':nth-child(2)').attr('class').indexOf('radio'); if (i != -1) { - ////console.log(i) - ////console.log('span_'+treeId) + //// + //// $('.span_' + treeId).remove(); $('#' + treeId.replace("tree", "")) .parent().parent().children(':first').children(':nth-child(4)').remove(); @@ -2701,42 +2700,42 @@ }; // 2017/11/2 李元杰 单选树选中事件 customBase.zTreeOncheckRadio = function (e, treeId, treeNode) { - //console.log($('#citySel').parents('div[name=treeWinTitle]').next().attr('id')); + // var zTree = $.fn.zTree.getZTreeObj(treeId); - //console.log(zTree) + // var nodes = zTree.getCheckedNodes(true); var v = ""; var dataObj = {} for (var i = 0, l = nodes.length; i < l; i++) { v += nodes[i].name + ","; - console.log(nodes) + dataObj[nodes[i].id] = '1' } if (v.length > 0) v = v.substring(0, v.length - 1) // 2017/11/6 李元杰 单选树 - // console.log($('#'+treeId).parents('div[name="TreeWin"]').find('.citySel')) - // console.log( ) + // + // $(e.currentTarget).parent().attr('value', JSON.stringify(dataObj)) $(e.currentTarget).parents('div[name="TreeWin"]').find('.citySel').val(v); // // cityObj.attr("value", v); - // console.log(e); - // console.log(treeId); - // console.log(treeNode); + // + // + // // // $('#'+treeId).parents('div[type="tree"]').find('h8').children(':nth-child(4)').remove(); - // console.log( $('#'+treeId).parents('div[type="tree"]').find('h8')); - // console.log( $('#'+treeId).parents('div[type="tree"]').find('h8').children(':nth-child(3)')) + // + // // if(treeNode.checked){ // // 单击事件 by kill // if($('#span_'+treeNode.id).val()==undefined||$('#span_'+treeNode.id).val()==""){ - // //console.log($('#'+treeId)) + // // // var i=$('#'+treeId).children(':first').children(':nth-child(2)').attr('class').indexOf('radio'); // if(i!=-1){ - // //console.log(i) - // //console.log('span_'+treeId) + // // + // // // $('.span_'+treeId).remove(); // $('#'+treeId.replace("tree","")) // .parent().parent().children(':first').children(':nth-child(4)').remove(); @@ -2833,7 +2832,7 @@ reuploadBtn: { name: "重新上传票据", cssName: 'icon iconfont icon-kongjian_danhangwenben', functionName: "customShow.reupload" }, checkbillBtn: { name: "查看票据", cssName: 'icon iconfont icon-kongjian_danhangwenben', functionName: "customShow.checkbill" }, } -console.log(Flatpickr) + Flatpickr.localize(Flatpickr.l10ns.zh); // 设置为中文 customShow.options = { customItem: {}, @@ -2866,7 +2865,7 @@ //画面check fromCheck: function (items, callback) { return customShow.onfromCheck(items); - ////console.log(1) + //// }, //03检证执行 validationRuleCheck: function (items, callback) { return true }, @@ -2889,7 +2888,7 @@ //初期化接口 interfaceInit: function (customShowFlag) { //表示模式 - console.log(customShowFlag) + if (customShowFlag == 2) { customShow.controlInit("customViewUEditorCss"); //控件初始化 @@ -2932,8 +2931,8 @@ var ss = { "formID": getEnclocal("customForm").newFormID, "dataRowNum":getEnclocal("customItem").DATAROWNUM }; var requestSingleForm = window.commonAjax("/ubp-api-seache/process/inst/log", ss, "POST", true, false); requestSingleForm.done(function (rs) { - console.log(rs.data); - console.log("新改的"); + + if (rs.data != undefined) { setDeclocal("processLog", JSON.stringify(rs.data.data)); } else { @@ -2965,7 +2964,7 @@ // 12/13 测试模拟用 if (customShowFlag == "0" || customShowFlag == "1") {// 新建 预览 隐藏 详情页 李伟民 11-17 - console.log(customShowFlag); + // 12/4 李元杰 日历当前时间 // var dataObj = { // "time":"yyyy-MM-dd HH:mm:ss" @@ -2973,7 +2972,7 @@ // var requestRight = window.commonAjax('/epc/getTime', dataObj, 'POST', true); // requestRight.done(function (res) { // // if (res.rspCode == "000000") { - // console.log(res) + // // // } // }) var myDate = new Date(); @@ -2981,10 +2980,10 @@ myDate.getMonth(); //获取当前月份(0-11,0代表1月) myDate.getDate(); customShow.currentDate = myDate.getFullYear() + '-' + (myDate.getMonth() + 1) + '-' + myDate.getDate(); - console.log(new Date()) - console.log(customShow.currentDate) + + $("#customShow").removeClass("fui-form"); - console.log(customBase.options.customItemShow) + // $(".preview-edit-pane").css("display", "none"); // 12/23 @@ -2993,11 +2992,11 @@ }// 新建 预览 隐藏 详情页 李伟民 11-17 if (customShowFlag == "2") { - console.log(customShowFlag); + //12/23 $(".preview-edit-pane").css("display", "block"); // $("#editableBtn").on("click",() => { - // console.log($(".preview-edit-pane")); + // // }) } @@ -3034,7 +3033,7 @@ var field = JSON.parse(rs.data.fieldset); //转换成数组 var fields = _.keysIn(field); - console.log(rs.data.fieldset) + //循环读取tag_Type是否含有‘auto’ for (var i = 0; i < fields.length; i++) { @@ -3062,9 +3061,9 @@ } var formbase = window.getEnclocal("customItem"); - //console.log(formbase) - //////////////console.log(formbase); - // //console.log(formbase); + // + ////////////// + // // var customItem = { formeditor: rs.data.resultForm, item: $.parseJSON(rs.data.fieldset), @@ -3077,8 +3076,8 @@ customFlag: rs.data.designMode, Linkage: rs.data.linkage } - //console.log(customItem); - //console.log(formbase) + // + // customShow.InitShow({ //绑定DIV showDiv: "customViewUEditor", @@ -3140,7 +3139,7 @@ customBase.customInit = customInit; //画面初期迁移源属性取得 // 0:预览 1:数据管理中新建 2:数据管理中展示 3:发布 4:模板中心 - //console.log(customInit) + // if (customInit.customViewItem != null && customInit.customViewItem != undefined) { customShow.costType = customInit.customViewItem.item; } @@ -3173,7 +3172,7 @@ ]; customShow.setToolBtn(btns); } - ////console.log(window.customBase); + //// //标题头表示 $('#childclick').css("display", "none"); $(".header")[0].style.display = "block"; @@ -3188,12 +3187,12 @@ //1:数据管理中新建 3:发布 4:模板中心 } else if (customShowFlag == "1" || customShowFlag == "3") { //标题头表示 - console.log("显示X"); - console.log($('#childclick')); + + $('#childclick').css("display", "block"); $('#childclick').click(() => { customShow.onclickCancel(); - console.log("点击父元素关闭"); + }); $(".header")[0].style.display = "block"; @@ -3247,8 +3246,8 @@ //第三方事件绑定 // customShow.setEventBind(); } else if (customShowFlag == "2") { - console.log("显示X"); - console.log($('#childclick')); + + $('#childclick').css("display", "block"); if (window.getEnclocal('allow') == true) { $('#childclick').css("display", "none"); @@ -3257,7 +3256,7 @@ } $('#childclick').click(() => { customShow.onclickCancel(); - console.log("点击父元素关闭"); + }); //按钮修改 马习同 2017-12-13 @@ -3277,15 +3276,15 @@ 'printableBtn',//打印 ]; //画面内容的初始化设定 - console.log(customItem); - console.log(customViewDiv); + + customShow.setContentHtml(customItem, customViewDiv); var items = {}; //数据变换 - //console.log(customInit); - //console.log(customInit.formbase) + // + // var formbase = $.parseJSON(customInit.formbase); - //console.log(formbase); + // customShow.options.dataRowNum = formbase['DATAROWNUM']; customShow.exCouldNumber = formbase['orderCode'];//获取云单编号 李伟民 12-26 if(customShow.exCouldNumber){ @@ -3295,14 +3294,14 @@ changeOrderStatus(customShow.orderStatus); items = formbase; customShow.options.itemFormbase = formbase; - console.log(_.cloneDeep(items)); + delete items['DATAROWNUM']; - console.log(_.cloneDeep(items)); + //初期化后,数据赋值(编辑模式) - console.log(_.cloneDeep(items)); + customShow.showCustom(items, customShow.options.customInit); //初期化后,数据赋值(预览) - console.log(_.cloneDeep(items)); + customShow.setShowCustomItem(items); //初期化后,票据信息追加 李伟民 12-26 SC.billInfoInit(items); @@ -3311,13 +3310,13 @@ //数据源再次追加 // var customItems = customShow.options.customItemShow.item; var customItems = customBase.options.customItems; - console.log(customItems); + for (item in customItems) { if (customItems.hasOwnProperty(item)) { if (customItems[item].type == 'dropdownlist' || customItems[item].type == 'radio' || customItems[item].type == 'checkbox' || customItems[item].type == 'tree') { var datasourcetype = customShow.options.customItemShow.item[customItems[item].id].tag_Attribute.datasourcetype; - console.log(datasourcetype); + if (datasourcetype == "custom") { //数据源绑定(自定义数据) customShow.setDatasourceData(customItems[item]); @@ -3336,16 +3335,16 @@ $(".s_savebtn").hide(); $(".customShow .fa-calendar").addClass("cfg_contentNone"); - console.log($(".customShow .tdContentClass")) + // _.each($(".customShow .tdContentClass"),opt=>{ // // $(opt).attr("title", $(opt).children().children().html()); - // console.log($(opt).html()) + // // if ($(opt).children().children().attr("type") == "text"){ // $(opt).attr("title", $(opt).children().children().val()); // }else{ - // console.log(_.cloneDeep($(opt).children().children())) - // console.log(opt.innerHTML) - // console.log($(opt).children().children()[0].innerHTML) + // + // + // // $(opt).attr("title", $(opt).children().children()[0].innerHTML); // } // }) @@ -3374,12 +3373,12 @@ customShow.hidesubform(); var unvisible = customBase.options.customItems; for (item in unvisible) { - console.log(item) + if (unvisible[item].type == "subform") { var itemId = unvisible[item].id; // var itemTwo = itemId; // var itemSubform = $('.'+"customViewUEditorCss" +" #"+itemId+"ActiveId"); - ////////////console.log(item); + //////////// //子表单删除第一条可添加 2017/10/26 马习同 // var divIcon = $('<div id="'+itemId+'save" class="cfg_contentNone"></div>'); if (customInit.designMode == 1){ @@ -3392,7 +3391,7 @@ var cloneE = $('#' + itemId + 'subformTr').clone(); } // divIcon.append(cloneE); - console.log(cloneE); + // itemSubform.append(divIcon); customBase.options.customItems[item]['cloneDiv'] = cloneE; } @@ -3416,7 +3415,7 @@ // var items = customShow.getItems(); // var items_key = _.keysIn(items); // var all_data = {}; -// //console.log(items); +// // // _.each(items_key,function(item){ // var control = {}; // var item_attr = customBase.options.customItems[item]; @@ -3454,7 +3453,7 @@ // var customItem = window.getEnclocal("customItem"); // if(customItem && customItem != ""){ // customItem = JSON.parse(customItem); -// //console.log(customItem); +// // // } // _.extend(all_data,{"data":post_data,"formId":customForm.newFormID,"id":customItem.DATAROWNUM}); // }else{//新建或预览 @@ -3471,19 +3470,19 @@ // // var items = customShow.getItems(); // // var items_key = _.keysIn(items); // // var all_data = {}; -// // //console.log(items); -// // //console.log(items_key) +// // // +// // // // // _.each(items_key,function(item){ // // var control = {}; -// // //console.log(item); +// // // // // var item_attr = customBase.options.customItems[item]; -// // //console.log(item_attr) +// // // // // if(_.isArray(items[item]) && _.isObject(items[item][0])){//判断是否为子表单 // // _.extend(control,{'fieldKey':item,'mdCode':'','value':'','type':item_attr.type,'child':[]}); // // _.each(items[item],function(cd){ -// // //console.log(cd) +// // // // // var cd_key = _.keysIn(cd); -// // //console.log(cd_key) +// // // // // var item_cd = { // // "items":[], // // "cid":"" @@ -3491,7 +3490,7 @@ // // _.each(cd_key,function(cdk){ // // var control_cd = {}; // // var item_attr_cd = customBase.options.customItems[cdk]; -// // //console.log(item_attr_cd); +// // // // // _.extend(control_cd,{'fieldKey':cdk,'mdCode':customShow.getmasterdataById(item_attr_cd.id),'value':cd[cdk],'type':item_attr_cd.type}); // // item_cd.items.push(control_cd); // // if(cdk == "dataRowNum"){ @@ -3515,7 +3514,7 @@ // // var customItem = window.getEnclocal("customItem"); // // if(customItem && customItem != ""){ // // customItem = JSON.parse(customItem); -// // //console.log(customItem); +// // // // // } // // _.extend(all_data,{"data":post_data,"formId":customForm.newFormID,"id":customItem.DATAROWNUM}); // // }else{//新建或预览 @@ -3523,14 +3522,14 @@ // // } // // _.extend(all_data,{'orderCode':""}); // // _.extend(all_data,{'ctId':"240"});// 费用类型 假 -// // //console.log(all_data); -// // //console.log(JSON.stringify(all_data)) +// // // +// // // // var all_data = customShow.queryCostAllData(); // // 2017/10/20 李元杰 queryCostAllData 抽出来存这里了 end // var query_request = window.queryAjax("epc-count/countCost",all_data,"POST",true,false); -// ////console.log(query_request); +// //// // query_request.done(function(res){ -// ////console.log("6531289"); +// //// // customBase.listen_check(res.data,"query_check"); // }) // @@ -3564,9 +3563,9 @@ obj.info = $('#budget_time').val(); var nowTime = new Date(Date.parse(obj.info)); var endTime = new Date(Date.parse(getEnclocal("customItem").budgetEndDate)); - console.log(obj.info); - console.log(nowTime); - console.log(endTime); + + + if (obj.info.length < 1) { alert("请输入增加时间"); } else if (nowTime < endTime) { @@ -3574,8 +3573,8 @@ } else { var query_request = window.queryAjaxQQ("epc-form/extend/budget/time", obj, "POST", true, false); query_request.done(function (res) { - console.log(typeof res.data) - console.log(res.data) + + if (res.data === true) { alert("扩展时间成功!"); customShow.clean(); @@ -3585,7 +3584,7 @@ } }) query_request.error(function (rs) { - // console.log(rs) + // toastr.error(rs.responseJSON.rspDesc); }) @@ -3606,7 +3605,7 @@ //根据别名获取主数据 customShow.getmasterdataById = function (itemid) { var mdata = undefined; - ////console.log(itemid); + //// if (customShow.options.customItemShow.item[itemid] != undefined) { if (customShow.options.customItemShow.item[itemid].tag_Attribute.masterData != undefined && customShow.options.customItemShow.item[itemid].tag_Attribute.masterData != '') { mdata = JSON.parse(customShow.options.customItemShow.item[itemid].tag_Attribute.masterData); @@ -3623,7 +3622,7 @@ customShow.setShowCustomItem = function (items) { // 2017/10/19 李元杰 在费用明细里插入一些信息 // 需要传给后端的对象 - //console.log(items); + // // var objData = customShow.queryCostAllData(); // 获取orderCode的值 @@ -3652,7 +3651,7 @@ //delete items['DATAROWNUM']; // 子表单中 不删除datarownum 李伟民 11-16 var items = _.cloneDeep(items); var customItems = customBase.options.customItems; - //console.log(customItems); + // //数据值变换 for (item in items) { if (items.hasOwnProperty(item)) { @@ -3662,7 +3661,7 @@ } if (customItems[item].type == 'subform' || customItems[item].type == 'tag' || customItems[item].type == 'tab') { var subformTemp = items[item]; - console.log(subformTemp) + if (subformTemp == undefined) { subformTemp = [{}]; } @@ -3671,7 +3670,7 @@ items[subformItem] = []; } } - console.log(subformTemp.length);//主数据丢失 + for (var i = 0; i < subformTemp.length; i++) { if (i != 0) { //子表单项目追加 @@ -3689,11 +3688,11 @@ } //delete items['DATAROWNUM']; // 子表单中 不删除datarownum 李伟民 11-16 - console.log(_.cloneDeep(items)) - console.log(customItems); + + //数据赋值 for (item in items) { - console.log(item); + if (items.hasOwnProperty(item)) { if (customItems[item] == undefined) { delete customItems[item]; @@ -3701,8 +3700,8 @@ } var type = customItems[item].type; var id = customItems[item].id; - console.log(id); - console.log(items[item]); + + if ( // type == 'radio' || type == 'checkbox' || // type == 'dropdownlist'|| @@ -3775,11 +3774,11 @@ var requesTitle = window.commonAjax("/datamanagement/getAssociateTitle", titleObj, "POST", true, false); var requesData = window.commonAjax("/datamanagement/getAssociateData", dataObj, "POST", true, false); requesTitle.done(function (res) { - console.log(res); + item_title = res.data; }); requesData.done(function (res) { - console.log(res); + if (!_.isNull(res.data) && res.data != undefined) { itemVal = res.data; } @@ -3789,10 +3788,10 @@ item_title = myTitle[item]; itemVal = items[item]; } - console.log(myTitle); - console.log(itemVal) - console.log(item_title); - console.log(itemVal.list); + + + + var iconID = "customShow #" + customItems[item].id + "ActiveId";// 关联数据回显渲染 李伟民 11-30 createMxtTable(iconID, item_title, itemVal.list);// 关联数据回显渲染 李伟民 11-30 // var newData = []; @@ -3805,19 +3804,19 @@ // }) // return key; // }) - // console.log(_.cloneDeep(opt)) + // // newData.push(opt); // }) - // console.log(itemVal.list); - // console.log(newData); + // + // //// var $value = newData; // var show = ""; // var divBox = $("<div></div>"); // divBox.attr('id',customItems[item].id+'divBox'); - // //console.log($value) + // // // var sdata_head = ""; // _.each($value,(opt,j)=>{ - // //console.log(opt); + // // // var ulBox = $("<ul></ul>"); // for(let i in opt){ // show = ""; @@ -3825,10 +3824,10 @@ // show += '<li>'+'<span class="data1 '+i+'">'+i+'</span>'+'<span class="data2 '+i+'">'+opt[i]+'</span>'+'</li>'; // ulBox.attr("class","addUl ulBox"+j); // ulBox.attr("id","ulBox"+j); - // //console.log(show) + // // // ulBox.append(show); // } - // console.log(sdata_head); + // // divBox.append(ulBox); // }); // $mytext.append(divBox); @@ -3846,8 +3845,8 @@ var orderid = ""; function getepc() { window.queryAjaxsd("epc/epc-form/getOrderCode", {}, "POST", true).done(function (res) { - //console.log("云账房id"); - //console.log(res); + // + // if (res.data != undefined) { orderid = res.data.orderCode; setepc(orderid); @@ -3856,14 +3855,14 @@ }) } function setepc(orderid) { - //console.log(orderid); - //console.log(customBase); - //console.log(window.customShow); + // + // + // if (customBase.options.customItems.orderCode != undefined) { var id = customBase.options.customItems.orderCode.id; var type = customBase.options.customItems.orderCode.type; - //console.log(id); - //console.log(type); + // + // customBase.setItemValue(id, type, orderid); } @@ -3889,9 +3888,9 @@ var iframe_src = "http://csza.chfcloud.com/views/order_create_visit.html?token=" + getEnclocal("testToken") + "&compid=" + getEnclocal("testCompanyId") +"&tenantId=" + getEnclocal("testTenantId"); //var iframe_src = "http://csza.chfcloud.com/views/order_create_visit.html?token=a23efb1df2303a914b1139d4e1d1859f&compid=66&tenantId=13"; $("#upload_iframe").append("<iframe id='uploadBill' style='width:100%;overflow: auto;'></iframe>"); - ////console.log($("body")); + //// var thisHeight = $("body").height(); - ////console.log(thisHeight); + //// $('#upload_iframe').height(thisHeight); $('#uploadBill').height(thisHeight); $('#uploadBill').attr("src", iframe_src); @@ -3905,7 +3904,7 @@ customShow.getExCouldNumber = function (event) { if (event && event.data && event.data.indexOf('csc_OrderCode=') != -1) { var exCouldNumber = event.data.split('=')[1]; - console.log(exCouldNumber); + customShow.exCouldNumber = exCouldNumber; if(getEnclocal('customShowFlag') == 2){//详情页上传票据需将云单编号传给后台 李伟民 01-04 var orderData = { @@ -3961,7 +3960,7 @@ $(div).css("width", "100%"); // $(customViewDiv).css("height",customItem.fromheigh); // $(customViewDiv).css("width",customItem.fromwidth); - console.log(1); + } } else { @@ -3985,8 +3984,8 @@ //基本信息List取得 customBase.options.customItems = customShow.getItemsList(); - console.log(customShow.getItemsList()) - console.log(customShow.options.customItemShow.item) + + //接口绑定 interfaceBind = customShow.initEvent.interfaceBind; @@ -4019,7 +4018,7 @@ //画面初期化 customShow.initEvent.interfaceInit(customShow.options.customShowFlag); - console.log(customShow.options.customItemShow.item); + //第三方初始化 customShow.initEvent.interfaceInit3rd(); @@ -4057,8 +4056,8 @@ // 12/16 end } $('.customViewUEditorCss').off('click.tree').on('click.tree', function () { - console.log(1); - console.log($('div.drop_down_sel')) + + $('div.drop_down_sel').remove(); $('.zTreeDemoBackground').css("display", "none"); $(".search_input").css("display", "none"); @@ -4067,7 +4066,7 @@ $('div.TreeWin').off('click.tree').on('click.tree', function (event) { // 展开树 12/4 - console.log($(this)) + $('div.drop_down_sel').remove(); var fieldKey = $(this).find('.zTreeDemoBackground').attr('fieldkey'); $('.zTreeDemoBackground').css("display", "none"); @@ -4257,8 +4256,8 @@ $(".ztree").parent().css(subFormTreeCss); for (var i = 0; i < ztreeParentCss.length; i++) { // 11/16 李元杰 子表单内树形搜索框定位 - console.log($(ztreeParentCss[i]).find('ul')) - console.log($(ztreeParentCss[i]).parents('.fieldOrderNum')) + + var isAllCopyTreeIs = $(ztreeParentCss[i]).find('ul').attr('id').split('tree')[0]; if (customShow.options.customItemShow.item[isAllCopyTreeIs].parentsubFormNum != 0) { $(ztreeParentCss[i]).css(subFormTreeCss); @@ -4289,20 +4288,20 @@ if ($('button[name="treeButton1"]').length > 0) { var treeId = $('button[name="treeButton1"]').prev().attr("id"); var treeJson = $('button[name="treeButton1"]').prev().children(':nth-child(2)').attr("masterdata"); - //////console.log($(this).prev()[0]); - // console.log(treeJson); - //console.log(treeId); + ////// + // + // if (typeof (treeJson) == "undefined" || treeJson == "") { // alert("该控件没有进行数据绑定!") } else { // $("#occlusion").fadeTo(200); - console.log($('button[name="treeButton1"]')) + $('button[name="treeButton1"]').prev().show(); - console.log($('div[name="treeWinTitle"]')) + var treeWinTitle = $('div[name="treeWinTitle"]'); - console.log(treeWinTitle[0]) + for (var i = 0; i < treeWinTitle.length; i++) { - console.log($(treeWinTitle[i])); + $(treeWinTitle[i]).find('input[type="text"]').attr('id', `search_input${i}`) } } @@ -4322,11 +4321,11 @@ // 12/7 end $('.ztree').addClass('search_list'); // 搜索框获得焦点时 初始化 - console.log($('.tabBox')) + $('.tabBox').on('focus', '.search_input', function () { - console.log($(this)) + var searchListId = $(this).parents('div[name="TreeWin"]').find('.ztree').attr('id'); - console.log($(this).parents('div[name="TreeWin"]').find('.ztree')); + $(this).fastLiveFilter(`#${searchListId}`, {}); }) // $('button[name="treeButton2"]').click(function(){ @@ -4363,7 +4362,7 @@ // } // for(var x=0;x<a.length;x++){ // $('#'+a[x]).click(); - // ////console.log(a[x]) + // //// // } // // $("#occlusion").fadeOut(200); @@ -4385,7 +4384,7 @@ //事件绑定 eventBind = customShow.initEvent.eventBind; //02事件绑定:字段别名 字段类型 事件名 自定义事件名 - console.log(eventBind); + for (var i = 0; i < eventBind.length; i++) { // 自定义事件名 var funstr = eventBind[i].eventmethod + "()";//页面事件绑定 李伟民 12-22 @@ -4404,7 +4403,7 @@ try {//页面事件 无资源文件 JS报错解决 李伟民 0131 eval($(this).attr('funstr')); } catch (error) { - console.log('资源文件中无此方法') + } }); }; @@ -4495,12 +4494,12 @@ var itemId = unvisible[item].id; // var itemTwo = itemId; // var itemSubform = $('.'+"customViewUEditorCss" +" #"+itemId+"ActiveId"); - ////////////console.log(item); + //////////// //子表单删除第一条可添加 2017/10/26 马习同 // var divIcon = $('<div id="'+itemId+'save" class="cfg_contentNone"></div>'); var cloneE = $('#' + itemId + 'subformTr').clone(); // divIcon.append(cloneE); - console.log(cloneE); + // itemSubform.append(divIcon); @@ -4521,14 +4520,14 @@ // $($($('.customViewUEditorCss #'+itemId)[0]).parentNode).find(".select2").remove(); var dropdowntype = customShow.options.customItemShow.item[itemId].tag_Attribute.dropdowntype; var editable = customShow.options.customItemShow.item[itemId].tag_Attribute.editable; - // ////console.log(editable); + // //// var readonly = "readonly"; if (editable) { readonly = ""; } var width = $(item[0])[0].style.width.replace("px", ""); width = parseInt(width); - console.log(width) + customBase.options.dropdownlistText[itemId] = listData; // $("#"+itemId).parent().empty(); var itemIdClass = "selectClass js-example-basic-single defaultHeight customShowItemClass dropdowntypeCss " + itemId + "value " + readonly; @@ -4579,7 +4578,7 @@ } else { if (customShow.options.customItemShow.item[itemId].tag_Attribute.datasourcetype == "custom") { var customItemsTemp = customShow.options.customItemShow.item[itemId].tag_Attribute.custom; - ////////console.log(customItemsTemp); + //////// var initTempDataCustom = [] var j = 0; @@ -4587,11 +4586,11 @@ if (customItemsTemp[i].ischecked) { initTempDataCustom[j] = customItemsTemp[i].itemtext; j++; - // ////////console.log(customItems[i].itemtext); - // ////////console.log(customItems[i]); + // //////// + // //////// } } - ////////console.log(initTempDataCustom); + //////// if (customShow.options.customItemShow.item[itemId].tag_Attribute.dropdowntype == "single") { customBase.setItemValue(itemId, "dropdownlistText", [initTempDataCustom[0]], "customViewUEditorCss", dropdowntype); } else { @@ -4614,12 +4613,12 @@ var oNode = ""; var customItemsData = customBase.options.customItems; for (data in customItemsData) { - // console.log(customBase.options.customItems[data]); - // console.log(itemId); + // + // for (var i = 0; i < listData.length; i++) { if (customBase.options.customItems[data].id == itemId) { // 11/9 李元杰 是否有选中 - console.log(customBase.options.customItems[data]) + var curFlag = ''; if(listData[i].ischecked){ curFlag = 'cur' @@ -4634,7 +4633,7 @@ } }; // if(customBase.options.customItems[data].id == itemId ){ - // // console.log(listData); + // // // } } @@ -4653,14 +4652,14 @@ customBase.setItemValue(itemId, tag_Type, initTempData, "customViewUEditorCss"); customShow.setShowItem(itemId, tag_Type, initTempData); } - console.log($(item)) + // 12/11 禁用背景 var spanDiv = $(item).find('li').find('span'); - console.log($(item).parent().attr('editable')) + if (($(item).parent().attr('editable') == "true")) { $(item).find('li').find('span').addClass("disableUrl"); for (var i = 0; i < spanDiv.length; i++) { - console.log($(spanDiv[i])) + if (tag_Type == "radio") { $(spanDiv[i]).removeClass("disableRadUrl"); } else if (tag_Type == "checkbox") { @@ -4669,7 +4668,7 @@ } } else { for (var i = 0; i < spanDiv.length; i++) { - console.log($(spanDiv[i])) + if (tag_Type == "radio") { $(spanDiv[i]).addClass("disableRadUrl"); } else if (tag_Type == "checkbox") { @@ -4692,7 +4691,7 @@ $(treeDiv[i]).find('ul').attr('id', ultreeId + i); $.fn.zTree.init($($('.customViewUEditorCss #' + itemId + "tree" + i)), setting, listData); // $('#'+itemId).parents('div[name="TreeWin"]').find('.citySel').addClass('disableColor') - console.log('#' + itemId); + var treeObj = $.fn.zTree.getZTreeObj(itemId + "tree" + i); // customShow.setTree.disableParentNode.set(treeObj); if (treeObj) { @@ -4714,7 +4713,7 @@ $('#' + itemId).attr('value', JSON.stringify(dataObj)) $('#' + itemId).prev().find('.citySel').val(defaultValue); // 12/8 禁止选中 李元杰' - console.log(itemId) + var treeArray = _.filter(customShow.options.customItemShow.item, ['tag_Type', 'tree']) for (var i = 0; i < treeArray.length; i++) { if (treeArray[i].tag_Id == itemId) { @@ -4746,21 +4745,21 @@ //API数据 setApiDatasource = function (item, callback) { - console.log(item) + var apiUrl = item.tag_Attribute.apiUrl; var callbackId = item.tag_Id; callbackApiData = function (itemData, url) { - console.log(url) + var ItemId = url.split("callbackId=")[1]; - console.log(url) + var item = customShow.options.customItemShow.item[ItemId]; var apiIdKey = item.tag_Attribute.apiIdKey;// 表示项 var apiPIdKey = item.tag_Attribute.apiPIdKey;// 表示值 itemData = itemData.data; things = []; - console.log(itemData); + // var textcolumn = itemData[apiIdKey]; // var valuecolumn = itemData[apiPIdKey]; @@ -4778,7 +4777,7 @@ }; } else if (item.tag_Type == 'tree') { var apiName = item.tag_Attribute.apiName; - console.log(apiName) + // var namecolumn = itemData[apiName]; // if (textcolumn.length != namecolumn.length) { // return; @@ -4787,19 +4786,19 @@ things[i] = { id: itemData[i][apiIdKey], pId: itemData[i][apiPIdKey], name: itemData[i][apiName] }; }; } else { - console.log(itemData) + for (var i = 0; i < itemData.length; i++) { - console.log(itemData[i]) - console.log(apiPIdKey) - console.log(apiIdKey) - console.log(itemData[i][apiPIdKey]) - console.log(itemData[i][apiIdKey]) + + + + + things[i] = { id: i, value: itemData[i][apiPIdKey], text: itemData[i][apiIdKey] }; }; } - console.log(things); + callback(ItemId, things); } @@ -4809,20 +4808,20 @@ setMasterData = function (item, callback) { var callbackId = item.tag_Id; var code = item.tag_Attribute.masterData; - console.log(code); + // 11/9 - console.log(callbackId) + // if(code == ""){ // return; // } callbackMasterData = function (itemid, itemData) { things = []; - console.log('√') - console.log(itemData); - console.log(itemid); + + + var customItems = customBase.options.customItems; for (item in customItems) { if (customBase.options.customItems[item].id == callbackId) { @@ -4840,7 +4839,7 @@ }; } else if (item.tag_Type == 'tree') { //------------------------- - console.log(itemData) + if (itemData != null) { for (var i = 0; i < itemData.length; i++) { things[i] = { @@ -4898,8 +4897,8 @@ } callbackDatasource = function (rs) { - console.log(this); - console.log(this.url); + + var ItemId = this.url.split("callbackId=")[1]; item = customShow.options.customItemShow.item[ItemId]; @@ -4978,19 +4977,19 @@ } var datasourcetype = item.tag_Attribute.datasourcetype; - // ////console.log(datasourcetype); - console.log(item); - console.log(datasourcetype); + // //// + + setDataItem[datasourcetype](item, setCallbackItem); // _.each($(".customShow .tdContentClass"), opt => { // // $(opt).attr("title", $(opt).children().children().html()); - // console.log($(opt).html()) + // // if ($(opt).children().children().attr("type") == "text") { // $(opt).attr("title", $(opt).children().children().val()); // } else { - // console.log(_.cloneDeep($(opt).children().children())) - // console.log(opt.innerHTML) - // console.log($(opt).children().children()[0].innerHTML) + // + // + // // $(opt).attr("title", $(opt).children().children()[0].innerHTML); // } // }) @@ -4998,13 +4997,13 @@ // return itemData; // _.each($(".customShow .tdContentClass"), opt => { // // $(opt).attr("title", $(opt).children().children().html()); - // console.log($(opt).html()) + // // if ($(opt).children().children().attr("type") == "text") { // $(opt).attr("title", $(opt).children().children().val()); // } else { - // console.log(_.cloneDeep($(opt).children().children())) - // console.log(opt.innerHTML) - // console.log($(opt).children().children()[0].innerHTML) + // + // + // // $(opt).attr("title", $(opt).children().children()[0].innerHTML); // } // }) @@ -5053,7 +5052,7 @@ } defaultValue = defaultValueArray.join(',') } - console.log(dataObj) + objValue[0] = defaultValue; objValue[1] = dataObj; } @@ -5082,7 +5081,7 @@ defaultvalue: item.tag_Attribute.defaultvalue, // field:"", } - console.log(item.tag_Attribute.defaultvalue) + } }; return itemsList; @@ -5093,7 +5092,7 @@ // 单选框 $('.select .custom-radio').unbind(); $('.select .custom-radio').on('click', function () { - // //////////console.log(this.className); + // ////////// if (this.className.indexOf("readonly") > -1) { return; } @@ -5109,7 +5108,7 @@ } $(this).toggleClass('cur'); // $($(this).parent().parent().parent().parent()).find(".errorItemCss").removeClass('errorItemCss'); - // //////////console.log($($(this).parent().parent().parent())[0].id); + // ////////// // var id = $($(this).parent().parent().parent())[0].id; // $("#"+id+"mesageErrDiv").remove(); // $(".customViewUEditorCss #"+id).popover('hide') @@ -5154,7 +5153,7 @@ customShow.controlInit = function (showClass) { var customItems = customBase.options.customItems; - console.log(customItems) + if ('customShow' != showClass) { //HTML内容控件初期化 var htmlediterShow = $(".customViewUEditorCss .htmlediterShowClass"); @@ -5164,7 +5163,7 @@ var htmlediterShowItemId = itemId.replace("Item", ""); // var heightShow = htmlediterShow[i].getAttribute("heightShow"); // var widthShow = htmlediterShow[i].getAttribute("widthShow"); - // ////////console.log(customShow.options.customItemShow.item[htmlediterShowItemId].tag_Attribute.alias); + // //////// var heightShow = customShow.options.customItemShow.item[htmlediterShowItemId].tag_Attribute.height; var widthShow = customShow.options.customItemShow.item[htmlediterShowItemId].tag_Attribute.width; // customShow.options.customItemShow.item[itemId].tag_Attribute.alias; @@ -5199,7 +5198,7 @@ //,iframeCssUrl:"css/bootstrap/css/bootstrap.css" //引入自身 css使编辑器兼容你网站css //更多其他参数,请参考ueditor.config.js中的配置项 }).ready(function () { - ////////////console.log(customBase.options.customItems); + //////////// id = this.key; for (i in customBase.options.customItems) { if (customBase.options.customItems.hasOwnProperty(i)) { @@ -5209,12 +5208,12 @@ UE.getEditor(id).setContent(customBase.options.customItems[i].defaultvalue); } else { var defaultvalue = customShow.options.itemFormbase[i]; - // ////////console.log(defaultvalue); + // //////// // defaultvalue=defaultvalue+" "; UE.getEditor(id).setContent(defaultvalue); // setTimeout(function() { // // this.body.focus(); - // ////////console.log(UE.getEditor(id)); + // //////// // UE.getEditor(id).options.scaleEnabled =false; // }, 1000); } @@ -5227,8 +5226,8 @@ } $(".edui-editor-bottomContainer").addClass("cfg_contentNone"); this.body.onclick = function (event, ui) { - //////////console.log(this); - //////////console.log(this.getAttribute("id")); + ////////// + ////////// // $(this).removeClass("errorItemCss"); // $("#"+this.getAttribute("id")+"mesageErrDiv").remove(); } @@ -5293,7 +5292,7 @@ else if (customItems[item].type == "mytext") { if ("customViewUEditorCss" == showClass) { var itemId = customItems[item].id; - ////console.log(itemId); + //// var showCustomItem = customShow.options.customItemShow.item[itemId]; // var itemValue = $('.'+showClass +" #"+itemId)[0].getAttribute("qrcodeurl"); // var widthQrcode = $("#"+customItems[item].id)[0].width; @@ -5380,11 +5379,11 @@ $("#" + itemId + "ActiveId").find("#" + itemTwo + "uld form input").attr("id", itemTwo + "btn"); $("#" + itemId + "ActiveId").find("#" + itemTwo + "uld form").attr("itemId", itemTwo); - //////////////console.log(item); + ////////////// var ulIcon = document.createElement("ul"); var liIcon = ""; var m_customItems = customShow.options.customItemShow.item; - console.log(customBase.options) + var subItems = []; var parentNum = itemId.replace("itemId_", ""); _.each(m_customItems, opt => { @@ -5392,26 +5391,26 @@ subItems.push(opt); } }) - console.log(subItems) + _.remove(subItems, n => { return n.tag_Attribute.alias == "DATAROWNUM" || n.tag_Attribute.visible == false; }); //_.sortBy(orderArr, ['fieldOrderNum']); subItems = _.sortBy(subItems, ['fieldOrderNum']); _.each(subItems, opt => { - console.log(opt) + if (opt.tag_Type == "number") { liIcon += "<li class='n_totle'><input class='" + opt.tag_Id + "totle textCssDiv defaultHeight' type='text' readonly></li>" - console.log(1) + } else { liIcon += "<li class='p_totle'></li>" - console.log(2) + } }); $(ulIcon).append(liIcon); $("#" + itemId + "ActiveId").find(".h_totle").append(ulIcon); - console.log($("#" + itemId + "ActiveId").find(".h_totle")) - console.log(ulIcon) + + // 单行文本 多行文本 数字 日历 } else if (customItems[item].type == "text" || customItems[item].type == "textarea" || customItems[item].type == "number" || customItems[item].type == "calendar") { var itemId = customItems[item].id; @@ -5425,7 +5424,7 @@ } } } - console.log(defaultvalue) + // 之前表单日历默认值不存在时 12/4 if (defaultvalue == undefined || defaultvalue == 'undefined') { defaultvalue = '' @@ -5476,7 +5475,7 @@ || customItems[item].type == "htmlediter" || customItems[item].type == "link" || customItems[item].type == "subform" ) { - console.log(customBase.options.customItems[item]) + customShow.setShowAttribute(customBase.options.customItems[item]); } // 12/15 @@ -5519,7 +5518,7 @@ $('.subformAdd').unbind(); function addSubFunc() { //子表单项目追加 - //console.log($(this)[0]); + // customShow.addsubformList($(this)[0], "customViewUEditorCss"); // customShow.setXhSelectListAdd(); //子表单事件追加 @@ -5527,7 +5526,7 @@ //公式初期化 customLinkageAnalysis.bindLinkage(); customShow.oneTotle(); - //console.log($('.subformAdd')); + // $('.subformAdd').unbind('click', addSubFunc); $('.subformAdd').on('click', addSubFunc); //行程排序初期化 @@ -5540,7 +5539,7 @@ //主数据丢失 // $('.subformAdd').unbind(); // $('.subformAdd').on('click', function(){ - // console.log(1) + // // //子表单项目追加 // customShow.addsubformList($(this)[0],"customViewUEditorCss"); // //子表单事件追加 @@ -5577,17 +5576,17 @@ //lym子表单上传 $('.sonImportFile').unbind(); $(".sonImportFile").click(function () { - console.log("进入点击事件"); + //var checkedObj = $("#tbody input[type=checkbox]:checked"); - console.log("fdsffddffd"); + // //创建文件上传对象 var a = $(this).attr("itemId") - console.log(a) + $("#" + a + "btn").click( ); $("#" + a + "btn").change(function () { - console.log("uqwhdoqwhdo"); + //var objFile = $("#"+itemTwo+"btn"); //改变 @@ -5598,10 +5597,10 @@ var user = getEnclocal("userName"); var userName = user; var aba = a; - console.log(aba); + //结束 - console.log(tenantId); - console.log(formID); + + var objFile = $(this); if (objFile.value == "") { return; @@ -5622,7 +5621,7 @@ async: false, success: function (data) {//异步上传成功之后的操作 if (data != undefined && data != null) { - console.log("返回参数"); + } } @@ -5630,10 +5629,10 @@ var requestData = window.SonfiledUpload(dataObj, options, "/excel/impSonExcel", $(this).attr("itemId"), fileext); var excels = JSON.parse(requestData); - console.log(requestData); - // console.log("最后"); + + // // - // console.log($(this).attr("itemId")) + // //改变 $(mthis).val(""); if (excels.data != undefined) { @@ -5653,7 +5652,7 @@ }); //文本文件上传 var uploaderFile = $(".customViewUEditorCss .uploaderFile"); - console.log(uploaderFile) + for (var i = 0; i < uploaderFile.length; i++) { var imageItem = customShow.options.customItemShow.item[uploaderFile[i].id]; @@ -5679,7 +5678,7 @@ //必须入力验证 // var mustcheckCss = $(".mustcheckCss");//-----------todo // for (var i = 0; i < mustcheckCss.length; i++) { - // ////////////////console.log('#'+$(mustcheckCss)[i].id); + // //////////////// // }; //子表单默认删除项目去掉 @@ -5741,7 +5740,7 @@ var showItem = customBase.getAmountHtml(defaultSize, true); customBase.amount2Image(showItem, "amount", defaultSize, function (amountHtml) { - // ////////////////console.log(idTemp); + // //////////////// $("#" + idTemp + "amount").addClass("cfg_contentNone"); for (var i = 0; i < $("." + idTemp + "value").length; i++) { $("." + idTemp + "value")[i].setAttribute("src", amountHtml); @@ -5755,24 +5754,24 @@ $('.chooseMenu').unbind(); $(".mytext_icon").on("click", function () { $(this).closest("[type='mytext']").find('.boxBtn').click(); - console.log(customShow.options); - console.log(customBase.options); + + }) $('.boxBtn').on('click', (obj) => { - console.log(customBase.options) + addVal = []; //取得父页面变量 var outWindowObj = window.parent; var $iconId = $(obj)[0].target.getAttribute("myAttr"); var iconAttr = customShow.options.customItemShow.item[$iconId]; - console.log(iconAttr); + if ($("#" + $iconId).attr("formhuixian") != undefined) { var formhuixian = JSON.parse($("#" + $iconId).attr("formhuixian")); } - //console.log(formhuixian); + // let head = ""; if ($(obj)[0].target.previousSibling.getAttribute("chooseForm") != "" || iconAttr.tag_Attribute.relevancesourcetype == "fundata") { - console.log(attrData); + if (iconAttr.tag_Attribute.relevancesourcetype == "fundata") {//函数分支修改 李伟民 12-05 var titleObj = { "key": JSON.parse(iconAttr.tag_Attribute.fundata)['key'] }; var requestTitle = window.commonAjax("/datamanagement/getAssociateTitle", titleObj, "POST", true, false); @@ -5797,14 +5796,14 @@ if (attrData && attrData.ScreenCondition != undefined) { //下拉框取值 let getVal = attrData.ScreenCondition.child; - console.log(getVal); + _.each(getVal, opts => { _.each(customBase.options.customItems, opt => { if (opt.fieldKey == opts.fieldKey && opts.side == "thi") { opts.value = ""; if (opt.type == "dropdownlist") { var getVals = customBase.getItemValue(opt.id, "dropdownlistText"); - console.log(getVals); + if (getVals[0][0] != undefined) { opts.value = getVals[0]; } else { @@ -5812,7 +5811,7 @@ } } else if (opt.type == "tree") {//树控件 处理 李伟民 12-5 var getVals = customBase.getItemValue(opt.id, opt.type); - console.log(getVals); + if (getVals[0][0] != undefined) { opts.value = getVals[0]; } else { @@ -5820,7 +5819,7 @@ } } else {//树控件 处理 李伟民 12-5 var getVals = customBase.getItemValue(opt.id, opt.type); - console.log(getVals); + if (getVals != undefined) { opts.value = getVals; } else { @@ -5846,8 +5845,8 @@ } if ($divsLength == 0) { //外层蒙版 - console.log(customShow.options.customItemShow.item) - console.log($iconId) + + var my_text_title = customShow.options.customItemShow.item[$iconId].tag_Attribute.title; var menuContent = document.createElement('div'); @@ -5964,13 +5963,13 @@ var count = fenye("5", "1", formId, sCondition, formhuixian, head, $iconId, addVal, []); lastPage = Math.ceil(count / 5); - //console.log($(".pageF")) + // $(".pageF").paging({ pageNo: 1, totalPage: lastPage, totalSize: count, callback: function (num) { - console.log(num); + fenye("5", num, formId, sCondition, formhuixian, head, $iconId, addVal, []); } }); @@ -6128,9 +6127,9 @@ } customShow.addtree = function (itemId, item) { - console.log(customBase.settingRadioType) + //修改克隆树的实例化 马习同2017-11-21 - console.log(customShow.options.customItemShow.item) + var customItem = customShow.options.customItemShow.item; var ztree = {}; for (let key in customItem) { @@ -6168,14 +6167,14 @@ $.fn.zTree.init($($(".customViewUEditorCss #" + key + "tree" + index_i)), customBase.settingRadioType, customShow.listData[key]); // 12/2 树展开 treeObj = $.fn.zTree.getZTreeObj(key + "tree" + index_i); - console.log(treeObj) + if (treeObj) { treeObj.expandAll(true); } } else if (ztree[key].tag_Attribute.dropdowntype == "multiple") { $.fn.zTree.init($($(".customViewUEditorCss #" + key + "tree" + index_i)), customBase.settingChkboxType, customShow.listData[key]); treeObj = $.fn.zTree.getZTreeObj(key + "tree" + index_i); - console.log(treeObj) + if (treeObj) { treeObj.expandAll(true); } @@ -6187,14 +6186,14 @@ var defaultValue = $('#' + treeId).parent().attr('defaultvalue'); // // 12/7 默认值 if (defaultValue != '') { - console.log(treeObj) + customShow.treeDefaultSet(treeObj, defaultValue); } } } - console.log(treeObj) - console.log($(item)) + + //修改克隆树的实例化End 马习同2017-11-21 index_i++; @@ -6202,16 +6201,16 @@ //子表单项目追加 customShow.addsubformList = function (subformAdd, showClass) { - console.log(1); - console.log(i) + + var allcopy = subformAdd.getAttribute('allcopy'); var itemId = subformAdd.getAttribute('itemId'); //单行记录更新 - console.log(allcopy) + if (allcopy == "false") { - console.log(1); - console.log(customBase.options.customItems); - console.log(customBase.options.customItems[customShow.options.customItemShow.item[itemId].tag_Attribute.alias].cloneDiv); + + + var item = customBase.options.customItems[customShow.options.customItemShow.item[itemId].tag_Attribute.alias].cloneDiv; // 子表单隐藏 马习同 11-13 // var item =$("."+showClass+" #"+itemId+"save").children()[0]; @@ -6219,14 +6218,14 @@ if (item == undefined) {// 子表单回显 修改 李伟民 11-10 var tbody = $("." + showClass + " #" + itemId + "ActiveId").find("tbody"); tbody = tbody[0].cloneNode(true); - console.log(tbody) + // 清空input 12/7 - console.log($(item)) + if ($(item).find('.zTreeDemoBackground').attr('defaultvalue') == '') { $(item).find(".citySel").val(''); } $(tbody).find(".select2").remove(); - console.log($(tbody).html()); + $(tbody).find(".tdTitleClass").closest("tr").addClass("table_title"); $(tbody).find(".dropdowntypeCss").select2({ theme: "classic" }); // $(tbody).find(".zTreeDemoBackground").select2({theme: "classic"}); @@ -6239,9 +6238,9 @@ }// 去除重复的tr 李伟民 11-14 // $(tbody).find(".cfg_contentNone").removeClass("cfg_contentNone"); tbody = customShow.addsubformListInit(itemId, $(tbody).find("tr")); - console.log(tbody); - console.log(itemId); - console.log($(tbody).find("#" + itemId).attr("class")); + + + $(tbody).find("input").attr("funarr", "");//公式绑定 清空 李伟民 12-11 $(tbody).find("input").attr("checkfunarr", ""); $(tbody).find(".select_get").attr("funarr", ""); @@ -6255,7 +6254,7 @@ var defaultvalue = $(item).find('.zTreeDemoBackground').attr('defaultvalue'); var itemIdTree = $(item).find('.ztree').attr('id'); var treeObj = $.fn.zTree.getZTreeObj(itemIdTree); - console.log(treeObj) + // 12/7 默认值 if ($(item).find('.zTreeDemoBackground').attr('defaultvalue') == '') { $(item).find(".citySel").val(''); @@ -6275,9 +6274,9 @@ customShow.addtree(itemId, item); //普通模式下 子表单添加记录 } else if (allcopy == null){ - console.log(1); - console.log(customBase.options.customItems); - console.log(customBase.options.customItems[customShow.options.customItemShow.item[itemId].tag_Attribute.alias].cloneDiv); + + + var item = customBase.options.customItems[customShow.options.customItemShow.item[itemId].tag_Attribute.alias].cloneDiv; // 子表单隐藏 马习同 11-13 // var item =$("."+showClass+" #"+itemId+"save").children()[0]; @@ -6285,14 +6284,14 @@ if (item == undefined) {// 子表单回显 修改 李伟民 11-10 var tbody = $("." + showClass + " #" + itemId + "ActiveId").find("tbody"); tbody = tbody[0].cloneNode(true); - console.log(tbody) + // 清空input 12/7 - console.log($(item)) + if ($(item).find('.zTreeDemoBackground').attr('defaultvalue') == '') { $(item).find(".citySel").val(''); } $(tbody).find(".select2").remove(); - console.log($(tbody).html()); + $(tbody).find(".tdTitleClass").closest("tr").addClass("table_title"); $(tbody).find(".dropdowntypeCss").select2({ theme: "classic" }); // $(tbody).find(".zTreeDemoBackground").select2({theme: "classic"}); @@ -6305,9 +6304,9 @@ }// 去除重复的tr 李伟民 11-14 // $(tbody).find(".cfg_contentNone").removeClass("cfg_contentNone"); tbody = customShow.addsubformListInit(itemId, $(tbody).find("tr")); - console.log(tbody); - console.log(itemId); - console.log($(tbody).find("#" + itemId).attr("class")); + + + $(tbody).find("input").attr("funarr", "");//公式绑定 清空 李伟民 12-11 $(tbody).find("input").attr("checkfunarr", ""); $(tbody).find(".select_get").attr("funarr", ""); @@ -6324,7 +6323,7 @@ var defaultvalue = $(item).find('.zTreeDemoBackground').attr('defaultvalue'); var itemIdTree = $(item).find('.ztree').attr('id'); var treeObj = $.fn.zTree.getZTreeObj(itemIdTree); - console.log(treeObj) + // 12/7 默认值 if ($(item).find('.zTreeDemoBackground').attr('defaultvalue') == '') { $(item).find(".citySel").val(''); @@ -6343,14 +6342,14 @@ customShow.addtree(itemId, item); //子表单事件追加 } else { - console.log(1); + //全子表单复制 - // //console.log(1); + // // var itemstr = "." + showClass + " #" + itemId + "ActiveId"; var item = $(itemstr)[0]; - // //console.log(item); + // // item = item.cloneNode(true); - //console.log(item); + // var divIcons = document.createElement("div"); divIcons.setAttribute("class", "frm_item_icons allCopyCss"); var divIcon = document.createElement("div"); @@ -6365,7 +6364,7 @@ // $(item).find(".icon-jiahao").parent().addClass("cfg_contentNone"); $(item).append(divIcons); // 清空 树的input - console.log($(item)) + if ($(item).find('.zTreeDemoBackground').attr('defaultvalue') != '') { } else { @@ -6373,11 +6372,11 @@ } $(item).find(".select2").remove(); $(item).find(".dropdowntypeCss").select2({ theme: "classic" }); - //console.log(item); + // item = customShow.addsubformListInit(itemId, item); // 10/23添加子表单记录 var beforeitem = $("." + showClass + " #" + itemId + "ActiveId"); - //console.log(beforeitem); + // $(item).find("input").attr("funarr", "");//公式绑定 清空 李伟民 12-11 $(item).find("input").attr("checkfunarr", ""); $(item).find(".select_get").attr("funarr", ""); @@ -6398,9 +6397,9 @@ } //马习同修改 子表单隐藏 11/13 customShow.hidesubform = function () { - // console.log($("[tag_type='subform']")) + // _.each($("[tag_type='subform']"), opt => { - console.log(opt) + $($(opt).find(".tdTitleClass")[0]).addClass("cfg_contentNone"); $($(opt).find(".tdContentClass")[0]).addClass("cfg_contentNone"); }) @@ -6414,7 +6413,7 @@ // _.remove(unvisibleArr,n => { // return n.fieldKey == "DATAROWNUM"; // }) - // console.log(unvisibleArr) + // _.each(unvisibleArr, opt => { $("[id='" + opt.id + "']").parent().parent().addClass("cfg_contentNone"); $($(".customShow #itemId_" + opt.parentsubFormNum + " .tdTitleClass")[$("[id='" + opt.id + "']").parent().parent().index()]).addClass("cfg_contentNone"); @@ -6423,7 +6422,7 @@ } //子表单内数据初始化 customShow.addsubformListInit = function (itemId, tbodys) { - //console.log(tbodys); + // var itemList = customShow.options.customItemShow.item; var item = itemList[itemId]; var parentsubFormNum = item.columnOrderNum + ""; @@ -6444,7 +6443,7 @@ } else if (type == "dropdownlist") { var itemListIdTemp = itemListId + "_" + customShow.options.dropdownlist_I; var item = $(tbodys).find("#" + itemListId); - ////////console.log($(tbodys)); + //////// // var dropdowntype = $(item.find('select'))[0].getAttribute("dropdowntype"); var dropdowntype = customShow.options.customItemShow.item[itemListId].tag_Attribute.dropdowntype; if ($("#" + itemListId + " .select3-element")[0] == undefined) { @@ -6455,20 +6454,20 @@ width = parseInt(width); var listData = customBase.options.dropdownlistText[itemListId]; - ////////console.log(customBase.options.dropdownlistText); + //////// // $("#"+itemId).parent().empty(); var itemIdClass = "selectClass js-example-basic-single defaultHeight customShowItemClass dropdowntypeCss " + itemListId + "value " + itemListIdTemp; var DropdownlistItem = item.parent(); // DropdownlistItem.css("background-color","red"); // var setDiv = $('<div id="'+itemListId+'" class="selectClass '+itemIdClass+'"></div>'); var setDiv = $('<div id="' + itemListId + '" class="selectClass lwm' + itemIdClass + '"></div>'); - console.log("11122211") + DropdownlistItem.empty(); setDiv.empty(); - console.log(itemListId); + DropdownlistItem.append(setDiv); - console.log($(DropdownlistItem).html()); - //////console.log(dropdowntype); + + ////// if (dropdowntype == "multiple") { customShow.options.subformDList[itemListIdTemp] = { @@ -6515,13 +6514,13 @@ } } - //console.log(customShow); - //console.log(customBase); + // + // - ////////console.log(customShow.options.customItemShow.item); - ////////console.log(itemId); - ////////console.log(item); - ////////console.log(parentsubFormNum); + //////// + //////// + //////// + //////// // customShow.setXhSelectList(); return tbodys; } @@ -6561,7 +6560,7 @@ } customShow.onclickSave1 = function () { // SC.sendanydata(function(flag){ - // console.log(flag); + // // if(!flag){ // console("if") // customShow.onclickSave(1); @@ -6580,36 +6579,36 @@ //清空按钮按下是 customShow.onclickClear = function () { - console.log(customBase); - console.log(customShow); + + var itemKey = _.keys(customShow.options.customItemShow.item); var item = customShow.options.customItemShow.item; - console.log(itemKey); + _.each(itemKey, function (itemId) { - console.log(itemId); - console.log(item[itemId].tag_Type); + + customBase.setItemValue(itemId, item[itemId].tag_Type, "", ""); }); } //保存按钮按下时 customShow.onclickSave = function (clickFlag) { - console.log(clickFlag); + var saveReturn = customShow.initEvent.fromSaveLinkage(); //画面项目取得 --------------------------画面项目取得------ var items = customShow.getItems(true); - console.log(items) + // customShow.queryCost(); try { if (typeof (eval(eachitem)) == "function") { eachitem(items); } } catch (e) { - console.log("不存在的函数"); + } - console.log("遍历数组") - console.log(items); + + // 画面check var returnfromCheck = customShow.initEvent.fromCheck(items); //-------------------- if (returnfromCheck) { @@ -6633,9 +6632,9 @@ // } // 发送数据到后台服务器,保存data var saveReturn = customShow.initEvent.fromSave3rd(items);//-------------------- - console.log(customShow.options.customShowFlag) + if (saveReturn) { - console.log(1) + if (customShow.options.customShowFlag == "1") { //保存 customDataBound.fromSave(customShow.options.formid, items, function (rs) { @@ -6654,10 +6653,10 @@ window.parent.addFormData(rs); $(window.parent.document.body).css({ "overflow-x": "auto", "overflow-y": "auto" }); } - // //////console.log(rs); + // ////// }); } else if (customShow.options.customShowFlag == "2") { - console.log(2) + //保存 customDataBound.fromEdit(customShow.options.formid, items, customShow.options.dataRowNum, function (rs) { if (rs.rspCode == "100004") { @@ -6687,7 +6686,7 @@ ]; customShow.showCustom(items, customShow.options.customInit); customShow.setToolBtn(btns); - console.log("关闭") + customShow.onclickCancel(); }); @@ -6695,11 +6694,11 @@ } else if (customShow.options.customShowFlag == "3") { // 保存 - console.log(3) + if (clickFlag == 2 && customShow.options.dataRowNum != "") { //保存 customDataBound.fromEdit(customShow.options.formid, items, customShow.options.dataRowNum, function (rs) { - ////console.log(rs); + //// if (rs.rspCode == "000000") { var strMessage = customBase.getMessage("mesage_ID015"); customBase.alert("S", strMessage); @@ -6738,21 +6737,21 @@ if(customShow.options.customShowFlag != "3" ){//发布差异修改 李伟民 0120 customShow.options.dataRowNum = rs.data.dataRowNum; } - //////console.log(rs); + ////// }); } } } // customShow.onclickCancel(); // window.parent.$('#myModal').modal('hide'); - // console.log($('.boxOne')) + // // $('.boxOne').css("display","none"); } //保存按钮按下时(项目预览表示) customShow.showCustom = function (items, customInit) { - console.log(items); - console.log(customInit); + + customShow.options.customItemShow = customInit.customViewItem; var customItem = customShow.options.customItemShow; // $(".preview-edit-pane").css("display","block"); @@ -6765,7 +6764,7 @@ $("#customShow")[0].innerHTML = divHtml; var height = customShow.options.customItemShow.height; // height = parseInt(height)-50; - //////////console.log(height); + ////////// $("#customShow")[0].style.height = height + "px"; $("#customShow")[0].style.width = customShow.options.customItemShow.width; $("#customShow")[0].style.display = "flex"; @@ -6780,10 +6779,10 @@ } if (customItems[item].type == 'subform') { var subformTemp = items[item]; - //////console.log(items); - ////console.log(item); - console.log(subformTemp); - // console.log(customItems); + ////// + //// + + // if (subformTemp == undefined) { subformTemp = [{}]; } @@ -6808,10 +6807,10 @@ //选项卡回显 if (customItems[item].type == 'tag') { var subformTemp = items[item]; - ////console.log(items); - ////console.log(item); - ////console.log(subformTemp); - ////console.log(customItems); + //// + //// + //// + //// if (subformTemp == undefined) { subformTemp = [{}]; } @@ -6844,10 +6843,10 @@ //删除项目(select2项目删除) $('.customShow .selection').remove(); - //console.log(customItems); + // //数据设定 for (item in customItems) { - console.log(items) + if (customItems.hasOwnProperty(item)) { if (customItems[item] == undefined) { delete customItems[item]; @@ -6907,7 +6906,7 @@ //标签数据设定 } else if (customItems[item].type == 'link') { var htmlediterShow = $(".customShow").find("#" + id)[0]; - // console.log($(htmlediterShow)) + // // $(htmlediterShow)[0].setAttribute("href","javascript:;"); $(htmlediterShow).css("font-size", "16px;"); //单选 多选按钮 @@ -6918,12 +6917,12 @@ // $($(".customShow").find("#"+id)[0]).after(oNode); // $($(".customShow").find("#"+id)[0]).remove(); var showItem = $($(".customShow").find("#" + id)); - console.log(showItem) + for (var i = 0; i < showItem.length; i++) { $($(showItem[i])[0]).after(oNode); $($(showItem[i])[0]).remove(); } - console.log(value) + //单选复选回显问题 customShow.setShowItem(id, type, value, true); } @@ -6934,48 +6933,48 @@ // var treeShow = $('#customShow').find('div[type=tree]'); // if(value !=undefined && value !=""){ - // console.log(1); + // // if(typeof value == "string"){ // // value = $.parseJSON(value); - // console.log(2); + // // value =[value]; // } // // 2017/11/7 李元杰回显 // if(value.length>0){ - // console.log(value); + // // for(var i =0;i<value.length;i++){ // value[i] // } - // console.log(value) + // // if(typeof value[0] == "string"){ - // //console.log(value[0]); + // // // // value[0] = $.parseJSON(value[0]); // } // oNode +=value[0]; // } // for (var i = 1; i < value.length; i++) { - // console.log(4); + // // if(typeof value[i] == "string"){ - // console.log(5); + // // // value[i] = $.parseJSON(value[i]); // } - // console.log(value) + // // oNode +=" , "+value[i]; - // console.log(oNode) + // // }; // } - // console.log(oNode) + // // oNode +="</div>"; "</div>"; $($(".customShow").find("#" + id)[0]).after(oNode); $($(".customShow").find("#" + id)[0]).remove(); // customShow.setShowItem(id, type, value, true); - console.log($($(".customShow").find("#" + id)[0])) + } else if (customItems[item].type == 'amount') { var id = id + "amount"; @@ -7038,7 +7037,7 @@ // $(".img_box").show(); // $(".x_box").unbind(); // $(".x_box").on("click", function () { - // console.log(1); + // // $(".x_box").hide(); // $(".img_box").hide(); // }) @@ -7046,8 +7045,8 @@ } else if (customItems[item].type == 'image') { // var $wrap = $(".customShow #" + customItems[item].id); var $uploaderItem = $($(".customShow #" + customItems[item].id)[0]); - console.log($('#' + customItems[item].id)); - console.log($uploaderItem) + + $uploaderItem.empty(); var $uploadimg = $( @@ -7056,7 +7055,7 @@ '</div>' ); // var $list = $uploadimg.find("#"+potion.id+"fileList"); - console.log(value) + if(customItems[item].defaultvalue != undefined){//详细显示默认值 李伟民 0131 var $list = $uploadimg.find("#fileList"); var $addLi = $( @@ -7073,7 +7072,7 @@ var value = JSON.parse(value); } - console.log(value) + if (typeof value != "string") { if (typeof value == "string") { // value = $.parseJSON(value); @@ -7106,13 +7105,13 @@ // itemId_32uploadimg // 编辑页 - // console.log($('#customViewUEditor').find('#'+imgId).children()) - // console.log($('#'+imgId)) - // console.log($uploaderItem) + // + // + // // var viewer = new Viewer(document.getElementById(imgId), { // url: 'data-original', // show:function(){ - // console.log('显示') + // // } // }); // 12/18 @@ -7120,8 +7119,8 @@ } else if (customItems[item].type == 'mytext') { //选择表单编辑回显 - console.log(customItems); - console.log(customShow); + + var itemAttribute = customShow.options.customItemShow.item[customItems[item].id]; var $mytext = $("#" + customItems[item].id); var item_title = []; @@ -7141,11 +7140,11 @@ var requesTitle = window.commonAjax("/datamanagement/getAssociateTitle", titleObj, "POST", true, false); var requesData = window.commonAjax("/datamanagement/getAssociateData", dataObj, "POST", true, false); requesTitle.done(function (res) { - console.log(res); + item_title = res.data; }); requesData.done(function (res) { - console.log(res); + if (!_.isNull(res.data) && res.data != undefined) { itemVal = res.data; } @@ -7155,9 +7154,9 @@ item_title = myTitle[item]; itemVal = items[item]; } - console.log(itemVal) - console.log(item_title); - console.log(itemVal.list); + + + createMxtTable(customItems[item].id, item_title, itemVal.list);// 关联数据回显渲染 李伟民 11-30 // var newData = []; // _.each(itemVal.list,function(opt){ @@ -7169,28 +7168,28 @@ // }) // return key; // }) - // console.log(_.cloneDeep(opt)) + // // newData.push(opt); // }) - // console.log(itemVal.list); - // console.log(newData); + // + // var formhuixian = itemVal.list; - //console.log(formhuixian); + // var huixianStr = ""; for (let i in formhuixian) { - //console.log($mytext.attr("fieldkey")); - //console.log(i); - //console.log(formhuixian[i]); + // + // + // if (i = $mytext.attr("fieldkey")) { huixianStr = formhuixian[i]; } } - //console.log(huixianStr); + // $mytext.attr("formhuixian", JSON.stringify(itemVal.list)); // if(newData){ // var $value = newData; - // console.log($value) + // // // var show = ""; // var divBox = $("<div></div>"); @@ -7204,12 +7203,12 @@ // show += '<li>'+'<span class="data1 '+i+'">'+i+'</span>'+'<span class="data2 '+i+'">'+opt[i]+'</span>'+'</li>'; // ulBox.attr("class","addUl ulBox"+j); // ulBox.attr("id","ulBox"+j); - // //console.log(show) + // // // ulBox.append(show); // } // divBox.append(ulBox); // }); - // console.log(sdata_head); + // // $mytext.append(divBox); // } } @@ -7233,12 +7232,12 @@ //画面表示项目取得 ----------------- customShow.getItems = function (saveflag) { var items = customBase.options.customItems; - console.log(items); + var itemTempS = {}; for (item in items) { if (items.hasOwnProperty(item)) { - console.log(item); - console.log(items[item].type); + + if (items[item].type == "button" || items[item].type == "link") { } else if (items[item].type == "dropdownlist") { // var datasourcetype = $("#"+items[item].id)[0].getAttribute("datasourcetype"); @@ -7256,9 +7255,9 @@ // itemTempS[item] = customBase.getItemValue(items[item].id,"dropdownlistText"); // } itemTempS[item] = customBase.getItemValue(items[item].id, "dropdownlistText"); - console.log(itemTempS[item]) + if (saveflag) {//下拉框 传值 修改 李伟民 11-09 - console.log(itemTempS[item]); + _.each(itemTempS[item], function (sval, i) { if (_.isArray(sval)) { itemTempS[item][i] = sval.join(); @@ -7267,13 +7266,13 @@ // if(_.isArray(itemTempS[item][0])){ // itemTempS[item][0] = itemTempS[item][0].join(",") // } - console.log(itemTempS[item]); + }//下拉框 传值 修改 李伟民 11-09 } else if (items[item].type == "tree") { itemTempS[item] = customBase.getItemValue(items[item].id, "tree"); - console.log(itemTempS[item]) + if (saveflag) {//树形传值 修改 李元杰 11-21 - console.log(itemTempS[item]); + _.each(itemTempS[item], function (sval, i) { if (_.isArray(sval)) { itemTempS[item][i] = sval.join(); @@ -7285,10 +7284,10 @@ }//树形 传值 修改 李元杰 11-21 } else if (items[item].type == "checkbox") { itemTempS[item] = customBase.getItemValue(items[item].id, "checkbox"); - console.log(itemTempS[item]) - console.log(saveflag) + + if (saveflag) {//复选框传值 修改 马习同 12-6 - console.log(itemTempS[item]); + _.each(itemTempS[item], function (sval, i) { if (_.isArray(sval)) { itemTempS[item][i] = sval.join(); @@ -7300,10 +7299,10 @@ }////复选框传值 修改 马习同 12-6 } else if (items[item].type == "radio") { itemTempS[item] = customBase.getItemValue(items[item].id, "radio"); - console.log(itemTempS[item]) - console.log(saveflag) + + if (saveflag) {//复选框传值 修改 马习同 12-6 - console.log(itemTempS[item]); + _.each(itemTempS[item], function (sval, i) { if (_.isArray(sval)) { itemTempS[item][i] = sval.join(); @@ -7325,7 +7324,7 @@ } } else { itemTempS[item] = customBase.getItemValue(items[item].id, items[item].type); - console.log(itemTempS[item]); + } } }; @@ -7340,18 +7339,18 @@ } } } - console.log(_.cloneDeep(itemRetuen)); - console.log(_.cloneDeep(itemTempS)); + + //子表单内数据保存 for (item in itemTempS) { - ////console.log(items); - ////console.log(itemTempS); - ////console.log(item); + //// + //// + //// if (itemTempS.hasOwnProperty(item)) { var parentsubFormNum = customBase.options.customItems[item].parentsubFormNum; - ////console.log(customBase.options) - ////console.log(customBase.options.customItems[item]); - ////console.log(parentsubFormNum); + //// + //// + //// if (parentsubFormNum == "0") { if (customBase.options.customItems[item].type == "radio" || customBase.options.customItems[item].type == "checkbox" || @@ -7363,19 +7362,19 @@ itemRetuen[item] = itemTempS[item]; } } else { - ////console.log(item); - ////console.log(items); - ////console.log(itemRetuen[parentsubFormNum]); - ////console.log(itemTempS[item]); - ////console.log(itemRetuen); - ////console.log(parentsubFormNum); + //// + //// + //// + //// + //// + //// itemRetuen[parentsubFormNum][item] = itemTempS[item]; } } } //子表单内最终数据变换 - console.log(_.cloneDeep(itemRetuen)); - console.log(customBase.options.customItems); + + for (item in customBase.options.customItems) { if (customBase.options.customItems.hasOwnProperty(item)) { if (customBase.options.customItems[item].type == "subform" || customBase.options.customItems[item].type == "tag" || customBase.options.customItems[item].type == "tab") { @@ -7383,7 +7382,7 @@ var tepItem = itemRetuen[id]; var subformIten = []; var i = 0; - console.log(tepItem); + for (tem in tepItem) { if (tepItem.hasOwnProperty(tem)) { if (typeof tepItem[tem] == "string") { @@ -7392,7 +7391,7 @@ } subformIten[0][tem] = tepItem[tem]; } else { - console.log(tepItem[tem]); + for (var i = 0; i < tepItem[tem].length; i++) { if (subformIten[i] == undefined) { subformIten[i] = {}; @@ -7403,12 +7402,12 @@ } } delete itemRetuen[id]; - console.log(_.cloneDeep(subformIten)); + itemRetuen[customBase.options.customItems[item].fieldKey] = subformIten; } } } - console.log(_.cloneDeep(itemRetuen)); + return itemRetuen; } @@ -7473,7 +7472,7 @@ var formIDs = customlocalStorage.newFormID; customDataBound.formsetting(formIDs, function () { }); - //console.log("编辑存值"); + // $("#customShow").empty(); if (customShow.options.customShowFlag != "3") { //图片文件上传 @@ -7606,7 +7605,7 @@ mustcheck = true; } } else if (tag_Type == "checkbox" || tag_Type == "dropdownlist") { - // //////////console.log(value); + // ////////// if (value.length == 0) { customShow.showErrorItem(tag_Type, ItemId, N); var message = customBase.getMessage("mesage_ID004"); @@ -7655,7 +7654,7 @@ customShow.setShowMesageErr(ItemId, message, N); mustcheck = true; } - ////////console.log(customShow.options.customItemShow.item[ItemId].tag_Attribute); + //////// } } @@ -7731,7 +7730,7 @@ for (fieldKey in customItems) { if (customItems.hasOwnProperty(fieldKey)) { - ////console.log(customItems); + //// var tag_Type = customItems[fieldKey].type; var ItemId = customItems[fieldKey].id; if (customItems[fieldKey].visible) { @@ -7756,9 +7755,9 @@ //文本格式验证 if (customItems[fieldKey].type == "text") { var value = items[fieldKey]; - ////console.log(fieldKey); - ////console.log(customItems); - ////console.log(value); + //// + //// + //// var format = customShow.options.customItemShow.item[ItemId].tag_Attribute.format; //子表单的情况 if (value == undefined) { @@ -7766,9 +7765,9 @@ var subformItemId = "itemId_" + customItems[fieldKey].parentsubFormNum; var subformItemAlias = customShow.options.customItemShow.item[subformItemId].tag_Attribute.alias; var subformItem = items[subformItemAlias]; - ////console.log(items); - ////console.log(subformItemAlias); - ////console.log(subformItem); + //// + //// + //// for (var i = 0; i < subformItem.length; i++) { textFormatCheck(format, subformItem[i][fieldKey], ItemId, i); } @@ -7823,7 +7822,7 @@ // $(".errorItemCss").unbind('focus'); // $(".errorItemCss").on('focus', function() { // $(this).removeClass("errorItemCss"); - // ////////////console.log($(this)[0].id); + // //////////// // $("#"+$(this)[0].id+"mesageErrDiv").remove(); // $(".customViewUEditorCss #"+$(this)[0].id).popover('hide') // }); @@ -7857,7 +7856,7 @@ if(intdata.interfacemethod == 'fromSave3rd'){//只执行保存接口事件 try {//解决不上传资源文件JS报错 导致无法保存 李伟民 0129 var thisChheck = eval(func); - console.log(thisChheck); + if (thisChheck == false) { flag = false; } @@ -7886,10 +7885,10 @@ } UE.getEditor(id + "Item").body.setAttribute("heightFlag", height); - // //////////console.log(UE.getEditor(id+"Item").body.style.height = ); + // ////////// } else if (tag_Type == "dropdownlist") { // $(".customViewUEditorCss #"+id).p + ".selection").addClass(errorClass); - // //////////console.log($('.customViewUEditorCss #'+id)[0].parentNode); + // ////////// $($('.customViewUEditorCss #' + id)[N].parentNode).find(".select2").addClass(errorClass); // $(".customViewUEditorCss #"+id+" .select2-search__field") if ($($('.customViewUEditorCss #' + id)[N].parentNode).find(".select2-search__field").length > 0) { @@ -7901,7 +7900,7 @@ //画面属性设定(初始值 表示/非表示 只读 必须 审查必须) customShow.setShowAttribute = function (aliasItem) { - console.log(aliasItem) + // 12/7 不可编辑 可以编辑 id = aliasItem.id; //表示非表示 @@ -7943,7 +7942,7 @@ itemTemp.removeAttr('readonly'); // 非编辑情况移除背景颜色 12/7 李元杰 for (var i = 0; i < itemTemp.length; i++) { - console.log(itemTemp[i]); + $(itemTemp[i]).removeClass('disableColor') } if (tag_Type == "calendar") { @@ -7975,7 +7974,7 @@ $(itemTemp).removeClass("disableColor"); $(itemTemp).removeClass("readonly"); - // ////console.log($(itemTemp).find(".select-container")); + // //// } else if (tag_Type == "button") {//---------------------------------------------------------OK $(itemTemp).removeClass('disabled'); } else if (tag_Type == "link") {//-----------------------------------------------------------OK @@ -7997,7 +7996,7 @@ if (tag_Type == "text" || tag_Type == "textarea" || tag_Type == "number" || tag_Type == "calendar") {//--OK for (var i = 0; i < itemTemp.length; i++) { // 12/7 李元杰 添加背景颜色 - console.log(itemTemp[i]); + itemTemp[i].setAttribute('readonly', ''); $(itemTemp[i]).addClass('disableColor') } @@ -8010,7 +8009,7 @@ itemTemp.removeClass('dateFromyyyymm'); itemTemp.removeClass('dateFromyyyymmdd'); itemTemp.removeClass('dateFromhhmiss'); - ////////console.log(itemTemp); + //////// var itemDateFromTemp = itemTemp[0].cloneNode(true); var $DateFromTemp = "<div id='itemDateFromTemp'></div>" itemTemp.after($DateFromTemp); @@ -8030,15 +8029,15 @@ } else if (tag_Type == "dropdownlist") {//---------------------------------------------------OK // $(itemTemp).addClass('editableDisabled'); // $(itemTemp).prop("disabled", true); //设置下拉框不可用 - // ////console.log($(itemTemp).find(".select-container")); + // //// // itemTemp = $(itemTemp).find(".select-container"); // for(var i = 0 ;i<itemTemp.length;i++){ // itemTemp[i].setAttribute('readonly',''); // } - console.log($(itemTemp)) + $(itemTemp).find('.select-container_box').addClass('disableColor') $(itemTemp).addClass("readonly"); - ////console.log( $(itemTemp)); + //// } else if (tag_Type == "button") {//---------------------------------------------------------OK $(itemTemp).addClass('disabled'); } else if (tag_Type == "link") {//-----------------------------------------------------------OK @@ -8048,33 +8047,33 @@ itemTemp[i].setAttribute('disabled', 'disabled'); } } else if (tag_Type == "fileupload") {//----------------------------------------------------todo - console.log($(itemTemp)); + debugger } else if (tag_Type == "tree") {//----------------------------------------------------------todo // 禁用背景颜色 - console.log($(itemTemp).parents('div[name="TreeWin"]')) - console.log($(itemTemp)) + + itemTemp[0].setAttribute('editable', aliasItem.editable); } // else if (tag_Type == "tree" || tag_Type == "tree" || tag_Type == "tree") { // // var itemTemp = $("#customResultFormDiv").find("#"+tag_Id)[0]; - // console.log($(itemTemp)) + // // itemTemp.setAttribute('editable', aliasItem.editable); // } } } //错误信息显示 customShow.setShowMesageErr = function (id, message, N, type) { - console.log("setShowMesageErr"); - console.log(message); - ////console.log(id); + + + //// var mesageHtml = '<div class="' + id + 'Popover"></div>'; if (customShow.options.customInit.designMode == "1") { - ////console.log(id); - ////console.log(message); - ////console.log(N); - ////console.log($($(".customViewUEditorCss #"+id)[N])); + //// + //// + //// + //// // $($(".customViewUEditorCss #"+id)[N]).popover('hide'); // if($($(".customViewUEditorCss #" + id)[N]).attr('popoverFalg') != undefined){ // $('.' + id + 'Popover').html(message); @@ -8104,7 +8103,7 @@ $($(".customViewUEditorCss #" + id)[N]).popover('hide'); },2000) customShow.options.showErrId[id] = N; - //////console.log($($(".customViewUEditorCss #"+id+"Item")[N]).length); + ////// if ($($(".customViewUEditorCss #" + id + "Item")[N]).length == 1) { $($(".customViewUEditorCss #" + id + "Item")[N]).attr('popoverFalg','true'); @@ -8150,7 +8149,7 @@ var requiredHint = $($($(".customViewUEditorCss #" + id + "ActiveId")[N])[0]); if (requiredHint.find('input').val() === '') { if ($(".customViewUEditorCss #" + id + "ActiveId").length == 0) { - console.log($(".customViewUEditorCss [id='" + id + "']:eq(" + N + ")").closest("td")); + $(".customViewUEditorCss [id='" + id + "']:eq(" + N + ")").closest("td").append(mesageErrDiv); } else { $($($(".customViewUEditorCss #" + id + "ActiveId")[N])[0]).append(mesageErrDiv); @@ -8158,7 +8157,7 @@ $(mesageErrDiv).html(requiredHint.children('h8').children('span').html() + "必须输入") } else { if ($(".customViewUEditorCss #" + id + "ActiveId").length == 0) { - console.log($(".customViewUEditorCss [id='" + id + "']:eq(" + N + ")").closest("td")); + if ($(".customViewUEditorCss [id='" + id + "']:eq(" + N + ")").closest("td").find(".mesageErrDiv").length == 0) { $(".customViewUEditorCss [id='" + id + "']:eq(" + N + ")").closest("td").append(mesageErrDiv); } @@ -8263,13 +8262,13 @@ //表示模式下,数据设定(单选 复选 下拉菜单) customShow.setShowItem = function (itemId, type, value, flag) { //被选择项目设定 - console.log(1) - // console.log(_.cloneDeep(itemId)) - // console.log(_.cloneDeep(type)) - console.log(_.cloneDeep(value)) - // console.log(_.cloneDeep(flag)) + + // + // + + // checkboxRadioShow = function (showItem, value) { - console.log($(showItem), value) + var listData = customBase.options.dropdownlistText[itemId]; if (listData == undefined) { return; @@ -8280,17 +8279,17 @@ } var temp = []; var tempStr = ""; - console.log(listData); - console.log(value) + + for (var i = 0; i < listData.length; i++) { for (var j = 0; j < value.length; j++) { if (value[j] == listData[i].value) { - console.log(1) + temp[j] = listData[i].text; } } } - console.log(temp) + for (var i = 0; i < temp.length; i++) { if (i == 0) { tempStr = temp[i]; @@ -8298,14 +8297,14 @@ tempStr += "," + temp[i]; } } - console.log(tempStr) + $(showItem).empty(); - //console.log(tempStr); + // $(showItem).append(tempStr); } var showItem = $("." + itemId + "_showItem"); - console.log(showItem) + //页面返回 if (flag) { if (type == "checkbox" || type == "radio") { @@ -8345,12 +8344,12 @@ //工具栏设定button customShow.setToolBtn = function (btns) { - console.log(btns) + $(".edit-pane").empty(); var $editPaneBtn = $($(".edit-pane")[0]); - console.log($editPaneBtn) - // //////console.log(btns); + + // ////// for (var i = 0; i < btns.length; i++) { if (customShow.button[btns[i]].functionName == "") { $a = '<a id="' + btns[i] + '" href="javascript:void(0);">' + @@ -8376,17 +8375,17 @@ var defindCode = masterData.defindCode; var eleCode = masterData.eleCode; customLinkageAnalysis.getElement("itemId_1", eleCode, function (re) { - ////////console.log(re); + //////// }) } //主数据重复 customShow.setXhSelectList = function (addflag) { - // console.log(1) + // var subformDList = customShow.options.subformDList; - //console.log(subformDList); - //console.log(85244445) - //console.log(addflag) + // + // + // var setValueItem = {}; // //var subArr = []; @@ -8399,9 +8398,9 @@ // subObj[key] = subformDList[key]; // } //} - //console.log(_.cloneDeep(subObj)); + // for (var id in subformDList) { - console.log(id); + if ($(".customViewUEditorCss ." + id).length == 1) { var xhSelectTemp = { selectId: customShow.options.subformDList[id].selectId, @@ -8410,19 +8409,19 @@ listData: customBase.options.dropdownlistText[customShow.options.subformDList[id].selectId], setDiv: id }; - console.log(xhSelectTemp); - console.log(1) + + xhSelect.setXhSelect(xhSelectTemp); var item = customShow.options.customItemShow.item[customShow.options.subformDList[id].selectId]; setValueItem[item.tag_Attribute.alias] = customShow.options.subformDList[id].selectId; } } - console.log(setValueItem); - console.log(customShow.options); + + if (!addflag) { for (var valueItem in setValueItem) { var setList = customShow.options.subformDValue[valueItem]; - console.log(setList); + if (setList != undefined) { for (var i = 0; i < setList.length; i++) { xhSelect.setValue(setValueItem[valueItem], setList[i], i); @@ -8434,7 +8433,7 @@ } //子表单添加记录 复制下拉框方法 2017/10/06 customShow.setXhSelectListAdd = function () { - // //////console.log(table); + // ////// var subformDList = customShow.options.subformDList; var setValueItem = {}; //10/2/27 马习同修改 下拉框复制重复 @@ -8448,10 +8447,10 @@ listData: customBase.options.dropdownlistText[customShow.options.subformDList[id].selectId], setDiv: id }; - // //////console.log($(".customViewUEditorCss ."+id).find('select > option')); + // ////// if ($(".customViewUEditorCss ." + id).find('select > option').length == 0) { - // //////console.log("----------------------------------------------"); - console.log(1) + // ////// + xhSelect.setXhSelect(xhSelectTemp); } } @@ -8486,7 +8485,7 @@ //} else if (btnFlag == 'fromSaveBtn') { // if(customShow.options.customShowFlag != '3'){//发布修改 李伟民 0120 // ren = customShow.options.formsetting['saveable']; - // console.log(ren) + // // }else{ // ren = 1; // } @@ -8518,7 +8517,7 @@ result = items[customShow.options.customItemShow.item[ItemId].tag_Attribute.alias]; } } - ////console.log(result); + //// var resultTemp = ""; for (var i = 0; i < result.length; i++) { @@ -8532,14 +8531,14 @@ } } - ////console.log(resultTemp); + //// return resultTemp; } else if (typeof result != "string") { result = result.join(','); } - ////console.log(customShow); - ////console.log(customLinkageAnalysis); - console.log(result); + //// + //// + return result; } @@ -8549,8 +8548,8 @@ * value:设定值 */ customLinkageAnalysis.setValue = function (itemId, value, num) { - console.log(itemId); - console.log(value); + + var item = customShow.options.customItemShow.item[itemId]; //数据类型 var type = item.tag_Type; @@ -8595,13 +8594,13 @@ editable //可编辑 true:可编辑 false:不可编辑 */ customLinkageAnalysis.getAttribut = function (itemId, attributeName) { - console.log(itemId); - console.log(attributeName) + + var item = customShow.options.customItemShow.item[itemId]; // return customLinkageAnalysis.validationEx(item.tag_Attribute.alias); var alias = item.tag_Attribute.alias; var ttn = customBase.options.customItems[alias][attributeName]; - ////console.log(ttn) + //// return ttn; } @@ -8616,7 +8615,7 @@ var item = customShow.options.customItemShow.item[itemId]; // return customLinkageAnalysis.validationEx(item.tag_Attribute.alias); var alias = item.tag_Attribute.alias; - console.log(alias) + attributeValue = attributeValue + ""; attributeValue = attributeValue.toLowerCase(); if (attributeValue == "true") { @@ -8653,9 +8652,9 @@ // $("." + errorClass).unbind('focus'); $("[id='" + ItemId + "']:eq(" + num + ")").unbind("focus"); $("[id='" + ItemId + "']:eq(" + num + ")").on('focus', function () { - console.log("focus"); + $(this).removeClass(errorClass); - ////////console.log($(this)[0].id); + //////// $(this).closest("#" + $(this)[0].id + "ActiveId").find("[id='" + $(this)[0].id + "mesageErrDiv']").remove();//修改错误信息删除 李伟民 2017-10-18 14:15 $(this).closest(".tdContentClass").find("[id='" + $(this)[0].id + "mesageErrDiv']").remove();//列表模式 // $("#"+$(this)[0].id+"mesageErrDiv").remove(); @@ -8693,10 +8692,10 @@ // 初期调用 customLinkageAnalysis.bindLinkage = function () { - // ////console.log(window.customBase); + // //// //取得公式的JSON数据 - // ////console.log(customShow); - // ////console.log(customLinkageAnalysis); + // //// + // //// var rules = customShow.options.jsonLinkage; if (typeof rules == 'string') { rules = eval(rules); @@ -8713,12 +8712,12 @@ //保存接口 (false:不继续执行 true:继续执行) // customShow.initEvent.fromSaveLinkage; for (var i = 0; i < rules.length; i++) { - //console.log(rules[i]); + // var dofunction = {}; try { dofunction = customLinkageAnalysis.makeLinkage(rules[i]); } catch (e) { - ////console.log(e.message); + //// continue; } var allFunction = customLinkageAnalysis.changeDoFunction(dofunction); @@ -8741,18 +8740,18 @@ if (item.tag_Type == "htmlediter") { UE.getEditor(fieldId + "Item").onclick = function (event, ui) { // eval(strFunction); - // ////console.log(UE.getEditor(fieldId+"Item").getContent()); + // //// customLinkageAnalysis.options[fieldId + "Item"] = UE.getEditor(fieldId + "Item").getContent(); } UE.getEditor(fieldId + "Item").onblur = function (event, ui) { - //////console.log(UE.getEditor(fieldId+"Item").getContent()); + ////// var fieldIdItem = UE.getEditor(fieldId + "Item").getContent(); if (fieldIdItem != customLinkageAnalysis.options[fieldId + "Item"]) { eval(allFunction.strFunction); } } - ////console.log(UE.getEditor(fieldId+"Item")); + //// } else if (item.tag_Type == "tree") { customBase.options.zTreeOnClickItems[fieldId + "tree"] = allFunction.strFunction; } else if (item.tag_Type == "radio" || item.tag_Type == "checkbox") { @@ -8764,7 +8763,7 @@ } _.each(rules[i].results, function (ru) {// 自定义验证 为弹出消息控件绑定验证方法 李伟民 2017-10-18 15:09 if ((ru.mode == "2" || ru.mode == "0") && rules[i].event.eventFieldId != ru.eventFieldId) {//判断是否为验证公式 判断触发控件与弹出消息控件是否为同一控件 - //console.log(ru); + // customLinkageAnalysis.bindEvent(ru.eventFieldId, "blur", allFunction); } });// 自定义验证 为弹出消息控件绑定验证方法 李伟民 2017-10-18 15:09 end @@ -8790,7 +8789,7 @@ try { dofuncion = customLinkageAnalysis.makeLinkage(rules[i]); } catch (e) { - ////console.log(e.message); + //// continue; } var fieldId = rules[i].event.eventFieldId; @@ -8805,7 +8804,7 @@ if (inType == item.tag_Type) { if (item.tag_Type == "radio") { $("#" + fieldId + ' .custom-radio').on('click', function () { - // //////console.log(this.className); + // ////// if (this.className.indexOf("readonly") > -1) { return; } @@ -8813,7 +8812,7 @@ }); } else if (item.tag_Type == "checkbox") { $("#" + fieldId + ' .custom-check').on('click', function () { - // //////console.log(this.className); + // ////// if (this.className.indexOf("readonly") > -1) { return; } @@ -8829,19 +8828,19 @@ } customLinkageAnalysis.bindFunctionEvent = function (strFunction) { - //console.log(strFunction); + // return function () { try { eval(strFunction); } catch (e) { - ////console.log(e.message); + //// } } } customLinkageAnalysis.changeDoFunction = function (doFunction) { var conditionCode = doFunction.conditionCode; - //console.log(doFunction); + // var code = ""; var strFunction = ""; var checkFunction = "";// 单独检查校验规则代码 李伟民 2017-10-19 14:33 @@ -8869,7 +8868,7 @@ if (code != null && code != "") { if (code.indexOf('Math.floor') != -1) { code = eval(code); - ////console.log(code); + //// } code = "customLinkageAnalysis.expeval(\"=" + code + "\")"; strFunction += "if (" + code + " == 'true') { \r\n"; @@ -8886,7 +8885,7 @@ for (var j = 0; j < listCode.length; j++) { strFunction += "var resultCode" + j + " = " + listCode[j] + ";\r\n"; var reg = new RegExp('\\{' + j + '\\}', "g"); - ////console.log(resultCode); + //// resultCode = resultCode.replace(reg, "\"+customLinkageAnalysis.changeEvalType(eval('resultCode" + j + "'))+\""); } for (var j = 0; j < listCode.length; j++) { @@ -8894,10 +8893,10 @@ strFunction = strFunction.replace(reg, "resultCode" + j); } // if(resultCode.indexOf('Math.floor') != -1){ - ////console.log(resultCode); + //// // resultCode = eval(resultCode); // } - //console.log(resultCode); + // resultCode = "customLinkageAnalysis.expeval(\"=" + resultCode + "\")"; strFunction += resultJsText.replace(/\{0\}/g, resultCode); } else if (results[i].resultJsText.indexOf("setMessage")) {// 判断是否为 规则校验公式 @@ -8919,7 +8918,7 @@ strFunction += "}"; checkFunction += "}";// 单独检查校验规则代码 李伟民 2017-10-19 14:33 } - ////console.log(strFunction); + //// var allFunction = { "strFunction": strFunction, "checkFunction": checkFunction }; return allFunction; } @@ -8928,11 +8927,11 @@ var flag = true; if (optarr != undefined && optarr != '') { optarr = JSON.parse(optarr); - console.log(optarr); - console.log(allFunction); + + _.each(optarr, function (fn) { if (fn.strFunction == allFunction.strFunction && fn.checkFunction == allFunction.checkFunction) { - console.log("falg false"); + flag = false; } }) @@ -8941,15 +8940,15 @@ } customLinkageAnalysis.bindEvent = function (fieldId, doEvent, allFunction) {//aaaaaa - console.log(allFunction); + var evalstr = ""; var evalchekstr = ""; - ////console.log(customShow.options.customItemShow.item[fieldId].tag_Type); + //// if (customShow.options.customItemShow.item[fieldId].tag_Type == "dropdownlist") { - ////console.log($("[id='" + fieldId+"']")); - ////console.log($("[id='" + fieldId+"']").find(".select_get")); - ////console.log($(".select_get")); - ////console.log(strFunction); + //// + //// + //// + //// _.each($("[id='" + fieldId + "']").find(".select_get"),function(opt){ var optarr = $(opt).attr("funarr"); if(funCheck(optarr,allFunction)){ @@ -8957,7 +8956,7 @@ if (customShow.options.customItemShow.item[fieldId].parentsubFormNum != 0) { // _.each($("[id='" + fieldId + "']").find(".select_get"), (item, i) => { if (allFunction.strFunction.indexOf("var i=") == -1) { - ////console.log(i); + //// evalstr = "var i=" + $("[id='" + fieldId + "']").find(".select_get").index(this) + ";" + allFunction.strFunction; } // }) @@ -8965,10 +8964,10 @@ evalstr = allFunction.strFunction; } try { - console.log(evalstr); + eval(evalstr); } catch (e) { - ////console.log(e.message); + //// } }); var funarr; @@ -8995,7 +8994,7 @@ try { eval(evalchekstr); } catch (e) { - //console.log(e.message); + // } });//单独检验校验规则绑定 李伟民 2017-10-19 15:18 end var checkfunarr; @@ -9013,7 +9012,7 @@ // if (customShow.options.customItemShow.item[fieldId].parentsubFormNum != 0) { // // _.each($("[id='" + fieldId + "']").find(".select_get"), (item, i) => { // if (allFunction.strFunction.indexOf("var i=") == -1) { - // ////console.log(i); + // //// // evalstr = "var i=" + $("[id='" + fieldId + "']").find(".select_get").index(this) + ";" + allFunction.strFunction; // } // // }) @@ -9021,10 +9020,10 @@ // evalstr = allFunction.strFunction; // } // try { - // console.log(evalstr); + // // eval(evalstr); // } catch (e) { - // ////console.log(e.message); + // //// // } // }); // $("[id='" + fieldId + "']").find(".select_get").unbind(doEvent + ".check"); @@ -9041,7 +9040,7 @@ // try { // eval(evalchekstr); // } catch (e) { - // //console.log(e.message); + // // // } // });//单独检验校验规则绑定 李伟民 2017-10-19 15:18 end } else { @@ -9051,19 +9050,19 @@ if(funCheck(optarr,allFunction)){ $(opt).on(doEvent + ".value", function () { if (customShow.options.customItemShow.item[fieldId].parentsubFormNum != 0 && allFunction.strFunction.indexOf("getSum") == -1) { - console.log($("[id='" + fieldId + "']")); - console.log($(this)); - console.log($("[id='" + fieldId + "']").index(this)); + + + // _.each($("[id='" + fieldId + "']"), (item, i) => { - // console.log($(item)); + // if (allFunction.strFunction.indexOf("var i=") == -1) { - ////console.log(i); + //// evalstr = "var i=" + $("[id='" + fieldId + "']").index(this) + ";" + allFunction.strFunction; } // }) }else if(allFunction.strFunction.indexOf("getSum") > 0){ - console.log(allFunction.strFunction); - console.log("replace"); + + evalstr = allFunction.strFunction; // allFunction.strFunction = allFunction.strFunction.replace(new RegExp(".split(',')[i]") ,""); while(evalstr.indexOf(".split(',')[i]") != -1){ @@ -9073,10 +9072,10 @@ evalstr = allFunction.strFunction; } // try { - console.log(evalstr); + eval(evalstr); // } catch (e) { - // ////console.log(e.message); + // //// // } }); var funarr; @@ -9093,10 +9092,10 @@ if(funCheck(checkarr,allFunction)){ $(opt).on("blur.check", function () {//单独检验校验规则绑定 李伟民 2017-10-19 15:18 if (customShow.options.customItemShow.item[fieldId].parentsubFormNum != 0) { - console.log("change.check"); + _.each($("[id='" + fieldId + "']"), (item, i) => { if (allFunction.checkFunction.indexOf("var i=") == -1) { - ////console.log(i); + //// evalchekstr = "var i=" + $("[id='" + fieldId + "']").index(this) + ";" + allFunction.checkFunction; } }) @@ -9108,7 +9107,7 @@ eval(evalchekstr); } } catch (e) { - ////console.log(e.message); + //// } });//单独检验校验规则绑定 李伟民 2017-10-19 15:18 end var checkfunarr; @@ -9125,10 +9124,10 @@ // $("[id='" + fieldId + "']").unbind(doEvent + ".check"); // $("[id='" + fieldId + "']").on(doEvent + ".check", function () {//单独检验校验规则绑定 李伟民 2017-10-19 15:18 // if (customShow.options.customItemShow.item[fieldId].parentsubFormNum != 0) { - // console.log("change.check"); + // // _.each($("[id='" + fieldId + "']"), (item, i) => { // if (allFunction.checkFunction.indexOf("var i=") == -1) { - // ////console.log(i); + // //// // evalchekstr = "var i=" + $("[id='" + fieldId + "']").index(this) + ";" + allFunction.checkFunction; // } // }) @@ -9138,18 +9137,18 @@ // try { // eval(evalchekstr); // } catch (e) { - // ////console.log(e.message); + // //// // } // });//单独检验校验规则绑定 李伟民 2017-10-19 15:18 end } } customLinkageAnalysis.changeEvalType = function (str) { - console.log(str); + if (isNaN(Number(str)) && (str.substring(0, 1) != "\"" || str.substring(str.length - 1, 1) != "\"") && (str.indexOf('||') != -1) && (str.indexOf('&&') != -1)) {//|| && 修改 李伟民 公式不稳定修改 0202 return "'" + str + "'"; } else { - ////console.log(str); + //// return str; } } @@ -9173,7 +9172,7 @@ if (item.type == "button" || item.type == "link") { } else if (item.type == "dropdownlist") { var datasourcetype = $("#" + item.id)[0].getAttribute("datasourcetype"); - //////////console.log(datasourcetype); + ////////// //主数据源 if (datasourcetype == "masterdata") { itemTempS = customBase.getItemValue(item.id, item.type); @@ -9193,7 +9192,7 @@ itemTempS = customBase.getItemValue(item.id, item.type); } item.value = itemTempS; - ////////console.log(item); + //////// return item; } } @@ -9222,11 +9221,11 @@ } //主数据取得 var result = customDataBound.getElement1(opt); - console.log(result); - console.log(itemId) + + if (result.rspCode == "000000") { if (result.data[itemId].length > 0) { - console.log(result.data[itemId][0].value) + return result.data[itemId][0].value; } else { return ""; @@ -9240,15 +9239,15 @@ if (num == undefined) { num = 0; } - //console.log($("[id='"+itemId+"']:eq("+num+")")); - //console.log($("[id='"+itemId+"ActiveId']:eq("+num+")")); + // + // $("[id='" + itemId + "']:eq(" + num + ")").removeClass("errorItemCss"); $("[id='" + itemId + "']:eq(" + num + ")").removeClass("errorCheckCss"); $("[id='" + itemId + "ActiveId']:eq(" + num + ")").find("#" + itemId + "mesageErrDiv").remove(); }//清空错误信息方法 李伟民 2017-10-18 16:36 end customLinkageAnalysis.makeLinkage = function (rule) { - ////console.log(rule); + //// var result = {}; var conditionCode = {}; conditionCode = customLinkageAnalysis.changeCodeMirror(rule.conditionCode, rule.conditionHistory._history); @@ -9304,7 +9303,7 @@ resultJs.resultJsText = resultJsText; resultJs.targetid = rule.results[i].eventFieldId;// 公式联动追加 目标控件 var targetDoEvent = ''; - // ////console.log(customShow.options.jsonLinkage); + // //// var jsonLinkage_add = customShow.options.jsonLinkage;//预览公式联动修改 李伟民 0117 if (_.isString(jsonLinkage_add)) { jsonLinkage_add = JSON.parse(jsonLinkage_add); @@ -9318,7 +9317,7 @@ } result.conditionCode = conditionCode; result.results = results; - ////console.log(result); + //// return result; } @@ -9345,13 +9344,13 @@ if (code.trim() == "") { return null; } - //console.log(code); - //console.log(history); + // + // var result = {}; var conditionCode = ""; var listCode = new Array(); var arrConditionCode = code.split('\r\n'); - ////console.log(arrConditionCode); + //// var resultIndex = 0; if (history != null && history.length > 0) { @@ -9371,7 +9370,7 @@ replaceText = "customLinkageAnalysis.getValue('" + id + "').split(',')[i]"; } else { replaceText = "customLinkageAnalysis.getValue('" + id + "')"; - } // ////console.log(replaceText); + } // //// } else if (textType == 'visible' || textType == 'editable') { replaceText = "customLinkageAnalysis.getAttribut('" + id + "','" + textType + "')"; } else { @@ -9402,7 +9401,7 @@ conditionCode = conditionCode.replace(/###\)###/g, ")"); result.code = conditionCode; result.listCode = listCode; - //console.log(result); + // return result; } @@ -9429,23 +9428,23 @@ } customLinkageAnalysis.expeval = function (str) { - // console.log(str); + // if (str.trim().replace(/=/, "") == "") { - console.log("str err"); + return " "; } - console.log("str scc"); + var exp = igame.Expression; - // console.log(exp); - // console.log(str); - // console.log(new exp.Formula(str)); - // console.log(new exp.Formula(str).evaluate()); - // console.log(new exp.Formula(str).evaluate().toString()); + // + // + // + // + // return new exp.Formula(str).evaluate().toString(); } customLinkageAnalysis.changeSign = function (conditionCode, listCode, resultIndex) { - ////console.log(conditionCode); + //// var index = 0; var indexOf = -1; var result = {}; @@ -9498,7 +9497,7 @@ } result.conditionCode = conditionCode; result.resultIndex = resultIndex; - ////console.log(result); + //// return result; } addtest = function (arg1, arg2) { @@ -9511,17 +9510,17 @@ var s1 = date1.getTime(), s2 = date2.getTime(); var total = (s1 - s2) / 1000; var day = parseInt(total / (24 * 60 * 60));//计算整数天数 - //console.log(day); + // return day; }//时间函数 李伟民 2017-10-17 21:49 end getSum = function () { - console.log(arguments); + var allItem = []; _.each(arguments, function (arg) { allItem.push(arg.split(",")); }); - console.log(allItem); + var sum = 0; _.each(allItem, function (item) { _.each(item, function (cd) { @@ -9568,10 +9567,10 @@ //表单保存 customDataBound.savaFormbase = function (formbase, callback) { - ////////////console.log(formbase); + //////////// var dataObj = {}; dataObj = formbase; - console.log(formbase); + var requestRight = window.commonAjax("/formbase/saveformService", dataObj, "POST", true); requestRight.done(function (rs) { @@ -9590,7 +9589,7 @@ // dataObj.tenantID = "001"; // dataObj.flag = flag; //dataObj.flag = "cloud" - //console.log(dataObj); + // if (customShow.exCouldNumber != undefined && customShow.exCouldNumber != '') {//保存时 传云单标号 李伟民 12-22 _.extend(dataObj, { 'orderCode': customShow.exCouldNumber }); }//保存时 传云单标号 李伟民 12-22 @@ -9670,36 +9669,36 @@ dataObj.code = JSON.stringify(code); } dataObj.callbackId = callbackId; - //console.log(dataObj); + // let customlocalStorage = window.getEnclocal("bussinessSystem"); var reg = new RegExp('"', "g"); // service 修改 李元杰 11-16 customlocalStorage = customlocalStorage.replace(reg, ""); // service 修改 李元杰 11-16 - console.log(customlocalStorage); + dataObj.flag = customlocalStorage; var requestRight = window.commonAjax("/te-csc-api/search/base/elementprivate", dataObj, "POST", true); requestRight.done(function (rs) { - console.log(rs) + if (rs.rspCode == "000000") { - console.log(rs) + callback(rs); customShow.addTitle(); SC.money_cur(); // 12/13 - console.log(window.getEnclocal('customShowFlag')) + if (window.getEnclocal('customShowFlag') == 1) { // customShow.businessTypeAutoFun( 'businessTypeAuto','budget_itemCostType'); SC.autoFieldKey(); } } else { callback(rs); - console.log(rs) + toastr.error(rs.rspDesc.responseJSON); } }); requestRight.error(function (rs) { - // console.log(rs) + // // toastr.error(rs.responseJSON.rspDesc); }) @@ -9731,7 +9730,7 @@ // 参数: formID,tenantID // JSON: {"rspCode":"000000","rspDesc":"请求成功","data":[{"单选按钮组测试":{"datasource":"","textcolumn":"","valuecolumn":""}}]} customDataBound.getApiDatasource = function (url, callbackId, callback) { - // console.log(1); + // var urls = url; var url = url + "&callbackId={callbackId}"; @@ -9741,23 +9740,23 @@ // debugger // xhr.onreadystatechange = function () { // var res = JSON.parse(xhr.responseText); - // console.log(res); + // // } $.ajax({ type: "get", url: urls, async: true, success: function (rs) { - console.log(url); - console.log(rs); + + callback(rs, url); } }); // // var url = url + "&callbackId={callbackId}"; // // url = url.replace("{callbackId}", callbackId); - // // //////////console.log(url); + // // ////////// // // window.commonGetApiJson(url, callback); - // //////////console.log(url); + // ////////// // //window.commonGetApiJson(url,callback); } @@ -9768,7 +9767,7 @@ dataObj.access_token = accessToken; var requestRight = window.commonAjax("/forminterface/getFormInterfaceListService", dataObj, "GET", true, false); requestRight.done(function (rs) { - //console.log(rs); + // customBase.interfaceData = rs.data; }) @@ -9786,14 +9785,14 @@ case "4": type = "LB"; break; } - //console.log(type); + // var dataObj = {}; if(formid == undefined){ formid = getEnclocal("newFormID"); } dataObj.formID = formid; dataObj.type = type; - console.log(dataObj) + var dataObjFlag = _.cloneDeep(dataObj); delete dataObjFlag.type var request = window.commonAjax("/formbase/getFormInfoService", dataObjFlag, "GET", true); @@ -9808,8 +9807,8 @@ var requestRight = window.commonAjax("/formsetting/getFormsettingInfoService", dataObj, "POST", true); requestRight.done(function (rs) { customDataBound.bindInterface(formid); - // ////console.log(rs); - //console.log(type); + // //// + // if (rs.data.saveable == "0") { $(".sure_box").hide(); } @@ -9820,15 +9819,15 @@ if (rs.data.subCustomButton) { // var dd=document.createElement('span'); var formdata = []; - //console.log("查询类型"); - //console.log(type); + // + // switch (type) { case "TJ": formdata = rs.data.subCustomButton.addCustomButton; break; case "XG": formdata = rs.data.subCustomButton.updateCustomButton; break; case "XX": formdata = rs.data.subCustomButton.detailedCustomButton; break; case "LB": formdata = rs.data.subCustomButton.listCustomButton; break; } - //console.log("渲染结果"); + // var srcd = document.createElement('script'); // var tabledata=rs.data.customButtons; srcd.type = "text/javascript"; @@ -9842,30 +9841,30 @@ $(".edit_form").append(dd); - //console.log(obt.buttonName); + // if (obt.buttonName == "驳回") { - //console.log("等于撤回"); + // // 定义审批流程定义的方法 // 撤销流程实例 $("#" + dd.id).click(function () { var process = getEnclocal("processid"); - //console.log(process); + // var dd = process; var tent = getEnclocal("tenantID").tenantID; - //console.log(dd.data); + // window.queryAjaxs("ubp-api-seache/process/inst/log", { "processInstId": dd.data.processInstId }, "POST", true).done(function (res) { - //console.log("打印回执"); - //console.log(res); + // + // if (res != undefined) { - //console.log("发送请求"); + // window.queryAjaxs("ubp-api-control/process/inst/drawBack", { "processInstId": res.data[0].processInstId, "activityInstId": res.data[0].activityInstId }, "POST", true).done(function (res) { - //console.log("打印回执"); - //console.log(res); + // + // if (res.data == 1) { - //console.log("撤销成功"); + // customBase.alert('S',"撤销成功"); // localStorage.removeItem('userinfo') } @@ -9909,7 +9908,7 @@ return null; } else { if (processLog != "null" && processLog != undefined) { - console.log(processLog.length); + if (processLog.length == 1) { customBase.alert('W',"无可退回活动"); return null; @@ -9925,7 +9924,7 @@ } var requestSingleForm = window.commonAjax("/ubp-api-seache/process/get/back", ss, "POST", true); requestSingleForm.done(function (rs) { - console.log(rs); + var res = rs.data; if (res != undefined & res != null) { @@ -9941,7 +9940,7 @@ } inputs += "<div class='footerbtn' style='display:flex;justify-content:space-around;'><input class='btn btn-default choosebtn' type='button' value='取消' onclick='tui(false)'/><input type='button' class='btn btn-default choosebtn2' value='确定' onclick='tui(true," + activeitem + ")'/>"; inputs += "</div>"; - console.log(inputs); + $("#liucheng").html(inputs); @@ -9981,9 +9980,9 @@ var fuc = obt.methodName + "()"; eval(fuc); - //console.log(fuc); + // //调用自定义js中的方法 - //console.log("调用自定义方法"); + // fuc; }); @@ -10015,9 +10014,9 @@ // var fuc=arr[1]+"()"; // eval(fuc); - // ////console.log(fuc); + // //// - // ////console.log("调用自定义方法"); + // //// // fuc; // }); @@ -10028,18 +10027,18 @@ var dataObjDo = {}; dataObjDo = dataObj; delete dataObjDo.type - console.log(dataObj) + var requestRight = window.commonAjax("/tabConfiguration/queryTabConfiguration", dataObjDo, "POST", true); requestRight.done(function (rs) { //2017/10/31 李元杰 附件 流程先洗 选项卡添加 - console.log(rs) + $('.boxTwo').hide(); $('.sTab').find('ul li').eq(1).hide(); $('.boxThr').hide(); $('.sTab').find('ul li').eq(2).hide(); if (rs.data != '') { if (rs.data[0].appendix == "do") { - console.log($('.sTab').find('ul li')) + $('.sTab').find('ul li').eq(1).show(); } else { $('.boxTwo').hide(); @@ -10080,7 +10079,7 @@ if (_.isString(listData)) {// 下拉款填值 修改 李伟民 11-14 listData = listData.split(",") }// 下拉款填值 修改 李伟民 11-14 - console.log(listData); + for (var i = 0; i < listData.length; i++) { listDataJson[listData[i]] = "1"; } @@ -10126,12 +10125,12 @@ xhSelect.getValue = function (itemId) { var returnItem = []; var selectItme = $("#" + itemId + " .selectItme"); - console.log(selectItme) + for (var i = 0; i < selectItme.length; i++) { if (selectItme[i].getAttribute("value") == "") { var selectItmeJson = {}; } else { - ////console.log(selectItme[i].getAttribute("value")); + //// var selectItmeJson = $.parseJSON(selectItme[i].getAttribute("value")); } @@ -10146,21 +10145,21 @@ } // 下拉框主数据渲染 xhSelect.setXhSelect = function (options) { - ////console.log(options); - ////console.log(_.cloneDeep(xhSelect.options)); + //// + //// //解决主数据重复 var options_xh = _.cloneDeep(xhSelect.options); options_xh.listData = []; //解决主数据重复END options = $.extend(true, options_xh, options); var optionArr = ""; - console.log(options.selectId); - ////console.log(options.listData); - // ////console.log(options.listData.length); + + //// + // //// for (var i = 0; i < options.listData.length; i++) { optionArr += '<option value="' + options.listData[i].value + '">' + options.listData[i].text + '</option>'; } - console.log(optionArr); + var multiple = ""; if (options.multiple) { multiple = 'multiple'; @@ -10182,14 +10181,14 @@ ' </div>' + ' </div> ' + '</div>'; - console.log(options); + if (options.setDiv == '') { var $el = $("#" + options.selectId); } else { var $el = $("." + options.setDiv); } - console.log(optionArr) - console.log($xhSelectDiv) + + _.each($el, function (sel) {//添加记录 重复问题 李伟民11-14 主数据丢失 11-29 再次修改 if ($(sel).find(".selectClass").length == 0) { $(sel).append($xhSelectDiv) @@ -10209,8 +10208,8 @@ } xhSelect.rm_option = function (val, vals_selected) { xhSelect.scope.rm_optionFlag = true; - console.log(val); - console.log(vals_selected) + + $('div.drop_down_sel').remove(); var selectItmeJson = $($(val).parent().parent().parent().parent()).find(".selectItme")[0].getAttribute("value"); @@ -10221,7 +10220,7 @@ //张吉男修改 下拉框默认值不可以清空 var cla=new RegExp("disableColor"); - //console.log(cla.test($(val).parent().parent().attr("class"))); + // //判断下拉框是否是可编辑 if(!(cla.test($(val).parent().parent().attr("class")))){ $(val).parent().remove(); @@ -10242,10 +10241,10 @@ // 12/4 李元杰 $('.zTreeDemoBackground').css("display", "none"); $(".search_input").css("display", "none"); - console.log(selectedItem); - console.log(event); - console.log($(this)) - ////console.log("-------------------this-----------------------------------"); + + + + //// if ($el[0].className.indexOf("readonly") > -1) { return; } @@ -10256,13 +10255,13 @@ if (xhSelect.scope.rm_optionFlag) { return; } - console.log(2) + $('div.drop_down_sel').remove(); var $select = $el.find('select'); var isMultiple = $select.attr('multiple'); var $options = $el.find('select > option'); - ////console.log($el); - ////console.log($options); + //// + //// var $options_str = '<ul>' + '<li class="sel_query">' + '<input type="text" name="query" >' + '</li>' + '</ul>'; $options_str += '<div class="select "><ul class="line">'; @@ -10281,13 +10280,13 @@ }); $options_str += '</ul></div>'; - console.log($options_str) - console.log(3) + + $("div.drop_down_sel").remove(); var $select_obj = $('<div drop-down-selector="" filterlist="searchlist" class="drop_down_sel" style="position: absolute;">' + $options_str + '</div>'); $el.find('div.select3-element').append($select_obj); $('body').off('click.sel').on('click.sel', function () { - console.log(5); + $('div.drop_down_sel').remove(); $('.zTreeDemoBackground').css("display", "none"); $(".search_input").css("display", "none"); @@ -10296,7 +10295,7 @@ event.stopPropagation(); }); - console.log(6) + $select_obj.find('input[name="query"]').on('keyup', function () { var $el = $(this); @@ -10357,7 +10356,7 @@ 'label': checkboxLabel }]; set_valueleft(vals_selected); - console.log(7) + $('div.drop_down_sel').remove(); } else { var vls = []; @@ -10379,23 +10378,23 @@ } //customBase.reCharge = function(){//重新记账 李伟民 2017-10-18 21:30 -// //console.log(customBase); -// //console.log(customShow); +// // +// // // var rePostData = {}; // rePostData['formID'] = customShow.options.formid; // rePostData['dataRowNum'] = customShow.options.dataRowNum; // var reCharge_request = window.cloudAjax("epc-tenant/accounting/record",rePostData,"POST",true); // reCharge_request.done(function(res){ -// //console.log(res); +// // // }) //}//重新记账 李伟民 2017-10-18 21:30 end //customBase.checkItem = function(){//提交验证 李伟民2017-10-19 15:52 -// //console.log(customBase); -// //console.log(customShow); +// // +// // // //画面项目取得 --------------------------画面项目取得------ // var items = customShow.getItems(); -// ////console.log(items) +// //// // // 画面check // var returnfromCheck = customShow.initEvent.fromCheck(items); //-------------------- // if(returnfromCheck){ @@ -10406,7 +10405,7 @@ // var rules = customShow.options.jsonLinkage; // if(!_.isNull(rules) && rules != undefined){ // rules = JSON.parse(rules); -// //console.log(rules); +// // // var checkId = []; // _.each(rules,function(ru){ // _.each(ru.results,function(res){ @@ -10417,7 +10416,7 @@ // }) // }); // checkId = _.uniq(checkId); -// //console.log(checkId); +// // // _.each(checkId,function(cid){ // $("[id='" + cid + "']").trigger("change.check"); // }); @@ -10427,7 +10426,7 @@ // function checkSameDay(day1, day2) {//判断是否为同一天 李伟民 2017-10-20 17:00 // var seconds; // seconds = day1 - day2; -// //console.log(seconds); +// // // if (seconds < 24 * 60 * 60 * 1000 && seconds >= 0) { // return true; // } else { @@ -10436,10 +10435,10 @@ // }//判断是否为同一天 李伟民 2017-10-20 17:00 end // customBase.checkTimeCross = function () {//跨行程验证时间 李伟民 2017-10-20 11:35 -// //console.log(customBase); -// //console.log(customShow); +// // +// // // var items = customShow.getItems(); -// //console.log(items); +// // // var itemKey = _.keys(customBase.options.customItems); // var subItem = []; // _.each(itemKey, function (keys) { @@ -10449,7 +10448,7 @@ // }); // var FromDateArr = []; // var LeaveDateArr = []; -// //console.log(subItem); +// // // _.each(subItem, function (sub) { // if (items[sub] != undefined) { // _.each(items[sub], function (isub, i) { @@ -10462,12 +10461,12 @@ // }); // } // }); -// //console.log(FromDateArr); -// //console.log(LeaveDateArr); +// // +// // // if (FromDateArr.length > 1 && LeaveDateArr.length > 1 && FromDateArr.length == LeaveDateArr.length) { // _.each(FromDateArr, function (fdate, k) { // if (k > 0) { -// //console.log(checkSameDay(fdate.value,LeaveDateArr[k-1].value)); +// // // if (checkSameDay(fdate.value, LeaveDateArr[k - 1].value) == false) { // var message = customShow.options.customItemShow.item[fdate.property.id].tag_Attribute.title + "与上一行程不连续"; // customLinkageAnalysis.setMessage(fdate.property.id, message, k); @@ -10478,7 +10477,7 @@ // }//跨行程验证时间 李伟民 2017-10-20 11:35 end // customBase.checkLandCross = function () {//跨行程验地点 李伟民 2017-10-20 11:35 // var items = customShow.getItems(); -// //console.log(items); +// // // var itemKey = _.keys(customBase.options.customItems); // var subItem = []; // _.each(itemKey, function (keys) { @@ -10504,7 +10503,7 @@ // _.each(FromLandeArr, function (fland, k) { // if (k > 0) { // customLinkageAnalysis.clearMessage(fland.property.id, k); -// //console.log(fland.value != ToLandArr[k-1].value); +// // // if (fland.value != ToLandArr[k - 1].value) { // var message = customShow.options.customItemShow.item[fland.property.id].tag_Attribute.title + "与上一行程不连续"; // customLinkageAnalysis.setMessage(fland.property.id, message, k); @@ -10515,25 +10514,25 @@ // }//跨行程验地点 李伟民 2017-10-20 11:35 end //自定义表单扩展函数 增加行 删除行 customShow.addRow = function (subId, data) { - console.log(data); - console.log(subId); - console.log($("#" + subId)); - console.log($("#" + subId).find(".trContentClass")); + + + + $("#" + subId).find(".trContentClass").remove(); - // console.log(data[0].length - 1); + // for (var i = 0; i < data[0].length; i++) { var itemId = subId; var showClass = "customViewUEditorCss"; var item = customBase.options.customItems[customShow.options.customItemShow.item[itemId].tag_Attribute.alias].cloneDiv; - //console.log(customShow.options) - console.log(itemId, item) - console.log(itemId, customBase.options.customItems) + // + + //子表单情况为U情况 if (item == undefined) {// 子表单回显 修改 李伟民 11-10 var tbody = $("." + showClass + " #" + itemId + "ActiveId").find("tbody"); tbody = tbody[0].cloneNode(true); $(tbody).find(".select2").remove(); - console.log($(tbody).html()); + $(tbody).find(".tdTitleClass").closest("tr").addClass("table_title"); $(tbody).find(".dropdowntypeCss").select2({ theme: "classic" }); // $(tbody).find(".zTreeDemoBackground").select2({theme: "classic"}); @@ -10546,16 +10545,16 @@ }// 去除重复的tr 李伟民 11-14 // $(tbody).find(".cfg_contentNone").removeClass("cfg_contentNone"); tbody = customShow.addsubformListInit(itemId, $(tbody).find("tr")); - console.log(tbody); - console.log(itemId); - console.log($(tbody).find("#" + itemId).attr("class")); + + + $($("." + showClass + " #" + itemId + "ActiveId").find("table")[0]).append(tbody);// 子表单回显 修改 李伟民 11-10 customShow.hidesubform(); customShow.setXhSelectList(false);//添加记录 重复问题 李伟民11-14 } else { - console.log(item); + item = item[0].cloneNode(true); - console.log(item); + $(item).find(".select2").remove(); $(item).find(".dropdowntypeCss").select2({ theme: "classic" }); @@ -10574,11 +10573,11 @@ $('.iconfontcolor').on('click', function () { $(this).parent().parent().parent().remove(); }); - console.log($(item)) + customShow.addtree(itemId, item); } var customItems = customBase.options.customItems; - console.log(customItems) + var order = $($("#" + subId + "ActiveId .trContentClass")[0]).find(".tdContentClass"); var orderid = []; var orderObj = {}; @@ -10589,11 +10588,11 @@ orderid.push($(opt).find("div").children().eq(1).attr("id")); } }); - console.log(orderid); + orderid.splice(0, 1); - console.log(orderid); + var subArr = []; - console.log(subId) + _.each(customItems, opt => { if (opt.parentsubFormNum == subId.replace("itemId_", "")) { subArr.push(opt); @@ -10602,7 +10601,7 @@ _.remove(subArr, n => { return n.fieldKey == "DATAROWNUM"; }) - console.log(subArr); + var endArr = []; _.each(orderid, opt => { var a = {}; @@ -10613,17 +10612,17 @@ }); endArr.push(a); }) - console.log(endArr); - console.log(data); + + _.each(endArr, (opts, i) => { - console.log(opts.id, opts.type, data[i]); + if (opts.type == "dropdownlist") {// 不可修改 控件type 李伟民 11-17 customBase.setItemValue(opts.id, "dropdownlistText", data[i], "", ""); } else { customBase.setItemValue(opts.id, opts.type, data[i], "", ""); } }); - console.log(subId) + customShow.subTotle(subId) }; //关联表单控件 列表渲染 @@ -10639,7 +10638,7 @@ //渲染table内容变量 let contentdata = ""; //表头渲染数据 - //console.log(head); + // _.remove(head, n => { return n.fieldKey == "DATAROWNUM"; }); @@ -10650,7 +10649,7 @@ head_tr.append('<td class="td1">选择</td>' + headtr); $(".requestMenu").append(head_tr); - //console.log(rs) + // if (rs.data != undefined && !_.isNull(rs.data) && rs.data.count != undefined) { counts = rs.data.count; } @@ -10664,7 +10663,7 @@ // }else{ // codeContent = rs.data.code; // } - console.log(content); + if (content.length == 0) { var div_empty = $("<div><i style='width:20px;height:20px;' class='fa fa-envelope-o' aria-hidden='true'></i><p>您还没有数据显示</p></div>"); $(".requestMenu").append(div_empty); @@ -10681,11 +10680,11 @@ }); var tr = $("<tr class='bodytr'></tr>"); tr.append('<td class="td1"><li class="checkLine"><span class="custom-check ' + opt.show + '"></span><i class="label"></i></li></td>' + contentdata); - console.log(tr); + $(".requestMenu").append(tr); }); } - //console.log(formhuixian); + // if (formhuixian != undefined) { @@ -10697,41 +10696,41 @@ head.push({ fieldKey: "DATAROWNUM", title: "DATAROWNUM" }); //判断单选多选 var selItem = customShow.options.customItemShow.item; - console.log(selItem); + var sel = ""; var datarow = ""; var tag_Id = ""; - console.log(selItem); + for (let key in selItem) { if (key == $iconId) { sel = selItem[key].tag_Attribute.mytextSel; - console.log(selItem[key].tag_Attribute.singleSetValue); + if (selItem[key].tag_Attribute.singleSetValue != "itemId") { datarow = JSON.parse(selItem[key].tag_Attribute.singleSetValue).columnOrderNum; tag_Id = JSON.parse(selItem[key].tag_Attribute.singleSetValue).tag_Id; } } } - console.log(sel) + if (sel == "single") { $(".custom-check").on("click", function () { var addVals = []; var showVals = []; $(this).parent().parent().parent().siblings().find(".custom-check").removeClass('cur'); $(this).toggleClass('cur'); - console.log($(this)); - console.log($(this).siblings()); + + // var showObj = {}; let $index = $(this).parent().parent().parent().index() - 1; var check = $(".custom-check"); - console.log(check); + _.each(check, opt => { - console.log(opt) + if ($(opt).hasClass('cur')) { addVals.push(content[$(opt).parent().parent().parent().index() - 1]); // showVals.push(content[$(opt).parent().parent().parent().index() - 1]); // addVals.push(codeContent[$(opt).parent().parent().parent().index() - 1]);//填值时使用code 李伟民 12-05 - // console.log(codeContent[$(opt).parent().parent().parent().index() - 1]) + // } else { _.remove(addVals, n => { return n.DATAROWNUM == content[$(opt).parent().parent().parent().index() - 1].DATAROWNUM; @@ -10744,11 +10743,11 @@ }); addVal = addVals; // showVal = showVals; - console.log(addVal); - console.log(datarow); + + customShow.sureonclick(addVal, $iconId, head, sel, iconAttr, datarow, formId); }); - console.log(addVal); + } else if (sel == "multiple") { $(".custom-check").on("click", function () { @@ -10759,7 +10758,7 @@ addVal.push(content[$index]); // showVal.push(content[$index]); // addVal.push(codeContent[$index]);//填值时使用code 李伟民 12-05 - //console.log(content[$index]) + // } else { _.remove(addVal, n => { return n.DATAROWNUM == content[$index].DATAROWNUM; @@ -10772,14 +10771,14 @@ customShow.sureonclick(addVal, $iconId, head, sel, iconAttr, datarow, formId); }); } - console.log(addVal); + //选择方法END return counts; } function createMxtTable($iconId, head, addVal) {// 关联数据渲染修改 李伟民 11-30 - console.log(head); - console.log(addVal); + + if (head == "" || addVal == "" || head == undefined || addVal == undefined) { return false; } @@ -10821,10 +10820,10 @@ ajaxtype = "GET"; } - console.log(postdata); + var rquest = window.commonAjax(getCodeUrl, postdata, ajaxtype, true); rquest.done(function (res) { - console.log(res); + var rsdata = ""; if (res.data && res.data.main != undefined) { if (typeflag) { @@ -10832,8 +10831,8 @@ } else { rsdata = res.data.main; } - console.log(iconAttr); - console.log(rsdata); + + if (rsdata == undefined) { return false; } @@ -10861,10 +10860,10 @@ } customShow.sureonclick = function (addVal, $iconId, head, sel, iconAttr, datarow, formId) { - console.log(datarow) + $(".btn-primary").on("click", function () { var showObj = {}; - console.log(addVal); + $('#' + $iconId).empty(); //回显属性 $("#" + $iconId).attr("formhuixian", JSON.stringify(addVal)); @@ -10884,11 +10883,11 @@ var data2 = customShow.columnToRow(head, addVal); //子表单自动增加行 var subId = $('#' + $iconId + "ActiveId").attr("choosesubform"); - console.log(subId); + if (subId == "itemId") { createMxtTable($iconId, head, addVal); - console.log(addVal); - console.log(head); + + setValByAnother(iconAttr, addVal, formId, head); //遍历对比别名相同填值 // _.each(customBase.options.customItems, opt => { @@ -10909,7 +10908,7 @@ // }) // }); } else { - console.log(addVal) + if (sel == "single" && iconAttr.tag_Attribute.relevancesourcetype != "fundata") { setValByAnother(iconAttr, addVal, formId, head) // _.each(addVal,(opt,j)=>{ @@ -10930,39 +10929,39 @@ //// ulBox.append(show); // } // ulBox.append("<tr>"+sdata_head+"</tr><tr>"+sdata_boby+"</tr>"); - // console.log(sdata_head); + // // $('#'+$iconId).append(ulBox); // }); createMxtTable($iconId, head, addVal); var subdata = {}; - console.log(datarow) + subdata.formdataNum = datarow; subdata.datarowNum = addVal[0].DATAROWNUM; subdata.formID = formId.formID; var subformData = window.commonAjax("/datamanagement/getSubFormDataListService", subdata, "GET", true, false); subformData.done(function (rs) { - console.log(rs.data); + var c_data = SC.cur_zero(rs.data); - console.log(c_data) + var rsArr = []; _.each(c_data, opt => { var opts = _.omit(opt, ['DATAROWNUM']); rsArr.push(opts) }); var rslength = _.keys(rsArr[0]).length; - console.log(rsArr); + var subId = $('#' + $iconId + "ActiveId").attr("choosesubform"); - console.log($(".myipt")) + var formObj = window.getEnclocal("netformid"); var globalFormID = formObj; var dataObj = {}; dataObj.formID = globalFormID; var order_id = []; // 11/25 李元杰 存flag - console.log(dataObj) + var requestRight = window.commonAjax("/datamanagement/getFormFieldListService", dataObj, "GET", true, false); requestRight.done(function (rs) { - console.log(rs) + order_id = rs.data; }) @@ -10970,21 +10969,21 @@ // dataObj.tenantID= tenantID.tenantID; // var order_ids = JSON.parse($(".myipt").val()); - console.log(order_id); - // console.log(order_ids) + + // if (customShow.options.customItemShow.item[$iconId].tag_Attribute.singleSetValue) { var message = JSON.parse(customShow.options.customItemShow.item[$iconId].tag_Attribute.singleSetValue); } - console.log(message.columnOrderNum) + - console.log(subId); + var subIds = subId.replace("itemId_", "") - console.log(subIds); + var orderArr = []; //存储关联表单内子表单的数组 _.each(order_id, opt => { - console.log(opt) + if (opt.parentsubFormNum == message.columnOrderNum) { orderArr.push(opt); } @@ -10992,14 +10991,14 @@ _.remove(orderArr, n => { return n.fieldKey == "DATAROWNUM"; }) - console.log(orderArr); + orderArr = _.sortBy(orderArr, ['fieldOrderNum']); var resArr = []; for (i = 0; i < rslength; i++) { resArr.push([]) } - console.log(rsArr); - console.log(orderArr) + + _.each(rsArr, (opt, i) => { var j = 0 _.each(orderArr, n => { @@ -11007,7 +11006,7 @@ j++; }) }); - console.log(resArr); + if (resArr.length == 0){ alert("上级预算为0"); } else { @@ -11018,7 +11017,7 @@ }); } else if (sel == "multiple" || iconAttr.tag_Attribute.relevancesourcetype == "fundata") { - console.log("fundata"); + if (iconAttr.tag_Attribute.relevancesourcetype == "fundata") {//关联函数时 别名相同填值 setValByAnother(iconAttr, addVal, "", head, true); } @@ -11029,7 +11028,7 @@ $(".subformAddiconShow").hide(); } } - console.log(customShow.customJs(subId)) + SC.setSubForm(customShow.customJs(subId), subId); if (addVal.length != 0) { SC.Superior_show() @@ -11039,9 +11038,9 @@ customShow.customJs = function (subId) { var subArr = []; - console.log(subId) + var customItems = customBase.options.customItems; - console.log(customItems) + _.each(customItems, opt => { if (opt.parentsubFormNum == subId.replace("itemId_", "")) { subArr.push(opt); @@ -11050,23 +11049,23 @@ _.remove(subArr, n => { return n.fieldKey == "DATAROWNUM"; }) - console.log(subArr); + var aliasArr = []; _.each(subArr, opt => { aliasArr.push(opt.fieldKey) }) - console.log(aliasArr); + return aliasArr; } //表单引用 扩展 回显子表单功能 fenye = function (pageSize, pageNum, formId, sCondition, formhuixian, head, $iconId, addVal, anydata) { - console.log($iconId); - console.log("findmany"); - console.log(anydata); - console.log(head); + + + + var iconAttr = customShow.options.customItemShow.item[$iconId];//关联数据 函数 数据源 李伟民 11-07 - console.log(iconAttr); + var dataUrl = ""; var dataObj; if (anydata) { @@ -11107,13 +11106,13 @@ }); $('.closeBtn').on('click', () => { $('#' + $iconId + 'menuContent').remove(); - console.log($('.maskLayer')) + $('.maskLayer').css('display', 'none'); }) return counts; } customShow.journeySort = function () {//行程排序 初始化 李伟民 2017-10-23 15:56 - //console.log(customShow); + // var itemKey = _.keys(customShow.options.customItemShow.item); _.each(itemKey, function (keys) { if (customShow.options.customItemShow.item[keys].tag_Type == "subform" && customShow.options.customItemShow.item[keys].tag_Attribute.sorttype != undefined && customShow.options.customItemShow.item[keys].tag_Attribute.sorttype != "") { @@ -11142,14 +11141,14 @@ var type = event.data.msg.type; var sub = event.data.msg.sub; var subType = customShow.options.customItemShow.item[sub].tag_Attribute.allcopy; - console.log(event); + var allValue; var allItem = []; allValue = customBase.getItemValue(sorttype, type); if(_.isString(allValue)){ allValue = [allValue]; } - //console.log(allValue); + // _.each(allValue, function (v, i) { var optValue; if(type == "calendar"){ @@ -11166,11 +11165,11 @@ } }); - //console.log(allItem); + // var sortValue = _.sortBy(allItem, function (o) { return o.value; }); - console.log(sortValue); + if(subType){ _.each($("[id='" + sub + "ActiveId']"), function (subform, k) { $(subform).replaceWith(sortValue[k].temp); @@ -11190,7 +11189,7 @@ $(this).css('border-bottom', '2px solid #23b7e5'); $(this).css('box-sizing', 'border-box'); $(this).siblings().css('border', 'none'); - //console.log($($(".tabBox>div")[$(this).index()])); + // $($(".tabBox>div")[$(this).index()]).show(); $($(".tabBox>div")[$(this).index()]).siblings().hide(); if($(this).index() == 0){//切换选项卡导致 保存按钮消失修改 李伟民 0201 @@ -11211,14 +11210,14 @@ _.each(addVal, opts => { data1.push(opts[opt.fieldKey]); }); - console.log(data1) + data.push(data1) }); return data; } function submitErrShow(item,num){//审查必须错误提示 李伟民 0119 - console.log(item,num); + var itemId = item.tag_Id; if(num == undefined){ num = 0; @@ -11231,7 +11230,7 @@ $(mesageErrDiv).append(mesageErrStr); if(customShow.options.customInit.designMode != 1){//快捷模式 李伟民 0126 if ($(".customShow #" + itemId + "ActiveId").length == 0) { - console.log($(".customViewUEditorCss [id='" + itemId + "']:eq(" + num + ")").closest("td")); + $(".customShow [id='" + itemId + "']:eq(" + num + ")").closest("td").append(mesageErrDiv); $(".customShow ." + itemId + "_showItem:eq(" + num + ")").append(mesageErrDiv); } else { @@ -11269,9 +11268,9 @@ if(item != undefined && item != ''){ item = JSON.parse(item); } - console.log(customBase); - console.log(customShow); - console.log(item); + + + var allItemKey = _.keys(customBase.options.customItems); var allItemId = _.keys(customShow.options.customItemShow.item); var allItem = _.cloneDeep(customShow.options.customItemShow.item); @@ -11298,8 +11297,8 @@ _.extend(cd,{'parentId':parentItem[cd.parentsubFormNum].tag_Attribute.alias}); }); allItemValue = _.concat(allItemValue,childItem); - console.log(allItemValue); - console.log(item); + + _.each(allItemValue,function(item_value){ if(item_value.parentsubFormNum == 0){ var value = item[item_value.tag_Attribute.alias] @@ -11343,8 +11342,8 @@ if(checkFlag != true){ return false; } - console.log(getEnclocal("organizationId")); - console.log(getEnclocal("datarowNum")); + + //从local取出log var processLog = getEnclocal("processLog"); var tenant = getEnclocal("tenantID"); @@ -11352,8 +11351,8 @@ //暂时修改流程lym // var org = cust.expend_department.trim(); //暂时修改流程lym - console.log(processLog); - console.log(processLog !== null); + + //12/11 if (processLog != "null") { var strMessage = customBase.getMessage("mesage_ID034"); @@ -11380,7 +11379,7 @@ } var requestSingleForm = window.commonAjax("/ubp-api-control/process/inst/create", ss, "POST", true); requestSingleForm.done(function (rs) { - console.log(rs); + if (rs.resCode == 00000) { customBase.alert('S', "提交成功"); @@ -11407,14 +11406,14 @@ if (data == true) { //确定提交后操作 var processLog = getEnclocal("processLog"); - console.log(processLog); + var ss = { "processInstId": processLog[0].processInstId } - console.log(ss); + var requestSingleForm = window.commonAjax("/ubp-api-control/process/inst/over", ss, "POST", true); requestSingleForm.done(function (rs) { - console.log(rs); + if (rs.data == 1) { customBase.alert('S',"结束成功"); $("#sssd").click(); @@ -11434,7 +11433,7 @@ function tui(data, item) { if (data == true) { - console.log($('.actcur').val()); + if ($('.actcur').val() == undefined) { customBase.alert("W","请选择退回的活动"); return null; @@ -11449,7 +11448,7 @@ } var requestSingleForm = window.commonAjax("/ubp-api-control/process/inst/bac", ss, "POST", true); requestSingleForm.done(function (rs) { - console.log(rs); + if (rs.data == 1) { customBase.alert("S","退回成功"); @@ -11466,14 +11465,14 @@ } //lym 审批确定后方法 function zhixing(data) { - console.log(data); - console.log($("#datas").val()); + + if (data == false) { $("#sssd").click(); } else { var processLog = getEnclocal("processLog"); - console.log(processLog[0].processInstId); + var ss = { "processInstId": processLog[0].processInstId, "activityInstId": processLog[0].activityInstId, @@ -11485,10 +11484,10 @@ "companyId": getEnclocal("testCompanyId"), } - console.log("标记token"); + var requestSingleForm = window.commonAjax("/ubp-api-control/process/inst/finish", ss, "POST", true); requestSingleForm.done(function (rs) { - console.log(rs); + if (rs.resCode == "00000") { customBase.alert('S',"审批成功"); $('#editableBtn').remove();//审批成功后不能编辑 李伟民 0129 @@ -11502,7 +11501,7 @@ //2017.11.24 qld 追加预算 customBase.budgetAddmoney = function () { var id = getEnclocal("tenantID") - console.log(id.tenantID); + var sub = getEnclocal("customItem"); var submit_data = { "formId": getEnclocal("newFormID"), @@ -11541,7 +11540,7 @@ customBase.budgetBackmoney = function () { var id = getEnclocal("tenantID") - console.log(id.tenantID); + var sub = getEnclocal("customItem"); var submit_data = { "formId": getEnclocal("newFormID"), @@ -11583,11 +11582,11 @@ } customBase.repayment = function () { var id = getEnclocal("tenantID") - console.log(id.tenantID); + var sub = getEnclocal("customItem"); - console.log(sub); + var subForm = sub.DATAROWNUM; - console.log("我是" + subForm) + var submit_data = { "formId": getEnclocal("newFormID"), "netformid": getEnclocal("netformid"), @@ -11626,25 +11625,25 @@ }); _.each(subArr, opt => { if (opt.type == "number") { - console.log(opt.id); + numObj[opt.id] = customBase.getItemValue(opt.id, opt.type); numArr.push(Number(customBase.getItemValue(opt.id, opt.type))); } }) - console.log(numObj); + for (let key in numObj) { var opts = []; if (_.isArray(numObj[key])) { _.each(numObj[key], n => { n = Number(n); - console.log(n); + opts.push(n); }) numObj[key] = opts; } - console.log(numObj[key]); + } - console.log(numObj); + //_.sum 求和 for (let key in numObj) { $("." + key + "totle").val(_.sum(numObj[key])); @@ -11658,35 +11657,35 @@ var numObj = {}; var numArr = []; _.each(customItems, opt => { - console.log(opt.tag_Attribute.total) + if (opt.tag_Attribute.total == true) { totleArr.push(opt.tag_Id); - console.log(opt.tag_Id) + } }) - console.log(totleArr); + _.each(totleArr, opt => { $("#" + opt + " [type='number']").unbind("change.totle"); $("#" + opt + " [type='number']").on("change.totle", function () { - console.log($(this).attr("id")); + numObj[$(this).attr("id")] = customBase.getItemValue($(this).attr("id"), $(this).attr("type")); - console.log(_.cloneDeep(numObj)); - console.log(numObj[key]) + + for (let key in numObj) { var opts = []; if (_.isArray(numObj[key])) { _.each(numObj[key], n => { n = Number(n); - console.log(n); + opts.push(n); }) numObj[key] = opts; } - console.log(numObj[key]); + } - console.log(numObj); + //_.sum 求和 for (let key in numObj) { $("." + key + "totle").val(_.sum(numObj[key])); @@ -11698,13 +11697,13 @@ customShow.addTitle = function () { _.each($(".customShow .tdContentClass"), opt => { // $(opt).attr("title", $(opt).children().children().html()); - console.log($(opt).html()) + if ($(opt).children().children().attr("type") == "text") { $(opt).attr("title", $(opt).children().children().val()); } else { - console.log(_.cloneDeep($(opt).children().children())) - console.log(opt.innerHTML) - console.log($(opt).children().children()[0].innerHTML) + + + $(opt).attr("title", $(opt).children().children()[0].innerHTML); } }) @@ -11727,7 +11726,7 @@ // var customItems = customBase.options.customItems; // customShow.allbillInfo = []; // _.each(itemKey,function(key){ -// console.log(key); +// // if(customItems[key] != undefined && customItems[key] != '' && customItems[key].type == "subform"){ // var billInfos = []; // _.each(items[key], function(journey, i){ -- Gitblit v1.8.0