w_amerce.srw 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362
  1. $PBExportHeader$w_amerce.srw
  2. forward
  3. global type w_amerce from w_publ_1ton_share_detail
  4. end type
  5. type ddlb_status from dropdownlistbox within w_amerce
  6. end type
  7. type ddlb_scid from uo_ddlb_scid within w_amerce
  8. end type
  9. type st_3 from statictext within w_amerce
  10. end type
  11. type st_2 from statictext within w_amerce
  12. end type
  13. end forward
  14. global type w_amerce from w_publ_1ton_share_detail
  15. integer height = 2036
  16. string title = "供应商罚款单"
  17. event ue_fj_edit ( )
  18. event ue_fj_view ( )
  19. ddlb_status ddlb_status
  20. ddlb_scid ddlb_scid
  21. st_3 st_3
  22. st_2 st_2
  23. end type
  24. global w_amerce w_amerce
  25. type variables
  26. uo_amerce uo_amerce_ms
  27. int cur_flag=-1
  28. long cur_scid //分店ID
  29. end variables
  30. forward prototypes
  31. public function integer wf_refresh_curuc (long arg_scid, long arg_billid)
  32. public subroutine wf_check_billfj ()
  33. public function integer wf_xls_retrievedata (long arg_ationid, ref s_xls_billlist arg_str_billlist, ref uo_sendtoexcel arg_obj_st, ref string arg_msg)
  34. end prototypes
  35. event ue_fj_edit();IF dw_edit_mode THEN
  36. MessageBox('提示','编辑状态下不可用', Information!, OK! )
  37. RETURN
  38. END IF
  39. //IF NOT f_power_ind(1446) THEN
  40. // MessageBox(publ_operator,'你没有使用权限!')
  41. // RETURN
  42. //END IF
  43. s_edit_index_tran s_pic
  44. Long ll_ConnectionID
  45. String arg_msg
  46. Long ls_row
  47. ls_row = dw_pageretr.GetRow()
  48. IF ls_row <= 0 THEN
  49. RETURN
  50. END IF
  51. IF f_get_outerconnection(ll_ConnectionID,arg_msg) = 0 THEN
  52. MessageBox('提示','没有指定附件数据库连接'+arg_msg, Information!, OK! )
  53. RETURN
  54. END IF
  55. s_pic.f_long = 418 //采购订单的mainID
  56. s_pic.f_string = dw_pageretr.Object.u_spt_amerce_billcode[ls_row]
  57. s_pic.g_long = dw_pageretr.Object.u_spt_amerce_billid[ls_row]
  58. s_pic.e_long = dw_pageretr.Object.u_spt_amerce_scid[ls_row]
  59. s_pic.sqltransaction = sys_filedb_sqlca
  60. OpenWithParm(w_fj_bill_mng,s_pic)
  61. //wf_check_billfj()
  62. end event
  63. event ue_fj_view();IF dw_edit_mode THEN
  64. MessageBox('提示','编辑状态下不可用', Information!, OK! )
  65. RETURN
  66. END IF
  67. s_edit_index_tran s_pic
  68. Long ll_ConnectionID
  69. String arg_msg
  70. Long ls_row
  71. ls_row = dw_pageretr.GetRow()
  72. IF ls_row <= 0 THEN
  73. RETURN
  74. END IF
  75. IF f_get_outerconnection(ll_ConnectionID,arg_msg) = 0 THEN
  76. MessageBox('提示','没有指定附件数据库连接'+arg_msg, Information!, OK! )
  77. RETURN
  78. END IF
  79. s_pic.f_long = 418 //采购订单的mainID
  80. s_pic.f_string = dw_pageretr.Object.u_spt_amerce_billcode[ls_row]
  81. s_pic.g_long = dw_pageretr.Object.u_spt_amerce_billid[ls_row]
  82. s_pic.e_long = dw_pageretr.Object.u_spt_amerce_scid[ls_row]
  83. s_pic.sqltransaction = sys_filedb_sqlca
  84. OpenWithParm(w_fj_bill_view,s_pic)
  85. end event
  86. public function integer wf_refresh_curuc (long arg_scid, long arg_billid);IF arg_billid <= 0 OR IsNull(arg_billid) THEN RETURN 0
  87. Long uc_row
  88. uc_row = dw_pageretr.GetRow()
  89. IF uc_row <= 0 THEN RETURN 0
  90. DateTime billdate
  91. String sptcode
  92. Decimal amerceamt
  93. String relcode
  94. String amercereason
  95. String billcode
  96. Long sptid
  97. DateTime moddate
  98. String modemp
  99. DateTime auditdate
  100. Int flag
  101. String auditrep
  102. DateTime opdate
  103. String opemp
  104. String Name
  105. Long print_num
  106. string inrep
  107. long moneyid
  108. Long itemid
  109. String itemcode,itemname
  110. SELECT
  111. u_spt_amerce.billdate,
  112. u_spt.sptcode,
  113. u_spt_amerce.amerceamt,
  114. u_spt_amerce.relcode,
  115. u_spt_amerce.amercereason,
  116. u_spt_amerce.billcode,
  117. u_spt_amerce.sptid,
  118. u_spt_amerce.moddate,
  119. u_spt_amerce.modemp,
  120. u_spt_amerce.auditdate,
  121. u_spt_amerce.flag,
  122. u_spt_amerce.auditrep,
  123. u_spt_amerce.opdate,
  124. u_spt_amerce.opemp,
  125. u_spt.Name,
  126. u_spt_amerce.printnum,
  127. u_spt_amerce.inrep,
  128. u_spt_amerce.moneyid,
  129. u_spt_amerce.itemid,
  130. u_itemdef.itemcode,
  131. u_itemdef.itemname
  132. INTO
  133. :billdate,
  134. :sptcode,
  135. :amerceamt,
  136. :relcode,
  137. :amercereason,
  138. :billcode,
  139. :sptid,
  140. :moddate,
  141. :modemp,
  142. :auditdate,
  143. :flag,
  144. :auditrep,
  145. :opdate,
  146. :opemp,
  147. :Name,
  148. :print_num,
  149. :inrep,
  150. :moneyid,
  151. :itemid,
  152. :itemcode,
  153. :itemname
  154. FROM u_spt,
  155. u_spt_amerce
  156. LEFT OUTER JOIN u_itemdef ON u_spt_amerce.itemid = u_itemdef.itemid
  157. Where ( u_spt.sptid = u_spt_amerce.sptid )
  158. AND u_spt_amerce.scid = :arg_scid
  159. AND u_spt_amerce.billid = :arg_billid;
  160. IF sqlca.SQLCode <> 0 THEN
  161. MessageBox('错误',"查询罚款单操作失败"+sqlca.SQLErrText, StopSign!, OK! )
  162. RETURN 0
  163. END IF
  164. dw_pageretr.Object.u_spt_amerce_billdate[uc_row] = billdate
  165. dw_pageretr.Object.u_spt_sptcode[uc_row] = sptcode
  166. dw_pageretr.Object.u_spt_amerce_amerceamt[uc_row] = amerceamt
  167. dw_pageretr.Object.u_spt_amerce_relcode[uc_row] = relcode
  168. dw_pageretr.Object.u_spt_amerce_amercereason[uc_row] = amercereason
  169. dw_pageretr.Object.u_spt_amerce_scid[uc_row] = arg_scid
  170. dw_pageretr.Object.u_spt_amerce_billcode[uc_row] = billcode
  171. dw_pageretr.Object.u_spt_amerce_sptid[uc_row] = sptid
  172. dw_pageretr.Object.u_spt_amerce_moddate[uc_row] = moddate
  173. dw_pageretr.Object.u_spt_amerce_modemp[uc_row] = modemp
  174. dw_pageretr.Object.u_spt_amerce_auditdate[uc_row] = auditdate
  175. dw_pageretr.Object.u_spt_amerce_flag[uc_row] = flag
  176. dw_pageretr.Object.u_spt_amerce_auditrep[uc_row] = auditrep
  177. dw_pageretr.Object.u_spt_amerce_opdate[uc_row] = opdate
  178. dw_pageretr.Object.u_spt_amerce_opemp[uc_row] = opemp
  179. dw_pageretr.Object.u_spt_name[uc_row] = Name
  180. dw_pageretr.Object.u_spt_amerce_printnum[uc_row] = print_num
  181. dw_pageretr.Object.u_spt_amerce_billid[uc_row] = arg_billid
  182. dw_pageretr.Object.u_spt_amerce_scid[uc_row] = arg_scid
  183. dw_pageretr.Object.u_spt_amerce_inrep[uc_row] = inrep
  184. dw_pageretr.Object.u_spt_amerce_moneyid[uc_row] = moneyid
  185. dw_pageretr.Object.u_spt_amerce_itemid[uc_row] = itemid
  186. dw_pageretr.Object.u_itemdef_itemcode[uc_row] = itemcode
  187. dw_pageretr.Object.u_itemdef_itemname[uc_row] = itemname
  188. dw_uc.Reset()
  189. dw_pageretr.RowsCopy(dw_pageretr.GetRow(), dw_pageretr.GetRow(), Primary!, dw_uc, 1, Primary!)
  190. dw_uc.ResetUpdate()
  191. dw_uc.SetRedraw(TRUE)
  192. RETURN 1
  193. end function
  194. public subroutine wf_check_billfj ();String arg_msg
  195. Long ll_ConnectionID
  196. Long cur_billtype
  197. long ll_relid,ll_relid_mx,ll_scid
  198. Long ls_filecount = 0
  199. Int rslt = 1
  200. uo_fj_mng_billtype ls_uo_fjbt
  201. ls_uo_fjbt = CREATE uo_fj_mng_billtype
  202. Long row,uc_relid
  203. row = dw_pageretr.GetRow()
  204. IF row > 0 THEN
  205. ll_relid = dw_pageretr.Object.u_spt_amerce_billid[row]
  206. ll_scid = dw_pageretr.Object.u_spt_amerce_scid[row]
  207. ll_relid_mx = 0
  208. ELSE
  209. rslt = 0
  210. GOTO ext
  211. END IF
  212. IF f_get_outerconnection(ll_ConnectionID,arg_msg) = 0 THEN
  213. rslt = 0
  214. GOTO ext
  215. END IF
  216. cur_billtype = 418 //客户投拆单的 mainiD
  217. ls_uo_fjbt.uf_check_billfj( cur_billtype, ll_relid,ll_relid_mx,ll_scid, sys_fileDB_sqlca, arg_msg, ls_filecount)
  218. IF ls_filecount > 0 THEN
  219. rslt = 1
  220. GOTO ext
  221. ELSE
  222. rslt = 0
  223. GOTO ext
  224. END IF
  225. ext:
  226. wf_encl(rslt)
  227. DESTROY ls_uo_fjbt
  228. end subroutine
  229. public function integer wf_xls_retrievedata (long arg_ationid, ref s_xls_billlist arg_str_billlist, ref uo_sendtoexcel arg_obj_st, ref string arg_msg);//==============================================================================
  230. // 函数: w_publ_1ton_share_detail::wf_xls_retrievedata()
  231. //------------------------------------------------------------------------------
  232. // 描述: 此函数需要 重载,复制祖先范例代码,然后修改retrieve参数部分两处即可
  233. //------------------------------------------------------------------------------
  234. Long LS_ROW,ll_id,i,ll_scid
  235. LS_ROW = dw_uc.GetRow()
  236. IF LS_ROW <= 0 THEN
  237. arg_msg = '没有目标单据!'
  238. RETURN 0
  239. END IF
  240. //修改点:获取 指定retriev参数
  241. ll_id = dw_uc.Object.#1[LS_ROW]
  242. ll_scid = dw_uc.Object.u_spt_amerce_scid[LS_ROW]
  243. //查询所选模版是否含有图片信息
  244. Long ll_ifpic
  245. Long ll_classid
  246. SELECT ifpic
  247. INTO :ll_ifpic
  248. FROM U_XLS_Templates
  249. Where id = :ll_xls_Templatesid;
  250. IF sqlca.SQLCode <> 0 THEN
  251. ll_ifpic = 0
  252. END IF
  253. Long ll_i,ll_j
  254. Long ll_mtrlid
  255. Long ll_fileid
  256. Blob ls_filedata
  257. SetNull(ls_filedata)
  258. String Pathname,ls_filename,ls_filetype
  259. String errmsg
  260. uo_fj_mng_billtype ls_uo_fjbt
  261. ls_uo_fjbt = CREATE uo_fj_mng_billtype
  262. s_xls_pic_list s_pic //结构数组-用于保存图片路径
  263. IF ll_ifpic = 1 THEN //如果含有图片信息,则查询本类型单据需要带出哪类附件
  264. SELECT classid
  265. INTO :ll_classid
  266. FROM u_billpic_fileclass
  267. Where (billtype = 418);
  268. IF sqlca.SQLCode <> 0 THEN
  269. ll_classid = 0
  270. END IF
  271. IF ll_classid > 0 THEN //如果已经指定好附件类型,则循环明细表查询每个明细的图片信息.
  272. FOR ll_i = 1 TO dw_child.RowCount()
  273. ll_mtrlid = dw_child.Object.mtrlid[ll_i]
  274. //取该附件类型中的第一个附件.
  275. SELECT top 1 fileid,DisplayName,FileType INTO :ll_fileid,:ls_filename,:ls_filetype
  276. FROM u_file
  277. WHERE relid = :ll_mtrlid
  278. AND classid = :ll_classid
  279. AND (filetype = 'bmp' OR filetype = 'rle' OR filetype = 'wmf'
  280. OR filetype = 'tif' OR filetype = 'jpg' OR filetype = 'gif' OR filetype = 'jpeg')
  281. USING sys_fileDB_sqlca;
  282. IF sys_fileDB_sqlca.SQLCode <> 0 THEN
  283. ll_fileid = 0
  284. END IF
  285. IF ll_fileid > 0 THEN
  286. Pathname = sys_cur_path+ins_fjtemppath+'\'+String(Today(),'yymmdd')+String(Now(),'hhmmss')+'_'+ls_filename+'.'+ls_filetype
  287. IF Trim(Pathname) <> '' THEN
  288. IF ls_uo_fjbt.uf_getfjbolb_fromdb( ll_fileid, ls_filedata, sys_fileDB_sqlca, arg_msg) = 0 THEN
  289. RETURN 0
  290. END IF
  291. IF f_saveblobtofile(ls_filedata,Pathname,errmsg) = 0 THEN
  292. RETURN 0
  293. ELSE
  294. s_pic.path[ll_i] = Pathname
  295. //记录临时文件位置,本窗口退出后删除
  296. wf_addlog_tempfilepathname(Pathname)
  297. END IF
  298. ELSE
  299. s_pic.path[ll_i] = ''
  300. END IF
  301. ELSE
  302. s_pic.path[ll_i] = ''
  303. END IF
  304. NEXT
  305. END IF
  306. //
  307. END IF
  308. ////可选设置///
  309. arg_obj_st.uo_const.create_new_pwd( ) //创建随机密码
  310. if sys_option_xls_ifuse_passwd = 1 then arg_obj_st.uo_const.pwd = trim(sys_option_xls_user_passwd) //默认加密密码 默认为随即密码
  311. boolean xls_locked
  312. xls_locked = not (sys_option_xls_lock = 1)
  313. /// Excel 的可选设置
  314. if arg_obj_st.of_setoption(arg_ationid, xls_locked,true,arg_msg) <> 1 then
  315. return 0
  316. end if
  317. for i = 1 to arg_str_billlist.count
  318. ////可选操作///
  319. arg_str_billlist.bill[i].ds_data = create datastore //
  320. arg_str_billlist.bill[i].ds_data.dataobject = arg_str_billlist.bill[i].datawindow //
  321. arg_str_billlist.bill[i].ds_data.settransobject(sqlca)
  322. //修改点:注意retrieve 参数与上文对应
  323. arg_str_billlist.bill[i].ds_data.retrieve(ll_scid,ll_id)
  324. next
  325. return 1
  326. end function
  327. on w_amerce.create
  328. int iCurrent
  329. call super::create
  330. this.ddlb_status=create ddlb_status
  331. this.ddlb_scid=create ddlb_scid
  332. this.st_3=create st_3
  333. this.st_2=create st_2
  334. iCurrent=UpperBound(this.Control)
  335. this.Control[iCurrent+1]=this.ddlb_status
  336. this.Control[iCurrent+2]=this.ddlb_scid
  337. this.Control[iCurrent+3]=this.st_3
  338. this.Control[iCurrent+4]=this.st_2
  339. end on
  340. on w_amerce.destroy
  341. call super::destroy
  342. destroy(this.ddlb_status)
  343. destroy(this.ddlb_scid)
  344. destroy(this.st_3)
  345. destroy(this.st_2)
  346. end on
  347. event ue_usual_query_retr;call super::ue_usual_query_retr;String ls_querystrpart = ''
  348. ls_newselect = Lower(ori_oldselect)
  349. IF Trim(sle_usual_query.Text) <> '' THEN
  350. IF Pos(Trim(sle_usual_query.Text),'%') = 0 THEN
  351. ls_querystrpart = "(u_spt_amerce.billcode like '%"+Trim(sle_usual_query.Text)+"%')"
  352. ELSE
  353. ls_querystrpart = "(u_spt_amerce.billcode like '"+Trim(sle_usual_query.Text)+"')"
  354. END IF
  355. IF Pos(ls_newselect," where ") <> 0 THEN
  356. ls_newselect = ls_newselect+" and ("+ls_querystrpart+')'
  357. ELSE
  358. ls_newselect = ls_newselect+" where ("+ls_querystrpart+')'
  359. END IF
  360. END IF
  361. wf_retrieveuc(dw_pageretr,ls_newselect,1)
  362. THIS.TriggerEvent('retrieve_pageretr')
  363. end event
  364. event ue_usual_query_filt;call super::ue_usual_query_filt;string obj_expr=''
  365. if trim(sle_usual_query.text)<>'' then
  366. if pos(trim(sle_usual_query.text),'%')=0 then
  367. obj_expr=obj_expr+'( u_spt_amerce_billcode like "%'+trim(sle_usual_query.text)+'%" )'
  368. else
  369. obj_expr=obj_expr+'( u_spt_amerce_billcode like "'+trim(sle_usual_query.text)+'" )'
  370. end if
  371. end if
  372. dw_pageretr.setfilter(obj_expr)
  373. dw_pageretr.setredraw(false)
  374. dw_pageretr.filter()
  375. if dw_pageretr.rowcount()>=1 then
  376. dw_pageretr.selectrow(0,false)
  377. dw_pageretr.selectrow(1,true)
  378. end if
  379. dw_pageretr.setredraw(true)
  380. end event
  381. event close;call super::close;destroy uo_amerce_ms
  382. end event
  383. event open;call super::open;uc_column_int=10 //uc dw前6列可以编辑
  384. uo_amerce_ms =create uo_amerce
  385. end event
  386. event refresh_interface;call super::refresh_interface;ddlb_status.enabled=not dw_edit_mode
  387. ddlb_scid.enabled=not dw_edit_mode
  388. end event
  389. event retrieve_pageretr;Boolean cb_firstpage_enabled,cb_nextpage_enabled,cb_retrieveall_enabled
  390. Boolean cb_priorpage_enabled,cb_func_enabled,cb_retrieve_enabled
  391. cb_nextpage_enabled = cb_nextpage.Enabled
  392. cb_retrieveall_enabled = cb_retrieveall.Enabled
  393. cb_func_enabled = cb_func.Enabled
  394. cb_nextpage.Enabled = FALSE
  395. cb_retrieveall.Enabled = FALSE
  396. cb_func.Enabled = FALSE
  397. dw_uc.Retrieve() //dw_uc的dw改左select top 0 并肯不带参数
  398. dw_pageretr.Retrieve(cur_scid,cur_flag,sys_user_spttype)
  399. IF dw_pageretr.RowCount() > 0 THEN
  400. dw_pageretr.SetRow(1)
  401. dw_pageretr.TriggerEvent(RowFocusChanged!)
  402. END IF
  403. THIS.TriggerEvent('retrieve_childdw')
  404. cb_nextpage.Enabled = cb_nextpage_enabled
  405. cb_retrieveall.Enabled = cb_retrieveall_enabled
  406. cb_func.Enabled = cb_func_enabled
  407. end event
  408. event ue_f9;call super::ue_f9;//用于选择明细内容,被F9[默认]
  409. IF NOT dw_edit_mode THEN RETURN
  410. Long uc_row
  411. uc_row = dw_pageretr.GetRow()
  412. IF uc_row = 0 THEN
  413. MessageBox('提示','请选定进仓单!', Information!, OK! )
  414. RETURN
  415. END IF
  416. dw_uc.AcceptText()
  417. THIS.Enabled = FALSE
  418. IF NOT IsValid(W_spt_edit) THEN
  419. s_edit_index_tran s_ch_tran //传递参数使用
  420. s_ch_tran.if_retrieve_all = FALSE //是否一次RETRIEVE所有行
  421. s_ch_tran.work_mode = 1 //0-单纯编辑模式 1-选择\编辑模式
  422. s_ch_tran.arg_pkid = 0 //目标定位PKID (备用)
  423. //查询列(物料编码)部分内容,用于初步筛选
  424. s_ch_tran.arg_string_code = Upper(Trim(dw_uc.Object.u_spt_sptcode[dw_uc.GetRow()]))
  425. OpenWithParm(W_spt_edit,s_ch_tran) //调用
  426. S_spt S_INSCUST
  427. S_INSCUST = Message.PowerObjectParm //接受返回结构
  428. IF S_INSCUST.sptid > 0 THEN //正常返回值则可以取以下值
  429. dw_uc.SetRedraw(FALSE)
  430. dw_uc.Object.u_spt_amerce_sptid[uc_row] = S_INSCUST.sptid
  431. dw_uc.Object.u_spt_name[uc_row] = S_INSCUST.Name
  432. dw_uc.Object.u_spt_sptcode[uc_row] = S_INSCUST.sptcode
  433. dw_uc.Object.u_spt_amerce_banktypeid[uc_row] = S_INSCUST.dftbanktypeid
  434. dw_uc.Object.u_spt_amerce_moneyid[uc_row] = S_INSCUST.dftmoneyid
  435. dw_uc.SetRedraw(TRUE)
  436. dw_uc.SetColumn("u_spt_amerce_inrep")
  437. END IF
  438. END IF
  439. THIS.Enabled = TRUE
  440. end event
  441. event ue_viewprint;call super::ue_viewprint;IF Not (f_power_ind(383) OR f_power_ind(423)) THEN
  442. MessageBox('提示','你没有使用权限!', Information!, OK! )
  443. RETURN
  444. END IF
  445. Long LS_ROW
  446. LS_ROW = dw_pageretr.GetRow()
  447. IF LS_ROW <= 0 THEN
  448. MessageBox('提示','没有打印目标单据!', Information!, OK! )
  449. RETURN
  450. END IF
  451. S_print_MSG LS_PRMSG
  452. IF ls_newname <> '' THEN
  453. IF li_auditprint = 1 THEN
  454. IF dw_pageretr.Object.u_spt_amerce_flag[dw_pageretr.GetRow()] = 0 THEN
  455. MessageBox('提示','目标单据还未审核,不能打印!', Information!, OK! )
  456. RETURN
  457. END IF
  458. END IF
  459. LS_PRMSG.obj_dwNAME = ls_newname
  460. ELSE
  461. LS_PRMSG.obj_dwNAME = 'dw_rp_spt_amerce_edit'
  462. END IF
  463. LS_PRMSG.TAG_TEXT = '罚款单'
  464. LS_PRMSG.FILTER_STRING = ''
  465. LS_PRMSG.retr_pram_falg = 12
  466. LS_PRMSG.PAGECH_FLAG = 0
  467. LS_PRMSG.retr_scid = dw_pageretr.Object.u_spt_amerce_scid[LS_ROW]
  468. LS_PRMSG.retr_pramnmb = dw_pageretr.Object.u_spt_amerce_billid[LS_ROW]
  469. OpenWithParm(w_publ_preview,LS_PRMSG)
  470. //**更新打印次料
  471. String arg_msg
  472. printnum = Message.DoubleParm
  473. f_update_printnum('u_spt_amerce',printnum,dw_pageretr.Object.u_spt_amerce_scid[LS_ROW],dw_pageretr.Object.u_spt_amerce_billid[LS_ROW],'','',arg_msg,TRUE)
  474. end event
  475. event ue_print;call super::ue_print;IF Not (f_power_ind(383) OR f_power_ind(423)) THEN
  476. MessageBox('提示','你没有使用权限!', Information!, OK! )
  477. RETURN
  478. END IF
  479. //--直接打印
  480. uo_print_preview uo_print
  481. S_print_MSG LS_PRMSG
  482. IF dw_pageretr.RowCount() = 0 THEN
  483. MessageBox('提示','没有可打印的单据!', Information!, OK! )
  484. RETURN
  485. END IF
  486. IF MessageBox ('询问',"是否确定要打印当前单据吗?",Question!,YesNo! ) = 2 THEN RETURN
  487. IF ls_newname <> '' THEN
  488. IF li_auditprint = 1 THEN
  489. IF dw_pageretr.Object.u_spt_amerce_flag[dw_pageretr.GetRow()] = 0 THEN
  490. MessageBox('提示','目标单据还未审核,不能打印!', Information!, OK! )
  491. RETURN
  492. END IF
  493. END IF
  494. LS_PRMSG.obj_dwNAME = ls_newname
  495. ELSE
  496. LS_PRMSG.obj_dwNAME = 'dw_rp_spt_amerce_edit'
  497. END IF
  498. LS_PRMSG.retr_pram_falg = 12
  499. LS_PRMSG.TAG_TEXT = '罚款单'
  500. LS_PRMSG.FILTER_STRING = ''
  501. LS_PRMSG.PAGECH_FLAG = 0
  502. LS_PRMSG.retr_scid = dw_pageretr.Object.u_spt_amerce_scid[dw_pageretr.GetRow()]
  503. LS_PRMSG.retr_pramnmb = dw_pageretr.Object.u_spt_amerce_billid[dw_pageretr.GetRow()]
  504. uo_print.FACT_PRINT_MSG = LS_PRMSG
  505. String arg_msg
  506. IF uo_print.uof_print_begin(arg_msg) = 0 THEN
  507. MessageBox("错误",arg_msg, StopSign!, OK! )
  508. RETURN
  509. END IF
  510. uo_print.ds_print()
  511. //**更新打印次料
  512. f_update_printnum('u_spt_amerce',1,dw_pageretr.Object.u_spt_amerce_scid[dw_pageretr.GetRow()],dw_pageretr.Object.u_spt_amerce_billid[dw_pageretr.GetRow()],'','',arg_msg,TRUE)
  513. end event
  514. event ue_addzy;call super::ue_addzy;IF dw_edit_mode THEN
  515. MessageBox('提示',"编辑状态下不可以使用!", Information!, OK! )
  516. RETURN
  517. END IF
  518. IF Not (f_power_ind(780) OR f_power_ind(783)) THEN
  519. MessageBox('提示','你没有使用权限!', Information!, OK! )
  520. RETURN
  521. END IF
  522. String arg_msg = ''
  523. String ls_str
  524. Long uc_row
  525. s_inputbox s_sreu
  526. uc_row = dw_pageretr.GetRow()
  527. IF uc_row <= 0 THEN
  528. MessageBox('提示','请选定当前目标单据!', Information!, OK! )
  529. RETURN
  530. END IF
  531. s_sreu.Title = '请输入要补充到备注的内容'
  532. s_sreu.old_text = ''
  533. OpenWithParm(w_inputbox,s_sreu)
  534. ls_str = Message.StringParm
  535. IF Trim(ls_str) = '' OR IsNull(ls_str) THEN RETURN
  536. IF uo_amerce_ms.add_dscrp(dw_pageretr.Object.u_spt_amerce_scid[uc_row],dw_pageretr.Object.u_spt_amerce_billid[uc_row],ls_str,arg_msg) = 0 THEN
  537. MessageBox('error!',arg_msg)
  538. RETURN
  539. ELSE
  540. MessageBox('提示','添加备注操作成功!', Information!, OK! )
  541. wf_refresh_curuc(dw_pageretr.Object.u_spt_amerce_scid[uc_row],dw_pageretr.Object.u_spt_amerce_billid[uc_row])
  542. END IF
  543. end event
  544. event resize;ln_bar.endx = this.width
  545. ln_bar2.endx = this.width
  546. r_bar.width = this.width
  547. end event
  548. event ue_rpt_print;call super::ue_rpt_print;IF Not (f_power_ind(383) OR f_power_ind(423)) THEN
  549. MessageBox('提示','你没有使用权限!', Information!, OK! )
  550. RETURN
  551. END IF
  552. Long row,uc_relid,ll_scid
  553. row = dw_pageretr.GetRow()
  554. IF row = 0 THEN
  555. RETURN
  556. END IF
  557. uo_rpt_print_preview uo_print
  558. S_rpt_print_MSG LS_PRMSG
  559. IF dw_pageretr.RowCount() = 0 THEN
  560. MessageBox('提示','没有可打印的单据!', Information!, OK! )
  561. RETURN
  562. END IF
  563. IF ls_rpname = '' THEN RETURN
  564. IF li_auditprint = 1 THEN
  565. IF dw_pageretr.Object.u_spt_amerce_flag[row] = 0 THEN
  566. MessageBox('提示','目标单据还未审核,不能打印!', Information!, OK! )
  567. RETURN
  568. END IF
  569. END IF
  570. IF MessageBox ("询问","是否确定要打印当前单据吗?",Question!,YesNo! ) = 2 THEN RETURN
  571. LS_PRMSG.retr_pram_falg = 12
  572. LS_PRMSG.TAG_TEXT = '赔偿单'
  573. LS_PRMSG.rpname = ls_rpname
  574. LS_PRMSG.FILTER_STRING = ''
  575. LS_PRMSG.PAGECH_FLAG = 0
  576. LS_PRMSG.rpid = ls_msgprintid_rpt
  577. LS_PRMSG.retr_scid = dw_pageretr.Object.u_spt_amerce_scid[row]
  578. LS_PRMSG.retr_pramnmb = dw_pageretr.Object.u_spt_amerce_billid[row]
  579. uo_print.FACT_PRINT_MSG = LS_PRMSG
  580. String arg_msg
  581. IF uo_print.uof_print_begin(arg_msg) = 0 THEN
  582. MessageBox("错误",arg_msg, StopSign!, OK! )
  583. RETURN
  584. END IF
  585. uo_print.ds_print()
  586. //**更新打印次料
  587. f_update_printnum('u_spt_amerce',1,dw_pageretr.Object.u_spt_amerce_scid[dw_pageretr.GetRow()],dw_pageretr.Object.u_spt_amerce_billid[dw_pageretr.GetRow()],'','',arg_msg,TRUE)
  588. end event
  589. event ue_rpt_viewprint;call super::ue_rpt_viewprint;IF Not (f_power_ind(383) OR f_power_ind(423)) THEN
  590. MessageBox('提示','你没有使用权限!', Information!, OK! )
  591. RETURN
  592. END IF
  593. Long row,uc_relid,ll_scid
  594. row = dw_pageretr.GetRow()
  595. IF row = 0 THEN
  596. RETURN
  597. END IF
  598. IF ls_rpname = '' THEN RETURN
  599. IF li_auditprint = 1 THEN
  600. IF dw_pageretr.Object.u_spt_amerce_flag[row] = 0 THEN
  601. MessageBox('提示','目标单据还未审核,不能打印!', Information!, OK! )
  602. RETURN
  603. END IF
  604. END IF
  605. s_rpt_print_msg s_print
  606. s_print.retr_pram_falg = 12
  607. s_print.rpid = ls_msgprintid_rpt
  608. s_print.retr_flag = TRUE
  609. s_print.tag_text = THIS.Title
  610. s_print.rpname = ls_rpname
  611. s_print.retr_scid = dw_pageretr.Object.u_spt_amerce_scid[row]
  612. s_print.retr_pramnmb = dw_pageretr.Object.u_spt_amerce_billid[row]
  613. OpenWithParm(w_rpt_preview,s_print)
  614. //**更新打印次料
  615. string arg_msg
  616. f_update_printnum('u_spt_amerce',1,dw_pageretr.Object.u_spt_amerce_scid[dw_pageretr.GetRow()],dw_pageretr.Object.u_spt_amerce_billid[dw_pageretr.GetRow()],'','',arg_msg,TRUE)
  617. end event
  618. event ue_f7;//用于选择明细内容,被F9[默认]
  619. IF NOT dw_edit_mode THEN RETURN
  620. Long uc_row
  621. String ls_itemcode
  622. uc_row = dw_uc.GetRow()
  623. ls_itemcode = Trim(dw_uc.Object.u_itemdef_itemcode[uc_row])
  624. IF uc_row = 0 THEN
  625. MessageBox('提示','请选定单据!',information!,ok!)
  626. RETURN
  627. END IF
  628. dw_uc.AcceptText()
  629. IF NOT IsValid(w_itemdef_response) THEN
  630. s_edit_index_tran s_ch_tran //传递参数使用
  631. s_ch_tran.if_retrieve_all = local_retrieve_all //是否一次retrieve所有行
  632. s_ch_tran.work_mode = 1 //0-单纯编辑模式 1-选择\编辑模式
  633. s_ch_tran.arg_pkid = 0 //目标定位pkid (备用)
  634. s_ch_tran.arg_string_code = ls_itemcode //查询列(物料编码)部分内容,用于初步筛选
  635. OpenWithParm(w_itemdef_response,s_ch_tran) //调用
  636. s_itemdef s_inscust
  637. s_inscust = Message.PowerObjectParm //接受返回结构
  638. IF s_inscust.itemid > 0 THEN //正常返回值则可以取以下值
  639. dw_uc.SetRedraw(FALSE)
  640. dw_uc.Object.u_spt_amerce_itemid[uc_row] = s_inscust.itemid
  641. dw_uc.Object.u_itemdef_itemcode[uc_row] = s_inscust.itemcode
  642. dw_uc.Object.u_itemdef_itemname[uc_row] = s_inscust.itemname
  643. dw_uc.SetColumn("u_spt_amerce_amercereason")
  644. dw_uc.SetRedraw(TRUE)
  645. END IF
  646. END IF
  647. end event
  648. type cb_func from w_publ_1ton_share_detail`cb_func within w_amerce
  649. end type
  650. type cb_exit from w_publ_1ton_share_detail`cb_exit within w_amerce
  651. integer x = 2267
  652. end type
  653. type sle_usual_query from w_publ_1ton_share_detail`sle_usual_query within w_amerce
  654. integer x = 192
  655. integer y = 188
  656. integer width = 549
  657. end type
  658. type cb_retrieveall from w_publ_1ton_share_detail`cb_retrieveall within w_amerce
  659. integer x = 2729
  660. end type
  661. type em_pagerowno from w_publ_1ton_share_detail`em_pagerowno within w_amerce
  662. integer x = 2418
  663. integer y = 36
  664. integer width = 320
  665. end type
  666. type dw_pageretr from w_publ_1ton_share_detail`dw_pageretr within w_amerce
  667. event dwnkey pbm_dwnkey
  668. integer x = 1993
  669. integer width = 1559
  670. integer height = 1644
  671. string dataobject = "dw_amerce_index"
  672. end type
  673. event dw_pageretr::dwnkey;call super::dwnkey;Int h = 0
  674. end event
  675. event dw_pageretr::constructor;call super::constructor; titleclick_sort_use=true //单击标题排序功能开关
  676. RBUTTON_FILTER_USE=true //右键查询功能开关
  677. end event
  678. event dw_pageretr::rowfocuschanged;call super::rowfocuschanged;wf_check_billfj()
  679. end event
  680. type st_1 from w_publ_1ton_share_detail`st_1 within w_amerce
  681. integer y = 208
  682. string text = "编码含"
  683. end type
  684. type cb_nextpage from w_publ_1ton_share_detail`cb_nextpage within w_amerce
  685. integer x = 2880
  686. end type
  687. type dw_uc from w_publ_1ton_share_detail`dw_uc within w_amerce
  688. integer width = 1984
  689. integer height = 1644
  690. string dataobject = "dw_amerce_edit"
  691. end type
  692. event dw_uc::dwnkey;parent.triggerevent('user_key')
  693. if key = KeyDownArrow! then return 1
  694. if dw_edit_mode then
  695. if dw_uc.GetColumnName ( )='u_spt_sptcode' and key = KeyEnter! then
  696. String ls_code,ls_name,ls_find_code
  697. Long ls_sptid
  698. Long cnt = 0
  699. Boolean if_find = FALSE
  700. dw_uc.AcceptText()
  701. ls_code = Upper(Trim(dw_uc.Object.u_spt_sptcode[dw_uc.GetRow()]))
  702. SELECT u_spt.sptid,
  703. u_spt.name,
  704. u_spt.sptcode
  705. INTO :ls_sptid,:ls_name,:ls_code
  706. FROM u_spt
  707. Where ( sptcode = :ls_code OR Name = :ls_code );
  708. IF sqlca.SQLCode <> 0 THEN
  709. IF Pos(Trim(ls_code),'%') = 0 THEN
  710. ls_find_code = '%'+ Trim(ls_code) + '%'
  711. ELSE
  712. ls_find_code = Trim(ls_code)
  713. END IF
  714. SELECT count(*) INTO :cnt
  715. FROM u_spt
  716. Where ( sptcode Like :ls_find_code OR Name Like :ls_find_code );
  717. IF sqlca.SQLCode <> 0 THEN
  718. PARENT.TriggerEvent('ue_f9')
  719. RETURN 1
  720. END IF
  721. IF cnt <> 1 THEN
  722. PARENT.TriggerEvent('ue_f9')
  723. RETURN 1
  724. ELSE
  725. SELECT u_spt.sptid,
  726. u_spt.sptcode,
  727. u_spt.name
  728. INTO :ls_sptid,:ls_code,:ls_name
  729. FROM u_spt
  730. Where ( sptcode Like :ls_find_code OR Name Like :ls_find_code );
  731. IF sqlca.SQLCode <> 0 THEN
  732. PARENT.TriggerEvent('ue_f9')
  733. RETURN 1
  734. ELSE
  735. if_find = TRUE
  736. END IF
  737. END IF
  738. ELSE
  739. if_find = TRUE
  740. END IF
  741. IF if_find THEN
  742. dw_uc.SetRedraw(FALSE)
  743. dw_uc.Object.u_spt_amerce_sptid[dw_uc.GetRow()] = ls_sptid
  744. dw_uc.Object.u_spt_sptcode[dw_uc.GetRow()] = ls_code
  745. dw_uc.Object.u_spt_name[dw_uc.GetRow()] = ls_name
  746. dw_uc.SetRedraw(TRUE)
  747. dw_uc.SetColumn("u_spt_amerce_inrep")
  748. RETURN 1
  749. END IF
  750. else
  751. if key = KeyEnter! Then //
  752. keybd_event ( 9, 0, 0 , 0 ) // 按下tab
  753. keybd_event ( 9, 0, 2, 0 ) // 释放tab
  754. Return 1
  755. end If
  756. end if
  757. end if
  758. end event
  759. event dw_uc::clicked;call super::clicked;if not dw_edit_mode then return
  760. if row <= 0 then return
  761. if dwo.name='p_p' then
  762. parent.TRIGGEREVENT('ue_f9')
  763. end if
  764. end event
  765. event dw_uc::doubleclicked;IF dw_edit_mode And row > 0 THEN
  766. IF dwo.Name = 'u_itemdef_itemcode' or dwo.Name = 'u_itemdef_itemname' THEN
  767. PARENT.TriggerEvent('ue_f7')
  768. ELSE
  769. Parent.TriggerEvent('ue_f9')
  770. END IF
  771. END IF
  772. end event
  773. type gb_2 from w_publ_1ton_share_detail`gb_2 within w_amerce
  774. end type
  775. type dw_child from w_publ_1ton_share_detail`dw_child within w_amerce
  776. integer x = 1029
  777. integer y = 2408
  778. integer height = 604
  779. end type
  780. type cb_viewprint from w_publ_1ton_share_detail`cb_viewprint within w_amerce
  781. integer x = 1623
  782. end type
  783. type cb_print from w_publ_1ton_share_detail`cb_print within w_amerce
  784. integer x = 1431
  785. end type
  786. type cb_add from w_publ_1ton_share_detail`cb_add within w_amerce
  787. end type
  788. event cb_add::clicked;IF Not (f_power_ind(116) OR f_power_ind(421)) THEN
  789. MessageBox('提示','你没有使用权限!', Information!, OK! )
  790. RETURN
  791. END IF
  792. String arg_msg = ''
  793. Long uc_row
  794. IF dw_edit_mode THEN
  795. dw_uc.AcceptText()
  796. uc_row = dw_uc.GetRow()
  797. IF uc_row <= 0 THEN
  798. MessageBox('提示','请选定当前目标单据!', Information!, OK! )
  799. RETURN
  800. END IF
  801. IF NOT dw_uc.Object.u_spt_amerce_billdate[uc_row] > DateTime(2000-01-01,Now()) THEN
  802. MessageBox('提示','不合理日期', Information!, OK! )
  803. dw_uc.SetFocus()
  804. dw_uc.SetColumn('u_spt_amerce_billdate')
  805. RETURN
  806. END IF
  807. IF Trim(dw_uc.Object.u_spt_amerce_inrep[uc_row]) = '' THEN
  808. MessageBox('提示','请输入经手人', Information!, OK! )
  809. dw_uc.SetFocus()
  810. dw_uc.SetColumn('u_spt_amerce_inrep')
  811. RETURN
  812. END IF
  813. IF dw_uc.Object.u_spt_amerce_banktypeid[uc_row] = 0 THEN
  814. MessageBox('提示','请选择结算方式', Information!, OK! )
  815. dw_uc.SetFocus()
  816. dw_uc.SetColumn('u_spt_amerce_banktypeid')
  817. RETURN
  818. END IF
  819. IF dw_uc.Object.u_spt_amerce_moneyid[uc_row] = 0 THEN
  820. MessageBox('提示','请选择币种', Information!, OK! )
  821. dw_uc.SetFocus()
  822. dw_uc.SetColumn('u_spt_amerce_moneyid')
  823. RETURN
  824. END IF
  825. uo_amerce_ms.sptid = dw_uc.Object.u_spt_amerce_sptid[uc_row]
  826. uo_amerce_ms.billdate = dw_uc.Object.u_spt_amerce_billdate[uc_row]
  827. uo_amerce_ms.amerceamt = dw_uc.Object.u_spt_amerce_amerceamt[uc_row]
  828. uo_amerce_ms.amercereason = dw_uc.Object.u_spt_amerce_amercereason[uc_row]
  829. uo_amerce_ms.relcode = dw_uc.Object.u_spt_amerce_relcode[uc_row]
  830. uo_amerce_ms.inrep = dw_uc.Object.u_spt_amerce_inrep[uc_row]
  831. uo_amerce_ms.banktypeid = dw_uc.Object.u_spt_amerce_banktypeid[uc_row]
  832. uo_amerce_ms.moneyid = dw_uc.Object.u_spt_amerce_moneyid[uc_row]
  833. uo_amerce_ms.itemid = dw_uc.Object.u_spt_amerce_itemid[uc_row]
  834. IF uo_amerce_ms.Save(arg_msg,TRUE) = 0 THEN
  835. MessageBox('错误',arg_msg, StopSign!, OK! )
  836. RETURN
  837. END IF
  838. // messagebox(publ_operator,'保存操作成功!')
  839. long ll_row
  840. ll_row = dw_pageretr.getrow()
  841. dw_pageretr.SelectRow(0,FALSE)
  842. dw_pageretr.SelectRow(ll_row,TRUE)
  843. wf_refresh_curuc(cur_scid,uo_amerce_ms.billid)
  844. ELSE
  845. IF uo_amerce_ms.newbegin(cur_scid,arg_msg) = 0 THEN
  846. MessageBox('错误',arg_msg, StopSign!, OK! )
  847. RETURN
  848. END IF
  849. END IF
  850. CALL SUPER::Clicked
  851. IF dw_edit_mode THEN
  852. Long li_itemid
  853. String ls_itemcode,ls_itemname
  854. SELECT itemid,itemcode,itemname
  855. into :li_itemid,:ls_itemcode,:ls_itemname
  856. FROM u_itemdef where dfttype = 9;
  857. IF SQLCA.SQLCODE = 0 THEN
  858. dw_uc.Object.u_spt_amerce_itemid[dw_uc.GetRow()] = li_itemid
  859. dw_uc.Object.u_itemdef_itemcode[dw_uc.GetRow()] = ls_itemcode
  860. dw_uc.Object.u_itemdef_itemname[dw_uc.GetRow()] = ls_itemname
  861. END IF
  862. ELSE
  863. PARENT.TriggerEvent("retrieve_childdw")
  864. END IF
  865. end event
  866. type cb_edit from w_publ_1ton_share_detail`cb_edit within w_amerce
  867. end type
  868. event cb_edit::clicked;IF Not (f_power_ind(116) OR f_power_ind(421)) THEN
  869. MessageBox(publ_operator,'你没有使用权限!')
  870. RETURN
  871. END IF
  872. String arg_msg = ''
  873. Long uc_row
  874. uc_row = dw_pageretr.GetRow()
  875. IF uc_row <= 0 THEN
  876. MessageBox('系统提示','请选定当前目标单据!')
  877. RETURN
  878. END IF
  879. IF NOT dw_edit_mode THEN
  880. IF uo_amerce_ms.updatebegin(dw_pageretr.Object.u_spt_amerce_scid[uc_row],dw_pageretr.Object.u_spt_amerce_billid[uc_row],arg_msg) = 0 THEN
  881. MessageBox('Error!',arg_msg)
  882. RETURN
  883. END IF
  884. END IF
  885. CALL SUPER::Clicked
  886. end event
  887. type cb_delet from w_publ_1ton_share_detail`cb_delet within w_amerce
  888. end type
  889. event cb_delet::clicked;call super::clicked;if not (f_power_ind(616) or f_power_ind(623)) then
  890. messagebox('提示','你没有使用权限!', Information!, OK! )
  891. return
  892. end if
  893. if dw_edit_mode then return
  894. string arg_msg=''
  895. long uc_row
  896. uc_row=dw_pageretr.getrow()
  897. if uc_row<=0 then
  898. messagebox('提示','请选定当前目标单据!', Information!, OK! )
  899. return
  900. end if
  901. IF MessageBox ("询问","是否确定要删除当前单据吗?",Question!,YesNo! ) = 2 THEN RETURN
  902. if uo_amerce_ms.del(dw_pageretr.object.u_spt_amerce_scid[uc_row],dw_pageretr.object.u_spt_amerce_billid[uc_row],arg_msg)=0 then
  903. messagebox('错误',arg_msg, StopSign!, OK! )
  904. ELSE
  905. //日志
  906. long ls_id
  907. string ls_code
  908. ls_id=dw_pageretr.object.u_spt_amerce_billid[uc_row]
  909. ls_code=dw_pageretr.object.u_spt_amerce_billcode[uc_row]
  910. f_setsysoplog('罚款单','删除,id:'+string(ls_id)+',code:'+ls_code,arg_msg,true)
  911. //--
  912. MESSAGEBOX('提示','删除单据'+string(dw_pageretr.object.u_spt_amerce_billcode[uc_row])+'成功!', Information!, OK! )
  913. dw_pageretr.deleterow(uc_row)
  914. dw_pageretr.postevent(rowfocuschanged!)
  915. end if
  916. end event
  917. type cb_addzy from w_publ_1ton_share_detail`cb_addzy within w_amerce
  918. end type
  919. event cb_addzy::clicked;call super::clicked;m_Dfc_Control_PopupMenu dmPopupMenu
  920. string menustr
  921. menustr="Text=增加备注~tEvent=ue_addzy"
  922. menustr = menustr + "|" + "Text=-"
  923. menustr = menustr + "|" + "Text=查看附件~tEvent=ue_fj_view"
  924. menustr = menustr + "|" + "Text=添加附件~tEvent=ue_fj_edit"
  925. if len(trim(menustr))<>0 then
  926. dmPopupMenu = Create m_Dfc_Control_PopupMenu
  927. dmPopupMenu.mf_BuildMenu(This, menustr)
  928. dmPopupMenu.mf_PopMenu()
  929. Destroy dmPopupMenu
  930. end if
  931. end event
  932. type cb_auditing from w_publ_1ton_share_detail`cb_auditing within w_amerce
  933. end type
  934. event cb_auditing::clicked;call super::clicked;IF Not (f_power_ind(883) OR f_power_ind(884)) THEN
  935. MessageBox('提示','你没有使用权限!', Information!, OK! )
  936. RETURN
  937. END IF
  938. IF dw_edit_mode THEN RETURN
  939. String arg_msg = ''
  940. Long pagerert_row
  941. pagerert_row = dw_pageretr.GetRow()
  942. IF pagerert_row <= 0 THEN
  943. MessageBox('提示','请选定当前目标单据!', Information!, OK! )
  944. RETURN
  945. END IF
  946. IF MessageBox ("询问","是否确定要审核当前单据?",question!,yesno! ) = 2 THEN RETURN
  947. IF uo_amerce_ms.auditing(dw_pageretr.Object.u_spt_amerce_scid[pagerert_row],dw_pageretr.Object.u_spt_amerce_billid[pagerert_row],arg_msg,TRUE) = 0 THEN
  948. MessageBox('error!',arg_msg)
  949. ELSE
  950. MessageBox('提示','审核成功!', Information!, OK! )
  951. wf_refresh_curuc(dw_pageretr.Object.u_spt_amerce_scid[pagerert_row],dw_pageretr.Object.u_spt_amerce_billid[pagerert_row])
  952. END IF
  953. end event
  954. type cb_xm from w_publ_1ton_share_detail`cb_xm within w_amerce
  955. boolean visible = false
  956. end type
  957. event cb_xm::clicked;//
  958. end event
  959. type cb_retrieve from w_publ_1ton_share_detail`cb_retrieve within w_amerce
  960. end type
  961. type cb_xls from w_publ_1ton_share_detail`cb_xls within w_amerce
  962. integer x = 1815
  963. end type
  964. type cb_help from w_publ_1ton_share_detail`cb_help within w_amerce
  965. integer x = 2117
  966. end type
  967. type cb_auditing_cancel from w_publ_1ton_share_detail`cb_auditing_cancel within w_amerce
  968. end type
  969. event cb_auditing_cancel::clicked;call super::clicked;IF Not (f_power_ind(117) OR f_power_ind(422)) THEN
  970. MessageBox('提示','你没有使用权限!', Information!, OK! )
  971. RETURN
  972. END IF
  973. IF dw_edit_mode THEN RETURN
  974. String arg_msg = ''
  975. Long pagerert_row
  976. pagerert_row = dw_pageretr.GetRow()
  977. IF pagerert_row <= 0 THEN
  978. MessageBox('提示','请选定当前目标单据!', Information!, OK! )
  979. RETURN
  980. END IF
  981. IF MessageBox ("询问","是否确定要撤消审核当前单据?",question!,yesno! ) = 2 THEN RETURN
  982. IF uo_amerce_ms.c_auditing(dw_pageretr.Object.u_spt_amerce_scid[pagerert_row],dw_pageretr.Object.u_spt_amerce_billid[pagerert_row],arg_msg,TRUE) = 0 THEN
  983. MessageBox('错误',arg_msg, StopSign!, OK! )
  984. ELSE
  985. //日志
  986. Long ls_id
  987. String ls_code
  988. ls_id = dw_pageretr.Object.u_spt_amerce_billid[pagerert_row]
  989. ls_code = dw_pageretr.Object.u_spt_amerce_billcode[pagerert_row]
  990. f_setsysoplog('罚款单','撤审,id:'+String(ls_id)+',code:'+ls_code,arg_msg,TRUE)
  991. //--
  992. MessageBox('提示','撤消审核成功!', Information!, OK! )
  993. wf_refresh_curuc(dw_pageretr.Object.u_spt_amerce_scid[pagerert_row],dw_pageretr.Object.u_spt_amerce_billid[pagerert_row])
  994. END IF
  995. end event
  996. type p_msg from w_publ_1ton_share_detail`p_msg within w_amerce
  997. end type
  998. type p_help from w_publ_1ton_share_detail`p_help within w_amerce
  999. end type
  1000. type p_encl from w_publ_1ton_share_detail`p_encl within w_amerce
  1001. end type
  1002. type p_other from w_publ_1ton_share_detail`p_other within w_amerce
  1003. end type
  1004. type gb_3 from w_publ_1ton_share_detail`gb_3 within w_amerce
  1005. end type
  1006. type ln_bar from w_publ_1ton_share_detail`ln_bar within w_amerce
  1007. end type
  1008. type ln_bar2 from w_publ_1ton_share_detail`ln_bar2 within w_amerce
  1009. end type
  1010. type r_bar from w_publ_1ton_share_detail`r_bar within w_amerce
  1011. end type
  1012. type ln_1 from w_publ_1ton_share_detail`ln_1 within w_amerce
  1013. end type
  1014. type ln_2 from w_publ_1ton_share_detail`ln_2 within w_amerce
  1015. end type
  1016. type ddlb_status from dropdownlistbox within w_amerce
  1017. integer x = 1687
  1018. integer y = 188
  1019. integer width = 549
  1020. integer height = 300
  1021. integer taborder = 10
  1022. boolean bringtotop = true
  1023. integer textsize = -9
  1024. integer weight = 400
  1025. fontcharset fontcharset = gb2312charset!
  1026. fontpitch fontpitch = variable!
  1027. string facename = "宋体"
  1028. long textcolor = 33554432
  1029. string text = "[全部]"
  1030. boolean sorted = false
  1031. string item[] = {"[全部]","待审核","已审核"}
  1032. borderstyle borderstyle = stylelowered!
  1033. end type
  1034. event selectionchanged;if index=1 then
  1035. cur_flag=-1
  1036. elseif index=2 then
  1037. cur_flag=0
  1038. elseif index=3 then
  1039. cur_flag=1
  1040. end if
  1041. parent.triggerevent('retrieve_pageretr')
  1042. end event
  1043. type ddlb_scid from uo_ddlb_scid within w_amerce
  1044. integer x = 946
  1045. integer y = 188
  1046. integer width = 549
  1047. integer height = 1120
  1048. end type
  1049. event constructor;call super::constructor;cur_scid=this.uo_scid
  1050. end event
  1051. event selectionchanged;call super::selectionchanged;cur_scid=this.uo_scid
  1052. parent.triggerevent("retrieve_pageretr")
  1053. end event
  1054. type st_3 from statictext within w_amerce
  1055. integer x = 1509
  1056. integer y = 208
  1057. integer width = 219
  1058. integer height = 48
  1059. integer textsize = -9
  1060. integer weight = 400
  1061. fontcharset fontcharset = gb2312charset!
  1062. fontpitch fontpitch = variable!
  1063. string facename = "宋体"
  1064. long textcolor = 33554432
  1065. long backcolor = 134217739
  1066. string text = "状 态"
  1067. boolean focusrectangle = false
  1068. end type
  1069. type st_2 from statictext within w_amerce
  1070. integer x = 763
  1071. integer y = 208
  1072. integer width = 219
  1073. integer height = 48
  1074. integer textsize = -9
  1075. integer weight = 400
  1076. fontcharset fontcharset = gb2312charset!
  1077. fontpitch fontpitch = variable!
  1078. string facename = "宋体"
  1079. long textcolor = 33554432
  1080. long backcolor = 134217739
  1081. string text = "分 部"
  1082. boolean focusrectangle = false
  1083. end type