| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- //通用弹出式文件上传
- 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?clothingSelectByUser&userid='+$("#userid").val(), 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"){
- $("#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]);
- }else if(key=="strStartdate"){
- $("[name='startdate']").val(strData[0][key].substring(0,10));
- }else if(key=="strWid"){
- $("#warehouseid").val(strData[0][key]);
- }else if(key=="strWname"){
- $("#warehousename").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;
- }
|