w_rp_sale_saletask_lljg.srw 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. $PBExportHeader$w_rp_sale_saletask_lljg.srw
  2. forward
  3. global type w_rp_sale_saletask_lljg from w_publ_easyq
  4. end type
  5. type ddlb_retrstatus from dropdownlistbox within w_rp_sale_saletask_lljg
  6. end type
  7. type ddlb_1 from dropdownlistbox within w_rp_sale_saletask_lljg
  8. end type
  9. type ddlb_scid from uo_ddlb_scid within w_rp_sale_saletask_lljg
  10. end type
  11. type ddlb_2 from dropdownlistbox within w_rp_sale_saletask_lljg
  12. end type
  13. end forward
  14. global type w_rp_sale_saletask_lljg from w_publ_easyq
  15. string title = "来料加工订单统计表"
  16. ddlb_retrstatus ddlb_retrstatus
  17. ddlb_1 ddlb_1
  18. ddlb_scid ddlb_scid
  19. ddlb_2 ddlb_2
  20. end type
  21. global w_rp_sale_saletask_lljg w_rp_sale_saletask_lljg
  22. type variables
  23. int cur_status = 0 //当前查询订单状态// -1 所有
  24. int cur_stattype = 0
  25. long cur_scid_arr[]
  26. end variables
  27. on w_rp_sale_saletask_lljg.create
  28. int iCurrent
  29. call super::create
  30. this.ddlb_retrstatus=create ddlb_retrstatus
  31. this.ddlb_1=create ddlb_1
  32. this.ddlb_scid=create ddlb_scid
  33. this.ddlb_2=create ddlb_2
  34. iCurrent=UpperBound(this.Control)
  35. this.Control[iCurrent+1]=this.ddlb_retrstatus
  36. this.Control[iCurrent+2]=this.ddlb_1
  37. this.Control[iCurrent+3]=this.ddlb_scid
  38. this.Control[iCurrent+4]=this.ddlb_2
  39. end on
  40. on w_rp_sale_saletask_lljg.destroy
  41. call super::destroy
  42. destroy(this.ddlb_retrstatus)
  43. destroy(this.ddlb_1)
  44. destroy(this.ddlb_scid)
  45. destroy(this.ddlb_2)
  46. end on
  47. event ue_before_openretrieve;call super::ue_before_openretrieve;s_hide_col s_col_mtrlsectype
  48. s_col_mtrlsectype.col_1 = 'u_mtrldef_mtrlsectype'
  49. f_hide_col(1308,dw_1,s_col_mtrlsectype)
  50. s_hide_col s_col_zxmtrlmode
  51. s_col_zxmtrlmode.col_1 = 'u_mtrldef_zxmtrlmode'
  52. f_hide_col(1309,dw_1,s_col_zxmtrlmode)
  53. end event
  54. type cb_func from w_publ_easyq`cb_func within w_rp_sale_saletask_lljg
  55. end type
  56. type cb_exit from w_publ_easyq`cb_exit within w_rp_sale_saletask_lljg
  57. end type
  58. type cb_2 from w_publ_easyq`cb_2 within w_rp_sale_saletask_lljg
  59. boolean bringtotop = true
  60. end type
  61. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_sale_saletask_lljg
  62. boolean bringtotop = true
  63. end type
  64. type cb_1 from w_publ_easyq`cb_1 within w_rp_sale_saletask_lljg
  65. boolean bringtotop = true
  66. end type
  67. event cb_1::clicked;call super::clicked;datetime firstdate,enddate
  68. firstdate = DATEtime(date(EM_1.TEXT),time(0))
  69. enddate = datetime(date(EM_2.TEXT),time('23:59:59'))
  70. f_title_change(dw_1)
  71. dw_1.Retrieve(cur_scid_arr,cur_status,cur_stattype,firstdate,enddate,sys_areaid)
  72. end event
  73. type st_3 from w_publ_easyq`st_3 within w_rp_sale_saletask_lljg
  74. integer x = 1408
  75. integer width = 114
  76. string text = "从:"
  77. alignment alignment = left!
  78. end type
  79. type st_4 from w_publ_easyq`st_4 within w_rp_sale_saletask_lljg
  80. integer x = 1989
  81. end type
  82. type em_1 from w_publ_easyq`em_1 within w_rp_sale_saletask_lljg
  83. integer x = 1486
  84. end type
  85. type em_2 from w_publ_easyq`em_2 within w_rp_sale_saletask_lljg
  86. integer x = 2089
  87. end type
  88. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_sale_saletask_lljg
  89. integer x = 1664
  90. integer y = 4
  91. end type
  92. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_sale_saletask_lljg
  93. integer x = 1454
  94. integer y = 8
  95. end type
  96. type dw_1 from w_publ_easyq`dw_1 within w_rp_sale_saletask_lljg
  97. integer y = 300
  98. integer width = 2967
  99. string dataobject = "dw_rp_sale_saletask_lljg"
  100. end type
  101. event dw_1::doubleclicked;call super::doubleclicked;IF dw_1.DataObject = 'dw_rp_sale_saletask_lljg' THEN
  102. IF row > 0 THEN
  103. String ls_code
  104. Long ll_scid
  105. ll_scid = THIS.Object.u_saletask_scid[row]
  106. ls_code = THIS.Object.u_saletask_taskcode[row]
  107. f_open_win(ll_scid,ls_code)
  108. END IF
  109. END IF
  110. end event
  111. type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_sale_saletask_lljg
  112. end type
  113. type sle_cust from w_publ_easyq`sle_cust within w_rp_sale_saletask_lljg
  114. end type
  115. type st_mtrl from w_publ_easyq`st_mtrl within w_rp_sale_saletask_lljg
  116. end type
  117. type st_cust from w_publ_easyq`st_cust within w_rp_sale_saletask_lljg
  118. end type
  119. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_sale_saletask_lljg
  120. boolean visible = true
  121. integer x = 1454
  122. end type
  123. type pb_em1 from w_publ_easyq`pb_em1 within w_rp_sale_saletask_lljg
  124. integer x = 1897
  125. end type
  126. type pb_em2 from w_publ_easyq`pb_em2 within w_rp_sale_saletask_lljg
  127. integer x = 2501
  128. end type
  129. type pb_2 from w_publ_easyq`pb_2 within w_rp_sale_saletask_lljg
  130. integer x = 2610
  131. end type
  132. type cb_help from w_publ_easyq`cb_help within w_rp_sale_saletask_lljg
  133. end type
  134. type cb_copyself from w_publ_easyq`cb_copyself within w_rp_sale_saletask_lljg
  135. end type
  136. type gb_1 from w_publ_easyq`gb_1 within w_rp_sale_saletask_lljg
  137. end type
  138. type ln_bar from w_publ_easyq`ln_bar within w_rp_sale_saletask_lljg
  139. end type
  140. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_sale_saletask_lljg
  141. end type
  142. type r_bar from w_publ_easyq`r_bar within w_rp_sale_saletask_lljg
  143. end type
  144. type ln_1 from w_publ_easyq`ln_1 within w_rp_sale_saletask_lljg
  145. end type
  146. type ln_2 from w_publ_easyq`ln_2 within w_rp_sale_saletask_lljg
  147. end type
  148. type ln_3 from w_publ_easyq`ln_3 within w_rp_sale_saletask_lljg
  149. end type
  150. type ln_4 from w_publ_easyq`ln_4 within w_rp_sale_saletask_lljg
  151. end type
  152. type ddlb_retrstatus from dropdownlistbox within w_rp_sale_saletask_lljg
  153. integer x = 571
  154. integer y = 196
  155. integer width = 379
  156. integer height = 856
  157. integer taborder = 50
  158. boolean bringtotop = true
  159. integer textsize = -9
  160. integer weight = 400
  161. fontcharset fontcharset = gb2312charset!
  162. fontpitch fontpitch = variable!
  163. string facename = "宋体"
  164. long textcolor = 33554432
  165. string text = "待审批"
  166. boolean sorted = false
  167. boolean vscrollbar = true
  168. string item[] = {"待审批","在进行","已暂停","已终止","已完成","[所有]"}
  169. borderstyle borderstyle = stylelowered!
  170. end type
  171. event constructor;cur_status=long(f_ProfileString (sys_empid, "saletask", "status", "-1"))
  172. choose case cur_status
  173. case 0
  174. ddlb_retrstatus.text="待审核"
  175. case 1
  176. ddlb_retrstatus.text="在进行"
  177. case 2
  178. ddlb_retrstatus.text="已暂停"
  179. case 3
  180. ddlb_retrstatus.text="已终止"
  181. case 5
  182. ddlb_retrstatus.text="已完成"
  183. case -1
  184. ddlb_retrstatus.text="[所有]"
  185. end choose
  186. end event
  187. event selectionchanged;choose case index
  188. case 1 //待销售审批
  189. cur_status=0
  190. case 2 //在进行
  191. cur_status=1
  192. case 3 //'已暂停'
  193. cur_status=2
  194. case 4 //'已终止'
  195. cur_status=3
  196. case 5 //'已完成'
  197. cur_status=5
  198. case else
  199. cur_status= -1
  200. end choose
  201. cb_1.triggerevent(clicked!)
  202. end event
  203. type ddlb_1 from dropdownlistbox within w_rp_sale_saletask_lljg
  204. integer x = 974
  205. integer y = 196
  206. integer width = 416
  207. integer height = 300
  208. integer taborder = 110
  209. boolean bringtotop = true
  210. integer textsize = -9
  211. integer weight = 400
  212. fontcharset fontcharset = gb2312charset!
  213. fontpitch fontpitch = variable!
  214. string facename = "宋体"
  215. long textcolor = 33554432
  216. string text = "按订货日期"
  217. boolean sorted = false
  218. string item[] = {"按订货日期","按交货日期"}
  219. borderstyle borderstyle = stylelowered!
  220. end type
  221. event selectionchanged;if this.text = '按订货日期' then
  222. cur_stattype = 0
  223. else
  224. cur_stattype = 1
  225. end if
  226. end event
  227. type ddlb_scid from uo_ddlb_scid within w_rp_sale_saletask_lljg
  228. integer y = 196
  229. integer width = 549
  230. integer height = 620
  231. integer taborder = 90
  232. boolean bringtotop = true
  233. end type
  234. event constructor;call super::constructor;cur_scid_arr = THIS.uo_scid_arr
  235. end event
  236. event selectionchanged;call super::selectionchanged;
  237. cur_scid_arr = THIS.uo_scid_arr
  238. cb_1.triggerevent(clicked!)
  239. end event
  240. type ddlb_2 from dropdownlistbox within w_rp_sale_saletask_lljg
  241. integer x = 2053
  242. integer y = 36
  243. integer width = 549
  244. integer height = 460
  245. integer taborder = 70
  246. boolean bringtotop = true
  247. integer textsize = -9
  248. integer weight = 400
  249. fontcharset fontcharset = gb2312charset!
  250. fontpitch fontpitch = variable!
  251. string facename = "宋体"
  252. long textcolor = 33554432
  253. string text = "明细表"
  254. string item[] = {"明细表","汇总表[产品]","汇总表[客户-产品]"}
  255. borderstyle borderstyle = stylelowered!
  256. end type
  257. event selectionchanged;dw_1.uf_save_profile_layout()
  258. if ddlb_2.text = '明细表' then
  259. dw_1.dataobject = 'dw_rp_sale_saletask'
  260. elseif ddlb_2.text = '汇总表[产品]' then
  261. dw_1.dataobject = 'dw_rp_sale_saletask_hz'
  262. else
  263. dw_1.dataobject = 'dw_rp_sale_saletask_hz_cust'
  264. end if
  265. dw_1.settransobject(sqlca)
  266. dw_1.ins_INIfile_name = sys_inifilename
  267. dw_1.ins_opemp = publ_operator
  268. dw_1.cardw_empid = sys_empid
  269. dw_1.cur_DataObject = dw_1.DataObject
  270. dw_1.uf_read_profile_layout()
  271. cb_1.triggerevent(clicked!)
  272. end event