car.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. //通用弹出式文件上传
  2. function commonUpload(callback){
  3. $.dialog({
  4. content: "url:systemController.do?commonUpload",
  5. lock : true,
  6. title:"文件上传",
  7. zIndex:2100,
  8. width:700,
  9. height: 200,
  10. parent:windowapi,
  11. cache:false,
  12. ok: function(){
  13. var iframe = this.iframe.contentWindow;
  14. iframe.uploadCallback(callback);
  15. return true;
  16. },
  17. cancelVal: '关闭',
  18. cancel: function(){
  19. }
  20. });
  21. }
  22. function browseImages(inputId, Img) {// 图片管理器,可多个上传共用
  23. }
  24. function browseFiles(inputId, file) {// 文件管理器,可多个上传共用
  25. }
  26. function decode(value, id) {//value传入值,id接受值
  27. var last = value.lastIndexOf("/");
  28. var filename = value.substring(last + 1, value.length);
  29. $("#" + id).text(decodeURIComponent(filename));
  30. }
  31. function openUserSelect() {
  32. var leaderid = $("#driverid").val();
  33. $.dialog({
  34. content: 'url:publicpageController.do?userSelect&ids='+leaderid, zIndex: getzIndex(), title: '员工列表', lock: true, width: '1000px', height: '650px', opacity: 0.4, button: [
  35. {name: '确定', callback: function (){
  36. var iframe = this.iframe.contentWindow;
  37. if(iframe.getReason().length>0){
  38. var strData=eval(iframe.getReason());
  39. for(var key in strData[0]){
  40. if(key=="strId"){
  41. $("#driverid").val(strData[0][key]);
  42. }else if(key=="strName"){
  43. $("#drivername").val(strData[0][key]);
  44. }
  45. }
  46. $("#drivername").focus();
  47. }
  48. }, focus: true},
  49. {name: '取消', callback: function (){}}
  50. ]}).zindex();
  51. }
  52. function callbackCleanUser(){
  53. $('#drivername').val('');
  54. $('#driverid').val('');
  55. }