w_outware_to_inwarebuy_edit.srw 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799
  1. $PBExportHeader$w_outware_to_inwarebuy_edit.srw
  2. forward
  3. global type w_outware_to_inwarebuy_edit from w_publ_base
  4. end type
  5. type cb_save from uo_imflatbutton within w_outware_to_inwarebuy_edit
  6. end type
  7. type dw_uc from datawindow within w_outware_to_inwarebuy_edit
  8. end type
  9. type cb_fhmx from commandbutton within w_outware_to_inwarebuy_edit
  10. end type
  11. type cb_fymx from commandbutton within w_outware_to_inwarebuy_edit
  12. end type
  13. type dw_fymx from datawindow within w_outware_to_inwarebuy_edit
  14. end type
  15. type ln_bar from line within w_outware_to_inwarebuy_edit
  16. end type
  17. type ln_bar2 from line within w_outware_to_inwarebuy_edit
  18. end type
  19. type r_bar from rectangle within w_outware_to_inwarebuy_edit
  20. end type
  21. type dw_child from datawindow within w_outware_to_inwarebuy_edit
  22. end type
  23. type st_item_msg from statictext within w_outware_to_inwarebuy_edit
  24. end type
  25. end forward
  26. global type w_outware_to_inwarebuy_edit from w_publ_base
  27. integer width = 3611
  28. integer height = 2380
  29. string title = "收货单信息匹配"
  30. boolean minbox = false
  31. windowtype windowtype = response!
  32. cb_save cb_save
  33. dw_uc dw_uc
  34. cb_fhmx cb_fhmx
  35. cb_fymx cb_fymx
  36. dw_fymx dw_fymx
  37. ln_bar ln_bar
  38. ln_bar2 ln_bar2
  39. r_bar r_bar
  40. dw_child dw_child
  41. st_item_msg st_item_msg
  42. end type
  43. global w_outware_to_inwarebuy_edit w_outware_to_inwarebuy_edit
  44. type variables
  45. Transaction tr_eb_sqlca
  46. s_packet_ljfieb s_inscust
  47. string ins_sn
  48. long ins_cusid,ins_scid,ins_billtype
  49. string ins_inwarecode
  50. long ins_sendcuscommid
  51. string ins_sendsccode
  52. uo_inware_buy uo_ware
  53. long ins_storageid
  54. end variables
  55. forward prototypes
  56. public subroutine wf_face_child (long arg_storageid)
  57. end prototypes
  58. public subroutine wf_face_child (long arg_storageid);Int iflocation
  59. //iflocation = f_find_iflocation(arg_storageid)
  60. //
  61. //IF iflocation = 0 THEN
  62. dw_child.SetTabOrder('location',0)
  63. //ELSE
  64. // dw_child.SetTabOrder('location',30)
  65. //
  66. // IF iflocation = 1 THEN
  67. // dw_child.Modify("location.dddw.allowedit = yes")
  68. // ELSE
  69. // dw_child.Modify("location.dddw.allowedit = no")
  70. // END IF
  71. //END IF
  72. ins_storageid = arg_storageid
  73. end subroutine
  74. on w_outware_to_inwarebuy_edit.create
  75. int iCurrent
  76. call super::create
  77. this.cb_save=create cb_save
  78. this.dw_uc=create dw_uc
  79. this.cb_fhmx=create cb_fhmx
  80. this.cb_fymx=create cb_fymx
  81. this.dw_fymx=create dw_fymx
  82. this.ln_bar=create ln_bar
  83. this.ln_bar2=create ln_bar2
  84. this.r_bar=create r_bar
  85. this.dw_child=create dw_child
  86. this.st_item_msg=create st_item_msg
  87. iCurrent=UpperBound(this.Control)
  88. this.Control[iCurrent+1]=this.cb_save
  89. this.Control[iCurrent+2]=this.dw_uc
  90. this.Control[iCurrent+3]=this.cb_fhmx
  91. this.Control[iCurrent+4]=this.cb_fymx
  92. this.Control[iCurrent+5]=this.dw_fymx
  93. this.Control[iCurrent+6]=this.ln_bar
  94. this.Control[iCurrent+7]=this.ln_bar2
  95. this.Control[iCurrent+8]=this.r_bar
  96. this.Control[iCurrent+9]=this.dw_child
  97. this.Control[iCurrent+10]=this.st_item_msg
  98. end on
  99. on w_outware_to_inwarebuy_edit.destroy
  100. call super::destroy
  101. destroy(this.cb_save)
  102. destroy(this.dw_uc)
  103. destroy(this.cb_fhmx)
  104. destroy(this.cb_fymx)
  105. destroy(this.dw_fymx)
  106. destroy(this.ln_bar)
  107. destroy(this.ln_bar2)
  108. destroy(this.r_bar)
  109. destroy(this.dw_child)
  110. destroy(this.st_item_msg)
  111. end on
  112. event open;call super::open;tr_eb_sqlca = sys_email_sqlca // 电子商务连接
  113. If sys_email_sqlca.DBHandle() = 0 Then
  114. MessageBox('Error','电子商务数据库连接失败,请检查')
  115. Return
  116. End If
  117. uo_ware = Create uo_inware_buy
  118. uo_ware.commit_transaction = sqlca
  119. s_inscust = Message.PowerObjectParm
  120. ins_sn = s_inscust.serialnum
  121. ins_scid = s_inscust.scid
  122. ins_sendcuscommid = s_inscust.sendcuscommid
  123. ins_sendsccode = s_inscust.sendsccode
  124. dw_uc.SetTransObject(tr_eb_sqlca)
  125. dw_child.SetTransObject(tr_eb_sqlca)
  126. dw_fymx.SetTransObject(tr_eb_sqlca)
  127. datawindowchild child_storage
  128. dw_uc.GetChild("storageid",child_storage)
  129. child_storage.SetTransObject (sqlca)
  130. If child_storage.Retrieve(ins_scid,sys_user_storageid) = 0 Then
  131. child_storage.InsertRow(0)
  132. End If
  133. datawindowchild childdwmx
  134. dw_uc.GetChild("banktypeid",childdwmx)
  135. childdwmx.SetTransObject (sqlca)
  136. If childdwmx.Retrieve() = 0 Then
  137. childdwmx.InsertRow(0)
  138. End If
  139. datawindowchild childdwmx_2
  140. dw_uc.GetChild("moneyid",childdwmx_2)
  141. childdwmx_2.SetTransObject (sqlca)
  142. If childdwmx_2.Retrieve() = 0 Then
  143. childdwmx_2.InsertRow(0)
  144. End If
  145. datawindowchild childdwmx_rep
  146. dw_uc.GetChild("inrep",childdwmx_rep)
  147. childdwmx_rep.SetTransObject (sqlca)
  148. If childdwmx_rep.Retrieve() = 0 Then
  149. childdwmx_rep.InsertRow(0)
  150. End If
  151. dw_uc.Retrieve(ins_sn)
  152. dw_child.Retrieve(ins_sn)
  153. dw_fymx.Retrieve(ins_sn)
  154. //自动匹配信息
  155. Long ll_ucrow,ll_i
  156. String ls_moneyname,ls_banktypename
  157. Long ll_moneyid,ll_banktypeid
  158. String ls_sptmtrlcode
  159. String ls_mtrlcode_my,ls_mtrlname_my,ls_mtrlmode_my
  160. Long ll_mtrlid,ll_sptid
  161. String ls_cuscode,ls_sptcode,ls_sptname,ls_unit_my
  162. String ls_fiebrelcode,ls_status,ls_woodcode,ls_pcode
  163. Long ll_relid,ll_relprintid
  164. ll_ucrow = dw_uc.GetRow()
  165. dw_uc.AcceptText()
  166. dw_child.AcceptText()
  167. dw_uc.SetRedraw(False)
  168. dw_child.SetRedraw(False)
  169. dw_fymx.SetRedraw(False)
  170. If ll_ucrow > 0 Then
  171. dw_uc.Object.inrep[ll_ucrow] = publ_operator
  172. dw_uc.Object.indate[ll_ucrow] = DateTime(Today(),Now())
  173. Select CusCode
  174. Into :ls_cuscode
  175. From LJFIEB_CusComm
  176. Where CusCommID = :ins_sendcuscommid Using tr_eb_sqlca;
  177. If tr_eb_sqlca.SQLCode <> 0 Then
  178. ls_cuscode = ''
  179. End If
  180. If Trim(ls_cuscode) <> '' Then
  181. Select sptid, sptcode, name
  182. Into :ll_sptid,:ls_sptcode,:ls_sptname
  183. From u_spt
  184. Where commcode = :ls_cuscode
  185. And commsccode = :ins_sendsccode Using sqlca;
  186. If sqlca.SQLCode <> 0 Then
  187. ll_sptid = 0
  188. ls_sptcode = ''
  189. ls_sptname = ''
  190. End If
  191. dw_uc.Object.sptid[ll_ucrow] = ll_sptid
  192. dw_uc.Object.CusCode[ll_ucrow] = ls_sptcode
  193. dw_uc.Object.cusname[ll_ucrow] = ls_sptname
  194. End If
  195. ls_moneyname = dw_uc.Object.moneyname[ll_ucrow]
  196. Select moneyid Into :ll_moneyid
  197. From cw_currency
  198. Where Name = :ls_moneyname Using sqlca;
  199. If sqlca.SQLCode = 0 Then
  200. dw_uc.Object.moneyid[ll_ucrow] = ll_moneyid
  201. End If
  202. ls_banktypename = dw_uc.Object.banktypename[ll_ucrow]
  203. Select banktypeid
  204. Into :ll_banktypeid
  205. From cw_banktype
  206. Where inuse = 1 And banktype = 1 And banktypename = :ls_banktypename Using sqlca;
  207. If sqlca.SQLCode = 0 Then
  208. dw_uc.Object.banktypeid[ll_ucrow] = ll_banktypeid
  209. End If
  210. End If
  211. For ll_i = 1 To dw_child.RowCount()
  212. ls_sptmtrlcode = dw_child.Object.sptmtrlcode[ll_i]
  213. ls_fiebrelcode = dw_child.Object.fiebrelcode[ll_i]
  214. ls_status = dw_child.Object.status[ll_i]
  215. ls_woodcode = dw_child.Object.woodcode[ll_i]
  216. ls_pcode = dw_child.Object.pcode[ll_i]
  217. Select u_sptmtrlname.mtrlid,
  218. u_mtrldef.mtrlcode,
  219. u_mtrldef.mtrlname,
  220. u_mtrldef.mtrlmode,
  221. u_mtrldef.unit
  222. Into :ll_mtrlid,
  223. :ls_mtrlcode_my,
  224. :ls_mtrlname_my,
  225. :ls_mtrlmode_my,
  226. :ls_unit_my
  227. From u_sptmtrlname Inner JOIN
  228. u_mtrldef ON u_sptmtrlname.mtrlid = u_mtrldef.mtrlid
  229. Where u_sptmtrlname.sptid = :ll_sptid
  230. And u_sptmtrlname.sptmtrlcode = :ls_sptmtrlcode Using sqlca;
  231. If sqlca.SQLCode <> 0 Then
  232. ll_mtrlid = 0
  233. ls_mtrlcode_my = ''
  234. ls_mtrlname_my = ''
  235. ls_mtrlmode_my = ''
  236. ls_unit_my = ''
  237. End If
  238. dw_child.Object.mtrlcode_my[ll_i] = ls_mtrlcode_my
  239. dw_child.Object.mtrlname_my[ll_i] = ls_mtrlname_my
  240. dw_child.Object.mtrlmode_my[ll_i] = ls_mtrlmode_my
  241. dw_child.Object.mtrlid_my[ll_i] = ll_mtrlid
  242. If ls_unit_my <> '' Then
  243. dw_child.Object.unit[ll_i] = ls_unit_my
  244. End If
  245. ll_relid = 0
  246. ll_relprintid = 0
  247. If ls_fiebrelcode <> '' And ll_mtrlid > 0 Then
  248. Select top 1 u_buyTaskMx.TaskID, u_buyTaskMx.printid
  249. Into :ll_relid,:ll_relprintid
  250. From u_buyTask Inner JOIN
  251. u_buyTaskMx ON u_buyTask.scid = u_buyTaskMx.scid And
  252. u_buyTask.TaskID = u_buyTaskMx.TaskID
  253. Where u_buyTask.taskcode = :ls_fiebrelcode
  254. And u_buyTaskMx.mtrlid = :ll_mtrlid
  255. And u_buyTaskMx.status = :ls_status
  256. And u_buyTaskMx.woodcode = :ls_woodcode
  257. And u_buyTaskMx.pcode = :ls_pcode;
  258. If sqlca.SQLCode <> 0 Then
  259. ll_relid = 0
  260. ll_relprintid = 0
  261. End If
  262. End If
  263. If ll_relid > 0 Then
  264. dw_child.Object.ifrel[ll_i] = 1
  265. dw_child.Object.relid[ll_i] = ll_relid
  266. dw_child.Object.relprintid[ll_i] = ll_relprintid
  267. End If
  268. Next
  269. String ls_itemname,ls_itemcode
  270. Long ll_itemid
  271. For ll_i = 1 To dw_fymx.RowCount()
  272. ls_itemname = dw_fymx.Object.itemname[ll_i]
  273. Select u_itemdef.itemid,
  274. u_itemdef.itemcode
  275. Into :ll_itemid,
  276. :ls_itemcode
  277. From u_itemdef
  278. Where u_itemdef.itemname = :ls_itemname Using sqlca;
  279. If sqlca.SQLCode = 0 Then
  280. dw_fymx.Object.itemid[ll_i] = ll_itemid
  281. dw_fymx.Object.itemcode_self[ll_i] = ls_itemcode
  282. dw_fymx.Object.itemname_self[ll_i] = ls_itemname
  283. End If
  284. Next
  285. dw_uc.SetRedraw(True)
  286. dw_child.SetRedraw(True)
  287. dw_fymx.SetRedraw(True)
  288. end event
  289. event close;call super::close;closewithreturn(this,ins_inwarecode)
  290. end event
  291. event resize;call super::resize;ln_bar.endx = this.width
  292. ln_bar2.endx = this.width
  293. r_bar.width = this.width
  294. dw_fymx.x = dw_child.x
  295. dw_fymx.y = dw_child.y
  296. dw_fymx.height = dw_child.height
  297. dw_fymx.width = dw_child.width
  298. end event
  299. type cb_func from w_publ_base`cb_func within w_outware_to_inwarebuy_edit
  300. boolean visible = false
  301. end type
  302. type cb_exit from w_publ_base`cb_exit within w_outware_to_inwarebuy_edit
  303. integer x = 302
  304. integer width = 187
  305. integer height = 164
  306. integer picsize = 16
  307. toolbaralignment pic_align = alignattop!
  308. boolean border = false
  309. end type
  310. type cb_save from uo_imflatbutton within w_outware_to_inwarebuy_edit
  311. integer height = 164
  312. integer taborder = 30
  313. boolean bringtotop = true
  314. string text = "生成单据"
  315. string normalpicname = "save.bmp"
  316. integer picsize = 16
  317. toolbaralignment pic_align = alignattop!
  318. boolean border = false
  319. end type
  320. event clicked;call super::clicked;Long uc_row,i
  321. String arg_msg
  322. String ls_reissuecode
  323. uc_row = dw_uc.GetRow()
  324. If uc_row <= 0 Then
  325. MessageBox('系统提示','没有可保存的内容')
  326. Return
  327. End If
  328. dw_uc.AcceptText()
  329. dw_child.AcceptText()
  330. If dw_uc.Object.storageid[uc_row] = 0 Then
  331. MessageBox('系统提示','请选择仓库')
  332. dw_uc.SetFocus()
  333. dw_uc.SetColumn("storageid")
  334. Return
  335. End If
  336. If dw_uc.Object.banktypeid[uc_row] = 0 Then
  337. MessageBox('系统提示','请选择结算方式')
  338. dw_uc.SetFocus()
  339. dw_uc.SetColumn("banktypeid")
  340. Return
  341. End If
  342. If dw_uc.Object.moneyid[uc_row] = 0 Then
  343. MessageBox('系统提示','请选择币种')
  344. dw_uc.SetFocus()
  345. dw_uc.SetColumn("moneyid")
  346. Return
  347. End If
  348. If Trim(dw_uc.Object.inrep[uc_row]) = ''Then
  349. MessageBox('系统提示','请填写经手人')
  350. dw_uc.SetFocus()
  351. dw_uc.SetColumn("inrep")
  352. Return
  353. End If
  354. If uo_ware.newbegin(ins_scid,1,arg_msg) = 0 Then
  355. MessageBox('Error!',arg_msg)
  356. Return
  357. End If
  358. uo_ware.indate = dw_uc.Object.indate[uc_row] // 发生时间
  359. uo_ware.inrep = dw_uc.Object.inrep[uc_row] // 经手人
  360. uo_ware.part = ''
  361. uo_ware.dscrp = ''
  362. uo_ware.storageid = dw_uc.Object.storageid[uc_row]
  363. uo_ware.sptid = dw_uc.Object.sptid[uc_row]
  364. uo_ware.otheramt = 0
  365. uo_ware.relint_1 = dw_uc.Object.banktypeid[uc_row]
  366. uo_ware.relid = 0
  367. uo_ware.thflag = 0
  368. uo_ware.relint_3 = dw_uc.Object.moneyid[uc_row]
  369. uo_ware.mrate = f_get_mrate(dw_uc.Object.moneyid[uc_row])
  370. For i = 1 To dw_child.RowCount()
  371. If dw_child.Object.mtrlid_my[i] > 0 Then
  372. If uo_ware.acceptmx(i,&
  373. dw_child.Object.mtrlid_my[i],&
  374. dw_child.Object.mtrlcode_my[i],&
  375. dw_child.Object.plancode[i],&
  376. dw_child.Object.status[i],&
  377. dw_child.Object.qty[i],&
  378. 0,&
  379. dw_child.Object.enprice[i],&
  380. dw_child.Object.rebate[i],&
  381. dw_child.Object.mxdscrp_inware[i],&
  382. arg_msg,0,&
  383. dw_child.Object.relid[i],&
  384. dw_child.Object.relprintid[i],&
  385. dw_child.Object.ifrel[i],&
  386. dw_child.Object.woodcode[i],&
  387. dw_child.Object.pcode[i],&
  388. '',&
  389. 0,&
  390. dw_child.Object.unit[i],&
  391. 1,&
  392. '','',&
  393. datetime(today()),0) = 0 Then
  394. MessageBox('error!',arg_msg)
  395. Return
  396. End If
  397. End If
  398. Next
  399. //For i = 1 To dw_fymx.RowCount()
  400. // If dw_fymx.Object.itemid[i] = 0 Then
  401. // MessageBox('系统提示','第'+String(i)+'行明细,请先选择本厂项目')
  402. // Return
  403. // End If
  404. //
  405. // If dw_fymx.Object.itemid[i] > 0 And dw_fymx.Object.amt[i] <> 0 Then
  406. // If uo_ware.acceptmx_item(i,&
  407. // dw_fymx.Object.itemid[i],&
  408. // dw_fymx.Object.amt[i],&
  409. // dw_fymx.Object.mxdscrp[i],&
  410. // arg_msg) = 0 Then
  411. // MessageBox('error!','费用明细,第'+String(i)+'行,'+arg_msg)
  412. // Return
  413. // End If
  414. // End If
  415. //Next
  416. If uo_ware.Save(True,arg_msg) = 0 Then
  417. MessageBox('Error!',arg_msg)
  418. Return
  419. End If
  420. ins_inwarecode = uo_ware.inwarecode
  421. Update LJFIEB_tempoutware
  422. Set relreissuecode = :ins_inwarecode,
  423. flag = 1,
  424. ConfirmTime = getdate(),
  425. ConfirmUser = :publ_operator
  426. Where SerialNum = :ins_sn Using tr_eb_sqlca;
  427. If tr_eb_sqlca.SQLCode <> 0 Then
  428. Rollback Using tr_eb_sqlca;
  429. MessageBox('Error','更新相关单号失败,'+tr_eb_sqlca.SQLErrText)
  430. Return
  431. End If
  432. //更新本地通信记录
  433. Update LJFIEB_packet
  434. Set status = 6,
  435. Complete = 1,
  436. ConfirmTime = getdate(),
  437. ConfirmUser = :publ_operator
  438. Where SerialNum = :ins_sn Using tr_eb_sqlca;
  439. If tr_eb_sqlca.SQLCode <> 0 Then
  440. Rollback Using tr_eb_sqlca;
  441. MessageBox('Error','更新本地通信记录失败,'+tr_eb_sqlca.SQLErrText)
  442. Return
  443. End If
  444. Close(Parent)
  445. end event
  446. type dw_uc from datawindow within w_outware_to_inwarebuy_edit
  447. integer y = 188
  448. integer width = 3579
  449. integer height = 500
  450. integer taborder = 20
  451. boolean bringtotop = true
  452. string title = "none"
  453. string dataobject = "dw_outware_to_inwarebuy_edit"
  454. boolean livescroll = true
  455. borderstyle borderstyle = stylelowered!
  456. end type
  457. event itemchanged;long ll_storageid,ll_i
  458. IF dwo.Name = 'storageid' THEN
  459. dw_uc.AcceptText()
  460. ll_storageid = dw_uc.Object.storageid[row]
  461. wf_face_child(ll_storageid)
  462. dw_child.SetRedraw(False)
  463. FOR ll_i = 1 To dw_child.RowCount()
  464. dw_child.Object.location[ll_i] = ''
  465. NEXT
  466. dw_child.SetRedraw(True)
  467. end if
  468. end event
  469. type cb_fhmx from commandbutton within w_outware_to_inwarebuy_edit
  470. integer x = 32
  471. integer y = 704
  472. integer width = 311
  473. integer height = 84
  474. integer taborder = 30
  475. boolean bringtotop = true
  476. integer textsize = -9
  477. integer weight = 400
  478. fontcharset fontcharset = gb2312charset!
  479. fontpitch fontpitch = variable!
  480. string facename = "宋体"
  481. boolean underline = true
  482. string text = "收货明细"
  483. end type
  484. event clicked;cb_fhmx.TextSize = 13
  485. cb_fhmx.Underline = TRUE
  486. cb_fymx.TextSize = 12
  487. cb_fymx.Underline = FALSE
  488. dw_child.BringToTop = TRUE
  489. st_item_msg.visible = false
  490. end event
  491. type cb_fymx from commandbutton within w_outware_to_inwarebuy_edit
  492. integer x = 352
  493. integer y = 704
  494. integer width = 311
  495. integer height = 84
  496. integer taborder = 40
  497. boolean bringtotop = true
  498. integer textsize = -9
  499. integer weight = 400
  500. fontcharset fontcharset = gb2312charset!
  501. fontpitch fontpitch = variable!
  502. string facename = "宋体"
  503. string text = "费用明细"
  504. end type
  505. event clicked;cb_fhmx.TextSize = 12
  506. cb_fhmx.Underline = false
  507. cb_fymx.TextSize = 13
  508. cb_fymx.Underline = true
  509. dw_fymx.BringToTop = TRUE
  510. st_item_msg.visible = true
  511. end event
  512. type dw_fymx from datawindow within w_outware_to_inwarebuy_edit
  513. integer y = 800
  514. integer width = 2231
  515. integer height = 400
  516. integer taborder = 50
  517. boolean bringtotop = true
  518. string title = "none"
  519. string dataobject = "dw_outware_to_inware_itemmx_ljfieb"
  520. boolean livescroll = true
  521. borderstyle borderstyle = stylelowered!
  522. end type
  523. event clicked; IF row <= 0 THEN RETURN
  524. THIS.SelectRow(0,FALSE)
  525. THIS.SelectRow(row,TRUE)
  526. this.setrow(row)
  527. end event
  528. event rowfocuschanged; IF currentrow <= 0 THEN RETURN
  529. THIS.SelectRow(0,FALSE)
  530. THIS.SelectRow(currentrow,TRUE)
  531. this.setrow(currentrow)
  532. end event
  533. event doubleclicked;If dw_uc.GetRow() <= 0 Then
  534. MessageBox('系统提示','请先选择单据')
  535. Return
  536. End If
  537. Long child_row
  538. Long ls_cusid,ll_moneyid
  539. Decimal ld_mrate
  540. Long ls_j
  541. child_row = dw_fymx.GetRow()
  542. If child_row <= 0 Then
  543. Return
  544. End If
  545. If Not IsValid(w_itemdef) Then
  546. This.Enabled = False
  547. s_edit_index_tran s_tran_item
  548. s_tran_item.work_mode = 1
  549. s_tran_item.if_select_all = False
  550. s_tran_item.if_retrieve_all = False
  551. OpenWithParm(w_itemdef,s_tran_item) //调用
  552. This.Enabled = True
  553. s_itemdef INS_RT_STRU
  554. INS_RT_STRU = Message.PowerObjectParm //接受返回结构
  555. If INS_RT_STRU.itemid > 0 Then
  556. dw_fymx.Object.itemid[child_row] = INS_RT_STRU.itemid
  557. dw_fymx.Object.itemcode_self[child_row] = INS_RT_STRU.itemcode
  558. dw_fymx.Object.itemname_self[child_row] = INS_RT_STRU.itemname
  559. End If
  560. dw_fymx.SetFocus()
  561. End If
  562. end event
  563. type ln_bar from line within w_outware_to_inwarebuy_edit
  564. long linecolor = 268435456
  565. integer linethickness = 4
  566. integer beginy = 172
  567. integer endx = 3200
  568. integer endy = 172
  569. end type
  570. type ln_bar2 from line within w_outware_to_inwarebuy_edit
  571. long linecolor = 16777215
  572. integer linethickness = 4
  573. integer beginx = 9
  574. integer beginy = 176
  575. integer endx = 3273
  576. integer endy = 176
  577. end type
  578. type r_bar from rectangle within w_outware_to_inwarebuy_edit
  579. long linecolor = 16777215
  580. integer linethickness = 4
  581. long fillcolor = 1073741824
  582. integer x = 3351
  583. integer width = 87
  584. integer height = 68
  585. end type
  586. event constructor;this.fillcolor = 14215660
  587. this.linecolor = 14215660
  588. this.x = -1
  589. this.y = -1
  590. this.height = ln_bar.beginy - 5
  591. end event
  592. type dw_child from datawindow within w_outware_to_inwarebuy_edit
  593. event ue_dwndropdown pbm_dwndropdown
  594. integer y = 800
  595. integer width = 3589
  596. integer height = 1460
  597. integer taborder = 30
  598. boolean bringtotop = true
  599. string title = "none"
  600. string dataobject = "dw_outware_to_inwarebuy_mx_edit"
  601. boolean hscrollbar = true
  602. boolean vscrollbar = true
  603. boolean livescroll = true
  604. borderstyle borderstyle = stylelowered!
  605. end type
  606. event ue_dwndropdown;String ls_col_pz,ls_col_mtrlid
  607. String ls_pz_ch
  608. String ls_col_value
  609. String ls_data_type
  610. Long ll_row,ll_mtrlid
  611. s_pzwin_open arg_s_win
  612. ll_row = THIS.GetRow()
  613. IF ll_row > 0 THEN
  614. ls_col_pz = THIS.GetColumnName( )
  615. // IF Pos(ls_col_pz,'location') > 0 THEN
  616. // arg_s_win.arg_x = THIS.X + THIS.PointerX() + PARENT.X
  617. // arg_s_win.arg_y = THIS.Y + THIS.PointerY() + PARENT.Y
  618. //
  619. // arg_s_win.arg_mtrlid = ins_storageid
  620. //
  621. // ls_pz_ch = f_storage_location(arg_s_win)
  622. //
  623. // IF ls_pz_ch = '' THEN RETURN
  624. //
  625. // THIS.SetItem(ll_row,ls_col_pz,ls_pz_ch)
  626. //
  627. // END IF
  628. END IF
  629. end event
  630. event rowfocuschanged; IF currentrow <= 0 THEN RETURN
  631. THIS.SelectRow(0,FALSE)
  632. THIS.SelectRow(currentrow,TRUE)
  633. this.setrow(currentrow)
  634. end event
  635. event clicked; IF row <= 0 THEN RETURN
  636. THIS.SelectRow(0,FALSE)
  637. THIS.SelectRow(row,TRUE)
  638. this.setrow(row)
  639. end event
  640. type st_item_msg from statictext within w_outware_to_inwarebuy_edit
  641. boolean visible = false
  642. integer x = 699
  643. integer y = 720
  644. integer width = 453
  645. integer height = 48
  646. boolean bringtotop = true
  647. integer textsize = -9
  648. integer weight = 400
  649. fontcharset fontcharset = gb2312charset!
  650. fontpitch fontpitch = variable!
  651. string facename = "宋体"
  652. long textcolor = 33554432
  653. long backcolor = 134217739
  654. string text = "双击选择费用项目"
  655. boolean focusrectangle = false
  656. end type