w_reissue_spt_ljfieb.srw 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869
  1. $PBExportHeader$w_reissue_spt_ljfieb.srw
  2. forward
  3. global type w_reissue_spt_ljfieb from w_publ_base
  4. end type
  5. type dw_uc from datawindow within w_reissue_spt_ljfieb
  6. end type
  7. type dw_child from u_dw_rbtnfilter within w_reissue_spt_ljfieb
  8. end type
  9. type mle_1 from multilineedit within w_reissue_spt_ljfieb
  10. end type
  11. type st_1 from statictext within w_reissue_spt_ljfieb
  12. end type
  13. type st_2 from statictext within w_reissue_spt_ljfieb
  14. end type
  15. type sle_scname from singlelineedit within w_reissue_spt_ljfieb
  16. end type
  17. type cb_accept from uo_imflatbutton within w_reissue_spt_ljfieb
  18. end type
  19. type cb_feedback from uo_imflatbutton within w_reissue_spt_ljfieb
  20. end type
  21. type cb_reject from uo_imflatbutton within w_reissue_spt_ljfieb
  22. end type
  23. type mle_2 from multilineedit within w_reissue_spt_ljfieb
  24. end type
  25. type st_3 from statictext within w_reissue_spt_ljfieb
  26. end type
  27. type ln_bar from line within w_reissue_spt_ljfieb
  28. end type
  29. type ln_bar2 from line within w_reissue_spt_ljfieb
  30. end type
  31. type ln_1 from line within w_reissue_spt_ljfieb
  32. end type
  33. type ln_2 from line within w_reissue_spt_ljfieb
  34. end type
  35. type r_bar from rectangle within w_reissue_spt_ljfieb
  36. end type
  37. end forward
  38. global type w_reissue_spt_ljfieb from w_publ_base
  39. integer width = 3611
  40. integer height = 2380
  41. string title = "供应商费用申请单"
  42. boolean minbox = false
  43. windowtype windowtype = response!
  44. windowstate windowstate = maximized!
  45. event ue_quote ( )
  46. dw_uc dw_uc
  47. dw_child dw_child
  48. mle_1 mle_1
  49. st_1 st_1
  50. st_2 st_2
  51. sle_scname sle_scname
  52. cb_accept cb_accept
  53. cb_feedback cb_feedback
  54. cb_reject cb_reject
  55. mle_2 mle_2
  56. st_3 st_3
  57. ln_bar ln_bar
  58. ln_bar2 ln_bar2
  59. ln_1 ln_1
  60. ln_2 ln_2
  61. r_bar r_bar
  62. end type
  63. global w_reissue_spt_ljfieb w_reissue_spt_ljfieb
  64. type variables
  65. Transaction tr_eb_sqlca
  66. s_packet_ljfieb s_inscust
  67. long ins_scid,ins_cusid
  68. string ins_sn
  69. uo_quote uo_quote_mtrl
  70. uo_ljfieb uo_fieb
  71. long ins_sendid,ins_receid
  72. string ins_sendsccode,ins_reccesccode
  73. string ins_RelatedCode
  74. datetime ins_addtime
  75. string ins_adduser
  76. string ins_relreissuecode
  77. end variables
  78. forward prototypes
  79. public function integer wf_retrieve (string arg_sn, long arg_sendcuscommid, string arg_sendsccode, ref string arg_msg)
  80. public function integer wf_importnewbj (long arg_cusid, long arg_moneyid, long arg_mtrlid, string arg_status, string arg_woodcode, string arg_pcode, ref decimal arg_price, ref decimal arg_rebate, ref string arg_msg)
  81. public function integer wf_importnewprice (long arg_cusid, long arg_moneyid, long arg_mtrlid, string arg_status, string arg_woodcode, string arg_pcode, ref decimal arg_price, ref decimal arg_rebate, ref string arg_msg)
  82. end prototypes
  83. public function integer wf_retrieve (string arg_sn, long arg_sendcuscommid, string arg_sendsccode, ref string arg_msg);Int rslt = 1
  84. String ls_cuscode
  85. Long uc_row
  86. Long ll_i, ll_rowcnt,ll_row
  87. Long ll_moneyid,ll_banktypeid
  88. Decimal ls_1stnewprice,ls_1stzqrate
  89. dw_uc.Retrieve(arg_sn)
  90. dw_child.Retrieve(arg_sn)
  91. uc_row = dw_uc.GetRow()
  92. IF uc_row <= 0 THEN
  93. rslt = 0
  94. arg_msg = '没有对应的单据信息'
  95. GOTO ext
  96. END IF
  97. SELECT CusCode
  98. INTO :ls_cuscode
  99. FROM LJFIEB_CusComm
  100. Where CusCommID = :arg_sendcuscommid Using tr_eb_sqlca;
  101. IF tr_eb_sqlca.SQLCode <> 0 THEN
  102. ls_cuscode = ''
  103. END IF
  104. IF Trim(ls_cuscode) = '' THEN
  105. rslt = 0
  106. arg_msg = '供应商信息不明确,请检查'
  107. GOTO ext
  108. END IF
  109. Long ll_sptid
  110. String ls_sptcode, ls_sptname
  111. SELECT sptid, sptcode, name
  112. INTO :ll_sptid,:ls_sptcode,:ls_sptname
  113. FROM u_spt
  114. WHERE commcode = :ls_cuscode
  115. And commsccode = :arg_sendsccode Using sqlca;
  116. IF sqlca.SQLCode <> 0 THEN
  117. rslt = 0
  118. arg_msg = '查询供应商信息失败,请检查通信设置是否正确,'+sqlca.SQLErrText
  119. GOTO ext
  120. END IF
  121. ins_cusid = ll_sptid
  122. //dw_uc.Object.cusid[uc_row] = ll_sptid
  123. dw_uc.Object.CusCode[uc_row] = ls_sptcode
  124. dw_uc.Object.cusname[uc_row] = ls_sptname
  125. ext:
  126. RETURN rslt
  127. end function
  128. public function integer wf_importnewbj (long arg_cusid, long arg_moneyid, long arg_mtrlid, string arg_status, string arg_woodcode, string arg_pcode, ref decimal arg_price, ref decimal arg_rebate, ref string arg_msg);Int rslt = 1
  129. IF arg_moneyid = 0 THEN
  130. rslt = 0
  131. arg_msg = '请先选择币种'
  132. GOTO ext
  133. END IF
  134. IF IsNull(arg_cusid) THEN arg_cusid = 0
  135. IF arg_cusid = 0 THEN
  136. rslt = 0
  137. arg_msg = "请选择销售客户!"
  138. GOTO ext
  139. END IF
  140. SELECT u_cus_price.fprice_bj,u_cus_price.zqrate_bj
  141. INTO :arg_price,:arg_rebate
  142. FROM u_cus_price
  143. WHERE ( u_cus_price.cusid = :arg_cusid ) AND
  144. ( u_cus_price.mtrlid = :arg_mtrlid ) AND
  145. ( u_cus_price.status = :arg_status ) AND
  146. ( u_cus_price.pcode = :arg_pcode ) AND
  147. ( u_cus_price.woodcode = :arg_woodcode ) and
  148. ( u_cus_price.moneyid = :arg_moneyid);
  149. IF sqlca.SQLCode <> 0 THEN
  150. rslt = 0
  151. arg_msg = "没有最新销售价!"
  152. GOTO ext
  153. END IF
  154. ext:
  155. IF rslt = 0 THEN
  156. arg_price = 0
  157. arg_rebate = 0
  158. END IF
  159. RETURN rslt
  160. end function
  161. public function integer wf_importnewprice (long arg_cusid, long arg_moneyid, long arg_mtrlid, string arg_status, string arg_woodcode, string arg_pcode, ref decimal arg_price, ref decimal arg_rebate, ref string arg_msg);Int rslt = 1
  162. IF arg_moneyid = 0 THEN
  163. rslt = 0
  164. arg_msg = '请先选择币种'
  165. GOTO ext
  166. END IF
  167. IF IsNull(arg_cusid) THEN arg_cusid = 0
  168. IF arg_cusid = 0 THEN
  169. rslt = 0
  170. arg_msg = "请选择销售客户!"
  171. GOTO ext
  172. END IF
  173. SELECT u_cus_price.fprice,u_cus_price.zqrate
  174. INTO :arg_price,:arg_rebate
  175. FROM u_cus_price
  176. WHERE ( u_cus_price.cusid = :arg_cusid ) AND
  177. ( u_cus_price.mtrlid = :arg_mtrlid ) AND
  178. ( u_cus_price.status = :arg_status ) AND
  179. ( u_cus_price.pcode = :arg_pcode ) AND
  180. ( u_cus_price.woodcode = :arg_woodcode ) and
  181. ( u_cus_price.moneyid = :arg_moneyid);
  182. IF sqlca.SQLCode <> 0 THEN
  183. rslt = 0
  184. arg_msg = "没有最新销售价!"
  185. GOTO ext
  186. END IF
  187. ext:
  188. IF rslt = 0 THEN
  189. arg_price = 0
  190. arg_rebate = 0
  191. END IF
  192. RETURN rslt
  193. end function
  194. on w_reissue_spt_ljfieb.create
  195. int iCurrent
  196. call super::create
  197. this.dw_uc=create dw_uc
  198. this.dw_child=create dw_child
  199. this.mle_1=create mle_1
  200. this.st_1=create st_1
  201. this.st_2=create st_2
  202. this.sle_scname=create sle_scname
  203. this.cb_accept=create cb_accept
  204. this.cb_feedback=create cb_feedback
  205. this.cb_reject=create cb_reject
  206. this.mle_2=create mle_2
  207. this.st_3=create st_3
  208. this.ln_bar=create ln_bar
  209. this.ln_bar2=create ln_bar2
  210. this.ln_1=create ln_1
  211. this.ln_2=create ln_2
  212. this.r_bar=create r_bar
  213. iCurrent=UpperBound(this.Control)
  214. this.Control[iCurrent+1]=this.dw_uc
  215. this.Control[iCurrent+2]=this.dw_child
  216. this.Control[iCurrent+3]=this.mle_1
  217. this.Control[iCurrent+4]=this.st_1
  218. this.Control[iCurrent+5]=this.st_2
  219. this.Control[iCurrent+6]=this.sle_scname
  220. this.Control[iCurrent+7]=this.cb_accept
  221. this.Control[iCurrent+8]=this.cb_feedback
  222. this.Control[iCurrent+9]=this.cb_reject
  223. this.Control[iCurrent+10]=this.mle_2
  224. this.Control[iCurrent+11]=this.st_3
  225. this.Control[iCurrent+12]=this.ln_bar
  226. this.Control[iCurrent+13]=this.ln_bar2
  227. this.Control[iCurrent+14]=this.ln_1
  228. this.Control[iCurrent+15]=this.ln_2
  229. this.Control[iCurrent+16]=this.r_bar
  230. end on
  231. on w_reissue_spt_ljfieb.destroy
  232. call super::destroy
  233. destroy(this.dw_uc)
  234. destroy(this.dw_child)
  235. destroy(this.mle_1)
  236. destroy(this.st_1)
  237. destroy(this.st_2)
  238. destroy(this.sle_scname)
  239. destroy(this.cb_accept)
  240. destroy(this.cb_feedback)
  241. destroy(this.cb_reject)
  242. destroy(this.mle_2)
  243. destroy(this.st_3)
  244. destroy(this.ln_bar)
  245. destroy(this.ln_bar2)
  246. destroy(this.ln_1)
  247. destroy(this.ln_2)
  248. destroy(this.r_bar)
  249. end on
  250. event open;call super::open;tr_eb_sqlca = sys_email_sqlca // 电子商务连接
  251. IF sys_email_sqlca.DBHandle() = 0 THEN
  252. MessageBox('Error','电子商务数据库连接失败,请检查')
  253. RETURN
  254. END IF
  255. dw_uc.settransobject(tr_eb_sqlca)
  256. dw_child.settransobject(tr_eb_sqlca)
  257. uo_fieb = Create uo_ljfieb
  258. uo_fieb.commit_transaction = tr_eb_sqlca
  259. s_inscust = Message.PowerObjectParm
  260. ins_sn = s_inscust.serialnum
  261. ins_sendid = s_inscust.sendcuscommid
  262. ins_receid = s_inscust.receivecuscommid
  263. ins_sendsccode = s_inscust.sendsccode
  264. ins_reccesccode = s_inscust.receivesccode
  265. ins_RelatedCode = s_inscust.RelatedCode
  266. ins_addtime = s_inscust.addtime
  267. ins_adduser = s_inscust.adduser
  268. String ls_sccode,ls_scname
  269. String arg_msg
  270. ls_sccode = s_inscust.receivesccode
  271. SELECT scid,scname
  272. INTO :ins_scid,:ls_scname
  273. FROM u_scdef
  274. Where sccode = :ls_sccode;
  275. IF sqlca.SQLCode <> 0 THEN
  276. MessageBox('Error','查询分部信息失败,'+sqlca.SQLErrText)
  277. RETURN
  278. END IF
  279. sle_scname.Text = ls_scname
  280. mle_1.Text = s_inscust.postscript
  281. mle_2.Text = s_inscust.remark
  282. long ll_status
  283. SELECT status INTO :ll_status
  284. FROM LJFIEB_packet
  285. Where serialnum = :ins_sn Using tr_eb_sqlca;
  286. IF tr_eb_sqlca.SQLCode <> 0 THEN
  287. MessageBox('Error','查询通信数据失败,'+sqlca.SQLErrText)
  288. RETURN
  289. END IF
  290. if ll_status <> 5 then
  291. cb_accept.enabled = false
  292. cb_reject.enabled = false
  293. end if
  294. IF wf_retrieve(ins_sn,ins_sendid,ins_sendsccode,arg_msg) = 0 THEN
  295. MessageBox('Error',arg_msg)
  296. RETURN
  297. END IF
  298. //更新对方状态-已打开
  299. string ls_SerialNum
  300. SELECT TOP 1 NEWID() INTO :ls_SerialNum
  301. From u_user Using sqlca;
  302. IF sqlca.SQLCode <> 0 THEN
  303. return
  304. END IF
  305. IF IsNull(ls_SerialNum) THEN ls_SerialNum = ''
  306. IF ls_SerialNum = '' THEN
  307. return
  308. END IF
  309. IF uo_fieb.add_packet(ls_SerialNum,'',ins_receid,ins_reccesccode,ins_sendid,ins_sendsccode,5,'打开消息','','',ins_sn,'',0,arg_msg,True) = 0 THEN
  310. return
  311. END IF
  312. end event
  313. event resize;call super::resize;ln_bar.endx = this.width
  314. ln_bar2.endx = this.width
  315. r_bar.width = this.width
  316. ln_1.endx = this.width
  317. ln_2.endx = this.width
  318. dw_child.width = this.WorkSpaceWidth() - 10
  319. mle_1.width = dw_child.width - dw_uc.width - 4
  320. mle_2.width = mle_1.width
  321. dw_child.height = this.workspaceheight() - dw_child.y - 30
  322. end event
  323. event close;call super::close;destroy uo_fieb
  324. closewithreturn(this,ins_relreissuecode)
  325. end event
  326. type cb_func from w_publ_base`cb_func within w_reissue_spt_ljfieb
  327. boolean visible = false
  328. end type
  329. type cb_exit from w_publ_base`cb_exit within w_reissue_spt_ljfieb
  330. integer x = 1221
  331. integer width = 183
  332. integer height = 164
  333. integer picsize = 16
  334. toolbaralignment pic_align = alignattop!
  335. boolean border = false
  336. end type
  337. type dw_uc from datawindow within w_reissue_spt_ljfieb
  338. integer y = 296
  339. integer width = 1966
  340. integer height = 1092
  341. integer taborder = 30
  342. boolean bringtotop = true
  343. string title = "none"
  344. string dataobject = "dw_reissue_cus_ljfieb"
  345. boolean livescroll = true
  346. borderstyle borderstyle = stylelowered!
  347. end type
  348. type dw_child from u_dw_rbtnfilter within w_reissue_spt_ljfieb
  349. integer y = 1404
  350. integer width = 3584
  351. integer height = 852
  352. integer taborder = 20
  353. boolean bringtotop = true
  354. boolean titlebar = true
  355. string title = "单据明细内容"
  356. string dataobject = "dw_reissue_mx_ljfieb"
  357. boolean maxbox = true
  358. boolean hscrollbar = true
  359. boolean vscrollbar = true
  360. boolean hsplitscroll = true
  361. end type
  362. event rowfocuschanged;call super::rowfocuschanged; IF currentrow <= 0 THEN RETURN
  363. THIS.SelectRow(0,FALSE)
  364. THIS.SelectRow(currentrow,TRUE)
  365. this.setrow(currentrow)
  366. end event
  367. event clicked;call super::clicked; IF row <= 0 THEN RETURN
  368. THIS.SelectRow(0,FALSE)
  369. THIS.SelectRow(row,TRUE)
  370. this.setrow(row)
  371. end event
  372. event rbuttondown;call super::rbuttondown;Long ll_row,ll_column
  373. ll_row = This.GetRow()
  374. ll_column = This.GetColumn()
  375. IF ll_row <= 0 THEN RETURN
  376. IF ll_column <= 0 THEN RETURN
  377. IF Left( This.Describe( dwo.Name+ ".coltype"),4) = 'date' THEN
  378. s_calender_arg s_calender
  379. s_calender.PointerX = This.PointerX()
  380. s_calender.PointerY = This.PointerY()
  381. s_calender.X = This.X + Parent.X
  382. s_calender.Y = This.Y + Parent.Y
  383. OpenWithParm(w_calendar,s_calender)
  384. This.SetItem(ll_row,ll_column,id_date_selected)
  385. END IF
  386. end event
  387. type mle_1 from multilineedit within w_reissue_spt_ljfieb
  388. integer x = 1970
  389. integer y = 360
  390. integer width = 1595
  391. integer height = 664
  392. integer taborder = 40
  393. boolean bringtotop = true
  394. integer textsize = -9
  395. integer weight = 400
  396. fontcharset fontcharset = gb2312charset!
  397. fontpitch fontpitch = variable!
  398. string facename = "宋体"
  399. long textcolor = 33554432
  400. boolean vscrollbar = true
  401. boolean autovscroll = true
  402. boolean displayonly = true
  403. borderstyle borderstyle = stylelowered!
  404. end type
  405. type st_1 from statictext within w_reissue_spt_ljfieb
  406. integer x = 1979
  407. integer y = 300
  408. integer width = 142
  409. integer height = 56
  410. boolean bringtotop = true
  411. integer textsize = -9
  412. integer weight = 400
  413. fontcharset fontcharset = gb2312charset!
  414. fontpitch fontpitch = variable!
  415. string facename = "宋体"
  416. long textcolor = 33554432
  417. long backcolor = 134217739
  418. string text = "附言"
  419. boolean focusrectangle = false
  420. end type
  421. type st_2 from statictext within w_reissue_spt_ljfieb
  422. integer x = 23
  423. integer y = 204
  424. integer width = 155
  425. integer height = 48
  426. boolean bringtotop = true
  427. integer textsize = -9
  428. integer weight = 400
  429. fontcharset fontcharset = gb2312charset!
  430. fontpitch fontpitch = variable!
  431. string facename = "宋体"
  432. long textcolor = 33554432
  433. long backcolor = 134217739
  434. string text = "分部"
  435. alignment alignment = right!
  436. boolean focusrectangle = false
  437. end type
  438. type sle_scname from singlelineedit within w_reissue_spt_ljfieb
  439. integer x = 210
  440. integer y = 188
  441. integer width = 443
  442. integer height = 84
  443. integer taborder = 30
  444. boolean bringtotop = true
  445. integer textsize = -9
  446. integer weight = 400
  447. fontcharset fontcharset = gb2312charset!
  448. fontpitch fontpitch = variable!
  449. string facename = "宋体"
  450. long textcolor = 33554432
  451. boolean displayonly = true
  452. borderstyle borderstyle = stylelowered!
  453. end type
  454. type cb_accept from uo_imflatbutton within w_reissue_spt_ljfieb
  455. integer width = 494
  456. integer height = 164
  457. integer taborder = 30
  458. boolean bringtotop = true
  459. string text = "转为供应商费用单"
  460. string normalpicname = "ok.bmp"
  461. integer picsize = 16
  462. toolbaralignment pic_align = alignattop!
  463. boolean border = false
  464. end type
  465. event clicked;call super::clicked;If Not f_power_ind(3407) Then
  466. MessageBox(publ_operator,sys_msg_pow)
  467. Return
  468. End If
  469. If MessageBox('询问','确定要接受当前费用申请单,转为正式供应商费用单吗?',question!,yesno!) = 2 Then Return
  470. If ins_cusid = 0 Then
  471. MessageBox('系统提示','供应商信息不明确,不能生成供应商费用单,请检查')
  472. Return
  473. End If
  474. s_packet_ljfieb s_edit_tran
  475. s_edit_tran.serialnum = ins_sn
  476. s_edit_tran.cusid = ins_cusid
  477. s_edit_tran.scid = ins_scid
  478. s_edit_tran.billtype = 2
  479. OpenWithParm(w_reissue_cus_ljfieb_edit,s_edit_tran)
  480. String ls_relreissuecode
  481. ls_relreissuecode = Message.StringParm
  482. If ls_relreissuecode = '' Then Return
  483. ins_relreissuecode = ls_relreissuecode
  484. String arg_msg
  485. String ls_SerialNum
  486. Select TOP 1 NEWID() Into :ls_SerialNum
  487. From u_user Using sqlca;
  488. If sqlca.SQLCode <> 0 Then
  489. Rollback Using sqlca;
  490. MessageBox('Error','生成序列号失败,'+sqlca.SQLErrText)
  491. Return
  492. End If
  493. If IsNull(ls_SerialNum) Then ls_SerialNum = ''
  494. If ls_SerialNum = '' Then
  495. MessageBox('Error','错误的发送序列号')
  496. Return
  497. End If
  498. If uo_fieb.add_packet(ls_SerialNum,'',ins_receid,ins_reccesccode,ins_sendid,ins_sendsccode,6,'安排报价','','',ins_sn,ins_RelatedCode,0,arg_msg,True) = 0 Then
  499. MessageBox('系统提示','发送确认指令失败 '+arg_msg)
  500. Return
  501. End If
  502. If MessageBox('系统提示','成功生成供应商费用单:'+ls_relreissuecode+',是否马上打开?',question!,yesno!) = 2 Then ins_relreissuecode = ''
  503. Close(Parent)
  504. end event
  505. type cb_feedback from uo_imflatbutton within w_reissue_spt_ljfieb
  506. integer x = 498
  507. integer width = 494
  508. integer height = 164
  509. integer taborder = 10
  510. boolean bringtotop = true
  511. string text = "相关供应商费用单"
  512. string normalpicname = "open.BMP"
  513. integer picsize = 16
  514. toolbaralignment pic_align = alignattop!
  515. boolean border = false
  516. end type
  517. event clicked;call super::clicked;Long ll_row
  518. String ls_code
  519. Long cnt
  520. String ls_relreissuecode
  521. ll_row = dw_uc.GetRow()
  522. If ll_row <= 0 Then Return
  523. If dw_uc.Object.flag[ll_row] = 0 Then
  524. MessageBox('系统提示','本客户费用申请单尚未进行处理')
  525. Return
  526. End If
  527. ls_code = dw_uc.Object.relreissuecode[ll_row]
  528. Select count(*)
  529. Into :cnt
  530. From u_reissue
  531. Where reissuecode = :ls_code Using sqlca;
  532. If sqlca.SQLCode <> 0 Then
  533. MessageBox('Error','查询费用单信息失败,'+sqlca.SQLErrText)
  534. Return
  535. End If
  536. If cnt = 0 Then
  537. If Not f_power_ind(3407) Then
  538. MessageBox('系统提示','无法查询相关费用单,可能已被删除')
  539. Return
  540. Else
  541. If MessageBox('询问','无法查询相关费用单,可能已被删除,是否重新生成新的费用单?',question!,yesno!) = 2 Then Return
  542. If ins_cusid = 0 Then
  543. MessageBox('系统提示','供应商信息不明确,不能生成供应商费用单,请检查')
  544. Return
  545. End If
  546. s_packet_ljfieb s_edit_tran
  547. s_edit_tran.serialnum = ins_sn
  548. s_edit_tran.cusid = ins_cusid
  549. s_edit_tran.scid = ins_scid
  550. s_edit_tran.billtype = 2
  551. OpenWithParm(w_reissue_cus_ljfieb_edit,s_edit_tran)
  552. ls_relreissuecode = Message.StringParm
  553. If ls_relreissuecode = '' Then Return
  554. dw_uc.Object.relreissuecode[ll_row] = ls_relreissuecode
  555. f_open_win(ins_scid,ls_relreissuecode)
  556. End If
  557. Else
  558. f_open_win(ins_scid,ls_code)
  559. End If
  560. end event
  561. type cb_reject from uo_imflatbutton within w_reissue_spt_ljfieb
  562. integer x = 992
  563. integer width = 219
  564. integer height = 164
  565. integer taborder = 30
  566. boolean bringtotop = true
  567. string text = "拒绝"
  568. string normalpicname = "DELETE.BMP"
  569. integer picsize = 16
  570. toolbaralignment pic_align = alignattop!
  571. boolean border = false
  572. end type
  573. event clicked;call super::clicked;IF Not f_power_ind(3408) THEN
  574. MessageBox(publ_operator,sys_msg_pow)
  575. RETURN
  576. END IF
  577. String arg_summary,arg_postscript,arg_remark
  578. String arg_msg
  579. String ls_SerialNum
  580. SELECT TOP 1 NEWID() INTO :ls_SerialNum
  581. From u_user Using sqlca;
  582. IF sqlca.SQLCode <> 0 THEN
  583. ROLLBACK Using sqlca;
  584. MessageBox('Error','生成序列号失败,'+sqlca.SQLErrText)
  585. RETURN
  586. END IF
  587. IF IsNull(ls_SerialNum) THEN ls_SerialNum = ''
  588. IF ls_SerialNum = '' THEN
  589. MessageBox('Error','错误的发送序列号')
  590. RETURN
  591. END IF
  592. s_packet_ljfieb s_pack,s_return
  593. //s_pack.summary = '拒绝订单:'+ins_RelatedCode
  594. OpenWithParm(w_dscrp_edit_ljfieb,s_pack)
  595. s_return = Message.PowerObjectParm
  596. IF s_return.returnflag <> 1 THEN RETURN
  597. //arg_summary = s_return.summary
  598. arg_postscript = s_return.postscript
  599. arg_remark = s_return.remark
  600. UPDATE LJFIEB_tempspt_price_change
  601. SET flag = 2
  602. Where SerialNum = :ins_sn Using tr_eb_sqlca;
  603. IF tr_eb_sqlca.SQLCode <> 0 THEN
  604. ROLLBACK Using tr_eb_sqlca;
  605. MessageBox('Error','更新费用单状态失败,'+tr_eb_sqlca.SQLErrText)
  606. RETURN 0
  607. END IF
  608. //更新本地通信记录
  609. UPDATE LJFIEB_packet
  610. SET status = 10,
  611. Complete = 1
  612. Where SerialNum = :ins_sn Using tr_eb_sqlca;
  613. IF tr_eb_sqlca.SQLCode <> 0 THEN
  614. ROLLBACK Using tr_eb_sqlca;
  615. MessageBox('Error', '更新本地通信记录失败,'+tr_eb_sqlca.SQLErrText)
  616. RETURN
  617. END IF
  618. IF uo_fieb.add_packet(ls_SerialNum,'',ins_receid,ins_reccesccode,ins_sendid,ins_sendsccode,11,arg_summary,arg_postscript,arg_remark,ins_sn,ins_RelatedCode,0,arg_msg,True) = 0 THEN
  619. MessageBox('系统提示','发送确认指令失败 '+arg_msg)
  620. RETURN
  621. END IF
  622. MessageBox('系统提示','操作成功')
  623. Close(Parent)
  624. end event
  625. type mle_2 from multilineedit within w_reissue_spt_ljfieb
  626. integer x = 1970
  627. integer y = 1120
  628. integer width = 1595
  629. integer height = 264
  630. integer taborder = 50
  631. boolean bringtotop = true
  632. integer textsize = -9
  633. integer weight = 400
  634. fontcharset fontcharset = gb2312charset!
  635. fontpitch fontpitch = variable!
  636. string facename = "宋体"
  637. long textcolor = 33554432
  638. boolean vscrollbar = true
  639. boolean autovscroll = true
  640. boolean displayonly = true
  641. borderstyle borderstyle = stylelowered!
  642. end type
  643. type st_3 from statictext within w_reissue_spt_ljfieb
  644. integer x = 1979
  645. integer y = 1060
  646. integer width = 128
  647. integer height = 48
  648. boolean bringtotop = true
  649. integer textsize = -9
  650. integer weight = 400
  651. fontcharset fontcharset = gb2312charset!
  652. fontpitch fontpitch = variable!
  653. string facename = "宋体"
  654. long textcolor = 33554432
  655. long backcolor = 134217739
  656. string text = "备注"
  657. boolean focusrectangle = false
  658. end type
  659. type ln_bar from line within w_reissue_spt_ljfieb
  660. long linecolor = 268435456
  661. integer linethickness = 4
  662. integer beginy = 172
  663. integer endx = 3200
  664. integer endy = 172
  665. end type
  666. type ln_bar2 from line within w_reissue_spt_ljfieb
  667. long linecolor = 16777215
  668. integer linethickness = 4
  669. integer beginx = 9
  670. integer beginy = 176
  671. integer endx = 3273
  672. integer endy = 176
  673. end type
  674. type ln_1 from line within w_reissue_spt_ljfieb
  675. long linecolor = 268435456
  676. integer linethickness = 4
  677. integer beginy = 284
  678. integer endx = 3250
  679. integer endy = 284
  680. end type
  681. type ln_2 from line within w_reissue_spt_ljfieb
  682. long linecolor = 16777215
  683. integer linethickness = 4
  684. integer beginy = 288
  685. integer endx = 3282
  686. integer endy = 288
  687. end type
  688. type r_bar from rectangle within w_reissue_spt_ljfieb
  689. long linecolor = 16777215
  690. integer linethickness = 4
  691. long fillcolor = 1073741824
  692. integer x = 3351
  693. integer width = 87
  694. integer height = 68
  695. end type
  696. event constructor;this.fillcolor = 14215660
  697. this.linecolor = 14215660
  698. this.x = -1
  699. this.y = -1
  700. this.height = ln_bar.beginy - 5
  701. end event