w_cus_price.srw 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909
  1. $PBExportHeader$w_cus_price.srw
  2. forward
  3. global type w_cus_price from w_publ_pageretr
  4. end type
  5. type dw_child from datawindow within w_cus_price
  6. end type
  7. type dw_mtrl_newprice from u_dw_rbtnfilter within w_cus_price
  8. end type
  9. type cb_refresh from uo_imflatbutton within w_cus_price
  10. end type
  11. type dw_mtrl_cus_price from datawindow within w_cus_price
  12. end type
  13. type tv_1 from uo_tv_cusarea within w_cus_price
  14. end type
  15. type cb_help from uo_imflatbutton within w_cus_price
  16. end type
  17. type cb_print from uo_imflatbutton within w_cus_price
  18. end type
  19. type cb_billfunc from uo_imflatbutton within w_cus_price
  20. end type
  21. type r_bar from rectangle within w_cus_price
  22. end type
  23. type ln_bar from line within w_cus_price
  24. end type
  25. type ln_bar2 from line within w_cus_price
  26. end type
  27. type ln_1 from line within w_cus_price
  28. end type
  29. type ln_2 from line within w_cus_price
  30. end type
  31. type ln_5 from line within w_cus_price
  32. end type
  33. type ln_6 from line within w_cus_price
  34. end type
  35. end forward
  36. global type w_cus_price from w_publ_pageretr
  37. integer height = 2371
  38. string title = "客户产品价格"
  39. boolean maxbox = true
  40. windowstate windowstate = maximized!
  41. boolean if_ue_retr = true
  42. boolean if_ue_filter = true
  43. boolean if_ue_sort = true
  44. event ue_select_oldprice ( )
  45. event retr_mx1 ( )
  46. event retr_mx2 ( )
  47. event retr_mx3 ( )
  48. event ue_viewprint ( )
  49. event ue_del_his ( )
  50. event ue_del ( )
  51. event ue_add ( )
  52. dw_child dw_child
  53. dw_mtrl_newprice dw_mtrl_newprice
  54. cb_refresh cb_refresh
  55. dw_mtrl_cus_price dw_mtrl_cus_price
  56. tv_1 tv_1
  57. cb_help cb_help
  58. cb_print cb_print
  59. cb_billfunc cb_billfunc
  60. r_bar r_bar
  61. ln_bar ln_bar
  62. ln_bar2 ln_bar2
  63. ln_1 ln_1
  64. ln_2 ln_2
  65. ln_5 ln_5
  66. ln_6 ln_6
  67. end type
  68. global w_cus_price w_cus_price
  69. type variables
  70. long mtrl_id//物料ID
  71. long cus_id
  72. string cus_name
  73. string mtrl_name
  74. long cur_row
  75. long ll_row
  76. uo_cusprice uo_dell
  77. String ls_areaname = ''
  78. end variables
  79. event retr_mx1();long li_row
  80. li_row=dw_pageretr.getrow()
  81. if li_row=0 then
  82. dw_mtrl_newprice.reset()
  83. dw_child.reset()
  84. dw_mtrl_cus_price.reset()
  85. else
  86. cus_id=dw_pageretr.object.u_cust_cusid[li_row]
  87. cus_name=dw_pageretr.object.u_cust_name[li_row]
  88. if dw_mtrl_newprice.retrieve(cus_id) > 0 then
  89. dw_mtrl_newprice.selectrow(0,false)
  90. dw_mtrl_newprice.selectrow(1,true)
  91. end if
  92. this.triggerevent('retr_mx2')
  93. end if
  94. end event
  95. event retr_mx2();long li_row,ll_moneyid
  96. string ls_woodcode,ls_status,ls_pcode
  97. long ll_cusid
  98. decimal lde_fprice, lde_zqrate, lde_price
  99. li_row=dw_mtrl_newprice.getrow()
  100. if li_row=0 then
  101. dw_child.reset()
  102. dw_mtrl_cus_price.reset()
  103. else
  104. mtrl_id=dw_mtrl_newprice.object.u_cus_price_mtrlid[li_row]
  105. mtrl_name=dw_mtrl_newprice.object.u_mtrldef_mtrlname[li_row]
  106. ls_woodcode=dw_mtrl_newprice.object.u_cus_price_woodcode[li_row]
  107. ls_status=dw_mtrl_newprice.object.u_cus_price_status[li_row]
  108. ls_pcode=dw_mtrl_newprice.object.u_cus_price_pcode[li_row]
  109. ll_moneyid=dw_mtrl_newprice.object.u_cus_price_moneyid[li_row]
  110. ll_cusid = dw_mtrl_newprice.Object.u_cus_price_cusid[li_row]
  111. lde_fprice = dw_mtrl_newprice.Object.u_cus_price_fprice[li_row]
  112. lde_zqrate = dw_mtrl_newprice.Object.u_cus_price_zqrate[li_row]
  113. lde_price = dw_mtrl_newprice.Object.u_cus_price_price[li_row]
  114. if dw_mtrl_cus_price.retrieve(mtrl_id,ls_woodcode,ls_status,ls_pcode,ll_moneyid) > 0 then
  115. li_row = dw_mtrl_cus_price.find("u_cus_price_cusid = "+string(ll_cusid) &
  116. + "and u_cus_price_fprice = "+string(lde_fprice) &
  117. + "and u_cus_price_zqrate = "+string(lde_zqrate) &
  118. + "and u_cus_price_price = "+string(lde_price) , 1, dw_mtrl_cus_price.rowcount())
  119. dw_mtrl_cus_price.selectrow(0,false)
  120. if li_row > 0 then
  121. dw_mtrl_cus_price.SetRow(li_row)
  122. dw_mtrl_cus_price.SelectRow(li_row,TRUE)
  123. else
  124. dw_mtrl_cus_price.SetRow(1)
  125. dw_mtrl_cus_price.selectrow(1,true)
  126. end if
  127. end if
  128. this.triggerevent('retr_mx3')
  129. end if
  130. end event
  131. event retr_mx3();Long li_row,li_cusid,ll_moneyid,ll_mtrlid,mtrl_row
  132. String ls_woodcode,ls_status,ls_pcode
  133. String ls_cusname
  134. string arg_msg
  135. li_row = dw_mtrl_cus_price.GetRow()
  136. mtrl_row = dw_mtrl_newprice.GetRow()
  137. IF li_row = 0 THEN
  138. dw_child.Reset()
  139. ELSE
  140. li_cusid = dw_mtrl_cus_price.Object.u_cus_price_cusid[li_row]
  141. ls_woodcode = dw_mtrl_cus_price.Object.u_cus_price_woodcode[li_row]
  142. ls_status = dw_mtrl_cus_price.Object.u_cus_price_status[li_row]
  143. ls_pcode = dw_mtrl_cus_price.Object.u_cus_price_pcode[li_row]
  144. ll_moneyid = dw_mtrl_cus_price.Object.u_cus_price_moneyid[li_row]
  145. ll_mtrlid = dw_mtrl_newprice.object.u_cus_price_mtrlid[mtrl_row]
  146. ls_cusname = dw_mtrl_cus_price.Object.u_cust_name[li_row]
  147. dw_child.Title = "["+ls_cusname+"]"+" 客户-产品 历史销售价格列表"
  148. int ifpz = 7
  149. int ll_status = 0,ll_woodcode = 0,ll_pcode = 0
  150. //暂时三个配置
  151. // select price_ifpz into :ifpz from u_mtrldef where mtrlid = :ll_mtrlid;
  152. // IF sqlca.SQLCode <> 0 THEN
  153. // arg_msg = '因网络和其他原因查询失败'+sqlca.SQLErrText
  154. // messagebox('提示',arg_msg)
  155. // END IF
  156. choose case ifpz
  157. case 0
  158. case 1
  159. ll_status = 1
  160. case 2
  161. ll_woodcode = 1
  162. case 3
  163. ll_pcode = 1
  164. case 4
  165. ll_status = 1
  166. ll_woodcode = 1
  167. case 5
  168. ll_status = 1
  169. ll_pcode =1
  170. case 6
  171. ll_woodcode = 1
  172. ll_pcode = 1
  173. case else
  174. ll_status = 1
  175. ll_woodcode = 1
  176. ll_pcode = 1
  177. end choose
  178. IF dw_child.Retrieve(mtrl_id,li_cusid,ls_woodcode,ls_status,ls_pcode,ll_moneyid,ll_status,ll_woodcode,ll_pcode) > 0 THEN
  179. dw_child.SelectRow(0,FALSE)
  180. dw_child.SelectRow(1,TRUE)
  181. END IF
  182. END IF
  183. end event
  184. event ue_viewprint();IF NOT if_power_print THEN
  185. MessageBox(publ_operator,'你没有使用权限!')
  186. RETURN
  187. END IF
  188. Long ls_msgprintid
  189. String ls_newname = ''
  190. ls_msgprintid = Message.LongParm
  191. SELECT dft_new_dwname
  192. INTO :ls_newname
  193. FROM sys_dft_dwprint_dynamic
  194. Where sys_dft_dwprint_dynamic.dwprintid = :ls_msgprintid USING sqlca;
  195. IF sqlca.SQLCode <> 0 THEN
  196. ls_newname = ''
  197. END IF
  198. LONG LS_ROW
  199. LS_ROW=dw_pageretr.getrow()
  200. IF LS_ROW<=0 THEN
  201. MESSAGEBOX('提示','没有打印目标单据!',information!,ok!)
  202. RETURN
  203. END IF
  204. S_print_MSG LS_PRMSG
  205. IF ls_newname <> '' THEN
  206. LS_PRMSG.obj_dwNAME = ls_newname
  207. ELSE
  208. LS_PRMSG.obj_dwNAME = 'dw_rp_cus_mtrl_newprice'
  209. END IF
  210. LS_PRMSG.TAG_TEXT=this.title
  211. LS_PRMSG.FILTER_STRING = ''
  212. LS_PRMSG.retr_pram_falg=2
  213. LS_PRMSG.PAGECH_FLAG=0
  214. LS_PRMSG.retr_pramnmb=dw_pageretr.object.u_cust_cusid[LS_ROW]
  215. Openwithparm(w_publ_preview,LS_PRMSG)
  216. end event
  217. event ue_del_his();IF NOT f_power_ind(12) THEN
  218. MessageBox('提示','你没有使用权限!',information!,ok!)
  219. RETURN
  220. END IF
  221. IF NOT IsValid(w_del_hisprice) THEN
  222. s_edit_index_tran s_ch_tran //传递参数使用
  223. s_ch_tran.work_mode = 0
  224. OpenWithParm(w_del_hisprice,s_ch_tran)
  225. end if
  226. end event
  227. event ue_del();IF NOT f_power_ind(12) THEN
  228. MessageBox('提示','你没有使用权限!',information!,ok!)
  229. RETURN
  230. END IF
  231. Dec new_price = 0.0,zqrate
  232. Long mtrlid = 0
  233. Long cusid = 0,moneyid
  234. DateTime opdate
  235. String errmsg = ''
  236. String ls_woodcode,ls_status,ls_pcode,ls_unit
  237. Dec arg_price = 0.0
  238. cur_row = dw_child.GetRow()
  239. IF cur_row <= 0 THEN
  240. MessageBox('提示','没有可删除的数据',information!,ok!)
  241. RETURN
  242. END IF
  243. IF dw_child.Object.buildtype[dw_child.GetRow()] = 0 THEN
  244. MessageBox('提示','您要删除的历史价格不是手动添加的,不能删除',information!,ok!)
  245. RETURN
  246. END IF
  247. IF cur_row <> 1 THEN
  248. MessageBox('提示','被删除的产品历史销售价格必须是最后添加记录(第一条)',information!,ok!)
  249. RETURN
  250. END IF
  251. IF dw_child.RowCount() < 2 THEN
  252. new_price = 0.0
  253. zqrate = 1
  254. ELSE
  255. new_price = dw_child.Object.u_cus_price_mx_fprice[2]
  256. zqrate = dw_child.Object.u_cus_price_mx_zqrate[2]
  257. END IF
  258. mtrl_id = dw_child.Object.u_cus_price_MX_mtrlid[1]
  259. cus_id = dw_child.Object.u_cus_price_MX_cusid[1]
  260. opdate = dw_child.Object.u_cus_price_MX_opdate[1]
  261. ls_woodcode = dw_child.Object.woodcode[1]
  262. ls_status = dw_child.Object.status[1]
  263. ls_pcode = dw_child.Object.pcode[1]
  264. moneyid=dw_child.object.moneyid[1]
  265. ls_unit=dw_child.object.unit[1]
  266. //确认确实需要删除数据吗?
  267. IF MessageBox('询问','确认产品销售历史价格要删除吗',Question!,OkCancel!) = 1 THEN
  268. IF uo_dell.uf_del_sdcusprice(cus_id,mtrl_id,ls_unit,ls_woodcode,ls_status,ls_pcode,opdate,new_price,zqrate,moneyid,TRUE,errmsg) = 0 THEN
  269. MessageBox('错误',errmsg,stopsign!,ok!)
  270. RETURN
  271. END IF
  272. END IF
  273. cb_refresh.TriggerEvent(Clicked!)
  274. end event
  275. event ue_add();IF NOT f_power_ind(12) THEN
  276. MessageBox('提示','你没有使用权限!',information!,ok!)
  277. RETURN
  278. END IF
  279. IF dw_pageretr.GetRow() <= 0 THEN
  280. RETURN
  281. END IF
  282. s_insert_cusprice s_cusprice
  283. s_cusprice.cusid = dw_pageretr.Object.u_cust_cusid[dw_pageretr.GetRow()]
  284. IF dw_mtrl_newprice.RowCount() > 0 THEN
  285. s_cusprice.mtrlid = dw_mtrl_newprice.Object.u_cus_price_mtrlid[dw_mtrl_newprice.GetRow()]
  286. ELSE
  287. s_cusprice.mtrlid = 0
  288. END IF
  289. s_cusprice.cusname = dw_pageretr.Object.u_cust_name[dw_pageretr.GetRow()]
  290. IF dw_mtrl_newprice.RowCount() > 0 THEN
  291. s_cusprice.mtrlname = dw_mtrl_newprice.Object.u_mtrldef_mtrlname[dw_mtrl_newprice.GetRow()]
  292. ELSE
  293. s_cusprice.mtrlname = ''
  294. END IF
  295. OpenWithParm(w_add_mxnewprice,s_cusprice)
  296. cb_refresh.TriggerEvent(Clicked!)
  297. dw_edit_mode = FALSE
  298. end event
  299. on w_cus_price.create
  300. int iCurrent
  301. call super::create
  302. this.dw_child=create dw_child
  303. this.dw_mtrl_newprice=create dw_mtrl_newprice
  304. this.cb_refresh=create cb_refresh
  305. this.dw_mtrl_cus_price=create dw_mtrl_cus_price
  306. this.tv_1=create tv_1
  307. this.cb_help=create cb_help
  308. this.cb_print=create cb_print
  309. this.cb_billfunc=create cb_billfunc
  310. this.r_bar=create r_bar
  311. this.ln_bar=create ln_bar
  312. this.ln_bar2=create ln_bar2
  313. this.ln_1=create ln_1
  314. this.ln_2=create ln_2
  315. this.ln_5=create ln_5
  316. this.ln_6=create ln_6
  317. iCurrent=UpperBound(this.Control)
  318. this.Control[iCurrent+1]=this.dw_child
  319. this.Control[iCurrent+2]=this.dw_mtrl_newprice
  320. this.Control[iCurrent+3]=this.cb_refresh
  321. this.Control[iCurrent+4]=this.dw_mtrl_cus_price
  322. this.Control[iCurrent+5]=this.tv_1
  323. this.Control[iCurrent+6]=this.cb_help
  324. this.Control[iCurrent+7]=this.cb_print
  325. this.Control[iCurrent+8]=this.cb_billfunc
  326. this.Control[iCurrent+9]=this.r_bar
  327. this.Control[iCurrent+10]=this.ln_bar
  328. this.Control[iCurrent+11]=this.ln_bar2
  329. this.Control[iCurrent+12]=this.ln_1
  330. this.Control[iCurrent+13]=this.ln_2
  331. this.Control[iCurrent+14]=this.ln_5
  332. this.Control[iCurrent+15]=this.ln_6
  333. end on
  334. on w_cus_price.destroy
  335. call super::destroy
  336. destroy(this.dw_child)
  337. destroy(this.dw_mtrl_newprice)
  338. destroy(this.cb_refresh)
  339. destroy(this.dw_mtrl_cus_price)
  340. destroy(this.tv_1)
  341. destroy(this.cb_help)
  342. destroy(this.cb_print)
  343. destroy(this.cb_billfunc)
  344. destroy(this.r_bar)
  345. destroy(this.ln_bar)
  346. destroy(this.ln_bar2)
  347. destroy(this.ln_1)
  348. destroy(this.ln_2)
  349. destroy(this.ln_5)
  350. destroy(this.ln_6)
  351. end on
  352. event ue_before_open;dw_mtrl_newprice.SetTransObject(sqlca)
  353. dw_child.SetTransObject(sqlca)
  354. dw_mtrl_cus_price.SetTransObject(sqlca)
  355. uo_dell = CREATE uo_cusprice
  356. end event
  357. event ue_usual_query_filt;string obj_expr=''
  358. if trim(sle_usual_query.text)<>'' then
  359. IF POS(trim(sle_usual_query.text),'%')=0 THEN
  360. obj_expr=obj_expr+'( u_cust_cuscode LIKE "%'+trim(sle_usual_query.text)+'%" )'
  361. ELSE
  362. obj_expr=obj_expr+'( u_cust_cuscode LIKE "'+trim(sle_usual_query.text)+'" )'
  363. END IF
  364. end if
  365. dw_pageretr.setfilter(obj_expr)
  366. dw_pageretr.SetRedraw(False)
  367. dw_pageretr.filter()
  368. if dw_pageretr.rowcount()>=1 then
  369. dw_pageretr.selectrow(0,false)
  370. dw_pageretr.selectrow(1,true)
  371. end if
  372. dw_pageretr.SetRedraw(TRUE)
  373. end event
  374. event ue_usual_query_retr;call super::ue_usual_query_retr;string ls_querystrpart=''
  375. ls_newselect=lower(ori_oldselect)
  376. if trim(sle_usual_query.text)<>'' then
  377. if pos(trim(sle_usual_query.text),'%')=0 then
  378. ls_querystrpart="( u_cust.cuscode like '%"+trim(sle_usual_query.text)+"%')"
  379. else
  380. ls_querystrpart="(u_cust.cuscode like '"+trim(sle_usual_query.text)+"')"
  381. end if
  382. if Pos(ls_newselect," where ") <> 0 then
  383. ls_newselect=ls_newselect+" AND ("+ls_querystrpart+')'
  384. else
  385. ls_newselect=ls_newselect+" where ("+ls_querystrpart+')'
  386. end if
  387. end if
  388. wf_retrieveuc(dw_pageretr,ls_newselect,1) //注意必须有此句
  389. end event
  390. event ue_sort;call super::ue_sort;OPENwithparm(w_sortrow,dw_pageretr)
  391. STRING LS_EXPR
  392. LS_EXPR=Message.StringParm
  393. IF ISNULL(LS_EXPR) THEN LS_EXPR=' '
  394. if len(LS_EXPR)>2 and trim(LS_EXPR)='' then return
  395. dw_pageretr.setsort(LS_EXPR)
  396. dw_pageretr.SetRedraw (false)
  397. dw_pageretr.sort()
  398. dw_pageretr.SetRedraw (true)
  399. end event
  400. event ue_sentdataout;call super::ue_sentdataout;IF NOT if_power_sendout THEN
  401. MessageBox(publ_operator,'你没有使用权限!')
  402. RETURN
  403. END IF
  404. OPENWITHPARM(w_sentdataout,dw_pageretr)
  405. end event
  406. event ue_filter;call super::ue_filter;OPENWITHPARM(w_filter_query,dw_pageretr)
  407. STRING LS_EXPR
  408. LS_EXPR=Message.StringParm
  409. if len(LS_EXPR)>2 and trim(LS_EXPR)='' then return
  410. dw_pageretr.setfilter(LS_EXPR)
  411. dw_pageretr.SetRedraw (false)
  412. dw_pageretr.filter()
  413. dw_pageretr.SetRedraw (TRUE)
  414. end event
  415. event retrieve_pageretr;Boolean cb_firstpage_enabled,cb_nextpage_enabled,cb_retrieveall_enabled
  416. Boolean cb_priorpage_enabled,cb_func_enabled,cb_retrieve_enabled
  417. cb_nextpage_enabled = cb_nextpage.Enabled
  418. cb_retrieveall_enabled = cb_retrieveall.Enabled
  419. cb_func_enabled = cb_func.Enabled
  420. cb_nextpage.Enabled = False
  421. cb_retrieveall.Enabled = False
  422. cb_func.Enabled = False
  423. SetPointer(HourGlass!)
  424. dw_pageretr.Retrieve(sys_areaid,ls_areaname,sys_option_outrep,sys_user_outrep)
  425. IF dw_pageretr.RowCount() > 0 And dw_pageretr.GetRow() = 0 THEN dw_pageretr.SetRow(1)
  426. SetPointer(Arrow!)
  427. This.TriggerEvent('retr_mx1')
  428. cb_nextpage.Enabled = cb_nextpage_enabled
  429. cb_retrieveall.Enabled = cb_retrieveall_enabled
  430. cb_func.Enabled = cb_func_enabled
  431. end event
  432. event resize;call super::resize;ln_bar.EndX = THIS.Width
  433. ln_bar2.EndX = THIS.Width
  434. ln_1.EndX = THIS.Width
  435. ln_2.EndX = THIS.Width
  436. r_bar.Width = THIS.Width
  437. Long w_width,w_height
  438. w_width = 3600
  439. w_height = 2300
  440. IF newwidth < w_width THEN THIS.Width = w_width
  441. IF newheight < w_height THEN THIS.Height = w_height
  442. dw_child.Width = THIS.Width - (w_width - 1847)
  443. dw_mtrl_newprice.Width = THIS.Width - (w_width - 1847)
  444. dw_mtrl_newprice.Height = THIS.Height - (w_height - 1116)
  445. dw_pageretr.Height = THIS.Height - (w_height - 1116)
  446. tv_1.Height = THIS.Height - (w_height - 1116)
  447. dw_mtrl_cus_price.Y = THIS.Height - (w_height - 1424)
  448. dw_child.Y = THIS.Height - (w_height - 1424)
  449. end event
  450. event key;call super::key;IF KeyDown(KeyF1!) THEN
  451. cb_help.TriggerEvent(clicked!)
  452. end if
  453. end event
  454. type cb_func from w_publ_pageretr`cb_func within w_cus_price
  455. integer x = 150
  456. integer y = 0
  457. integer width = 150
  458. integer height = 163
  459. end type
  460. type cb_exit from w_publ_pageretr`cb_exit within w_cus_price
  461. integer x = 878
  462. integer y = 0
  463. integer width = 150
  464. integer height = 163
  465. integer picsize = 16
  466. toolbaralignment pic_align = alignattop!
  467. boolean border = false
  468. end type
  469. type sle_usual_query from w_publ_pageretr`sle_usual_query within w_cus_price
  470. integer x = 230
  471. integer y = 192
  472. integer height = 96
  473. boolean bringtotop = true
  474. end type
  475. type cb_retrieveall from w_publ_pageretr`cb_retrieveall within w_cus_price
  476. integer x = 1346
  477. integer width = 150
  478. integer height = 163
  479. integer taborder = 140
  480. string normalpicname = "p1.ico"
  481. integer picsize = 16
  482. toolbaralignment pic_align = alignattop!
  483. boolean border = false
  484. end type
  485. type em_pagerowno from w_publ_pageretr`em_pagerowno within w_cus_price
  486. integer x = 1028
  487. integer y = 48
  488. integer width = 315
  489. integer taborder = 70
  490. boolean bringtotop = true
  491. end type
  492. type dw_pageretr from w_publ_pageretr`dw_pageretr within w_cus_price
  493. integer x = 764
  494. integer y = 301
  495. integer width = 918
  496. integer height = 1133
  497. string title = "客户列表"
  498. string dataobject = "dw_cus"
  499. end type
  500. event dw_pageretr::rowfocuschanged;call super::rowfocuschanged;//dw_edit_mode=false
  501. if currentrow>0 then
  502. this.selectrow(0,false)
  503. this.selectrow(currentrow,true)
  504. end if
  505. parent.triggerevent('retr_mx1')
  506. end event
  507. type st_1 from w_publ_pageretr`st_1 within w_cus_price
  508. integer x = 37
  509. integer y = 211
  510. integer width = 216
  511. integer height = 58
  512. end type
  513. type cb_nextpage from w_publ_pageretr`cb_nextpage within w_cus_price
  514. integer x = 1496
  515. integer width = 66
  516. integer height = 163
  517. integer taborder = 170
  518. toolbaralignment pic_align = alignattop!
  519. boolean border = false
  520. end type
  521. type dw_child from datawindow within w_cus_price
  522. integer x = 1686
  523. integer y = 1424
  524. integer width = 1847
  525. integer height = 720
  526. integer taborder = 80
  527. boolean bringtotop = true
  528. boolean titlebar = true
  529. string title = "客户-产品 历史销售价格列表"
  530. string dataobject = "dw_cus_mtrl_oldprice"
  531. boolean maxbox = true
  532. boolean hscrollbar = true
  533. boolean vscrollbar = true
  534. boolean border = false
  535. boolean livescroll = true
  536. borderstyle borderstyle = stylelowered!
  537. end type
  538. event rowfocuschanged;if currentrow>0 then
  539. this.selectrow(0,false)
  540. this.selectrow(currentrow,true)
  541. end if
  542. end event
  543. event constructor;f_title_change(this)
  544. end event
  545. type dw_mtrl_newprice from u_dw_rbtnfilter within w_cus_price
  546. integer x = 1686
  547. integer y = 314
  548. integer width = 1847
  549. integer height = 1117
  550. integer taborder = 30
  551. boolean bringtotop = true
  552. boolean titlebar = true
  553. string title = "客户-产品 最新销售价格列表"
  554. string dataobject = "dw_cus_mtrlnewprice"
  555. boolean maxbox = true
  556. boolean hscrollbar = true
  557. boolean vscrollbar = true
  558. boolean border = false
  559. end type
  560. event rowfocuschanged;if currentrow>0 then
  561. this.selectrow(0,false)
  562. this.selectrow(currentrow,true)
  563. end if
  564. parent.triggerevent('retr_mx2')
  565. end event
  566. event constructor;call super::constructor; titleclick_sort_use=true //单击标题排序功能开关
  567. RBUTTON_FILTER_USE=true //右键查询功能开关
  568. end event
  569. type cb_refresh from uo_imflatbutton within w_cus_price
  570. integer width = 165
  571. integer height = 163
  572. integer taborder = 160
  573. string text = "刷新"
  574. string normalpicname = "refresh.bmp"
  575. integer picsize = 16
  576. toolbaralignment pic_align = alignattop!
  577. boolean border = false
  578. end type
  579. event clicked;call super::clicked;parent.triggerevent('retr_mx1')
  580. parent.triggerevent('retr_mx2')
  581. parent.triggerevent('retr_mx3')
  582. end event
  583. type dw_mtrl_cus_price from datawindow within w_cus_price
  584. integer y = 1424
  585. integer width = 1690
  586. integer height = 720
  587. integer taborder = 90
  588. boolean bringtotop = true
  589. boolean titlebar = true
  590. string title = "产品-客户 最新销售价格列表"
  591. string dataobject = "dw_mtrl_cus_price"
  592. boolean maxbox = true
  593. boolean hscrollbar = true
  594. boolean vscrollbar = true
  595. boolean border = false
  596. boolean livescroll = true
  597. end type
  598. event rowfocuschanged;if currentrow>0 then
  599. this.selectrow(0,false)
  600. this.selectrow(currentrow,true)
  601. end if
  602. parent.triggerevent('retr_mx3')
  603. end event
  604. event constructor;f_title_change(this)
  605. end event
  606. type tv_1 from uo_tv_cusarea within w_cus_price
  607. integer y = 314
  608. integer width = 761
  609. integer height = 1117
  610. integer taborder = 60
  611. boolean bringtotop = true
  612. integer textsize = -9
  613. fontcharset fontcharset = gb2312charset!
  614. fontfamily fontfamily = anyfont!
  615. string facename = "宋体"
  616. end type
  617. event selectionchanged;call super::selectionchanged;
  618. ls_areaname = THIS.uo_cur_info.areaname
  619. ls_areaname = ls_areaname + '%'
  620. PARENT.TriggerEvent('retrieve_pageretr')
  621. end event
  622. type cb_help from uo_imflatbutton within w_cus_price
  623. string tag = "帮助[F1]"
  624. integer x = 728
  625. integer width = 150
  626. integer height = 163
  627. integer taborder = 40
  628. boolean bringtotop = true
  629. string text = "帮助"
  630. string normalpicname = "help.bmp"
  631. integer picsize = 16
  632. toolbaralignment pic_align = alignattop!
  633. boolean border = false
  634. end type
  635. type cb_print from uo_imflatbutton within w_cus_price
  636. integer x = 578
  637. integer width = 150
  638. integer height = 163
  639. integer taborder = 50
  640. boolean bringtotop = true
  641. string text = "打印"
  642. string normalpicname = "print.bmp"
  643. integer picsize = 16
  644. toolbaralignment pic_align = alignattop!
  645. boolean border = false
  646. end type
  647. event clicked;call super::clicked;String ls_dft_old_dwname, ls_dft_new_dwname,ls_chnname,ls_dwtype
  648. Long ls_dwprintid
  649. string ls_windowname
  650. Int ls_i
  651. w_curwin = PARENT
  652. ls_windowname = parent.Classname ( )
  653. DECLARE dft_dwprint CURSOR FOR
  654. SELECT dwprintid,dft_old_dwname, dft_new_dwname, chnname, dwtype
  655. FROM sys_dft_dwprint_dynamic
  656. Where dwtype = :ls_windowname;
  657. OPEN dft_dwprint;
  658. FETCH dft_dwprint INTO :ls_dwprintid,:ls_dft_old_dwname, :ls_dft_new_dwname,:ls_chnname, :ls_dwtype;
  659. IF sqlca.SQLCode <> 0 THEN
  660. PARENT.TriggerEvent('ue_viewprint',0,0)
  661. ELSE
  662. m_dft_dwprint_item m_1
  663. m_1 = CREATE m_dft_dwprint_item
  664. ls_i = 1
  665. DO WHILE sqlca.SQLCode = 0
  666. f_add_menuItem_dft(m_1,ls_i,ls_chnname,String(ls_dwprintid))
  667. FETCH dft_dwprint INTO :ls_dwprintid,:ls_dft_old_dwname, :ls_dft_new_dwname,:ls_chnname, :ls_dwtype;
  668. ls_i++
  669. LOOP
  670. CLOSE dft_dwprint;
  671. m_1.PopMenu(THIS.X+50,THIS.Y+50)
  672. END IF
  673. end event
  674. type cb_billfunc from uo_imflatbutton within w_cus_price
  675. integer x = 304
  676. integer width = 274
  677. integer height = 163
  678. integer taborder = 150
  679. boolean bringtotop = true
  680. string text = "辅助功能"
  681. string normalpicname = "update.BMP"
  682. integer picsize = 16
  683. toolbaralignment pic_align = alignattop!
  684. boolean border = false
  685. end type
  686. event clicked;call super::clicked;m_Dfc_Control_PopupMenu dmPopupMenu
  687. String menustr
  688. menustr = "Text=添加~tEvent=ue_add"
  689. menustr = menustr + "|" + "Text=删除~tEvent=ue_del"
  690. menustr = menustr + "|" + "Text=-"
  691. menustr = menustr + "|" + "Text=按月删除~tEvent=ue_del_his"
  692. //menustr = menustr + "|" + "Text=超级删除~tEvent=ue_del_super"
  693. IF Len(Trim(menustr)) <> 0 THEN
  694. dmPopupMenu = CREATE m_Dfc_Control_PopupMenu
  695. dmPopupMenu.mf_BuildMenu(THIS, menustr)
  696. dmPopupMenu.mf_PopMenu()
  697. DESTROY dmPopupMenu
  698. END IF
  699. end event
  700. type r_bar from rectangle within w_cus_price
  701. long linecolor = 16777215
  702. long fillcolor = 1073741824
  703. integer x = 3200
  704. integer width = 73
  705. integer height = 173
  706. end type
  707. event constructor;this.fillcolor = 14215660
  708. this.linecolor = 14215660
  709. this.x = -1
  710. this.y = -1
  711. this.height = ln_bar2.beginy - 5
  712. end event
  713. type ln_bar from line within w_cus_price
  714. long linecolor = 268435456
  715. integer linethickness = 4
  716. integer beginy = 176
  717. integer endx = 3430
  718. integer endy = 176
  719. end type
  720. type ln_bar2 from line within w_cus_price
  721. long linecolor = 16777215
  722. integer linethickness = 4
  723. integer beginy = 179
  724. integer endx = 3430
  725. integer endy = 179
  726. end type
  727. type ln_1 from line within w_cus_price
  728. long linecolor = 268435456
  729. integer linethickness = 4
  730. integer beginy = 301
  731. integer endx = 3430
  732. integer endy = 301
  733. end type
  734. type ln_2 from line within w_cus_price
  735. long linecolor = 16777215
  736. integer linethickness = 4
  737. integer beginy = 304
  738. integer endx = 3430
  739. integer endy = 304
  740. end type
  741. type ln_5 from line within w_cus_price
  742. boolean visible = false
  743. long linecolor = 268435456
  744. integer beginx = 1477
  745. integer endx = 1477
  746. integer endy = 176
  747. end type
  748. type ln_6 from line within w_cus_price
  749. boolean visible = false
  750. long linecolor = 16777215
  751. integer beginx = 1481
  752. integer endx = 1481
  753. integer endy = 179
  754. end type