///<reference path="/Scripts/ExtPB_Net.js" />
///<reference path="/Scripts/MyExtPB.js" />
///<reference path="/Scripts/ExtPB_Dll_Pb_Http.js" />
///<reference path="/Scripts/MyExtPb_Input.js" />

function W_CaiWuChaXun() {

	 var self=this;
	 this.Instance=null;
	 var requestor= new PBWindow();
	 var sle_zh= new SingleLineEdit( requestor );
	 var sle_skfs= new SingleLineEdit( requestor );
	 var st_rqgs= new StaticText( requestor );
	 var sle_jbr= new SingleLineEdit( requestor );
	 var sle_khorgys= new SingleLineEdit( requestor );
	 var cb_4= new CommandButton( requestor );
	 var dw_1= new DataWindow( requestor );
	 var cb_1= new CommandButton( requestor );
	 var sle_jzr= new SingleLineEdit( requestor );
	 var sle_bm= new SingleLineEdit( requestor );
	 var dp_2= new DatePicker( requestor );
	 var dp_1= new DatePicker( requestor );

	 if(typeof(this.bind)=="function") var baseBind=this.bind;
	 this.bind=function(win){
	 self.Instance=win;
	 if(typeof( baseBind )=="function") baseBind(win);

		 if(requestor == null ) requestor= new PBWindow();
		 requestor.Attach(win);
		 if(sle_zh == null ) sle_zh= new SingleLineEdit( requestor );
		 sle_zh.Attach( win.Control( "sle_zh") ); 
		 if(sle_skfs == null ) sle_skfs= new SingleLineEdit( requestor );
		 sle_skfs.Attach( win.Control( "sle_skfs") ); 
		 if(st_rqgs == null ) st_rqgs= new StaticText( requestor );
		 st_rqgs.Attach( win.Control( "st_rqgs") ); 
		 if(sle_jbr == null ) sle_jbr= new SingleLineEdit( requestor );
		 sle_jbr.Attach( win.Control( "sle_jbr") ); 
		 if(sle_khorgys == null ) sle_khorgys= new SingleLineEdit( requestor );
		 sle_khorgys.Attach( win.Control( "sle_khorgys") ); 
		 if(cb_4 == null ) cb_4= new CommandButton( requestor );
		 cb_4.Attach( win.Control( "cb_4") ); 
		 if(dw_1 == null ) dw_1= new DataWindow( requestor );
		 dw_1.Attach( win.Control( "dw_1") ); 
		 if(cb_1 == null ) cb_1= new CommandButton( requestor );
		 cb_1.Attach( win.Control( "cb_1") ); 
		 if(sle_jzr == null ) sle_jzr= new SingleLineEdit( requestor );
		 sle_jzr.Attach( win.Control( "sle_jzr") ); 
		 if(sle_bm == null ) sle_bm= new SingleLineEdit( requestor );
		 sle_bm.Attach( win.Control( "sle_bm") ); 
		 if(dp_2 == null ) dp_2= new DatePicker( requestor );
		 dp_2.Attach( win.Control( "dp_2") ); 
		 if(dp_1 == null ) dp_1= new DatePicker( requestor );
		 dp_1.Attach( win.Control( "dp_1") ); 

		 if(typeof(self.PostOpen)=="function") 
			 win.AttachEvent("window","PostOpen",self.PostOpen); 

		 if(typeof(self.Changezh)=="function") 
			 win.AttachEvent("cb_5","Clicked",self.Changezh); 

		 if(typeof(self.Changeskfs)=="function") 
			 win.AttachEvent("cb_6","Clicked",self.Changeskfs); 

		 if(typeof(self.Changejbr)=="function") 
			 win.AttachEvent("cb_9","Clicked",self.Changejbr); 

		 if(typeof(self.Changekhorgys)=="function") 
			 win.AttachEvent("cb_7","Clicked",self.Changekhorgys); 

		 if(typeof(self.Cancel)=="function") 
			 win.AttachEvent("cb_4","Clicked",self.Cancel); 

		 if(typeof(self.Delete)=="function") 
			 win.AttachEvent("cb_3","Clicked",self.Delete); 

		 if(typeof(self.ADD)=="function") 
			 win.AttachEvent("cb_2","Clicked",self.ADD); 

		 if(typeof(self.Clicked)=="function") 
			 win.AttachEvent("dw_1","Clicked",self.Clicked); 

		 if(typeof(self.Ok)=="function") 
			 win.AttachEvent("cb_1","Clicked",self.Ok); 

		 if(typeof(self.Changejzr)=="function") 
			 win.AttachEvent("cb_fs","Clicked",self.Changejzr); 

		 if(typeof(self.Changebmbh)=="function") 
			 win.AttachEvent("cb_bm","Clicked",self.Changebmbh); 

	 }

	 if(typeof(this.unbind)=="function") var baseUnBind=this.unbind; 
	 this.unbind=function() {
	 self.Instance=null;
	 if(typeof(this.Release)=="function") this.Release(); 
	 if(typeof(baseUnBind)=="function") baseUnBind(); 

		 sle_zh.Detach(); sle_zh=null; 
		 sle_skfs.Detach(); sle_skfs=null; 
		 st_rqgs.Detach(); st_rqgs=null; 
		 sle_jbr.Detach(); sle_jbr=null; 
		 sle_khorgys.Detach(); sle_khorgys=null; 
		 cb_4.Detach(); cb_4=null; 
		 dw_1.Detach(); dw_1=null; 
		 cb_1.Detach(); cb_1=null; 
		 sle_jzr.Detach(); sle_jzr=null; 
		 sle_bm.Detach(); sle_bm=null; 
		 dp_2.Detach(); dp_2=null; 
		 dp_1.Detach(); dp_1=null; 
		 requestor.Detach(); requestor=null; 
		 setTimeout(CollectGarbage, 100); 
	 }

	 //以上代码由设计器自动生成,请不要手工修改
	 //ExtPB.Net JavaScript End  设计器查找标志,请不要删除或修改

    var curParentDw = null;
    var curParentSelf = "";
    var curFlag = "";
    var curYhbh = "";
    var curDjzt = "";

    var curW_OPEN_BMDA = new OpenWindowQueryBase();

    var curW_OPEN_BMDA_NEW = new OpenWindowQueryNewBase();
    var curW_OPEN_BMDA_URL = "OpenWindowQueryNewBase";
    var curSelDays = "";
    var curlylx = "";
    var curW_OPEN_SIMPLE_CHOSE = new OpenWindowSimpleChoseBase();

    this.SetDataWindow = function (Selfs, ParentDw, YwFlag, yhbh, djzt, lylx, cxts) {
        curParentSelf = Selfs;
        curParentDw = ParentDw;
        curFlag = YwFlag;
        curYhbh = yhbh;
        curDjzt = djzt;
        curSelDays = cxts;
        curlylx = lylx
    }
    

    this.SetDataWindow = function (Selfs, ParentDw, YwFlag, yhbh, djzt,cxts) {
        curParentSelf = Selfs;
        curParentDw = ParentDw;
        curFlag = YwFlag;
        curYhbh = yhbh;
        curDjzt = djzt;
        curSelDays = cxts;
    }
    this.PostOpen = function () {

        var myDate = new Date();
        var nian = myDate.getFullYear().toString();
        var yue = myDate.getMonth();
        var ri = "01";
        var objDate = new Date(nian, yue, ri);
        dp_1.SetValue(objDate.getVarDate());
        dp_2.SetValue(UtcDateFormatToString(new Date().getVarDate()));
        self.GetColoumName();
        dw_1.SetColumn("mcz");
        dw_1.SetFocus();
    }

    this.Ok = function () {
        dw_1.AcceptText();

        var sql = self.GetSqlWhere();

        if (curSelDays != "-1") {
            if (curFlag == "TT") {
                sql += " and CONVERT(date,kdsj,120) >='" + curSelDays + "'";
            }
            //
            else if (curFlag == "ZCX" || curFlag == "SRX") {
                sql += " and CONVERT(date,kdrq,120) >='" + curSelDays + "'";
            }
             else {
                sql += " and CONVERT(date,rq,120) >='" + curSelDays + "'";
            }
        }
        curParentSelf.EvalJs("curSelSQL=\"" + sql + "\"");



        if (curDjzt == "未记账") {
            curDjzt = "isnull(jzbz,'0')<>'1'";
        } else if (curDjzt == "已记账") {
            curDjzt = "isnull(jzbz,'0')='1'";
        } else if (curDjzt == "全部") {
            curDjzt = "";
        }
        else {
            curDjzt = "fhmc='" + curDjzt + "'";
        }

        if (curDjzt.length > 0) {
            sql += " and  " + curDjzt;
        }

        if (curlylx == "全部单据") {
            sql += " and  1=1";
        }
        else if (curlylx == "新增单据") {
            sql += " and lydh is null or lydh =''";
        }
        else if (curlylx == "转接单据") {
            sql += " and lydh <> ''";
        }
        //sql = sql + " and ( isnull(fhmc,'未审核')+isnull(jzbz,'0') like '" + curDjzt + "')";

        curParentDw.RetrieveEx(sql);
        requestor.Close();
    }

    //#region Function GetSqlWhere
    this.GetSqlWhere = function () {

        var realSql = "";
        var beginDate = UtcDateFormatToString(dp_1.GetValue());
        var endDate = UtcDateFormatToString(dp_2.GetValue());
        var curBm = sle_bm.GetText();
        var curKhOrGys = sle_khorgys.GetText();
        var curSkfs = sle_skfs.GetText();
        var curJzr = sle_jzr.GetText();
        var curJbr = sle_jbr.GetText();
        var curZh = sle_zh.GetText();

        if (curFlag == "XS" || curFlag == "XF" || curFlag == "FK" || curFlag == "JF") {
            realSql += " (CONVERT(date,rq) between '" + beginDate + "' and '" + endDate + "')  ";
        } else if(curFlag=="TT") {
            realSql += " (CONVERT(date,kdsj) between '" + beginDate + "' and '" + endDate + "')  ";
        } else {
            realSql += " (CONVERT(date,kdrq) between '" + beginDate + "' and '" + endDate + "')  ";
        }

        if (curBm.length > 0) {
            var is_quotes = curBm.substring(0, 1);
            if (is_quotes == "%") {
                realSql += " and a.bmbh like ('" + curBm + "%')";
            }
            else {
                var curflag = curBm.substr(curBm.length - 1, 1);
                if (curflag == "," || curflag == "，") {
                    curBm = curBm.substring(0, curBm.length - 1);
                    var tempspkh = self.GetQuotes(curBm);
                    realSql += " and a.bmbh in(" + tempspkh + ")";
                }
                else {
                    if (is_quotes == "'") {
                        realSql += " and a.bmbh in(" + curBm + ")";
                    }
                    else {
                        realSql += " and a.bmbh like('" + curBm + "%')";
                    }
                }
            }
        } else {
            realSql += "and a.bmbh in(select bmbh  from da_qx_bmqxsz where yhbh = '" + curYhbh + "' and cw = '1')"
        }

        if (curKhOrGys.length > 0) {
            var is_quotes = curKhOrGys.substring(0, 1);
            if (curFlag == "XS" || curFlag == "XF") {
                if (is_quotes == "%") {
                    realSql += " and a.khbh like ('" + curKhOrGys + "%')";
                }
                else {
                    var curflag = curKhOrGys.substr(curKhOrGys.length - 1, 1);
                    if (curflag == "," || curflag == "，") {
                        curKhOrGys = curKhOrGys.substring(0, curKhOrGys.length - 1);
                        var tempspkh = self.GetQuotes(curKhOrGys);
                        realSql += " and a.khbh in(" + tempspkh + ")";
                    }
                    else {
                        if (is_quotes == "'") {
                            realSql += " and a.khbh in(" + curKhOrGys + ")";
                        }
                        else {
                            realSql += " and a.khbh like('" + curKhOrGys + "%')";
                        }
                    }
                }
            } else if (curFlag == "FK" || curFlag == "JF") {
                if (is_quotes == "%") {
                    realSql += " and a.gysbh like ('" + curKhOrGys + "%')";
                }
                else {
                    var curflag = curKhOrGys.substr(curKhOrGys.length - 1, 1);
                    if (curflag == "," || curflag == "，") {
                        curKhOrGys = curKhOrGys.substring(0, curKhOrGys.length - 1);
                        var tempspkh = self.GetQuotes(curKhOrGys);
                        realSql += " and a.gysbh in(" + tempspkh + ")";
                    }
                    else {
                        if (is_quotes == "'") {
                            realSql += " and a.gysbh in(" + curKhOrGys + ")";
                        }
                        else {
                            realSql += " and a.gysbh like('" + curKhOrGys + "%')";
                        }
                    }
                }
            }
        }

        if (curSkfs.length > 0) {
            var is_quotes = curSkfs.substring(0, 1);
            if (curFlag == "TT") {
                if (is_quotes == "'") {
                    realSql += " and a.tzlx in(" + curSkfs + ")";
                } else {
                    var tempspkh = self.GetQuotes(curSkfs);
                    realSql += " and a.tzlx in(" + tempspkh + ")";
                }
            } else {
                var fs = "";
                if (curFlag == "XF" || curFlag == "FK") {
                    fs = "fkfs";
                } else {
                    fs = "skfs";
                }
                if (is_quotes == "'") {
                    realSql += " and a." + fs + " in(" + curSkfs + ")";
                } else {
                    var tempspkh = self.GetQuotes(curSkfs);
                    realSql += " and a." + fs + " in(" + tempspkh + ")";
                }
            }

        }

        if (curJzr.length > 0) {
            var is_quotes = curJzr.substring(0, 1);
            if (is_quotes == "'") {
                realSql += " and a.jzr in(" + curJzr + ")";
            } else {
                var tempspkh = self.GetQuotes(curJzr);
                realSql += " and a.jzr in(" + tempspkh + ")";
            }
        }

        if (curJbr.length > 0) {
            var jbr = "";
            if (curFlag == "XS" || curFlag == "XF" || curFlag == "FK" || curFlag == "JF") {
                jbr = "ywy";
            } else {
                jbr = "jbr";
            }
            var is_quotes = curJbr.substring(0, 1);
            if (is_quotes == "'") {
                realSql += " and a." + jbr + " in(" + curJbr + ")";
            } else {
                var tempspkh = self.GetQuotes(curJbr);
                realSql += " and a." + jbr + " in(" + tempspkh + ")";
            }
        }

        if (curZh.length > 0) {
            var zh = "";
            if (curFlag == "XS" || curFlag == "XF" || curFlag == "FK" || curFlag == "JF") {
                zh = "fyzh";
            } else {
                zh = "xjzh";
            }
            var is_quotes = curZh.substring(0, 1);
            if (is_quotes == "'") {
                realSql += " and a." + zh + " in(" + curZh + ")";
            } else {
                var tempspkh = self.GetQuotes(curZh);
                realSql += " and a." + zh + " in(" + tempspkh + ")";
            }
        }

        for (var i = 1; i <= dw_1.RowCount(); i++) {
            var curMcz = dw_1.GetItemString(i, "mcz");

            if (curMcz.length > 0) {
                var curBh = dw_1.GetItemString(i, "bh");
                var curTj = dw_1.GetItemString(i, "tj");
                //包含
                if (curTj == "1") {
                    if (curBh == "jzrq" || curBh == "jzsj" || curBh == "ywrq") {
                        realSql += " and ( convert(date,a." + curBh + ") like '%" + curMcz + "%')";
                    } else if (curBh != "je" || curBh != "fsje" || curBh != "bcyshk" || curBh != "bcyfhk" || curBh != "dfyf" || curBh != "bcsk" || curBh != "bcfk" || curBh != "yhje" || curBh != "dj" || curBh != "bzj" || curBh != "sl") {
                        realSql += " and ( UPPER(a." + curBh + ") like UPPER('%" + curMcz + "%'))";
                    }

                }
                //等于
                else if (curTj == "2") {
                    if (curBh == "jzrq" || curBh == "jzsj" || curBh == "ywrq") {
                        realSql += " and ( convert(date,a." + curBh + ")  = '" + curMcz + "')";
                    } else if (curBh == "je" || curBh == "fsje" || curBh == "bcyshk" || curBh == "bcyfhk" || curBh == "bcfk" || curBh == "dfyf" || curBh == "bcsk" || curBh == "yhje" || curBh == "dj" || curBh == "bzj" || curBh == "sl") {
                        realSql += " and ( a." + curBh + " = " + curMcz + ")";
                    } else {
                        realSql += " and ( UPPER(a." + curBh + ") = UPPER('" + curMcz + "'))";
                    }

                }
                //大于
                else if (curTj == "3") {
                    if (curBh == "jzrq" || curBh == "jzsj" || curBh == "ywrq") {
                        realSql += " and ( convert(date,a." + curBh + ") > '" + curMcz + "')";
                    } else if (curBh == "je" || curBh == "fsje" || curBh == "bcyshk" || curBh == "bcyfhk" || curBh == "bcfk" || curBh == "dfyf" || curBh == "bcsk" || curBh == "yhje" || curBh == "dj" || curBh == "bzj" || curBh == "sl") {
                        realSql += " and ( a." + curBh + " > " + curMcz + ")";
                    } else if (curBh != "pzh" && curBh != "bzxx" ) {
                        realSql += " and ( UPPER(a." + curBh + ") > UPPER('" + curMcz + "')）";
                    }

                }
                //小于
                else if (curTj == "4") {
                    if (curBh == "jzrq" || curBh == "jzsj" || curBh == "ywrq") {
                        realSql += " and ( convert(date,a." + curBh + ") <  '" + curMcz + "')";
                    } else if (curBh == "je" || curBh == "fsje" || curBh == "bcyshk" || curBh == "bcyfhk" || curBh == "bcfk" || curBh == "dfyf" || curBh == "bcsk" || curBh == "yhje" || curBh == "dj" || curBh == "bzj" || curBh == "sl") {
                        realSql += " and ( a." + curBh + " <" + curMcz + ")";
                    } else if (curBh != "pzh" && curBh != "bzxx" ) {
                        realSql += " and ( UPPER(a." + curBh + ") < UPPER('" + curMcz + "'))";
                    }

                }
                //大于等于
                else if (curTj == "5") {
                    if (curBh == "jzrq" || curBh == "jzsj" || curBh == "ywrq") {
                        realSql += " and ( convert(date,a." + curBh + ")  >= '" + curMcz + "')";
                    } else if (curBh == "je" || curBh == "fsje" || curBh == "bcyshk" || curBh == "bcyfhk" || curBh == "bcfk" || curBh == "dfyf" || curBh == "bcsk" || curBh == "yhje" || curBh == "dj" || curBh == "bzj" || curBh == "sl") {
                        realSql += " and ( a." + curBh + " >= " + curMcz + ")";
                    } else if (curBh != "pzh" && curBh != "bzxx" ) {
                        realSql += " and ( UPPER(a." + curBh + ") >= UPPER('" + curMcz + "'))";
                    }

                }
                //小于等于
                else if (curTj == "6") {
                    if (curBh == "jzrq" || curBh == "jzsj" || curBh == "ywrq") {
                        realSql += " and ( convert(date,a." + curBh + ") <= '" + curMcz + "')";
                    } else if (curBh == "je" || curBh == "fsje" || curBh == "bcyshk" || curBh == "bcyfhk" || curBh == "bcfk" || curBh == "dfyf" || curBh == "bcsk" || curBh == "yhje" || curBh == "dj" || curBh == "bzj" || curBh == "sl") {
                        realSql += " and ( a." + curBh + " <=" + curMcz + ")";
                    } else if (curBh != "pzh" && curBh != "bzxx" ) {
                        realSql += " and ( UPPER(a." + curBh + ") <= UPPER('" + curMcz + "'))";
                    }
                }
            }
        }

        return realSql;
    }
    //#endregion

    //#region 处理引号的问题
    this.GetQuotes = function (curValue) {
        var temp1 = curValue.split(",")
        var ret_Value = "";
        for (var i = 0; i < temp1.length; i++) {
            if (ret_Value.length > 0) {
                ret_Value += "'" + temp1[i] + "',";
            }
            else {
                ret_Value = "'" + temp1[i] + "',"
            }
        }
        return ret_Value.substr(0, ret_Value.length - 1);
    }
    //#endregion

    //#region Function 呼出数据窗口的函数群 

    this.Changebmbh = function (x, y, row, dwoName) {
        dwoName == "bmbh";
        curW_OPEN_BMDA_NEW.SetDataWindow(self, "bmbh", "bmmc", "M", self)  // 这个用来给子窗口Set当前数据窗口
        requestor.Open(encodeURI("/Service/LoadWindow.ashx?WinName=A8ERP.DangAn.Base." + curW_OPEN_BMDA_URL + "&treeDw=dw_da_bmda_fl_tree&listDw=dw_pub_list_bmda&treeRootLabel=部门分类&treeData=flbh&treeLabel=flmc&treeParentData=fflbh&treeLeave=islast&selectStyle=multiple&curQxlx=cw"), curW_OPEN_BMDA_NEW, null);
    }

    this.Changeskfs = function (x, y, row, dwoName) {
        dwoName == "skfs";
        curW_OPEN_SIMPLE_CHOSE.SetDataWindow(self, "skfs", "skmc", "M", self)  // 这个用来给子窗口Set当前数据窗口
        if (curFlag == "TT") {
            requestor.Open(encodeURI("/Service/LoadWindow.ashx?WinName=A8ERP.DangAn.Base.OpenWindowSimpleChoseBase&listDw=dw_pub_list_qj_csb_tzlx&selectStyle=multiple"), curW_OPEN_SIMPLE_CHOSE, null);
        } else {
            requestor.Open(encodeURI("/Service/LoadWindow.ashx?WinName=A8ERP.DangAn.Base.OpenWindowSimpleChoseBase&listDw=dw_pub_list_qj_csb_skfs&selectStyle=multiple"), curW_OPEN_SIMPLE_CHOSE, null);
        }
    }

    this.Changekhorgys = function (x, y, row, dwoName) {
        if (curFlag == "XS" || curFlag == "XF") {
            dwoName == "khbh";
            curW_OPEN_BMDA_NEW.SetDataWindow(self, "khbh", "khmc", "M", self)  // 这个用来给子窗口Set当前数据窗口
            requestor.Open(encodeURI("/Service/LoadWindow.ashx?WinName=A8ERP.DangAn.Base." + curW_OPEN_BMDA_URL + "&treeDw=dw_da_khda_fl_tree&listDw=dw_pub_khda_list_all&treeRootLabel=客户分类&treeData=flbh&treeLabel=flmc&treeParentData=fflbh&treeLeave=islast&selectStyle=multiple"), curW_OPEN_BMDA_NEW, null);   
        } else if (curFlag == "FK" || curFlag == "JF") {
            dwoName == "gysbh";
            curW_OPEN_BMDA_NEW.SetDataWindow(self, "gysbh", "gysmc", "M", self)  // 这个用来给子窗口Set当前数据窗口
            requestor.Open(encodeURI("/Service/LoadWindow.ashx?WinName=A8ERP.DangAn.Base." + curW_OPEN_BMDA_URL + "&treeDw=dw_da_gysda_fl_tree&listDw=dw_pub_list_gysda&treeRootLabel=供应商分类&treeData=flbh&treeLabel=flmc&treeParentData=fflbh&treeLeave=islast&selectStyle=multiple"), curW_OPEN_BMDA_NEW, null);   
        }
    }

    //记账人
    this.Changejzr = function (x, y, row, dwoName) {
        dwoName == "ygbh";
        curW_OPEN_BMDA.SetDataWindow(self, "ygbh", "ygmc", "M", self)
        requestor.Open(encodeURI("/Service/LoadWindow.ashx?WinName=A8ERP.DangAn.Base.OpenWindowQueryBase&treeDw=dw_da_ryda_zw_tree&listDw=dw_pub_ygda_list_cx&treeRootLabel=职务分类&treeData=csbh&treeLabel=csmc&treeParentData=fcsbh&treeLeave=islast&selectStyle=multiple&flag=cw"), curW_OPEN_BMDA, null);
    }
    //经办人
    this.Changejbr = function (x, y, row, dwoName) {
        dwoName == "jbr";
        curW_OPEN_BMDA.SetDataWindow(self, "ygbh", "ygmc", "YG", self, "jbr")
        requestor.Open(encodeURI("/Service/LoadWindow.ashx?WinName=A8ERP.DangAn.Base.OpenWindowQueryBase&treeDw=dw_da_ryda_zw_tree&listDw=dw_pub_ygda_list_cx&treeRootLabel=职务分类&treeData=csbh&treeLabel=csmc&treeParentData=fcsbh&treeLeave=islast&selectStyle=multiple&flag=cw"), curW_OPEN_BMDA, null);
    }
    //#endregion

    //#region 选中后赋值

    this.SetSleValue = function (difBh, val) {
        if ("''" == val)
            val = "";

        if ("bmbh" == difBh)
            sle_bm.SetText(val);
        else if ("skfs" == difBh)
            sle_skfs.SetText(val);
        else if ("ygbh" == difBh)
            sle_jzr.SetText(val);
        else if ("jbr" == difBh)
            sle_jbr.SetText(val);
        else if ("khbh" == difBh || "gysbh" == difBh)
            sle_khorgys.SetText(val);
    }

    //#endregion

    this.Cancel = function () {
        requestor.Close();
    }

    this.GetColoumName = function () {
        var colCount = curParentDw.Describe("DataWindow.Column.Count");
        var value = "";
        for (var li_loop1 = 1; li_loop1 <= colCount; li_loop1++) {
            var ls_columnname = curParentDw.Describe('#' + String(li_loop1) + '.name');
            var ls_columnname_t = curParentDw.Describe(ls_columnname + "_t.text");
          
            if (ls_columnname != "kdrq" && ls_columnname != "rq" && ls_columnname != "kdsj" && ls_columnname != "jzbz" && ls_columnname != "je" && ls_columnname != "zhbz" && ls_columnname != "sdjy" && ls_columnname != "ljye" && ls_columnname != "sm" && ls_columnname != "bmbh"
                && ls_columnname != "bmmc" && ls_columnname != "khbh" && ls_columnname != "khmc" && ls_columnname != "gysbh" && ls_columnname != "gysmc" && ls_columnname != "jbr" && ls_columnname != "jzr" && ls_columnname != "jzrm" && ls_columnname != "skfs"
                && ls_columnname != "fkfs" && ls_columnname != "fhjb" && ls_columnname != "fhmc" && ls_columnname != "dqzt" && ls_columnname != "tzlx") {
                var curRows = dw_1.InsertRow(0);
                dw_1.SetItem(curRows, "bh", ls_columnname);
                dw_1.SetItem(curRows, "mc", ls_columnname_t);
            }
        }
        //var curRq_y = 550;
        //for (var i = 1; i <= dw_1.RowCount(); i++) {
        //    curRq_y += 76;
        //    if (dw_1.GetItemString(i, "bh") == "jzrq" || dw_1.GetItemString(i, "bh") == "jzsj") {

        //        break;
        //    }
        //}

        //st_rqgs.SetY(curRq_y);
        st_rqgs.SetText("日期格式如:" + UtcDateFormatToString(new Date().getVarDate()));
    }
 }