w_rp_sale_saletask.srw 26 KB

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