|
发表于 2016-11-25 11:41:27
|
显示全部楼层
- define(function(require) {
- var $ = require("jquery");
- var WindowDialog = require("$UI/system/components/justep/windowDialog/windowDialog");
- var justep = require("$UI/system/lib/justep");
- var common = require("$UI/PI_NEW/common/js/common");
- require("css!$UI/PI_NEW/common/css/PI_NEW").load();
-
- var showAlert=true;
- //var FProjectID="";
- //var FProjectName="";
- //var sBusinessCode="";
-
- var Model = function() {
- this.callParent();
- this.FProjectID="";
- this.FProjectName="";
- this.sProcess="/PI_NEW/change/process/changeFoundApply/changeFoundApplyProcess";
- this.fileType="变更立项";
- this.sAct=this.getContext().getActivity();
- this.pagePattern = this.getContext().getRequestParameter("_pagePattern");
- this.sParmID = this.getContext().getRequestParameter("sRowID");
- this.sID = this.getContext().getRequestParameter("sID");
- this.checkAlert="";
- this.selectType="";
- };
- Model.prototype.navs1Click = function(event){
- this.comp("contents").to(event.index);
- var win=null;
- var url="";
- var params=null;
- var id=this.comp("mainData").getCurrentRowID();
- var sBizState=this.comp("mainData").getValue("fBizState");
- var winNum=0;
- if ((' editActivity queryActivity addActivity'.indexOf(this.sAct)>0) && (this.sID == "") && (this.sParmID == "")){
- winNum=event.index;
- }else{
- winNum=event.index + 1;
- }
- if (winNum==2){
- win=this.comp("windowContainer2");
- if ((this.sAct=="queryActivity") || (this.pagePattern=="readonly") || (this.sParmID)){
- url="$UI/PI_NEW/common/process/Execute/queryActivity.w";
- }else{
- url="$UI/PI_NEW/common/process/Execute/editActivity.w";
- if ((' editActivity addActivity'.indexOf(this.sAct)>0) && (sBizState!='bsEditing')){
- url="$UI/PI_NEW/common/process/Execute/queryActivity.w";
- }
- }
- params={id:id,fileType:this.fileType};
- win.load(url, params);
- }
- // if (winNum==3){
- // win=this.comp("windowContainer3");
- // url="$UI/PI_NEW/report/process/changeRtp/CHCBRFoundRpt.w";
- // params={id:id,fileType:this.fileType,table:this.comp("mainData").idColumn};
- // win.load(url, params);
- // }
- if (winNum==3){
- win=this.comp("windowContainer4");
- url="$UI/PI_NEW/report/process/changeRtp/CHFoundActivity.w";
- var sOgnID=this.comp("mainData").getValue("fCreateOgnID");
- // url="$UI/PI_NEW/report/process/changeRtp/CHZDFoundRpt.w";
- // var sChangeType=this.comp("mainData").getValue('fChangeType');
- // if (sChangeType>'01'){
- // url="$UI/PI_NEW/report/process/changeRtp/CHJDFoundRpt.w";
- // }
- params={id:id,fileType:this.fileType,table:this.comp("mainData").idColumn,sOgnID:sOgnID};
- win.load(url, params);
- }
- if (winNum==4){
- win=this.comp("windowContainer5");
- url="$UI/PI_NEW/common/process/Execute/ChartActivity.w";
- params={id:id,process:this.sProcess};
- win.load(url, params);
- }
- if (winNum==5){
- win=this.comp("windowContainer1");
- if ((this.sAct=="queryActivity") || (this.pagePattern=="readonly") || (this.sParmID)){
- url="$UI/PI_NEW/common/process/docCenter/queryActivity.w";
- }else{
- url="$UI/PI_NEW/common/process/docCenter/editActivity.w";
- if (sBizState!='bsEditing'){
- url="$UI/PI_NEW/common/process/docCenter/queryActivity.w";
- }
- }
- params={id:id,fileType:this.fileType};
- win.load(url, params);
- }
- };
复制代码 我是新人 这是前辈写的 研究下应该会对你有帮助
|
|