w_sc_abnormity.srw 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546
  1. $PBExportHeader$w_sc_abnormity.srw
  2. forward
  3. global type w_sc_abnormity from w_publ_1ton_share_detail
  4. end type
  5. type ddlb_status from dropdownlistbox within w_sc_abnormity
  6. end type
  7. type st_2 from statictext within w_sc_abnormity
  8. end type
  9. type em_dftdate from editmask within w_sc_abnormity
  10. end type
  11. type sle_dftrelcode from singlelineedit within w_sc_abnormity
  12. end type
  13. type st_3 from statictext within w_sc_abnormity
  14. end type
  15. type st_4 from statictext within w_sc_abnormity
  16. end type
  17. type cb_affirm from uo_imflatbutton within w_sc_abnormity
  18. end type
  19. type cb_cancel_affirm from uo_imflatbutton within w_sc_abnormity
  20. end type
  21. end forward
  22. global type w_sc_abnormity from w_publ_1ton_share_detail
  23. integer x = 73
  24. integer y = 4
  25. integer width = 4681
  26. string title = "个人工序计件单"
  27. boolean maxbox = true
  28. windowstate windowstate = maximized!
  29. event insert_childrow ( )
  30. event ue_secaudit ( )
  31. event ue_csecaudit ( )
  32. event ue_fj_edit ( )
  33. event ue_fj_view ( )
  34. ddlb_status ddlb_status
  35. st_2 st_2
  36. em_dftdate em_dftdate
  37. sle_dftrelcode sle_dftrelcode
  38. st_3 st_3
  39. st_4 st_4
  40. cb_affirm cb_affirm
  41. cb_cancel_affirm cb_cancel_affirm
  42. end type
  43. global w_sc_abnormity w_sc_abnormity
  44. type variables
  45. uo_abnormity uo_abnormity_dq
  46. int cur_flag=-1
  47. end variables
  48. forward prototypes
  49. public function integer wf_refresh_curuc (long arg_billid)
  50. public subroutine wf_check_billfj ()
  51. 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)
  52. end prototypes
  53. event insert_childrow();long li_row
  54. li_row=dw_child.insertrow(0)
  55. dw_child.scrolltorow(li_row)
  56. dw_child.object.relcode[li_row] = sle_dftrelcode.text
  57. dw_uc.accepttext()
  58. //dw_child.object.mxdscrp[li_row] =dw_uc.object.u_sc_abnormity_bill_dutyreason[dw_uc.getrow()]
  59. dw_child.SetColumn ('empcode')
  60. end event
  61. event ue_secaudit();IF dw_edit_mode THEN
  62. MessageBox('提示',"编辑状态下不可以使用!", Information!, OK! )
  63. return
  64. END IF
  65. IF NOT f_power_ind(213) THEN
  66. MessageBox('提示','你没有使用权限!', Information!, OK! )
  67. RETURN
  68. END IF
  69. string arg_msg=''
  70. if messagebox ("询问","是否确定要确认当前单据?",question!,yesno! ) = 2 then return
  71. long pagerert_row
  72. pagerert_row=dw_pageretr.getrow()
  73. if pagerert_row<=0 then
  74. messagebox('提示','请选定当前目标单据!', Information!, OK! )
  75. return
  76. end if
  77. if uo_abnormity_dq.secauditing(dw_pageretr.object.billid[pagerert_row],arg_msg,true)=0 then
  78. messagebox('错误',arg_msg, StopSign!, OK! )
  79. else
  80. messagebox('提示','确认成功!', Information!, OK! )
  81. wf_refresh_curuc(dw_pageretr.object.billid[pagerert_row])
  82. end if
  83. end event
  84. event ue_csecaudit();IF dw_edit_mode THEN
  85. MessageBox('提示',"编辑状态下不可以使用!", Information!, OK! )
  86. return
  87. END IF
  88. IF NOT f_power_ind(213) THEN
  89. MessageBox('提示','你没有使用权限!', Information!, OK! )
  90. RETURN
  91. END IF
  92. String arg_msg = ''
  93. Long pagerert_row
  94. pagerert_row = dw_pageretr.GetRow()
  95. IF pagerert_row <= 0 THEN
  96. MessageBox('提示','请选定当前目标单据!', Information!, OK! )
  97. RETURN
  98. END IF
  99. IF MessageBox ("询问","是否确定要反确认当前单据?",question!,yesno! ) = 2 THEN RETURN
  100. IF uo_abnormity_dq.c_secauditing(dw_pageretr.Object.billid[pagerert_row],arg_msg,TRUE) = 0 THEN
  101. MessageBox('错误',arg_msg, StopSign!, OK! )
  102. ELSE
  103. //日志
  104. Long ls_id
  105. String ls_code
  106. ls_id = dw_pageretr.Object.billid[pagerert_row]
  107. ls_code = dw_pageretr.Object.billcode[pagerert_row]
  108. f_setsysoplog('个人工序计件单','返确认,id:'+String(ls_id)+',code:'+ls_code,arg_msg,TRUE)
  109. //--
  110. MessageBox('提示','反确认成功!', Information!, OK! )
  111. wf_refresh_curuc(dw_pageretr.Object.billid[pagerert_row])
  112. END IF
  113. end event
  114. event ue_fj_edit();IF dw_edit_mode THEN
  115. MessageBox('提示','编辑状态下不可用', Information!, OK! )
  116. RETURN
  117. END IF
  118. //IF NOT f_power_ind(1446) THEN
  119. // MessageBox(publ_operator,'你没有使用权限!')
  120. // RETURN
  121. //END IF
  122. s_edit_index_tran s_pic
  123. Long ll_ConnectionID
  124. String arg_msg
  125. Long ls_row
  126. ls_row = dw_pageretr.GetRow()
  127. IF ls_row <= 0 THEN
  128. RETURN
  129. END IF
  130. IF f_get_outerconnection(ll_ConnectionID,arg_msg) = 0 THEN
  131. MessageBox('提示','没有指定附件数据库连接'+arg_msg, Information!, OK! )
  132. RETURN
  133. END IF
  134. s_pic.f_long = 709 //采购订单的mainID
  135. s_pic.f_string = dw_pageretr.Object.billcode[ls_row]
  136. s_pic.g_long = dw_pageretr.Object.billid[ls_row]
  137. s_pic.e_long = 0
  138. s_pic.sqltransaction = sys_filedb_sqlca
  139. OpenWithParm(w_fj_bill_mng,s_pic)
  140. //wf_check_billfj()
  141. end event
  142. event ue_fj_view();IF dw_edit_mode THEN
  143. MessageBox('提示','编辑状态下不可用', Information!, OK! )
  144. RETURN
  145. END IF
  146. s_edit_index_tran s_pic
  147. Long ll_ConnectionID
  148. String arg_msg
  149. Long ls_row
  150. ls_row = dw_pageretr.GetRow()
  151. IF ls_row <= 0 THEN
  152. RETURN
  153. END IF
  154. IF f_get_outerconnection(ll_ConnectionID,arg_msg) = 0 THEN
  155. MessageBox('提示','没有指定附件数据库连接'+arg_msg, Information!, OK! )
  156. RETURN
  157. END IF
  158. s_pic.f_long = 709 //采购订单的mainID
  159. s_pic.f_string = dw_pageretr.Object.billcode[ls_row]
  160. s_pic.g_long = dw_pageretr.Object.billid[ls_row]
  161. s_pic.e_long = 0
  162. s_pic.sqltransaction = sys_filedb_sqlca
  163. OpenWithParm(w_fj_bill_view,s_pic)
  164. end event
  165. public function integer wf_refresh_curuc (long arg_billid);//wf_refresh_curuc
  166. IF arg_billid <= 0 OR IsNull(arg_billid) THEN RETURN 0
  167. Long uc_row
  168. uc_row = dw_pageretr.GetRow()
  169. IF uc_row <= 0 THEN RETURN 0
  170. DateTime billdate
  171. String dscrp
  172. Long wagemth
  173. String billcode
  174. string relcode
  175. Long wageid
  176. Int auditingflag
  177. String auditingrep
  178. DateTime auditingdate
  179. DateTime opdate
  180. String opemp
  181. DateTime moddate
  182. String modemp
  183. Int secauditingflag
  184. String secauditingrep
  185. DateTime secauditingdate
  186. long ll_printnum
  187. SELECT u_sc_abnormity.billdate ,
  188. u_sc_abnormity.dscrp ,
  189. u_sc_abnormity.wagemth ,
  190. u_sc_abnormity.billcode ,
  191. u_sc_abnormity.relcode ,
  192. u_sc_abnormity.wageid ,
  193. u_sc_abnormity.auditingflag ,
  194. u_sc_abnormity.auditingemp ,
  195. u_sc_abnormity.auditingdate ,
  196. u_sc_abnormity.opdate ,
  197. u_sc_abnormity.opemp ,
  198. u_sc_abnormity.moddate ,
  199. u_sc_abnormity.modemp ,
  200. u_sc_abnormity.secauditingflag ,
  201. u_sc_abnormity.secauditingemp ,
  202. u_sc_abnormity.secauditingdate ,
  203. u_sc_abnormity.printnum
  204. INTO
  205. :billdate ,
  206. :dscrp ,
  207. :wagemth ,
  208. :billcode ,
  209. :relcode ,
  210. :wageid ,
  211. :auditingflag ,
  212. :auditingrep ,
  213. :auditingdate ,
  214. :opdate ,
  215. :opemp ,
  216. :moddate ,
  217. :modemp ,
  218. :secauditingflag ,
  219. :secauditingrep ,
  220. :secauditingdate,
  221. :ll_printnum
  222. FROM u_sc_abnormity
  223. WHERE ( u_sc_abnormity.billid = :arg_billid );
  224. IF sqlca.SQLCode <> 0 THEN
  225. MessageBox('提示',"查询计件单操作失败"+sqlca.SQLErrText, Information!, OK! )
  226. RETURN 0
  227. END IF
  228. dw_pageretr.Object.billid[uc_row]=arg_billid
  229. dw_pageretr.Object.billdate[uc_row]=billdate
  230. dw_pageretr.object.dscrp[uc_row]=dscrp
  231. dw_pageretr.object.wagemth[uc_row]=wagemth
  232. dw_pageretr.object.billcode[uc_row]=billcode
  233. dw_pageretr.object.relcode[uc_row]=relcode
  234. dw_pageretr.object.wageid[uc_row]=wageid
  235. dw_pageretr.object.auditingflag[uc_row]=auditingflag
  236. dw_pageretr.object.auditingemp[uc_row]=auditingrep
  237. dw_pageretr.object.auditingdate[uc_row]=auditingdate
  238. dw_pageretr.object.opdate[uc_row]=opdate
  239. dw_pageretr.object.opemp[uc_row]=opemp
  240. dw_pageretr.object.moddate[uc_row]=moddate
  241. dw_pageretr.object.modemp[uc_row]=modemp
  242. dw_pageretr.object.secauditingflag[uc_row]=secauditingflag
  243. dw_pageretr.object.secauditingemp[uc_row]=secauditingrep
  244. dw_pageretr.object.secauditingdate[uc_row]=secauditingdate
  245. dw_pageretr.object.printnum[uc_row]=ll_printnum
  246. dw_uc.Reset()
  247. dw_pageretr.RowsCopy(dw_pageretr.GetRow(), dw_pageretr.GetRow(), Primary!, dw_uc, 1, Primary!)
  248. dw_uc.ResetUpdate()
  249. dw_uc.SetRedraw(TRUE)
  250. RETURN 1
  251. end function
  252. public subroutine wf_check_billfj ();String arg_msg
  253. Long ll_ConnectionID
  254. Long cur_billtype
  255. long ll_relid,ll_relid_mx,ll_scid
  256. Long ls_filecount = 0
  257. Int rslt = 1
  258. uo_fj_mng_billtype ls_uo_fjbt
  259. ls_uo_fjbt = CREATE uo_fj_mng_billtype
  260. Long row,uc_relid
  261. row = dw_pageretr.GetRow()
  262. IF row > 0 THEN
  263. ll_relid = dw_pageretr.Object.billid[row]
  264. ll_scid = 0
  265. ll_relid_mx = 0
  266. ELSE
  267. rslt = 0
  268. GOTO ext
  269. END IF
  270. IF f_get_outerconnection(ll_ConnectionID,arg_msg) = 0 THEN
  271. rslt = 0
  272. GOTO ext
  273. END IF
  274. cur_billtype = 709 //客户投拆单的 mainiD
  275. ls_uo_fjbt.uf_check_billfj( cur_billtype, ll_relid,ll_relid_mx,ll_scid, sys_fileDB_sqlca, arg_msg, ls_filecount)
  276. IF ls_filecount > 0 THEN
  277. rslt = 1
  278. GOTO ext
  279. ELSE
  280. rslt = 0
  281. GOTO ext
  282. END IF
  283. ext:
  284. wf_encl(rslt)
  285. DESTROY ls_uo_fjbt
  286. end subroutine
  287. 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);//==============================================================================
  288. // 函数: w_publ_1ton_share_detail::wf_xls_retrievedata()
  289. //------------------------------------------------------------------------------
  290. // 描述: 此函数需要 重载,复制祖先范例代码,然后修改retrieve参数部分两处即可
  291. //------------------------------------------------------------------------------
  292. Long LS_ROW,ll_id,i,ll_scid
  293. LS_ROW = dw_uc.GetRow()
  294. IF LS_ROW <= 0 THEN
  295. arg_msg = '没有目标单据!'
  296. RETURN 0
  297. END IF
  298. //修改点:获取 指定retriev参数
  299. ll_id = dw_uc.Object.#1[LS_ROW]
  300. ll_scid = 0
  301. //查询所选模版是否含有图片信息
  302. Long ll_ifpic
  303. Long ll_classid
  304. SELECT ifpic
  305. INTO :ll_ifpic
  306. FROM U_XLS_Templates
  307. Where id = :ll_xls_Templatesid;
  308. IF sqlca.SQLCode <> 0 THEN
  309. ll_ifpic = 0
  310. END IF
  311. Long ll_i,ll_j
  312. Long ll_mtrlid
  313. Long ll_fileid
  314. Blob ls_filedata
  315. SetNull(ls_filedata)
  316. String Pathname,ls_filename,ls_filetype
  317. String errmsg
  318. uo_fj_mng_billtype ls_uo_fjbt
  319. ls_uo_fjbt = CREATE uo_fj_mng_billtype
  320. s_xls_pic_list s_pic //结构数组-用于保存图片路径
  321. IF ll_ifpic = 1 THEN //如果含有图片信息,则查询本类型单据需要带出哪类附件
  322. SELECT classid
  323. INTO :ll_classid
  324. FROM u_billpic_fileclass
  325. Where (billtype = 709);
  326. IF sqlca.SQLCode <> 0 THEN
  327. ll_classid = 0
  328. END IF
  329. IF ll_classid > 0 THEN //如果已经指定好附件类型,则循环明细表查询每个明细的图片信息.
  330. FOR ll_i = 1 TO dw_child.RowCount()
  331. ll_mtrlid = dw_child.Object.mtrlid[ll_i]
  332. //取该附件类型中的第一个附件.
  333. SELECT top 1 fileid,DisplayName,FileType INTO :ll_fileid,:ls_filename,:ls_filetype
  334. FROM u_file
  335. WHERE relid = :ll_mtrlid
  336. AND classid = :ll_classid
  337. AND (filetype = 'bmp' OR filetype = 'rle' OR filetype = 'wmf'
  338. OR filetype = 'tif' OR filetype = 'jpg' OR filetype = 'gif' OR filetype = 'jpeg')
  339. USING sys_fileDB_sqlca;
  340. IF sys_fileDB_sqlca.SQLCode <> 0 THEN
  341. ll_fileid = 0
  342. END IF
  343. IF ll_fileid > 0 THEN
  344. Pathname = sys_cur_path+ins_fjtemppath+'\'+String(Today(),'yymmdd')+String(Now(),'hhmmss')+'_'+ls_filename+'.'+ls_filetype
  345. IF Trim(Pathname) <> '' THEN
  346. IF ls_uo_fjbt.uf_getfjbolb_fromdb( ll_fileid, ls_filedata, sys_fileDB_sqlca, arg_msg) = 0 THEN
  347. RETURN 0
  348. END IF
  349. IF f_saveblobtofile(ls_filedata,Pathname,errmsg) = 0 THEN
  350. RETURN 0
  351. ELSE
  352. s_pic.path[ll_i] = Pathname
  353. //记录临时文件位置,本窗口退出后删除
  354. wf_addlog_tempfilepathname(Pathname)
  355. END IF
  356. ELSE
  357. s_pic.path[ll_i] = ''
  358. END IF
  359. ELSE
  360. s_pic.path[ll_i] = ''
  361. END IF
  362. NEXT
  363. END IF
  364. //
  365. END IF
  366. ////可选设置///
  367. arg_obj_st.uo_const.create_new_pwd( ) //创建随机密码
  368. if sys_option_xls_ifuse_passwd = 1 then arg_obj_st.uo_const.pwd = trim(sys_option_xls_user_passwd) //默认加密密码 默认为随即密码
  369. boolean xls_locked
  370. xls_locked = not (sys_option_xls_lock = 1)
  371. /// Excel 的可选设置
  372. if arg_obj_st.of_setoption(arg_ationid, xls_locked,true,arg_msg) <> 1 then
  373. return 0
  374. end if
  375. for i = 1 to arg_str_billlist.count
  376. ////可选操作///
  377. arg_str_billlist.bill[i].ds_data = create datastore //
  378. arg_str_billlist.bill[i].ds_data.dataobject = arg_str_billlist.bill[i].datawindow //
  379. arg_str_billlist.bill[i].ds_data.settransobject(sqlca)
  380. //修改点:注意retrieve 参数与上文对应
  381. arg_str_billlist.bill[i].ds_data.retrieve(ll_scid,ll_id)
  382. next
  383. return 1
  384. end function
  385. on w_sc_abnormity.create
  386. int iCurrent
  387. call super::create
  388. this.ddlb_status=create ddlb_status
  389. this.st_2=create st_2
  390. this.em_dftdate=create em_dftdate
  391. this.sle_dftrelcode=create sle_dftrelcode
  392. this.st_3=create st_3
  393. this.st_4=create st_4
  394. this.cb_affirm=create cb_affirm
  395. this.cb_cancel_affirm=create cb_cancel_affirm
  396. iCurrent=UpperBound(this.Control)
  397. this.Control[iCurrent+1]=this.ddlb_status
  398. this.Control[iCurrent+2]=this.st_2
  399. this.Control[iCurrent+3]=this.em_dftdate
  400. this.Control[iCurrent+4]=this.sle_dftrelcode
  401. this.Control[iCurrent+5]=this.st_3
  402. this.Control[iCurrent+6]=this.st_4
  403. this.Control[iCurrent+7]=this.cb_affirm
  404. this.Control[iCurrent+8]=this.cb_cancel_affirm
  405. end on
  406. on w_sc_abnormity.destroy
  407. call super::destroy
  408. destroy(this.ddlb_status)
  409. destroy(this.st_2)
  410. destroy(this.em_dftdate)
  411. destroy(this.sle_dftrelcode)
  412. destroy(this.st_3)
  413. destroy(this.st_4)
  414. destroy(this.cb_affirm)
  415. destroy(this.cb_cancel_affirm)
  416. end on
  417. event retrieve_childdw;call super::retrieve_childdw;Long row,billid
  418. //dw_child.Reset()
  419. dw_child.SetFilter('')
  420. dw_child.Filter()
  421. row = dw_pageretr.GetRow()
  422. IF row > 0 THEN
  423. billid = dw_pageretr.Object.billid[row]
  424. dw_child.SetRedraw (False)
  425. dw_child.Retrieve(billid)
  426. dw_child.SetRedraw (True)
  427. ELSE
  428. dw_child.Reset()
  429. END IF
  430. end event
  431. event open;call super::open;uc_column_int=6 //uc dw前6列可以编辑
  432. child_column_int=7 //子dw前7列可以编辑
  433. uo_abnormity_dq =create uo_abnormity
  434. end event
  435. event ue_usual_query_retr;call super::ue_usual_query_retr;string ls_querystrpart=''
  436. ls_newselect=lower(ori_oldselect)
  437. if trim(sle_usual_query.text)<>'' then
  438. if pos(trim(sle_usual_query.text),'%')=0 then
  439. ls_querystrpart="(u_sc_taskwork.billcode like '%"+trim(sle_usual_query.text)+"%')"
  440. else
  441. ls_querystrpart="(u_sc_taskwork.billcode like '"+trim(sle_usual_query.text)+"')"
  442. end if
  443. if Pos(ls_newselect," where ") <> 0 then
  444. ls_newselect=ls_newselect+" AND ("+ls_querystrpart+')'
  445. else
  446. ls_newselect=ls_newselect+" where ("+ls_querystrpart+')'
  447. end if
  448. end if
  449. wf_retrieveuc(dw_pageretr,ls_newselect,1)
  450. this.triggerevent('retrieve_pageretr')
  451. end event
  452. event refresh_interface;call super::refresh_interface;ddlb_status.Enabled = NOT dw_edit_mode
  453. //IF sys_option_abnormity_price = 0 THEN
  454. // dw_child.Modify('wage.protect=1 ')
  455. //ELSE
  456. // dw_child.Modify('wage.protect=0 ')
  457. //END IF
  458. end event
  459. event close;call super::close;DESTROY uo_abnormity_dq
  460. wf_del_tempfilepathname()
  461. end event
  462. event retrieve_pageretr;
  463. Boolean cb_nextpage_enabled,cb_retrieveall_enabled
  464. Boolean cb_func_enabled,cb_retrieve_enabled
  465. cb_nextpage_enabled = cb_nextpage.Enabled
  466. cb_retrieveall_enabled = cb_retrieveall.Enabled
  467. cb_func_enabled = cb_func.Enabled
  468. cb_nextpage.Enabled = FALSE
  469. cb_retrieveall.Enabled = FALSE
  470. cb_func.Enabled = FALSE
  471. dw_uc.Retrieve() //dw_uc的dw改左select top 0 并肯不带参数
  472. dw_pageretr.Retrieve(cur_flag)
  473. IF dw_pageretr.RowCount() > 0 THEN
  474. dw_pageretr.SetRow(1)
  475. dw_pageretr.triggerevent(rowfocuschanged!)
  476. end if
  477. THIS.TriggerEvent('retrieve_childdw')
  478. cb_nextpage.Enabled = cb_nextpage_enabled
  479. cb_retrieveall.Enabled = cb_retrieveall_enabled
  480. cb_func.Enabled = cb_func_enabled
  481. end event
  482. event ue_f8;call super::ue_f8;if not dw_edit_mode then return
  483. long child_row,ins_mtrlid = 0
  484. s_empselect s_select
  485. string tmp_empcode
  486. child_row = dw_child.getrow()
  487. if child_row <= 0 then return
  488. choose case dw_child.getcolumnname()
  489. case 'empcode'
  490. tmp_empcode = trim(dw_child.object.empcode[dw_child.getrow()])
  491. if not isvalid(w_empinfo_choice) then
  492. openwithparm(w_empinfo_choice,tmp_empcode)
  493. s_select = message.powerobjectparm //接受返回结构
  494. if s_select.empid > 0 then
  495. dw_child.object.empid[dw_child.getrow()] = s_select.empid
  496. dw_child.object.empcode[dw_child.getrow()] = s_select.empcode
  497. dw_child.object.empname[dw_child.getrow()] = s_select.empname
  498. dw_child.setcolumn('u_sc_workprocedure_code')
  499. end if
  500. end if
  501. end choose
  502. dw_child.setfocus()
  503. end event
  504. event ue_addzy;call super::ue_addzy;IF dw_edit_mode THEN
  505. MessageBox('提示',"编辑状态下不可以使用!", Information!, OK! )
  506. return
  507. END IF
  508. if not f_power_ind(771) then
  509. messagebox('提示','你没有使用权限!', Information!, OK! )
  510. return
  511. end if
  512. string arg_msg=''
  513. string ls_str
  514. long uc_row
  515. s_inputbox s_sreu
  516. uc_row=dw_pageretr.getrow()
  517. if uc_row<=0 then
  518. messagebox('提示','请选定当前目标单据!', Information!, OK! )
  519. return
  520. end if
  521. s_sreu.title='请输入要补充到备注的内容'
  522. s_sreu.old_text=''
  523. openwithparm(w_inputbox,s_sreu)
  524. ls_str=message.stringparm
  525. if trim(ls_str)='' or isnull(ls_str) then return
  526. if uo_abnormity_dq.add_dscrp(dw_pageretr.object.billid[uc_row],ls_str,arg_msg)=0 then
  527. messagebox('error!',arg_msg)
  528. return
  529. else
  530. messagebox('提示','添加备注操作成功!', Information!, OK! )
  531. wf_refresh_curuc(dw_pageretr.object.billid[uc_row])
  532. end if
  533. end event
  534. event ue_f9;call super::ue_f9;//用于选择明细内容,被F8[默认]\dw_child.doubleclicked调用
  535. Long child_row
  536. Long ls_null
  537. IF NOT dw_edit_mode THEN RETURN
  538. child_row = dw_child.GetRow()
  539. s_edit_index_tran s_ch_tran
  540. s_ch_tran.if_retrieve_all = TRUE
  541. s_ch_tran.work_mode = 1
  542. s_ch_tran.arg_pkid = 0
  543. s_ch_tran.b_long = 0
  544. s_ch_tran.if_select_all = TRUE
  545. IF child_row > 0 THEN s_ch_tran.arg_string_code = dw_child.Object.u_sc_workprocedure_code[child_row]
  546. Long ls_j
  547. IF NOT IsValid(w_sc_workprocedure_response) THEN
  548. OpenWithParm(w_sc_workprocedure_response,s_ch_tran) //调用
  549. s_workprocedure S_INSCUST
  550. S_INSCUST = Message.PowerObjectParm //接受返回结构
  551. FOR ls_j = 1 TO UpperBound(S_INSCUST.wrkproid)
  552. IF S_INSCUST.wrkproid[ls_j] > 0 THEN //正常返回值则可以取以下值
  553. IF dw_child.Find('u_sc_abnormitymx_proid='+String(S_INSCUST.wrkproid[ls_j]),1,dw_child.RowCount()) = 0 THEN
  554. IF dw_child.GetRow() > 0 THEN
  555. IF dw_child.Object.u_sc_abnormitymx_proid[child_row] <> 0 THEN
  556. child_row = dw_child.InsertRow (0)
  557. ELSE
  558. child_row = dw_child.GetRow()
  559. END IF
  560. ELSE
  561. child_row = dw_child.InsertRow (0)
  562. END IF
  563. END IF
  564. dw_child.Object.u_sc_abnormitymx_proid[child_row] = S_INSCUST.wrkproid[ls_j]
  565. dw_child.Object.u_sc_workprocedure_code[child_row] = S_INSCUST.wrkprocode[ls_j]
  566. dw_child.Object.u_sc_workprocedure_name[child_row] = S_INSCUST.wrkproname[ls_j]
  567. dw_child.Object.u_sc_abnormitymx_workhour[child_row] = S_INSCUST.workhour[ls_j]
  568. dw_child.Object.wage[child_row] = S_INSCUST.workprice[ls_j]
  569. END IF
  570. NEXT
  571. dw_child.SetRow(child_row)
  572. dw_child.ScrollToRow(child_row)
  573. dw_child.SetFocus()
  574. IF UpperBound(S_INSCUST.wrkproid) > 0 THEN
  575. dw_child.SetColumn("amount")
  576. END IF
  577. END IF
  578. dw_child.SetRedraw(TRUE)
  579. dw_child.SetFocus()
  580. end event
  581. event ue_viewprint;call super::ue_viewprint;
  582. Long LS_ROW
  583. LS_ROW = dw_pageretr.GetRow()
  584. IF LS_ROW <= 0 THEN
  585. MessageBox('提示','没有打印目标单据!', Information!, OK! )
  586. RETURN
  587. END IF
  588. IF NOT f_power_ind(770) THEN
  589. MessageBox('提示','你没有使用权限!', Information!, OK! )
  590. RETURN
  591. END IF
  592. S_print_MSG LS_PRMSG
  593. IF ls_newname <> '' THEN
  594. LS_PRMSG.obj_dwNAME = ls_newname
  595. ELSE
  596. LS_PRMSG.obj_dwNAME = 'dw_rp_sc_abnormity_print'
  597. END IF
  598. IF LS_PRMSG.obj_dwNAME = '' THEN RETURN
  599. LS_PRMSG.TAG_TEXT = '计件单'
  600. LS_PRMSG.FILTER_STRING = ''
  601. LS_PRMSG.retr_pram_falg = 15
  602. LS_PRMSG.PAGECH_FLAG = 0
  603. LS_PRMSG.retr_scid = 0
  604. LS_PRMSG.retr_pramnmb = dw_pageretr.Object.billid[LS_ROW]
  605. LS_PRMSG.rowcnt = dw_child.RowCount()
  606. OpenWithParm(w_publ_preview,LS_PRMSG)
  607. //**更新打印次料
  608. string arg_msg
  609. printnum = message.doubleparm
  610. f_update_printnum('u_sc_abnormity',printnum,0,dw_pageretr.object.billid[LS_ROW],'','',arg_msg,true)
  611. end event
  612. event ue_print;call super::ue_print;IF dw_pageretr.RowCount() = 0 THEN
  613. MessageBox('提示','没有可打印的单据!', Information!, OK! )
  614. RETURN
  615. END IF
  616. IF NOT f_power_ind(770) THEN
  617. MessageBox('提示','你没有使用权限!', Information!, OK! )
  618. RETURN
  619. END IF
  620. uo_print_preview uo_print
  621. S_print_MSG LS_PRMSG
  622. IF MessageBox ("询问","是否确定要打印当前单据吗?",Question!,YesNo! ) = 2 THEN RETURN
  623. LS_PRMSG.retr_pram_falg = 15
  624. IF ls_newname <> '' THEN
  625. LS_PRMSG.obj_dwNAME = ls_newname
  626. ELSE
  627. LS_PRMSG.obj_dwNAME = 'dw_rp_sc_abnormity_print'
  628. END IF
  629. LS_PRMSG.TAG_TEXT = '计件单'
  630. LS_PRMSG.FILTER_STRING = ''
  631. LS_PRMSG.PAGECH_FLAG = 0
  632. LS_PRMSG.retr_scid = 0
  633. LS_PRMSG.retr_pramnmb = dw_pageretr.Object.billid[dw_pageretr.GetRow()]
  634. LS_PRMSG.rowcnt = dw_child.RowCount()
  635. uo_print.FACT_PRINT_MSG = LS_PRMSG
  636. String arg_msg
  637. IF uo_print.uof_print_begin(arg_msg) = 0 THEN
  638. MessageBox("提示",arg_msg, Information!, OK! )
  639. RETURN
  640. END IF
  641. uo_print.ds_print()
  642. //**更新打印次料
  643. f_update_printnum('u_sc_abnormity',1,0,dw_pageretr.object.billid[dw_pageretr.getrow()],'','',arg_msg,true)
  644. end event
  645. event ue_usual_query_filt;call super::ue_usual_query_filt;String obj_expr = ''
  646. IF Trim(sle_usual_query.Text) <> '' THEN
  647. IF Pos(Trim(sle_usual_query.Text),'%') = 0 THEN
  648. obj_expr = obj_expr+'( billcode like "%'+Trim(sle_usual_query.Text)+'%" )'
  649. ELSE
  650. obj_expr = obj_expr+'( billcode like "'+Trim(sle_usual_query.Text)+'" )'
  651. END IF
  652. END IF
  653. dw_pageretr.SetFilter(obj_expr)
  654. dw_pageretr.SetRedraw(False)
  655. dw_pageretr.Filter()
  656. IF dw_pageretr.RowCount() >= 1 THEN
  657. dw_pageretr.SelectRow(0,False)
  658. dw_pageretr.SelectRow(1,True)
  659. END IF
  660. dw_pageretr.SetRedraw(True)
  661. end event
  662. type cb_func from w_publ_1ton_share_detail`cb_func within w_sc_abnormity
  663. end type
  664. type cb_exit from w_publ_1ton_share_detail`cb_exit within w_sc_abnormity
  665. integer x = 2962
  666. end type
  667. type sle_usual_query from w_publ_1ton_share_detail`sle_usual_query within w_sc_abnormity
  668. integer x = 187
  669. integer y = 188
  670. integer width = 553
  671. end type
  672. type cb_retrieveall from w_publ_1ton_share_detail`cb_retrieveall within w_sc_abnormity
  673. integer x = 3529
  674. end type
  675. type em_pagerowno from w_publ_1ton_share_detail`em_pagerowno within w_sc_abnormity
  676. integer x = 3186
  677. integer y = 40
  678. integer width = 320
  679. end type
  680. type dw_pageretr from w_publ_1ton_share_detail`dw_pageretr within w_sc_abnormity
  681. integer x = 1746
  682. integer width = 2537
  683. integer height = 760
  684. string dataobject = "dw_sc_abnormity_index"
  685. end type
  686. event dw_pageretr::constructor;call super::constructor; titleclick_sort_use=true //单击标题排序功能开关
  687. RBUTTON_FILTER_USE=true //右键查询功能开关
  688. end event
  689. event dw_pageretr::rowfocuschanged;call super::rowfocuschanged;wf_check_billfj()
  690. end event
  691. type st_1 from w_publ_1ton_share_detail`st_1 within w_sc_abnormity
  692. integer x = 0
  693. integer y = 208
  694. end type
  695. type cb_nextpage from w_publ_1ton_share_detail`cb_nextpage within w_sc_abnormity
  696. integer x = 3680
  697. end type
  698. type dw_uc from w_publ_1ton_share_detail`dw_uc within w_sc_abnormity
  699. integer width = 1737
  700. integer height = 760
  701. string dataobject = "dw_sc_abnormity_edit"
  702. end type
  703. event dw_uc::dwnkey;parent.triggerevent('user_key')
  704. if key = KeyDownArrow! then return 1
  705. if dw_edit_mode then
  706. if dw_uc.GetColumnName ( )='dscrp' and key = KeyEnter! then
  707. dw_child.setfocus()
  708. dw_child.scrolltorow(1)
  709. dw_child.SetColumn ('empcode')
  710. return 1
  711. elseif dw_uc.GetColumnName ( )='u_sc_abnormity_bill_billcode' and key = KeyEnter! then
  712. this.SetColumn ('wageid')
  713. return 1
  714. else
  715. if key = KeyEnter! Then //
  716. keybd_event ( 9, 0, 0 , 0 ) // 按下tab
  717. keybd_event ( 9, 0, 2, 0 ) // 释放tab
  718. Return 1
  719. end If
  720. end if
  721. end if
  722. end event
  723. event dw_uc::doubleclicked;//
  724. end event
  725. type gb_2 from w_publ_1ton_share_detail`gb_2 within w_sc_abnormity
  726. end type
  727. type dw_child from w_publ_1ton_share_detail`dw_child within w_sc_abnormity
  728. integer y = 1056
  729. integer width = 4288
  730. integer height = 1204
  731. string title = "明细内容"
  732. string dataobject = "dw_sc_abnormitymx_edit"
  733. boolean controlmenu = true
  734. boolean minbox = true
  735. boolean maxbox = false
  736. boolean border = false
  737. boolean titleclick_sort_use = true
  738. end type
  739. event dw_child::dwnkey;call super::dwnkey;parent.triggerevent('user_key')
  740. if not dw_edit_mode then return 1
  741. long child_row
  742. string ls_empcode,ls_empname
  743. string ls_procode,ls_proname
  744. long ls_empid,ls_proid
  745. dec ld_workprice,ld_workhour
  746. if dw_edit_mode then
  747. if keydown(keydownarrow!) then
  748. if dw_child.getrow() = dw_child.rowcount() then
  749. parent.triggerevent("insert_childrow")
  750. end if
  751. else
  752. if (keydown(keyenter!) or keydown(keytab!)) and not keydown(keycontrol!) and not keydown(keyshift!) then
  753. if dw_child.getcolumnname( ) = 'empcode' then
  754. dw_child.accepttext()
  755. child_row = dw_child.getrow()
  756. ls_empcode = dw_child.object.empcode[child_row]
  757. select empid,empname into :ls_empid,:ls_empname
  758. from u_rs_empinfo
  759. where empcode = :ls_empcode;
  760. if sqlca.sqlcode <> 0 then
  761. parent.triggerevent('ue_f8')
  762. return 1
  763. end if
  764. dw_child.object.empid[child_row] = ls_empid
  765. dw_child.object.empname[child_row] = ls_empname
  766. if key = keyenter! then //
  767. keybd_event ( 9, 0, 0 , 0 ) // 按下tab
  768. keybd_event ( 9, 0, 2, 0 ) // 释放tab
  769. return 1
  770. end if
  771. elseif dw_child.getcolumnname( ) = 'u_sc_workprocedure_code' then
  772. dw_child.accepttext()
  773. child_row = dw_child.getrow()
  774. ls_procode = dw_child.object.u_sc_workprocedure_code[child_row]
  775. select proid,name,workprice,workhour
  776. into :ls_proid,:ls_proname,:ld_workprice,:ld_workhour
  777. from u_sc_workprocedure
  778. where code = :ls_procode;
  779. if sqlca.sqlcode <> 0 then
  780. parent.triggerevent('ue_f9')
  781. return 1
  782. end if
  783. dw_child.object.u_sc_abnormitymx_proid[child_row] = ls_proid
  784. dw_child.object.u_sc_workprocedure_name[child_row] = ls_proname
  785. dw_child.object.wage[child_row] = ld_workprice
  786. dw_child.object.u_sc_abnormitymx_workhour[child_row] = ld_workhour
  787. if key = keyenter! then //
  788. keybd_event ( 9, 0, 0 , 0 ) // 按下tab
  789. keybd_event ( 9, 0, 2, 0 ) // 释放tab
  790. return 1
  791. end if
  792. elseif dw_child.getcolumnname( ) = 'mxdscrp' and dw_child.getrow() = dw_child.rowcount() then
  793. parent.triggerevent("insert_childrow")
  794. return 1
  795. else
  796. if key = keyenter! then //
  797. keybd_event ( 9, 0, 0 , 0 ) // 按下tab
  798. keybd_event ( 9, 0, 2, 0 ) // 释放tab
  799. return 1
  800. end if
  801. end if
  802. end if
  803. end if
  804. end if
  805. end event
  806. event dw_child::doubleclicked;if dw_edit_mode and row > 0 then
  807. if dwo.name = 'empcode' then
  808. parent.triggerevent('ue_f8')
  809. elseif dwo.name = 'u_sc_workprocedure_code' then
  810. parent.triggerevent('ue_f9')
  811. end if
  812. end if
  813. end event
  814. event dw_child::constructor;call super::constructor;this.object.wage.protect = string(sys_option_taskwork_mod_price)
  815. end event
  816. type cb_viewprint from w_publ_1ton_share_detail`cb_viewprint within w_sc_abnormity
  817. integer x = 2318
  818. end type
  819. type cb_print from w_publ_1ton_share_detail`cb_print within w_sc_abnormity
  820. integer x = 2126
  821. end type
  822. type cb_add from w_publ_1ton_share_detail`cb_add within w_sc_abnormity
  823. end type
  824. event cb_add::clicked;IF Not f_power_ind(199) THEN
  825. MessageBox('提示','你没有使用权限!', Information!, OK! )
  826. RETURN
  827. END IF
  828. String arg_msg = ''
  829. Long uc_row,i
  830. IF dw_edit_mode THEN
  831. dw_child.SetFilter('')
  832. dw_child.Filter()
  833. dw_uc.AcceptText()
  834. dw_child.AcceptText()
  835. uc_row = dw_uc.GetRow()
  836. IF uc_row <= 0 THEN
  837. MessageBox('提示','请选定当前目标单据!', Information!, OK! )
  838. RETURN
  839. END IF
  840. IF Not dw_uc.Object.billdate[uc_row] > DateTime(2000-01-01,Now()) THEN
  841. MessageBox('提示','不合理计件日期', Information!, OK! )
  842. RETURN
  843. END IF
  844. uo_abnormity_dq.wageid = dw_uc.Object.wageid[uc_row]
  845. uo_abnormity_dq.dscrp = dw_uc.Object.dscrp[uc_row]
  846. uo_abnormity_dq.relcode = dw_uc.Object.relcode[uc_row]
  847. uo_abnormity_dq.billdate = dw_uc.Object.billdate[uc_row]
  848. uo_abnormity_dq.relid = dw_uc.Object.u_sc_abnormity_relid[uc_row]
  849. FOR i = 1 To dw_child.RowCount()
  850. IF dw_child.Object.empid[i] > 0 THEN
  851. IF uo_abnormity_dq.acceptmx(dw_child.Object.empid[i],&
  852. dw_child.Object.empcode[i],&
  853. dw_child.Object.empname[i],&
  854. dw_child.Object.amount[i],&
  855. dw_child.Object.wage[i],&
  856. dw_child.Object.mxdscrp[i],&
  857. arg_msg,&
  858. dw_child.Object.pid[i],&
  859. dw_child.Object.relcode[i],&
  860. dw_child.Object.u_sc_abnormitymx_proid[i],&
  861. dw_child.Object.u_sc_workprocedure_code[i],&
  862. dw_child.Object.u_sc_workprocedure_name[i],&
  863. dw_child.Object.u_sc_abnormitymx_workhour[i]) = 0 THEN
  864. MessageBox('错误',arg_msg, StopSign!, OK! )
  865. RETURN
  866. END IF
  867. END IF
  868. NEXT
  869. IF uo_abnormity_dq.Save(arg_msg,True) = 0 THEN
  870. MessageBox('错误',arg_msg, StopSign!, OK! )
  871. RETURN
  872. END IF
  873. // messagebox('提示','保存操作成功!')
  874. //write ini
  875. f_SetProfileString (sys_empid,dw_uc.DataObject, "ddlb_wageid",String(dw_uc.Object.wageid[dw_uc.GetRow()]))
  876. //
  877. Long ll_row
  878. ll_row = dw_pageretr.GetRow()
  879. dw_pageretr.SelectRow(0,False)
  880. dw_pageretr.SelectRow(ll_row,True)
  881. wf_refresh_curuc(uo_abnormity_dq.billid)
  882. ELSE
  883. IF uo_abnormity_dq.newbegin(arg_msg) = 0 THEN
  884. MessageBox('错误',arg_msg, StopSign!, OK! )
  885. RETURN
  886. END IF
  887. END IF
  888. CALL Super::Clicked
  889. IF dw_edit_mode THEN
  890. //read ini
  891. String ls_wageid
  892. ls_wageid = f_ProfileString (sys_empid,dw_uc.DataObject, "ddlb_wageid",'0')
  893. dw_uc.Object.wageid[dw_uc.GetRow()] = Long(ls_wageid)
  894. dw_uc.Object.billdate[dw_uc.GetRow()] = DateTime(Date(em_dftdate.Text),Time(0))
  895. dw_uc.SetColumn('wageid')
  896. //
  897. Parent.TriggerEvent("insert_childrow")
  898. ELSE
  899. Parent.TriggerEvent("retrieve_childdw")
  900. END IF
  901. This.TriggerEvent('refresh_interface')
  902. end event
  903. type cb_edit from w_publ_1ton_share_detail`cb_edit within w_sc_abnormity
  904. end type
  905. event cb_edit::clicked;if not f_power_ind(199) then
  906. messagebox('提示','你没有使用权限!', Information!, OK! )
  907. return
  908. end if
  909. string arg_msg=''
  910. long uc_row
  911. uc_row=dw_pageretr.getrow()
  912. if uc_row<=0 then
  913. messagebox('提示','请选定当前目标单据!', Information!, OK! )
  914. return
  915. end if
  916. if not dw_edit_mode then
  917. if uo_abnormity_dq.updatebegin(dw_pageretr.object.billid[uc_row],arg_msg)=0 then
  918. messagebox('错误',arg_msg, StopSign!, OK! )
  919. return
  920. end if
  921. end if
  922. call super::clicked
  923. end event
  924. type cb_delet from w_publ_1ton_share_detail`cb_delet within w_sc_abnormity
  925. end type
  926. event cb_delet::clicked;call super::clicked;if not f_power_ind(626) then
  927. messagebox('提示','你没有使用权限!', Information!, OK! )
  928. return
  929. end if
  930. if dw_edit_mode then return
  931. string arg_msg=''
  932. long uc_row
  933. uc_row=dw_pageretr.getrow()
  934. if uc_row<=0 then
  935. messagebox('提示','请选定当前目标单据!', Information!, OK! )
  936. return
  937. end if
  938. IF MessageBox ("询问","是否确定要删除当前单据吗?",Question!,YesNo! ) = 2 THEN RETURN
  939. if uo_abnormity_dq.del(dw_pageretr.object.billid[uc_row],arg_msg)=0 then
  940. messagebox('错误',arg_msg, StopSign!, OK! )
  941. ELSE
  942. //日志
  943. long ls_id
  944. string ls_code
  945. ls_id=dw_pageretr.object.billid[uc_row]
  946. ls_code=dw_pageretr.object.billcode[uc_row]
  947. f_setsysoplog('异常计件单','删除,id:'+string(ls_id)+',code:'+ls_code,arg_msg,true)
  948. //--
  949. MESSAGEBOX('提示','删除单据'+string(dw_pageretr.object.billcode[uc_row])+'成功!')
  950. dw_pageretr.deleterow(uc_row)
  951. dw_pageretr.postevent(rowfocuschanged!)
  952. end if
  953. end event
  954. type cb_addzy from w_publ_1ton_share_detail`cb_addzy within w_sc_abnormity
  955. integer x = 1623
  956. end type
  957. event cb_addzy::clicked;call super::clicked;m_Dfc_Control_PopupMenu dmPopupMenu
  958. string menustr
  959. menustr="Text=增加备注~tEvent=ue_addzy"
  960. menustr = menustr + "|" + "Text=-"
  961. menustr = menustr + "|" + "Text=复制单据~tEvent=ue_bill_copy"
  962. menustr = menustr + "|" + "Text=粘贴单据~tEvent=ue_bill_paste"
  963. menustr = menustr + "|" + "Text=-"
  964. menustr = menustr + "|" + "Text=查看附件~tEvent=ue_fj_view"
  965. menustr = menustr + "|" + "Text=添加附件~tEvent=ue_fj_edit"
  966. if len(trim(menustr))<>0 then
  967. dmPopupMenu = Create m_Dfc_Control_PopupMenu
  968. dmPopupMenu.mf_BuildMenu(This, menustr)
  969. dmPopupMenu.mf_PopMenu()
  970. Destroy dmPopupMenu
  971. end if
  972. end event
  973. type cb_auditing from w_publ_1ton_share_detail`cb_auditing within w_sc_abnormity
  974. end type
  975. event cb_auditing::clicked;call super::clicked;IF Not f_power_ind(200) THEN
  976. MessageBox('提示','你没有使用权限!', Information!, OK! )
  977. RETURN
  978. END IF
  979. s_taskwork_abnormity_audit s_audit
  980. OpenWithParm(w_sc_abnormity_audit,1)
  981. s_audit = Message.PowerObjectParm
  982. IF s_audit.audit_month = 0 THEN RETURN
  983. String arg_msg
  984. IF uo_abnormity_dq.auditing(s_audit.audit_wageid,s_audit.audit_month,s_audit.audit_enddate,arg_msg,True) = 0 THEN
  985. MessageBox('提示','个人工序计件单审核失败,原因>>'+arg_msg)
  986. RETURN
  987. END IF
  988. MessageBox('提示','个人工序计件单审核成功', Information!, OK! )
  989. Parent.TriggerEvent('retrieve_pageretr')
  990. end event
  991. type cb_xm from w_publ_1ton_share_detail`cb_xm within w_sc_abnormity
  992. integer x = 1874
  993. end type
  994. type cb_retrieve from w_publ_1ton_share_detail`cb_retrieve within w_sc_abnormity
  995. end type
  996. type cb_xls from w_publ_1ton_share_detail`cb_xls within w_sc_abnormity
  997. integer x = 2510
  998. end type
  999. type cb_help from w_publ_1ton_share_detail`cb_help within w_sc_abnormity
  1000. integer x = 2811
  1001. end type
  1002. type cb_auditing_cancel from w_publ_1ton_share_detail`cb_auditing_cancel within w_sc_abnormity
  1003. end type
  1004. event cb_auditing_cancel::clicked;call super::clicked;IF NOT f_power_ind(903) THEN
  1005. MessageBox('提示','你没有使用权限!', Information!, OK! )
  1006. RETURN
  1007. END IF
  1008. s_taskwork_abnormity_audit s_audit
  1009. OpenWithParm(w_sc_abnormity_audit,0)
  1010. s_audit = Message.PowerObjectParm
  1011. IF s_audit.audit_month = 0 THEN RETURN
  1012. String arg_msg
  1013. IF uo_abnormity_dq.c_auditing(s_audit.audit_wageid,s_audit.audit_month,arg_msg,TRUE) = 0 THEN
  1014. MessageBox('提示','个人工序计件单撤审失败,原因>>'+arg_msg, Information!, OK! )
  1015. RETURN
  1016. END IF
  1017. //日志
  1018. String ls_code
  1019. ls_code = string(s_audit.audit_month)
  1020. f_setsysoplog('个人工序计件单','撤审,月份:'+ls_code,arg_msg,TRUE)
  1021. //--
  1022. MessageBox('提示','个人工序计件单撤审成功', Information!, OK! )
  1023. PARENT.TriggerEvent('retrieve_pageretr')
  1024. end event
  1025. type p_msg from w_publ_1ton_share_detail`p_msg within w_sc_abnormity
  1026. integer x = 3845
  1027. end type
  1028. type p_help from w_publ_1ton_share_detail`p_help within w_sc_abnormity
  1029. integer x = 4037
  1030. end type
  1031. type p_encl from w_publ_1ton_share_detail`p_encl within w_sc_abnormity
  1032. integer x = 3941
  1033. end type
  1034. type p_other from w_publ_1ton_share_detail`p_other within w_sc_abnormity
  1035. integer x = 4133
  1036. end type
  1037. type gb_3 from w_publ_1ton_share_detail`gb_3 within w_sc_abnormity
  1038. end type
  1039. type ln_bar from w_publ_1ton_share_detail`ln_bar within w_sc_abnormity
  1040. end type
  1041. type ln_bar2 from w_publ_1ton_share_detail`ln_bar2 within w_sc_abnormity
  1042. end type
  1043. type r_bar from w_publ_1ton_share_detail`r_bar within w_sc_abnormity
  1044. integer x = 3794
  1045. integer y = 8
  1046. end type
  1047. type ln_1 from w_publ_1ton_share_detail`ln_1 within w_sc_abnormity
  1048. end type
  1049. type ln_2 from w_publ_1ton_share_detail`ln_2 within w_sc_abnormity
  1050. end type
  1051. type ddlb_status from dropdownlistbox within w_sc_abnormity
  1052. integer x = 2331
  1053. integer y = 188
  1054. integer width = 553
  1055. integer height = 300
  1056. integer taborder = 20
  1057. boolean bringtotop = true
  1058. integer textsize = -9
  1059. integer weight = 400
  1060. fontcharset fontcharset = gb2312charset!
  1061. fontpitch fontpitch = variable!
  1062. string facename = "宋体"
  1063. long textcolor = 33554432
  1064. string text = "[全部]"
  1065. boolean sorted = false
  1066. string item[] = {"[全部]","待审核","已审核"}
  1067. borderstyle borderstyle = stylelowered!
  1068. end type
  1069. event selectionchanged;if index=1 then
  1070. cur_flag=-1
  1071. elseif index=2 then
  1072. cur_flag=0
  1073. elseif index=3 then
  1074. cur_flag=1
  1075. end if
  1076. parent.triggerevent('retrieve_pageretr')
  1077. end event
  1078. type st_2 from statictext within w_sc_abnormity
  1079. integer x = 2144
  1080. integer y = 208
  1081. integer width = 219
  1082. integer height = 48
  1083. integer textsize = -9
  1084. integer weight = 400
  1085. fontcharset fontcharset = gb2312charset!
  1086. fontpitch fontpitch = variable!
  1087. string facename = "宋体"
  1088. long textcolor = 33554432
  1089. long backcolor = 134217739
  1090. string text = "状 态"
  1091. boolean focusrectangle = false
  1092. end type
  1093. type em_dftdate from editmask within w_sc_abnormity
  1094. integer x = 1723
  1095. integer y = 184
  1096. integer width = 389
  1097. integer height = 92
  1098. integer taborder = 40
  1099. boolean bringtotop = true
  1100. integer textsize = -9
  1101. integer weight = 400
  1102. fontcharset fontcharset = gb2312charset!
  1103. fontpitch fontpitch = variable!
  1104. string facename = "宋体"
  1105. long textcolor = 33554432
  1106. string text = "none"
  1107. borderstyle borderstyle = stylelowered!
  1108. maskdatatype maskdatatype = datemask!
  1109. string mask = "yyyy-mm-dd"
  1110. boolean spin = true
  1111. end type
  1112. event constructor;this.text = string(today(),'yyyy-mm-dd')
  1113. end event
  1114. type sle_dftrelcode from singlelineedit within w_sc_abnormity
  1115. integer x = 1088
  1116. integer y = 184
  1117. integer width = 320
  1118. integer height = 92
  1119. integer taborder = 40
  1120. boolean bringtotop = true
  1121. integer textsize = -9
  1122. integer weight = 400
  1123. fontcharset fontcharset = gb2312charset!
  1124. fontpitch fontpitch = variable!
  1125. string facename = "宋体"
  1126. long textcolor = 33554432
  1127. borderstyle borderstyle = stylelowered!
  1128. end type
  1129. type st_3 from statictext within w_sc_abnormity
  1130. integer x = 1440
  1131. integer y = 204
  1132. integer width = 265
  1133. integer height = 48
  1134. boolean bringtotop = true
  1135. integer textsize = -9
  1136. integer weight = 400
  1137. fontcharset fontcharset = gb2312charset!
  1138. fontpitch fontpitch = variable!
  1139. string facename = "宋体"
  1140. long textcolor = 33554432
  1141. long backcolor = 134217739
  1142. string text = "默认日期"
  1143. alignment alignment = right!
  1144. boolean focusrectangle = false
  1145. end type
  1146. type st_4 from statictext within w_sc_abnormity
  1147. integer x = 759
  1148. integer y = 204
  1149. integer width = 315
  1150. integer height = 48
  1151. boolean bringtotop = true
  1152. integer textsize = -9
  1153. integer weight = 400
  1154. fontcharset fontcharset = gb2312charset!
  1155. fontpitch fontpitch = variable!
  1156. string facename = "宋体"
  1157. long textcolor = 33554432
  1158. long backcolor = 134217739
  1159. string text = "默认相关号"
  1160. alignment alignment = right!
  1161. boolean focusrectangle = false
  1162. end type
  1163. type cb_affirm from uo_imflatbutton within w_sc_abnormity
  1164. integer x = 1184
  1165. integer width = 197
  1166. integer height = 164
  1167. integer taborder = 30
  1168. boolean bringtotop = true
  1169. string text = "确认&C"
  1170. string normalpicname = "audit.bmp"
  1171. integer picsize = 16
  1172. toolbaralignment pic_align = alignattop!
  1173. boolean border = false
  1174. end type
  1175. event clicked;call super::clicked;
  1176. IF Not f_power_ind(200) THEN
  1177. MessageBox('提示','你没有使用权限!', Information!, OK! )
  1178. RETURN
  1179. END IF
  1180. IF dw_edit_mode THEN RETURN
  1181. String arg_msg
  1182. Long pagerert_row
  1183. pagerert_row = dw_pageretr.GetRow()
  1184. IF pagerert_row <= 0 THEN
  1185. MessageBox('提示','请选定当前目标单据!')
  1186. RETURN
  1187. END IF
  1188. IF MessageBox ("if","是否确定要确认当前单据?",question!,yesno! ) = 2 THEN RETURN
  1189. IF uo_abnormity_dq.secauditing (dw_pageretr.Object.billid[pagerert_row],arg_msg,TRUE) = 0 THEN
  1190. MessageBox('个人工序计件单确认失败,原因>>',arg_msg)
  1191. RETURN
  1192. ELSE
  1193. MessageBox('提示','个人工序计件单确认成功', Information!, OK! )
  1194. END IF
  1195. Parent.TriggerEvent('retrieve_pageretr')
  1196. end event
  1197. type cb_cancel_affirm from uo_imflatbutton within w_sc_abnormity
  1198. integer x = 1381
  1199. integer width = 242
  1200. integer height = 164
  1201. integer taborder = 230
  1202. boolean bringtotop = true
  1203. string text = "反确认"
  1204. string normalpicname = "caudit.bmp"
  1205. integer picsize = 16
  1206. toolbaralignment pic_align = alignattop!
  1207. end type
  1208. event clicked;call super::clicked;
  1209. IF Not f_power_ind(903) THEN
  1210. MessageBox('提示','你没有使用权限!', Information!, OK! )
  1211. RETURN
  1212. END IF
  1213. IF dw_edit_mode THEN RETURN
  1214. String arg_msg
  1215. Long pagerert_row
  1216. pagerert_row = dw_pageretr.GetRow()
  1217. IF pagerert_row <= 0 THEN
  1218. MessageBox('提示','请选定当前目标单据!')
  1219. RETURN
  1220. END IF
  1221. IF MessageBox ("if","是否确定要反确认当前单据?",question!,yesno! ) = 2 THEN RETURN
  1222. IF uo_abnormity_dq.c_secauditing (dw_pageretr.Object.billid[pagerert_row],arg_msg,TRUE) = 0 THEN
  1223. MessageBox('个人工序计件单反确认失败,原因>>',arg_msg)
  1224. RETURN
  1225. ELSE
  1226. MessageBox('提示','个人工序计件单反确认成功', Information!, OK! )
  1227. END IF
  1228. Parent.TriggerEvent('retrieve_pageretr')
  1229. end event