w_outware_pos.srw 46 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996
  1. $PBExportHeader$w_outware_pos.srw
  2. forward
  3. global type w_outware_pos from w_publ_base
  4. end type
  5. type dw_child from u_dw_rbtnfilter within w_outware_pos
  6. end type
  7. type st_3 from statictext within w_outware_pos
  8. end type
  9. type sle_barcode from singlelineedit within w_outware_pos
  10. end type
  11. type st_4 from statictext within w_outware_pos
  12. end type
  13. type em_qty from editmask within w_outware_pos
  14. end type
  15. type st_5 from statictext within w_outware_pos
  16. end type
  17. type em_amt from editmask within w_outware_pos
  18. end type
  19. type cb_1 from uo_imflatbutton within w_outware_pos
  20. end type
  21. type cb_js from uo_imflatbutton within w_outware_pos
  22. end type
  23. type dw_last from u_dw_rbtnfilter within w_outware_pos
  24. end type
  25. type cb_print from uo_imflatbutton within w_outware_pos
  26. end type
  27. type cbx_1 from checkbox within w_outware_pos
  28. end type
  29. type cbx_2 from checkbox within w_outware_pos
  30. end type
  31. type ln_1 from line within w_outware_pos
  32. end type
  33. type st_1 from statictext within w_outware_pos
  34. end type
  35. type st_user from statictext within w_outware_pos
  36. end type
  37. type st_6 from statictext within w_outware_pos
  38. end type
  39. type st_time from statictext within w_outware_pos
  40. end type
  41. type st_7 from statictext within w_outware_pos
  42. end type
  43. type st_billcode from statictext within w_outware_pos
  44. end type
  45. type cb_new from uo_imflatbutton within w_outware_pos
  46. end type
  47. type st_8 from statictext within w_outware_pos
  48. end type
  49. type sle_cust from singlelineedit within w_outware_pos
  50. end type
  51. type cb_2 from uo_imflatbutton within w_outware_pos
  52. end type
  53. type cbx_th from checkbox within w_outware_pos
  54. end type
  55. type dw_help from u_dw_rbtnfilter within w_outware_pos
  56. end type
  57. type ddlb_scid from uo_ddlb_scid within w_outware_pos
  58. end type
  59. type st_2 from statictext within w_outware_pos
  60. end type
  61. type ln_bar from line within w_outware_pos
  62. end type
  63. type ln_bar2 from line within w_outware_pos
  64. end type
  65. type r_bar from rectangle within w_outware_pos
  66. end type
  67. type ln_2 from line within w_outware_pos
  68. end type
  69. type ln_3 from line within w_outware_pos
  70. end type
  71. end forward
  72. global type w_outware_pos from w_publ_base
  73. integer width = 3611
  74. integer height = 2380
  75. string title = "零售单"
  76. boolean maxbox = true
  77. windowstate windowstate = maximized!
  78. event ue_new ( )
  79. event insert_childrow ( )
  80. event ue_cal ( )
  81. event user_key ( )
  82. event keydown pbm_keydown
  83. event ue_upone ( )
  84. event ue_downone ( )
  85. event ue_delone ( )
  86. event ue_changeqty ( )
  87. event ue_changeprice ( )
  88. event ue_changerebate ( )
  89. event ue_clearinput ( )
  90. event ue_changemxdscrp ( )
  91. event retrieve_last ( )
  92. event ue_f8 ( )
  93. event ue_hisbill ( )
  94. event ue_f5 ( )
  95. event ue_f1 ( )
  96. event ue_f9 ( )
  97. event ue_f6 ( )
  98. event ue_js ( )
  99. event ue_resize ( )
  100. event ue_viewprint ( )
  101. event ue_print ( )
  102. dw_child dw_child
  103. st_3 st_3
  104. sle_barcode sle_barcode
  105. st_4 st_4
  106. em_qty em_qty
  107. st_5 st_5
  108. em_amt em_amt
  109. cb_1 cb_1
  110. cb_js cb_js
  111. dw_last dw_last
  112. cb_print cb_print
  113. cbx_1 cbx_1
  114. cbx_2 cbx_2
  115. ln_1 ln_1
  116. st_1 st_1
  117. st_user st_user
  118. st_6 st_6
  119. st_time st_time
  120. st_7 st_7
  121. st_billcode st_billcode
  122. cb_new cb_new
  123. st_8 st_8
  124. sle_cust sle_cust
  125. cb_2 cb_2
  126. cbx_th cbx_th
  127. dw_help dw_help
  128. ddlb_scid ddlb_scid
  129. st_2 st_2
  130. ln_bar ln_bar
  131. ln_bar2 ln_bar2
  132. r_bar r_bar
  133. ln_2 ln_2
  134. ln_3 ln_3
  135. end type
  136. global w_outware_pos w_outware_pos
  137. type variables
  138. uo_outware_sale uo_ware
  139. Long ins_cusid = 0
  140. String ins_cusname = ''
  141. Boolean useuserkey = FALSE
  142. Long ins_def_storageid
  143. String ins_new_billtext = '正在建立...' //新建单时单据号码显示
  144. long cur_scid //分店ID
  145. long cur_scid_arr[]
  146. s_custom s_cust,s_isnull_cust
  147. int cur_help = 1
  148. end variables
  149. forward prototypes
  150. public function integer wf_add_score (long arg_cusid, decimal arg_totalamt, ref string arg_msg)
  151. public function integer wf_find_dftstorage (long arg_scid, ref long arg_storageid)
  152. end prototypes
  153. event ue_new();
  154. String arg_msg
  155. Long ls_i
  156. IF uo_ware.newbegin(cur_scid,1,arg_msg) = 0 THEN
  157. MessageBox('提示',arg_msg,information!,ok!)
  158. RETURN
  159. END IF
  160. dw_edit_mode = NOT dw_edit_mode
  161. dw_child.Reset()
  162. sle_barcode.SetFocus()
  163. st_billcode.Text = ins_new_billtext
  164. st_2.Text = ''
  165. sle_cust.text = ''
  166. s_cust = s_isnull_cust
  167. THIS.TriggerEvent('retrieve_last')
  168. end event
  169. event insert_childrow();Long li_row
  170. li_row = dw_child.InsertRow(0)
  171. dw_child.ScrollToRow(li_row)
  172. end event
  173. event ue_cal();IF dw_child.RowCount() = 0 THEN
  174. em_qty.Text = '0'
  175. em_amt.Text = '0'
  176. ELSE
  177. em_qty.Text = String(dw_child.Object.compute_qty[1],'#,##0.00##')
  178. em_amt.Text = String(dw_child.Object.compute_amt[1],'#,##0.00##')
  179. END IF
  180. end event
  181. event user_key();IF wf_find_dftstorage(cur_scid,ins_def_storageid) = 0 THEN
  182. MessageBox('提示','查询分部的默认零售仓库失败!',information!,ok!)
  183. return
  184. END IF
  185. IF KeyDown(KeyInsert!) THEN
  186. THIS.PostEvent('ue_new')
  187. RETURN
  188. ELSEIF KeyDown(KeyUpArrow!) THEN
  189. THIS.PostEvent('ue_upone')
  190. RETURN
  191. ELSEIF KeyDown(KeyDownArrow!) THEN
  192. THIS.PostEvent('ue_downone')
  193. RETURN
  194. ELSEIF KeyDown(KeyDelete!) THEN
  195. THIS.PostEvent('ue_delone')
  196. RETURN
  197. ELSEIF KeyDown(KeyRightArrow!) THEN
  198. THIS.PostEvent('ue_changeqty')
  199. RETURN
  200. ELSEIF KeyDown(KeyLeftArrow!) THEN
  201. THIS.PostEvent('ue_changeprice')
  202. RETURN
  203. ELSEIF KeyDown(KeySlash!) OR KeyDown(KeyDivide!) THEN
  204. THIS.PostEvent('ue_changerebate')
  205. RETURN
  206. ELSEIF KeyDown(KeyControl!) AND KeyDown(KeyM!) THEN
  207. THIS.PostEvent('ue_changemxdscrp')
  208. RETURN
  209. ELSEIF KeyDown(KeyEnd!) THEN
  210. cb_js.TriggerEvent(Clicked!)
  211. RETURN
  212. ELSEIF KeyDown(KeyF8!) THEN
  213. THIS.TriggerEvent('ue_f8')
  214. RETURN
  215. ELSEIF KeyDown(KeyF9!) THEN
  216. THIS.TriggerEvent('ue_f9')
  217. RETURN
  218. ELSEIF KeyDown(KeyF6!) THEN
  219. THIS.TriggerEvent('ue_f6')
  220. RETURN
  221. ELSEIF KeyDown(KeyF5!) THEN
  222. THIS.TriggerEvent('ue_f5')
  223. RETURN
  224. ELSEIF KeyDown(KeyF4!) THEN
  225. THIS.TriggerEvent('ue_viewprint')
  226. RETURN
  227. ELSEIF KeyDown(KeyF1!) THEN
  228. THIS.TriggerEvent('ue_f1')
  229. RETURN
  230. ELSEIF KeyDown(KeyPageUp!) THEN
  231. THIS.TriggerEvent('ue_hisbill')
  232. RETURN
  233. ELSEIF KeyDown(KeyEscape!) THEN
  234. IF MessageBox('询问','是否要关闭当前窗口?',question!,yesno!) <> 1 THEN RETURN
  235. Close(THIS)
  236. RETURN
  237. END IF
  238. end event
  239. event keydown;this.triggerevent('user_key')
  240. end event
  241. event ue_upone();if dw_child.rowcount() = 0 then
  242. return
  243. end if
  244. if dw_child.getrow() = 0 then
  245. dw_child.scrolltorow(1)
  246. return
  247. else
  248. long child_row
  249. child_row = dw_child.getrow()
  250. if child_row <> 1 then
  251. child_row = child_row - 1
  252. dw_child.scrolltorow(child_row)
  253. dw_child.selectrow( 0, false)
  254. dw_child.selectrow( child_row, true)
  255. return
  256. end if
  257. end if
  258. end event
  259. event ue_downone();IF dw_child.RowCount() = 0 THEN
  260. RETURN
  261. END IF
  262. IF dw_child.GetRow() = 0 THEN
  263. dw_child.ScrollToRow(1)
  264. RETURN
  265. ELSE
  266. Long child_row
  267. child_row = dw_child.GetRow()
  268. IF child_row <> dw_child.RowCount() THEN
  269. child_row = child_row + 1
  270. dw_child.ScrollToRow(child_row)
  271. dw_child.SelectRow( 0, FALSE)
  272. dw_child.SelectRow( dw_child.GetRow(), TRUE)
  273. RETURN
  274. END IF
  275. END IF
  276. end event
  277. event ue_delone();IF dw_child.RowCount() = 0 THEN
  278. OpenWithParm(w_pos_msg,'无数据可删除!')
  279. RETURN
  280. END IF
  281. Long child_row
  282. child_row = dw_child.GetRow()
  283. IF child_row <= 0 THEN
  284. OpenWithParm(w_pos_msg,'请选择要删除的行!')
  285. RETURN
  286. END IF
  287. IF MessageBox('询问','是否要删除第'+String(child_row)+'行?',question!,yesno!) = 2 THEN RETURN
  288. dw_child.DeleteRow(child_row)
  289. IF dw_child.RowCount() > 0 THEN
  290. child_row = child_row - 1
  291. IF child_row = 0 THEN child_row = 1
  292. dw_child.ScrollToRow(child_row)
  293. dw_child.SelectRow( 0, FALSE)
  294. dw_child.SelectRow( child_row, TRUE)
  295. END IF
  296. THIS.TriggerEvent('ue_cal')
  297. end event
  298. event ue_changeqty();//修改数量
  299. Long child_row
  300. child_row = dw_child.GetRow()
  301. IF child_row = 0 THEN RETURN
  302. dw_child.AcceptText()
  303. Long ls_printid
  304. String ls_mtrlname
  305. Dec ls_qty
  306. ls_printid = dw_child.Object.print_id[child_row]
  307. ls_mtrlname = dw_child.Object.u_mtrldef_mtrlname[child_row]
  308. ls_qty = dw_child.Object.u_outwaremx_qty[child_row]
  309. s_pos_qty_tran s_qty_tran
  310. s_qty_tran.mtrlname = ls_mtrlname
  311. s_qty_tran.pid = ls_printid
  312. s_qty_tran.preqty = ls_qty
  313. OpenWithParm(w_outware_pos_qty,s_qty_tran)
  314. s_qty_tran = Message.PowerObjectParm
  315. IF s_qty_tran.if_ok = 0 THEN RETURN
  316. dw_child.Object.u_outwaremx_qty[child_row] = s_qty_tran.newqty
  317. end event
  318. event ue_changeprice();//修改数量
  319. Long child_row
  320. child_row = dw_child.GetRow()
  321. IF child_row = 0 THEN RETURN
  322. dw_child.AcceptText()
  323. Long ls_printid
  324. String ls_mtrlname
  325. Dec ls_price
  326. ls_printid = dw_child.Object.print_id[child_row]
  327. ls_mtrlname = dw_child.Object.u_mtrldef_mtrlname[child_row]
  328. ls_price = dw_child.Object.u_outwaremx_fprice[child_row]
  329. s_pos_price_tran s_price_tran
  330. s_price_tran.mtrlname = ls_mtrlname
  331. s_price_tran.pid = ls_printid
  332. s_price_tran.preprice = ls_price
  333. OpenWithParm(w_outware_pos_price,s_price_tran)
  334. s_price_tran = Message.PowerObjectParm
  335. IF s_price_tran.if_ok = 0 THEN RETURN
  336. dw_child.Object.u_outwaremx_fprice[child_row] = s_price_tran.newprice
  337. end event
  338. event ue_changerebate();//修改数量
  339. Long child_row
  340. child_row = dw_child.GetRow()
  341. IF child_row = 0 THEN RETURN
  342. dw_child.AcceptText()
  343. Long ls_printid
  344. String ls_mtrlname
  345. Dec ls_rebate
  346. ls_printid = dw_child.Object.print_id[child_row]
  347. ls_mtrlname = dw_child.Object.u_mtrldef_mtrlname[child_row]
  348. ls_rebate = dw_child.Object.u_outwaremx_rebate[child_row]
  349. s_pos_rebate_tran s_rebate_tran
  350. s_rebate_tran.mtrlname = ls_mtrlname
  351. s_rebate_tran.pid = ls_printid
  352. s_rebate_tran.prerebate = ls_rebate
  353. IF f_power_ind(1293) THEN
  354. MessageBox('提示','你没有使用权限!', Information!, OK! )
  355. RETURN
  356. END IF
  357. OpenWithParm(w_outware_pos_rebate,s_rebate_tran)
  358. s_rebate_tran = Message.PowerObjectParm
  359. IF Pos(sle_barcode.Text,'/') > 0 THEN
  360. sle_barcode.Text = ''
  361. END IF
  362. IF s_rebate_tran.if_ok = 0 THEN RETURN
  363. dw_child.Object.u_outwaremx_rebate[child_row] = s_rebate_tran.newrebate
  364. end event
  365. event ue_clearinput();IF Pos(sle_barcode.Text,'/') > 0 THEN
  366. sle_barcode.Text = ''
  367. END IF
  368. end event
  369. event ue_changemxdscrp();//修改数量
  370. Long child_row
  371. child_row = dw_child.GetRow()
  372. IF child_row = 0 THEN RETURN
  373. dw_child.AcceptText()
  374. Long ls_printid
  375. String ls_mtrlname
  376. String ls_mxdscrp
  377. ls_printid = dw_child.Object.print_id[child_row]
  378. ls_mtrlname = dw_child.Object.u_mtrldef_mtrlname[child_row]
  379. ls_mxdscrp = dw_child.Object.u_outwaremx_mxdscrp[child_row]
  380. s_pos_mxdscrp_tran s_dscrp_tran
  381. s_dscrp_tran.mtrlname = ls_mtrlname
  382. s_dscrp_tran.pid = ls_printid
  383. s_dscrp_tran.predscrp = ls_mxdscrp
  384. OpenWithParm(w_outware_pos_mxdscrp,s_dscrp_tran)
  385. s_dscrp_tran = Message.PowerObjectParm
  386. IF Upper(Left(sle_barcode.Text,1)) = 'M' THEN
  387. sle_barcode.Text = ''
  388. END IF
  389. IF s_dscrp_tran.if_ok = 0 THEN RETURN
  390. dw_child.Object.u_outwaremx_mxdscrp[child_row] = s_dscrp_tran.newdscrp
  391. end event
  392. event retrieve_last();dw_last.Retrieve(publ_operator)
  393. IF dw_last.RowCount() = 0 THEN
  394. dw_last.InsertRow(0)
  395. END IF
  396. end event
  397. event ue_f8();Openwithparm(w_outware_pos_findmtrl,ins_def_storageid)
  398. s_pos_mtrl s_rt
  399. s_rt = Message.PowerObjectParm
  400. IF isnull(s_rt.if_ok) or s_rt.if_ok = 0 THEN RETURN
  401. sle_barcode.Text = s_rt.mtrlcode
  402. cb_1.TriggerEvent(Clicked!)
  403. end event
  404. event ue_hisbill();//取单据
  405. openwithparm(w_outware_pos_hisbill,cur_scid)
  406. s_pos_hisbill s_rt
  407. s_rt = message.powerobjectparm
  408. if s_rt.if_ok = 0 then return
  409. long ls_scid,ls_outwareid
  410. ls_scid = s_rt.scid
  411. ls_outwareid = s_rt.outwareid
  412. if dw_child.rowcount() > 0 then
  413. if messagebox('询问','发现已存在明细数据,是否要清除当前并打开单据?',question!,yesno!)=2 then return
  414. end if
  415. sle_barcode.text = ''
  416. string arg_msg
  417. IF uo_ware.getinfo(ls_scid,ls_outwareid,arg_msg) = 0 THEN
  418. openwithparm(w_pos_msg,arg_msg)
  419. RETURN
  420. END IF
  421. st_billcode.text = uo_ware.outwarecode
  422. long ls_i
  423. dw_child.retrieve(ls_scid,ls_outwareid)
  424. this.triggerevent('ue_cal')
  425. end event
  426. event ue_f5();if st_billcode.text = ins_new_billtext then
  427. messagebox('提示','正在建立单据不能打印!',information!,ok!)
  428. return
  429. end if
  430. cb_print.triggerevent(clicked!)
  431. end event
  432. event ue_f1();cur_help = 1 - cur_help
  433. IF cur_help = 1 THEN
  434. dw_help.Visible = TRUE
  435. dw_child.X = dw_help.Width + 5
  436. dw_child.Width = THIS.WorkSpaceWidth() - dw_help.Width - 5
  437. ELSE
  438. dw_child.X = 0
  439. dw_child.Width = THIS.WorkSpaceWidth()
  440. dw_help.Visible = FALSE
  441. END IF
  442. end event
  443. event ue_f9();//高级商品查询
  444. Long child_row
  445. Long ls_sptid
  446. Long ll_storageid
  447. Decimal ls_price,ls_rebate
  448. IF NOT IsValid(W_mtrldef_edit) THEN
  449. s_edit_index_tran s_tranf8 //传递参数使用
  450. s_tranf8.if_retrieve_all = FALSE //是否一次RETRIEVE所有行
  451. s_tranf8.work_mode = 1 //0-单纯编辑模式 1-选择\编辑模式
  452. s_tranf8.arg_pkid = 0 //目标定位PKID (备用)
  453. s_tranf8.arg_string_code = '' //查询列(物料编码)部分内容,用于初步筛选
  454. s_tranf8.if_select_all = TRUE //多选
  455. s_tranf8.b_long = 2 //选采购
  456. s_tranf8.c_long = ll_storageid
  457. Long chc = 1,ls_j
  458. IF dw_child.GetRow() > 0 THEN s_tranf8.arg_string_code = Trim(dw_child.Object.u_mtrldef_mtrlcode[dw_child.GetRow()])
  459. OpenWithParm(W_mtrldef_edit,s_tranf8) //调用
  460. s_mtrldef_array S_INSCUST
  461. S_INSCUST = Message.PowerObjectParm //接受返回结构
  462. FOR ls_j = 1 TO UpperBound(S_INSCUST.mtrlid)
  463. IF S_INSCUST.mtrlid[ls_j] > 0 THEN //正常返回值则可以取以下值
  464. sle_barcode.text = S_INSCUST.mtrlcode[ls_j]
  465. cb_1.triggerevent(clicked!)
  466. END IF
  467. NEXT
  468. END IF
  469. end event
  470. event ue_f6();
  471. IF NOT IsValid(W_cust_edit) THEN
  472. s_edit_index_tran s_ch_tran //传递参数使用
  473. s_ch_tran.if_retrieve_all = FALSE //是否一次RETRIEVE所有行
  474. s_ch_tran.work_mode = 1 //0-单纯编辑模式 1-选择\编辑模式
  475. s_ch_tran.arg_pkid = 0 //目标定位PKID (备用)
  476. //查询列(物料编码)部分内容,用于初步筛选
  477. s_ch_tran.arg_string_code = Upper(Trim(sle_cust.Text))
  478. OpenWithParm(W_cust_edit,s_ch_tran) //调用
  479. s_custom S_INSCUST
  480. S_INSCUST = Message.PowerObjectParm //接受返回结构
  481. IF S_INSCUST.cusid > 0 THEN //正常返回值则可以取以下值
  482. s_cust = S_INSCUST
  483. sle_cust.Text = s_cust.cuscode
  484. st_2.text = s_cust.name
  485. END IF
  486. END IF
  487. sle_barcode.SetFocus()
  488. end event
  489. event ue_js();IF dw_child.RowCount() = 0 THEN
  490. sle_barcode.Text = ''
  491. OpenWithParm(w_pos_msg,'请先输入明细内容!')
  492. RETURN
  493. END IF
  494. Long ll_printid,i,j
  495. String arg_msg
  496. Boolean ls_mod_flag = FALSE
  497. THIS.TriggerEvent('ue_cal')
  498. Decimal ls_totalamt
  499. ls_totalamt = dw_child.Object.compute_amt[1]
  500. OpenWithParm(w_outware_pos_js,ls_totalamt)
  501. s_pos_bank s_rt
  502. s_rt = Message.PowerObjectParm
  503. IF s_rt.if_ok = 0 THEN RETURN
  504. //如果是修改单顺序财撤->仓撤->修改
  505. IF uo_ware.outwareid > 0 THEN
  506. IF uo_ware.getinfo(cur_scid,uo_ware.outwareid,arg_msg) = 0 THEN
  507. MessageBox('错误',arg_msg,stopsign!,ok!)
  508. sle_barcode.Text = ''
  509. sle_barcode.SetFocus()
  510. RETURN
  511. END IF
  512. IF uo_ware.secflag = 1 THEN
  513. IF uo_ware.c_secauditing(FALSE,arg_msg) = 0 THEN
  514. MessageBox('错误',arg_msg,stopsign!,ok!)
  515. RETURN
  516. END IF
  517. END IF
  518. IF uo_ware.flag = 1 THEN
  519. IF uo_ware.c_auditing(FALSE,arg_msg) = 0 THEN
  520. MessageBox('错误',arg_msg,stopsign!,ok!)
  521. RETURN
  522. END IF
  523. END IF
  524. IF uo_ware.updatebegin(cur_scid,uo_ware.outwareid,1,arg_msg) = 0 THEN
  525. ROLLBACK;
  526. MessageBox('错误',arg_msg,stopsign!,ok!)
  527. RETURN
  528. END IF
  529. ELSE
  530. IF uo_ware.newbegin(cur_scid,1,arg_msg) = 0 THEN
  531. MessageBox('错误',arg_msg,stopsign!,ok!)
  532. RETURN
  533. END IF
  534. uo_ware.outdate = DateTime(Today(),Now())
  535. uo_ware.outrep = st_user.Text
  536. uo_ware.part = ''
  537. uo_ware.dscrp = ''
  538. IF s_cust.cusid = 0 THEN
  539. uo_ware.cusid = ins_cusid
  540. ELSE
  541. uo_ware.cusid = s_cust.cusid
  542. END IF
  543. IF cbx_th.Checked THEN
  544. uo_ware.thflag = 1
  545. ELSE
  546. uo_ware.thflag = 0
  547. END IF
  548. END IF
  549. s_outwaremx s_mx
  550. Long ll_banktypeid
  551. SELECT top 1 banktypeid
  552. INTO :ll_banktypeid
  553. FROM cw_banktype
  554. Where banktype = 0 AND btype = 1 AND inuse = 1;
  555. IF sqlca.SQLCode <> 0 THEN
  556. MessageBox('错误','查询结算方式失败',stopsign!,ok!)
  557. RETURN
  558. END IF
  559. Long ll_moneyid
  560. SELECT moneyid
  561. INTO :ll_moneyid
  562. FROM cw_currency
  563. Where native = 1;
  564. IF sqlca.SQLCode <> 0 THEN
  565. MessageBox('错误','查询本位币失败',stopsign!,ok!)
  566. RETURN
  567. END IF
  568. uo_ware.storageid = ins_def_storageid
  569. uo_ware.totalamt = ls_totalamt
  570. uo_ware.getamt = s_rt.getamt
  571. uo_ware.lsflag = 1
  572. uo_ware.mrate = 1
  573. uo_ware.relint_1 = ll_banktypeid
  574. uo_ware.relint_2 = ll_moneyid
  575. dw_child.AcceptText()
  576. FOR i = 1 TO dw_child.RowCount()
  577. IF dw_child.Object.u_outwaremx_mtrlwareid[i] > 0 THEN
  578. ll_printid = dw_child.Object.print_id[i]
  579. s_mx.mtrlwareid = dw_child.Object.u_outwaremx_mtrlwareid[i]
  580. s_mx.qty = dw_child.Object.u_outwaremx_qty[i]
  581. s_mx.addqty = 0
  582. s_mx.fprice = dw_child.Object.u_outwaremx_fprice[i]
  583. s_mx.rebate = dw_child.Object.u_outwaremx_rebate[i]
  584. s_mx.mxdscrp = dw_child.Object.u_outwaremx_mxdscrp[i]
  585. s_mx.printid = ll_printid
  586. s_mx.ifrel = 0
  587. s_mx.relid = 0
  588. s_mx.relprintid = 0
  589. s_mx.relid2 = 0
  590. s_mx.olmtrlid = 0
  591. s_mx.packqty = 0
  592. s_mx.outtype = 0
  593. s_mx.unit = dw_child.Object.u_mtrldef_unit[i]
  594. s_mx.rate = 1
  595. s_mx.mtrlcuscode = ''
  596. s_mx.formula = ''
  597. s_mx.mxdscrp2 = ''
  598. IF uo_ware.acceptmx(s_mx, arg_msg) = 0 THEN
  599. MessageBox('错误',arg_msg,stopsign!,ok!)
  600. sle_barcode.Text = ''
  601. sle_barcode.SetFocus()
  602. RETURN
  603. END IF
  604. // IF uo_ware.acceptmx(dw_child.Object.u_outwaremx_mtrlwareid[i],&
  605. // dw_child.Object.u_outwaremx_qty[i],0,&
  606. // dw_child.Object.u_outwaremx_fprice[i],&
  607. // dw_child.Object.u_outwaremx_rebate[i],&
  608. // dw_child.Object.u_outwaremx_mxdscrp[i],&
  609. // ll_printid,&
  610. // arg_msg,0,0,0,0,0,&
  611. // dw_child.Object.u_mtrldef_unit[i],&
  612. // 1,&
  613. // '','') = 0 THEN
  614. // MessageBox('错误',arg_msg,stopsign!,ok!)
  615. // sle_barcode.Text = ''
  616. // sle_barcode.SetFocus()
  617. // RETURN
  618. // END IF
  619. END IF
  620. NEXT
  621. IF uo_ware.Save(FALSE,arg_msg) = 0 THEN
  622. MessageBox('错误',arg_msg,stopsign!,ok!)
  623. sle_barcode.Text = ''
  624. sle_barcode.SetFocus()
  625. RETURN
  626. END IF
  627. IF uo_ware.getinfo(cur_scid,uo_ware.outwareid,arg_msg) = 0 THEN
  628. MessageBox('错误',arg_msg,stopsign!,ok!)
  629. sle_barcode.Text = ''
  630. sle_barcode.SetFocus()
  631. RETURN
  632. END IF
  633. IF uo_ware.auditing(TRUE,arg_msg) = 0 THEN
  634. MessageBox('错误',arg_msg,stopsign!,ok!)
  635. sle_barcode.Text = ''
  636. sle_barcode.SetFocus()
  637. RETURN
  638. END IF
  639. IF uo_ware.getinfo(cur_scid,uo_ware.outwareid,arg_msg) = 0 THEN
  640. MessageBox('错误',arg_msg,stopsign!,ok!)
  641. sle_barcode.Text = ''
  642. sle_barcode.SetFocus()
  643. RETURN
  644. END IF
  645. IF uo_ware.secauditing(TRUE,arg_msg) = 0 THEN
  646. MessageBox('错误',arg_msg,stopsign!,ok!)
  647. sle_barcode.Text = ''
  648. sle_barcode.SetFocus()
  649. RETURN
  650. END IF
  651. ///加积分
  652. IF s_cust.cusid > 0 AND uo_ware.thflag = 0 THEN
  653. IF wf_add_score(s_cust.cusid,ls_totalamt,arg_msg) = 0 THEN
  654. MessageBox('错误',arg_msg,stopsign!,ok!)
  655. RETURN
  656. END IF
  657. END IF
  658. st_billcode.Text = uo_ware.outwarecode
  659. OpenWithParm(w_pos_zl,'找回:'+String(s_rt.backamt,'#,##0.00'))
  660. dw_edit_mode = NOT dw_edit_mode
  661. end event
  662. event ue_viewprint();String ls_dft_old_dwname, ls_dft_new_dwname,ls_chnname,ls_dwtype
  663. Long ls_dwprintid
  664. String ls_windowname
  665. Int ls_i
  666. Long ll_billid
  667. Int li_ifuse
  668. Long ll_row
  669. String Name,ll_rpname
  670. Long ll_RpID,ll_flag,ll_ifuse
  671. w_curwin = this
  672. ls_windowname = this.ClassName ( )
  673. IF NOT f_power_ind(851) THEN
  674. MessageBox('提示','你没有使用权限!',information!,ok!)
  675. RETURN
  676. END IF
  677. s_print_msg ls_prmsg
  678. IF dw_child.RowCount() = 0 THEN
  679. MessageBox('提示','没有可打印的单据!',information!,ok!)
  680. RETURN
  681. END IF
  682. SELECT top 1 dwprintid,
  683. dft_old_dwname,
  684. dft_new_dwname,
  685. chnname,
  686. dwtype
  687. INTO :ls_dwprintid,
  688. :ls_dft_old_dwname,
  689. :ls_dft_new_dwname,
  690. :ls_chnname,
  691. :ls_dwtype
  692. FROM sys_dft_dwprint_dynamic
  693. WHERE dwtype = :ls_windowname
  694. AND ptype = 1 AND ifuse = 1;
  695. IF sqlca.SQLCode <> 0 THEN
  696. LS_PRMSG.obj_dwNAME = 'dw_rp_outware_sale_edit_ls'
  697. ELSE
  698. datastore temp_dw
  699. temp_dw = CREATE datastore
  700. temp_dw.SetTransObject (sqlca)
  701. temp_dw.DataObject = ls_dft_new_dwname
  702. //判断DW是否存在
  703. IF temp_dw.Describe("DataWindow.Objects") = "" THEN
  704. LS_PRMSG.obj_dwNAME = 'dw_rp_outware_sale_edit_ls'
  705. ELSE
  706. LS_PRMSG.obj_dwNAME = ls_dft_new_dwname
  707. END IF
  708. END IF
  709. ls_prmsg.retr_pram_falg = 15
  710. ls_prmsg.tag_text = '小票'
  711. ls_prmsg.filter_string = ''
  712. ls_prmsg.pagech_flag = 0
  713. ls_prmsg.retr_scid = cur_scid
  714. ls_prmsg.retr_pramnmb = uo_ware.outwareid
  715. ls_prmsg.rowcnt = dw_child.RowCount()
  716. OpenWithParm(w_publ_preview,ls_prmsg)
  717. //**更新打印次料
  718. String arg_msg
  719. printnum = Message.DoubleParm
  720. //f_update_printnum('u_outware',printnum,uo_ware.outwareid,arg_msg,TRUE)
  721. f_update_printnum('u_outware',1,cur_scid,uo_ware.outwareid,'','',arg_msg,TRUE)
  722. end event
  723. event ue_print();String ls_dft_old_dwname, ls_dft_new_dwname,ls_chnname,ls_dwtype
  724. Long ls_dwprintid
  725. String ls_windowname
  726. Int ls_i
  727. Long ll_billid
  728. Int li_ifuse
  729. Long ll_row
  730. String Name,ll_rpname
  731. Long ll_RpID,ll_flag,ll_ifuse
  732. w_curwin = this
  733. ls_windowname = this.ClassName ( )
  734. //--直接打印
  735. IF NOT f_power_ind(851) THEN
  736. MessageBox('提示','你没有使用权限!',information!,ok!)
  737. RETURN
  738. END IF
  739. uo_print_preview uo_print
  740. S_print_MSG LS_PRMSG
  741. IF dw_child.RowCount() = 0 THEN
  742. MessageBox('提示','没有可打印的单据!',information!,ok!)
  743. RETURN
  744. END IF
  745. SELECT top 1 dwprintid,
  746. dft_old_dwname,
  747. dft_new_dwname,
  748. chnname,
  749. dwtype
  750. INTO :ls_dwprintid,
  751. :ls_dft_old_dwname,
  752. :ls_dft_new_dwname,
  753. :ls_chnname,
  754. :ls_dwtype
  755. FROM sys_dft_dwprint_dynamic
  756. WHERE dwtype = :ls_windowname
  757. AND ptype = 1 AND ifuse = 1;
  758. IF sqlca.SQLCode <> 0 THEN
  759. LS_PRMSG.obj_dwNAME = 'dw_rp_outware_sale_edit_ls'
  760. ELSE
  761. datastore temp_dw
  762. temp_dw = CREATE datastore
  763. temp_dw.SetTransObject (sqlca)
  764. temp_dw.DataObject = ls_dft_new_dwname
  765. //判断DW是否存在
  766. IF temp_dw.Describe("DataWindow.Objects") = "" THEN
  767. LS_PRMSG.obj_dwNAME = 'dw_rp_outware_sale_edit_ls'
  768. ELSE
  769. LS_PRMSG.obj_dwNAME = ls_dft_new_dwname
  770. END IF
  771. END IF
  772. if uo_ware.outwareid = 0 then return
  773. LS_PRMSG.retr_pram_falg = 15
  774. LS_PRMSG.TAG_TEXT = '小票'
  775. LS_PRMSG.FILTER_STRING = ''
  776. LS_PRMSG.PAGECH_FLAG = 0
  777. LS_PRMSG.retr_scid = cur_scid
  778. LS_PRMSG.retr_pramnmb = uo_ware.outwareid
  779. LS_PRMSG.rowcnt = dw_child.RowCount()
  780. uo_print.FACT_PRINT_MSG = LS_PRMSG
  781. String arg_msg
  782. IF uo_print.uof_print_begin(arg_msg) = 0 THEN
  783. MessageBox("提示",arg_msg,information!,ok!)
  784. RETURN
  785. END IF
  786. uo_print.ds_print()
  787. //**更新打印次料
  788. f_update_printnum('u_outware',1,cur_scid,uo_ware.outwareid,'','',arg_msg,TRUE)
  789. end event
  790. public function integer wf_add_score (long arg_cusid, decimal arg_totalamt, ref string arg_msg);Int rslt = 1
  791. Decimal ld_score
  792. ld_score = 0
  793. SELECT u_cust_member.scoretype * :arg_totalamt
  794. INTO :ld_score
  795. FROM u_cust_member,u_cust
  796. WHERE u_cust_member.memberid = u_cust.memberid
  797. AND u_cust.cusid = :arg_cusid AND u_cust.lsflag = 0 ;
  798. IF sqlca.SQLCode <> 0 THEN
  799. arg_msg = '更新客户积分失败'
  800. rslt = 0
  801. GOTO ext
  802. END IF
  803. uo_custdef uo_cust
  804. uo_cust = CREATE uo_custdef
  805. uo_cust.commit_transaction = sqlca
  806. IF uo_cust.uof_cust_score(arg_cusid,ld_score,arg_msg,TRUE) = 0 THEN
  807. rslt = 0
  808. GOTO ext
  809. END IF
  810. ext:
  811. RETURN rslt
  812. end function
  813. public function integer wf_find_dftstorage (long arg_scid, ref long arg_storageid);Int rslt = 1
  814. Int ls_storageid
  815. SELECT top 1 u_storage.storageid
  816. INTO :arg_storageid
  817. FROM u_storage
  818. Where u_storage.lsflag = 1
  819. and u_storage.scid = :arg_scid;
  820. IF sqlca.SQLCode <> 0 THEN
  821. rslt = 0
  822. GOTO ext
  823. ELSEIF sqlca.SQLNRows = 0 THEN
  824. rslt = 0
  825. GOTO ext
  826. END IF
  827. ext:
  828. RETURN rslt
  829. end function
  830. on w_outware_pos.create
  831. int iCurrent
  832. call super::create
  833. this.dw_child=create dw_child
  834. this.st_3=create st_3
  835. this.sle_barcode=create sle_barcode
  836. this.st_4=create st_4
  837. this.em_qty=create em_qty
  838. this.st_5=create st_5
  839. this.em_amt=create em_amt
  840. this.cb_1=create cb_1
  841. this.cb_js=create cb_js
  842. this.dw_last=create dw_last
  843. this.cb_print=create cb_print
  844. this.cbx_1=create cbx_1
  845. this.cbx_2=create cbx_2
  846. this.ln_1=create ln_1
  847. this.st_1=create st_1
  848. this.st_user=create st_user
  849. this.st_6=create st_6
  850. this.st_time=create st_time
  851. this.st_7=create st_7
  852. this.st_billcode=create st_billcode
  853. this.cb_new=create cb_new
  854. this.st_8=create st_8
  855. this.sle_cust=create sle_cust
  856. this.cb_2=create cb_2
  857. this.cbx_th=create cbx_th
  858. this.dw_help=create dw_help
  859. this.ddlb_scid=create ddlb_scid
  860. this.st_2=create st_2
  861. this.ln_bar=create ln_bar
  862. this.ln_bar2=create ln_bar2
  863. this.r_bar=create r_bar
  864. this.ln_2=create ln_2
  865. this.ln_3=create ln_3
  866. iCurrent=UpperBound(this.Control)
  867. this.Control[iCurrent+1]=this.dw_child
  868. this.Control[iCurrent+2]=this.st_3
  869. this.Control[iCurrent+3]=this.sle_barcode
  870. this.Control[iCurrent+4]=this.st_4
  871. this.Control[iCurrent+5]=this.em_qty
  872. this.Control[iCurrent+6]=this.st_5
  873. this.Control[iCurrent+7]=this.em_amt
  874. this.Control[iCurrent+8]=this.cb_1
  875. this.Control[iCurrent+9]=this.cb_js
  876. this.Control[iCurrent+10]=this.dw_last
  877. this.Control[iCurrent+11]=this.cb_print
  878. this.Control[iCurrent+12]=this.cbx_1
  879. this.Control[iCurrent+13]=this.cbx_2
  880. this.Control[iCurrent+14]=this.ln_1
  881. this.Control[iCurrent+15]=this.st_1
  882. this.Control[iCurrent+16]=this.st_user
  883. this.Control[iCurrent+17]=this.st_6
  884. this.Control[iCurrent+18]=this.st_time
  885. this.Control[iCurrent+19]=this.st_7
  886. this.Control[iCurrent+20]=this.st_billcode
  887. this.Control[iCurrent+21]=this.cb_new
  888. this.Control[iCurrent+22]=this.st_8
  889. this.Control[iCurrent+23]=this.sle_cust
  890. this.Control[iCurrent+24]=this.cb_2
  891. this.Control[iCurrent+25]=this.cbx_th
  892. this.Control[iCurrent+26]=this.dw_help
  893. this.Control[iCurrent+27]=this.ddlb_scid
  894. this.Control[iCurrent+28]=this.st_2
  895. this.Control[iCurrent+29]=this.ln_bar
  896. this.Control[iCurrent+30]=this.ln_bar2
  897. this.Control[iCurrent+31]=this.r_bar
  898. this.Control[iCurrent+32]=this.ln_2
  899. this.Control[iCurrent+33]=this.ln_3
  900. end on
  901. on w_outware_pos.destroy
  902. call super::destroy
  903. destroy(this.dw_child)
  904. destroy(this.st_3)
  905. destroy(this.sle_barcode)
  906. destroy(this.st_4)
  907. destroy(this.em_qty)
  908. destroy(this.st_5)
  909. destroy(this.em_amt)
  910. destroy(this.cb_1)
  911. destroy(this.cb_js)
  912. destroy(this.dw_last)
  913. destroy(this.cb_print)
  914. destroy(this.cbx_1)
  915. destroy(this.cbx_2)
  916. destroy(this.ln_1)
  917. destroy(this.st_1)
  918. destroy(this.st_user)
  919. destroy(this.st_6)
  920. destroy(this.st_time)
  921. destroy(this.st_7)
  922. destroy(this.st_billcode)
  923. destroy(this.cb_new)
  924. destroy(this.st_8)
  925. destroy(this.sle_cust)
  926. destroy(this.cb_2)
  927. destroy(this.cbx_th)
  928. destroy(this.dw_help)
  929. destroy(this.ddlb_scid)
  930. destroy(this.st_2)
  931. destroy(this.ln_bar)
  932. destroy(this.ln_bar2)
  933. destroy(this.r_bar)
  934. destroy(this.ln_2)
  935. destroy(this.ln_3)
  936. end on
  937. event resize;call super::resize;ln_bar.EndX = THIS.Width
  938. ln_bar2.EndX = THIS.Width
  939. ln_1.EndX = THIS.Width
  940. ln_2.EndX = THIS.Width
  941. r_bar.Width = THIS.Width
  942. ln_3.EndX = THIS.Width
  943. Long w_width,w_height
  944. w_width = 3602
  945. w_height = 2300
  946. IF newwidth < w_width THEN THIS.Width = w_width
  947. IF newheight < w_height THEN THIS.Height = w_height
  948. dw_child.x = 0
  949. dw_child.Width = THIS.WorkSpaceWidth()
  950. dw_child.Height = THIS.WorkSpaceHeight() - 570
  951. dw_help.Height = THIS.WorkSpaceHeight() - 570
  952. dw_help.visible = false
  953. st_4.Y = THIS.WorkSpaceHeight() - st_4.Height - 50
  954. em_qty.Y = st_4.Y
  955. st_5.Y = st_4.Y
  956. em_amt.Y = st_4.Y
  957. ln_1.BeginY = st_4.Y - 5
  958. ln_1.EndY = st_4.Y - 5
  959. IF cur_help = 1 THEN
  960. dw_help.Visible = TRUE
  961. dw_child.X = dw_help.Width + 5
  962. dw_child.Width = THIS.WorkSpaceWidth() - dw_help.Width - 5
  963. ELSE
  964. dw_child.X = 0
  965. dw_child.Width = THIS.WorkSpaceWidth()
  966. dw_help.Visible = FALSE
  967. END IF
  968. end event
  969. event open;call super::open;cur_help = long(f_ProfileString (sys_empid, "outware_pos", "help", "1"))
  970. st_user.Text = publ_operator
  971. dw_child.SetTransObject(sqlca)
  972. dw_last.SetTransObject(sqlca)
  973. uo_ware = CREATE uo_outware_sale
  974. uo_ware.commit_transaction = sqlca
  975. sle_barcode.SetFocus()
  976. SELECT cusid,name INTO :ins_cusid,:ins_cusname
  977. FROM u_cust
  978. Where u_cust.lsflag = 1;
  979. IF sqlca.SQLCode <> 0 THEN
  980. MessageBox('错误','查询零售客户信息失败',stopsign!,ok!)
  981. END IF
  982. THIS.TriggerEvent('ue_new')
  983. st_time.Text = String(DateTime(Today(),Now()))
  984. Timer(1)
  985. end event
  986. event timer;call super::timer;st_time.text = string(datetime(today(),now()))
  987. end event
  988. event close;call super::close;f_SetProfileString (sys_empid, "outware_pos", "help", string(cur_help))
  989. end event
  990. type cb_func from w_publ_base`cb_func within w_outware_pos
  991. boolean visible = false
  992. integer x = 3186
  993. end type
  994. type cb_exit from w_publ_base`cb_exit within w_outware_pos
  995. integer x = 686
  996. integer width = 165
  997. integer height = 164
  998. integer taborder = 70
  999. boolean cancel = false
  1000. integer picsize = 16
  1001. toolbaralignment pic_align = alignattop!
  1002. boolean border = false
  1003. end type
  1004. type dw_child from u_dw_rbtnfilter within w_outware_pos
  1005. integer x = 617
  1006. integer y = 436
  1007. integer width = 2862
  1008. integer height = 1412
  1009. integer taborder = 0
  1010. boolean bringtotop = true
  1011. string dataobject = "dw_outwaremx_pos_edit"
  1012. boolean hscrollbar = true
  1013. boolean vscrollbar = true
  1014. end type
  1015. event clicked;call super::clicked;IF row > 0 THEN
  1016. THIS.ScrollToRow(row)
  1017. THIS.SelectRow(0, FALSE)
  1018. THIS.SelectRow(row, TRUE)
  1019. END IF
  1020. end event
  1021. event dwnkey;call super::dwnkey;PARENT.TriggerEvent('user_key')
  1022. end event
  1023. event rowfocuschanged;call super::rowfocuschanged;IF currentrow > 0 THEN
  1024. THIS.ScrollToRow(currentrow)
  1025. THIS.SelectRow(0, FALSE)
  1026. THIS.SelectRow(currentrow, TRUE)
  1027. END IF
  1028. end event
  1029. type st_3 from statictext within w_outware_pos
  1030. integer x = 9
  1031. integer y = 224
  1032. integer width = 288
  1033. integer height = 48
  1034. boolean bringtotop = true
  1035. integer textsize = -9
  1036. integer weight = 400
  1037. fontcharset fontcharset = gb2312charset!
  1038. fontpitch fontpitch = variable!
  1039. string facename = "宋体"
  1040. long textcolor = 33554432
  1041. long backcolor = 134217739
  1042. string text = "商品输入:"
  1043. boolean focusrectangle = false
  1044. end type
  1045. type sle_barcode from singlelineedit within w_outware_pos
  1046. event keydown pbm_keydown
  1047. event keyup pbm_keyup
  1048. integer x = 265
  1049. integer y = 204
  1050. integer width = 713
  1051. integer height = 84
  1052. integer taborder = 10
  1053. boolean bringtotop = true
  1054. integer textsize = -9
  1055. integer weight = 400
  1056. fontcharset fontcharset = gb2312charset!
  1057. fontpitch fontpitch = variable!
  1058. string facename = "宋体"
  1059. long textcolor = 33554432
  1060. borderstyle borderstyle = stylelowered!
  1061. end type
  1062. event keydown;//if keydown(KeySlash!) or keydown(KeyDivide!) then
  1063. parent.postevent('ue_clearinput')
  1064. //end if
  1065. end event
  1066. event keyup;parent.triggerevent('user_key')
  1067. end event
  1068. event modified;dw_child.selectrow( 0, false)
  1069. cb_1.triggerevent(clicked!)
  1070. end event
  1071. type st_4 from statictext within w_outware_pos
  1072. integer y = 1900
  1073. integer width = 421
  1074. integer height = 76
  1075. boolean bringtotop = true
  1076. integer textsize = -12
  1077. integer weight = 700
  1078. fontcharset fontcharset = gb2312charset!
  1079. fontpitch fontpitch = variable!
  1080. string facename = "宋体"
  1081. long textcolor = 33554432
  1082. long backcolor = 16776960
  1083. string text = "总数量:"
  1084. boolean focusrectangle = false
  1085. end type
  1086. type em_qty from editmask within w_outware_pos
  1087. integer x = 439
  1088. integer y = 1900
  1089. integer width = 667
  1090. integer height = 76
  1091. boolean bringtotop = true
  1092. integer textsize = -12
  1093. integer weight = 700
  1094. fontcharset fontcharset = gb2312charset!
  1095. fontpitch fontpitch = variable!
  1096. string facename = "宋体"
  1097. long textcolor = 33554432
  1098. long backcolor = 16776960
  1099. string text = "none"
  1100. boolean border = false
  1101. borderstyle borderstyle = stylelowered!
  1102. string mask = "#,##0.00##"
  1103. end type
  1104. type st_5 from statictext within w_outware_pos
  1105. integer x = 1458
  1106. integer y = 1900
  1107. integer width = 457
  1108. integer height = 76
  1109. boolean bringtotop = true
  1110. integer textsize = -12
  1111. integer weight = 700
  1112. fontcharset fontcharset = gb2312charset!
  1113. fontpitch fontpitch = variable!
  1114. string facename = "宋体"
  1115. long textcolor = 33554432
  1116. long backcolor = 16776960
  1117. string text = "总金额:"
  1118. boolean focusrectangle = false
  1119. end type
  1120. type em_amt from editmask within w_outware_pos
  1121. integer x = 1929
  1122. integer y = 1900
  1123. integer width = 667
  1124. integer height = 76
  1125. boolean bringtotop = true
  1126. integer textsize = -12
  1127. integer weight = 700
  1128. fontcharset fontcharset = gb2312charset!
  1129. fontpitch fontpitch = variable!
  1130. string facename = "宋体"
  1131. long textcolor = 33554432
  1132. long backcolor = 16776960
  1133. string text = "0.00"
  1134. boolean border = false
  1135. borderstyle borderstyle = stylelowered!
  1136. string mask = "#,##0.00##"
  1137. end type
  1138. type cb_1 from uo_imflatbutton within w_outware_pos
  1139. integer x = 997
  1140. integer y = 204
  1141. integer width = 306
  1142. integer height = 84
  1143. boolean bringtotop = true
  1144. string text = "确定ENT"
  1145. string normalpicname = "ok.bmp"
  1146. integer picsize = 16
  1147. end type
  1148. event clicked;call super::clicked;IF KeyDown(KeySlash!) OR KeyDown(KeyDivide!) THEN
  1149. sle_barcode.Text = ''
  1150. END IF
  1151. IF sle_barcode.Text = '' THEN RETURN
  1152. IF sys_option_pos_jsbarcode <> '' THEN
  1153. IF Trim(sle_barcode.Text) = sys_option_pos_jsbarcode THEN
  1154. cb_js.TriggerEvent(Clicked!)
  1155. RETURN
  1156. END IF
  1157. END IF
  1158. String ls_barcode
  1159. String ls_mtrlcode,ls_mtrlname,ls_unit,ls_mtrlmode
  1160. String ls_prdpackcode
  1161. Long ls_mtrlwareid,ls_mtrlid,ls_storageid
  1162. Decimal ls_noallocqty,ls_packqty
  1163. Decimal ls_price,ls_rebate
  1164. s_mtrlware_noalloc_array arg_s_mtrlware
  1165. s_mtrldef_array arg_s_mtrldef
  1166. ls_barcode = Trim(sle_barcode.Text)
  1167. ls_storageid = ins_def_storageid
  1168. IF ls_storageid <= 0 THEN
  1169. OpenWithParm(w_pos_msg,'请先选择仓库!')
  1170. RETURN
  1171. END IF
  1172. IF f_find_mtrl(ls_barcode,-1,arg_s_mtrldef) = 0 THEN
  1173. sle_barcode.Text = ''
  1174. OpenWithParm(w_pos_msg,'查无此商品记录!')
  1175. sle_barcode.SetFocus()
  1176. RETURN
  1177. ELSE
  1178. ls_barcode = arg_s_mtrldef.mtrlcode[1]
  1179. END IF
  1180. IF f_find_mtrlware_ls(ls_barcode,ls_storageid,-1,arg_s_mtrlware) = 0 THEN
  1181. OpenWithParm(w_pos_msg,'查询库存失败!')
  1182. sle_barcode.Text = ''
  1183. sle_barcode.SetFocus()
  1184. RETURN
  1185. ELSE
  1186. ls_mtrlwareid = arg_s_mtrlware.mtrlwareid[1]
  1187. ls_mtrlid = arg_s_mtrlware.mtrlid[1]
  1188. ls_mtrlcode = arg_s_mtrlware.u_mtrldef_mtrlcode[1]
  1189. ls_mtrlname = arg_s_mtrlware.u_mtrldef_mtrlname[1]
  1190. ls_unit = arg_s_mtrlware.u_mtrldef_unit[1]
  1191. ls_mtrlmode = arg_s_mtrlware.u_mtrldef_mtrlmode[1]
  1192. ls_noallocqty = arg_s_mtrlware.noallocqty[1]
  1193. //是否会员销售自动带出会员对应价格表价,否则带出零售价(默认标准价格表价)
  1194. //ls_price = arg_s_mtrlware.lmsaleprice[1]
  1195. Dec arg_price,arg_rebate
  1196. arg_price = 0
  1197. IF f_find_cust_dftprice(s_cust.pricelistid,ls_mtrlid,arg_price,arg_rebate) = 0 THEN
  1198. IF f_find_mtrl_dftprice(ls_mtrlid,arg_price,arg_rebate) = 0 THEN
  1199. OpenWithParm(w_pos_msg,'查询默认标准价格表价失败!')
  1200. RETURN
  1201. END IF
  1202. END IF
  1203. ls_price = arg_price
  1204. ls_rebate = arg_rebate
  1205. ls_packqty = arg_s_mtrlware.u_mtrldef_packqty[1]
  1206. ls_prdpackcode = arg_s_mtrlware.u_mtrldef_prdpackcode[1]
  1207. END IF
  1208. IF not cbx_th.checked and ls_noallocqty = 0 THEN
  1209. OpenWithParm(w_pos_msg,'库存不足!')
  1210. sle_barcode.Text = ''
  1211. sle_barcode.SetFocus()
  1212. RETURN
  1213. END IF
  1214. Long child_row
  1215. child_row = dw_child.InsertRow(0)
  1216. dw_child.ScrollToRow(child_row)
  1217. dw_child.Object.u_outwaremx_mtrlwareid[child_row] = ls_mtrlwareid
  1218. dw_child.Object.u_outwaremx_mtrlid[child_row] = ls_mtrlid
  1219. dw_child.Object.u_mtrldef_mtrlname[child_row] = ls_mtrlname
  1220. dw_child.Object.u_mtrldef_mtrlmode[child_row] = ls_mtrlmode
  1221. dw_child.Object.u_mtrldef_unit[child_row] = ls_unit
  1222. IF cbx_th.Checked THEN
  1223. dw_child.Object.u_outwaremx_qty[child_row] = - 1
  1224. ELSE
  1225. dw_child.Object.u_outwaremx_qty[child_row] = 1
  1226. END IF
  1227. dw_child.Object.u_outwaremx_fprice[child_row] = ls_price
  1228. dw_child.Object.u_outwaremx_rebate[child_row] = ls_rebate
  1229. dw_child.Object.u_mtrldef_mtrlcode[child_row] = ls_mtrlcode
  1230. dw_child.Object.u_mtrldef_packqty[child_row] = ls_packqty
  1231. dw_child.Object.u_mtrldef_prdpackcode[child_row] = ls_prdpackcode
  1232. dw_child.Object.u_mtrldef_barcode[child_row] = ls_barcode
  1233. PARENT.TriggerEvent('ue_cal')
  1234. sle_barcode.Text = ''
  1235. sle_barcode.SetFocus()
  1236. end event
  1237. event ue_keydown;call super::ue_keydown;parent.triggerevent('user_key')
  1238. end event
  1239. type cb_js from uo_imflatbutton within w_outware_pos
  1240. integer x = 247
  1241. integer width = 247
  1242. integer height = 164
  1243. integer taborder = 40
  1244. boolean bringtotop = true
  1245. string text = "结算End"
  1246. string normalpicname = "SAVE.BMP"
  1247. integer picsize = 16
  1248. toolbaralignment pic_align = alignattop!
  1249. boolean border = false
  1250. end type
  1251. event clicked;call super::clicked;
  1252. PARENT.TriggerEvent('ue_js')
  1253. IF cbx_2.Checked = TRUE THEN
  1254. parent.TriggerEvent('ue_print')
  1255. ELSE
  1256. IF MessageBox('询问','是否要打印当前单据?',question!,yesno!) = 2 THEN RETURN
  1257. PARENT.TriggerEvent('ue_new')
  1258. END IF
  1259. IF cbx_1.Checked = TRUE THEN
  1260. PARENT.TriggerEvent('ue_new')
  1261. END IF
  1262. end event
  1263. event ue_keydown;call super::ue_keydown;parent.triggerevent('user_key')
  1264. end event
  1265. type dw_last from u_dw_rbtnfilter within w_outware_pos
  1266. integer y = 312
  1267. integer width = 2743
  1268. integer height = 124
  1269. integer taborder = 0
  1270. boolean bringtotop = true
  1271. string dataobject = "dw_outware_pos_lastbill"
  1272. boolean border = false
  1273. boolean setcolumn_visible_use = false
  1274. boolean autosave_filter_use = false
  1275. boolean autosave_sort_use = false
  1276. boolean autosave_setlayout_use = false
  1277. boolean autosave_columnvisible_use = false
  1278. end type
  1279. type cb_print from uo_imflatbutton within w_outware_pos
  1280. integer x = 494
  1281. integer width = 192
  1282. integer height = 164
  1283. integer taborder = 60
  1284. boolean bringtotop = true
  1285. string text = "打印&P"
  1286. string normalpicname = "print.bmp"
  1287. integer picsize = 16
  1288. toolbaralignment pic_align = alignattop!
  1289. boolean border = false
  1290. end type
  1291. event ue_keydown;call super::ue_keydown;parent.triggerevent('user_key')
  1292. end event
  1293. event clicked;call super::clicked;parent.PostEvent('ue_print')
  1294. end event
  1295. type cbx_1 from checkbox within w_outware_pos
  1296. integer x = 933
  1297. integer y = 16
  1298. integer width = 343
  1299. integer height = 48
  1300. integer taborder = 80
  1301. boolean bringtotop = true
  1302. integer textsize = -9
  1303. integer weight = 400
  1304. fontcharset fontcharset = gb2312charset!
  1305. fontpitch fontpitch = variable!
  1306. string facename = "宋体"
  1307. long textcolor = 33554432
  1308. long backcolor = 134217739
  1309. string text = "自动新建"
  1310. boolean checked = true
  1311. end type
  1312. event clicked;string ls_flag
  1313. if this.checked=true then
  1314. ls_flag = '1'
  1315. else
  1316. ls_flag = '0'
  1317. end if
  1318. f_SetProfileString (sys_empid,'pos','autonew',ls_flag)
  1319. end event
  1320. event constructor;String ls_flag
  1321. ls_flag = f_ProfileString (sys_empid,'pos','autonew','1')
  1322. IF ls_flag = '1' THEN
  1323. THIS.Checked = TRUE
  1324. ELSE
  1325. THIS.Checked = FALSE
  1326. END IF
  1327. THIS.BackColor = 14215660
  1328. end event
  1329. type cbx_2 from checkbox within w_outware_pos
  1330. integer x = 933
  1331. integer y = 108
  1332. integer width = 343
  1333. integer height = 48
  1334. integer taborder = 90
  1335. boolean bringtotop = true
  1336. integer textsize = -9
  1337. integer weight = 400
  1338. fontcharset fontcharset = gb2312charset!
  1339. fontpitch fontpitch = variable!
  1340. string facename = "宋体"
  1341. long textcolor = 33554432
  1342. long backcolor = 134217739
  1343. string text = "结算打印"
  1344. boolean checked = true
  1345. end type
  1346. event clicked;string ls_flag
  1347. if this.checked=true then
  1348. ls_flag = '1'
  1349. else
  1350. ls_flag = '0'
  1351. end if
  1352. f_SetProfileString (sys_empid,'pos','autoprint',ls_flag)
  1353. end event
  1354. event constructor;String ls_flag
  1355. ls_flag = f_ProfileString (sys_empid,'pos','autoprint','1')
  1356. IF ls_flag = '1' THEN
  1357. THIS.Checked = TRUE
  1358. ELSE
  1359. THIS.Checked = FALSE
  1360. END IF
  1361. THIS.BackColor = 14215660
  1362. end event
  1363. type ln_1 from line within w_outware_pos
  1364. long linecolor = 33554432
  1365. integer linethickness = 4
  1366. integer beginy = 1876
  1367. integer endx = 3333
  1368. integer endy = 1876
  1369. end type
  1370. type st_1 from statictext within w_outware_pos
  1371. integer x = 2331
  1372. integer y = 28
  1373. integer width = 279
  1374. integer height = 48
  1375. boolean bringtotop = true
  1376. integer textsize = -9
  1377. integer weight = 400
  1378. fontcharset fontcharset = gb2312charset!
  1379. fontpitch fontpitch = variable!
  1380. string facename = "宋体"
  1381. long textcolor = 33554432
  1382. long backcolor = 134217739
  1383. string text = "操作员:"
  1384. alignment alignment = right!
  1385. boolean focusrectangle = false
  1386. end type
  1387. event constructor;THIS.BackColor = 14215660
  1388. end event
  1389. type st_user from statictext within w_outware_pos
  1390. integer x = 2610
  1391. integer y = 28
  1392. integer width = 453
  1393. integer height = 48
  1394. boolean bringtotop = true
  1395. integer textsize = -9
  1396. integer weight = 400
  1397. fontcharset fontcharset = gb2312charset!
  1398. fontpitch fontpitch = variable!
  1399. string facename = "宋体"
  1400. long textcolor = 33554432
  1401. long backcolor = 134217739
  1402. boolean focusrectangle = false
  1403. end type
  1404. event constructor;THIS.BackColor = 14215660
  1405. end event
  1406. type st_6 from statictext within w_outware_pos
  1407. integer x = 2363
  1408. integer y = 116
  1409. integer width = 247
  1410. integer height = 48
  1411. boolean bringtotop = true
  1412. integer textsize = -9
  1413. integer weight = 400
  1414. fontcharset fontcharset = gb2312charset!
  1415. fontpitch fontpitch = variable!
  1416. string facename = "宋体"
  1417. long textcolor = 33554432
  1418. long backcolor = 134217739
  1419. string text = "时 间:"
  1420. alignment alignment = right!
  1421. boolean focusrectangle = false
  1422. end type
  1423. event constructor;THIS.BackColor = 14215660
  1424. end event
  1425. type st_time from statictext within w_outware_pos
  1426. integer x = 2610
  1427. integer y = 116
  1428. integer width = 571
  1429. integer height = 48
  1430. boolean bringtotop = true
  1431. integer textsize = -9
  1432. integer weight = 400
  1433. fontcharset fontcharset = gb2312charset!
  1434. fontpitch fontpitch = variable!
  1435. string facename = "宋体"
  1436. long textcolor = 33554432
  1437. long backcolor = 134217739
  1438. boolean focusrectangle = false
  1439. end type
  1440. event constructor;THIS.BackColor = 14215660
  1441. end event
  1442. type st_7 from statictext within w_outware_pos
  1443. integer x = 1312
  1444. integer y = 108
  1445. integer width = 315
  1446. integer height = 48
  1447. boolean bringtotop = true
  1448. integer textsize = -9
  1449. integer weight = 400
  1450. fontcharset fontcharset = gb2312charset!
  1451. fontpitch fontpitch = variable!
  1452. string facename = "宋体"
  1453. long textcolor = 33554432
  1454. long backcolor = 134217739
  1455. string text = "单据号码:"
  1456. alignment alignment = right!
  1457. boolean focusrectangle = false
  1458. end type
  1459. event constructor;THIS.BackColor = 14215660
  1460. end event
  1461. type st_billcode from statictext within w_outware_pos
  1462. integer x = 1627
  1463. integer y = 108
  1464. integer width = 672
  1465. integer height = 48
  1466. boolean bringtotop = true
  1467. integer textsize = -9
  1468. integer weight = 400
  1469. fontcharset fontcharset = gb2312charset!
  1470. fontpitch fontpitch = variable!
  1471. string facename = "宋体"
  1472. long textcolor = 33554432
  1473. long backcolor = 134217739
  1474. boolean focusrectangle = false
  1475. end type
  1476. event constructor;THIS.BackColor = 14215660
  1477. end event
  1478. type cb_new from uo_imflatbutton within w_outware_pos
  1479. integer width = 247
  1480. integer height = 164
  1481. integer taborder = 50
  1482. boolean bringtotop = true
  1483. string text = "新建Ins"
  1484. string normalpicname = "new.bmp"
  1485. integer picsize = 16
  1486. toolbaralignment pic_align = alignattop!
  1487. boolean border = false
  1488. end type
  1489. event clicked;call super::clicked;IF dw_child.RowCount() = 0 THEN RETURN
  1490. IF dw_edit_mode THEN
  1491. IF MessageBox('询问','是否要结算当前单据?',question!,yesno!) = 2 THEN
  1492. GOTO ext
  1493. END IF
  1494. PARENT.TriggerEvent('ue_js')
  1495. END IF
  1496. ext:
  1497. PARENT.TriggerEvent('ue_new')
  1498. end event
  1499. event ue_keydown;call super::ue_keydown;parent.triggerevent('user_key')
  1500. end event
  1501. type st_8 from statictext within w_outware_pos
  1502. integer x = 1362
  1503. integer y = 224
  1504. integer width = 288
  1505. integer height = 48
  1506. boolean bringtotop = true
  1507. integer textsize = -9
  1508. integer weight = 400
  1509. fontcharset fontcharset = gb2312charset!
  1510. fontpitch fontpitch = variable!
  1511. string facename = "宋体"
  1512. long textcolor = 33554432
  1513. long backcolor = 134217739
  1514. string text = "客户输入:"
  1515. boolean focusrectangle = false
  1516. end type
  1517. type sle_cust from singlelineedit within w_outware_pos
  1518. event keydown pbm_keydown
  1519. event keyup pbm_keyup
  1520. integer x = 1664
  1521. integer y = 204
  1522. integer width = 773
  1523. integer height = 84
  1524. integer taborder = 30
  1525. boolean bringtotop = true
  1526. integer textsize = -9
  1527. integer weight = 400
  1528. fontcharset fontcharset = gb2312charset!
  1529. fontpitch fontpitch = variable!
  1530. string facename = "宋体"
  1531. long textcolor = 33554432
  1532. borderstyle borderstyle = stylelowered!
  1533. end type
  1534. event keydown;//if keydown(KeySlash!) or keydown(KeyDivide!) then
  1535. parent.postevent('ue_clearinput')
  1536. //end if
  1537. end event
  1538. event keyup;parent.triggerevent('user_key')
  1539. end event
  1540. event modified;
  1541. cb_2.triggerevent(clicked!)
  1542. end event
  1543. type cb_2 from uo_imflatbutton within w_outware_pos
  1544. integer x = 2455
  1545. integer y = 204
  1546. integer width = 306
  1547. integer height = 84
  1548. boolean bringtotop = true
  1549. string text = "查询ENT"
  1550. string normalpicname = "ok.bmp"
  1551. integer picsize = 16
  1552. end type
  1553. event clicked;call super::clicked;IF sle_cust.Text = '' THEN RETURN
  1554. String ls_custcode
  1555. ls_custcode = Trim(sle_cust.Text)
  1556. if f_find_cust(ls_custcode,s_cust) = 1 THEN
  1557. sle_cust.Text = s_cust.cuscode
  1558. st_2.text = s_cust.name
  1559. sle_barcode.SetFocus()
  1560. RETURN
  1561. ELSE
  1562. parent.TriggerEvent('ue_f6')
  1563. end if
  1564. end event
  1565. event ue_keydown;call super::ue_keydown;parent.triggerevent('user_key')
  1566. end event
  1567. type cbx_th from checkbox within w_outware_pos
  1568. integer x = 1353
  1569. integer y = 12
  1570. integer width = 325
  1571. integer height = 60
  1572. integer taborder = 100
  1573. boolean bringtotop = true
  1574. integer textsize = -9
  1575. integer weight = 400
  1576. fontcharset fontcharset = gb2312charset!
  1577. fontpitch fontpitch = variable!
  1578. string facename = "宋体"
  1579. long textcolor = 33554432
  1580. long backcolor = 134217739
  1581. string text = "退货"
  1582. end type
  1583. event constructor;THIS.BackColor = 14215660
  1584. end event
  1585. type dw_help from u_dw_rbtnfilter within w_outware_pos
  1586. integer y = 436
  1587. integer width = 613
  1588. integer height = 1412
  1589. integer taborder = 0
  1590. boolean bringtotop = true
  1591. string dataobject = "ds_help"
  1592. end type
  1593. type ddlb_scid from uo_ddlb_scid within w_outware_pos
  1594. integer x = 1733
  1595. integer y = 4
  1596. integer width = 549
  1597. integer height = 620
  1598. integer taborder = 110
  1599. boolean bringtotop = true
  1600. end type
  1601. event constructor;Long ls_scid
  1602. Long cnt = 0
  1603. String ls_scname
  1604. Long ll_i
  1605. String ls_space
  1606. Int li_spacenum
  1607. IF UpperBound(sys_user_scid) = 1 THEN ddlb_scid.Visible = FALSE
  1608. FOR ll_i = 1 TO UpperBound(sys_user_scid)
  1609. ls_scid = sys_user_scid[ll_i]
  1610. SELECT scname
  1611. INTO :ls_scname
  1612. FROM u_scdef
  1613. Where scid = :ls_scid;
  1614. IF sqlca.SQLCode <> 0 OR IsNull(ls_scname) THEN ls_scname = ''
  1615. li_spacenum = 50 - Len(Trim(ls_scname)) - 2 - Len(String(ls_scid))
  1616. ls_space = Fill(' ',li_spacenum)
  1617. THIS.AddItem (ls_scname+ls_space+'['+String(ls_scid)+']')
  1618. NEXT
  1619. THIS.uo_scid = ls_scid
  1620. uo_scid_arr[1] = ls_scid
  1621. THIS.Text = ls_scname+ls_space+'['+String(ls_scid)+']'
  1622. cur_scid = THIS.uo_scid
  1623. IF wf_find_dftstorage(cur_scid,ins_def_storageid) = 0 THEN
  1624. MessageBox('错误','查询分部的默认零售仓库失败!',stopsign!,ok!)
  1625. END IF
  1626. end event
  1627. event selectionchanged;call super::selectionchanged;cur_scid = THIS.uo_scid
  1628. IF wf_find_dftstorage(cur_scid,ins_def_storageid) = 0 THEN
  1629. MessageBox('错误','查询分部的默认零售仓库失败!',stopsign!,ok!)
  1630. END IF
  1631. end event
  1632. type st_2 from statictext within w_outware_pos
  1633. integer x = 2784
  1634. integer y = 204
  1635. integer width = 786
  1636. integer height = 84
  1637. boolean bringtotop = true
  1638. integer textsize = -12
  1639. integer weight = 400
  1640. fontcharset fontcharset = gb2312charset!
  1641. fontpitch fontpitch = variable!
  1642. string facename = "宋体"
  1643. long textcolor = 33554432
  1644. long backcolor = 67108864
  1645. boolean focusrectangle = false
  1646. end type
  1647. type ln_bar from line within w_outware_pos
  1648. long linecolor = 268435456
  1649. integer linethickness = 4
  1650. integer beginy = 176
  1651. integer endx = 3323
  1652. integer endy = 176
  1653. end type
  1654. type ln_bar2 from line within w_outware_pos
  1655. long linecolor = 16777215
  1656. integer linethickness = 4
  1657. integer beginy = 180
  1658. integer endx = 3323
  1659. integer endy = 180
  1660. end type
  1661. type r_bar from rectangle within w_outware_pos
  1662. long linecolor = 16777215
  1663. long fillcolor = 1073741824
  1664. integer x = 3319
  1665. integer width = 73
  1666. integer height = 172
  1667. end type
  1668. event constructor;this.fillcolor = 14215660
  1669. this.linecolor = 14215660
  1670. this.x = -1
  1671. this.y = -1
  1672. this.height = ln_bar2.beginy - 5
  1673. end event
  1674. type ln_2 from line within w_outware_pos
  1675. long linecolor = 268435456
  1676. integer linethickness = 4
  1677. integer beginy = 300
  1678. integer endx = 3323
  1679. integer endy = 300
  1680. end type
  1681. type ln_3 from line within w_outware_pos
  1682. long linecolor = 16777215
  1683. integer linethickness = 4
  1684. integer beginy = 304
  1685. integer endx = 3323
  1686. integer endy = 304
  1687. end type