w_rp_saletask_sc_card.srw 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405
  1. $PBExportHeader$w_rp_saletask_sc_card.srw
  2. forward
  3. global type w_rp_saletask_sc_card from w_publ_easyq
  4. end type
  5. type ddlb_1 from dropdownlistbox within w_rp_saletask_sc_card
  6. end type
  7. type ddlb_scid from uo_ddlb_scid within w_rp_saletask_sc_card
  8. end type
  9. type st_5 from statictext within w_rp_saletask_sc_card
  10. end type
  11. type ddlb_status from uo_ddlb_status within w_rp_saletask_sc_card
  12. end type
  13. end forward
  14. global type w_rp_saletask_sc_card from w_publ_easyq
  15. integer width = 3913
  16. string title = "流程卡统计表"
  17. ddlb_1 ddlb_1
  18. ddlb_scid ddlb_scid
  19. st_5 st_5
  20. ddlb_status ddlb_status
  21. end type
  22. global w_rp_saletask_sc_card w_rp_saletask_sc_card
  23. type variables
  24. Int cur_status = 1
  25. Int cur_stattype = 0
  26. Long cur_scid_arr[]
  27. end variables
  28. on w_rp_saletask_sc_card.create
  29. int iCurrent
  30. call super::create
  31. this.ddlb_1=create ddlb_1
  32. this.ddlb_scid=create ddlb_scid
  33. this.st_5=create st_5
  34. this.ddlb_status=create ddlb_status
  35. iCurrent=UpperBound(this.Control)
  36. this.Control[iCurrent+1]=this.ddlb_1
  37. this.Control[iCurrent+2]=this.ddlb_scid
  38. this.Control[iCurrent+3]=this.st_5
  39. this.Control[iCurrent+4]=this.ddlb_status
  40. end on
  41. on w_rp_saletask_sc_card.destroy
  42. call super::destroy
  43. destroy(this.ddlb_1)
  44. destroy(this.ddlb_scid)
  45. destroy(this.st_5)
  46. destroy(this.ddlb_status)
  47. end on
  48. event close;call super::close;//dw_1.uf_save_profile_layout()
  49. f_SetProfileString(sys_empid, dw_1.DataObject, "cur_stattype", String(cur_stattype))
  50. end event
  51. event ue_before_openretrieve;call super::ue_before_openretrieve;EM_1.Text = String(Today(),'yyyy-mm')+'-01'
  52. EM_2.Text = String(Today(),'YYYY-MM-DD')
  53. String ls_windowname
  54. ls_windowname = This.ClassName ( )
  55. String ls_old_dwname,ls_new_dwname = ''
  56. ls_old_dwname = dw_1.DataObject
  57. ls_new_dwname = f_get_dwprint_dynamic_chname(ls_old_dwname,ls_windowname)
  58. IF ls_new_dwname = '' THEN
  59. ls_new_dwname = ls_old_dwname
  60. END IF
  61. dw_1.DataObject = ls_new_dwname
  62. dw_1.SetTransObject(sqlca)
  63. dw_1.TriggerEvent("constructor")
  64. end event
  65. type cb_func from w_publ_easyq`cb_func within w_rp_saletask_sc_card
  66. end type
  67. event cb_func::clicked;m_Dfc_Control_PopupMenu dmPopupMenu
  68. String menustr
  69. IF if_ue_retr THEN
  70. menustr = "Text=查询~tEvent=ue_retr"
  71. END IF
  72. IF if_ue_filter THEN
  73. IF Len(Trim(menustr)) = 0 THEN
  74. menustr = "Text=高级筛选~tEvent=ue_filter"
  75. ELSE
  76. menustr = menustr + "|" + "Text=高级筛选~tEvent=ue_filter"
  77. END IF
  78. END IF
  79. IF if_ue_sort THEN
  80. IF Len(Trim(menustr)) = 0 THEN
  81. menustr = "Text=排序~tEvent=ue_sort"
  82. ELSE
  83. menustr = menustr + "|" + "Text=排序~tEvent=ue_sort"
  84. END IF
  85. END IF
  86. IF menustr <> "" AND if_ue_sentdataout THEN menustr = menustr + "|" + "Text=-"
  87. IF if_ue_sentdataout THEN
  88. IF Len(Trim(menustr)) = 0 THEN
  89. menustr = "Text=数据发送~tEvent=ue_sentdataout"
  90. ELSE
  91. menustr = menustr + "|" + "Text=数据发送~tEvent=ue_sentdataout"
  92. END IF
  93. END IF
  94. IF menustr <> "" THEN menustr = menustr + "|" + "Text=-"
  95. IF Len(Trim(menustr)) = 0 THEN
  96. menustr = "Text=页面设置~tEvent=ue_psetup"
  97. ELSE
  98. menustr = menustr + "|" + "Text=页面设置~tEvent=ue_psetup"
  99. END IF
  100. IF Len(Trim(menustr)) <> 0 THEN
  101. dmPopupMenu = CREATE m_Dfc_Control_PopupMenu
  102. dmPopupMenu.mf_BuildMenu(THIS, menustr)
  103. dmPopupMenu.mf_PopMenu()
  104. DESTROY dmPopupMenu
  105. END IF
  106. end event
  107. type cb_exit from w_publ_easyq`cb_exit within w_rp_saletask_sc_card
  108. end type
  109. type cb_2 from w_publ_easyq`cb_2 within w_rp_saletask_sc_card
  110. boolean bringtotop = true
  111. end type
  112. event cb_2::clicked;IF DW_1.RowCount() >= 1 THEN
  113. cbx_YL.Checked = TRUE
  114. cbx_YL.TriggerEvent(Clicked!)
  115. OpenWithParm(w_sys_printpagesetting,DW_1)
  116. ELSE
  117. MessageBox('提示','数据窗口中没有任何记录,不能打印!',information!,OK!)
  118. END IF
  119. IF Trim(DW_1.DataObject) = '' THEN RETURN
  120. f_SetProfileString (sys_empid,DW_1.DataObject, "MARGIN_TOP", String(DW_1.Object.DataWindow.Print.MARGIN.Top))
  121. f_SetProfileString (sys_empid,DW_1.DataObject, "MARGIN_LEFT", String(DW_1.Object.DataWindow.Print.MARGIN.Left))
  122. f_SetProfileString (sys_empid,DW_1.DataObject, "MARGIN_BOTTOM", String(DW_1.Object.DataWindow.Print.MARGIN.BOTTOM))
  123. f_SetProfileString (sys_empid,DW_1.DataObject, "MARGIN_RIGHT", String(DW_1.Object.DataWindow.Print.MARGIN.Right))
  124. end event
  125. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_saletask_sc_card
  126. boolean bringtotop = true
  127. end type
  128. type cb_1 from w_publ_easyq`cb_1 within w_rp_saletask_sc_card
  129. boolean bringtotop = true
  130. end type
  131. event cb_1::clicked;call super::clicked;datetime firstdate,enddate
  132. firstdate = DATEtime(date(EM_1.TEXT),time(0))
  133. enddate = datetime(date(EM_2.TEXT),time('23:59:59'))
  134. dw_1.Retrieve(cur_scid_arr,cur_status,cur_stattype,firstdate,enddate)
  135. end event
  136. type st_3 from w_publ_easyq`st_3 within w_rp_saletask_sc_card
  137. integer x = 1765
  138. integer y = 200
  139. integer width = 215
  140. alignment alignment = left!
  141. end type
  142. type st_4 from w_publ_easyq`st_4 within w_rp_saletask_sc_card
  143. integer x = 2478
  144. integer y = 200
  145. end type
  146. type em_1 from w_publ_easyq`em_1 within w_rp_saletask_sc_card
  147. integer x = 1975
  148. integer y = 184
  149. end type
  150. type em_2 from w_publ_easyq`em_2 within w_rp_saletask_sc_card
  151. integer x = 2578
  152. integer y = 184
  153. end type
  154. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_saletask_sc_card
  155. integer x = 1527
  156. integer y = 12
  157. end type
  158. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_saletask_sc_card
  159. integer x = 1289
  160. integer y = 16
  161. integer width = 238
  162. end type
  163. type dw_1 from w_publ_easyq`dw_1 within w_rp_saletask_sc_card
  164. integer y = 292
  165. integer width = 2967
  166. integer height = 1724
  167. string dataobject = "dw_rp_saletask_sc_card"
  168. end type
  169. event dw_1::doubleclicked;call super::doubleclicked;IF not dw_edit_mode THEN
  170. IF row > 0 THEN
  171. String ls_code
  172. Long ll_scid
  173. ll_scid = THIS.Object.u_saletask_scid[row]
  174. ls_code = THIS.Object.u_saletask_taskcode[row]
  175. f_open_win(ll_scid,ls_code)
  176. END IF
  177. END IF
  178. end event
  179. event dw_1::clicked;call super::clicked;this.setrow(row)
  180. THIS.SelectRow(0,FALSE)
  181. THIS.SelectRow(row,TRUE)
  182. end event
  183. type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_saletask_sc_card
  184. integer x = 1943
  185. integer y = 1252
  186. end type
  187. type sle_cust from w_publ_easyq`sle_cust within w_rp_saletask_sc_card
  188. integer x = 402
  189. integer y = 1000
  190. end type
  191. type st_mtrl from w_publ_easyq`st_mtrl within w_rp_saletask_sc_card
  192. integer x = 1253
  193. integer y = 1156
  194. end type
  195. type st_cust from w_publ_easyq`st_cust within w_rp_saletask_sc_card
  196. integer x = 1435
  197. integer y = 1088
  198. end type
  199. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_saletask_sc_card
  200. integer x = 1289
  201. end type
  202. type pb_em1 from w_publ_easyq`pb_em1 within w_rp_saletask_sc_card
  203. integer x = 2386
  204. integer y = 184
  205. end type
  206. type pb_em2 from w_publ_easyq`pb_em2 within w_rp_saletask_sc_card
  207. integer x = 2999
  208. integer y = 184
  209. end type
  210. type pb_2 from w_publ_easyq`pb_2 within w_rp_saletask_sc_card
  211. integer x = 3109
  212. integer y = 184
  213. end type
  214. type cb_help from w_publ_easyq`cb_help within w_rp_saletask_sc_card
  215. end type
  216. type cb_copyself from w_publ_easyq`cb_copyself within w_rp_saletask_sc_card
  217. end type
  218. type gb_1 from w_publ_easyq`gb_1 within w_rp_saletask_sc_card
  219. end type
  220. type ln_bar from w_publ_easyq`ln_bar within w_rp_saletask_sc_card
  221. end type
  222. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_saletask_sc_card
  223. end type
  224. type r_bar from w_publ_easyq`r_bar within w_rp_saletask_sc_card
  225. integer x = 3799
  226. end type
  227. type ln_1 from w_publ_easyq`ln_1 within w_rp_saletask_sc_card
  228. integer beginy = 284
  229. integer endy = 284
  230. end type
  231. type ln_2 from w_publ_easyq`ln_2 within w_rp_saletask_sc_card
  232. integer beginy = 288
  233. integer endy = 288
  234. end type
  235. type ln_3 from w_publ_easyq`ln_3 within w_rp_saletask_sc_card
  236. integer beginy = 300
  237. integer endy = 300
  238. end type
  239. type ln_4 from w_publ_easyq`ln_4 within w_rp_saletask_sc_card
  240. integer beginy = 304
  241. integer endy = 304
  242. end type
  243. type ddlb_1 from dropdownlistbox within w_rp_saletask_sc_card
  244. integer x = 1339
  245. integer y = 188
  246. integer width = 407
  247. integer height = 300
  248. integer taborder = 110
  249. boolean bringtotop = true
  250. integer textsize = -9
  251. integer weight = 400
  252. fontcharset fontcharset = gb2312charset!
  253. fontpitch fontpitch = variable!
  254. string facename = "宋体"
  255. long textcolor = 33554432
  256. string text = "按订货日期"
  257. boolean sorted = false
  258. string item[] = {"按订货日期","按交货日期"}
  259. borderstyle borderstyle = stylelowered!
  260. end type
  261. event selectionchanged;if this.text = '按订货日期' then
  262. cur_stattype = 0
  263. else
  264. cur_stattype = 1
  265. end if
  266. cb_1.triggerevent(clicked!)
  267. end event
  268. event constructor;cur_stattype = Long(f_ProfileString(sys_empid, dw_1.DataObject, "cur_stattype", "0"))
  269. CHOOSE CASE cur_stattype
  270. CASE 0
  271. this.Text = "按订货日期"
  272. CASE 1
  273. this.Text = "按交货日期"
  274. END CHOOSE
  275. end event
  276. type ddlb_scid from uo_ddlb_scid within w_rp_saletask_sc_card
  277. integer y = 188
  278. integer width = 549
  279. integer height = 620
  280. integer taborder = 90
  281. boolean bringtotop = true
  282. end type
  283. event constructor;call super::constructor;cur_scid_arr = THIS.uo_scid_arr
  284. end event
  285. event selectionchanged;call super::selectionchanged;cur_scid_arr = THIS.uo_scid_arr
  286. cb_1.triggerevent(clicked!)
  287. end event
  288. type st_5 from statictext within w_rp_saletask_sc_card
  289. integer x = 585
  290. integer y = 204
  291. integer width = 343
  292. integer height = 48
  293. boolean bringtotop = true
  294. integer textsize = -9
  295. integer weight = 400
  296. fontcharset fontcharset = gb2312charset!
  297. fontpitch fontpitch = variable!
  298. string facename = "宋体"
  299. long textcolor = 33554432
  300. long backcolor = 134217739
  301. string text = "销售订单状态"
  302. alignment alignment = right!
  303. boolean focusrectangle = false
  304. end type
  305. type ddlb_status from uo_ddlb_status within w_rp_saletask_sc_card
  306. integer x = 942
  307. integer y = 188
  308. integer width = 389
  309. integer taborder = 100
  310. boolean bringtotop = true
  311. string item[] = {"[全部]","待审核[0]","待二审[4]","在进行[1]","已暂停[2]","已终止[3]","已完成[5]","手动完成[6]"}
  312. integer uo_status = 1
  313. integer dft_index = 4
  314. end type
  315. event selectionchanged;call super::selectionchanged;cb_1.TriggerEvent(Clicked!)
  316. end event
  317. event uof_getvalue;call super::uof_getvalue;cur_status = this.uo_status
  318. end event