w_rp_sale_saletask.srw 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077
  1. $PBExportHeader$w_rp_sale_saletask.srw
  2. forward
  3. global type w_rp_sale_saletask from w_publ_easyq
  4. end type
  5. type ddlb_1 from dropdownlistbox within w_rp_sale_saletask
  6. end type
  7. type ddlb_scid from uo_ddlb_scid within w_rp_sale_saletask
  8. end type
  9. type ddlb_2 from dropdownlistbox within w_rp_sale_saletask
  10. end type
  11. type ddlb_3 from dropdownlistbox within w_rp_sale_saletask
  12. end type
  13. type ddlb_status from uo_ddlb_status within w_rp_sale_saletask
  14. end type
  15. type ddlb_yw from dropdownlistbox within w_rp_sale_saletask
  16. end type
  17. type tab_1 from tab within w_rp_sale_saletask
  18. end type
  19. type tabpage_1 from userobject within tab_1
  20. end type
  21. type dw_buytask from u_dw_rbtnfilter within tabpage_1
  22. end type
  23. type tabpage_1 from userobject within tab_1
  24. dw_buytask dw_buytask
  25. end type
  26. type tabpage_2 from userobject within tab_1
  27. end type
  28. type dw_inware from u_dw_rbtnfilter within tabpage_2
  29. end type
  30. type tabpage_2 from userobject within tab_1
  31. dw_inware dw_inware
  32. end type
  33. type tabpage_3 from userobject within tab_1
  34. end type
  35. type dw_outware_sale from u_dw_rbtnfilter within tabpage_3
  36. end type
  37. type tabpage_3 from userobject within tab_1
  38. dw_outware_sale dw_outware_sale
  39. end type
  40. type tab_1 from tab within w_rp_sale_saletask
  41. tabpage_1 tabpage_1
  42. tabpage_2 tabpage_2
  43. tabpage_3 tabpage_3
  44. end type
  45. type cb_3 from commandbutton within w_rp_sale_saletask
  46. end type
  47. type cbx_1 from checkbox within w_rp_sale_saletask
  48. end type
  49. type cbx_iffinish from checkbox within w_rp_sale_saletask
  50. end type
  51. end forward
  52. global type w_rp_sale_saletask from w_publ_easyq
  53. integer width = 5065
  54. string title = "销售订单统计表"
  55. event ue_retrieve_mx ( )
  56. ddlb_1 ddlb_1
  57. ddlb_scid ddlb_scid
  58. ddlb_2 ddlb_2
  59. ddlb_3 ddlb_3
  60. ddlb_status ddlb_status
  61. ddlb_yw ddlb_yw
  62. tab_1 tab_1
  63. cb_3 cb_3
  64. cbx_1 cbx_1
  65. cbx_iffinish cbx_iffinish
  66. end type
  67. global w_rp_sale_saletask w_rp_sale_saletask
  68. type variables
  69. int cur_status = 0 //当前查询订单状态// -1 所有
  70. int cur_stattype = 0
  71. long cur_scid_arr[]
  72. int cur_kind = -1
  73. int cur_fhflag = -1
  74. string ls_areaname=''
  75. int cur_ifstop=0
  76. int cur_iffinish = 0
  77. end variables
  78. forward prototypes
  79. public subroutine wf_hidecol ()
  80. public subroutine wf_init_dw1 ()
  81. end prototypes
  82. event ue_retrieve_mx();IF Not tab_1.Visible THEN RETURN
  83. Long ll_row
  84. Long ll_scid, ll_taskid, ll_printid
  85. ll_row = dw_1.GetRow()
  86. tab_1.tabpage_1.dw_buytask.SetRedraw(False)
  87. tab_1.tabpage_2.dw_inware.SetRedraw(False)
  88. tab_1.tabpage_3.dw_outware_sale.SetRedraw(False)
  89. tab_1.tabpage_1.dw_buytask.SetFilter('')
  90. tab_1.tabpage_1.dw_buytask.Filter()
  91. tab_1.tabpage_2.dw_inware.SetFilter('')
  92. tab_1.tabpage_2.dw_inware.Filter()
  93. tab_1.tabpage_3.dw_outware_sale.SetFilter('')
  94. tab_1.tabpage_3.dw_outware_sale.Filter()
  95. IF ll_row <= 0 THEN
  96. tab_1.tabpage_1.dw_buytask.Reset()
  97. tab_1.tabpage_2.dw_inware.Reset()
  98. tab_1.tabpage_3.dw_outware_sale.Reset()
  99. ELSE
  100. ll_scid = dw_1.Object.u_saletask_scid[ll_row]
  101. ll_taskid = dw_1.Object.u_saletask_taskid[ll_row]
  102. ll_printid = dw_1.Object.u_saletaskmx_printid[ll_row]
  103. tab_1.tabpage_1.dw_buytask.Retrieve(ll_scid,ll_taskid,ll_printid)
  104. tab_1.tabpage_2.dw_inware.Retrieve(ll_scid,ll_taskid,ll_printid)
  105. tab_1.tabpage_3.dw_outware_sale.Retrieve(ll_scid,ll_taskid,ll_printid)
  106. END IF
  107. tab_1.tabpage_1.dw_buytask.SetRedraw(True)
  108. tab_1.tabpage_2.dw_inware.SetRedraw(True)
  109. tab_1.tabpage_3.dw_outware_sale.SetRedraw(True)
  110. end event
  111. public subroutine wf_hidecol ();s_hide_col s_col, s_null
  112. IF dw_1.DataObject = 'dw_rp_sale_saletask' THEN
  113. s_col.col_1 = 'fprice'
  114. s_col.col_2 = 'amt'
  115. s_col.col_3 = 'not_consignedqtyamt'
  116. s_col.col_4 = 'u_saletaskmx_enprice'
  117. s_col.col_5 = 'enamt'
  118. s_col.col_6 = 'u_saletaskmx_dftsaleprice'
  119. s_col.col_8 = 'rebate'
  120. s_col.col_9 = 'u_saletaskmx_acprice'
  121. s_col.col_10 = 'ware_amt'
  122. s_col.col_11 = 'u_saletaskmx_ware_fprice'
  123. s_col.col_12 = 'u_saletask_damt'
  124. f_hide_col(122,dw_1,s_col)
  125. s_col = s_null
  126. s_col.col_1 = 'consignedenamt'
  127. s_col.col_2 = 'unconsignedenamt'
  128. s_col.col_3 = 'u_saletask_msttakeamt'
  129. s_col.col_4 = 'u_saletask_takedamt'
  130. s_col.col_5 = 'u_saletask_takeamt'
  131. s_col.col_6 = 'nottakeamt'
  132. s_col.col_7 = 'newprice'
  133. s_col.col_8 = 'enamt2'
  134. f_hide_col(122,dw_1,s_col)
  135. ELSEIF dw_1.DataObject = 'dw_rp_sale_saletask_hz' THEN
  136. s_col.col_1 = 'amt'
  137. s_col.col_2 = 'consignedqtyamt'
  138. s_col.col_3 = 'not_consignedqtyamt'
  139. s_col.col_4 = 'stopamt'
  140. s_col.col_5 = 'realbookamt'
  141. f_hide_col(122,dw_1,s_col)
  142. ELSEIF dw_1.DataObject = 'dw_rp_sale_saletask_hz_cust' THEN
  143. s_col.col_1 = 'amt'
  144. s_col.col_2 = 'consignedenamt'
  145. s_col.col_3 = 'unconsignedenamt'
  146. s_col.col_4 = 'realbookamt'
  147. f_hide_col(122,dw_1,s_col)
  148. ELSEIF dw_1.DataObject = 'dw_rp_sale_saletask_hz_assignemp' THEN
  149. s_col.col_1 = 'amt'
  150. s_col.col_2 = 'consignedqty'
  151. s_col.col_3 = 'not_consignedqty'
  152. f_hide_col(122,dw_1,s_col)
  153. ELSEIF dw_1.DataObject = 'dw_rp_sale_saletask_hz_mtrlsectype' THEN
  154. s_col.col_1 = 'amt'
  155. s_col.col_2 = 'consignedqtyamt'
  156. s_col.col_3 = 'not_consignedqtyamt'
  157. s_col.col_4 = 'stopamt'
  158. f_hide_col(122,dw_1,s_col)
  159. ELSEIF dw_1.DataObject = 'dw_rp_sale_saletask_hz_zxmtrlmode' THEN
  160. s_col.col_1 = 'amt'
  161. s_col.col_2 = 'not_consignedqtyamt'
  162. s_col.col_3 = 'consignedqtyamt'
  163. s_col.col_4 = 'stopamt'
  164. f_hide_col(122,dw_1,s_col)
  165. ELSEIF dw_1.DataObject = 'dw_rp_sale_saletask_hz_bill' THEN
  166. s_col.col_1 = 'amt'
  167. s_col.col_2 = 'not_consignedqtyamt'
  168. s_col.col_3 = 'consignedqtyamt'
  169. s_col.col_4 = 'stopamt'
  170. f_hide_col(122,dw_1,s_col)
  171. ELSEIF dw_1.DataObject = 'dw_rp_sale_saletask_hz_1' THEN
  172. s_col.col_1 = 'amt'
  173. s_col.col_2 = 'realbookamt'
  174. f_hide_col(122,dw_1,s_col)
  175. ELSEIF dw_1.DataObject = 'dw_rp_sale_saletask_mx' THEN
  176. s_col.col_1 = 'fprice'
  177. s_col.col_2 = 'amt'
  178. s_col.col_3 = 'not_consignedqtyamt'
  179. s_col.col_4 = 'u_saletaskmx_enprice'
  180. s_col.col_5 = 'enamt'
  181. s_col.col_6 = 'u_saletaskmx_dftsaleprice'
  182. s_col.col_8 = 'rebate'
  183. s_col.col_9 = 'u_saletaskmx_acprice'
  184. s_col.col_10 = 'ware_amt'
  185. s_col.col_11 = 'u_saletaskmx_ware_fprice'
  186. s_col.col_12 = 'realbookamt'
  187. f_hide_col(122,dw_1,s_col)
  188. s_col = s_null
  189. s_col.col_1 = 'consignedenamt'
  190. s_col.col_2 = 'unconsignedenamt'
  191. f_hide_col(122,dw_1,s_col)
  192. ELSEIF dw_1.DataObject = 'dw_rp_sale_saletask_hz_amt' THEN
  193. s_col.col_1 = 'consignedenamt'
  194. s_col.col_2 = 'unconsignedenamt'
  195. s_col.col_3 = 'u_saletask_msttakeamt'
  196. s_col.col_4 = 'u_saletask_takedamt'
  197. s_col.col_5 = 'u_saletask_takeamt'
  198. s_col.col_6 = 'nottakeamt'
  199. s_col.col_7 = 'u_saletask_damt'
  200. s_col.col_8 = 'amt'
  201. s_col.col_9 = 'enamt'
  202. s_col.col_10 = 'not_consignedqtyamt'
  203. s_col.col_11 = 'ware_amt'
  204. s_col.col_12 = 'realbookamt'
  205. f_hide_col(122,dw_1,s_col)
  206. END IF
  207. s_col = s_null
  208. s_col.col_1 = 'b_costamt'
  209. f_hide_col(123,dw_1,s_col)
  210. s_col = s_null
  211. s_col.col_1 = 'mamt'
  212. f_hide_col(843,dw_1,s_col)
  213. s_col = s_null
  214. s_col.col_1 = 'b_costamt'
  215. f_hide_col(490,dw_1,s_col)
  216. s_hide_col s_col_mtrlsectype
  217. s_col_mtrlsectype.col_1 = 'u_mtrldef_mtrlsectype'
  218. f_hide_col(1308,dw_1,s_col_mtrlsectype)
  219. s_hide_col s_col_zxmtrlmode
  220. s_col_zxmtrlmode.col_1 = 'u_mtrldef_zxmtrlmode'
  221. f_hide_col(1309,dw_1,s_col_zxmtrlmode)
  222. end subroutine
  223. public subroutine wf_init_dw1 ();//IF sys_version = 802001 THEN //商业版
  224. // dw_1.DataObject = 'dw_rp_sale_saletask_b'
  225. //ELSE //工业版
  226. // dw_1.DataObject = 'dw_rp_sale_saletask'
  227. //END IF
  228. end subroutine
  229. on w_rp_sale_saletask.create
  230. int iCurrent
  231. call super::create
  232. this.ddlb_1=create ddlb_1
  233. this.ddlb_scid=create ddlb_scid
  234. this.ddlb_2=create ddlb_2
  235. this.ddlb_3=create ddlb_3
  236. this.ddlb_status=create ddlb_status
  237. this.ddlb_yw=create ddlb_yw
  238. this.tab_1=create tab_1
  239. this.cb_3=create cb_3
  240. this.cbx_1=create cbx_1
  241. this.cbx_iffinish=create cbx_iffinish
  242. iCurrent=UpperBound(this.Control)
  243. this.Control[iCurrent+1]=this.ddlb_1
  244. this.Control[iCurrent+2]=this.ddlb_scid
  245. this.Control[iCurrent+3]=this.ddlb_2
  246. this.Control[iCurrent+4]=this.ddlb_3
  247. this.Control[iCurrent+5]=this.ddlb_status
  248. this.Control[iCurrent+6]=this.ddlb_yw
  249. this.Control[iCurrent+7]=this.tab_1
  250. this.Control[iCurrent+8]=this.cb_3
  251. this.Control[iCurrent+9]=this.cbx_1
  252. this.Control[iCurrent+10]=this.cbx_iffinish
  253. end on
  254. on w_rp_sale_saletask.destroy
  255. call super::destroy
  256. destroy(this.ddlb_1)
  257. destroy(this.ddlb_scid)
  258. destroy(this.ddlb_2)
  259. destroy(this.ddlb_3)
  260. destroy(this.ddlb_status)
  261. destroy(this.ddlb_yw)
  262. destroy(this.tab_1)
  263. destroy(this.cb_3)
  264. destroy(this.cbx_1)
  265. destroy(this.cbx_iffinish)
  266. end on
  267. event close;call super::close;f_SetProfileString (sys_empid, this.classname(), "status", string(cur_status))
  268. f_SetProfileString (sys_empid, this.classname(), "kind", string(cur_kind))
  269. f_SetProfileString (sys_empid, this.classname(), "fhflag", string(cur_fhflag))
  270. end event
  271. event ue_before_open;call super::ue_before_open;tab_1.tabpage_1.dw_buytask.settransobject(sqlca)
  272. tab_1.tabpage_2.dw_inware.settransobject(sqlca)
  273. tab_1.tabpage_3.dw_outware_sale.settransobject(sqlca)
  274. end event
  275. event resize;ln_bar.EndX = This.Width
  276. ln_bar2.EndX = This.Width
  277. ln_1.EndX = This.Width
  278. ln_2.EndX = This.Width
  279. ln_3.EndX = This.Width
  280. ln_4.EndX = This.Width
  281. r_bar.Width = This.Width
  282. IF tab_1.Visible THEN
  283. dw_1.Width = This.Width - dw_1.X - 40
  284. dw_1.Height = This.Height - dw_1.Y - tab_1.Height - 150
  285. tab_1.X = dw_1.X
  286. tab_1.Y = dw_1.Y + dw_1.Height + 5
  287. tab_1.Width = dw_1.Width
  288. tab_1.tabpage_1.dw_buytask.Width = tab_1.tabpage_1.Width - 40
  289. tab_1.tabpage_1.dw_buytask.Height = tab_1.tabpage_1.Height - tab_1.tabpage_1.dw_buytask.Y
  290. tab_1.tabpage_2.dw_inware.Width = tab_1.tabpage_2.Width - 40
  291. tab_1.tabpage_2.dw_inware.Height = tab_1.tabpage_2.Height - tab_1.tabpage_2.dw_inware.Y
  292. tab_1.tabpage_3.dw_outware_sale.Width = tab_1.tabpage_3.Width - 40
  293. tab_1.tabpage_3.dw_outware_sale.Height = tab_1.tabpage_3.Height - tab_1.tabpage_3.dw_outware_sale.Y
  294. ELSE
  295. dw_1.Width = This.Width - dw_1.X - 40
  296. dw_1.Height = This.Height - dw_1.Y - 150
  297. END IF
  298. end event
  299. type cb_func from w_publ_easyq`cb_func within w_rp_sale_saletask
  300. end type
  301. type cb_exit from w_publ_easyq`cb_exit within w_rp_sale_saletask
  302. end type
  303. type cb_2 from w_publ_easyq`cb_2 within w_rp_sale_saletask
  304. boolean bringtotop = true
  305. end type
  306. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_sale_saletask
  307. boolean bringtotop = true
  308. end type
  309. type cb_1 from w_publ_easyq`cb_1 within w_rp_sale_saletask
  310. boolean bringtotop = true
  311. end type
  312. event cb_1::clicked;call super::clicked;datetime firstdate,enddate
  313. firstdate = DATEtime(date(EM_1.TEXT),time(0))
  314. enddate = datetime(date(EM_2.TEXT),time('23:59:59'))
  315. Int li_option_outrep,li_option_opemp
  316. string ls_option_opemp
  317. IF sys_power_issuper THEN
  318. li_option_outrep = 0
  319. ELSE
  320. li_option_outrep = sys_option_outrep
  321. END IF
  322. IF sys_power_issuper THEN
  323. li_option_opemp = 0
  324. // ls_option_opemp = publ_operator
  325. ELSE
  326. li_option_opemp = sys_option_opemp_sale
  327. ls_option_opemp = publ_operator
  328. END IF
  329. dw_1.Retrieve(cur_scid_arr, cur_status,cur_stattype,firstdate,enddate,sys_areaid,cur_kind, sys_user_outrep, li_option_outrep,cur_fhflag,ls_option_opemp,li_option_opemp,cur_ifstop,cur_iffinish)
  330. end event
  331. type st_3 from w_publ_easyq`st_3 within w_rp_sale_saletask
  332. integer x = 965
  333. integer width = 101
  334. string text = "从:"
  335. alignment alignment = left!
  336. end type
  337. type st_4 from w_publ_easyq`st_4 within w_rp_sale_saletask
  338. integer x = 1554
  339. end type
  340. type em_1 from w_publ_easyq`em_1 within w_rp_sale_saletask
  341. integer x = 1051
  342. end type
  343. type em_2 from w_publ_easyq`em_2 within w_rp_sale_saletask
  344. integer x = 1655
  345. end type
  346. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_sale_saletask
  347. integer x = 1632
  348. integer y = 12
  349. end type
  350. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_sale_saletask
  351. integer x = 1417
  352. integer y = 12
  353. end type
  354. type dw_1 from w_publ_easyq`dw_1 within w_rp_sale_saletask
  355. integer y = 304
  356. integer width = 2967
  357. integer height = 1004
  358. string dataobject = "dw_rp_sale_saletask"
  359. end type
  360. event dw_1::doubleclicked;call super::doubleclicked;IF dw_1.DataObject = 'dw_rp_sale_saletask' &
  361. or dw_1.DataObject = 'dw_rp_sale_saletask_mx' THEN
  362. IF row > 0 THEN
  363. String ls_code
  364. Long ll_scid
  365. ll_scid = THIS.Object.u_saletask_scid[row]
  366. ls_code = THIS.Object.u_saletask_taskcode[row]
  367. f_open_win(ll_scid,ls_code)
  368. END IF
  369. END IF
  370. end event
  371. event dw_1::rowfocuschanged;call super::rowfocuschanged;PARENT.TriggerEvent('ue_retrieve_mx')
  372. end event
  373. type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_sale_saletask
  374. end type
  375. type sle_cust from w_publ_easyq`sle_cust within w_rp_sale_saletask
  376. end type
  377. type st_mtrl from w_publ_easyq`st_mtrl within w_rp_sale_saletask
  378. end type
  379. type st_cust from w_publ_easyq`st_cust within w_rp_sale_saletask
  380. end type
  381. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_sale_saletask
  382. boolean visible = true
  383. integer x = 1417
  384. end type
  385. type pb_em1 from w_publ_easyq`pb_em1 within w_rp_sale_saletask
  386. integer x = 1463
  387. end type
  388. type pb_em2 from w_publ_easyq`pb_em2 within w_rp_sale_saletask
  389. integer x = 2075
  390. end type
  391. type pb_2 from w_publ_easyq`pb_2 within w_rp_sale_saletask
  392. integer x = 2185
  393. end type
  394. type cb_help from w_publ_easyq`cb_help within w_rp_sale_saletask
  395. end type
  396. type cb_copyself from w_publ_easyq`cb_copyself within w_rp_sale_saletask
  397. end type
  398. type gb_1 from w_publ_easyq`gb_1 within w_rp_sale_saletask
  399. end type
  400. type ln_bar from w_publ_easyq`ln_bar within w_rp_sale_saletask
  401. end type
  402. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_sale_saletask
  403. end type
  404. type r_bar from w_publ_easyq`r_bar within w_rp_sale_saletask
  405. end type
  406. type ln_1 from w_publ_easyq`ln_1 within w_rp_sale_saletask
  407. integer beginy = 288
  408. integer endy = 288
  409. end type
  410. type ln_2 from w_publ_easyq`ln_2 within w_rp_sale_saletask
  411. end type
  412. type ln_3 from w_publ_easyq`ln_3 within w_rp_sale_saletask
  413. end type
  414. type ln_4 from w_publ_easyq`ln_4 within w_rp_sale_saletask
  415. end type
  416. type ddlb_1 from dropdownlistbox within w_rp_sale_saletask
  417. integer x = 571
  418. integer y = 192
  419. integer width = 379
  420. integer height = 300
  421. integer taborder = 110
  422. boolean bringtotop = true
  423. integer textsize = -9
  424. integer weight = 400
  425. fontcharset fontcharset = gb2312charset!
  426. fontpitch fontpitch = variable!
  427. string facename = "宋体"
  428. long textcolor = 33554432
  429. string text = "按订货日期"
  430. boolean sorted = false
  431. string item[] = {"按订货日期","按交货日期"}
  432. borderstyle borderstyle = stylelowered!
  433. end type
  434. event selectionchanged;if this.text = '按订货日期' then
  435. cur_stattype = 0
  436. else
  437. cur_stattype = 1
  438. end if
  439. end event
  440. type ddlb_scid from uo_ddlb_scid within w_rp_sale_saletask
  441. integer y = 192
  442. integer width = 549
  443. integer height = 620
  444. integer taborder = 90
  445. boolean bringtotop = true
  446. end type
  447. event constructor;call super::constructor;cur_scid_arr = THIS.uo_scid_arr
  448. end event
  449. event selectionchanged;call super::selectionchanged;
  450. cur_scid_arr = THIS.uo_scid_arr
  451. cb_1.triggerevent(clicked!)
  452. end event
  453. type ddlb_2 from dropdownlistbox within w_rp_sale_saletask
  454. integer x = 2034
  455. integer y = 36
  456. integer width = 645
  457. integer height = 800
  458. integer taborder = 70
  459. boolean bringtotop = true
  460. integer textsize = -9
  461. integer weight = 400
  462. fontcharset fontcharset = gb2312charset!
  463. fontpitch fontpitch = variable!
  464. string facename = "宋体"
  465. long textcolor = 33554432
  466. string text = "明细表"
  467. boolean sorted = false
  468. string item[] = {"明细表","明细表[不合并]","汇总表[产品]","汇总表[客户-产品]","汇总表[产品-配置]","汇总表[金额]"}
  469. borderstyle borderstyle = stylelowered!
  470. end type
  471. event selectionchanged;dw_1.uf_save_profile_layout()
  472. IF ddlb_2.Text = '明细表' THEN
  473. dw_1.DataObject = 'dw_rp_sale_saletask'
  474. tab_1.Visible = True
  475. ELSEIF ddlb_2.Text = '明细表[不合并]' THEN
  476. dw_1.DataObject = 'dw_rp_sale_saletask_mx'
  477. tab_1.Visible = True
  478. ELSEIF ddlb_2.Text = '汇总表[产品]' THEN
  479. dw_1.DataObject = 'dw_rp_sale_saletask_hz'
  480. tab_1.Visible = False
  481. ELSEIF ddlb_2.Text = '汇总表[客户-产品]' THEN
  482. dw_1.DataObject = 'dw_rp_sale_saletask_hz_cust'
  483. tab_1.Visible = False
  484. ELSEIF ddlb_2.Text = '汇总表[产品-配置]' THEN
  485. dw_1.DataObject = 'dw_rp_sale_saletask_hz_1'
  486. tab_1.Visible = False
  487. //ELSEIF ddlb_2.Text = '来料加工进度表' THEN
  488. // dw_1.DataObject = 'dw_rp_sale_saletask_lljg'
  489. // tab_1.Visible = False
  490. ELSEIF ddlb_2.Text = '汇总表[金额]' THEN
  491. dw_1.DataObject = 'dw_rp_sale_saletask_hz_amt'
  492. tab_1.Visible = False
  493. END IF
  494. Parent.TriggerEvent('resize')
  495. wf_replacedw()
  496. cb_1.TriggerEvent(Clicked!)
  497. end event
  498. type ddlb_3 from dropdownlistbox within w_rp_sale_saletask
  499. integer x = 2665
  500. integer y = 192
  501. integer width = 411
  502. integer height = 860
  503. integer taborder = 110
  504. boolean bringtotop = true
  505. integer textsize = -9
  506. integer weight = 400
  507. fontcharset fontcharset = gb2312charset!
  508. fontpitch fontpitch = variable!
  509. string facename = "宋体"
  510. long textcolor = 33554432
  511. string text = "[全部]"
  512. boolean sorted = false
  513. boolean vscrollbar = true
  514. borderstyle borderstyle = stylelowered!
  515. end type
  516. event constructor;Long ll_kind, ll_kind_save, ll_kind_get
  517. String ls_kindname, ls_kindname_get
  518. Long cnt = 0
  519. Long ll_i
  520. String ls_space
  521. Int li_spacenum
  522. Boolean lb_getdft = FALSE
  523. ll_kind_save = Long(f_ProfileString (sys_empid, Parent.ClassName(), "kind", "-1"))
  524. This.AddItem ('[全部]')
  525. DECLARE find_kind CURSOR FOR
  526. SELECT DISTINCT kind, kindname
  527. FROM u_saletask_kind
  528. Order By kind;
  529. OPEN find_kind;
  530. FETCH find_kind Into :ll_kind,:ls_kindname ;
  531. DO WHILE sqlca.SQLCode = 0
  532. li_spacenum = 50 - Len(Trim(ls_kindname)) - 2 - Len(String(ll_kind))
  533. ls_space = Fill(' ',li_spacenum)
  534. This.AddItem (ls_kindname+ls_space+'['+String(ll_kind)+']')
  535. IF NOT lb_getdft THEN
  536. ll_kind_get = ll_kind
  537. ls_kindname_get = ls_kindname
  538. END IF
  539. IF ll_kind_save = ll_kind THEN
  540. lb_getdft = TRUE
  541. ll_kind_get = ll_kind
  542. ls_kindname_get = ls_kindname
  543. END IF
  544. FETCH find_kind Into :ll_kind,:ls_kindname ;
  545. LOOP
  546. CLOSE find_kind;
  547. IF ll_kind_save = -1 THEN
  548. THIS.Text = '[全部]'
  549. cur_kind = -1
  550. ELSE
  551. li_spacenum = 50 - Len(Trim(ls_kindname_get)) - 2 - Len(String(ll_kind_get))
  552. ls_space = Fill(' ',li_spacenum)
  553. THIS.Text = ls_kindname_get+ls_space+'['+String(ll_kind_get)+']'
  554. cur_kind = ll_kind_get
  555. END IF
  556. end event
  557. event selectionchanged;IF THIS.Text = '[全部]' THEN
  558. cur_kind = -1
  559. ELSE
  560. cur_kind = Long(Mid ( THIS.Text,Pos(THIS.Text,'[') + 1,Len(THIS.Text) - Pos(THIS.Text,'[') - 1 ))
  561. END IF
  562. cb_1.triggerevent(clicked!)
  563. end event
  564. type ddlb_status from uo_ddlb_status within w_rp_sale_saletask
  565. integer x = 2304
  566. integer y = 192
  567. integer width = 338
  568. integer height = 812
  569. integer taborder = 120
  570. boolean bringtotop = true
  571. string item[] = {"[全部]","待审核[0]","待二审[4]","在进行[1]","已暂停[2]","已终止[3]","已完成[5]","手动完成[6]"}
  572. end type
  573. event selectionchanged;call super::selectionchanged;cb_1.TriggerEvent(Clicked!)
  574. end event
  575. event uof_getvalue;call super::uof_getvalue;cur_status = this.uo_status
  576. end event
  577. type ddlb_yw from dropdownlistbox within w_rp_sale_saletask
  578. integer x = 3090
  579. integer y = 188
  580. integer width = 343
  581. integer height = 860
  582. integer taborder = 130
  583. boolean bringtotop = true
  584. integer textsize = -9
  585. integer weight = 400
  586. fontcharset fontcharset = gb2312charset!
  587. fontpitch fontpitch = variable!
  588. string facename = "宋体"
  589. long textcolor = 33554432
  590. string text = "[全部]"
  591. boolean sorted = false
  592. boolean vscrollbar = true
  593. string item[] = {"[全部]","已发完货[0]","未发完货[1]",""}
  594. borderstyle borderstyle = stylelowered!
  595. end type
  596. event constructor;cur_fhflag=long(f_ProfileString (sys_empid, parent.classname(), "fhflag", "-1"))
  597. choose case cur_fhflag
  598. case -1
  599. this.text="[全部]"
  600. case 0
  601. this.text="已发完货[0]"
  602. case 1
  603. this.text="未发完货[1]"
  604. case else
  605. this.text="[全部]"
  606. end choose
  607. end event
  608. event selectionchanged;choose case index
  609. case 1
  610. cur_fhflag = -1
  611. case 2 //已发货
  612. cur_fhflag=0
  613. case 3 //未发货
  614. cur_fhflag=1
  615. case else
  616. cur_fhflag= -1
  617. end choose
  618. cb_1.triggerevent(clicked!)
  619. end event
  620. type tab_1 from tab within w_rp_sale_saletask
  621. integer y = 1220
  622. integer width = 2240
  623. integer height = 900
  624. integer taborder = 100
  625. boolean bringtotop = true
  626. integer textsize = -9
  627. integer weight = 400
  628. fontcharset fontcharset = gb2312charset!
  629. fontpitch fontpitch = variable!
  630. string facename = "宋体"
  631. long backcolor = 134217739
  632. boolean raggedright = true
  633. boolean focusonbuttondown = true
  634. integer selectedtab = 1
  635. tabpage_1 tabpage_1
  636. tabpage_2 tabpage_2
  637. tabpage_3 tabpage_3
  638. end type
  639. on tab_1.create
  640. this.tabpage_1=create tabpage_1
  641. this.tabpage_2=create tabpage_2
  642. this.tabpage_3=create tabpage_3
  643. this.Control[]={this.tabpage_1,&
  644. this.tabpage_2,&
  645. this.tabpage_3}
  646. end on
  647. on tab_1.destroy
  648. destroy(this.tabpage_1)
  649. destroy(this.tabpage_2)
  650. destroy(this.tabpage_3)
  651. end on
  652. type tabpage_1 from userobject within tab_1
  653. integer x = 18
  654. integer y = 96
  655. integer width = 2203
  656. integer height = 788
  657. long backcolor = 134217739
  658. string text = "采购订单"
  659. long tabtextcolor = 33554432
  660. long tabbackcolor = 134217739
  661. long picturemaskcolor = 536870912
  662. dw_buytask dw_buytask
  663. end type
  664. on tabpage_1.create
  665. this.dw_buytask=create dw_buytask
  666. this.Control[]={this.dw_buytask}
  667. end on
  668. on tabpage_1.destroy
  669. destroy(this.dw_buytask)
  670. end on
  671. type dw_buytask from u_dw_rbtnfilter within tabpage_1
  672. integer height = 780
  673. string dataobject = "dw_rp_sale_saletask_jdgz_buytask"
  674. boolean hscrollbar = true
  675. boolean vscrollbar = true
  676. boolean hsplitscroll = true
  677. boolean rbutton_filter_use = true
  678. boolean rbutton_setposition_use = true
  679. boolean titleclick_sort_use = true
  680. end type
  681. event clicked;call super::clicked;IF row > 0 THEN
  682. This.SelectRow(row, False)
  683. This.SetRow(row)
  684. This.SelectRow(row,True)
  685. END IF
  686. end event
  687. event doubleclicked;call super::doubleclicked;IF row > 0 THEN
  688. String ls_code
  689. Long ll_scid
  690. ll_scid = This.Object.u_buytask_scid[row]
  691. ls_code = This.Object.u_buytask_taskcode[row]
  692. f_open_win(ll_scid,ls_code)
  693. END IF
  694. end event
  695. type tabpage_2 from userobject within tab_1
  696. integer x = 18
  697. integer y = 96
  698. integer width = 2203
  699. integer height = 788
  700. long backcolor = 134217739
  701. string text = "进仓单"
  702. long tabtextcolor = 33554432
  703. long tabbackcolor = 134217739
  704. long picturemaskcolor = 536870912
  705. dw_inware dw_inware
  706. end type
  707. on tabpage_2.create
  708. this.dw_inware=create dw_inware
  709. this.Control[]={this.dw_inware}
  710. end on
  711. on tabpage_2.destroy
  712. destroy(this.dw_inware)
  713. end on
  714. type dw_inware from u_dw_rbtnfilter within tabpage_2
  715. integer height = 780
  716. string dataobject = "dw_rp_sale_saletask_jdgz_inware"
  717. boolean hscrollbar = true
  718. boolean vscrollbar = true
  719. boolean hsplitscroll = true
  720. boolean rbutton_filter_use = true
  721. boolean rbutton_setposition_use = true
  722. boolean titleclick_sort_use = true
  723. end type
  724. event clicked;call super::clicked;IF row > 0 THEN
  725. This.SelectRow(row, False)
  726. This.SetRow(row)
  727. This.SelectRow(row,True)
  728. END IF
  729. end event
  730. event doubleclicked;call super::doubleclicked;IF row > 0 THEN
  731. String ls_code
  732. Long ll_scid
  733. ll_scid = This.Object.u_inware_scid[row]
  734. ls_code = This.Object.u_inware_inwarecode[row]
  735. f_open_win(ll_scid,ls_code)
  736. END IF
  737. end event
  738. type tabpage_3 from userobject within tab_1
  739. integer x = 18
  740. integer y = 96
  741. integer width = 2203
  742. integer height = 788
  743. long backcolor = 134217739
  744. string text = "发货单"
  745. long tabtextcolor = 33554432
  746. long tabbackcolor = 134217739
  747. long picturemaskcolor = 536870912
  748. dw_outware_sale dw_outware_sale
  749. end type
  750. on tabpage_3.create
  751. this.dw_outware_sale=create dw_outware_sale
  752. this.Control[]={this.dw_outware_sale}
  753. end on
  754. on tabpage_3.destroy
  755. destroy(this.dw_outware_sale)
  756. end on
  757. type dw_outware_sale from u_dw_rbtnfilter within tabpage_3
  758. integer height = 780
  759. string dataobject = "dw_rp_sale_saletask_jdgz_outware_sale"
  760. boolean hscrollbar = true
  761. boolean vscrollbar = true
  762. boolean hsplitscroll = true
  763. boolean rbutton_filter_use = true
  764. boolean rbutton_setposition_use = true
  765. boolean titleclick_sort_use = true
  766. end type
  767. event clicked;call super::clicked;IF row > 0 THEN
  768. This.SelectRow(row, False)
  769. This.SetRow(row)
  770. This.SelectRow(row,True)
  771. END IF
  772. end event
  773. event doubleclicked;call super::doubleclicked;IF row > 0 THEN
  774. String ls_code
  775. Long ll_scid
  776. ll_scid = This.Object.u_outware_scid[row]
  777. ls_code = This.Object.code[row]
  778. f_open_win(ll_scid,ls_code)
  779. END IF
  780. end event
  781. type cb_3 from commandbutton within w_rp_sale_saletask
  782. boolean visible = false
  783. integer x = 2770
  784. integer y = 68
  785. integer width = 402
  786. integer height = 84
  787. integer taborder = 80
  788. boolean bringtotop = true
  789. integer textsize = -9
  790. integer weight = 400
  791. fontcharset fontcharset = gb2312charset!
  792. fontpitch fontpitch = variable!
  793. string facename = "宋体"
  794. string text = "none"
  795. end type
  796. event clicked;//(cur_scid_arr, cur_status,cur_stattype,firstdate,enddate,sys_areaid,
  797. //cur_kind, sys_user_outrep, li_option_outrep,cur_fhflag)
  798. messagebox("cur_status",cur_status)
  799. messagebox("cur_stattype",cur_stattype)
  800. //messagebox("sys_areaid",sys_areaid)
  801. messagebox("cur_kind",cur_kind)
  802. //messagebox("sys_user_outrep",sys_user_outrep)
  803. //messagebox("li_option_outrep",li_option_outrep)
  804. messagebox("cur_fhflag",cur_fhflag)
  805. end event
  806. type cbx_1 from checkbox within w_rp_sale_saletask
  807. integer x = 3447
  808. integer y = 196
  809. integer width = 850
  810. integer height = 60
  811. boolean bringtotop = true
  812. integer textsize = -9
  813. integer weight = 400
  814. fontcharset fontcharset = gb2312charset!
  815. fontpitch fontpitch = variable!
  816. string facename = "宋体"
  817. long textcolor = 33554432
  818. long backcolor = 134217739
  819. string text = "不显示终止订单或明细整行终止"
  820. end type
  821. event clicked;IF This.checked THEN
  822. cur_ifstop = 1
  823. ELSE
  824. cur_ifstop = 0
  825. END IF
  826. f_SetProfileString (sys_empid,Parent.Classname(), "cur_ifstop",String(cur_ifstop))
  827. cb_1.TriggerEvent(Clicked!)
  828. end event
  829. event constructor;cur_ifstop = Long(f_ProfileString (sys_empid, Parent.Classname(), "cur_ifstop", "0"))
  830. //This.Checked = cur_ifsc = 1
  831. //
  832. if cur_ifstop = 0 then
  833. This.Checked = false
  834. else
  835. This.Checked = true
  836. end if
  837. end event
  838. type cbx_iffinish from checkbox within w_rp_sale_saletask
  839. integer x = 4334
  840. integer y = 196
  841. integer width = 631
  842. integer height = 60
  843. boolean bringtotop = true
  844. integer textsize = -9
  845. integer weight = 400
  846. fontcharset fontcharset = gb2312charset!
  847. fontpitch fontpitch = variable!
  848. string facename = "宋体"
  849. long textcolor = 33554432
  850. long backcolor = 134217739
  851. string text = "不显示已完成发货明细"
  852. end type
  853. event clicked;IF This.checked THEN
  854. cur_iffinish = 1
  855. ELSE
  856. cur_iffinish = 0
  857. END IF
  858. f_SetProfileString (sys_empid,Parent.Classname(), "cur_iffinish",String(cur_iffinish))
  859. cb_1.TriggerEvent(Clicked!)
  860. end event
  861. event constructor;cur_iffinish = Long(f_ProfileString (sys_empid,Parent.Classname(), "cur_iffinish", "0"))
  862. //This.Checked = cur_ifsc = 1
  863. //
  864. if cur_iffinish = 0 then
  865. This.Checked = false
  866. else
  867. This.Checked = true
  868. end if
  869. end event