$PBExportHeader$w_main.srw forward global type w_main from w_publ_base_style end type type cb_1 from uo_imflatbutton within w_main end type type cb_2 from uo_imflatbutton within w_main end type type cb_3 from uo_imflatbutton within w_main end type type cb_4 from uo_imflatbutton within w_main end type type cb_5 from commandbutton within w_main end type type cb_6 from commandbutton within w_main end type type cb_7 from commandbutton within w_main end type type cb_18 from commandbutton within w_main end type type cb_19 from commandbutton within w_main end type type p_1 from picture within w_main end type type p_2 from picture within w_main end type type p_3 from picture within w_main end type type st_web from statictext within w_main end type type st_help from statictext within w_main end type type st_about from statictext within w_main end type type p_web from picture within w_main end type type p_help from picture within w_main end type type tab_1 from tab within w_main end type type tabpage_7 from userobject within tab_1 end type type uo_7 from uo_task_detail within tabpage_7 end type type uo_7 from uo_task_detail within tabpage_7 end type type dw_7 from u_dw_rbtnfilter within tabpage_7 end type type tabpage_7 from userobject within tab_1 uo_7 uo_7 dw_7 dw_7 end type type tabpage_3 from userobject within tab_1 end type type uo_3 from uo_task_detail within tabpage_3 end type type uo_3 from uo_task_detail within tabpage_3 end type type dw_3 from u_dw_rbtnfilter within tabpage_3 end type type tabpage_3 from userobject within tab_1 uo_3 uo_3 dw_3 dw_3 end type type tabpage_1 from userobject within tab_1 end type type uo_1 from uo_task_detail within tabpage_1 end type type uo_1 from uo_task_detail within tabpage_1 end type type dw_1 from u_dw_rbtnfilter within tabpage_1 end type type tabpage_1 from userobject within tab_1 uo_1 uo_1 dw_1 dw_1 end type type tabpage_8 from userobject within tab_1 end type type uo_8 from uo_task_detail within tabpage_8 end type type uo_8 from uo_task_detail within tabpage_8 end type type dw_8 from u_dw_rbtnfilter within tabpage_8 end type type tabpage_8 from userobject within tab_1 uo_8 uo_8 dw_8 dw_8 end type type tabpage_9 from userobject within tab_1 end type type uo_9 from uo_task_detail within tabpage_9 end type type uo_9 from uo_task_detail within tabpage_9 end type type dw_9 from u_dw_rbtnfilter within tabpage_9 end type type tabpage_9 from userobject within tab_1 uo_9 uo_9 dw_9 dw_9 end type type tabpage_10 from userobject within tab_1 end type type uo_10 from uo_task_detail within tabpage_10 end type type uo_10 from uo_task_detail within tabpage_10 end type type dw_10 from u_dw_rbtnfilter within tabpage_10 end type type tabpage_10 from userobject within tab_1 uo_10 uo_10 dw_10 dw_10 end type type tabpage_2 from userobject within tab_1 end type type uo_2 from uo_task_detail within tabpage_2 end type type uo_2 from uo_task_detail within tabpage_2 end type type dw_2 from u_dw_rbtnfilter within tabpage_2 end type type tabpage_2 from userobject within tab_1 uo_2 uo_2 dw_2 dw_2 end type type tabpage_4 from userobject within tab_1 end type type uo_4 from uo_task_detail within tabpage_4 end type type uo_4 from uo_task_detail within tabpage_4 end type type dw_4 from u_dw_rbtnfilter within tabpage_4 end type type tabpage_4 from userobject within tab_1 uo_4 uo_4 dw_4 dw_4 end type type tabpage_5 from userobject within tab_1 end type type uo_5 from uo_task_detail within tabpage_5 end type type uo_5 from uo_task_detail within tabpage_5 end type type cb_20 from commandbutton within tabpage_5 end type type dw_5 from u_dw_rbtnfilter within tabpage_5 end type type tabpage_5 from userobject within tab_1 uo_5 uo_5 cb_20 cb_20 dw_5 dw_5 end type type tabpage_6 from userobject within tab_1 end type type ddlb_1 from dropdownlistbox within tabpage_6 end type type st_2 from statictext within tabpage_6 end type type sle_1 from singlelineedit within tabpage_6 end type type st_1 from statictext within tabpage_6 end type type uo_6 from uo_task_detail within tabpage_6 end type type uo_6 from uo_task_detail within tabpage_6 end type type dw_6 from u_dw_rbtnfilter within tabpage_6 end type type pb_2 from picturebutton within tabpage_6 end type type pb_em2 from picturebutton within tabpage_6 end type type pb_em1 from picturebutton within tabpage_6 end type type em_2 from editmask within tabpage_6 end type type em_1 from editmask within tabpage_6 end type type st_4 from statictext within tabpage_6 end type type st_3 from statictext within tabpage_6 end type type tabpage_6 from userobject within tab_1 ddlb_1 ddlb_1 st_2 st_2 sle_1 sle_1 st_1 st_1 uo_6 uo_6 dw_6 dw_6 pb_2 pb_2 pb_em2 pb_em2 pb_em1 pb_em1 em_2 em_2 em_1 em_1 st_4 st_4 st_3 st_3 end type type tab_1 from tab within w_main tabpage_7 tabpage_7 tabpage_3 tabpage_3 tabpage_1 tabpage_1 tabpage_8 tabpage_8 tabpage_9 tabpage_9 tabpage_10 tabpage_10 tabpage_2 tabpage_2 tabpage_4 tabpage_4 tabpage_5 tabpage_5 tabpage_6 tabpage_6 end type end forward global type w_main from w_publ_base_style integer width = 4261 integer height = 2008 string title = "圣萝莎门店管理系统v1.0" boolean maxbox = true boolean resizable = true windowtype windowtype = main! windowstate windowstate = maximized! long backcolor = 16777215 event ue_childclose ( ) event ue_retrieve_cur ( ) event ue_date1 ( ) event ue_date2 ( ) event ue_date3 ( ) cb_1 cb_1 cb_2 cb_2 cb_3 cb_3 cb_4 cb_4 cb_5 cb_5 cb_6 cb_6 cb_7 cb_7 cb_18 cb_18 cb_19 cb_19 p_1 p_1 p_2 p_2 p_3 p_3 st_web st_web st_help st_help st_about st_about p_web p_web p_help p_help tab_1 tab_1 end type global w_main w_main type variables userobject pages[] datawindow dws[] uo_task_detail uos[] datawindow cur_dw boolean ins_opened = false end variables forward prototypes public subroutine wf_face () public subroutine wf_retrieve (long arg_tab) public subroutine wf_getcount () public function integer days_in_month (integer month, integer year) public subroutine wf_showrow (long row) end prototypes event ue_childclose();if not tab_1.Visible then tab_1.triggerevent('ue_show') end if this.postevent('ue_retrieve_cur') end event event ue_retrieve_cur();wf_getcount() wf_retrieve(tab_1.SelectedTab) end event event ue_date1();//IF THIS.Text = "本日" THEN tab_1.tabpage_6.em_1.text = string(today(),"yyyy-mm-dd") tab_1.tabpage_6.em_2.text = string(today(),"yyyy-mm-dd") //ELSEIF THIS.Text = "本周" THEN // int li_DayNum // li_DayNum = DayNumber(today()) // em_1.text = string(RelativeDate ( today(), 1 - li_DayNum ),"yyyy-mm-dd") // em_2.text = string(RelativeDate ( today(), 7 - li_DayNum ),"yyyy-mm-dd") //ELSEIF THIS.Text = "本月" THEN // int li_Month, li_Year, li_Days // li_Month = Month(today()) // li_Year = Year(today()) // li_Days = days_in_month(li_Month, li_Year) // em_1.text = string(Date(li_Year, li_Month, 1),"yyyy-mm-dd") // em_2.text = string(Date(li_Year, li_Month, li_Days),"yyyy-mm-dd") //END IF end event event ue_date2();//IF THIS.Text = "本日" THEN // em_1.text = string(today(),"yyyy-mm-dd") // em_2.text = string(today(),"yyyy-mm-dd") //ELSEIF THIS.Text = "本周" THEN int li_DayNum li_DayNum = DayNumber(today()) tab_1.tabpage_6.em_1.text = string(RelativeDate ( today(), 1 - li_DayNum ),"yyyy-mm-dd") tab_1.tabpage_6.em_2.text = string(RelativeDate ( today(), 7 - li_DayNum ),"yyyy-mm-dd") //ELSEIF THIS.Text = "本月" THEN // int li_Month, li_Year, li_Days // li_Month = Month(today()) // li_Year = Year(today()) // li_Days = days_in_month(li_Month, li_Year) // em_1.text = string(Date(li_Year, li_Month, 1),"yyyy-mm-dd") // em_2.text = string(Date(li_Year, li_Month, li_Days),"yyyy-mm-dd") //END IF end event event ue_date3();//IF THIS.Text = "本日" THEN // em_1.text = string(today(),"yyyy-mm-dd") // em_2.text = string(today(),"yyyy-mm-dd") //ELSEIF THIS.Text = "本周" THEN // int li_DayNum // li_DayNum = DayNumber(today()) // em_1.text = string(RelativeDate ( today(), 1 - li_DayNum ),"yyyy-mm-dd") // em_2.text = string(RelativeDate ( today(), 7 - li_DayNum ),"yyyy-mm-dd") //ELSEIF THIS.Text = "本月" THEN int li_Month, li_Year, li_Days li_Month = Month(today()) li_Year = Year(today()) li_Days = days_in_month(li_Month, li_Year) tab_1.tabpage_6.em_1.text = string(Date(li_Year, li_Month, 1),"yyyy-mm-dd") tab_1.tabpage_6.em_2.text = string(Date(li_Year, li_Month, li_Days),"yyyy-mm-dd") //END IF end event public subroutine wf_face (); end subroutine public subroutine wf_retrieve (long arg_tab);DateTime ld_begin, ld_end arg_tab = long(tab_1.Control[arg_tab].tag) //MessageBox('', string(arg_tab)) oleobject reqparms, tasks reqparms = AppCom.CreatePbDictionary() reqparms.SetString("token", app_token) reqparms.SetInt("status", arg_tab - 1) //reqparms.SetInt("cusid", 0) IF arg_tab = 6 THEN CHOOSE CASE tab_1.tabpage_6.ddlb_1.Text CASE '待询价' reqparms.SetInt("status", 0) CASE '已报价' reqparms.SetInt("status", 1) CASE '已退回' reqparms.SetInt("status", 2) CASE '已下单' reqparms.SetInt("status", 3) CASE '已发货' reqparms.SetInt("status", 4) CASE '已收货' reqparms.SetInt("status", 5) CASE ELSE reqparms.SetInt("status", "-1") END CHOOSE reqparms.SetString("querystr", tab_1.tabpage_6.sle_1.Text) ld_begin = DateTime(Date(tab_1.tabpage_6.em_1.Text), Time(0)) ld_end = DateTime(Date(tab_1.tabpage_6.em_2.Text), Time("23:59:59")) reqparms.SetDateTime("begin", ld_begin) reqparms.SetDateTime("end", ld_end) END IF String arg_msg = '' tasks = AppCom.GetTasks(reqparms, Ref arg_msg) IF arg_msg <> '' THEN MessageBox('ERROR', arg_msg) RETURN END IF datawindow cur_dw cur_dw = dws[arg_tab] cur_dw.Reset() cur_dw.SetRedraw(False) Long ll_cnt, row, i oleobject task ll_cnt = tasks.Count FOR i = 1 To ll_cnt task = tasks.GetItem(i - 1) row = cur_dw.InsertRow(0) cur_dw.SetItem(row, 'taskid', task.GetInt('taskid')) cur_dw.SetItem(row, 'tid', task.GetString('tid')) cur_dw.SetItem(row, 'taskdate', task.GetDateTime('taskdate')) cur_dw.SetItem(row, 'cusid', task.GetInt('cusid')) cur_dw.SetItem(row, 'cus_rep', task.GetString('cus_rep')) cur_dw.SetItem(row, 'cus_tele', task.GetString('cus_tele')) cur_dw.SetItem(row, 'cus_address', task.GetString('cus_address')) cur_dw.SetItem(row, 'freight', task.GetString('freight')) cur_dw.SetItem(row, 'freight_tele', task.GetString('freight_tele')) cur_dw.SetItem(row, 'opemp', task.GetString('opemp')) cur_dw.SetItem(row, 'opdate', task.GetDateTime('opdate')) cur_dw.SetItem(row, 'modemp', task.GetString('modemp')) cur_dw.SetItem(row, 'moddate', task.GetDateTime('moddate')) cur_dw.SetItem(row, 'buyer_name', task.GetString('buyer_name')) cur_dw.SetItem(row, 'buyer_tele', task.GetString('buyer_tele')) cur_dw.SetItem(row, 'requiredate', task.GetDateTime('requiredate')) cur_dw.SetItem(row, 'temp1', task.GetString('temp1')) cur_dw.SetItem(row, 'temp2', task.GetString('temp2')) cur_dw.SetItem(row, 'temp3', task.GetString('temp3')) cur_dw.SetItem(row, 'temp4', task.GetString('temp4')) cur_dw.SetItem(row, 'temp5', task.GetString('temp5')) cur_dw.SetItem(row, 'temp6', task.GetString('temp6')) cur_dw.SetItem(row, 'price_emp', task.GetString('price_emp')) cur_dw.SetItem(row, 'replyrqdate', task.GetDateTime('replyrqdate')) cur_dw.SetItem(row, 'confirmemp', task.GetString('confirmemp')) cur_dw.SetItem(row, 'confirmdate', task.GetDateTime('confirmdate')) cur_dw.SetItem(row, 'status', task.GetInt('status')) cur_dw.SetItem(row, 'fstatus', task.GetInt('fstatus')) cur_dw.SetItem(row, 'ifexcelerr', task.GetInt('ifexcelerr')) cur_dw.SetItem(row, 'taskcode', task.GetString('taskcode')) cur_dw.SetItem(row, 'outwarecode', task.GetString('outwarecode')) cur_dw.SetItem(row, 'replydscrp', task.GetString('replydscrp')) cur_dw.SetItem(row, 'replydate', task.GetDateTime('replydate')) cur_dw.SetItem(row, 'cuscode', task.GetString('cuscode')) cur_dw.SetItem(row, 'cusname', task.GetString('cusname')) NEXT cur_dw.SetRedraw(True) cur_dw.Trigger Event RowFocusChanged(cur_dw.GetRow()) end subroutine public subroutine wf_getcount ();oleobject dict String arg_msg dict = AppCom.GetTaskCount(app_token, Ref arg_msg) IF arg_msg <> '' THEN MessageBox('ERROR', arg_msg) RETURN END IF // DONE: 获取每项的数量并显示 String ls_txt Long ll_pos Long i userobject cur_page FOR i = 1 To 10 IF i = 6 THEN CONTINUE cur_page = pages[i] ls_txt = cur_page.Text ll_pos = Pos(ls_txt,'(') IF ll_pos > 0 THEN ls_txt = Mid(ls_txt, 1, ll_pos - 1) END IF cur_page.Text = ls_txt + "(" + String(dict.GetInt('cnt' + String(i - 1))) + ")" NEXT end subroutine public function integer days_in_month (integer month, integer year);//Most cases are straight forward in that there are a fixed number of //days in 11 of the 12 months. February is, of course, the problem. //In a leap year February has 29 days, otherwise 28. Integer li_DaysInMonth, li_Days[12] = {31,28,31,30,31,30,31,31,30,31,30,31} // Get the number of days per month for a non leap year. li_DaysInMonth = li_Days[Month] // Check for a leap year. If Month = 2 Then // If the year is a leap year, change the number of days. // Leap Year Calculation: // Year divisible by 4, but not by 100, unless it is also divisible by 400 If ( (Mod(Year,4) = 0 And Mod(Year,100) <> 0) Or (Mod(Year,400) = 0) ) Then li_DaysInMonth = 29 End If End If //Return the number of days in the relevant month Return li_DaysInMonth end function public subroutine wf_showrow (long row); if isnull(cur_dw) then return oleobject lo_dict lo_dict = AppCom.CreatePbDictionary() lo_dict.SetInt('taskid', cur_dw.Object.taskid[row]) lo_dict.SetString('tid', cur_dw.Object.tid[row]) lo_dict.SetDateTime('taskdate', cur_dw.Object.taskdate[row]) lo_dict.SetInt('cusid', cur_dw.Object.cusid[row]) lo_dict.SetString('cus_rep', cur_dw.Object.cus_rep[row]) lo_dict.SetString('cus_tele', cur_dw.Object.cus_tele[row]) lo_dict.SetString('cus_address', cur_dw.Object.cus_address[row]) lo_dict.SetString('freight', cur_dw.Object.freight[row]) lo_dict.SetString('freight_tele', cur_dw.Object.freight_tele[row]) lo_dict.SetString('opemp', cur_dw.Object.opemp[row]) lo_dict.SetDateTime('opdate', cur_dw.Object.opdate[row]) lo_dict.SetString('modemp', cur_dw.Object.modemp[row]) lo_dict.SetDateTime('moddate', cur_dw.Object.moddate[row]) lo_dict.SetString('buyer_name', cur_dw.Object.buyer_name[row]) lo_dict.SetString('buyer_tele', cur_dw.Object.buyer_tele[row]) lo_dict.SetDateTime('requiredate', cur_dw.Object.requiredate[row]) lo_dict.SetString('temp1', cur_dw.Object.temp1[row]) lo_dict.SetString('temp2', cur_dw.Object.temp2[row]) lo_dict.SetString('temp3', cur_dw.Object.temp3[row]) lo_dict.SetString('temp4', cur_dw.Object.temp4[row]) lo_dict.SetString('temp5', cur_dw.Object.temp5[row]) lo_dict.SetString('temp6', cur_dw.Object.temp6[row]) lo_dict.SetString('price_emp', cur_dw.Object.price_emp[row]) lo_dict.SetDateTime('replyrqdate', cur_dw.Object.replyrqdate[row]) lo_dict.SetString('confirmemp', cur_dw.Object.confirmemp[row]) lo_dict.SetDateTime('confirmdate', cur_dw.Object.confirmdate[row]) lo_dict.SetInt('status', cur_dw.Object.status[row]) lo_dict.SetInt('fstatus', cur_dw.Object.fstatus[row]) lo_dict.SetInt('ifexcelerr', cur_dw.Object.ifexcelerr[row]) lo_dict.SetString('taskcode', cur_dw.Object.taskcode[row]) lo_dict.SetString('outwarecode', cur_dw.Object.outwarecode[row]) lo_dict.SetString('replydscrp', cur_dw.Object.replydscrp[row]) lo_dict.SetDateTime('replydate', cur_dw.Object.replydate[row]) lo_dict.SetString('cuscode', cur_dw.Object.cuscode[row]) lo_dict.SetString('cusname', cur_dw.Object.cusname[row]) OpenWithParm(w_saletask_audit, lo_dict) end subroutine on w_main.create int iCurrent call super::create this.cb_1=create cb_1 this.cb_2=create cb_2 this.cb_3=create cb_3 this.cb_4=create cb_4 this.cb_5=create cb_5 this.cb_6=create cb_6 this.cb_7=create cb_7 this.cb_18=create cb_18 this.cb_19=create cb_19 this.p_1=create p_1 this.p_2=create p_2 this.p_3=create p_3 this.st_web=create st_web this.st_help=create st_help this.st_about=create st_about this.p_web=create p_web this.p_help=create p_help this.tab_1=create tab_1 iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.cb_1 this.Control[iCurrent+2]=this.cb_2 this.Control[iCurrent+3]=this.cb_3 this.Control[iCurrent+4]=this.cb_4 this.Control[iCurrent+5]=this.cb_5 this.Control[iCurrent+6]=this.cb_6 this.Control[iCurrent+7]=this.cb_7 this.Control[iCurrent+8]=this.cb_18 this.Control[iCurrent+9]=this.cb_19 this.Control[iCurrent+10]=this.p_1 this.Control[iCurrent+11]=this.p_2 this.Control[iCurrent+12]=this.p_3 this.Control[iCurrent+13]=this.st_web this.Control[iCurrent+14]=this.st_help this.Control[iCurrent+15]=this.st_about this.Control[iCurrent+16]=this.p_web this.Control[iCurrent+17]=this.p_help this.Control[iCurrent+18]=this.tab_1 end on on w_main.destroy call super::destroy destroy(this.cb_1) destroy(this.cb_2) destroy(this.cb_3) destroy(this.cb_4) destroy(this.cb_5) destroy(this.cb_6) destroy(this.cb_7) destroy(this.cb_18) destroy(this.cb_19) destroy(this.p_1) destroy(this.p_2) destroy(this.p_3) destroy(this.st_web) destroy(this.st_help) destroy(this.st_about) destroy(this.p_web) destroy(this.p_help) destroy(this.tab_1) end on event resize;call super::resize;IF Not ins_opened THEN RETURN Long w_width,w_height w_width = 4681 w_height = 2600 IF newwidth < w_width THEN This.Width = w_width IF newheight < w_height THEN This.Height = w_height p_3.X = This.WorkSpaceWidth() - p_3.Width p_2.Width = p_3.X - p_2.X p_web.X = p_3.X + 2674 - 2354 st_web.X = p_3.X + 2757 - 2354 p_help.X = p_3.X + 2949 - 2354 st_help.X = p_3.X + 3035 - 2354 st_about.X = p_3.X + 3314 - 2354 tab_1.Width = This.WorkSpaceWidth() - tab_1.X tab_1.Height = This.WorkSpaceHeight() - tab_1.Y Long i FOR i = 1 To 10 dws[i].Width = pages[i].Width - dws[i].X dws[i].Height = (pages[i].Height - dws[i].Y) / 2 uos[i].Width = dws[i].Width uos[i].Y = dws[i].Y + dws[i].Height uos[i].Height = dws[i].Height uos[i].PostEvent('ue_resize') NEXT IF IsValid(w_saletask_edit) THEN w_saletask_edit.Width = tab_1.Width w_saletask_edit.Height = tab_1.Height END IF end event event open;call super::open;pages[1] = tab_1.tabpage_1 pages[2] = tab_1.tabpage_2 pages[3] = tab_1.tabpage_3 pages[4] = tab_1.tabpage_4 pages[5] = tab_1.tabpage_5 pages[6] = tab_1.tabpage_6 pages[7] = tab_1.tabpage_7 pages[8] = tab_1.tabpage_8 pages[9] = tab_1.tabpage_9 pages[10] = tab_1.tabpage_10 dws[1] = tab_1.tabpage_1.dw_1 dws[2] = tab_1.tabpage_2.dw_2 dws[3] = tab_1.tabpage_3.dw_3 dws[4] = tab_1.tabpage_4.dw_4 dws[5] = tab_1.tabpage_5.dw_5 dws[6] = tab_1.tabpage_6.dw_6 dws[7] = tab_1.tabpage_7.dw_7 dws[8] = tab_1.tabpage_8.dw_8 dws[9] = tab_1.tabpage_9.dw_9 dws[10] = tab_1.tabpage_10.dw_10 uos[1] = tab_1.tabpage_1.uo_1 uos[2] = tab_1.tabpage_2.uo_2 uos[3] = tab_1.tabpage_3.uo_3 uos[4] = tab_1.tabpage_4.uo_4 uos[5] = tab_1.tabpage_5.uo_5 uos[6] = tab_1.tabpage_6.uo_6 uos[7] = tab_1.tabpage_7.uo_7 uos[8] = tab_1.tabpage_8.uo_8 uos[9] = tab_1.tabpage_9.uo_9 uos[10] = tab_1.tabpage_10.uo_10 triggerevent('ue_date1') this.postevent('ue_retrieve_cur') ins_opened = true end event type cb_func from w_publ_base_style`cb_func within w_main boolean visible = false integer x = 850 end type type cb_exit from w_publ_base_style`cb_exit within w_main boolean visible = false integer x = 1001 end type type ln_bar from w_publ_base_style`ln_bar within w_main boolean visible = false end type type ln_bar2 from w_publ_base_style`ln_bar2 within w_main boolean visible = false end type type r_bar from w_publ_base_style`r_bar within w_main boolean visible = false end type type cb_1 from uo_imflatbutton within w_main boolean visible = false integer width = 151 integer height = 164 integer taborder = 50 boolean bringtotop = true string text = "刷新" string normalpicname = "refresh.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;//DateTime first_date,end_date // //first_date = DateTime(Date(em_1.Text),Time(0)) //end_date = DateTime(Date(em_2.Text),Time('23:59:59')) //String ls_cust_str, ls_mtrl_str //IF Pos(sle_cust.Text,"%") <> 0 THEN // ls_cust_str = trim(sle_cust.Text) //ELSE // ls_cust_str = "%"+trim(sle_cust.Text)+"%" //END IF //IF Pos(sle_mtrl.Text,"%") <> 0 THEN // ls_mtrl_str = trim(sle_mtrl.Text) //ELSE // ls_mtrl_str = "%"+trim(sle_mtrl.Text)+"%" //END IF //dw_1.Retrieve(DATE(EM_1.TEXT),DATE(EM_2.TEXT),ls_cust_str,ls_mtrl_str) //dw_1.OBJECT.date_mid.TEXT=EM_1.TEXT+'~~'+EM_2.TEXT end event type cb_2 from uo_imflatbutton within w_main boolean visible = false integer x = 151 integer width = 151 integer height = 164 integer taborder = 60 boolean bringtotop = true string text = "新建" string normalpicname = "NEW.BMP" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;//open(w_saletask_dm_edit) end event type cb_3 from uo_imflatbutton within w_main boolean visible = false integer x = 302 integer width = 274 integer height = 164 integer taborder = 70 boolean bringtotop = true boolean enabled = false string text = "订单审核" string normalpicname = "ok.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;//DateTime first_date,end_date // //first_date = DateTime(Date(em_1.Text),Time(0)) //end_date = DateTime(Date(em_2.Text),Time('23:59:59')) //String ls_cust_str, ls_mtrl_str //IF Pos(sle_cust.Text,"%") <> 0 THEN // ls_cust_str = trim(sle_cust.Text) //ELSE // ls_cust_str = "%"+trim(sle_cust.Text)+"%" //END IF //IF Pos(sle_mtrl.Text,"%") <> 0 THEN // ls_mtrl_str = trim(sle_mtrl.Text) //ELSE // ls_mtrl_str = "%"+trim(sle_mtrl.Text)+"%" //END IF //dw_1.Retrieve(DATE(EM_1.TEXT),DATE(EM_2.TEXT),ls_cust_str,ls_mtrl_str) //dw_1.OBJECT.date_mid.TEXT=EM_1.TEXT+'~~'+EM_2.TEXT end event type cb_4 from uo_imflatbutton within w_main boolean visible = false integer x = 576 integer width = 274 integer height = 164 integer taborder = 80 boolean bringtotop = true boolean enabled = false string text = "收货确认" string normalpicname = "ok.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;//DateTime first_date,end_date // //first_date = DateTime(Date(em_1.Text),Time(0)) //end_date = DateTime(Date(em_2.Text),Time('23:59:59')) //String ls_cust_str, ls_mtrl_str //IF Pos(sle_cust.Text,"%") <> 0 THEN // ls_cust_str = trim(sle_cust.Text) //ELSE // ls_cust_str = "%"+trim(sle_cust.Text)+"%" //END IF //IF Pos(sle_mtrl.Text,"%") <> 0 THEN // ls_mtrl_str = trim(sle_mtrl.Text) //ELSE // ls_mtrl_str = "%"+trim(sle_mtrl.Text)+"%" //END IF //dw_1.Retrieve(DATE(EM_1.TEXT),DATE(EM_2.TEXT),ls_cust_str,ls_mtrl_str) //dw_1.OBJECT.date_mid.TEXT=EM_1.TEXT+'~~'+EM_2.TEXT end event type cb_5 from commandbutton within w_main integer y = 468 integer width = 347 integer height = 92 integer taborder = 130 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string text = "新建订单" end type event clicked;IF IsValid(w_saletask_edit) THEN w_saletask_edit.Visible = True w_saletask_edit.BringToTop = True tab_1.triggerevent('ue_hide') RETURN END IF Open(w_saletask_edit) w_saletask_edit.X = tab_1.X w_saletask_edit.Y = tab_1.Y w_saletask_edit.Width = tab_1.Width w_saletask_edit.Height = tab_1.Height w_saletask_edit.Visible = True w_saletask_edit.BringToTop = True tab_1.triggerevent('ue_hide') end event type cb_6 from commandbutton within w_main integer y = 360 integer width = 347 integer height = 92 integer taborder = 140 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string text = "查询订单" end type event clicked;IF IsValid(w_saletask_edit) THEN w_saletask_edit.Visible = False END IF IF Not tab_1.Visible THEN tab_1.TriggerEvent('ue_show') END IF Parent.PostEvent('ue_retrieve_cur') end event type cb_7 from commandbutton within w_main integer y = 576 integer width = 347 integer height = 92 integer taborder = 150 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string text = "订单审核" end type event clicked;Long row IF IsValid(w_saletask_edit) THEN IF w_saletask_edit.visible THEN w_saletask_edit.visible = false tab_1.triggerevent('ue_show') tab_1.SelectTab(2) RETURN END IF END IF IF tab_1.SelectedTab <> 2 THEN MessageBox('提示', '请在已报价页,选择中目标再试') tab_1.SelectTab(2) RETURN END IF datawindow cur_dw cur_dw = dws[2] row = cur_dw.GetRow() IF row <= 0 THEN MessageBox('提示', '请选择目标') RETURN END IF IF cur_dw.Object.status[row] <> 1 THEN MessageBox('提示', '订单不在已报价状态,不能审核') RETURN END IF oleobject lo_dict lo_dict = AppCom.CreatePbDictionary() lo_dict.SetInt('taskid', cur_dw.Object.taskid[row]) lo_dict.SetString('tid', cur_dw.Object.tid[row]) lo_dict.SetDateTime('taskdate', cur_dw.Object.taskdate[row]) lo_dict.SetInt('cusid', cur_dw.Object.cusid[row]) lo_dict.SetString('cus_rep', cur_dw.Object.cus_rep[row]) lo_dict.SetString('cus_tele', cur_dw.Object.cus_tele[row]) lo_dict.SetString('cus_address', cur_dw.Object.cus_address[row]) lo_dict.SetString('freight', cur_dw.Object.freight[row]) lo_dict.SetString('freight_tele', cur_dw.Object.freight_tele[row]) lo_dict.SetString('opemp', cur_dw.Object.opemp[row]) lo_dict.SetDateTime('opdate', cur_dw.Object.opdate[row]) lo_dict.SetString('modemp', cur_dw.Object.modemp[row]) lo_dict.SetDateTime('moddate', cur_dw.Object.moddate[row]) lo_dict.SetString('buyer_name', cur_dw.Object.buyer_name[row]) lo_dict.SetString('buyer_tele', cur_dw.Object.buyer_tele[row]) lo_dict.SetDateTime('requiredate', cur_dw.Object.requiredate[row]) lo_dict.SetString('temp1', cur_dw.Object.temp1[row]) lo_dict.SetString('temp2', cur_dw.Object.temp2[row]) lo_dict.SetString('temp3', cur_dw.Object.temp3[row]) lo_dict.SetString('temp4', cur_dw.Object.temp4[row]) lo_dict.SetString('temp5', cur_dw.Object.temp5[row]) lo_dict.SetString('temp6', cur_dw.Object.temp6[row]) lo_dict.SetString('price_emp', cur_dw.Object.price_emp[row]) lo_dict.SetDateTime('replyrqdate', cur_dw.Object.replyrqdate[row]) lo_dict.SetString('confirmemp', cur_dw.Object.confirmemp[row]) lo_dict.SetDateTime('confirmdate', cur_dw.Object.confirmdate[row]) lo_dict.SetInt('status', cur_dw.Object.status[row]) lo_dict.SetInt('fstatus', cur_dw.Object.fstatus[row]) lo_dict.SetInt('ifexcelerr', cur_dw.Object.ifexcelerr[row]) lo_dict.SetString('taskcode', cur_dw.Object.taskcode[row]) lo_dict.SetString('outwarecode', cur_dw.Object.outwarecode[row]) lo_dict.SetString('replydscrp', cur_dw.Object.replydscrp[row]) lo_dict.SetDateTime('replydate', cur_dw.Object.replydate[row]) lo_dict.SetString('cuscode', cur_dw.Object.cuscode[row]) lo_dict.SetString('cusname', cur_dw.Object.cusname[row]) OpenWithParm(w_saletask_audit, lo_dict) end event type cb_18 from commandbutton within w_main integer y = 684 integer width = 347 integer height = 92 integer taborder = 210 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string text = "修改密码" end type event clicked;open(w_modpsw) end event type cb_19 from commandbutton within w_main integer y = 792 integer width = 347 integer height = 92 integer taborder = 210 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string text = "安全退出" end type event clicked;close(parent) end event type p_1 from picture within w_main integer width = 1371 integer height = 340 boolean bringtotop = true string picturename = "main_logo_left.bmp" boolean focusrectangle = false end type type p_2 from picture within w_main integer x = 2103 integer width = 46 integer height = 340 boolean bringtotop = true string picturename = "main_logo_mid.bmp" boolean focusrectangle = false end type type p_3 from picture within w_main integer x = 2354 integer width = 1234 integer height = 340 boolean bringtotop = true boolean originalsize = true string picturename = "main_logo_right.bmp" boolean focusrectangle = false end type type st_web from statictext within w_main integer x = 2757 integer y = 376 integer width = 123 integer height = 52 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string pointer = "HyperLink!" long textcolor = 33554432 long backcolor = 16777215 string text = "官网" boolean focusrectangle = false end type event clicked;run('explorer http://www.sanross.cn/') end event type st_help from statictext within w_main integer x = 3035 integer y = 376 integer width = 123 integer height = 52 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string pointer = "HyperLink!" long textcolor = 33554432 long backcolor = 16777215 string text = "帮助" boolean focusrectangle = false end type type st_about from statictext within w_main integer x = 3314 integer y = 376 integer width = 123 integer height = 52 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string pointer = "HyperLink!" long textcolor = 33554432 long backcolor = 16777215 string text = "关于" boolean focusrectangle = false end type event clicked;open(w_about) end event type p_web from picture within w_main integer x = 2674 integer y = 368 integer width = 73 integer height = 64 boolean bringtotop = true string pointer = "HyperLink!" boolean originalsize = true string picturename = "graphics\ic_ie.bmp" boolean focusrectangle = false end type event clicked;st_web.triggerevent(clicked!) end event type p_help from picture within w_main integer x = 2949 integer y = 368 integer width = 73 integer height = 64 boolean bringtotop = true string pointer = "HyperLink!" boolean originalsize = true string picturename = "graphics\ic_05.bmp" boolean focusrectangle = false end type event clicked;st_help.triggerevent(clicked!) end event type tab_1 from tab within w_main event create ( ) event destroy ( ) event ue_show ( ) event ue_hide ( ) integer x = 352 integer y = 360 integer width = 3744 integer height = 1596 integer taborder = 120 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long backcolor = 16777215 boolean raggedright = true boolean focusonbuttondown = true integer selectedtab = 1 tabpage_7 tabpage_7 tabpage_3 tabpage_3 tabpage_1 tabpage_1 tabpage_8 tabpage_8 tabpage_9 tabpage_9 tabpage_10 tabpage_10 tabpage_2 tabpage_2 tabpage_4 tabpage_4 tabpage_5 tabpage_5 tabpage_6 tabpage_6 end type on tab_1.create this.tabpage_7=create tabpage_7 this.tabpage_3=create tabpage_3 this.tabpage_1=create tabpage_1 this.tabpage_8=create tabpage_8 this.tabpage_9=create tabpage_9 this.tabpage_10=create tabpage_10 this.tabpage_2=create tabpage_2 this.tabpage_4=create tabpage_4 this.tabpage_5=create tabpage_5 this.tabpage_6=create tabpage_6 this.Control[]={this.tabpage_7,& this.tabpage_3,& this.tabpage_1,& this.tabpage_8,& this.tabpage_9,& this.tabpage_10,& this.tabpage_2,& this.tabpage_4,& this.tabpage_5,& this.tabpage_6} end on on tab_1.destroy destroy(this.tabpage_7) destroy(this.tabpage_3) destroy(this.tabpage_1) destroy(this.tabpage_8) destroy(this.tabpage_9) destroy(this.tabpage_10) destroy(this.tabpage_2) destroy(this.tabpage_4) destroy(this.tabpage_5) destroy(this.tabpage_6) end on event ue_show();this.visible = true p_web.visible = true st_web.visible = true p_help.visible = true st_help.visible = true st_about.visible = true this.bringtotop = true p_web.bringtotop = true st_web.bringtotop = true p_help.bringtotop = true st_help.bringtotop = true st_about.bringtotop = true end event event ue_hide();this.visible = false p_web.visible = false st_web.visible = false p_help.visible = false st_help.visible = false st_about.visible = false end event event selectionchanged;wf_face() Parent.PostEvent('ue_retrieve_cur') end event type tabpage_7 from userobject within tab_1 event create ( ) event destroy ( ) string tag = "7" integer x = 18 integer y = 96 integer width = 3707 integer height = 1484 long backcolor = 16777215 string text = "新建(0)" long tabtextcolor = 33554432 long tabbackcolor = 16777215 long picturemaskcolor = 536870912 uo_7 uo_7 dw_7 dw_7 end type on tabpage_7.create this.uo_7=create uo_7 this.dw_7=create dw_7 this.Control[]={this.uo_7,& this.dw_7} end on on tabpage_7.destroy destroy(this.uo_7) destroy(this.dw_7) end on type uo_7 from uo_task_detail within tabpage_7 integer y = 724 integer taborder = 170 end type event constructor;call super::constructor;// 隐藏订单相关中复杂的信息 this.tabpage_3.visible = false this.tabpage_4.visible = false this.tabpage_5.visible = false end event type dw_7 from u_dw_rbtnfilter within tabpage_7 integer width = 2455 integer height = 720 integer taborder = 40 boolean bringtotop = true string dataobject = "dw_saletask_dm" boolean hscrollbar = true boolean vscrollbar = true boolean hsplitscroll = true boolean rbutton_filter_use = true boolean titleclick_sort_use = true end type event doubleclicked;call super::doubleclicked;cur_dw = this IF row <= 0 THEN MessageBox('提示', '请选择目标') RETURN END IF wf_showrow(row) end event event rowfocuschanged;call super::rowfocuschanged;this.selectrow(0, false) long i if currentrow > 0 then this.selectrow(currentrow, true) i = long(parent.tag) long taskid taskid = this.Object.taskid[currentrow] if taskid > 0 then uos[i].uof_retrieve(taskid) end if end if end event type tabpage_3 from userobject within tab_1 string tag = "3" integer x = 18 integer y = 96 integer width = 3707 integer height = 1484 long backcolor = 16777215 string text = "已退回(3)" long tabtextcolor = 33554432 long tabbackcolor = 134217739 long picturemaskcolor = 536870912 uo_3 uo_3 dw_3 dw_3 end type on tabpage_3.create this.uo_3=create uo_3 this.dw_3=create dw_3 this.Control[]={this.uo_3,& this.dw_3} end on on tabpage_3.destroy destroy(this.uo_3) destroy(this.dw_3) end on type uo_3 from uo_task_detail within tabpage_3 integer y = 776 integer taborder = 150 end type event constructor;call super::constructor;// 隐藏订单相关中复杂的信息 this.tabpage_3.visible = false this.tabpage_4.visible = false this.tabpage_5.visible = false end event type dw_3 from u_dw_rbtnfilter within tabpage_3 integer width = 2455 integer height = 720 integer taborder = 50 boolean bringtotop = true string dataobject = "dw_saletask_dm" boolean hscrollbar = true boolean vscrollbar = true boolean hsplitscroll = true boolean rbutton_filter_use = true boolean titleclick_sort_use = true end type event rowfocuschanged;call super::rowfocuschanged;this.selectrow(0, false) if currentrow > 0 then this.selectrow(currentrow, true) long taskid taskid = this.Object.taskid[currentrow] if taskid > 0 then uo_3.uof_retrieve(taskid) end if end if end event event doubleclicked;call super::doubleclicked;cur_dw = this IF row <= 0 THEN MessageBox('提示', '请选择目标') RETURN END IF wf_showrow(row) end event type tabpage_1 from userobject within tab_1 event create ( ) event destroy ( ) string tag = "1" integer x = 18 integer y = 96 integer width = 3707 integer height = 1484 long backcolor = 16777215 string text = "待工厂确认(3)" long tabtextcolor = 33554432 long tabbackcolor = 134217739 long picturemaskcolor = 536870912 uo_1 uo_1 dw_1 dw_1 end type on tabpage_1.create this.uo_1=create uo_1 this.dw_1=create dw_1 this.Control[]={this.uo_1,& this.dw_1} end on on tabpage_1.destroy destroy(this.uo_1) destroy(this.dw_1) end on type uo_1 from uo_task_detail within tabpage_1 integer y = 752 integer taborder = 150 end type event constructor;call super::constructor;// 隐藏订单相关中复杂的信息 this.tabpage_3.visible = false this.tabpage_4.visible = false this.tabpage_5.visible = false end event type dw_1 from u_dw_rbtnfilter within tabpage_1 integer width = 2455 integer height = 720 integer taborder = 40 boolean bringtotop = true string dataobject = "dw_saletask_dm" boolean hscrollbar = true boolean vscrollbar = true boolean hsplitscroll = true boolean rbutton_filter_use = true boolean titleclick_sort_use = true end type event rowfocuschanged;call super::rowfocuschanged;this.selectrow(0, false) if currentrow > 0 then this.selectrow(currentrow, true) long taskid taskid = this.Object.taskid[currentrow] if taskid > 0 then uo_1.uof_retrieve(taskid) end if end if end event event doubleclicked;call super::doubleclicked;cur_dw = this IF row <= 0 THEN MessageBox('提示', '请选择目标') RETURN END IF wf_showrow(row) end event type tabpage_8 from userobject within tab_1 string tag = "8" integer x = 18 integer y = 96 integer width = 3707 integer height = 1484 long backcolor = 16777215 string text = "待上传发货明细(0)" long tabtextcolor = 33554432 long tabbackcolor = 16777215 long picturemaskcolor = 536870912 uo_8 uo_8 dw_8 dw_8 end type on tabpage_8.create this.uo_8=create uo_8 this.dw_8=create dw_8 this.Control[]={this.uo_8,& this.dw_8} end on on tabpage_8.destroy destroy(this.uo_8) destroy(this.dw_8) end on type uo_8 from uo_task_detail within tabpage_8 integer y = 724 integer taborder = 180 end type event constructor;call super::constructor;// 隐藏订单相关中复杂的信息 this.tabpage_3.visible = false this.tabpage_4.visible = false this.tabpage_5.visible = false end event type dw_8 from u_dw_rbtnfilter within tabpage_8 integer width = 2455 integer height = 720 integer taborder = 50 boolean bringtotop = true string dataobject = "dw_saletask_dm" boolean hscrollbar = true boolean vscrollbar = true boolean hsplitscroll = true boolean rbutton_filter_use = true boolean titleclick_sort_use = true end type event doubleclicked;call super::doubleclicked;cur_dw = this IF row <= 0 THEN MessageBox('提示', '请选择目标') RETURN END IF wf_showrow(row) end event event rowfocuschanged;call super::rowfocuschanged;this.selectrow(0, false) long i if currentrow > 0 then this.selectrow(currentrow, true) i = long(parent.tag) long taskid taskid = this.Object.taskid[currentrow] if taskid > 0 then uos[i].uof_retrieve(taskid) end if end if end event type tabpage_9 from userobject within tab_1 string tag = "9" integer x = 18 integer y = 96 integer width = 3707 integer height = 1484 long backcolor = 16777215 string text = "待发货明细确认(0)" long tabtextcolor = 33554432 long tabbackcolor = 16777215 long picturemaskcolor = 536870912 uo_9 uo_9 dw_9 dw_9 end type on tabpage_9.create this.uo_9=create uo_9 this.dw_9=create dw_9 this.Control[]={this.uo_9,& this.dw_9} end on on tabpage_9.destroy destroy(this.uo_9) destroy(this.dw_9) end on type uo_9 from uo_task_detail within tabpage_9 integer y = 724 integer taborder = 180 end type event constructor;call super::constructor;// 隐藏订单相关中复杂的信息 this.tabpage_3.visible = false this.tabpage_4.visible = false this.tabpage_5.visible = false end event type dw_9 from u_dw_rbtnfilter within tabpage_9 integer width = 2455 integer height = 720 integer taborder = 50 boolean bringtotop = true string dataobject = "dw_saletask_dm" boolean hscrollbar = true boolean vscrollbar = true boolean hsplitscroll = true boolean rbutton_filter_use = true boolean titleclick_sort_use = true end type event doubleclicked;call super::doubleclicked;cur_dw = this IF row <= 0 THEN MessageBox('提示', '请选择目标') RETURN END IF wf_showrow(row) end event event rowfocuschanged;call super::rowfocuschanged;this.selectrow(0, false) long i if currentrow > 0 then this.selectrow(currentrow, true) i = long(parent.tag) long taskid taskid = this.Object.taskid[currentrow] if taskid > 0 then uos[i].uof_retrieve(taskid) end if end if end event type tabpage_10 from userobject within tab_1 string tag = "10" integer x = 18 integer y = 96 integer width = 3707 integer height = 1484 long backcolor = 16777215 string text = "待上传报价明细(0)" long tabtextcolor = 33554432 long tabbackcolor = 16777215 long picturemaskcolor = 536870912 uo_10 uo_10 dw_10 dw_10 end type on tabpage_10.create this.uo_10=create uo_10 this.dw_10=create dw_10 this.Control[]={this.uo_10,& this.dw_10} end on on tabpage_10.destroy destroy(this.uo_10) destroy(this.dw_10) end on type uo_10 from uo_task_detail within tabpage_10 integer y = 724 integer taborder = 180 end type event constructor;call super::constructor;// 隐藏订单相关中复杂的信息 this.tabpage_3.visible = false this.tabpage_4.visible = false this.tabpage_5.visible = false end event type dw_10 from u_dw_rbtnfilter within tabpage_10 integer width = 2455 integer height = 720 integer taborder = 50 boolean bringtotop = true string dataobject = "dw_saletask_dm" boolean hscrollbar = true boolean vscrollbar = true boolean hsplitscroll = true boolean rbutton_filter_use = true boolean titleclick_sort_use = true end type event doubleclicked;call super::doubleclicked;cur_dw = this IF row <= 0 THEN MessageBox('提示', '请选择目标') RETURN END IF wf_showrow(row) end event event rowfocuschanged;call super::rowfocuschanged;this.selectrow(0, false) long i if currentrow > 0 then this.selectrow(currentrow, true) i = long(parent.tag) long taskid taskid = this.Object.taskid[currentrow] if taskid > 0 then uos[i].uof_retrieve(taskid) end if end if end event type tabpage_2 from userobject within tab_1 event create ( ) event destroy ( ) string tag = "2" integer x = 18 integer y = 96 integer width = 3707 integer height = 1484 long backcolor = 16777215 string text = "待报价明细确认(2)" long tabtextcolor = 33554432 long tabbackcolor = 134217739 long picturemaskcolor = 536870912 uo_2 uo_2 dw_2 dw_2 end type on tabpage_2.create this.uo_2=create uo_2 this.dw_2=create dw_2 this.Control[]={this.uo_2,& this.dw_2} end on on tabpage_2.destroy destroy(this.uo_2) destroy(this.dw_2) end on type uo_2 from uo_task_detail within tabpage_2 integer y = 752 integer taborder = 150 end type event ue_fjchanged;call super::ue_fjchanged;dw_2.Object.ifexcelerr[dw_2.GetRow()] = 1 end event event constructor;call super::constructor;// 隐藏订单相关中复杂的信息 this.tabpage_3.visible = false this.tabpage_4.visible = false this.tabpage_5.visible = false end event type dw_2 from u_dw_rbtnfilter within tabpage_2 integer width = 2455 integer height = 720 integer taborder = 40 boolean bringtotop = true string dataobject = "dw_saletask_dm" boolean hscrollbar = true boolean vscrollbar = true boolean hsplitscroll = true boolean rbutton_filter_use = true boolean titleclick_sort_use = true end type event rowfocuschanged;call super::rowfocuschanged;this.selectrow(0, false) if currentrow > 0 then this.selectrow(currentrow, true) long taskid taskid = this.Object.taskid[currentrow] if taskid > 0 then uo_2.uof_retrieve(taskid) end if end if end event event doubleclicked;call super::doubleclicked;cur_dw = this IF row <= 0 THEN MessageBox('提示', '请选择目标') RETURN END IF wf_showrow(row) end event type tabpage_4 from userobject within tab_1 event create ( ) event destroy ( ) string tag = "4" integer x = 18 integer y = 96 integer width = 3707 integer height = 1484 long backcolor = 16777215 string text = "已下单(5)" long tabtextcolor = 33554432 long tabbackcolor = 134217739 long picturemaskcolor = 536870912 uo_4 uo_4 dw_4 dw_4 end type on tabpage_4.create this.uo_4=create uo_4 this.dw_4=create dw_4 this.Control[]={this.uo_4,& this.dw_4} end on on tabpage_4.destroy destroy(this.uo_4) destroy(this.dw_4) end on type uo_4 from uo_task_detail within tabpage_4 integer y = 736 integer taborder = 160 end type type dw_4 from u_dw_rbtnfilter within tabpage_4 integer width = 2455 integer height = 720 integer taborder = 40 boolean bringtotop = true string dataobject = "dw_saletask_dm" boolean hscrollbar = true boolean vscrollbar = true boolean hsplitscroll = true boolean rbutton_filter_use = true boolean titleclick_sort_use = true end type event rowfocuschanged;call super::rowfocuschanged;this.selectrow(0, false) if currentrow > 0 then this.selectrow(currentrow, true) long taskid taskid = this.Object.taskid[currentrow] if taskid > 0 then uo_4.uof_retrieve(taskid) end if end if end event event doubleclicked;call super::doubleclicked;cur_dw = this IF row <= 0 THEN MessageBox('提示', '请选择目标') RETURN END IF wf_showrow(row) end event type tabpage_5 from userobject within tab_1 event create ( ) event destroy ( ) string tag = "5" integer x = 18 integer y = 96 integer width = 3707 integer height = 1484 long backcolor = 16777215 string text = "已发货(3)" long tabtextcolor = 33554432 long tabbackcolor = 134217739 long picturemaskcolor = 536870912 uo_5 uo_5 cb_20 cb_20 dw_5 dw_5 end type on tabpage_5.create this.uo_5=create uo_5 this.cb_20=create cb_20 this.dw_5=create dw_5 this.Control[]={this.uo_5,& this.cb_20,& this.dw_5} end on on tabpage_5.destroy destroy(this.uo_5) destroy(this.cb_20) destroy(this.dw_5) end on type uo_5 from uo_task_detail within tabpage_5 integer y = 728 integer taborder = 160 end type type cb_20 from commandbutton within tabpage_5 integer width = 347 integer height = 92 integer taborder = 230 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string text = "收货确认" end type event clicked;Long row row = dw_5.GetRow() IF row <= 0 THEN MessageBox('提示', '请选择目标') RETURN END IF IF dw_5.Object.status[row] <> 4 THEN MessageBox('提示', '当前订单不在已发货状态') RETURN END IF IF MessageBox('提问', '是否对订单['+dw_5.Object.tid[row]+']进行确认收货?',Question!,YesNo!) <> 1 THEN RETURN oleobject parms parms = AppCom.CreatePbDictionary() parms.SetString('token', app_token) parms.SetInt('taskid', dw_5.Object.taskid[row]) String arg_msg = '' AppCom.FinishTask(parms, Ref arg_msg) IF arg_msg = '' THEN dw_5.Object.status[row] = 5 MessageBox('OK', '订单收货确认成功') ELSE MessageBox('ERROR', arg_msg) END IF end event type dw_5 from u_dw_rbtnfilter within tabpage_5 integer y = 92 integer width = 2455 integer height = 628 integer taborder = 40 boolean bringtotop = true string dataobject = "dw_saletask_dm" boolean hscrollbar = true boolean vscrollbar = true boolean hsplitscroll = true boolean rbutton_filter_use = true boolean titleclick_sort_use = true end type event rowfocuschanged;call super::rowfocuschanged;this.selectrow(0, false) if currentrow > 0 then this.selectrow(currentrow, true) long taskid taskid = this.Object.taskid[currentrow] if taskid > 0 then uo_5.uof_retrieve(taskid) end if end if end event event doubleclicked;call super::doubleclicked;cur_dw = this IF row <= 0 THEN MessageBox('提示', '请选择目标') RETURN END IF wf_showrow(row) end event type tabpage_6 from userobject within tab_1 event create ( ) event destroy ( ) string tag = "6" integer x = 18 integer y = 96 integer width = 3707 integer height = 1484 long backcolor = 16777215 string text = "历史" long tabtextcolor = 33554432 long tabbackcolor = 134217739 long picturemaskcolor = 536870912 ddlb_1 ddlb_1 st_2 st_2 sle_1 sle_1 st_1 st_1 uo_6 uo_6 dw_6 dw_6 pb_2 pb_2 pb_em2 pb_em2 pb_em1 pb_em1 em_2 em_2 em_1 em_1 st_4 st_4 st_3 st_3 end type on tabpage_6.create this.ddlb_1=create ddlb_1 this.st_2=create st_2 this.sle_1=create sle_1 this.st_1=create st_1 this.uo_6=create uo_6 this.dw_6=create dw_6 this.pb_2=create pb_2 this.pb_em2=create pb_em2 this.pb_em1=create pb_em1 this.em_2=create em_2 this.em_1=create em_1 this.st_4=create st_4 this.st_3=create st_3 this.Control[]={this.ddlb_1,& this.st_2,& this.sle_1,& this.st_1,& this.uo_6,& this.dw_6,& this.pb_2,& this.pb_em2,& this.pb_em1,& this.em_2,& this.em_1,& this.st_4,& this.st_3} end on on tabpage_6.destroy destroy(this.ddlb_1) destroy(this.st_2) destroy(this.sle_1) destroy(this.st_1) destroy(this.uo_6) destroy(this.dw_6) destroy(this.pb_2) destroy(this.pb_em2) destroy(this.pb_em1) destroy(this.em_2) destroy(this.em_1) destroy(this.st_4) destroy(this.st_3) end on type ddlb_1 from dropdownlistbox within tabpage_6 integer x = 2537 integer width = 480 integer height = 688 integer taborder = 170 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string text = "已收货" boolean sorted = false boolean vscrollbar = true string item[] = {"待询价","已报价","已退回","已下单","已发货","已收货","全部"} borderstyle borderstyle = stylelowered! end type type st_2 from statictext within tabpage_6 integer x = 2373 integer y = 16 integer width = 160 integer height = 48 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 16777215 string text = "状态:" alignment alignment = right! boolean focusrectangle = false end type type sle_1 from singlelineedit within tabpage_6 integer x = 1824 integer width = 503 integer height = 84 integer taborder = 160 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 borderstyle borderstyle = stylelowered! end type type st_1 from statictext within tabpage_6 integer x = 1609 integer y = 16 integer width = 215 integer height = 48 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 16777215 string text = "单号含:" alignment alignment = right! boolean focusrectangle = false end type type uo_6 from uo_task_detail within tabpage_6 integer y = 820 integer taborder = 160 end type type dw_6 from u_dw_rbtnfilter within tabpage_6 integer y = 96 integer width = 2455 integer height = 720 integer taborder = 30 boolean bringtotop = true string dataobject = "dw_saletask_dm" boolean hscrollbar = true boolean vscrollbar = true boolean hsplitscroll = true boolean rbutton_filter_use = true boolean titleclick_sort_use = true end type event rowfocuschanged;call super::rowfocuschanged;this.selectrow(0, false) if currentrow > 0 then this.selectrow(currentrow, true) long taskid taskid = this.Object.taskid[currentrow] if taskid > 0 then uo_6.uof_retrieve(taskid) end if end if end event event doubleclicked;call super::doubleclicked;cur_dw = this IF row <= 0 THEN MessageBox('提示', '请选择目标') RETURN END IF wf_showrow(row) end event type pb_2 from picturebutton within tabpage_6 integer x = 1463 integer width = 101 integer height = 92 integer taborder = 150 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string picturename = "date1.BMP" alignment htextalign = left! end type event clicked;m_Dfc_Control_PopupMenu dmPopupMenu string menustr menustr="Text=本日~tEvent=ue_date1" menustr = menustr + "|" + "Text=本周~tEvent=ue_date2" menustr = menustr + "|" + "Text=本月~tEvent=ue_date3" if len(trim(menustr))<>0 then dmPopupMenu = Create m_Dfc_Control_PopupMenu dmPopupMenu.mf_BuildMenu(This, menustr) dmPopupMenu.mf_PopMenu() Destroy dmPopupMenu end if end event type pb_em2 from picturebutton within tabpage_6 integer x = 1353 integer width = 101 integer height = 92 integer taborder = 140 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string picturename = "date.BMP" alignment htextalign = left! end type event clicked;em_2.triggerevent(rbuttondown!) end event type pb_em1 from picturebutton within tabpage_6 integer x = 741 integer width = 101 integer height = 92 integer taborder = 130 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string picturename = "date.BMP" alignment htextalign = left! end type event clicked;em_1.triggerevent(rbuttondown!) end event type em_2 from editmask within tabpage_6 integer x = 937 integer width = 407 integer height = 88 integer taborder = 130 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 borderstyle borderstyle = stylelowered! maskdatatype maskdatatype = datemask! string mask = "yyyy-mm-dd" boolean spin = true end type event rbuttondown;s_calender_arg s_calender s_calender.PointerX = THIS.PointerX() s_calender.PointerY = THIS.PointerY() s_calender.X = THIS.X s_calender.Y = THIS.Y OpenWithParm(w_calendar,s_calender) THIS.Text = String(id_date_selected) end event type em_1 from editmask within tabpage_6 integer x = 325 integer width = 407 integer height = 88 integer taborder = 120 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 borderstyle borderstyle = stylelowered! maskdatatype maskdatatype = datemask! string mask = "yyyy-mm-dd" boolean spin = true end type event rbuttondown;s_calender_arg s_calender s_calender.PointerX = THIS.PointerX() s_calender.PointerY = THIS.PointerY() s_calender.X = THIS.X s_calender.Y = THIS.Y OpenWithParm(w_calendar,s_calender) THIS.Text = String(id_date_selected) end event type st_4 from statictext within tabpage_6 integer x = 832 integer y = 16 integer width = 105 integer height = 60 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 16777215 boolean enabled = false string text = "到:" alignment alignment = right! boolean focusrectangle = false end type event constructor;this.backcolor = parent.backcolor end event type st_3 from statictext within tabpage_6 integer y = 16 integer width = 315 integer height = 60 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 16777215 boolean enabled = false string text = "订货日期从:" alignment alignment = right! boolean focusrectangle = false end type event constructor;this.backcolor = parent.backcolor end event