w_email_seach_cust.srw 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767
  1. $PBExportHeader$w_email_seach_cust.srw
  2. forward
  3. global type w_email_seach_cust from w_publ_easyq
  4. end type
  5. type cbx_1 from checkbox within w_email_seach_cust
  6. end type
  7. type ddlb_1 from dropdownlistbox within w_email_seach_cust
  8. end type
  9. type tv_1 from uo_tv_cusarea within w_email_seach_cust
  10. end type
  11. type ddlb_scid from uo_ddlb_scid within w_email_seach_cust
  12. end type
  13. type dw_2 from datawindow within w_email_seach_cust
  14. end type
  15. type cb_clear from uo_imflatbutton within w_email_seach_cust
  16. end type
  17. type cb_3 from uo_imflatbutton within w_email_seach_cust
  18. end type
  19. type cb_4 from uo_imflatbutton within w_email_seach_cust
  20. end type
  21. type cb_5 from uo_imflatbutton within w_email_seach_cust
  22. end type
  23. end forward
  24. global type w_email_seach_cust from w_publ_easyq
  25. integer x = 9
  26. integer y = 12
  27. integer width = 3611
  28. integer height = 2380
  29. string title = "客户筛选"
  30. boolean minbox = false
  31. boolean maxbox = false
  32. boolean resizable = false
  33. windowtype windowtype = response!
  34. cbx_1 cbx_1
  35. ddlb_1 ddlb_1
  36. tv_1 tv_1
  37. ddlb_scid ddlb_scid
  38. dw_2 dw_2
  39. cb_clear cb_clear
  40. cb_3 cb_3
  41. cb_4 cb_4
  42. cb_5 cb_5
  43. end type
  44. global w_email_seach_cust w_email_seach_cust
  45. type variables
  46. long cur_scid_arr[]
  47. String ls_areaname = ''
  48. datetime end_date_jq
  49. string ls_u_cust_cusareaname
  50. string ls_u_cust_rep_email
  51. string ls_cuscode
  52. string ls_name
  53. string ls_custype
  54. string ls_u_cust_grade
  55. string ls_u_cust_dscrp
  56. string ls_u_cust_rep_repname
  57. string ls_u_cust_rep_sex
  58. string ls_u_cust_rep_deptname
  59. string ls_u_cust_rep_duty
  60. boolean b_Focus=false
  61. s_edit_index_tran ss_tran
  62. end variables
  63. forward prototypes
  64. public subroutine wf_combine (ref datawindow arg_dw)
  65. public function decimal f_getys (long arg_custid, integer arg_scid, datetime arg_star, datetime arg_end)
  66. public function datetime f_month_add (datetime arg_date)
  67. public subroutine wf_face ()
  68. public subroutine wf_filter ()
  69. end prototypes
  70. public subroutine wf_combine (ref datawindow arg_dw);//合并金额
  71. arg_dw.setsort("u_cust_sc_cuscode")
  72. arg_dw.sort()
  73. long cnt,row
  74. cnt=arg_dw.rowcount()
  75. if cnt>1 then
  76. for row=cnt to 2 step -1
  77. if arg_dw.object.u_cust_sc_cuscode[row - 1]=arg_dw.object.u_cust_sc_cuscode[row] then
  78. arg_dw.object.orgn_amt[row - 1]=arg_dw.object.orgn_amt[row - 1]+arg_dw.object.orgn_amt[row]
  79. arg_dw.object.v_musttakebalc_incdec_groupbysc_msttakeamt[row - 1]=arg_dw.object.v_musttakebalc_incdec_groupbysc_msttakeamt[row - 1]+arg_dw.object.v_musttakebalc_incdec_groupbysc_msttakeamt[row]
  80. arg_dw.object.v_musttakebalc_incdec_groupbysc_takeamt[row - 1]=arg_dw.object.v_musttakebalc_incdec_groupbysc_takeamt[row - 1]+arg_dw.object.v_musttakebalc_incdec_groupbysc_takeamt[row]
  81. arg_dw.object.v_musttakebalc_balcamt_groupbysc_balcamt[row - 1]=arg_dw.object.v_musttakebalc_balcamt_groupbysc_balcamt[row - 1]+arg_dw.object.v_musttakebalc_balcamt_groupbysc_balcamt[row]
  82. arg_dw.deleterow(row)
  83. end if
  84. next
  85. end if
  86. end subroutine
  87. public function decimal f_getys (long arg_custid, integer arg_scid, datetime arg_star, datetime arg_end); decimal amt,amt1
  88. SELECT
  89. isnull(sum( U_Bmsttake.msttakeamt - U_Bmsttake.takeamt ) ,0)as '应收'
  90. into :amt
  91. FROM U_Bmsttake left outer join u_accounts on
  92. U_Bmsttake.accountsid = u_accounts.accountsid
  93. left outer join u_itemdef on
  94. U_Bmsttake.itemid = u_itemdef.itemid
  95. left outer join cw_banktype on
  96. U_Bmsttake.banktypeid = cw_banktype.banktypeid,
  97. u_scdef
  98. WHERE ( U_Bmsttake.scid = u_scdef.ScID ) and
  99. ( U_Bmsttake.cusid = :arg_custid) AND
  100. ( U_Bmsttake.takedate >= :arg_star ) AND
  101. ( U_Bmsttake.takedate < :arg_end ) and
  102. ( U_Bmsttake.scid = :arg_scid) ;
  103. //////////////////////////////////////////////////////
  104. SELECT
  105. isnull(sum(U_Bmsttake.takeamt ) ,0)as '应收'
  106. into :amt1
  107. FROM U_Bmsttake left outer join u_accounts on
  108. U_Bmsttake.accountsid = u_accounts.accountsid
  109. left outer join u_itemdef on
  110. U_Bmsttake.itemid = u_itemdef.itemid
  111. left outer join cw_banktype on
  112. U_Bmsttake.banktypeid = cw_banktype.banktypeid,
  113. u_scdef
  114. WHERE ( U_Bmsttake.scid = u_scdef.ScID ) and
  115. ( U_Bmsttake.cusid = :arg_custid) AND
  116. ( U_Bmsttake.takedate >= :arg_star ) AND
  117. ( U_Bmsttake.takedate < :arg_end ) and
  118. (( U_Bmsttake.finishdate >= :end_date_jq ) or U_Bmsttake.finishflag=0) AND
  119. ( U_Bmsttake.scid = :arg_scid) ;
  120. amt=amt + amt1
  121. return amt
  122. // and
  123. // ( U_Bmsttake.finishflag = 0 );
  124. end function
  125. public function datetime f_month_add (datetime arg_date);datetime d_date
  126. date e_date
  127. e_date=date(arg_date)
  128. if long(month(e_date))<>12 then
  129. arg_date= DateTime(date(string(year(e_date)) + '-' +string(long(month(e_date)) + 1) + '-01' ) ,00:00:00)
  130. else
  131. arg_date= DateTime(date(string(long(year(e_date)) + 1) + '-01' + '-01' ) ,00:00:00)
  132. end if
  133. return arg_date
  134. end function
  135. public subroutine wf_face ();String ls_column_name[] //存放列名
  136. String ls_column_text[] //存放列标题名称
  137. Integer i, li_column_count
  138. TRY
  139. //得到数据窗口的总列数
  140. li_column_count = Long(dw_1.Describe("DataWindow.Column.Count"))
  141. // //循环依次读取
  142. FOR i = 1 To li_column_count
  143. ls_column_name[i] = dw_1.Describe("#"+String(i)+".name")
  144. ls_column_text[i] = dw_1.Describe(ls_column_name[i] + "_t.text")
  145. NEXT
  146. String ls_x,ls_x_t,ls_visible,ls_width
  147. FOR i = 1 To li_column_count
  148. ls_x = ls_x + ls_column_name[i] + '_t.x=' + dw_1.Describe(ls_column_name[i] + ".x") + "~t"
  149. //ls_x= ls_x + ls_column_name[i] + '.x=' + dw_1.Describe(ls_column_name[i] + ".x") + "~t"
  150. ls_width = ls_width + ls_column_name[i] + '_t.width=' + dw_1.Describe(ls_column_name[i] + ".width") + "~t"
  151. ls_visible = ls_visible + ls_column_name[i] + '_t.visible=' + dw_1.Describe(ls_column_name[i] + ".visible") + "~t"
  152. NEXT
  153. dw_2.Modify(ls_x)
  154. dw_2.Modify(ls_width)
  155. dw_2.Modify(ls_visible)
  156. dw_2.Object.DataWindow.horizontalScrollPosition = dw_1.Object.DataWindow.horizontalScrollPosition
  157. Catch(RunTimeError e)
  158. END TRY
  159. end subroutine
  160. public subroutine wf_filter ();String ls_date
  161. //dw_2.AcceptText()
  162. //ls_u_cust_rep_email= "'%" +string(dw_2.object.u_cust_rep_email_t[1])+ "%'"
  163. //ls_cuscode= "'%" +string(dw_2.object.cuscode_t[1])+ "%'"
  164. //ls_name= "'%" +string(dw_2.object.name_t[1])+ "%'"
  165. //ls_custype= "'%" +string(dw_2.object.custype_t[1])+ "%'"
  166. //ls_u_cust_cusareaname= "'%" +string(dw_2.object.u_cust_cusareaname_t[1])+ "%'"
  167. //ls_u_cust_grade= "'%" +string(dw_2.object.u_cust_grade_t[1])+ "%'"
  168. //ls_u_cust_dscrp= "'%" +string(dw_2.object.u_cust_dscrp_t[1])+ "%'"
  169. //ls_u_cust_rep_repname= "'%" +string(dw_2.object.u_cust_rep_repname_t[1])+ "%'"
  170. //ls_u_cust_rep_sex= "'%" +string(dw_2.object.u_cust_rep_sex_t[1])+ "%'"
  171. //ls_u_cust_rep_deptname= "'%" +string(dw_2.object.u_cust_rep_deptname_t[1])+ "%'"
  172. //ls_u_cust_rep_duty= "'%" +string(dw_2.object.u_cust_rep_duty_t[1])+ "%'"
  173. //
  174. ////ls_date = "(u_cust_rep.email like " + ls_u_cust_rep_email + ") and (cuscode like " + ls_cuscode + ")" + " and (name like " + ls_name + ")"
  175. //
  176. ////ls_date = "email like + ' %1 ' + "
  177. ////dw.setfilter(" name = 'lily' ")
  178. ////IF Trim(sle_find.Text) = "" THEN RETURN
  179. //ls_date = "'%" + Trim(sle_find.Text) + "%'"
  180. ////dw_list.SetFilter("subject like '%" + ls_date + "%' " )
  181. //ls_date = "(subject like " + ls_date + ") or (sendman like " + ls_date + ")" + " or (revman like " + ls_date + ")"
  182. //
  183. //
  184. //dw_1.SetFilter( " u_cust_rep.email = 'lily' ")
  185. //dw_1.Filter()
  186. //dw_1.SetFilter("")
  187. end subroutine
  188. on w_email_seach_cust.create
  189. int iCurrent
  190. call super::create
  191. this.cbx_1=create cbx_1
  192. this.ddlb_1=create ddlb_1
  193. this.tv_1=create tv_1
  194. this.ddlb_scid=create ddlb_scid
  195. this.dw_2=create dw_2
  196. this.cb_clear=create cb_clear
  197. this.cb_3=create cb_3
  198. this.cb_4=create cb_4
  199. this.cb_5=create cb_5
  200. iCurrent=UpperBound(this.Control)
  201. this.Control[iCurrent+1]=this.cbx_1
  202. this.Control[iCurrent+2]=this.ddlb_1
  203. this.Control[iCurrent+3]=this.tv_1
  204. this.Control[iCurrent+4]=this.ddlb_scid
  205. this.Control[iCurrent+5]=this.dw_2
  206. this.Control[iCurrent+6]=this.cb_clear
  207. this.Control[iCurrent+7]=this.cb_3
  208. this.Control[iCurrent+8]=this.cb_4
  209. this.Control[iCurrent+9]=this.cb_5
  210. end on
  211. on w_email_seach_cust.destroy
  212. call super::destroy
  213. destroy(this.cbx_1)
  214. destroy(this.ddlb_1)
  215. destroy(this.tv_1)
  216. destroy(this.ddlb_scid)
  217. destroy(this.dw_2)
  218. destroy(this.cb_clear)
  219. destroy(this.cb_3)
  220. destroy(this.cb_4)
  221. destroy(this.cb_5)
  222. end on
  223. event open;call super::open;ls_areaname = "%%"
  224. cb_1.triggerevent(clicked!)
  225. ss_tran = message.powerobjectparm
  226. end event
  227. event ue_before_open;call super::ue_before_open;if_ue_retr=true
  228. if_ue_filter=true
  229. if_ue_sort=true
  230. if_ue_sentdataout=true
  231. //IF sys_option_takepay_sc = 1 THEN
  232. dw_1.DataObject = "dw_email_seach_cust"
  233. ddlb_scid.Enabled = TRUE
  234. //ELSE
  235. // dw_1.DataObject = "dw_rp_musttake_balc_scid_fenyue"
  236. // ddlb_scid.Enabled = FALSE
  237. //END IF
  238. dw_1.settransobject(sqlca)
  239. dw_1.ins_INIfile_name = sys_inifilename
  240. dw_1.ins_opemp = publ_operator
  241. dw_1.cardw_empid = sys_empid
  242. dw_1.cur_DataObject = dw_1.DataObject
  243. dw_1.uf_read_profile_layout()
  244. dw_2.settransobject(sqlca)
  245. dw_2.insertrow(0)
  246. wf_face()
  247. end event
  248. event resize;call super::resize;tv_1.Height = This.Height - dw_1.Y - 115
  249. dw_2.X = dw_1.X
  250. IF dw_1.RowCount() >= 40 THEN
  251. dw_2.Width = dw_1.Width - 60
  252. ELSE
  253. dw_2.Width = dw_1.Width
  254. END IF
  255. end event
  256. type cb_func from w_publ_easyq`cb_func within w_email_seach_cust
  257. boolean visible = false
  258. end type
  259. type cb_exit from w_publ_easyq`cb_exit within w_email_seach_cust
  260. integer x = 160
  261. end type
  262. type cb_2 from w_publ_easyq`cb_2 within w_email_seach_cust
  263. boolean visible = false
  264. boolean bringtotop = true
  265. end type
  266. type cb_psetup from w_publ_easyq`cb_psetup within w_email_seach_cust
  267. boolean visible = false
  268. boolean bringtotop = true
  269. end type
  270. type cb_1 from w_publ_easyq`cb_1 within w_email_seach_cust
  271. boolean bringtotop = true
  272. end type
  273. event cb_1::clicked;call super::clicked;
  274. dw_2.AcceptText()
  275. IF IsNull(dw_2.Object.u_cust_cusareaname_t[1]) THEN dw_2.Object.u_cust_cusareaname_t[1] = ""
  276. IF IsNull(dw_2.Object.u_cust_rep_email_t[1]) THEN dw_2.Object.u_cust_rep_email_t[1] = ""
  277. IF IsNull(dw_2.Object.cuscode_t[1]) THEN dw_2.Object.cuscode_t[1] = ""
  278. IF IsNull(dw_2.Object.name_t[1]) THEN dw_2.Object.name_t[1] = ""
  279. IF IsNull(dw_2.Object.custype_t[1]) THEN dw_2.Object.custype_t[1] = ""
  280. IF IsNull(dw_2.Object.u_cust_grade_t[1]) THEN dw_2.Object.u_cust_grade_t[1] = ""
  281. IF IsNull(dw_2.Object.u_cust_dscrp_t[1]) THEN dw_2.Object.u_cust_dscrp_t[1] = ""
  282. IF IsNull(dw_2.Object.u_cust_rep_repname_t[1]) THEN dw_2.Object.u_cust_rep_repname_t[1] = ""
  283. IF IsNull(dw_2.Object.u_cust_rep_sex_t[1]) THEN dw_2.Object.u_cust_rep_sex_t[1] = ""
  284. IF IsNull(dw_2.Object.u_cust_rep_deptname_t[1]) THEN dw_2.Object.u_cust_rep_deptname_t[1] = ""
  285. IF IsNull(dw_2.Object.u_cust_rep_duty_t[1]) THEN dw_2.Object.u_cust_rep_duty_t[1] = ""
  286. ls_u_cust_cusareaname = "%" +String(dw_2.Object.u_cust_cusareaname_t[1])+ "%"
  287. ls_u_cust_rep_email = "%" +String(dw_2.Object.u_cust_rep_email_t[1])+ "%"
  288. ls_cuscode = "%" +String(dw_2.Object.cuscode_t[1])+ "%"
  289. ls_name = "%" +String(dw_2.Object.name_t[1])+ "%"
  290. ls_custype = "%" +String(dw_2.Object.custype_t[1])+ "%"
  291. ls_u_cust_grade = "%" +String(dw_2.Object.u_cust_grade_t[1])+ "%"
  292. ls_u_cust_dscrp = "%" +String(dw_2.Object.u_cust_dscrp_t[1])+ "%"
  293. ls_u_cust_rep_repname = "%" +String(dw_2.Object.u_cust_rep_repname_t[1])+ "%"
  294. ls_u_cust_rep_sex = "%" +String(dw_2.Object.u_cust_rep_sex_t[1])+ "%"
  295. ls_u_cust_rep_deptname = "%" +String(dw_2.Object.u_cust_rep_deptname_t[1])+ "%"
  296. ls_u_cust_rep_duty = "%" +String(dw_2.Object.u_cust_rep_duty_t[1])+ "%"
  297. IF ls_u_cust_cusareaname <> "%%" THEN
  298. ls_areaname = ls_u_cust_cusareaname
  299. END IF
  300. dw_1.Retrieve(ls_areaname,ls_u_cust_rep_email,ls_cuscode,ls_name,ls_custype,ls_u_cust_grade,ls_u_cust_dscrp,ls_u_cust_rep_repname,ls_u_cust_rep_sex,ls_u_cust_rep_deptname,ls_u_cust_rep_duty)
  301. end event
  302. type st_3 from w_publ_easyq`st_3 within w_email_seach_cust
  303. boolean visible = false
  304. integer x = 608
  305. integer width = 315
  306. string text = "发生日期从:"
  307. alignment alignment = left!
  308. end type
  309. type st_4 from w_publ_easyq`st_4 within w_email_seach_cust
  310. boolean visible = false
  311. integer x = 1449
  312. end type
  313. type em_1 from w_publ_easyq`em_1 within w_email_seach_cust
  314. boolean visible = false
  315. integer x = 910
  316. integer width = 430
  317. integer textsize = -10
  318. string mask = "yyyy-mm"
  319. end type
  320. type em_2 from w_publ_easyq`em_2 within w_email_seach_cust
  321. boolean visible = false
  322. integer x = 1550
  323. integer width = 430
  324. integer textsize = -10
  325. string mask = "yyyy-mm"
  326. end type
  327. type ddlb_yl from w_publ_easyq`ddlb_yl within w_email_seach_cust
  328. boolean visible = false
  329. integer x = 1495
  330. integer y = 40
  331. end type
  332. type cbx_yl from w_publ_easyq`cbx_yl within w_email_seach_cust
  333. boolean visible = false
  334. integer x = 1285
  335. integer y = 44
  336. end type
  337. type dw_1 from w_publ_easyq`dw_1 within w_email_seach_cust
  338. event dwnlbuttonup pbm_dwnlbuttonup
  339. event mousemove pbm_dwnmousemove
  340. integer x = 855
  341. integer y = 300
  342. integer width = 2546
  343. integer height = 1792
  344. string dataobject = "dw_email_seach_cust"
  345. boolean hsplitscroll = false
  346. boolean livescroll = false
  347. end type
  348. event dw_1::mousemove;wf_face()
  349. end event
  350. event dw_1::clicked;IF row > 0 THEN
  351. This.SelectRow(0,False)
  352. This.SetRow(row)
  353. This.SelectRow(row,True)
  354. END IF
  355. b_Focus = False
  356. end event
  357. event dw_1::scrollhorizontal;call super::scrollhorizontal;wf_face()
  358. end event
  359. type sle_mtrl from w_publ_easyq`sle_mtrl within w_email_seach_cust
  360. end type
  361. type sle_cust from w_publ_easyq`sle_cust within w_email_seach_cust
  362. end type
  363. type st_mtrl from w_publ_easyq`st_mtrl within w_email_seach_cust
  364. end type
  365. type st_cust from w_publ_easyq`st_cust within w_email_seach_cust
  366. end type
  367. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_email_seach_cust
  368. end type
  369. type pb_em1 from w_publ_easyq`pb_em1 within w_email_seach_cust
  370. boolean visible = false
  371. integer x = 1344
  372. integer y = 184
  373. end type
  374. type pb_em2 from w_publ_easyq`pb_em2 within w_email_seach_cust
  375. boolean visible = false
  376. integer x = 1975
  377. integer y = 188
  378. end type
  379. type pb_2 from w_publ_easyq`pb_2 within w_email_seach_cust
  380. boolean visible = false
  381. integer x = 2583
  382. integer y = 60
  383. end type
  384. type cb_help from w_publ_easyq`cb_help within w_email_seach_cust
  385. boolean visible = false
  386. end type
  387. type cb_copyself from w_publ_easyq`cb_copyself within w_email_seach_cust
  388. boolean visible = false
  389. end type
  390. type gb_1 from w_publ_easyq`gb_1 within w_email_seach_cust
  391. end type
  392. type ln_bar from w_publ_easyq`ln_bar within w_email_seach_cust
  393. end type
  394. type ln_bar2 from w_publ_easyq`ln_bar2 within w_email_seach_cust
  395. end type
  396. type r_bar from w_publ_easyq`r_bar within w_email_seach_cust
  397. end type
  398. type ln_1 from w_publ_easyq`ln_1 within w_email_seach_cust
  399. end type
  400. type ln_2 from w_publ_easyq`ln_2 within w_email_seach_cust
  401. end type
  402. type ln_3 from w_publ_easyq`ln_3 within w_email_seach_cust
  403. end type
  404. type ln_4 from w_publ_easyq`ln_4 within w_email_seach_cust
  405. end type
  406. type cbx_1 from checkbox within w_email_seach_cust
  407. boolean visible = false
  408. integer x = 2409
  409. integer y = 204
  410. integer width = 585
  411. integer height = 76
  412. boolean bringtotop = true
  413. integer textsize = -9
  414. integer weight = 400
  415. fontcharset fontcharset = gb2312charset!
  416. fontpitch fontpitch = variable!
  417. string facename = "宋体"
  418. long textcolor = 16711680
  419. long backcolor = 134217739
  420. string text = "不显示无交易的客户"
  421. boolean checked = true
  422. end type
  423. type ddlb_1 from dropdownlistbox within w_email_seach_cust
  424. boolean visible = false
  425. integer x = 9
  426. integer y = 200
  427. integer width = 494
  428. integer height = 300
  429. integer taborder = 20
  430. boolean bringtotop = true
  431. integer textsize = -9
  432. integer weight = 400
  433. fontcharset fontcharset = gb2312charset!
  434. fontpitch fontpitch = variable!
  435. string facename = "宋体"
  436. long textcolor = 33554432
  437. string text = "格式一"
  438. boolean sorted = false
  439. string item[] = {"格式一","格式二"}
  440. borderstyle borderstyle = stylelowered!
  441. end type
  442. event selectionchanged;
  443. //IF THIS.Text = '格式二' THEN
  444. // ddlb_scid.Enabled = FALSE
  445. //ELSE
  446. // ddlb_scid.Enabled = TRUE
  447. //END IF
  448. IF THIS.Text = '格式一' THEN
  449. // IF sys_option_takepay_sc = 1 THEN
  450. dw_1.DataObject = 'dw_rp_musttake_balc_scid'
  451. // ELSE
  452. // dw_1.DataObject = 'dw_rp_musttake_balc'
  453. // END IF
  454. dw_1.ins_INIfile_name = sys_inifilename
  455. dw_1.ins_opemp = publ_operator
  456. dw_1.cardw_empid = sys_empid
  457. dw_1.cur_DataObject = dw_1.DataObject
  458. dw_1.uf_read_profile_layout()
  459. ELSE
  460. dw_1.uf_save_profile_layout()
  461. // IF sys_option_takepay_sc = 1 THEN
  462. dw_1.DataObject = 'dw_rp_musttake_balc_scid_2'
  463. // ELSE
  464. // dw_1.DataObject = 'dw_rp_musttake_balc_2'
  465. // END IF
  466. // dw_1.DataObject = 'dw_rp_musttake_balc_2'
  467. END IF
  468. dw_1.SetTransObject(sqlca)
  469. cb_1.triggerevent(clicked!)
  470. end event
  471. type tv_1 from uo_tv_cusarea within w_email_seach_cust
  472. integer y = 304
  473. integer width = 850
  474. integer height = 1520
  475. integer taborder = 60
  476. boolean bringtotop = true
  477. integer textsize = -9
  478. fontcharset fontcharset = gb2312charset!
  479. fontfamily fontfamily = anyfont!
  480. string facename = "宋体"
  481. end type
  482. event selectionchanged;call super::selectionchanged;ls_areaname = THIS.uo_cur_info.areaname
  483. ls_areaname = ls_areaname + '%'
  484. cb_1.TriggerEvent(Clicked!)
  485. end event
  486. type ddlb_scid from uo_ddlb_scid within w_email_seach_cust
  487. boolean visible = false
  488. integer x = 32
  489. integer y = 200
  490. integer width = 562
  491. integer height = 424
  492. integer taborder = 20
  493. boolean bringtotop = true
  494. end type
  495. event selectionchanged;call super::selectionchanged;cur_scid_arr = THIS.uo_scid_arr
  496. cb_1.triggerevent(clicked!)
  497. end event
  498. event constructor;call super::constructor;cur_scid_arr = THIS.uo_scid_arr
  499. end event
  500. type dw_2 from datawindow within w_email_seach_cust
  501. event dwnkey pbm_dwnkey
  502. integer x = 855
  503. integer y = 196
  504. integer width = 2546
  505. integer height = 192
  506. integer taborder = 30
  507. string title = "none"
  508. string dataobject = "dw_email_seach_seach"
  509. boolean hscrollbar = true
  510. boolean vscrollbar = true
  511. borderstyle borderstyle = stylelowered!
  512. end type
  513. event dwnkey;IF Key = KeyEnter! THEN
  514. cb_1.TriggerEvent(Clicked!)
  515. END IF
  516. end event
  517. event editchanged;cb_1.TriggerEvent(Clicked!)
  518. end event
  519. event clicked;b_Focus = True
  520. end event
  521. type cb_clear from uo_imflatbutton within w_email_seach_cust
  522. integer x = 1623
  523. integer width = 274
  524. integer height = 164
  525. integer taborder = 30
  526. boolean bringtotop = true
  527. string text = "清空条件"
  528. string normalpicname = "new.bmp"
  529. integer picsize = 16
  530. toolbaralignment pic_align = alignattop!
  531. boolean border = false
  532. end type
  533. event clicked;call super::clicked; dw_2.Object.u_cust_cusareaname_t[1] = ""
  534. dw_2.object.u_cust_rep_email_t[1] = ""
  535. dw_2.object.cuscode_t[1] = ""
  536. dw_2.object.name_t[1] = ""
  537. dw_2.object.custype_t[1] = ""
  538. dw_2.object.u_cust_grade_t[1] = ""
  539. dw_2.object.u_cust_dscrp_t[1] = ""
  540. dw_2.object.u_cust_rep_repname_t[1] = ""
  541. dw_2.object.u_cust_rep_sex_t[1] = ""
  542. dw_2.object.u_cust_rep_deptname_t[1] = ""
  543. dw_2.object.u_cust_rep_duty_t[1] = ""
  544. cb_1.TriggerEvent(Clicked!)
  545. end event
  546. type cb_3 from uo_imflatbutton within w_email_seach_cust
  547. integer x = 1339
  548. integer width = 274
  549. integer height = 164
  550. integer taborder = 40
  551. boolean bringtotop = true
  552. string text = "添加邮箱"
  553. string normalpicname = "caudit.bmp"
  554. integer picsize = 16
  555. toolbaralignment pic_align = alignattop!
  556. boolean border = false
  557. end type
  558. event clicked;call super::clicked;s_sendmx_parm s_sendmxx
  559. Long i,j
  560. dw_1.AcceptText()
  561. DO WHILE i < dw_1.RowCount()
  562. i++
  563. IF dw_1.Object.isselect[i] = 1 And Trim(dw_1.Object.u_cust_rep_email[i]) <> "" THEN
  564. j++
  565. s_sendmxx.sendmx[j].printid = i
  566. s_sendmxx.sendmx[j].sendid = 0
  567. s_sendmxx.sendmx[j].reltype = 1
  568. s_sendmxx.sendmx[j].Relid = 0
  569. s_sendmxx.sendmx[j].Revname = RightTrim(LeftTrim(dw_1.Object.u_cust_rep_repname[i]))
  570. s_sendmxx.sendmx[j].revaddress = RightTrim(LeftTrim(dw_1.Object.u_cust_rep_email[i]))
  571. s_sendmxx.sendmx[j].repname = RightTrim(LeftTrim(dw_1.Object.u_cust_rep_repname[i]))
  572. END IF
  573. LOOP
  574. CloseWithReturn(Parent, s_sendmxx)
  575. end event
  576. type cb_4 from uo_imflatbutton within w_email_seach_cust
  577. integer x = 855
  578. integer width = 233
  579. integer height = 164
  580. integer taborder = 50
  581. boolean bringtotop = true
  582. string text = "全选"
  583. string normalpicname = "ok.bmp"
  584. integer picsize = 16
  585. toolbaralignment pic_align = alignattop!
  586. boolean border = false
  587. end type
  588. event clicked;call super::clicked;Integer i
  589. TRY
  590. dw_2.AcceptText()
  591. FOR i = 1 To dw_1.RowCount()
  592. dw_1.Object.isselect[i] = 1
  593. NEXT
  594. Catch(RunTimeError e)
  595. END TRY
  596. end event
  597. type cb_5 from uo_imflatbutton within w_email_seach_cust
  598. integer x = 1097
  599. integer width = 233
  600. integer height = 164
  601. integer taborder = 60
  602. boolean bringtotop = true
  603. string text = "全不选"
  604. string normalpicname = "ok.bmp"
  605. integer picsize = 16
  606. toolbaralignment pic_align = alignattop!
  607. boolean border = false
  608. end type
  609. event clicked;call super::clicked;Integer i
  610. TRY
  611. dw_2.AcceptText()
  612. FOR i = 1 To dw_1.RowCount()
  613. dw_1.Object.isselect[i] = 0
  614. NEXT
  615. Catch(RunTimeError e)
  616. END TRY
  617. end event