w_rp_sale_saletask.srw 26 KB

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