carSchedule.js 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. $.dialog({
  33. content: 'url:publicpageController.do?userSelect', zIndex: getzIndex(), title: '员工列表', lock: true, width: '1000px', height: '650px', opacity: 0.4, button: [
  34. {name: '确定', callback: function (){
  35. var iframe = this.iframe.contentWindow;
  36. if(iframe.getReason().length>0){
  37. var strData=eval(iframe.getReason());
  38. for(var key in strData[0]){
  39. if(key=="strId"){
  40. $("#userId").val(strData[0][key]);
  41. }else if(key=="strName"){
  42. $("#userName").val(strData[0][key]);
  43. }
  44. }
  45. $("#userName").focus();
  46. }
  47. }, focus: true},
  48. {name: '取消', callback: function (){}}
  49. ]}).zindex();
  50. }
  51. function callbackCleanUser(){
  52. $('#userName').val('');
  53. $('#userId').val('');
  54. }