project.js 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. //选择人员
  32. function openUserSelect() {
  33. //$.dialog.setting.zIndex = getzIndex();
  34. var height = document.body.clientHeight;
  35. var userIds = $("#leader").val();
  36. /* var orgCode = $("#orgCode").val();*/
  37. $.dialog({
  38. content: 'url:publicpageController.do?userSelect&checkbox=false&ids='+userIds, zIndex: getzIndex(), title: '人员列表', lock: true, width: '1000px', height: '600px', opacity: 0.4, button: [
  39. {name: '确定', callback: function (){
  40. var iframe = this.iframe.contentWindow;
  41. if(iframe.getReason().length>0){
  42. var strData=eval(iframe.getReason());
  43. for(var key in strData[0]){
  44. if(key=="strId"){
  45. $("#leader").val(strData[0][key]);
  46. }else if(key=="strName"){
  47. $("#leadername").val(strData[0][key]);
  48. }
  49. }
  50. }
  51. }, focus: true},
  52. {name: '取消', callback: function (){}}
  53. ]}).zindex();
  54. }
  55. function callbackCleanUser(){
  56. $('#leadername').val('');
  57. $('#leader').val('');
  58. }
  59. //选择人员
  60. function openCustomerSelect() {
  61. //$.dialog.setting.zIndex = getzIndex();
  62. var height = document.body.clientHeight;
  63. var userIds = $("#customer").val();
  64. /* var orgCode = $("#orgCode").val();*/
  65. $.dialog({
  66. content: 'url:publicpageController.do?customerSelect&ids='+userIds, zIndex: getzIndex(), title: '客户列表', lock: true, width: '800px', height: '600px', opacity: 0.4, button: [
  67. {name: '确定', callback: function (){
  68. var iframe = this.iframe.contentWindow;
  69. if(iframe.getReason().length>0){
  70. var strData=eval(iframe.getReason());
  71. for(var key in strData[0]){
  72. if(key=="strId"){
  73. $("#customer").val(strData[0][key]);
  74. }else if(key=="strPartnerName"){
  75. $("#customername").val(strData[0][key]);
  76. }
  77. }
  78. }
  79. }, focus: true},
  80. {name: '取消', callback: function (){}}
  81. ]}).zindex();
  82. }
  83. function callbackCleanCustomer(){
  84. $('#customername').val('');
  85. $('#customer').val('');
  86. }