$PBExportHeader$w_rp_sale_saletask_lljg.srw forward global type w_rp_sale_saletask_lljg from w_publ_easyq end type type ddlb_retrstatus from dropdownlistbox within w_rp_sale_saletask_lljg end type type ddlb_1 from dropdownlistbox within w_rp_sale_saletask_lljg end type type ddlb_scid from uo_ddlb_scid within w_rp_sale_saletask_lljg end type type ddlb_2 from dropdownlistbox within w_rp_sale_saletask_lljg end type end forward global type w_rp_sale_saletask_lljg from w_publ_easyq string title = "来料加工订单统计表" ddlb_retrstatus ddlb_retrstatus ddlb_1 ddlb_1 ddlb_scid ddlb_scid ddlb_2 ddlb_2 end type global w_rp_sale_saletask_lljg w_rp_sale_saletask_lljg type variables int cur_status = 0 //当前查询订单状态// -1 所有 int cur_stattype = 0 long cur_scid_arr[] end variables on w_rp_sale_saletask_lljg.create int iCurrent call super::create this.ddlb_retrstatus=create ddlb_retrstatus this.ddlb_1=create ddlb_1 this.ddlb_scid=create ddlb_scid this.ddlb_2=create ddlb_2 iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.ddlb_retrstatus this.Control[iCurrent+2]=this.ddlb_1 this.Control[iCurrent+3]=this.ddlb_scid this.Control[iCurrent+4]=this.ddlb_2 end on on w_rp_sale_saletask_lljg.destroy call super::destroy destroy(this.ddlb_retrstatus) destroy(this.ddlb_1) destroy(this.ddlb_scid) destroy(this.ddlb_2) end on event ue_before_openretrieve;call super::ue_before_openretrieve;s_hide_col s_col_mtrlsectype s_col_mtrlsectype.col_1 = 'u_mtrldef_mtrlsectype' f_hide_col(1308,dw_1,s_col_mtrlsectype) s_hide_col s_col_zxmtrlmode s_col_zxmtrlmode.col_1 = 'u_mtrldef_zxmtrlmode' f_hide_col(1309,dw_1,s_col_zxmtrlmode) end event type cb_func from w_publ_easyq`cb_func within w_rp_sale_saletask_lljg end type type cb_exit from w_publ_easyq`cb_exit within w_rp_sale_saletask_lljg end type type cb_2 from w_publ_easyq`cb_2 within w_rp_sale_saletask_lljg boolean bringtotop = true end type type cb_psetup from w_publ_easyq`cb_psetup within w_rp_sale_saletask_lljg boolean bringtotop = true end type type cb_1 from w_publ_easyq`cb_1 within w_rp_sale_saletask_lljg boolean bringtotop = true end type event cb_1::clicked;call super::clicked;datetime firstdate,enddate firstdate = DATEtime(date(EM_1.TEXT),time(0)) enddate = datetime(date(EM_2.TEXT),time('23:59:59')) f_title_change(dw_1) dw_1.Retrieve(cur_scid_arr,cur_status,cur_stattype,firstdate,enddate,sys_areaid) end event type st_3 from w_publ_easyq`st_3 within w_rp_sale_saletask_lljg integer x = 1408 integer width = 114 string text = "从:" alignment alignment = left! end type type st_4 from w_publ_easyq`st_4 within w_rp_sale_saletask_lljg integer x = 1989 end type type em_1 from w_publ_easyq`em_1 within w_rp_sale_saletask_lljg integer x = 1486 end type type em_2 from w_publ_easyq`em_2 within w_rp_sale_saletask_lljg integer x = 2089 end type type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_sale_saletask_lljg integer x = 1664 integer y = 4 end type type cbx_yl from w_publ_easyq`cbx_yl within w_rp_sale_saletask_lljg integer x = 1454 integer y = 8 end type type dw_1 from w_publ_easyq`dw_1 within w_rp_sale_saletask_lljg integer y = 300 integer width = 2967 string dataobject = "dw_rp_sale_saletask_lljg" end type event dw_1::doubleclicked;call super::doubleclicked;IF dw_1.DataObject = 'dw_rp_sale_saletask_lljg' THEN IF row > 0 THEN String ls_code Long ll_scid ll_scid = THIS.Object.u_saletask_scid[row] ls_code = THIS.Object.u_saletask_taskcode[row] f_open_win(ll_scid,ls_code) END IF END IF end event type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_sale_saletask_lljg end type type sle_cust from w_publ_easyq`sle_cust within w_rp_sale_saletask_lljg end type type st_mtrl from w_publ_easyq`st_mtrl within w_rp_sale_saletask_lljg end type type st_cust from w_publ_easyq`st_cust within w_rp_sale_saletask_lljg end type type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_sale_saletask_lljg boolean visible = true integer x = 1454 end type type pb_em1 from w_publ_easyq`pb_em1 within w_rp_sale_saletask_lljg integer x = 1897 end type type pb_em2 from w_publ_easyq`pb_em2 within w_rp_sale_saletask_lljg integer x = 2501 end type type pb_2 from w_publ_easyq`pb_2 within w_rp_sale_saletask_lljg integer x = 2610 end type type cb_help from w_publ_easyq`cb_help within w_rp_sale_saletask_lljg end type type cb_copyself from w_publ_easyq`cb_copyself within w_rp_sale_saletask_lljg end type type gb_1 from w_publ_easyq`gb_1 within w_rp_sale_saletask_lljg end type type ln_bar from w_publ_easyq`ln_bar within w_rp_sale_saletask_lljg end type type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_sale_saletask_lljg end type type r_bar from w_publ_easyq`r_bar within w_rp_sale_saletask_lljg end type type ln_1 from w_publ_easyq`ln_1 within w_rp_sale_saletask_lljg end type type ln_2 from w_publ_easyq`ln_2 within w_rp_sale_saletask_lljg end type type ln_3 from w_publ_easyq`ln_3 within w_rp_sale_saletask_lljg end type type ln_4 from w_publ_easyq`ln_4 within w_rp_sale_saletask_lljg end type type ddlb_retrstatus from dropdownlistbox within w_rp_sale_saletask_lljg integer x = 571 integer y = 196 integer width = 379 integer height = 856 integer taborder = 50 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 string text = "待审批" boolean sorted = false boolean vscrollbar = true string item[] = {"待审批","在进行","已暂停","已终止","已完成","[所有]"} borderstyle borderstyle = stylelowered! end type event constructor;cur_status=long(f_ProfileString (sys_empid, "saletask", "status", "-1")) choose case cur_status case 0 ddlb_retrstatus.text="待审核" case 1 ddlb_retrstatus.text="在进行" case 2 ddlb_retrstatus.text="已暂停" case 3 ddlb_retrstatus.text="已终止" case 5 ddlb_retrstatus.text="已完成" case -1 ddlb_retrstatus.text="[所有]" end choose end event event selectionchanged;choose case index case 1 //待销售审批 cur_status=0 case 2 //在进行 cur_status=1 case 3 //'已暂停' cur_status=2 case 4 //'已终止' cur_status=3 case 5 //'已完成' cur_status=5 case else cur_status= -1 end choose cb_1.triggerevent(clicked!) end event type ddlb_1 from dropdownlistbox within w_rp_sale_saletask_lljg integer x = 974 integer y = 196 integer width = 416 integer height = 300 integer taborder = 110 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 string text = "按订货日期" boolean sorted = false string item[] = {"按订货日期","按交货日期"} borderstyle borderstyle = stylelowered! end type event selectionchanged;if this.text = '按订货日期' then cur_stattype = 0 else cur_stattype = 1 end if end event type ddlb_scid from uo_ddlb_scid within w_rp_sale_saletask_lljg integer y = 196 integer width = 549 integer height = 620 integer taborder = 90 boolean bringtotop = true end type event constructor;call super::constructor;cur_scid_arr = THIS.uo_scid_arr end event event selectionchanged;call super::selectionchanged; cur_scid_arr = THIS.uo_scid_arr cb_1.triggerevent(clicked!) end event type ddlb_2 from dropdownlistbox within w_rp_sale_saletask_lljg integer x = 2053 integer y = 36 integer width = 549 integer height = 460 integer taborder = 70 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 string text = "明细表" string item[] = {"明细表","汇总表[产品]","汇总表[客户-产品]"} borderstyle borderstyle = stylelowered! end type event selectionchanged;dw_1.uf_save_profile_layout() if ddlb_2.text = '明细表' then dw_1.dataobject = 'dw_rp_sale_saletask' elseif ddlb_2.text = '汇总表[产品]' then dw_1.dataobject = 'dw_rp_sale_saletask_hz' else dw_1.dataobject = 'dw_rp_sale_saletask_hz_cust' end if dw_1.settransobject(sqlca) dw_1.ins_INIfile_name = sys_inifilename dw_1.ins_opemp = publ_operator dw_1.cardw_empid = sys_empid dw_1.cur_DataObject = dw_1.DataObject dw_1.uf_read_profile_layout() cb_1.triggerevent(clicked!) end event