//通用弹出式文件上传 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 openClothingSelect() { //$.dialog.setting.zIndex = getzIndex(); var clothingidIds = $("#clothingid").val(); /* var orgCode = $("#orgCode").val();*/ $.dialog({ content: 'url:publicpageController.do?clothingSelectAll&ids='+clothingidIds, zIndex: getzIndex(), title: '服装列表', lock: true, width: '600px', height: '550px', 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"){ $("#clothingid").val(strData[0][key]); }else if(key=="strName"){ $("#clothingname").val(strData[0][key]); }else if(key=="strType"){ $("[name='type']").val(strData[0][key]); }else if(key=="strUnit"){ $("[name='unit']").val(strData[0][key]); } } $("#clothingname").focus(); } }, focus: true}, {name: '取消', callback: function (){}} ]}).zindex(); } function callbackCleanClothing(){ $('#clothingname').val(''); $('#clothingid').val(''); } function setEditable(){ //移除不可用属性,才能在提交时传到服务器 $("[name='type']").removeAttr("disabled"); $("[name='unit']").removeAttr("disabled"); return true; } function openWarehouseSelect() { //$.dialog.setting.zIndex = getzIndex(); var warehouseidIds = $("#warehouseid").val(); /* var orgCode = $("#orgCode").val();*/ $.dialog({ content: 'url:publicpageController.do?warehouseSelect&ids='+warehouseidIds, zIndex: getzIndex(), title: '领料点列表', lock: true, width: '850px', 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"){ $("#warehouseid").val(strData[0][key]); }else if(key=="strName"){ $("#warehousename").val(strData[0][key]); } } $("#warehousename").focus(); } }, focus: true}, {name: '取消', callback: function (){}} ]}).zindex(); } function callbackCleanWarehouse(){ $('#warehousename').val(''); $('#warehouseid').val(''); }