maintainBill.js 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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 openDepartmentSelect() {
  33. //$.dialog.setting.zIndex = getzIndex();
  34. var orgIds = $("#projectid").val();
  35. /* var orgCode = $("#orgCode").val();*/
  36. $.dialog({
  37. //content: 'url:userWageController.do?projectDepartTableAll&ids='+orgIds, zIndex: getzIndex(), title: '项目名称列表', lock: true, width: '600px', height: '350px', opacity: 0.4, button: [
  38. content: 'url:publicpageController.do?projectSelect&ids='+orgIds, zIndex: getzIndex(), title: '项目名称列表', lock: true, width: '600px', height: '350px', 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. $("#projectid").val(strData[0][key]);
  46. }else if(key=="strName"){
  47. $("#projectname").focus();
  48. $("#projectname").val(strData[0][key]);
  49. }
  50. }
  51. }
  52. afterProjectEdit();
  53. }, focus: true},
  54. {name: '取消', callback: function (){}}
  55. ]}).zindex();
  56. }
  57. function callbackClean(){
  58. $('#projectname').val('');
  59. $('#projectid').val('');
  60. afterProjectEdit();
  61. }
  62. //选择供应商
  63. function openPartnerSelect() {
  64. //$.dialog.setting.zIndex = getzIndex();
  65. var partnerIds = $("#relatedunitid").val();
  66. /* var orgCode = $("#orgCode").val();*/
  67. $.dialog({
  68. content: 'url:partnerController.do?supplierAll&ids='+partnerIds, zIndex: getzIndex(), title: '供应商列表', lock: true, width: '600px', height: '350px', opacity: 0.4, button: [
  69. {name: '确定', callback: function (){
  70. var iframe = this.iframe.contentWindow;
  71. if(iframe.getReason().length>0){
  72. var strData=eval(iframe.getReason());
  73. for(var key in strData[0]){
  74. if(key=="strId"){
  75. $("#relatedunitid").val(strData[0][key]);
  76. }else if(key=="strPartnerName"){
  77. $("#relatedunitname").focus();
  78. $("#relatedunitname").val(strData[0][key]);
  79. }
  80. }
  81. }
  82. }, focus: true},
  83. {name: '取消', callback: function (){}}
  84. ]}).zindex();
  85. }
  86. function callbackCleanPartner(){
  87. $('#relatedunitname').val('');
  88. $('#relatedunitid').val('');
  89. }
  90. //选择项目服务
  91. function openProjectServiceSelect() {
  92. //$.dialog.setting.zIndex = getzIndex();
  93. var projectserviceid = $("#projectserviceid").val();
  94. /* var orgCode = $("#orgCode").val();*/
  95. $.dialog({
  96. content: 'url:projectServiceController.do?selectedlist&ids='+projectserviceid+'&projectid='+$('#projectid').val(), zIndex: getzIndex(), title: '项目服务列表', lock: true, width: '1000px', height: '650px', opacity: 0.4, button: [
  97. {name: '确定', callback: function (){
  98. var iframe = this.iframe.contentWindow;
  99. if(iframe.getReason().length>0){
  100. var strData=eval(iframe.getReason());
  101. for(var key in strData[0]){
  102. if(key=="strId"){
  103. $("#projectserviceid").val(strData[0][key]);
  104. $("#projectserviceid").change();
  105. }else if(key=="strName"){
  106. $("#projectservicename").val(strData[0][key]);
  107. $("#projectservicename").change();
  108. }else if(key=="servicetypedetail"){
  109. $("#servicetypedetail").focus();
  110. $("#servicetypedetail").val(strData[0][key]);
  111. }
  112. }
  113. }
  114. }, focus: true},
  115. {name: '取消', callback: function (){}}
  116. ]}).zindex();
  117. }
  118. function callbackCleanProjectService(){
  119. $('#projectservicename').val('');
  120. $('#projectserviceid').val('');
  121. }
  122. function afterProjectEdit(){
  123. //resetTrNum('add_maintainBillProjserv_table');
  124. }