|
@@ -7,12 +7,15 @@ package com.jtgh.yjpt.model.yjgl.zdwxyfb.xxlr
|
|
|
import com.jtgh.yjpt.view.yjgl.zdwxyfb.count.CgCount;
|
|
|
import com.jtgh.yjpt.view.yjgl.zdwxyfb.xxlr.CgEdit;
|
|
|
import com.jtgh.yjpt.view.yjgl.zdwxyfb.xxlr.CgView;
|
|
|
+ import com.jtgh.yjpt.view.yjgl.zdwxyfb.xxlr.CgztEdit;
|
|
|
+ import com.jtgh.yjpt.view.yjgl.zdwxyfb.xxlr.CgztLayout;
|
|
|
import com.jtgh.yjpt.view.yjgl.zdwxyfb.xxlr.ZdwxyfbLayout;
|
|
|
import com.jtgh.yjpt.vo.common.CodeVo;
|
|
|
import com.jtgh.yjpt.vo.common.SinglePageRequestVo;
|
|
|
import com.jtgh.yjpt.vo.gkgq.GqVo;
|
|
|
import com.jtgh.yjpt.vo.jyr.JyrVo;
|
|
|
import com.jtgh.yjpt.vo.yjgl.zdwxyfb.CgVo;
|
|
|
+ import com.jtgh.yjpt.vo.yjgl.zdwxyfb.CgztVo;
|
|
|
import com.jtgh.yjpt.vo.yjgl.zdwxyfb.ZbhjjbqkVo;
|
|
|
|
|
|
import flash.display.DisplayObject;
|
|
@@ -44,8 +47,10 @@ package com.jtgh.yjpt.model.yjgl.zdwxyfb.xxlr
|
|
|
public var cgEdit:CgEdit;
|
|
|
public var cgView:CgView;
|
|
|
public var cgVo:CgVo;
|
|
|
+ public var cgztLayout:CgztLayout;
|
|
|
public var queryVo:CgVo=new CgVo;
|
|
|
public var thisDataList:ArrayCollection=new ArrayCollection;
|
|
|
+ public var cgztList:ArrayCollection=new ArrayCollection;
|
|
|
// public var mapModel:MapModel;
|
|
|
public var resourceManager:IResourceManager=ResourceManager.getInstance();
|
|
|
public var jmqList:ArrayCollection;
|
|
@@ -451,6 +456,23 @@ package com.jtgh.yjpt.model.yjgl.zdwxyfb.xxlr
|
|
|
Utils.popupWindow(resourceManager.getString('common','btn.count'),view as DisplayObject,zdwxyView as DisplayObject);
|
|
|
}
|
|
|
|
|
|
+ /** 储罐状态 */
|
|
|
+ public function doViewZt(event:MouseEvent):void
|
|
|
+ {
|
|
|
+ var records:ArrayCollection = zdwxyView.cg.getSelectedRecords();
|
|
|
+ if(records.length != 1){
|
|
|
+ Utils.showInfoMessage("msg.select.one");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ cgVo=zdwxyView.cg.dataGrid.selectedItem as CgVo;
|
|
|
+ this.functionId=Utils.getFunctionId(zdwxyView);
|
|
|
+ cgztLayout= new CgztLayout();
|
|
|
+ cgztLayout.thisModel=this;
|
|
|
+ Utils.popupWindow(resourceManager.getString('common','btn.status'),cgztLayout as DisplayObject,zdwxyView as DisplayObject,function():void{
|
|
|
+ zdwxyView.cg.pager.doQuery();
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 复制记录
|
|
@@ -485,6 +507,74 @@ package com.jtgh.yjpt.model.yjgl.zdwxyfb.xxlr
|
|
|
},cgId)
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 分页查询 储罐状态信息
|
|
|
+ */
|
|
|
+ public function pageQueryZt(pager:SinglePageRequestVo):void
|
|
|
+ {
|
|
|
+
|
|
|
+ Utils.callRemote("cgController","listZt",function(r:ResultEvent):void{
|
|
|
+ var bc:BusinessContext = r.result as BusinessContext;
|
|
|
+ cgztList = bc.getAttribute("records") as ArrayCollection;
|
|
|
+ var pageVo:SinglePageRequestVo = cgztLayout.pager.pageVo;
|
|
|
+ pageVo.totalCount = bc.getAttribute("totalCount") as int;
|
|
|
+ },pager,Utils.getFunctionId(zdwxyView),cgVo,cgztLayout.query_hz.text,
|
|
|
+ cgztLayout.query_tbsj1.dateTime,cgztLayout.query_tbsj2.dateTime)
|
|
|
+ }
|
|
|
+
|
|
|
+ //新增
|
|
|
+ public function addZt(event:MouseEvent):void
|
|
|
+ {
|
|
|
+ var view:CgztEdit=new CgztEdit;
|
|
|
+ view.parentView = cgztLayout;
|
|
|
+ view.cgVo=cgVo;
|
|
|
+ view.vo = new CgztVo;
|
|
|
+ view.functionId=Utils.getFunctionId(zdwxyView);
|
|
|
+ Utils.popupWindow("新增", view,cgztLayout,function():void{
|
|
|
+ queryZt(null);
|
|
|
+ },550,250);
|
|
|
+ }
|
|
|
+
|
|
|
+ //编辑
|
|
|
+ public function editZt(event:MouseEvent):void
|
|
|
+ {
|
|
|
+ if(cgztLayout.dataGrid.selectedItems==null || cgztLayout.dataGrid.selectedIndex==-1){
|
|
|
+ Utils.showInfoMessage("msg.select.one");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var view:CgztEdit=new CgztEdit;
|
|
|
+ view.parentView = cgztLayout;
|
|
|
+ view.cgVo=cgVo;
|
|
|
+ view.vo = cgztLayout.dataGrid.selectedItem as CgztVo;
|
|
|
+ view.functionId=Utils.getFunctionId(zdwxyView);
|
|
|
+ Utils.popupWindow("编辑", view,cgztLayout,function():void{
|
|
|
+ queryZt(null);
|
|
|
+ },550,250);
|
|
|
+ }
|
|
|
+
|
|
|
+ //删除
|
|
|
+ public function delZt(event:MouseEvent):void
|
|
|
+ {
|
|
|
+ if(cgztLayout.dataGrid.selectedItems==null || cgztLayout.dataGrid.selectedIndex==-1){
|
|
|
+ Utils.showInfoMessage("msg.select.one");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var vo:CgztVo=cgztLayout.dataGrid.selectedItem as CgztVo;
|
|
|
+ Utils.doDelConfirm(function():void{
|
|
|
+ Utils.callRemote("cgController","deleteZt",function():void{
|
|
|
+ queryZt(null);
|
|
|
+ },vo);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ //查询
|
|
|
+ public function queryZt(event:MouseEvent):void
|
|
|
+ {
|
|
|
+ cgztLayout.pager.doQuery();
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|
|
|
}
|