//通用弹出式文件上传 function commonUpload(callback){ $.dialog({ content: "url:systemController.do?commonUpload", lock : true, title:"文件上传", zIndex:2100, width:700, height: 200, parent:windowapi, cache:false, ok: function(){ var iframe = this.iframe.contentWindow; iframe.uploadCallback(callback); return true; }, cancelVal: '关闭', cancel: function(){ } }); } function browseImages(inputId, Img) {// 图片管理器,可多个上传共用 } function browseFiles(inputId, file) {// 文件管理器,可多个上传共用 } function decode(value, id) {//value传入值,id接受值 var last = value.lastIndexOf("/"); var filename = value.substring(last + 1, value.length); $("#" + id).text(decodeURIComponent(filename)); } //选择项目名称,列表================ function openDepartmentSelect() { //$.dialog.setting.zIndex = getzIndex(); var orgIds = $("#projectid").val(); /* var orgCode = $("#orgCode").val();*/ $.dialog({ //content: 'url:userWageController.do?projectDepartTableAll&ids='+orgIds, zIndex: getzIndex(), title: '项目名称列表', lock: true, width: '600px', height: '350px', opacity: 0.4, button: [ content: 'url:publicpageController.do?projectSelect&ids='+orgIds, zIndex: getzIndex(), title: '项目名称列表', lock: true, width: '600px', height: '350px', opacity: 0.4, button: [ {name: '确定', callback: function (){ var iframe = this.iframe.contentWindow; if(iframe.getReason().length>0){ var strData=eval(iframe.getReason()); for(var key in strData[0]){ if(key=="strId"){ $("#projectid").val(strData[0][key]); }else if(key=="strName"){ $("#projectname").focus(); $("#projectname").val(strData[0][key]); } } } afterProjectEdit(); }, focus: true}, {name: '取消', callback: function (){}} ]}).zindex(); } function callbackClean(){ $('#projectname').val(''); $('#projectid').val(''); afterProjectEdit(); } //选择供应商 function openPartnerSelect() { //$.dialog.setting.zIndex = getzIndex(); var partnerIds = $("#relatedunitid").val(); /* var orgCode = $("#orgCode").val();*/ $.dialog({ content: 'url:partnerController.do?supplierAll&ids='+partnerIds, zIndex: getzIndex(), title: '供应商列表', lock: true, width: '600px', height: '350px', opacity: 0.4, button: [ {name: '确定', callback: function (){ var iframe = this.iframe.contentWindow; if(iframe.getReason().length>0){ var strData=eval(iframe.getReason()); for(var key in strData[0]){ if(key=="strId"){ $("#relatedunitid").val(strData[0][key]); }else if(key=="strPartnerName"){ $("#relatedunitname").focus(); $("#relatedunitname").val(strData[0][key]); } } } }, focus: true}, {name: '取消', callback: function (){}} ]}).zindex(); } function callbackCleanPartner(){ $('#relatedunitname').val(''); $('#relatedunitid').val(''); } //选择项目服务 function openProjectServiceSelect() { //$.dialog.setting.zIndex = getzIndex(); var projectserviceid = $("#projectserviceid").val(); /* var orgCode = $("#orgCode").val();*/ $.dialog({ content: 'url:projectServiceController.do?selectedlist&ids='+projectserviceid+'&projectid='+$('#projectid').val(), zIndex: getzIndex(), title: '项目服务列表', lock: true, width: '1000px', height: '650px', opacity: 0.4, button: [ {name: '确定', callback: function (){ var iframe = this.iframe.contentWindow; if(iframe.getReason().length>0){ var strData=eval(iframe.getReason()); for(var key in strData[0]){ if(key=="strId"){ $("#projectserviceid").val(strData[0][key]); $("#projectserviceid").change(); }else if(key=="strName"){ $("#projectservicename").val(strData[0][key]); $("#projectservicename").change(); }else if(key=="servicetypedetail"){ $("#servicetypedetail").focus(); $("#servicetypedetail").val(strData[0][key]); } } } }, focus: true}, {name: '取消', callback: function (){}} ]}).zindex(); } function callbackCleanProjectService(){ $('#projectservicename').val(''); $('#projectserviceid').val(''); } function afterProjectEdit(){ //resetTrNum('add_maintainBillProjserv_table'); }