1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141 |
- $PBExportHeader$w_quote_record.srw
- forward
- global type w_quote_record from w_publ_1ton_share_detail
- end type
- type ddlb_scid from uo_ddlb_scid within w_quote_record
- end type
- type ddlb_status from dropdownlistbox within w_quote_record
- end type
- type st_2 from statictext within w_quote_record
- end type
- type st_3 from statictext within w_quote_record
- end type
- type st_4 from statictext within w_quote_record
- end type
- type ddlb_ch from dropdownlistbox within w_quote_record
- end type
- end forward
- global type w_quote_record from w_publ_1ton_share_detail
- string title = "销售报价记录单"
- boolean maxbox = true
- windowstate windowstate = maximized!
- event insert_childrow ( )
- event ue_reccl ( )
- event ue_viewmx ( )
- event ue_mx_audit ( )
- event ue_mx_audit_cancel ( )
- event ue_configcodemx_view ( )
- event ue_cmp_suliao ( )
- event ue_importseleprice ( )
- event ue_importseleprice_cust ( )
- event ue_p_price_com ( )
- event ue_p_cus_price_com ( )
- event ue_p_price ( )
- event ue_p_cus_price ( )
- event ue_cmpl_modle ( )
- event ue_p_status ( )
- event ue_p_woodcode ( )
- event ue_p_pcode ( )
- event ue_mx_stop_cancel ( )
- event ue_mx_stop ( )
- event ue_send_ljfieb ( )
- event ue_jdview_ljfieb ( )
- event ue_mtrl_info ( )
- event ue_retrieve_info ( )
- event ue_dscrp_text ( )
- ddlb_scid ddlb_scid
- ddlb_status ddlb_status
- st_2 st_2
- st_3 st_3
- st_4 st_4
- ddlb_ch ddlb_ch
- end type
- global w_quote_record w_quote_record
- type variables
- long cur_scid =0 //分店ID
- Long cur_scid_arr[]
- long cur_flag= -1 //-1:全部,0未审,1已审核
- int cur_editfocus=0 //1:新建2:修改
- uo_quote uo_quote_mtrl
- uo_ljfieb uo_fieb
- long ins_if_info = 0
- long ins_printid[]
- string ins_dscrp_mx[]
- long it_mxbt = 0
- end variables
- forward prototypes
- public function integer wf_refresh_curuc (long arg_scid, long arg_quoteid)
- public subroutine wf_getrprice (long arg_mrlid, ref decimal arg_newprice)
- 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)
- public function integer wf_flagstatus_rf ()
- public subroutine wf_autoaddmx (long arg_mtrlid[], decimal arg_price[], string arg_status[], string arg_woodcode[], string arg_pcode[], decimal arg_rebate[])
- public subroutine wf_change_dscrp_addrow (long arg_row)
- public subroutine wf_change_dscrp_delrow (long arg_row)
- end prototypes
- event insert_childrow();long li_row
- li_row=dw_child.insertrow(0)
- dw_child.scrolltorow(li_row)
- dw_child.SetColumn ('u_quotemx_mtrlcode')
- end event
- event ue_reccl();IF NOT f_power_ind(3815,sys_msg_pow) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
- IF dw_edit_mode THEN
- MessageBox('提示','单据编辑状态下不可用')
- RETURN
- END IF
- Long ll_mx_row
- Int li_flag
- dw_child.AcceptText()
- ll_mx_row = dw_child.GetRow()
- IF ll_mx_row <= 0 THEN
- MessageBox('提示','请选择报价单明细物料')
- RETURN
- END IF
- li_flag = dw_child.Object.u_quotemx_flag[ll_mx_row]
- IF li_flag = 1 THEN
- MessageBox('提示','报价单明细已审核不能修改')
- RETURN
- END IF
- s_quotemx_open s_mx
- s_mx.scid = dw_child.Object.u_quotemx_scid[ll_mx_row]
- s_mx.quoteid = dw_child.Object.u_quotemx_quoteid[ll_mx_row]
- s_mx.printid = dw_child.Object.u_quotemx_printid[ll_mx_row]
- s_mx.mode = 0
- IF f_power_ind(703,sys_msg_pow) and NOT sys_power_issuper THEN
- OpenWithParm(w_quoterqmtrl_noprice,s_mx)
- ELSE
- OpenWithParm(w_quoterqmtrl,s_mx)
- END IF
- THIS.TriggerEvent("retrieve_childdw")
- end event
- event ue_viewmx();IF NOT f_power_ind(3815,sys_msg_pow) THEN
- MessageBox('提示',sys_msg_pow)
- RETURN
- END IF
- IF dw_edit_mode THEN
- MessageBox('提示','单据编辑状态下不可用')
- RETURN
- END IF
- Long ll_mx_row
- dw_child.AcceptText()
- ll_mx_row = dw_child.GetRow()
- IF ll_mx_row <= 0 THEN
- MessageBox('提示','请选择报价单明细物料')
- RETURN
- END IF
- s_quotemx_open s_mx
- s_mx.scid = dw_child.Object.u_quotemx_scid[ll_mx_row]
- s_mx.quoteid = dw_child.Object.u_quotemx_quoteid[ll_mx_row]
- s_mx.printid = dw_child.Object.u_quotemx_printid[ll_mx_row]
- s_mx.mode = 1
- IF f_power_ind(703,sys_msg_pow) and NOT sys_power_issuper THEN
- OpenWithParm(w_quoterqmtrl_noprice,s_mx)
- ELSE
- OpenWithParm(w_quoterqmtrl,s_mx)
- END IF
- THIS.TriggerEvent("retrieve_childdw")
- end event
- event ue_mx_audit();IF Not f_power_ind(1683,sys_msg_pow) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
- IF dw_edit_mode THEN
- MessageBox('提示','单据编辑状态下不可用')
- RETURN
- END IF
- Long ll_mx_row,i,ll_rst
- Long ll_scid,ll_printid,ll_quoteid
- String arg_msg
- dw_child.AcceptText()
- Open(w_quote_mxdo)
- ll_rst = Message.DoubleParm
- IF ll_rst = 0 THEN
- RETURN
- ELSEIF ll_rst = 1 THEN
- ll_mx_row = dw_child.GetRow()
- IF ll_mx_row <= 0 THEN
- MessageBox('提示','请选择报价单明细物料')
- RETURN
- END IF
-
- ll_scid = dw_child.Object.u_quotemx_scid[ll_mx_row]
- ll_quoteid = dw_child.Object.u_quotemx_quoteid[ll_mx_row]
- ll_printid = dw_child.Object.u_quotemx_printid[ll_mx_row]
-
- IF uo_quote_mtrl.uof_audit_mx(ll_scid,ll_quoteid,ll_printid,1,publ_operator,arg_msg,True) = 0 THEN
- MessageBox('提示','审核报价单明细失败,'+arg_msg)
- RETURN
- END IF
- ELSEIF ll_rst = 2 THEN
- FOR i = 1 To dw_child.RowCount()
- IF dw_child.Object.u_quotemx_flag[i] = 1 THEN CONTINUE
- ll_scid = dw_child.Object.u_quotemx_scid[i]
- ll_quoteid = dw_child.Object.u_quotemx_quoteid[i]
- ll_printid = dw_child.Object.u_quotemx_printid[i]
-
- IF uo_quote_mtrl.uof_audit_mx(ll_scid,ll_quoteid,ll_printid,1,publ_operator,arg_msg,False) = 0 THEN
- MessageBox('提示','行:'+String(i)+',审核报价单明细失败,'+arg_msg)
- RETURN
- END IF
- NEXT
- COMMIT;
- END IF
- This.TriggerEvent("retrieve_childdw")
- end event
- event ue_mx_audit_cancel();IF Not f_power_ind(1684,sys_msg_pow) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
- IF dw_edit_mode THEN
- MessageBox('提示','单据编辑状态下不可用')
- RETURN
- END IF
- Long ll_mx_row,i,ll_rst
- Long ll_scid,ll_printid,ll_quoteid
- String arg_msg
- dw_child.AcceptText()
- Open(w_quote_mxdo)
- ll_rst = Message.DoubleParm
- IF ll_rst = 0 THEN
- RETURN
- ELSEIF ll_rst = 1 THEN
- ll_mx_row = dw_child.GetRow()
- IF ll_mx_row <= 0 THEN
- MessageBox('提示','请选择报价单明细物料')
- RETURN
- END IF
-
- ll_scid = dw_child.Object.u_quotemx_scid[ll_mx_row]
- ll_quoteid = dw_child.Object.u_quotemx_quoteid[ll_mx_row]
- ll_printid = dw_child.Object.u_quotemx_printid[ll_mx_row]
-
- IF uo_quote_mtrl.uof_audit_mx(ll_scid,ll_quoteid,ll_printid,0,publ_operator,arg_msg,True) = 0 THEN
- MessageBox('提示','撤审报价单明细失败,'+arg_msg)
- RETURN
- END IF
- ELSEIF ll_rst = 2 THEN
- FOR i = 1 To dw_child.RowCount()
- IF dw_child.Object.u_quotemx_flag[i] = 0 THEN CONTINUE
- ll_scid = dw_child.Object.u_quotemx_scid[i]
- ll_quoteid = dw_child.Object.u_quotemx_quoteid[i]
- ll_printid = dw_child.Object.u_quotemx_printid[i]
-
- IF uo_quote_mtrl.uof_audit_mx(ll_scid,ll_quoteid,ll_printid,0,publ_operator,arg_msg,False) = 0 THEN
- MessageBox('提示','行:'+String(i)+',撤审报价单明细失败,'+arg_msg)
- RETURN
- END IF
- NEXT
- COMMIT;
- END IF
- This.TriggerEvent("retrieve_childdw")
- end event
- event ue_configcodemx_view();
- String arg_msg = ''
- Long childrow,uc_row
- uc_row = dw_pageretr.GetRow()
- IF uc_row <= 0 THEN
- MessageBox('系统提示','请选定当前目标订单!')
- RETURN
- END IF
- childrow = dw_child.GetRow()
- IF childrow <= 0 THEN
- MessageBox('系统提示','请选定当前明细物料!')
- RETURN
- END IF
- Long ll_mtrlid
- Long li_flag_status,ll_statustype
- String ls_mtrlcode,ls_status
- Long ll_configcodetype
- String ls_configcode
- s_pzwin_open arg_s_open
- ll_mtrlid = dw_child.Object.u_quotemx_mtrlid[childrow]
- ls_status = dw_child.Object.u_quotemx_status[childrow]
- SELECT statusflag,statustype,configcodetype,configcode
- INTO :li_flag_status,:ll_statustype,:ll_configcodetype,:ls_configcode
- FROM u_mtrldef
- Where mtrlid = :ll_mtrlid;
- IF sqlca.SQLCode <> 0 THEN
- MessageBox('系统提示','查询当前明细物料配置属性失败!')
- RETURN
- END IF
- IF li_flag_status = 4 THEN
- arg_s_open.arg_mtrlid = ll_statustype
- arg_s_open.arg_col_value = ls_status
- arg_s_open.arg_editmode = FALSE
- OpenWithParm(w_configure_pzmx_ch,arg_s_open)
- ELSE
- IF ll_configcodetype > 0 THEN
- arg_s_open.arg_mtrlid = ll_configcodetype
- arg_s_open.arg_col_value = ls_configcode
- arg_s_open.arg_editmode = FALSE
- OpenWithParm(w_configure_pzmx_ch,arg_s_open)
- ELSE
- MessageBox('系统提示','当前明细物料没有设置部件选配资料!')
- RETURN
- END IF
- END IF
- end event
- event ue_cmp_suliao();IF NOT f_power_ind(3815,sys_msg_pow) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
- IF dw_edit_mode THEN
- MessageBox('提示','单据编辑状态下不可用')
- RETURN
- END IF
- Long ll_mx_row
- Int li_flag
- dw_child.AcceptText()
- ll_mx_row = dw_child.GetRow()
- IF ll_mx_row <= 0 THEN
- MessageBox('提示','请选择报价单明细物料')
- RETURN
- END IF
- li_flag = dw_child.Object.u_quotemx_flag[ll_mx_row]
- IF li_flag = 1 THEN
- MessageBox('提示','报价单明细已审核不能修改')
- RETURN
- END IF
- //s_quotesuliao s_mx
- //s_mx.scid = dw_child.Object.u_quotemx_scid[ll_mx_row]
- //s_mx.quoteid = dw_child.Object.u_quotemx_quoteid[ll_mx_row]
- //s_mx.printid = dw_child.Object.u_quotemx_printid[ll_mx_row]
- //s_mx.mode = 0
- //
- //OpenWithParm(w_quote_account,s_mx)
- //
- //THIS.TriggerEvent("retrieve_childdw")
- end event
- event ue_importseleprice();IF NOT dw_edit_mode THEN
- MessageBox('系统提示',"非编辑状态下不可以使用!")
- RETURN
- END IF
- Long ls_row,ls_mtrlid
- String ls_status,ls_pcode,ls_woodcode
- Decimal obj_price,obj_rebate
- String err_str = ''
- s_pricelist_ch s_pricelist
- String arg_msg
- s_mtrlcfg_expr s_pz[]
- Long ll_i
- String ls_status_zj
- Decimal ld_price_zj,ld_rebate_zj
- Long ll_moneyid
- Long uc_row
- Int li_ifpackpro
- String ls_pf_status[],ls_pf_woodcode[],ls_pf_pcode[]
- Int li_ifover[],li_dipztype[]
- Decimal ld_Sonscale[]
- Long ll_SonMtrlid[]
- Long it_mxt = 1
- String ls_status_find,ls_woodcode_find,ls_pcode_find
- Long ll_j,ls_cusid,ls_pricelistid
- Int li_ifpricepack
- uc_row = dw_uc.GetRow()
- IF uc_row <= 0 THEN
- MessageBox('系统提示','请选定单据')
- RETURN
- END IF
- IF dw_uc.Object.u_quote_cusid[uc_row] = 0 OR IsNull(dw_uc.Object.u_quote_cusid[uc_row]) THEN
- MessageBox('系统提示',"请选择销售客户!")
- RETURN
- END IF
- ls_cusid = dw_uc.Object.u_quote_cusid[uc_row]
- SELECT u_cust.pricelistid
- INTO :ls_pricelistid
- FROM u_cust
- Where u_cust.cusid = :ls_cusid;
- IF sqlca.SQLCode <> 0 THEN ls_pricelistid = 0
- IF ls_pricelistid > 0 THEN
- MessageBox(publ_operator,'客户已有对应的价格表,不能导入其它价格表,操作取消')
- RETURN
- END IF
- IF MessageBox (publ_operator,"是否直接选择价格表?",Question!,YesNo! ) = 2 THEN RETURN
- OpenWithParm(w_sale_price_list_ch,-1)
- s_pricelist = Message.PowerObjectParm
- IF s_pricelist.pricelistid <= 0 THEN RETURN
- FOR ls_row = 1 TO dw_child.RowCount()
- ls_mtrlid = dw_child.Object.u_quotemx_mtrlid[ls_row]
- ls_status = dw_child.Object.u_quotemx_status[ls_row]
- ls_pcode = dw_child.Object.u_quotemx_pcode[ls_row]
- ls_woodcode = dw_child.Object.u_quotemx_woodcode[ls_row]
-
- IF dw_child.Object.u_mtrldef_statusflag[ls_row] = 2 AND ls_status <> '' THEN
- f_checkpz(ls_status,s_pz[])
- // IF sys_option_price_if_pz = 0 THEN
- // ls_pcode = ''
- // ls_woodcode = ''
- // END IF
- obj_price = 0
- FOR ll_i = 1 TO UpperBound(s_pz)
- ls_status_zj = s_pz[ll_i].cfgname
- ld_price_zj = 0
- ld_rebate_zj = 0
- SELECT u_sale_price_mx.price,u_sale_price_mx.rebate
- INTO :ld_price_zj,:ld_rebate_zj
- FROM u_sale_price_mx
- WHERE (u_sale_price_mx.pricelistid = :s_pricelist.pricelistid) AND
- ( u_sale_price_mx.mtrlid = :ls_mtrlid ) AND
- ( u_sale_price_mx.status = :ls_status_zj ) AND
- ( u_sale_price_mx.pcode = :ls_pcode ) AND
- ( u_sale_price_mx.woodcode = :ls_woodcode );
- IF sqlca.SQLCode <> 0 THEN
- err_str = err_str + "当前价格表的 "+String(dw_child.Object.u_mtrldef_mtrlname[ls_row])+" 相关子件的计划售价尚未设定! ~n"
- GOTO next_
- ELSE
- obj_price = obj_price + ld_price_zj * ld_rebate_zj * Dec(s_pz[ll_i].qty)
- END IF
- NEXT
-
- dw_child.Object.u_quotemx_sumprice[ls_row] = obj_price
- dw_child.Object.u_quotemx_sumprice_1[ls_row] = obj_price
-
- dw_child.Object.u_quotemx_rebate[ls_row] = 1
-
- ELSE
- IF sys_option_price_if_status = 0 THEN
- ls_status = ''
- ls_pcode = ''
- ls_woodcode = ''
- END IF
-
- SELECT ifpackpro,ifpricepack INTO :li_ifpackpro,:li_ifpricepack
- FROM u_mtrldef
- Where mtrlid = :ls_mtrlid;
- IF sqlca.SQLCode <> 0 THEN
- err_str = '查询产品是否包件产品失败'
- GOTO ext
- END IF
-
- obj_price = 0
- it_mxt = 1
-
- IF li_ifpackpro = 0 OR li_ifpricepack = 1 THEN
- SELECT u_sale_price_mx.price,u_sale_price_mx.rebate
- INTO :obj_price,:obj_rebate
- FROM u_sale_price_mx
- WHERE (u_sale_price_mx.pricelistid = :s_pricelist.pricelistid) AND
- ( u_sale_price_mx.mtrlid = :ls_mtrlid ) AND
- ( u_sale_price_mx.status = :ls_status ) AND
- ( u_sale_price_mx.pcode = :ls_pcode ) AND
- ( u_sale_price_mx.woodcode = :ls_woodcode );
- IF sqlca.SQLCode <> 0 THEN
- err_str = err_str + "当前价格表的 "+String(dw_child.Object.u_mtrldef_mtrlname[ls_row])+" 的计划售价尚未设定! ~n"
- ELSE
-
- dw_child.Object.u_quotemx_sumprice[ls_row] = obj_price
- dw_child.Object.u_quotemx_sumprice_1[ls_row] = obj_price
- dw_child.Object.u_quotemx_rebate[ls_row] = obj_rebate
-
- END IF
- ELSE
-
- DECLARE cur_pf CURSOR FOR
- SELECT u_PrdPF.SonMtrlid,
- u_PrdPF.status,
- u_PrdPF.woodcode,
- u_PrdPF.pcode,
- u_PrdPF.ifover,
- u_prdpf.dipztype,
- u_prdpf.Sonscale
- FROM u_PrdPF,u_mtrl_pf
- WHERE ( u_PrdPF.mtrlid = u_mtrl_pf.mtrlid )
- AND ( u_PrdPF.pfcode = u_mtrl_pf.pfcode )
- AND ( u_PrdPF.mtrlid = :ls_mtrlid )
- AND ( u_mtrl_pf.ifdi = 1 AND :li_ifpackpro = 0
- OR u_mtrl_pf.ifdft = 1 AND :li_ifpackpro = 1 );
-
- OPEN cur_pf;
-
- FETCH cur_pf INTO :ll_SonMtrlid[it_mxt],:ls_pf_status[it_mxt],
- :ls_pf_woodcode[it_mxt],:ls_pf_pcode[it_mxt],:li_ifover[it_mxt],
- :li_dipztype[it_mxt],:ld_Sonscale[it_mxt];
- DO WHILE sqlca.SQLCode = 0
- it_mxt++
- FETCH cur_pf INTO :ll_SonMtrlid[it_mxt],:ls_pf_status[it_mxt],
- :ls_pf_woodcode[it_mxt],:ls_pf_pcode[it_mxt],:li_ifover[it_mxt],
- :li_dipztype[it_mxt],:ld_Sonscale[it_mxt];
- LOOP
- it_mxt = it_mxt - 1
- CLOSE cur_pf;
-
- FOR ll_j = 1 TO it_mxt
- IF sys_option_price_if_status = 0 THEN
- ls_status_find = ''
- ls_woodcode_find = ''
- ls_pcode_find = ''
- ELSE
- IF li_ifover[ll_j] = 1 THEN
- CHOOSE CASE li_dipztype[ll_j]
- CASE 0
- ls_status_find = ls_status
- ls_woodcode_find = ''
- ls_pcode_find = ''
- CASE 1
- ls_status_find = ''
- ls_woodcode_find = ls_woodcode
- ls_pcode_find = ''
- CASE 2
- ls_status_find = ''
- ls_woodcode_find = ''
- ls_pcode_find = ls_pcode
- CASE 3
- ls_status_find = ls_status
- ls_woodcode_find = ls_woodcode
- ls_pcode_find = ''
- CASE 4
- ls_status_find = ''
- ls_woodcode_find = ls_woodcode
- ls_pcode_find = ls_pcode
- CASE 5
- ls_status_find = ls_status
- ls_woodcode_find = ''
- ls_pcode_find = ls_pcode
- CASE 6
- ls_status_find = ls_status
- ls_woodcode_find = ls_woodcode
- ls_pcode_find = ls_pcode
- END CHOOSE
- ELSE
- ls_status_find = ls_pf_status[ll_j]
- ls_woodcode_find = ls_pf_woodcode[ll_j]
- ls_pcode_find = ls_pf_pcode[ll_j]
- END IF
- END IF
- ls_status_find = Trim(ls_status_find)
- ls_woodcode_find = Trim(ls_woodcode_find)
- ls_pcode_find = Trim(ls_pcode_find)
-
- ld_price_zj = 0
- ld_rebate_zj = 0
- SELECT u_sale_price_mx.price,u_sale_price_mx.rebate
- INTO :ld_price_zj,:ld_rebate_zj
- FROM u_sale_price_mx
- WHERE (u_sale_price_mx.pricelistid = :s_pricelist.pricelistid) AND
- ( u_sale_price_mx.mtrlid = :ll_SonMtrlid[ll_j] ) AND
- ( u_sale_price_mx.status = :ls_status_find ) AND
- ( u_sale_price_mx.pcode = :ls_pcode_find ) AND
- ( u_sale_price_mx.woodcode = :ls_woodcode_find );
- IF sqlca.SQLCode <> 0 THEN
- err_str = err_str + "当前价格表的 "+String(dw_child.Object.u_mtrldef_mtrlname[ls_row])+" 相关包件的计划售价尚未设定! ~n"
- GOTO next_
- ELSE
- obj_price = obj_price + ld_price_zj * ld_rebate_zj * ld_Sonscale[ll_j]
- END IF
- NEXT
-
- dw_child.Object.u_quotemx_sumprice[ls_row] = obj_price
- dw_child.Object.u_quotemx_sumprice_1[ls_row] = obj_price
- dw_child.Object.u_quotemx_rebate[ls_row] = 1
-
- END IF
- END IF
- next_:
- NEXT
- ext:
- IF err_str <> '' THEN
- MessageBox('系统提示',err_str)
- END IF
- end event
- event ue_importseleprice_cust();IF NOT dw_edit_mode THEN
- MessageBox('系统提示',"非编辑状态下不可以使用!")
- RETURN
- END IF
- Long ls_row,ls_cusid,ls_mtrlid
- String ls_cuscode,ls_cusname
- String ls_status,ls_pcode,ls_woodcode
- Long uc_row
- Decimal obj_price ,obj_rebate
- String err_str = ''
- Boolean if_exist_price = TRUE
- Long ls_pricelistid
- s_pricelist_ch s_pricelist
- String arg_msg
- s_mtrlcfg_expr s_pz[]
- Long ll_i
- String ls_status_zj
- Decimal ld_price_zj,ld_rebate_zj
- Long ll_moneyid,ll_moneyid_list
- Boolean if_moneyid_price = TRUE
- Int li_ifpackpro
- String ls_pf_status[],ls_pf_woodcode[],ls_pf_pcode[]
- Int li_ifover[],li_dipztype[]
- Decimal ld_Sonscale[]
- Long ll_SonMtrlid[]
- Long it_mxt = 1
- String ls_status_find,ls_woodcode_find,ls_pcode_find
- Long ll_j
- Int li_ifpricepack
- //查询客户价格表
- //如果客户无价格表则提示是否直接查询价格表
- uc_row = dw_uc.GetRow()
- IF dw_uc.Object.u_quote_cusid[uc_row] = 0 OR IsNull(dw_uc.Object.u_quote_cusid[uc_row]) THEN
- MessageBox('系统提示',"请选择销售客户!")
- RETURN
- END IF
- ls_cusid = dw_uc.Object.u_quote_cusid[uc_row]
- SELECT u_cust.pricelistid
- INTO :ls_pricelistid
- FROM u_cust
- Where u_cust.cusid = :ls_cusid;
- IF sqlca.SQLCode <> 0 OR ls_pricelistid <= 0 THEN
- if_exist_price = FALSE
- END IF
- IF if_exist_price = FALSE THEN
-
- IF MessageBox('系统提示',"当前客户的计划售价尚未设定!是否查询价格列表?",Question!,YesNo!) = 2 THEN RETURN
-
- OpenWithParm(w_sale_price_list_ch,-1)
- s_pricelist = Message.PowerObjectParm
- IF s_pricelist.pricelistid <= 0 THEN RETURN
- END IF
- FOR ls_row = 1 TO dw_child.RowCount()
- ls_mtrlid = dw_child.Object.u_quotemx_mtrlid[ls_row]
- ls_status = dw_child.Object.u_quotemx_status[ls_row]
- ls_pcode = dw_child.Object.u_quotemx_pcode[ls_row]
- ls_woodcode = dw_child.Object.u_quotemx_woodcode[ls_row]
-
- IF dw_child.Object.u_mtrldef_statusflag[ls_row] = 2 AND ls_status <> '' THEN
- f_checkpz(ls_status,s_pz[])
-
- // IF sys_option_price_if_pz = 0 THEN
- // ls_pcode = ''
- // ls_woodcode = ''
- // END IF
- obj_price = 0
-
- FOR ll_i = 1 TO UpperBound(s_pz)
- ls_status_zj = s_pz[ll_i].cfgname
- ld_price_zj = 0
- ld_rebate_zj = 0
- IF if_exist_price THEN //查询客户价格表
- IF Not (IsNull(ls_mtrlid) OR ls_mtrlid = 0 ) THEN
- SELECT u_sale_price_mx.price,u_sale_price_mx.rebate
- INTO :ld_price_zj,:ld_rebate_zj
- FROM u_sale_price_list,u_cust,u_sale_price_mx
- WHERE (u_sale_price_list.pricelistid = u_cust.pricelistid) AND
- ( u_sale_price_mx.pricelistid = u_sale_price_list.pricelistid) AND
- ( u_sale_price_mx.mtrlid = :ls_mtrlid ) AND
- ( u_cust.cusid = :ls_cusid ) AND
- ( u_sale_price_mx.status = :ls_status_zj ) AND
- ( u_sale_price_mx.pcode = :ls_pcode ) AND
- ( u_sale_price_mx.woodcode = :ls_woodcode );
- IF sqlca.SQLCode <> 0 THEN
- err_str = err_str + "当前客户的 "+String(dw_child.Object.mtrlname[ls_row])+" 相关子件的计划售价尚未设定! ~n"
- GOTO next_
- ELSE
- obj_price = obj_price + ld_price_zj * ld_rebate_zj * Dec(s_pz[ll_i].qty)
- END IF
- END IF
- ELSE //查询价格列表
- SELECT u_sale_price_mx.price,u_sale_price_mx.rebate
- INTO :obj_price,:obj_rebate
- FROM u_sale_price_mx
- WHERE (u_sale_price_mx.pricelistid = :s_pricelist.pricelistid) AND
- ( u_sale_price_mx.mtrlid = :ls_mtrlid ) AND
- ( u_sale_price_mx.status = :ls_status_zj ) AND
- ( u_sale_price_mx.pcode = :ls_pcode ) AND
- ( u_sale_price_mx.woodcode = :ls_woodcode );
- IF sqlca.SQLCode <> 0 THEN
- err_str = err_str + "当前价格表的 "+String(dw_child.Object.mtrlname[ls_row])+" 相关子件的计划售价尚未设定! ~n"
- GOTO next_
- ELSE
- obj_price = obj_price + ld_price_zj * ld_rebate_zj * Dec(s_pz[ll_i].qty)
- END IF
- END IF
- NEXT
- dw_child.Object.u_quotemx_sumprice[ls_row] = obj_price
- dw_child.Object.u_quotemx_sumprice_1[ls_row] = obj_price
- dw_child.Object.u_quotemx_rebate[ls_row] = 1
- ELSE
- IF sys_option_price_if_status = 0 THEN
- ls_status = ''
- ls_pcode = ''
- ls_woodcode = ''
- END IF
-
- SELECT ifpackpro,ifpricepack INTO :li_ifpackpro,:li_ifpricepack
- FROM u_mtrldef
- Where mtrlid = :ls_mtrlid;
- IF sqlca.SQLCode <> 0 THEN
- err_str = '查询产品是否包件产品失败'
- GOTO ext
- END IF
-
- obj_price = 0
- it_mxt = 1
-
- IF li_ifpackpro = 0 OR li_ifpricepack = 1 THEN
-
- IF if_exist_price THEN //查询客户价格表
- IF Not (IsNull(ls_mtrlid) OR ls_mtrlid = 0 ) THEN
- SELECT u_sale_price_mx.price,u_sale_price_mx.rebate
- INTO :obj_price,:obj_rebate
- FROM u_sale_price_list,u_cust,u_sale_price_mx
- WHERE (u_sale_price_list.pricelistid = u_cust.pricelistid) AND
- ( u_sale_price_mx.pricelistid = u_sale_price_list.pricelistid) AND
- ( u_sale_price_mx.mtrlid = :ls_mtrlid ) AND
- ( u_cust.cusid = :ls_cusid ) AND
- ( u_sale_price_mx.status = :ls_status ) AND
- ( u_sale_price_mx.pcode = :ls_pcode ) AND
- ( u_sale_price_mx.woodcode = :ls_woodcode );
- IF sqlca.SQLCode <> 0 THEN
- err_str = err_str + "当前客户的 "+String(dw_child.Object.u_mtrldef_mtrlname[ls_row])+" 的计划售价尚未设定! ~n"
- ELSE
- dw_child.Object.u_quotemx_sumprice[ls_row] = obj_price
- dw_child.Object.u_quotemx_sumprice_1[ls_row] = obj_price
- dw_child.Object.u_quotemx_rebate[ls_row] = obj_rebate
-
- END IF
- END IF
- ELSE //查询价格列表
- SELECT u_sale_price_mx.price,u_sale_price_mx.rebate
- INTO :obj_price,:obj_rebate
- FROM u_sale_price_mx
- WHERE (u_sale_price_mx.pricelistid = :s_pricelist.pricelistid) AND
- ( u_sale_price_mx.mtrlid = :ls_mtrlid ) AND
- ( u_sale_price_mx.status = :ls_status ) AND
- ( u_sale_price_mx.pcode = :ls_pcode ) AND
- ( u_sale_price_mx.woodcode = :ls_woodcode );
- IF sqlca.SQLCode <> 0 THEN
- err_str = err_str + "当前价格表的 "+String(dw_child.Object.u_mtrldef_mtrlname[ls_row])+" 的计划售价尚未设定! ~n"
- ELSE
- dw_child.Object.u_quotemx_sumprice[ls_row] = obj_price
- dw_child.Object.u_quotemx_sumprice_1[ls_row] = obj_price
- dw_child.Object.u_quotemx_rebate[ls_row] = obj_rebate
-
- END IF
- END IF
-
- ELSE
- obj_price = 0
- it_mxt = 1
- DECLARE cur_pf CURSOR FOR
- SELECT u_PrdPF.SonMtrlid,
- u_PrdPF.status,
- u_PrdPF.woodcode,
- u_PrdPF.pcode,
- u_PrdPF.ifover,
- u_prdpf.dipztype,
- u_prdpf.Sonscale
- FROM u_PrdPF,u_mtrl_pf
- WHERE ( u_PrdPF.mtrlid = u_mtrl_pf.mtrlid )
- AND ( u_PrdPF.pfcode = u_mtrl_pf.pfcode )
- AND ( u_PrdPF.mtrlid = :ls_mtrlid )
- AND ( u_mtrl_pf.ifdi = 1 AND :li_ifpackpro = 0
- OR u_mtrl_pf.ifdft = 1 AND :li_ifpackpro = 1 );
-
- OPEN cur_pf;
-
- FETCH cur_pf INTO :ll_SonMtrlid[it_mxt],:ls_pf_status[it_mxt],
- :ls_pf_woodcode[it_mxt],:ls_pf_pcode[it_mxt],:li_ifover[it_mxt],
- :li_dipztype[it_mxt],:ld_Sonscale[it_mxt];
- DO WHILE sqlca.SQLCode = 0
- it_mxt++
- FETCH cur_pf INTO :ll_SonMtrlid[it_mxt],:ls_pf_status[it_mxt],
- :ls_pf_woodcode[it_mxt],:ls_pf_pcode[it_mxt],:li_ifover[it_mxt],
- :li_dipztype[it_mxt],:ld_Sonscale[it_mxt];
- LOOP
- it_mxt = it_mxt - 1
- CLOSE cur_pf;
-
- FOR ll_j = 1 TO it_mxt
- IF sys_option_price_if_status = 0 THEN
- ls_status_find = ''
- ls_woodcode_find = ''
- ls_pcode_find = ''
- ELSE
- IF li_ifover[ll_j] = 1 THEN
- CHOOSE CASE li_dipztype[ll_j]
- CASE 0
- ls_status_find = ls_status
- ls_woodcode_find = ''
- ls_pcode_find = ''
- CASE 1
- ls_status_find = ''
- ls_woodcode_find = ls_woodcode
- ls_pcode_find = ''
- CASE 2
- ls_status_find = ''
- ls_woodcode_find = ''
- ls_pcode_find = ls_pcode
- CASE 3
- ls_status_find = ls_status
- ls_woodcode_find = ls_woodcode
- ls_pcode_find = ''
- CASE 4
- ls_status_find = ''
- ls_woodcode_find = ls_woodcode
- ls_pcode_find = ls_pcode
- CASE 5
- ls_status_find = ls_status
- ls_woodcode_find = ''
- ls_pcode_find = ls_pcode
- CASE 6
- ls_status_find = ls_status
- ls_woodcode_find = ls_woodcode
- ls_pcode_find = ls_pcode
- END CHOOSE
- ELSE
- ls_status_find = ls_pf_status[ll_j]
- ls_woodcode_find = ls_pf_woodcode[ll_j]
- ls_pcode_find = ls_pf_pcode[ll_j]
- END IF
- END IF
- ls_status_find = Trim(ls_status_find)
- ls_woodcode_find = Trim(ls_woodcode_find)
- ls_pcode_find = Trim(ls_pcode_find)
-
- ld_price_zj = 0
- ld_rebate_zj = 0
-
- IF if_exist_price THEN //查询客户价格表
- IF Not (IsNull(ls_mtrlid) OR ls_mtrlid = 0 ) THEN
- SELECT u_sale_price_mx.price,u_sale_price_mx.rebate
- INTO :ld_price_zj,:ld_rebate_zj
- FROM u_sale_price_list,u_cust,u_sale_price_mx
- WHERE (u_sale_price_list.pricelistid = u_cust.pricelistid) AND
- ( u_sale_price_mx.pricelistid = u_sale_price_list.pricelistid) AND
- ( u_sale_price_mx.mtrlid = :ll_SonMtrlid[ll_j] ) AND
- ( u_cust.cusid = :ls_cusid ) AND
- ( u_sale_price_mx.status = :ls_status_find ) AND
- ( u_sale_price_mx.pcode = :ls_pcode_find ) AND
- ( u_sale_price_mx.woodcode = :ls_woodcode_find );
- IF sqlca.SQLCode <> 0 THEN
- err_str = err_str + "当前客户的 "+String(dw_child.Object.u_mtrldef_mtrlname[ls_row])+" 相关包件的计划售价尚未设定! ~n"
- GOTO next_
- ELSE
- obj_price = obj_price + ld_price_zj * ld_rebate_zj * ld_Sonscale[ll_j]
- END IF
- END IF
- ELSE //查询价格列表
- SELECT u_sale_price_mx.price,u_sale_price_mx.rebate
- INTO :ld_price_zj,:ld_rebate_zj
- FROM u_sale_price_mx
- WHERE (u_sale_price_mx.pricelistid = :s_pricelist.pricelistid) AND
- ( u_sale_price_mx.mtrlid = :ll_SonMtrlid[ll_j] ) AND
- ( u_sale_price_mx.status = :ls_status_find ) AND
- ( u_sale_price_mx.pcode = :ls_pcode_find ) AND
- ( u_sale_price_mx.woodcode = :ls_woodcode_find );
- IF sqlca.SQLCode <> 0 THEN
- err_str = err_str + "当前价格表的 "+String(dw_child.Object.u_mtrldef_mtrlname[ls_row])+" 相关包件的计划售价尚未设定! ~n"
- GOTO next_
- ELSE
- obj_price = obj_price + ld_price_zj * ld_rebate_zj * ld_Sonscale[ll_j]
- END IF
- END IF
-
- NEXT
- dw_child.Object.u_quotemx_sumprice[ls_row] = obj_price
- dw_child.Object.u_quotemx_sumprice_1[ls_row] = obj_price
- dw_child.Object.u_quotemx_rebate[ls_row] = 1
-
- END IF
- END IF
- next_:
- NEXT
- ext:
- IF err_str <> '' THEN
- MessageBox('系统提示',err_str)
- END IF
- end event
- event ue_p_price_com();IF NOT dw_edit_mode THEN
- MessageBox('系统提示','非编辑状态下不能使用')
- RETURN
- END IF
- IF MessageBox(publ_operator,'是否要确定要批设定报价', question!, YesNo!, 2) = 2 THEN
- RETURN
- END IF
- Long ll_i
- Open(w_p_quote_com)
- s_edit_index_tran s_tran_com
- s_tran_com = message.powerobjectparm
- Long ll_com
- Decimal ld_arg
- Long ll_last
- ll_com = s_tran_com.b_long
- ld_arg = s_tran_com.c_decimal
- ll_last = s_tran_com.c_long
- IF ll_com = 0 THEN RETURN
- dw_child.AcceptText()
- dw_child.SetRedraw(FALSE)
- FOR ll_i = 1 TO dw_child.RowCount()
- IF ll_com = 1 THEN
- dw_child.Object.u_quotemx_sumprice[ll_i] = Round(dw_child.Object.u_quotemx_sumprice[ll_i] * ld_arg,ll_last)
- ELSEIF ll_com = 2 THEN
- dw_child.Object.u_quotemx_sumprice[ll_i] = Round(dw_child.Object.u_quotemx_sumprice[ll_i]/ld_arg,ll_last)
- ELSEIF ll_com = 3 THEN
- dw_child.Object.u_quotemx_sumprice[ll_i] = Round(dw_child.Object.u_quotemx_sumprice[ll_i] + ld_arg,ll_last)
- ELSEIF ll_com = 4 THEN
- dw_child.Object.u_quotemx_sumprice[ll_i] = Round(dw_child.Object.u_quotemx_sumprice[ll_i] - ld_arg,ll_last)
- END IF
- NEXT
- dw_child.SetRedraw(TRUE)
- end event
- event ue_p_cus_price_com();IF NOT dw_edit_mode THEN
- MessageBox('系统提示','非编辑状态下不能使用')
- RETURN
- END IF
- IF MessageBox(publ_operator,'是否要确定要批设定客户还价', question!, YesNo!, 2) = 2 THEN
- RETURN
- END IF
- Long ll_i
- Open(w_p_quote_com)
- s_edit_index_tran s_tran_com
- s_tran_com = message.powerobjectparm
- Long ll_com
- Decimal ld_arg
- Long ll_last
- ll_com = s_tran_com.b_long
- ld_arg = s_tran_com.c_decimal
- ll_last = s_tran_com.c_long
- IF ll_com = 0 THEN RETURN
- dw_child.AcceptText()
- dw_child.SetRedraw(FALSE)
- FOR ll_i = 1 TO dw_child.RowCount()
- IF ll_com = 1 THEN
- dw_child.Object.u_quotemx_sumprice_1[ll_i] = Round(dw_child.Object.u_quotemx_sumprice_1[ll_i] * ld_arg,ll_last)
- ELSEIF ll_com = 2 THEN
- dw_child.Object.u_quotemx_sumprice_1[ll_i] = Round(dw_child.Object.u_quotemx_sumprice_1[ll_i]/ld_arg,ll_last)
- ELSEIF ll_com = 3 THEN
- dw_child.Object.u_quotemx_sumprice_1[ll_i] = Round(dw_child.Object.u_quotemx_sumprice_1[ll_i] + ld_arg,ll_last)
- ELSEIF ll_com = 4 THEN
- dw_child.Object.u_quotemx_sumprice_1[ll_i] = Round(dw_child.Object.u_quotemx_sumprice_1[ll_i] - ld_arg,ll_last)
- END IF
- NEXT
- dw_child.SetRedraw(TRUE)
- end event
- event ue_p_price();IF NOT dw_edit_mode THEN
- MessageBox('系统提示','非编辑状态下不能使用')
- RETURN
- END IF
- IF MessageBox(publ_operator,'是否要确定要批设定单价', Exclamation!, YesNo!, 2) = 2 THEN
- RETURN
- END IF
- Long ll_i
- dw_child.AcceptText()
- dw_child.SetRedraw(FALSE)
- FOR ll_i = 1 TO dw_child.RowCount()
- IF ll_i = 1 THEN CONTINUE
- dw_child.Object.u_quotemx_sumprice[ll_i] = dw_child.Object.u_quotemx_sumprice[1]
- NEXT
- dw_child.SetRedraw(TRUE)
- end event
- event ue_p_cus_price();IF NOT dw_edit_mode THEN
- MessageBox('系统提示','非编辑状态下不能使用')
- RETURN
- END IF
- IF MessageBox(publ_operator,'是否要确定要批设定客户还价', Exclamation!, YesNo!, 2) = 2 THEN
- RETURN
- END IF
- Long ll_i
- dw_child.AcceptText()
- dw_child.SetRedraw(FALSE)
- FOR ll_i = 1 TO dw_child.RowCount()
- IF ll_i = 1 THEN CONTINUE
- dw_child.Object.u_quotemx_sumprice_1[ll_i] = dw_child.Object.u_quotemx_sumprice_1[1]
- NEXT
- dw_child.SetRedraw(TRUE)
- end event
- event ue_cmpl_modle();IF dw_edit_mode THEN
- MessageBox('提示','单据编辑状态下不可用')
- RETURN
- END IF
- IF NOT f_power_ind(2750,sys_msg_pow) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
- Long ll_row
- Int li_flag
- dw_pageretr.AcceptText()
- ll_row = dw_pageretr.GetRow()
- IF ll_row <= 0 THEN
- MessageBox('提示','请选择报价单')
- RETURN
- END IF
- li_flag = dw_pageretr.Object.u_quote_flag[ll_row]
- IF li_flag = 1 THEN
- MessageBox('提示','报价单已审核不能操作')
- RETURN
- END IF
- f_open_cmpl_product_price(dw_pageretr.Object.u_quote_scid[ll_row],dw_pageretr.Object.u_quote_quoteid[ll_row])
- THIS.TriggerEvent("retrieve_childdw")
- end event
- event ue_p_status();IF NOT dw_edit_mode THEN
- MessageBox('提示','非编辑状态下不可用')
- RETURN
- END IF
- IF MessageBox(publ_operator,'是否要确定要批设定'+sys_option_change_status+'?', Exclamation!, YesNo!, 2) = 2 THEN
- RETURN
- END IF
- Long ll_i
- dw_child.AcceptText()
- IF dw_child.RowCount() = 0 THEN RETURN
- FOR ll_i = 1 TO dw_child.RowCount()
- IF ll_i = 1 THEN CONTINUE
- dw_child.Object.u_quotemx_status[ll_i] = dw_child.Object.u_quotemx_status[1]
- NEXT
- end event
- event ue_p_woodcode();IF NOT dw_edit_mode THEN
- MessageBox('提示','非编辑状态下不可用')
- RETURN
- END IF
- IF MessageBox(publ_operator,'是否要确定要批设定'+sys_option_change_woodcode+'?', Exclamation!, YesNo!, 2) = 2 THEN
- RETURN
- END IF
- Long ll_i
- dw_child.AcceptText()
- IF dw_child.RowCount() = 0 THEN RETURN
- FOR ll_i = 1 TO dw_child.RowCount()
- IF ll_i = 1 THEN CONTINUE
- dw_child.Object.u_quotemx_woodcode[ll_i] = dw_child.Object.u_quotemx_woodcode[1]
- NEXT
- end event
- event ue_p_pcode();IF NOT dw_edit_mode THEN
- MessageBox('提示','非编辑状态下不可用')
- RETURN
- END IF
- IF MessageBox(publ_operator,'是否要确定要批设定'+sys_option_change_pcode+'?', Exclamation!, YesNo!, 2) = 2 THEN
- RETURN
- END IF
- Long ll_i
- dw_child.AcceptText()
- IF dw_child.RowCount() = 0 THEN RETURN
- FOR ll_i = 1 TO dw_child.RowCount()
- IF ll_i = 1 THEN CONTINUE
- dw_child.Object.u_quotemx_pcode[ll_i] = dw_child.Object.u_quotemx_pcode[1]
- NEXT
- end event
- event ue_mx_stop_cancel();IF Not f_power_ind(1686,sys_msg_pow) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
- IF dw_edit_mode THEN
- MessageBox('提示','单据编辑状态下不可用')
- RETURN
- END IF
- Long ll_mx_row,i,ll_rst
- Long ll_scid,ll_printid,ll_quoteid
- String arg_msg
- dw_child.AcceptText()
- Open(w_quote_mxdo)
- ll_rst = Message.DoubleParm
- IF ll_rst = 0 THEN
- RETURN
- ELSEIF ll_rst = 1 THEN
- ll_mx_row = dw_child.GetRow()
- IF ll_mx_row <= 0 THEN
- MessageBox('提示','请选择报价单明细物料')
- RETURN
- END IF
-
- ll_scid = dw_child.Object.u_quotemx_scid[ll_mx_row]
- ll_quoteid = dw_child.Object.u_quotemx_quoteid[ll_mx_row]
- ll_printid = dw_child.Object.u_quotemx_printid[ll_mx_row]
-
- IF uo_quote_mtrl.uof_stop_mx(ll_scid,ll_quoteid,ll_printid,0,publ_operator,arg_msg,True) = 0 THEN
- MessageBox('提示','取消终止报价单明细失败,'+arg_msg)
- RETURN
- END IF
- ELSEIF ll_rst = 2 THEN
- FOR i = 1 To dw_child.RowCount()
- IF dw_child.Object.u_quotemx_flag[i] = 0 THEN CONTINUE
- ll_scid = dw_child.Object.u_quotemx_scid[i]
- ll_quoteid = dw_child.Object.u_quotemx_quoteid[i]
- ll_printid = dw_child.Object.u_quotemx_printid[i]
-
- IF uo_quote_mtrl.uof_stop_mx(ll_scid,ll_quoteid,ll_printid,0,publ_operator,arg_msg,False) = 0 THEN
- MessageBox('提示','行:'+String(i)+',取消终止报价单明细失败,'+arg_msg)
- RETURN
- END IF
- NEXT
- COMMIT;
- END IF
- This.TriggerEvent("retrieve_childdw")
- end event
- event ue_mx_stop();IF Not f_power_ind(1685,sys_msg_pow) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
- IF dw_edit_mode THEN
- MessageBox('提示','单据编辑状态下不可用')
- RETURN
- END IF
- Long ll_mx_row,i,ll_rst
- Long ll_scid,ll_printid,ll_quoteid
- String arg_msg
- dw_child.AcceptText()
- Open(w_quote_mxdo)
- ll_rst = Message.DoubleParm
- IF ll_rst = 0 THEN
- RETURN
- ELSEIF ll_rst = 1 THEN
- ll_mx_row = dw_child.GetRow()
- IF ll_mx_row <= 0 THEN
- MessageBox('提示','请选择报价单明细物料')
- RETURN
- END IF
-
- ll_scid = dw_child.Object.u_quotemx_scid[ll_mx_row]
- ll_quoteid = dw_child.Object.u_quotemx_quoteid[ll_mx_row]
- ll_printid = dw_child.Object.u_quotemx_printid[ll_mx_row]
-
- IF uo_quote_mtrl.uof_stop_mx(ll_scid,ll_quoteid,ll_printid,1,publ_operator,arg_msg,True) = 0 THEN
- MessageBox('提示','终止报价单明细失败,'+arg_msg)
- RETURN
- END IF
- ELSEIF ll_rst = 2 THEN
- FOR i = 1 To dw_child.RowCount()
- IF dw_child.Object.u_quotemx_flag[i] = 1 THEN CONTINUE
- ll_scid = dw_child.Object.u_quotemx_scid[i]
- ll_quoteid = dw_child.Object.u_quotemx_quoteid[i]
- ll_printid = dw_child.Object.u_quotemx_printid[i]
-
- IF uo_quote_mtrl.uof_stop_mx(ll_scid,ll_quoteid,ll_printid,1,publ_operator,arg_msg,False) = 0 THEN
- MessageBox('提示','行:'+String(i)+',终止报价单明细失败,'+arg_msg)
- RETURN
- END IF
- NEXT
- COMMIT;
- END IF
- This.TriggerEvent("retrieve_childdw")
- end event
- event ue_send_ljfieb();IF Not f_power_ind(3165,sys_msg_pow) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
- IF dw_edit_mode THEN RETURN
- IF sys_email_sqlca.DBHandle() = 0 THEN
- MessageBox('Error','电子商务数据库连接失败,请检查')
- RETURN
- END IF
- IF MessageBox('询问','是否确认要发送单据给客户?',question!,yesno!) = 2 THEN RETURN
- Long ll_billid,ll_scid
- String ls_billcode
- Long ll_row
- Int li_ifecomm
- String arg_summary,arg_postscript,arg_remark
- String arg_msg
- ll_row = dw_pageretr.GetRow()
- IF ll_row <= 0 THEN
- MessageBox('系统提示','请选择要发送的单据')
- RETURN
- END IF
- ll_scid = dw_pageretr.Object.u_quote_scid[ll_row]
- ll_billid = dw_pageretr.Object.u_quote_quoteid[ll_row]
- ls_billcode = dw_pageretr.Object.u_quote_quotecode[ll_row]
- SELECT u_cust.ifecomm
- INTO :li_ifecomm
- FROM u_quote INNER JOIN
- u_cust ON u_quote.cusid = u_cust.cusid
- WHERE u_quote.quoteid = :ll_billid
- And u_quote.scid = :ll_scid Using sqlca;
- IF sqlca.SQLCode <> 0 THEN
- MessageBox('Error','查询采购订单相关客户通信信息失败,请检查设置,'+sqlca.SQLErrText)
- RETURN
- END IF
- IF li_ifecomm = 0 THEN
- MessageBox('系统提示','客户没有使用电子商务,不能发送单据')
- RETURN
- END IF
- s_packet_ljfieb s_pack,s_return
- OpenWithParm(w_dscrp_edit_ljfieb,s_pack)
- s_return = Message.PowerObjectParm
- IF s_return.returnflag <> 1 THEN RETURN
- arg_summary = ''
- arg_postscript = s_return.postscript
- arg_remark = s_return.remark
- IF uo_fieb.send_quote(ll_scid,ll_billid,arg_postscript,arg_remark,arg_msg,True) = 0 THEN
- MessageBox('Erorr',arg_msg)
- RETURN
- END IF
- UPDATE u_quote
- SET senduser = :publ_operator,
- sendtime = getdate(),
- sendcnt = sendcnt + 1
- WHERE quoteid = :ll_billid
- And scid = :ll_scid Using sqlca;
- IF sqlca.SQLCode <> 0 THEN
- ROLLBACK Using sqlca;
- MessageBox('Error','更新发送次数失败,'+sqlca.SQLErrText)
- RETURN
- ELSE
- COMMIT Using sqlca;
- END IF
- wf_refresh_curuc(ll_scid,ll_billid)
- MessageBox('系统提示','提交成功!')
- end event
- event ue_jdview_ljfieb();long ll_row
- ll_row = dw_pageretr.getrow()
- if ll_row <= 0 then return
- string ls_taskcode
- ls_taskcode = dw_pageretr.object.u_quote_quotecode[ll_row]
- openwithparm(w_ljfieb_buytask_hisview,ls_taskcode)
- end event
- event ue_mtrl_info();IF NOT f_power_ind(3268,sys_msg_pow) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
- Long ll_row
- ll_row = dw_child.GetRow()
- IF ll_row <= 0 THEN
- MessageBox('系统提示','请选择物料')
- RETURN
- END IF
- Long ll_mtrlid
- ll_mtrlid = dw_child.Object.u_quotemx_mtrlid[ll_row]
- IF IsValid(w_mtrl_info) THEN
- w_mtrl_info.WindowState = Normal!
- w_mtrl_info.ins_mtrlid = ll_mtrlid
- w_mtrl_info.wf_retrieve(ll_mtrlid)
- ELSE
- OpenWithParm(w_mtrl_info,ll_mtrlid)
- END IF
- end event
- event ue_retrieve_info();Long ll_row
- Long ll_mtrlid
- ll_row = dw_child.GetRow()
- IF ll_row <= 0 THEN
- ll_mtrlid = 0
- ELSE
- ll_mtrlid = dw_child.Object.u_quotemx_mtrlid[ll_row]
- END IF
- IF IsValid(w_mtrl_info) THEN
- w_mtrl_info.WindowState = Normal!
- w_mtrl_info.ins_mtrlid = ll_mtrlid
- w_mtrl_info.wf_retrieve(ll_mtrlid)
- END IF
- end event
- event ue_dscrp_text();IF dw_child.GetRow() <= 0 THEN
- MessageBox('系统提示','请先选择明细行')
- RETURN
- END IF
- //s_view_dscrp s_view,s_return
- //String ls_dscrp
- //Long ll_scid,ll_quoteid,ll_printid
- //dw_child.AcceptText()
- //
- //Long ll_i
- //
- //ls_dscrp = ''
- //
- //IF dw_edit_mode THEN
- // FOR ll_i = 1 To it_mxbt
- // IF ins_printid[ll_i] = dw_child.GetRow() THEN
- // ls_dscrp = ins_dscrp_mx[ll_i]
- // EXIT
- // END IF
- // NEXT
- //ELSE
- // ll_scid = dw_child.Object.u_quotemx_scid[dw_child.GetRow()]
- // ll_quoteid = dw_child.Object.u_quotemx_quoteid[dw_child.GetRow()]
- // ll_printid = dw_child.Object.u_quotemx_printid[dw_child.GetRow()]
- //
- // SELECT dscrp INTO :ls_dscrp
- // FROM u_quoteMx_dscrp
- // WHERE scid = :ll_scid
- // AND quoteid = :ll_quoteid
- // And printid = :ll_printid;
- // IF sqlca.SQLCode <> 0 THEN
- // ls_dscrp = ''
- // END IF
- //END IF
- //
- //s_view.Title = '销售报价单明细工艺备注'
- //s_view.dscrp = ls_dscrp
- //s_view.editmode = dw_edit_mode
- //s_view.mtrlid = dw_child.Object.u_quotemx_mtrlid[dw_child.GetRow()]
- ////OpenWithParm(w_saletask_gydscrp_edit,s_view)
- //OpenWithParm(w_mtrlwkp_gydscrp_edit,s_view)
- //IF dw_edit_mode THEN
- // s_return = Message.PowerObjectParm
- // IF s_return.returnflag = 1 THEN RETURN
- //
- // IF s_return.dscrp <> '' THEN
- // dw_child.Object.dscrp_text[dw_child.GetRow()] = '点击查看'
- // ELSE
- // dw_child.Object.dscrp_text[dw_child.GetRow()] = '--'
- // END IF
- //
- // FOR ll_i = 1 To it_mxbt
- // IF ins_printid[ll_i] = dw_child.GetRow() THEN
- // ins_dscrp_mx[ll_i] = s_return.dscrp
- // RETURN
- // END IF
- // NEXT
- //
- // it_mxbt++
- // ins_printid[it_mxbt] = dw_child.GetRow()
- // ins_dscrp_mx[it_mxbt] = s_return.dscrp
- //END IF
- end event
- public function integer wf_refresh_curuc (long arg_scid, long arg_quoteid);IF arg_quoteid <= 0 Or IsNull(arg_quoteid) THEN RETURN 0
- Long uc_row
- uc_row = dw_pageretr.GetRow()
- IF uc_row <= 0 THEN RETURN 0
- DateTime quotedate
- String dscrp
- String quotecode
- String custname
- String custcode
- DateTime opdate
- String opemp
- String modemp
- DateTime moddate
- Int flag
- DateTime Auditingdate
- String Auditingrep
- Long custid
- String relcode
- String assign_emp
- Long moneyid
- DateTime sendTime
- String sendUser,fiebrelcode
- long ifecomm,sendcnt
- SELECT u_quote.quotecode,
- u_quote.cusid,
- u_quote.quotedate,
- u_quote.assign_emp,
- u_quote.relcode,
- u_quote.dscrp,
- u_quote.opemp,
- u_quote.opdate,
- u_quote.modemp,
- u_quote.moddate,
- u_quote.auditingrep,
- u_quote.auditingdate,
- u_quote.flag,
- u_cust.cuscode,
- u_cust.name,
- u_quote.moneyid,
- u_quote.sendTime,
- u_quote.sendUser,
- u_quote.fiebrelcode,
- u_quote.sendcnt,
- case u_cust.ifecomm when 0 then 0 else 1 end as ifecomm
- INTO :quotecode,
- :custid,
- :quotedate,
- :assign_emp,
- :relcode,
- :dscrp,
- :opemp,
- :opdate,
- :modemp,
- :moddate,
- :Auditingrep,
- :Auditingdate,
- :flag,
- :custcode,
- :custname,
- :moneyid,
- :sendTime,
- :sendUser,
- :fiebrelcode,
- :sendcnt,
- :ifecomm
- FROM u_quote INNER JOIN
- u_cust ON u_quote.cusid = u_cust.cusid
- WHERE ( u_quote.quoteid = :arg_quoteid )
- And ( u_quote.scid = :arg_scid );
- IF sqlca.SQLCode <> 0 THEN
- MessageBox('系统提示',"查询操作失败(错误单据唯一码)")
- RETURN 0
- END IF
- dw_pageretr.Object.u_quote_scid[uc_row] = arg_scid
- dw_pageretr.Object.u_quote_quoteid[uc_row] = arg_quoteid
- dw_pageretr.Object.u_quote_quotedate[uc_row] = quotedate
- dw_pageretr.Object.u_quote_quotecode[uc_row] = quotecode
- dw_pageretr.Object.u_quote_cusid[uc_row] = custid
- dw_pageretr.Object.u_quote_assign_emp[uc_row] = assign_emp
- dw_pageretr.Object.u_quote_dscrp[uc_row] = dscrp
- dw_pageretr.Object.u_quote_relcode[uc_row] = relcode
- dw_pageretr.Object.u_quote_opdate[uc_row] = opdate
- dw_pageretr.Object.u_quote_opemp[uc_row] = opemp
- dw_pageretr.Object.u_quote_moddate[uc_row] = moddate
- dw_pageretr.Object.u_quote_modemp[uc_row] = modemp
- dw_pageretr.Object.u_quote_flag[uc_row] = flag
- dw_pageretr.Object.u_quote_auditingdate[uc_row] = Auditingdate
- dw_pageretr.Object.u_quote_Auditingrep[uc_row] = Auditingrep
- dw_pageretr.Object.u_cust_cuscode[uc_row] = custcode
- dw_pageretr.Object.u_cust_name[uc_row] = custname
- dw_pageretr.Object.u_quote_senduser[uc_row] = sendUser
- dw_pageretr.Object.u_quote_sendtime[uc_row] = sendTime
- dw_pageretr.Object.u_quote_fiebrelcode[uc_row] = fiebrelcode
- dw_pageretr.Object.u_cust_ifecomm[uc_row] = ifecomm
- dw_pageretr.Object.u_quote_sendcnt[uc_row] = sendcnt
- dw_pageretr.Object.u_quote_moneyid[uc_row] = moneyid
- dw_uc.Reset()
- dw_pageretr.RowsCopy(dw_pageretr.GetRow(), dw_pageretr.GetRow(), Primary!, dw_uc, 1, Primary!)
- dw_uc.ResetUpdate()
- dw_uc.SetRedraw(True)
- wf_flagstatus_rf()
- RETURN 1
- end function
- public subroutine wf_getrprice (long arg_mrlid, ref decimal arg_newprice);//
- Decimal i_newprice
- SELECT price
- INTO :i_newprice
- FROM v_maxprice_cusprice
- Where mtrlid = :arg_mrlid;
- IF sqlca.SQLCode <> 0 OR IsNull(i_newprice) THEN i_newprice = 0
-
- arg_newprice = i_newprice
- end subroutine
- 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);//==============================================================================
- // 函数: w_publ_1ton_share_detail::wf_xls_retrievedata()
- //------------------------------------------------------------------------------
- // 描述: 此函数需要 重载,复制祖先范例代码,然后修改retrieve参数部分两处即可
- //------------------------------------------------------------------------------
- Long LS_ROW,ll_id,i,ll_scid
- LS_ROW = dw_pageretr.GetRow()
- IF LS_ROW <= 0 THEN
- arg_msg = '没有目标单据!'
- RETURN 0
- END IF
- //修改点:获取 指定retriev参数
- ll_id = dw_pageretr.Object.u_quote_quoteid[LS_ROW]
- ll_scid = dw_pageretr.Object.u_quote_scid[LS_ROW]
- //查询所选模版是否含有图片信息
- Long ll_ifpic
- Long ll_classid
- SELECT ifpic
- INTO :ll_ifpic
- FROM U_XLS_Templates
- Where id = :ll_xls_Templatesid;
- IF sqlca.SQLCode <> 0 THEN
- ll_ifpic = 0
- END IF
- Long ll_i,ll_j
- Long ll_mtrlid
- Long ll_fileid
- Blob ls_filedata
- SetNull(ls_filedata)
- String Pathname,ls_filename,ls_filetype
- String errmsg
- uo_fj_mng_billtype ls_uo_fjbt
- ls_uo_fjbt = Create uo_fj_mng_billtype
- s_xls_pic_list s_pic //结构数组-用于保存图片路径
- IF ll_ifpic = 1 THEN //如果含有图片信息,则查询本类型单据需要带出哪类附件
- SELECT classid
- INTO :ll_classid
- FROM u_billpic_fileclass
- Where (billtype = 130);
- IF sqlca.SQLCode <> 0 THEN
- ll_classid = 0
- END IF
-
- IF ll_classid > 0 THEN //如果已经指定好附件类型,则循环明细表查询每个明细的图片信息.
- FOR ll_i = 1 To dw_child.RowCount()
- ll_mtrlid = dw_child.Object.u_quotemx_mtrlid[ll_i]
- //取该附件类型中的第一个附件.
- SELECT top 1 fileid,DisplayName,FileType INTO :ll_fileid,:ls_filename,:ls_filetype
- FROM u_file
- WHERE relid = :ll_mtrlid
- AND classid = :ll_classid
- AND (filetype = 'bmp' OR filetype = 'rle' OR filetype = 'wmf'
- OR filetype = 'tif' OR filetype = 'jpg' OR filetype = 'gif' OR filetype = 'jpeg')
- Using sys_fileDB_sqlca;
- IF sys_fileDB_sqlca.SQLCode <> 0 THEN
- ll_fileid = 0
- END IF
- IF ll_fileid > 0 THEN
- Pathname = sys_cur_path+ins_fjtemppath+'\'+String(Today(),'yymmdd')+String(Now(),'hhmmss')+'_'+ls_filename+'.'+ls_filetype
- IF Trim(Pathname) <> '' THEN
- IF ls_uo_fjbt.uf_getfjbolb_fromdb( ll_fileid, ls_filedata, sys_fileDB_sqlca, arg_msg) = 0 THEN
- RETURN 0
- END IF
-
- IF f_saveblobtofile(ls_filedata,Pathname,errmsg) = 0 THEN
- RETURN 0
- ELSE
-
- s_pic.path[ll_i] = Pathname
- //记录临时文件位置,本窗口退出后删除
- wf_addlog_tempfilepathname(Pathname)
-
- END IF
- ELSE
- s_pic.path[ll_i] = ''
- END IF
- ELSE
- s_pic.path[ll_i] = ''
- END IF
- NEXT
- END IF
- //
- END IF
- ////可选设置/ //
- arg_obj_st.uo_const.create_new_pwd( ) //创建随机密码
- IF sys_option_xls_ifuse_passwd = 1 THEN arg_obj_st.uo_const.pwd = Trim(sys_option_xls_user_passwd) //默认加密密码 默认为随即密码
- Boolean xls_locked
- xls_locked = Not (sys_option_xls_lock = 1)
- // Excel 的可选设置
- IF arg_obj_st.of_setoption(arg_ationid, xls_locked,True,arg_msg) <> 1 THEN
- RETURN 0
- END IF
- FOR i = 1 To arg_str_billlist.count
- ////可选操作/ //
- arg_str_billlist.bill[i].ds_data = Create datastore //
- arg_str_billlist.bill[i].ds_data.DataObject = arg_str_billlist.bill[i].datawindow //
- arg_str_billlist.bill[i].ds_data.SetTransObject(sqlca)
-
- //修改点:注意retrieve 参数与上文对应
- arg_str_billlist.bill[i].ds_data.Retrieve(ll_scid,ll_id)
-
- IF ll_ifpic = 1 And ll_classid > 0 THEN
- IF Pos(arg_str_billlist.bill[i].datawindow,'dw_xls_quotemx') > 0 And arg_str_billlist.bill[i].ds_data.RowCount() > 0 THEN //设置图片路径
- FOR ll_j = 1 To arg_str_billlist.bill[i].ds_data.RowCount()
- arg_str_billlist.bill[i].ds_data.Object.pic[ll_j] = s_pic.path[ll_j]
- NEXT
- END IF
- END IF
-
- NEXT
- Destroy ls_uo_fjbt
- RETURN 1
- end function
- public function integer wf_flagstatus_rf ();//wf_flagstatus_rf
- Long pagerert_row
- pagerert_row = dw_pageretr.GetRow()
- IF pagerert_row <= 0 THEN
- cb_auditing.Enabled = False
- cb_auditing_cancel.Enabled = False
- cb_auditing.Text = '审核&F'
- cb_auditing_cancel.Text = '撤审'
- GOTO ext
- END IF
- IF dw_edit_mode THEN
- cb_auditing.Enabled = False
- cb_auditing_cancel.Enabled = False
- cb_auditing.Text = '审核&F'
- cb_auditing_cancel.Text = '撤审'
- ELSE
- IF dw_pageretr.Object.u_quote_flag[pagerert_row] = 0 THEN
- cb_auditing.Enabled = True
- cb_auditing_cancel.Enabled = False
-
- IF sys_option_quote_secaudit = 0 THEN
- cb_auditing.Text = '审核&F'
- cb_auditing_cancel.Text = '撤审'
- ELSE
- cb_auditing.Text = '初审&F'
- cb_auditing_cancel.Text = '撤审'
- END IF
-
- ELSEIF dw_pageretr.Object.u_quote_flag[pagerert_row] = 1 THEN
- cb_auditing.Enabled = False
- cb_auditing_cancel.Enabled = True
-
- IF sys_option_quote_secaudit = 0 THEN
- cb_auditing.Text = '审核&F'
- cb_auditing_cancel.Text = '撤审'
- ELSE
- cb_auditing.Text = '审核&F'
- cb_auditing_cancel.Text = '终撤'
- END IF
- ELSEIF dw_pageretr.Object.u_quote_flag[pagerert_row] = 4 THEN
- cb_auditing.Enabled = True
- cb_auditing_cancel.Enabled = True
-
- IF sys_option_quote_secaudit = 0 THEN
- cb_auditing.Text = '审核&F'
- cb_auditing_cancel.Text = '撤审'
- ELSE
- cb_auditing.Text = '终审&F'
- cb_auditing_cancel.Text = '初撤'
- END IF
- END IF
- END IF
- ext:
- cb_auditing.TriggerEvent('ue_textchange')
- cb_auditing_cancel.TriggerEvent('ue_textchange')
- RETURN 0
- end function
- public subroutine wf_autoaddmx (long arg_mtrlid[], decimal arg_price[], string arg_status[], string arg_woodcode[], string arg_pcode[], decimal arg_rebate[]);Long p_rqmtrl,li
- String ls_mtrlcode,ls_mtrlname,ls_mtrlmode,ls_mtrltype
- Decimal ld_planprice
- Long ll_statusflag,ll_woodcodeflag,ll_pcodeflag
- Long ll_statustype,ll_woodcodetype,ll_pcodetype
- String ls_mtrlsectype,ls_zxmtrlmode,ls_usermtrlmode
- String ls_configname
- string ls_unit
- Long child_row
- dw_child.reset()
- p_rqmtrl = UpperBound(arg_mtrlid)
- FOR li = 1 To p_rqmtrl
- SELECT mtrlcode,
- mtrlname,
- mtrlmode,
- mtrltype,
- planprice,
- statusflag,
- woodcodeflag,
- pcodeflag,
- statustype,
- woodcodetype,
- pcodetype,
- mtrlsectype,
- zxmtrlmode,
- usermtrlmode,
- configname,
- unit
- INTO :ls_mtrlcode,
- :ls_mtrlname,
- :ls_mtrlmode,
- :ls_mtrltype,
- :ld_planprice,
- :ll_statusflag,
- :ll_woodcodeflag,
- :ll_pcodeflag,
- :ll_statustype,
- :ll_woodcodetype,
- :ll_pcodetype,
- :ls_mtrlsectype,
- :ls_zxmtrlmode,
- :ls_usermtrlmode,
- :ls_configname,
- :ls_unit
- FROM u_mtrldef
- Where mtrlid = :arg_mtrlid[li];
- IF sqlca.SQLCode = 0 THEN
- child_row = dw_child.InsertRow (0)
-
- dw_child.Object.u_quotemx_mtrlid[child_row] = arg_mtrlid[li]
- dw_child.Object.u_quotemx_mtrlcode [child_row] = ls_mtrlcode
- dw_child.Object.u_quotemx_mtrlname [child_row] = ls_mtrlname
- dw_child.Object.u_quotemx_mtrlmode [child_row] = ls_mtrlmode
- dw_child.Object.u_quotemx_unit [child_row] = ls_unit
-
- ld_planprice = f_get_planprice(arg_mtrlid[li],arg_status[li],arg_woodcode[li],arg_pcode[li],true)
- dw_child.Object.u_quotemx_planprice [child_row] = ld_planprice
- dw_child.Object.u_quotemx_status[child_row] = arg_status[li]
- dw_child.Object.u_quotemx_woodcode[child_row] = arg_woodcode[li]
- dw_child.Object.u_quotemx_pcode[child_row] = arg_pcode[li]
- dw_child.Object.u_quotemx_sumprice[child_row] = arg_price[li]
- dw_child.Object.u_quotemx_sumprice_1[child_row] = arg_price[li]
- dw_child.Object.u_quotemx_rebate[child_row] = arg_rebate[li]
-
- END IF
- NEXT
- end subroutine
- public subroutine wf_change_dscrp_addrow (long arg_row);IF Not dw_edit_mode THEN RETURN
- Long ll_i
- FOR ll_i = 1 To it_mxbt
- IF ins_printid[ll_i] >= arg_row THEN
- ins_printid[ll_i] = ins_printid[ll_i] + 1
- END IF
- NEXT
- end subroutine
- public subroutine wf_change_dscrp_delrow (long arg_row);IF Not dw_edit_mode THEN RETURN
- Long ll_i
- FOR ll_i = it_mxbt To 1 Step -1
- IF ins_printid[ll_i] = arg_row THEN
- ins_printid[ll_i] = -1
- END IF
- NEXT
- FOR ll_i = 1 To it_mxbt
- IF ins_printid[ll_i] >= arg_row THEN
- ins_printid[ll_i] = ins_printid[ll_i] - 1
- END IF
- NEXT
- end subroutine
- on w_quote_record.create
- int iCurrent
- call super::create
- this.ddlb_scid=create ddlb_scid
- this.ddlb_status=create ddlb_status
- this.st_2=create st_2
- this.st_3=create st_3
- this.st_4=create st_4
- this.ddlb_ch=create ddlb_ch
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.ddlb_scid
- this.Control[iCurrent+2]=this.ddlb_status
- this.Control[iCurrent+3]=this.st_2
- this.Control[iCurrent+4]=this.st_3
- this.Control[iCurrent+5]=this.st_4
- this.Control[iCurrent+6]=this.ddlb_ch
- end on
- on w_quote_record.destroy
- call super::destroy
- destroy(this.ddlb_scid)
- destroy(this.ddlb_status)
- destroy(this.st_2)
- destroy(this.st_3)
- destroy(this.st_4)
- destroy(this.ddlb_ch)
- end on
- event open;THIS.TriggerEvent('ue_before_open')
- wf_movetocenter()
- OLD_TITLE = THIS.Title
- s_tran = Message.PowerObjectParm
- IF NOT IsNull(s_tran) THEN
- retrieve_all = s_tran.if_retrieve_all
- mode = s_tran.work_mode
- arg_pkid = s_tran.arg_pkid
- arg_string_code = s_tran.arg_string_code
- if_sharedata = s_tran.if_sharedata //是否应用sharedata,当retrieve_all=true是生效
- ds_share = s_tran.ds_share
- END IF
- dw_pageretr.RBUTTON_FILTER_USE = TRUE //右键查询功能开关
- dw_pageretr.titleclick_sort_use = TRUE //单击标题排序功能开关
- dw_pageretr.SetTransObject (sqlca)
- pkcolumndbtname = wf_get_pkcolumndbtname(dw_pageretr) //取第一列为关键字
- ori_oldselect = dw_pageretr.Describe("DataWindow.Table.Select")
- ls_newselect = ori_oldselect
- ds_curquery = CREATE DATASTORE
- ds_curquery.DataObject = 'd_extr_find'
- ds_curquery.SetTransObject (sqlca)
- wf_editindex_lockf()
- sle_usual_query.Text = Trim(arg_string_code)
- IF NOT retrieve_all THEN
- THIS.TriggerEvent("ue_usual_query_RETR") //修改ls_newselect,retrieve
- ELSE
- IF if_sharedata THEN
- ds_share.ShareData(dw_pageretr)
- ELSE
- wf_retrieveuc(dw_pageretr,ls_newselect,1)
- THIS.TriggerEvent('RETRIEVE_pageretr')
- END IF
- END IF
- IF retrieve_all THEN
- THIS.TriggerEvent("ue_usual_query_filt")
- END IF
- uc_column_int = 7 //uc dw前6列可以编辑
- child_column_int = 14//子dw前3列可以编辑
- uo_quote_mtrl = CREATE uo_quote
- uo_quote_mtrl.commit_transaction = sqlca
- uo_fieb = create uo_ljfieb
- uo_fieb.commit_transaction = sys_email_sqlca
- s_hide_col s_col,s_col_1
- s_col.col_1 = 'u_quotemx_profit_margin'
- s_col.col_2 = 'u_quotemx_mancost'
- s_col.col_3 = 'u_quotemx_outcost'
- s_col.col_4 = 'u_quotemx_planprice'
- s_col.col_5 = 'u_quotemx_wfjgprice'
- s_col.col_6 = 'allamt_1'
- s_col.col_7 = 'allprice'
- s_col.col_8 = 'allamt'
- f_hide_col(1395,dw_child,s_col)
- s_col_1.col_1 = 'u_quotemx_mtrlcost'
- f_hide_col(1395,dw_child,s_col_1)
- IF s_tran.d_long = 1 AND UpperBound(s_tran.arr_long) > 0 THEN
- cur_scid = s_tran.c_long
- Int li_item
- li_item = ddlb_scid.FindItem(s_tran.d_string,0)
- IF li_item > 0 THEN
- ddlb_scid.SelectItem(li_item)
- END IF
- String arg_msg
- cb_add.TriggerEvent(Clicked!)
- IF dw_uc.GetRow() > 0 THEN
- IF s_tran.e_long > 0 THEN
- String ls_cuscode,ls_name
- SELECT cuscode,name
- INTO :ls_cuscode,:ls_name
- FROM u_cust
- Where cusid = :s_tran.e_long;
- IF sqlca.SQLCode = 0 THEN
- dw_uc.Object.u_quote_cusid[dw_uc.GetRow()] = s_tran.e_long
- dw_uc.Object.u_cust_name[dw_uc.GetRow()] = ls_name
- dw_uc.Object.u_cust_cuscode[dw_uc.GetRow()] = ls_cuscode
- END IF
- END IF
- dw_uc.Object.u_quote_moneyid[dw_uc.GetRow()] = s_tran.f_long
- dw_uc.Object.u_quote_assign_emp[dw_uc.GetRow()] = publ_operator
-
- END IF
-
- wf_autoaddmx(s_tran.arr_long[],s_tran.arr_dec[],s_tran.arr_string[],s_tran.arr_string2[],s_tran.arr_string3[],s_tran.arr_dec2[])
- END IF
- ins_if_info = Long(f_ProfileString (sys_empid,'w_quote', "ins_if_info",'0'))
- IF ins_if_info = 1 THEN
- THIS.PostEvent('ue_mtrl_info')
- END IF
- end event
- event close;call super::close;destroy uo_quote_mtrl
- wf_del_tempfilepathname()
- IF IsValid(w_mtrl_info) THEN
- ins_if_info = 1
- ELSE
- ins_if_info = 0
- END IF
- f_SetProfileString(sys_empid,"w_quote","ins_if_info",String(ins_if_info))
- end event
- event retrieve_childdw;Long row,uc_relid,uc_scid
- row = dw_pageretr.GetRow()
- IF row > 0 THEN
- uc_relid = dw_pageretr.Object.u_quote_quoteid[row]
- uc_scid = dw_pageretr.Object.u_quote_scid[row]
- dw_child.SetRedraw (FALSE)
- dw_child.Retrieve(uc_scid,uc_relid)
- dw_child.SetRedraw (TRUE)
- IF dw_child.RowCount() > 0 THEN
- dw_child.SelectRow(0,FALSE)
- dw_child.SelectRow(1,TRUE)
- dw_child.SetRow(1)
- END IF
- ELSE
- dw_child.Reset()
- END IF
- end event
- event retrieve_pageretr;Boolean cb_nextpage_enabled,cb_retrieveall_enabled
- Boolean cb_func_enabled,cb_retrieve_enabled
- cb_nextpage_enabled = cb_nextpage.Enabled
- cb_retrieveall_enabled = cb_retrieveall.Enabled
- cb_func_enabled = cb_func.Enabled
- cb_nextpage.Enabled = FALSE
- cb_retrieveall.Enabled = FALSE
- cb_func.Enabled = FALSE
- dw_uc.Retrieve()
- dw_pageretr.Retrieve(cur_scid_arr,cur_flag,sys_areaid,sys_user_outrep,sys_option_outrep)
- IF dw_pageretr.RowCount() > 0 THEN
- dw_pageretr.SetRow(1)
- dw_pageretr.triggerevent(rowfocuschanged!)
- end if
- wf_flagstatus_rf()
- THIS.TriggerEvent('retrieve_childdw')
- cb_nextpage.Enabled = cb_nextpage_enabled
- cb_retrieveall.Enabled = cb_retrieveall_enabled
- cb_func.Enabled = cb_func_enabled
- end event
- event ue_usual_query_filt;string obj_expr=''
- if trim(sle_usual_query.text)<>'' then
- IF POS(trim(sle_usual_query.text),'%')=0 THEN
- obj_expr=obj_expr+'( quotecode LIKE "%'+trim(sle_usual_query.text)+'%" )'
- ELSE
- obj_expr=obj_expr+'( quotecode LIKE "'+trim(sle_usual_query.text)+'" )'
- END IF
- end if
- dw_pageretr.setfilter(obj_expr)
- dw_pageretr.SetRedraw(False)
- dw_pageretr.filter()
- if dw_pageretr.rowcount()>=1 then
- dw_pageretr.selectrow(0,false)
- dw_pageretr.selectrow(1,true)
- end if
- dw_pageretr.SetRedraw(TRUE)
- end event
- event ue_usual_query_retr;string ls_querystrpart=''
- ls_newselect=lower(ori_oldselect)
- if trim(sle_usual_query.text)<>'' then
- if pos(trim(sle_usual_query.text),'%')=0 then
- ls_querystrpart="( quotecode like '%"+trim(sle_usual_query.text)+"%')"
- else
- ls_querystrpart="( quotecode like '"+trim(sle_usual_query.text)+"')"
- end if
- if Pos(ls_newselect," where ") <> 0 then
- ls_newselect=ls_newselect+" AND ("+ls_querystrpart+')'
- else
- ls_newselect=ls_newselect+" where ("+ls_querystrpart+')'
- end if
- end if
- wf_retrieveuc(dw_pageretr,ls_newselect,1)
- this.triggerevent('retrieve_pageretr')
- end event
- event ue_f9;call super::ue_f9;
- IF Not dw_edit_mode THEN RETURN
- Long child_row
- child_row = dw_uc.GetRow()
- IF child_row = 0 THEN
- MessageBox('系统提示','请选定报价单!')
- RETURN
- END IF
- dw_uc.AcceptText()
- IF Not IsValid(W_cust_edit) THEN
- s_edit_index_tran s_ch_tran //传递参数使用
- s_ch_tran.if_retrieve_all = False //是否一次RETRIEVE所有行
- s_ch_tran.work_mode = 1 //0-单纯编辑模式 1-选择\编辑模式
- s_ch_tran.arg_pkid = 0 //目标定位PKID (备用)
- //查询列(物料编码)部分内容,用于初步筛选
- s_ch_tran.arg_string_code = Upper(Trim(dw_uc.Object.u_cust_cuscode[dw_uc.GetRow()]))
-
- //b_long 是否显示非正式客户
- IF f_power_ind(3822,sys_msg_pow) THEN
- s_ch_tran.b_long = 1
- ELSE
- s_ch_tran.b_long = 0
- END IF
-
- OpenWithParm(W_cust_edit,s_ch_tran) //调用
-
- s_custom S_INSCUST
- S_INSCUST = Message.PowerObjectParm //接受返回结构
-
- IF S_INSCUST.cusid > 0 THEN //正常返回值则可以取以下值
- dw_uc.Object.u_quote_cusid[child_row] = S_INSCUST.cusid
- dw_uc.Object.u_cust_name[child_row] = S_INSCUST.Name
- dw_uc.Object.u_cust_cuscode[child_row] = S_INSCUST.cuscode
- dw_uc.Object.u_quote_assign_emp[child_row] = S_INSCUST.bsntype
- dw_uc.SetRedraw(True)
- dw_uc.SetColumn("u_quote_quotedate")
- END IF
- END IF
- end event
- event ue_f8;call super::ue_f8;//用于选择明细内容,被f8[默认]\dw_child.doubleclicked调用
- IF Not dw_edit_mode THEN RETURN
- Long child_row
- Long ls_cusid
- String ls_sonmtrlname
- child_row = dw_child.GetRow()
- Decimal i_newprice
- Long ll_moneyid
- String ls_usermtrlmode
- Int li_int
- String ls_str
- Int li_statusflag,li_woodcodeflag,li_pcodeflag
- Long ll_statustype,ll_woodcodetype,ll_pcodetype
- Decimal ld_planprice
- String ls_configname
- String ls_status_config,ls_woodcode_config,ls_pcode_config
- String ls_mtrlengname
- Long ll_pricelistid
- String ls_cusmtrlname
- String ls_simplename,ls_configcode,ls_mtrlcolor
- String ls_prdpackcode
- Decimal ld_packqty,ld_net_weight,ld_gross_weight,ld_cubage
- s_mtrldef_array arg_s_mtrldef
- dw_uc.AcceptText()
- ls_cusid = dw_uc.Object.u_quote_cusid[dw_uc.GetRow()]
- IF IsNull(ls_cusid) Or ls_cusid = 0 THEN
- This.TriggerEvent("ue_f9")
-
- dw_uc.AcceptText()
- ls_cusid = dw_uc.Object.u_quote_cusid[dw_uc.GetRow()]
- IF IsNull(ls_cusid) Or ls_cusid = 0 THEN RETURN
- END IF
- ll_moneyid = dw_uc.Object.u_quote_moneyid[dw_uc.GetRow()]
- IF IsNull(ll_moneyid) Or ll_moneyid = 0 THEN
- MessageBox('系统提示','请先选择币种')
- RETURN
- END IF
- IF ddlb_ch.Text = '选物料资料' THEN
- // IF sys_option_saletask_pzch = 0 THEN
-
- IF Not IsValid(w_mtrldef_edit) THEN
- s_edit_index_tran s_tranf8 //传递参数使用
- s_tranf8.if_retrieve_all = False //是否一次retrieve所有行
- s_tranf8.work_mode = 1 //0-单纯编辑模式 1-选择\编辑模式
- s_tranf8.arg_pkid = 0 //目标定位pkid (备用)
- s_tranf8.arg_string_code = '' //查询列(物料编码)部分内容,用于初步筛选
- s_tranf8.if_select_all = True //多选
- s_tranf8.b_long = 0 //选产品
- s_tranf8.f_long = -1
-
- Long ls_j
- IF dw_child.GetRow() > 0 THEN s_tranf8.arg_string_code = Trim(dw_child.Object.u_quotemx_mtrlcode[dw_child.GetRow()])
- OpenWithParm(w_mtrldef_edit,s_tranf8) //调用
-
- s_mtrldef_array s_inscust
- s_inscust = Message.PowerObjectParm //接受返回结构
-
- dw_child.SetRedraw(False)
- FOR ls_j = 1 To UpperBound(s_inscust.mtrlid)
- IF s_inscust.mtrlid[ls_j] > 0 THEN //正常返回值则可以取以下值
- IF dw_child.GetRow() > 0 THEN
- IF dw_child.Object.u_quotemx_mtrlcode[child_row] <> '' THEN
- child_row = dw_child.InsertRow (0)
- ELSE
- child_row = dw_child.GetRow()
- END IF
- ELSE
- child_row = dw_child.InsertRow (0)
- END IF
-
- dw_child.Object.u_quotemx_mtrlid[child_row] = s_inscust.mtrlid[ls_j]
- dw_child.Object.u_quotemx_mtrlcode [child_row] = s_inscust.mtrlcode[ls_j]
- dw_child.Object.u_quotemx_mtrlname [child_row] = s_inscust.mtrlname[ls_j]
- dw_child.Object.u_quotemx_mtrlmode [child_row] = s_inscust.mtrlmode[ls_j]
- dw_child.Object.u_quotemx_unit [child_row] = s_inscust.unit[ls_j]
- dw_child.Object.u_quotemx_planprice [child_row] = s_inscust.planprice[ls_j]
- wf_getrprice(s_inscust.mtrlid[ls_j],i_newprice )
- dw_child.Object.u_quotemx_maxprice[child_row] = i_newprice
- IF s_inscust.statusflag[ls_j] = 4 THEN
- dw_child.Object.u_quotemx_status[child_row] = s_inscust.status_config[ls_j]
- END IF
-
- IF s_inscust.woodcodeflag[ls_j] = 4 THEN
- dw_child.Object.u_quotemx_woodcode[child_row] = s_inscust.woodcode_config[ls_j]
- END IF
-
- IF s_inscust.pcodeflag[ls_j] = 4 THEN
- dw_child.Object.u_quotemx_pcode[child_row] = s_inscust.pcode_config[ls_j]
- END IF
-
- END IF
- NEXT
- dw_child.SetRedraw(True)
- This.TriggerEvent('ue_allowedit')
- dw_child.SetFocus()
- dw_child.SetColumn ('u_quotemx_mtrlcode')
- END IF
-
- // ELSE
- // s_edit_index_tran s_tranf8_pz //传递参数使用
- // s_tranf8_pz.if_retrieve_all = False //是否一次retrieve所有行
- // s_tranf8_pz.work_mode = 1 //0-单纯编辑模式 1-选择\编辑模式
- // s_tranf8_pz.arg_pkid = 0 //目标定位pkid (备用)
- // s_tranf8_pz.arg_string_code = '' //查询列(物料编码)部分内容,用于初步筛选
- // s_tranf8_pz.if_select_all = True //多选
- // s_tranf8_pz.b_long = 0 //选产品
- // s_tranf8_pz.d_long = -1
- // s_tranf8_pz.e_long = ls_cusid
- // IF cur_scid < 0 THEN
- // s_tranf8_pz.c_long = dw_uc.Object.u_saletask_scid[dw_uc.GetRow()]
- // ELSE
- // s_tranf8_pz.c_long = cur_scid
- // END IF
- // s_tranf8_pz.f_string = dw_uc.Object.u_cust_name[dw_uc.GetRow()]
- // s_tranf8_pz.g_long = 0
- // s_tranf8_pz.h_long = dw_uc.Object.u_quote_moneyid[dw_uc.GetRow()]
- //
- // IF dw_child.GetRow() > 0 THEN s_tranf8_pz.arg_string_code = Trim(dw_child.Object.u_quotemx_mtrlcode[dw_child.GetRow()])
- //
- // This.Enabled = False
- //
- // OpenWithParm(w_mtrlware_storageid_ch_saletask_pz,s_tranf8_pz)
- //
- // This.Enabled = True
- //
- // s_mtrldef_array s_inscust_pz
- // s_inscust_pz = Message.PowerObjectParm //接受返回结构
- //
- // dw_child.SetRedraw(False)
- // FOR ls_j = 1 To UpperBound(s_inscust_pz.mtrlid)
- // IF s_inscust_pz.mtrlid[ls_j] > 0 THEN //正常返回值则可以取以下值
- // IF dw_child.GetRow() > 0 THEN
- // IF dw_child.Object.u_quotemx_mtrlcode[child_row] <> '' THEN
- // child_row = dw_child.InsertRow (0)
- // ELSE
- // child_row = dw_child.GetRow()
- // END IF
- // ELSE
- // child_row = dw_child.InsertRow (0)
- // END IF
- //
- // dw_child.Object.u_quotemx_mtrlid[child_row] = s_inscust_pz.mtrlid[ls_j]
- // dw_child.Object.u_quotemx_mtrlcode [child_row] = s_inscust_pz.mtrlcode[ls_j]
- // dw_child.Object.u_quotemx_mtrlname [child_row] = s_inscust_pz.mtrlname[ls_j]
- // dw_child.Object.u_quotemx_mtrlmode [child_row] = s_inscust_pz.mtrlmode[ls_j]
- // dw_child.Object.u_quotemx_unit [child_row] = s_inscust_pz.unit[ls_j]
- // dw_child.Object.u_quotemx_planprice [child_row] = s_inscust_pz.planprice[ls_j]
- // wf_getrprice(s_inscust_pz.mtrlid[ls_j],i_newprice )
- // dw_child.Object.u_quotemx_maxprice[child_row] = i_newprice
- //
- // dw_child.Object.u_quotemx_status[child_row] = s_inscust_pz.status[ls_j]
- // dw_child.Object.u_quotemx_woodcode[child_row] = s_inscust_pz.woodcode[ls_j]
- // dw_child.Object.u_quotemx_pcode[child_row] = s_inscust_pz.pcode[ls_j]
- //
- // IF li_statusflag = 4 And s_inscust_pz.status[ls_j] = '' THEN
- // dw_child.Object.u_quotemx_status[child_row] = ls_status_config
- // END IF
- //
- // IF li_woodcodeflag = 4 And s_inscust_pz.woodcode[ls_j] = '' THEN
- // dw_child.Object.u_quotemx_woodcode[child_row] = ls_woodcode_config
- // END IF
- //
- // IF li_pcodeflag = 4 And s_inscust_pz.pcode[ls_j] = '' THEN
- // dw_child.Object.u_quotemx_pcode[child_row] = ls_pcode_config
- // END IF
- //
- //
- // END IF
- // NEXT
- // dw_child.SetRedraw(True)
- // This.TriggerEvent('ue_allowedit')
- // dw_child.SetFocus()
- // dw_child.SetColumn ('u_quotemx_mtrlcode')
- //
- //
- // END IF
-
- ELSEIF ddlb_ch.Text = '选客户价格' THEN
-
- IF Not IsValid(w_cus_price_ch) THEN
- s_edit_index_tran s_tranf9 //传递参数使用
- s_tranf9.if_retrieve_all = False //是否一次retrieve所有行
- s_tranf9.work_mode = 1 //0-单纯编辑模式 1-选择\编辑模式
- s_tranf9.arg_pkid = 0 //目标定位pkid (备用)
- s_tranf9.arg_string_code = '' //查询列(物料编码)部分内容,用于初步筛选
- s_tranf9.if_select_all = True //多选
- s_tranf9.c_long = ls_cusid
- s_tranf9.e_long = 0
- s_tranf9.f_long = ll_moneyid
-
- IF dw_child.GetRow() > 0 THEN s_tranf9.arg_string_code = Trim(dw_child.Object.u_quotemx_mtrlcode[dw_child.GetRow()])
- OpenWithParm(w_cus_price_ch,s_tranf9) //调用
-
- s_cus_price_ch s_inscust_cus
- s_inscust_cus = Message.PowerObjectParm //接受返回结构
-
- dw_child.SetRedraw(False)
- FOR ls_j = 1 To UpperBound(s_inscust_cus.mtrlid)
- IF s_inscust_cus.mtrlid[ls_j] > 0 THEN //正常返回值则可以取以下值
- IF dw_child.GetRow() > 0 THEN
- IF dw_child.Object.u_quotemx_mtrlcode[child_row] <> '' THEN
- child_row = dw_child.InsertRow (0)
- ELSE
- child_row = dw_child.GetRow()
- END IF
- ELSE
- child_row = dw_child.InsertRow (0)
- END IF
-
- dw_child.Object.u_quotemx_mtrlid[child_row] = s_inscust_cus.mtrlid[ls_j]
- dw_child.Object.u_quotemx_mtrlcode[child_row] = s_inscust_cus.mtrlcode[ls_j]
- dw_child.Object.u_quotemx_mtrlname[child_row] = s_inscust_cus.mtrlname[ls_j]
- dw_child.Object.u_quotemx_mtrlmode[child_row] = s_inscust_cus.mtrlmode[ls_j]
- dw_child.Object.u_quotemx_unit[child_row] = s_inscust_cus.unit[ls_j]
- wf_getrprice(s_inscust_cus.mtrlid[ls_j],i_newprice )
- dw_child.Object.u_quotemx_maxprice[child_row] = i_newprice
-
-
- dw_child.Object.u_quotemx_status[child_row] = s_inscust_cus.status[ls_j]
- dw_child.Object.u_quotemx_woodcode[child_row] = s_inscust_cus.woodcode[ls_j]
- dw_child.Object.u_quotemx_pcode[child_row] = s_inscust_cus.pcode[ls_j]
-
- dw_child.Object.u_quotemx_sumprice[child_row] = s_inscust_cus.fprice[ls_j]
- dw_child.Object.u_quotemx_sumprice_1[child_row] = s_inscust_cus.fprice[ls_j]
- dw_child.Object.u_quotemx_rebate[child_row] = s_inscust_cus.zqrate[ls_j]
-
- dw_child.Object.u_quotemx_planprice[child_row] = ld_planprice
-
-
- END IF
- NEXT
- dw_child.SetRedraw(True)
- This.TriggerEvent('ue_allowedit')
- dw_child.SetFocus()
- dw_child.SetColumn ('u_quotemx_mtrlcode')
- END IF
- ELSE
-
- IF ddlb_ch.Text = '选客户价格表' THEN
- IF ls_cusid <= 0 THEN
- MessageBox('系统提示','请先选择客户')
- RETURN
- END IF
-
- SELECT pricelistid
- INTO :ll_pricelistid
- FROM u_cust
- Where cusid = :ls_cusid;
- IF sqlca.SQLCode <> 0 THEN
- MessageBox('Error','查询客户指定的价格表失败,'+sqlca.SQLErrText)
- RETURN
- END IF
-
- IF ll_pricelistid = 0 THEN
- MessageBox('系统提示','客户未指定价格表,请先指定')
- RETURN
- END IF
-
- ELSEIF ddlb_ch.Text = '选指定价格表' THEN
- IF Not IsValid(w_sale_price_list_ch) THEN
-
- OpenWithParm(w_sale_price_list_ch,ll_moneyid) //调用
-
- s_pricelist_ch S_INSCUST_list
- S_INSCUST_list = Message.PowerObjectParm //接受返回结构
-
- IF S_INSCUST_list.pricelistid > 0 THEN //正常返回值则可以取以下值
- ll_pricelistid = S_INSCUST_list.pricelistid
- ELSE
- RETURN
- END IF
- END IF
-
- END IF
-
- IF Not IsValid(w_sale_price_ch) THEN
- s_edit_index_tran s_tranf10 //传递参数使用
- s_tranf10.if_retrieve_all = False //是否一次retrieve所有行
- s_tranf10.work_mode = 1 //0-单纯编辑模式 1-选择\编辑模式
- s_tranf10.arg_pkid = 0 //目标定位pkid (备用)
- s_tranf10.arg_string_code = '' //查询列(物料编码)部分内容,用于初步筛选
- s_tranf10.if_select_all = True //多选
-
- s_tranf10.c_long = ll_pricelistid
-
-
- IF child_row > 0 THEN s_tranf10.arg_string_code = Trim(dw_child.Object.u_quotemx_mtrlcode[child_row])
-
- OpenWithParm(w_sale_price_ch,s_tranf10) //调用
-
- s_sale_price_arr s_inscust_p
- s_inscust_p = Message.PowerObjectParm //接受返回结构
-
- dw_child.SetRedraw(False)
- FOR ls_j = 1 To UpperBound(s_inscust_p.mtrlid)
- IF s_inscust_p.mtrlid[ls_j] > 0 THEN //正常返回值则可以取以下值
- IF dw_child.GetRow() > 0 THEN
- IF dw_child.Object.u_quotemx_mtrlcode[child_row] <> '' THEN
- child_row = dw_child.InsertRow (0)
- ELSE
- child_row = dw_child.GetRow()
- END IF
- ELSE
- child_row = dw_child.InsertRow (0)
- END IF
-
- dw_child.Object.u_quotemx_mtrlid[child_row] = s_inscust_p.mtrlid[ls_j]
- dw_child.Object.u_quotemx_mtrlcode[child_row] = s_inscust_p.mtrlcode[ls_j]
- dw_child.Object.u_quotemx_mtrlname[child_row] = s_inscust_p.mtrlname[ls_j]
- dw_child.Object.u_quotemx_mtrlmode[child_row] = s_inscust_p.mtrlmode[ls_j]
- dw_child.Object.u_quotemx_unit[child_row] = s_inscust_p.unit[ls_j]
- wf_getrprice(s_inscust_p.mtrlid[ls_j],i_newprice )
- dw_child.Object.u_quotemx_maxprice[child_row] = i_newprice
-
- dw_child.Object.u_quotemx_status[child_row] = s_inscust_p.status[ls_j]
- dw_child.Object.u_quotemx_woodcode[child_row] = s_inscust_p.woodcode[ls_j]
- dw_child.Object.u_quotemx_pcode[child_row] = s_inscust_p.pcode[ls_j]
-
- dw_child.Object.u_quotemx_sumprice[child_row] = s_inscust_p.price[ls_j]
- dw_child.Object.u_quotemx_sumprice_1[child_row] = s_inscust_p.price[ls_j]
- dw_child.Object.u_quotemx_rebate[child_row] = 1
-
-
-
- dw_child.Object.u_quotemx_planprice[child_row] = ld_planprice
-
-
-
- dw_child.SetColumn('u_quotemx_mtrlcode')
- END IF
-
- NEXT
- dw_child.SetRedraw(True)
- dw_child.SetFocus()
- END IF
-
-
- END IF
- end event
- event ue_viewprint;call super::ue_viewprint;
- Long LS_ROW
- long ll_powerid = 1680
- LS_ROW = dw_pageretr.GetRow()
- IF LS_ROW <= 0 THEN
- MessageBox('NO','没有打印目标单据!')
- RETURN
- END IF
- S_print_MSG LS_PRMSG
- if ls_powerid = 0 then ls_powerid = ll_powerid
- IF ls_newname <> '' THEN
- IF NOT f_power_ind(ls_powerid,sys_msg_pow) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
-
- IF li_auditprint = 1 THEN
- IF dw_pageretr.Object.u_quote_flag[dw_pageretr.GetRow()] = 0 THEN
- MessageBox('NO','目标单据还未审核,不能打印!')
- RETURN
- END IF
- END IF
-
- LS_PRMSG.obj_dwNAME = ls_newname
- ELSE
- IF NOT f_power_ind(ll_powerid,sys_msg_pow) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
-
- LS_PRMSG.obj_dwNAME = 'dw_rp_quote_record'
- END IF
- IF LS_PRMSG.obj_dwNAME = '' THEN RETURN
- LS_PRMSG.printrow = ll_prownum
- LS_PRMSG.TAG_TEXT = '报价单'
- LS_PRMSG.FILTER_STRING = ''
- LS_PRMSG.retr_pram_falg = 15
- LS_PRMSG.PAGECH_FLAG = 0
- LS_PRMSG.retr_scid = dw_pageretr.Object.u_quote_scid[LS_ROW]
- LS_PRMSG.retr_pramnmb = dw_pageretr.Object.u_quote_quoteid[LS_ROW]
- LS_PRMSG.rowcnt = dw_child.RowCount()
- OpenWithParm(w_publ_preview,LS_PRMSG)
- //**更新打印次料
- String arg_msg
- printnum = Message.DoubleParm
- Long ll_scid
- String ls_code
- ll_scid = dw_pageretr.Object.u_quote_scid[dw_pageretr.GetRow()]
- ls_code = dw_pageretr.Object.u_quote_quotecode[dw_pageretr.GetRow()]
- f_update_printnum2(ll_scid,ls_code,TRUE,printnum,arg_msg,TRUE)
- end event
- event ue_print;call super::ue_print;//--直接打印
- uo_print_preview uo_print
- IF MessageBox ("IF","是否确定要打印当前单据吗?",Question!,YesNo! ) = 2 THEN RETURN
- S_print_MSG LS_PRMSG
- Long LS_ROW
- long ll_powerid = 1680
- LS_ROW = dw_pageretr.GetRow()
- IF LS_ROW <= 0 THEN
- MessageBox('NO','没有打印目标单据!')
- RETURN
- END IF
- if ls_powerid = 0 then ls_powerid = ll_powerid
- IF ls_newname <> '' THEN
- IF Not f_power_ind(ls_powerid,sys_msg_pow) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
-
- IF li_auditprint = 1 THEN
- IF dw_pageretr.Object.u_quote_flag[dw_pageretr.GetRow()] = 0 THEN
- MessageBox('NO','目标单据还未审核,不能打印!')
- RETURN
- END IF
- END IF
-
- LS_PRMSG.obj_dwNAME = ls_newname
- ELSE
-
- IF NOT f_power_ind(1680,sys_msg_pow) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
-
- LS_PRMSG.obj_dwNAME = 'dw_rp_quote_record'
- END IF
- if LS_PRMSG.obj_dwNAME = '' then return
- LS_PRMSG.retr_pram_falg = 15
- LS_PRMSG.printrow = ll_prownum
- LS_PRMSG.TAG_TEXT = '报价单'
- LS_PRMSG.FILTER_STRING = ''
- LS_PRMSG.PAGECH_FLAG = 0
- LS_PRMSG.retr_scid = dw_pageretr.Object.u_quote_scid[LS_ROW]
- LS_PRMSG.retr_pramnmb = dw_pageretr.Object.u_quote_quoteid[LS_ROW]
- LS_PRMSG.rowcnt = dw_child.RowCount()
- uo_print.FACT_PRINT_MSG = LS_PRMSG
- String arg_msg
- IF uo_print.uof_print_begin(arg_msg) = 0 THEN
- MessageBox("系统提示",arg_msg)
- RETURN
- END IF
- uo_print.ds_print()
- //**更新打印次料
- printnum = 1
- Long ll_scid
- String ls_code
- ll_scid = dw_pageretr.Object.u_quote_scid[dw_pageretr.GetRow()]
- ls_code = dw_pageretr.Object.u_quote_quotecode[dw_pageretr.GetRow()]
- f_update_printnum2(ll_scid,ls_code,TRUE,printnum,arg_msg,TRUE)
- end event
- event ue_addzy;call super::ue_addzy;IF NOT f_power_ind(1679,sys_msg_pow) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
- if dw_edit_mode then return
- string arg_msg='',LS_STR
- long uc_row
- s_inputbox S_SREU
- uc_row=dw_pageretr.getrow()
- if uc_row<=0 then
- messagebox('系统提示','请选定当前目标单据!')
- return
- end if
- S_SREU.TITLE='请输入要补充到备注的内容'
- S_SREU.OLD_TEXT=''
- openwithparm(w_inputbox,S_SREU)
- LS_STR=Message.StringParm
- if trim(LS_STR)='' or isnull(LS_STR) then return
- if uo_quote_mtrl.p_getinfo(dw_pageretr.object.u_quote_scid[uc_row],dw_pageretr.object.u_quote_quoteid[uc_row],arg_msg)=0 then
- messagebox('Error!',arg_msg)
- return
- end if
- if uo_quote_mtrl.add_dscrp(dw_pageretr.object.u_quote_scid[uc_row],dw_pageretr.object.u_quote_quoteid[uc_row],LS_STR,arg_msg,true)=0 then
- messagebox('Error!',arg_msg)
- return
- else
- messagebox(publ_operator,'添加备注操作成功!')
- wf_refresh_curuc(dw_pageretr.object.u_quote_scid[uc_row],dw_pageretr.object.u_quote_quoteid[uc_row])
- end if
- end event
- event ue_rpt_print;call super::ue_rpt_print;
- Long row,uc_relid,ll_scid
- row = dw_pageretr.GetRow()
- IF row = 0 THEN RETURN
- uo_rpt_print_preview uo_print
- S_rpt_print_MSG LS_PRMSG
- IF dw_pageretr.RowCount() = 0 THEN
- MessageBox('系统信息','没有可打印的单据!')
- RETURN
- END IF
- IF ls_rpname = '' THEN RETURN
- IF li_auditprint = 1 THEN
- IF dw_pageretr.Object.u_quote_flag[row] = 0 THEN
- MessageBox('NO','目标单据还未审核,不能打印!')
- RETURN
- END IF
- END IF
- IF MessageBox ("IF","是否确定要打印当前单据吗?",Question!,YesNo! ) = 2 THEN RETURN
- LS_PRMSG.retr_pram_falg = 15
- LS_PRMSG.TAG_TEXT = THIS.Title
- LS_PRMSG.rpname = ls_rpname
- LS_PRMSG.FILTER_STRING = ''
- LS_PRMSG.PAGECH_FLAG = 0
- LS_PRMSG.rpid = ls_msgprintid_rpt
- LS_PRMSG.retr_scid = dw_pageretr.Object.u_quote_scid[row]
- LS_PRMSG.retr_pramnmb = dw_pageretr.Object.u_quote_quoteid[row]
- LS_PRMSG.rowcnt = dw_child.RowCount()
- uo_print.FACT_PRINT_MSG = LS_PRMSG
- String arg_msg
- IF uo_print.uof_print_begin(arg_msg) = 0 THEN
- MessageBox("系统提示",arg_msg)
- RETURN
- END IF
- uo_print.ds_print()
- //**更新打印次料
- printnum = Message.DoubleParm
- String ls_code
- ll_scid = dw_pageretr.Object.u_quote_scid[row]
- ls_code = dw_pageretr.Object.u_quote_quotecode[row]
- f_update_printnum2(ll_scid,ls_code,TRUE,printnum,arg_msg,TRUE)
- end event
- event ue_rpt_viewprint;call super::ue_rpt_viewprint;
- Long row,uc_relid,ll_scid
- row = dw_pageretr.GetRow()
- IF row = 0 THEN RETURN
- IF ls_rpname = '' THEN RETURN
- IF li_auditprint = 1 THEN
- IF dw_pageretr.Object.u_quote_flag[row] = 0 THEN
- MessageBox('NO','目标单据还未审核,不能打印!')
- RETURN
- END IF
- END IF
- s_rpt_print_msg s_print
- s_print.retr_pram_falg = 15
- s_print.rpid = ls_msgprintid_rpt
- s_print.retr_flag = TRUE
- s_print.tag_text = THIS.Title
- s_print.rpname = ls_rpname
- s_print.retr_scid = dw_pageretr.Object.u_quote_scid[row]
- s_print.retr_pramnmb = dw_pageretr.Object.u_quote_quoteid[row]
- s_print.rowcnt = dw_child.RowCount()
- OpenWithParm(w_rpt_preview,s_print)
- //**更新打印次料
- String arg_msg
- printnum = Message.DoubleParm
- String ls_code
- ll_scid = dw_pageretr.Object.u_quote_scid[row]
- ls_code = dw_pageretr.Object.u_quote_quotecode[row]
- f_update_printnum2(ll_scid,ls_code,TRUE,printnum,arg_msg,TRUE)
- end event
- event refresh_interface;call super::refresh_interface;ddlb_status.Enabled = NOT dw_edit_mode
- ddlb_scid.Enabled = NOT dw_edit_mode
- wf_flagstatus_rf()
- end event
- event ue_news_add;call super::ue_news_add;Long ll_row_p
- s_admsg s_msg
- dw_pageretr.AcceptText()
- ll_row_p = dw_pageretr.GetRow()
- IF ll_row_p <= 0 THEN RETURN
- s_msg.billcode = dw_pageretr.Object.u_quote_quotecode[ll_row_p]
- OpenWithParm(w_new_admsg,s_msg)
- end event
- event ue_news_rel;call super::ue_news_rel;Long ll_row_p
- String ls_billcode
- dw_pageretr.AcceptText()
- ll_row_p = dw_pageretr.GetRow()
- IF ll_row_p <= 0 THEN RETURN
- ls_billcode = dw_pageretr.Object.u_quote_quotecode[ll_row_p]
- OpenWithParm(w_msg_billcode_rel,ls_billcode)
- end event
- event ue_insertmx;long ll_childrow,li_row
- ll_childrow = dw_child.getrow()
- li_row = dw_child.insertrow(ll_childrow)
- dw_child.setrow(li_row)
- dw_child.scrolltorow(li_row)
- dw_child.selectrow(0,false)
- dw_child.selectrow(li_row,true)
- wf_change_dscrp_addrow(li_row)
- end event
- event ue_copyrow;IF NOT dw_edit_mode THEN RETURN
- Long ll_childrow
- ll_childrow = dw_child.GetRow()
- IF ll_childrow = 0 THEN
- MessageBox('NO','请选择复制对象!')
- RETURN
- END IF
- Long ll_i
- long ll_j
- ll_j = 0
- FOR ll_i = 1 TO dw_child.RowCount()
- IF dw_child.IsSelected(ll_i) THEN
- ll_j++
- dw_child.RowsCopy (ll_i,ll_i,Primary!,ds_copypaste,ll_j,Primary!)
- END IF
- NEXT
- //dw_child.RowsCopy (ll_childrow,ll_childrow,Primary!,ds_copypaste,1,Primary!)
- FOR ll_i = 1 TO ds_copypaste.RowCount()
- ds_copypaste.RowsCopy (ll_i,ll_i,Primary!,dw_child,ll_childrow + ll_i,Primary!)
- dw_child.object.dscrp_text[ll_childrow + ll_i] = '--'
- wf_change_dscrp_addrow(ll_childrow + ll_i)
- NEXT
- //ds_copypaste.RowsCopy (1,1,Primary!,dw_child,ll_childrow + 1,Primary!)
- ds_copypaste.Reset()
- dw_child.SelectRow(0,FALSE)
- dw_child.SetRow(ll_childrow + 1)
- dw_child.ScrollToRow(ll_childrow + 1)
- dw_child.SelectRow(ll_childrow + 1,TRUE)
- end event
- event ue_deletemx;IF NOT dw_edit_mode THEN
- MessageBox('系统提示','非编辑状态下不可用')
- RETURN
- END IF
- IF MessageBox ("询问","是否确定要删除当前细目记录?",Question!,YesNo! ) = 2 THEN RETURN
- IF dw_child.GetRow() = 0 THEN
- MessageBox('提示','请选择删除的行对象!')
- RETURN
- END IF
- if_del = TRUE
- Long ll_i
- dw_child.SetRedraw(FALSE)
- FOR ll_i = dw_child.RowCount() TO 1 STEP -1
- IF dw_child.IsSelected(ll_i) THEN
- dw_child.DeleteRow (ll_i)
- wf_change_dscrp_delrow(ll_i)
- END IF
- NEXT
- dw_child.SetRedraw(TRUE)
- if_del = FALSE
- IF dw_child.RowCount() = 0 THEN dw_child.InsertRow(0)
- dw_child.TriggerEvent (RowFocusChanged!)
- end event
- event ue_allowedit;//
- end event
- type cb_func from w_publ_1ton_share_detail`cb_func within w_quote_record
- end type
- type cb_exit from w_publ_1ton_share_detail`cb_exit within w_quote_record
- end type
- type sle_usual_query from w_publ_1ton_share_detail`sle_usual_query within w_quote_record
- integer x = 187
- integer width = 549
- end type
- type cb_retrieveall from w_publ_1ton_share_detail`cb_retrieveall within w_quote_record
- integer x = 3246
- integer width = 146
- end type
- type em_pagerowno from w_publ_1ton_share_detail`em_pagerowno within w_quote_record
- integer x = 2944
- end type
- type dw_pageretr from w_publ_1ton_share_detail`dw_pageretr within w_quote_record
- integer x = 1536
- integer width = 2011
- integer height = 908
- string dataobject = "dw_quote_record_index"
- end type
- event dw_pageretr::rowfocuschanged;call super::rowfocuschanged;wf_flagstatus_rf()
- it_mxbt = 0
- IF dw_pageretr.GetRow() <= 0 THEN RETURN
- PARENT.TriggerEvent('ue_retrieve_info')
- end event
- type st_1 from w_publ_1ton_share_detail`st_1 within w_quote_record
- integer x = 14
- end type
- type cb_nextpage from w_publ_1ton_share_detail`cb_nextpage within w_quote_record
- integer x = 3392
- end type
- type dw_uc from w_publ_1ton_share_detail`dw_uc within w_quote_record
- integer width = 1536
- integer height = 908
- string dataobject = "dw_quote_record_edit"
- end type
- event dw_uc::dwnkey;PARENT.TriggerEvent('user_key')
- IF Key = KeyDownArrow! THEN RETURN 1
- IF dw_edit_mode THEN
- IF dw_uc.GetColumnName ( ) = 'u_quote_dscrp' AND Key = KeyEnter! THEN
- dw_child.ScrollToRow(1)
- dw_child.SetFocus()
- dw_child.SetColumn ('u_quotemx_mtrlcode')
- RETURN 1
- ELSEIF dw_uc.GetColumnName ( ) = 'u_cust_cuscode' AND Key = KeyEnter! THEN
- String ls_code
-
- dw_uc.AcceptText()
- ls_code = Trim(dw_uc.Object.u_cust_cuscode[dw_uc.GetRow()])
-
- s_custom arg_s_cust
-
- IF f_find_cust(ls_code,arg_s_cust) = 0 THEN
- PARENT.TriggerEvent('ue_f9')
- RETURN 1
- ELSE
- dw_uc.SetRedraw(FALSE)
- dw_uc.Object.u_quote_cusid[dw_uc.GetRow()] = arg_s_cust.cusid
- dw_uc.Object.u_cust_cuscode[dw_uc.GetRow()] = arg_s_cust.cuscode
- dw_uc.Object.u_cust_name[dw_uc.GetRow()] = arg_s_cust.Name
- dw_uc.Object.u_quote_assign_emp[dw_uc.GetRow()] = arg_s_cust.bsntype
-
- dw_uc.SetRedraw(TRUE)
-
- dw_uc.SetColumn("u_quote_quotedate")
- RETURN 1
- END IF
- ELSE
- IF Key = KeyEnter! THEN //
- keybd_event ( 9, 0, 0 , 0 ) // 按下tab
- keybd_event ( 9, 0, 2, 0 ) // 释放tab
- RETURN 1
- END IF
- END IF
- END IF
- end event
- event dw_uc::buttonclicked;call super::buttonclicked;IF dw_edit_mode AND row > 0 THEN
- PARENT.TriggerEvent('ue_f9')
- END IF
- end event
- type gb_2 from w_publ_1ton_share_detail`gb_2 within w_quote_record
- integer x = 297
- integer y = 460
- integer width = 631
- end type
- type dw_child from w_publ_1ton_share_detail`dw_child within w_quote_record
- integer y = 1204
- integer width = 3543
- integer height = 960
- string dataobject = "dw_quotemx_record_index"
- end type
- event dw_child::dwnkey;call super::dwnkey;PARENT.TriggerEvent('user_key')
- String ls_mtrlcode,ls_mtrlname,ls_mtrlmode,ls_mtrltype
- Long ls_mtrlid,ls_cusid
- Dec ls_planprice
- Long child_row
- Long ls_null
- SetNull(ls_null)
- String arg_msg = ''
- Decimal ld_price,ld_wfjgprice,ld_jgprice
- Decimal i_newprice
- Int li_statusflag,li_woodcodeflag,li_pcodeflag
- Long ll_statustype,ll_woodcodetype,ll_pcodetype
- Int li_int
- String ls_str
- String ls_mtrlsectype,ls_zxmtrlmode,ls_usermtrlmode
- String ls_configname
- string ls_status_config,ls_woodcode_config,ls_pcode_config
- string ls_mtrlengname
- s_mtrldef_array arg_s_mtrldef
- IF dw_edit_mode THEN
- dw_uc.AcceptText()
- ls_cusid = dw_uc.Object.u_quote_cusid[dw_uc.GetRow()]
- IF IsNull(ls_cusid) OR ls_cusid = 0 THEN
- THIS.TriggerEvent("ue_f9")
- END IF
-
- IF KeyDown(keydownarrow!) THEN
- Long li_row
- IF dw_child.GetRow() = dw_child.RowCount() THEN
- PARENT.TriggerEvent("insert_childrow")
- END IF
- ELSE
- If (KeyDown(keyenter!) OR KeyDown(keytab!)) AND NOT KeyDown(keycontrol!) AND NOT KeyDown(keyshift!) THEN
- IF dw_child.GetColumnName() = 'u_quotemx_mtrlcode' THEN
-
- dw_child.AcceptText()
- child_row = dw_child.GetRow()
- ls_mtrlcode = dw_child.Object.u_quotemx_mtrlcode[child_row]
-
- IF ddlb_ch.Text = '选客户价格' THEN
- PARENT.TriggerEvent('ue_f8')
- RETURN 1
- END IF
-
- SELECT mtrlid,
- mtrlname,
- mtrlmode,
- planprice,
- statusflag,
- statustype,
- woodcodeflag,
- woodcodetype,
- pcodeflag,
- pcodetype,
- mtrlsectype,
- zxmtrlmode,
- usermtrlmode,
- configname,
- status_config,
- woodcode_config,
- pcode_config,
- mtrlengname
- INTO
- :ls_mtrlid,
- :ls_mtrlname,
- :ls_mtrlmode,
- :ls_planprice,
- :li_statusflag,
- :ll_statustype,
- :li_woodcodeflag,
- :ll_woodcodetype,
- :li_pcodeflag,
- :ll_pcodetype,
- :ls_mtrlsectype,
- :ls_zxmtrlmode,
- :ls_usermtrlmode,
- :ls_configname,
- :ls_status_config,
- :ls_woodcode_config,
- :ls_pcode_config,
- :ls_mtrlengname
- FROM u_mtrldef
- Where mtrlcode Like :ls_mtrlcode;
-
- IF sqlca.SQLCode <> 0 THEN
- PARENT.TriggerEvent('ue_f8')
- RETURN 1
- END IF
-
- dw_child.Object.u_quotemx_mtrlid[child_row] = ls_mtrlid
- dw_child.Object.u_quotemx_mtrlcode[child_row] = ls_mtrlcode
- dw_child.Object.u_mtrldef_mtrlname[child_row] = ls_mtrlname
- dw_child.Object.u_mtrldef_mtrlmode[child_row] = ls_mtrlmode
- dw_child.Object.u_mtrldef_mtrltype[child_row] = ls_mtrltype
- dw_child.Object.u_quotemx_planprice[child_row] = ls_planprice
- dw_child.Object.u_mtrldef_statusflag[child_row] = li_statusflag
- dw_child.Object.u_mtrldef_statustype[child_row] = ll_statustype
- dw_child.Object.u_mtrldef_woodcodeflag[child_row] = li_woodcodeflag
- dw_child.Object.u_mtrldef_woodcodetype[child_row] = ll_woodcodetype
- dw_child.Object.u_mtrldef_pcodeflag[child_row] = li_pcodeflag
- dw_child.Object.u_mtrldef_pcodetype[child_row] = ll_pcodetype
- dw_child.Object.u_mtrldef_mtrlsectype[child_row] = ls_mtrlsectype
- dw_child.Object.u_mtrldef_zxmtrlmode[child_row] = ls_zxmtrlmode
- dw_child.Object.u_mtrldef_usermtrlmode[child_row] = ls_usermtrlmode
- // dw_child.Object.u_mtrldef_configname[child_row] = ls_configname
- dw_child.Object.u_mtrldef_status_config[child_row] = ls_status_config
- dw_child.Object.u_mtrldef_woodcode_config[child_row] = ls_woodcode_config
- dw_child.Object.u_mtrldef_pcode_config[child_row] = ls_pcode_config
- dw_child.Object.u_mtrldef_mtrlengname[child_row] = ls_mtrlengname
- IF li_statusflag = 4 THEN
- dw_child.Object.u_quotemx_status[child_row] = ls_status_config
- END IF
-
- IF li_woodcodeflag = 4 THEN
- dw_child.Object.u_quotemx_woodcode[child_row] = ls_woodcode_config
- END IF
-
- IF li_pcodeflag = 4 THEN
- dw_child.Object.u_quotemx_pcode[child_row] = ls_pcode_config
- END IF
-
-
- wf_getrprice(ls_mtrlid,i_newprice )
- dw_child.Object.u_quotemx_maxprice[child_row] = i_newprice
- PARENT.TriggerEvent('ue_allowedit')
-
- IF Key = keyenter! THEN
- keybd_event ( 9, 0, 0 , 0 ) // 按下tab
- keybd_event ( 9, 0, 2, 0 ) // 释放tab
- RETURN 1
- END IF
-
- ELSEIF dw_child.GetColumnName( ) = 'u_quotemx_mxdscrp' AND dw_child.GetRow() = dw_child.RowCount() THEN
- PARENT.TriggerEvent("insert_childrow")
- RETURN 1
- ELSE
- IF Key = keyenter! THEN
- keybd_event ( 9, 0, 0 , 0 ) // 按下tab
- keybd_event ( 9, 0, 2, 0 ) // 释放tab
- RETURN 1
- END IF
- END IF
- END IF
- END IF
- END IF
- end event
- event dw_child::rowfocuschanged;call super::rowfocuschanged;PARENT.TriggerEvent('ue_retrieve_info')
- end event
- event dw_child::clicked;
- IF row > 0 THEN
- IF dw_edit_mode THEN
- This.SetRow(row)
-
- IF KeyDown(keycontrol!) THEN
- IF if_changeselect THEN
- This.SelectRow(row,Not This.IsSelected(row))
- ELSE
- if_changeselect = True
- END IF
- ll_lastrow = row
- ELSEIF KeyDown(keyshift!) THEN //按下SHIFT键
- // IF ll_lastrow = 0 THEN //上次没选中任何行
- // THIS.SelectRow(row,TRUE)
- // ll_lastrow = currentrow //ll_lastrow为实例变量,记录上次单击的行
- // ELSE
- // THIS.SelectRow(0,FALSE) //全都不选中
- // IF currentrow > ll_lastrow THEN
- // FOR ll_i = ll_lastrow TO currentrow
- // THIS.SelectRow(ll_i,TRUE)
- // NEXT
- // ELSE
- // FOR ll_i = ll_lastrow TO currentrow STEP -1
- // THIS.SelectRow(ll_i,TRUE)
- // NEXT
- // END IF
- // END IF
- ELSE
- This.SelectRow(0,False)
- This.SelectRow(row,True)
- ll_lastrow = row
- END IF
- ELSE
- This.SelectRow(0,False)
- This.SelectRow(row,True)
- This.SetRow(row)
- END IF
-
-
- IF row > 0 THEN
- IF dwo.Name = 'dscrp_text' THEN
- Parent.TriggerEvent('ue_dscrp_text')
- END IF
- END IF
-
- END IF
- end event
- type cb_viewprint from w_publ_1ton_share_detail`cb_viewprint within w_quote_record
- end type
- type cb_print from w_publ_1ton_share_detail`cb_print within w_quote_record
- end type
- type cb_add from w_publ_1ton_share_detail`cb_add within w_quote_record
- end type
- event cb_add::clicked;
- IF NOT f_power_ind(1673,sys_msg_pow) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
- String arg_msg = ''
- Long uc_row,i,j
- string ls_dscrp_mx
- IF dw_edit_mode THEN
- dw_uc.AcceptText()
- dw_child.AcceptText()
- uc_row = dw_uc.GetRow()
- IF uc_row <= 0 THEN
- MessageBox('系统提示','请选定当前目标单据!')
- RETURN
- END IF
-
- IF dw_uc.Object.u_quote_moneyid[uc_row] = 0 THEN
- MessageBox('系统提示','请选择币种!')
- dw_uc.SetFocus()
- dw_uc.SetColumn("u_quote_moneyid")
- RETURN
- END IF
-
- IF isnull( dw_uc.Object.u_quote_cusid[uc_row]) THEN
- MessageBox('系统提示','请选客户!')
- dw_uc.SetFocus()
- dw_uc.SetColumn("u_quote_cusid")
- RETURN
- END IF
-
- IF NOT dw_uc.Object.u_quote_quotedate[uc_row] > DateTime(2000-01-01,Now()) THEN
- MessageBox('系统提示','不合理发生时间!')
- dw_uc.SetFocus()
- dw_uc.SetColumn("u_quote_quotedate")
- RETURN
- END IF
- IF NOT Len(String(dw_uc.Object.u_quote_assign_emp[uc_row])) > 0 THEN
- MessageBox('系统提示','请填写经手人!')
- dw_uc.SetFocus()
- dw_uc.SetColumn("u_quote_assign_emp")
- RETURN
- END IF
-
- uo_quote_mtrl.quotedate = dw_uc.Object.u_quote_quotedate[uc_row] // 发生时间
- uo_quote_mtrl.Assign_emp = dw_uc.Object.u_quote_assign_emp[uc_row] // 经手人
- uo_quote_mtrl.relcode = dw_uc.Object.u_quote_relcode[uc_row] //相关号码
- uo_quote_mtrl.dscrp = dw_uc.Object.u_quote_dscrp[uc_row] //备注
- uo_quote_mtrl.custid = dw_uc.Object.u_quote_cusid[uc_row] //客户ID
- uo_quote_mtrl.moneyid = dw_uc.Object.u_quote_moneyid[uc_row] //客户ID
- uo_quote_mtrl.fiebrelcode = dw_uc.Object.u_quote_fiebrelcode[uc_row]
- uo_quote_mtrl.sendtime = dw_uc.Object.u_quote_sendtime[uc_row]
- uo_quote_mtrl.senduser = dw_uc.Object.u_quote_senduser[uc_row]
- uo_quote_mtrl.billtype = 1 //销售报价记录单
- FOR i = 1 TO dw_child.RowCount()
- IF trim(dw_child.Object.u_quotemx_mtrlcode[i]) <> '' THEN
- FOR j = 1 To it_mxbt
- IF ins_printid[j] = i THEN
- ls_dscrp_mx = ins_dscrp_mx[j]
- EXIT
- END IF
- NEXT
-
-
- IF uo_quote_mtrl.acceptmx(dw_child.Object.u_quotemx_mtrlid[i],&
- dw_child.Object.u_quotemx_mtrlcode[i],&
- dw_child.Object.u_quotemx_mtrlname[i],&
- dw_child.Object.u_quotemx_mtrlmode[i],&
- dw_child.Object.u_quotemx_unit[i],&
- dw_child.Object.u_quotemx_mxdscrp[i],&
- arg_msg,&
- dw_child.Object.pid[i],&
- dw_child.Object.u_quotemx_sumprice[i],&
- dw_child.Object.u_quotemx_sumprice_1[i],&
- dw_child.object.u_quotemx_status[i],&
- dw_child.object.u_quotemx_woodcode[i],&
- dw_child.object.u_quotemx_pcode[i],&
- dw_child.object.u_quotemx_maxprice[i],&
- dw_child.object.u_quotemx_planprice[i],&
- dw_child.object.u_quotemx_profit_margin[i],&
- dw_child.object.u_quotemx_wfjgprice[i],&
- dw_child.object.u_quotemx_outcost[i],&
- dw_child.object.u_quotemx_mancost[i],&
- dw_child.object.u_quotemx_mtrlcost[i],&
- dw_child.object.u_quotemx_qty[i],&
- dw_child.object.u_quotemx_qty1[i],&
- dw_child.object.u_quotemx_rebate[i],&
- 0,&
- '',&
- ls_dscrp_mx) = 0 THEN
- MessageBox('Error!',arg_msg)
- RETURN
- END IF
- END IF
- NEXT
-
-
- IF uo_quote_mtrl.save(publ_operator,arg_msg,true) = 0 THEN
- MessageBox('Error!',arg_msg)
- RETURN
- END IF
- MessageBox(publ_operator,'保存操作成功!')
- long ll_row
- ll_row = dw_pageretr.getrow()
- dw_pageretr.SelectRow(0,FALSE)
- dw_pageretr.SelectRow(ll_row,TRUE)
- wf_refresh_curuc(cur_scid,uo_quote_mtrl.quoteid) //刷新uc
- ELSE
- IF uo_quote_mtrl.newbegin(cur_scid,arg_msg) = 0 THEN //生产令领料
- MessageBox('Error!',arg_msg)
- RETURN
- END IF
- END IF
- CALL SUPER::Clicked
- //read ini
- IF dw_edit_mode THEN
- String ls_moneyid
-
- ls_moneyid = f_ProfileString(sys_empid,publ_userid+'_'+dw_uc.DataObject, "moneyid",'0')
- dw_uc.SetRedraw(FALSE)
- dw_uc.Object.u_quote_moneyid[dw_uc.GetRow()] = Long(ls_moneyid)
- dw_uc.SetColumn("u_quote_moneyid")
- dw_uc.SetRedraw(TRUE)
-
- PARENT.TriggerEvent("insert_childrow")
- ELSE
- PARENT.TriggerEvent("retrieve_childdw")
- END IF
- //
- end event
- type cb_edit from w_publ_1ton_share_detail`cb_edit within w_quote_record
- end type
- event cb_edit::clicked;IF NOT f_power_ind(1673,sys_msg_pow) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
- String arg_msg = ''
- Long uc_row
- long ll_i,ll_scid,ll_quoteid,ll_printid
- string ls_dscrp
- IF NOT dw_edit_mode THEN
- uc_row = dw_pageretr.GetRow()
- IF uc_row <= 0 THEN
- MessageBox('系统提示','请选定当前目标单据!')
- RETURN
- END IF
- END IF
- IF NOT dw_edit_mode THEN
- IF uo_quote_mtrl.updatebegin(dw_pageretr.Object.u_quote_scid[uc_row],dw_pageretr.Object.u_quote_quoteid[uc_row],arg_msg) = 0 THEN
- MessageBox('Error!',arg_msg)
- RETURN
- END IF
-
- wf_refresh_curuc(dw_pageretr.Object.u_quote_scid[uc_row],dw_pageretr.Object.u_quote_quoteid[uc_row]) //刷新uc
- PARENT.TriggerEvent("retrieve_childdw")
- PARENT.TriggerEvent('ue_allowedit')
-
- FOR ll_i = 1 To dw_child.RowCount()
- ll_scid = dw_child.Object.u_quotemx_scid[ll_i]
- ll_quoteid = dw_child.Object.u_quotemx_quoteid[ll_i]
- ll_printid = dw_child.Object.u_quotemx_printid[ll_i]
-
- SELECT dscrp INTO :ls_dscrp
- FROM u_quotemx_dscrp
- WHERE scid = :ll_scid
- AND quoteid = :ll_quoteid
- And printid = :ll_printid;
- IF sqlca.SQLCode <> 0 THEN
- ls_dscrp = ''
- END IF
-
- it_mxbt++
- ins_printid[it_mxbt] = ll_i
- ins_dscrp_mx[it_mxbt] = ls_dscrp
-
- NEXT
-
- END IF
- CALL SUPER::Clicked
- end event
- type cb_delet from w_publ_1ton_share_detail`cb_delet within w_quote_record
- end type
- event cb_delet::clicked;call super::clicked;IF NOT f_power_ind(1674,sys_msg_pow) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
- IF dw_edit_mode THEN RETURN
- String arg_msg = ''
- Long uc_row
- uc_row = dw_pageretr.GetRow()
- IF uc_row <= 0 THEN
- MessageBox('系统提示','请选定当前目标订单!')
- RETURN
- END IF
- IF MessageBox ("IF","是否确定要删除当前吗",Question!,YesNo! ) = 2 THEN RETURN
- IF uo_quote_mtrl.Cancel(dw_pageretr.Object.u_quote_scid[uc_row],dw_pageretr.Object.u_quote_quoteid[uc_row],arg_msg,TRUE) = 0 THEN
- MessageBox('Error!',arg_msg)
- ELSE
- //日志
- Long ls_id
- String ls_code
- ls_id = dw_pageretr.Object.u_quote_quoteid[uc_row]
- ls_code = dw_pageretr.Object.u_quote_quotecode[uc_row]
- f_setsysoplog('报价单','报价单删除,ID:'+String(ls_id)+',code:'+ls_code,arg_msg,TRUE)
- //--
- MessageBox(publ_operator,'删除单据'+String(dw_pageretr.Object.u_quote_quotecode[uc_row])+'成功!')
-
-
- dw_pageretr.DeleteRow(uc_row)
- dw_pageretr.Triggerevent(rowfocuschanged!)
- END IF
- end event
- type cb_addzy from w_publ_1ton_share_detail`cb_addzy within w_quote_record
- end type
- event cb_addzy::clicked;m_Dfc_Control_PopupMenu dmPopupMenu
- String menustr
- IF Not dw_edit_mode THEN
- menustr = "Text=增加备注~tEvent=ue_addzy"
- menustr = menustr + "|" + "Text=-"
- menustr = menustr + "|" + "Text=调用计价模板~tEvent=ue_cmpl_modle"
-
- menustr = menustr + "|" + "Text=-"
- menustr = menustr + "|" + "Text=复制单据~tEvent=ue_bill_copy"
- ELSE
-
- menustr = "Text=粘贴单据~tEvent=ue_bill_paste"
-
- END IF
- IF Len(Trim(menustr)) <> 0 THEN
- dmPopupMenu = Create m_Dfc_Control_PopupMenu
- dmPopupMenu.mf_BuildMenu(This, menustr)
- dmPopupMenu.mf_PopMenu()
- Destroy dmPopupMenu
- END IF
- end event
- type cb_auditing from w_publ_1ton_share_detail`cb_auditing within w_quote_record
- end type
- event cb_auditing::clicked;call super::clicked;
- IF dw_edit_mode THEN RETURN
- String arg_msg = ''
- Long pagerert_row
- Long ll_quoteid,ll_scid
- Long ll_i
- Int li_flag
- Long ll_suc,ll_fail
- Int li_if_sec
- String ls_quotecode,arg_msg_tmp
- IF Not KeyDown(KeyControl!) THEN
- pagerert_row = dw_pageretr.GetRow()
- IF pagerert_row <= 0 THEN
- MessageBox('系统提示','请选定当前目标单据!')
- RETURN
- END IF
-
- ll_quoteid = dw_pageretr.Object.u_quote_quoteid[pagerert_row]
- ll_scid = dw_pageretr.Object.u_quote_scid[pagerert_row]
-
-
- IF dw_pageretr.Object.u_quote_flag[pagerert_row] = 0 THEN
- IF sys_option_quote_secaudit = 0 THEN
- IF Not (f_power_ind(1675,sys_msg_pow) Or f_power_ind(1677,sys_msg_pow)) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
-
- IF MessageBox ("IF","是否确定要对当前报价单作审核吗?",Question!,YesNo! ) = 2 THEN RETURN
-
- IF uo_quote_mtrl.audit(ll_scid,ll_quoteid,publ_operator,arg_msg,False) = 0 THEN
- MessageBox('Error!',arg_msg)
- ELSE
- IF uo_quote_mtrl.sec_audit(ll_scid,ll_quoteid,publ_operator,arg_msg,True) = 0 THEN
- MessageBox('Error!',arg_msg)
- ELSE
- MessageBox(publ_operator,'审核成功!')
- wf_refresh_curuc(ll_scid,ll_quoteid)
- END IF
- END IF
- ELSE
- IF Not f_power_ind(1675,sys_msg_pow) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
-
- IF MessageBox ("IF","是否确定要对当前报价单作审核吗?",Question!,YesNo! ) = 2 THEN RETURN
-
- IF uo_quote_mtrl.audit(ll_scid,ll_quoteid,publ_operator,arg_msg,True) = 0 THEN
- MessageBox('Error!',arg_msg)
- ELSE
- MessageBox(publ_operator,'审核成功!')
- wf_refresh_curuc(ll_scid,ll_quoteid)
- END IF
- END IF
- ELSEIF dw_pageretr.Object.u_quote_flag[pagerert_row] = 4 THEN
- IF Not f_power_ind(1677,sys_msg_pow) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
-
- IF MessageBox ("IF","是否确定要对当前报价单作审核吗?",Question!,YesNo! ) = 2 THEN RETURN
-
- IF uo_quote_mtrl.sec_audit(ll_scid,ll_quoteid,publ_operator,arg_msg,True) = 0 THEN
- MessageBox('Error!',arg_msg)
- ELSE
- MessageBox(publ_operator,'审核成功!')
- wf_refresh_curuc(ll_scid,ll_quoteid)
- END IF
- END IF
- ELSE
- pagerert_row = dw_pageretr.GetRow()
-
- IF sys_option_quote_secaudit = 0 THEN
- IF Not f_power_ind(1677,sys_msg_pow) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
- li_if_sec = 1
- ELSE
- IF pagerert_row > 0 THEN
- IF dw_pageretr.Object.u_quote_flag[pagerert_row] = 4 THEN
- IF Not f_power_ind(1677,sys_msg_pow) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
- li_if_sec = 1
- ELSE
- IF Not f_power_ind(1677,sys_msg_pow) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
- li_if_sec = 0
- END IF
- ELSE
- li_if_sec = 1
- END IF
- END IF
-
-
- IF MessageBox ("询问","是否确定要批审核列表中未审核的单据?",Question!,YesNo! ) = 2 THEN RETURN
-
- dw_pageretr.AcceptText()
-
- Open(w_sys_wait_jdt) //初始化进度条
- w_sys_wait_jdt.Show()
- w_sys_wait_jdt.wf_accepttol(dw_pageretr.RowCount())
-
- FOR ll_i = 1 To dw_pageretr.RowCount()
- w_sys_wait_jdt.st_msg.Text = dw_pageretr.Object.u_quote_quotecode[ll_i] + " 正在审核..." //进度信息
-
- li_flag = dw_pageretr.Object.u_quote_flag[ll_i]
- IF li_flag = 1 THEN CONTINUE
-
- ll_quoteid = dw_pageretr.Object.u_quote_quoteid[ll_i]
- ll_scid = dw_pageretr.Object.u_quote_scid[ll_i]
- ls_quotecode = dw_pageretr.Object.u_quote_quotecode[ll_i]
-
- IF sys_option_quote_secaudit = 0 THEN
- IF uo_quote_mtrl.audit(ll_scid,ll_quoteid,publ_operator,arg_msg,False) = 0 THEN
- arg_msg = arg_msg + ls_quotecode + '审核失败原因: ' + arg_msg_tmp + '~r~n'
- ll_fail++
- CONTINUE
- ELSE
- IF uo_quote_mtrl.sec_audit(ll_scid,ll_quoteid,publ_operator,arg_msg,True) = 0 THEN
- arg_msg = arg_msg + ls_quotecode + '审核失败原因: ' + arg_msg_tmp + '~r~n'
- ll_fail++
- CONTINUE
- END IF
- END IF
- ELSE
- IF li_if_sec = 0 THEN
- IF uo_quote_mtrl.audit(ll_scid,ll_quoteid,publ_operator,arg_msg,True) = 0 THEN
- arg_msg = arg_msg + ls_quotecode + '审核失败原因: ' + arg_msg_tmp + '~r~n'
- ll_fail++
- CONTINUE
- END IF
- ELSE
- IF uo_quote_mtrl.sec_audit(ll_scid,ll_quoteid,publ_operator,arg_msg,True) = 0 THEN
- arg_msg = arg_msg + ls_quotecode + '审核失败原因: ' + arg_msg_tmp + '~r~n'
- ll_fail++
- CONTINUE
- END IF
- END IF
- END IF
-
- ll_suc++
- w_sys_wait_jdt.wf_inc(ll_i) //进度
- NEXT
- Close(w_sys_wait_jdt)
- MessageBox(publ_operator,'批审核成功!成功:'+String(ll_suc)+',失败:'+String(ll_fail))
- IF ll_fail > 0 THEN
- OpenWithParm(w_message_err,arg_msg)
- END IF
- Parent.TriggerEvent('retrieve_pageretr')
- END IF
- end event
- type cb_xm from w_publ_1ton_share_detail`cb_xm within w_quote_record
- end type
- event cb_xm::clicked;is_mx_menustr = ''
- IF Not dw_edit_mode THEN
- is_mx_menustr = "Text=明细配置部件配置类型查看~tEvent=ue_configcodemx_view"
- is_mx_menustr = is_mx_menustr + "|" + "Text=-"
-
- // IF sys_option_quote_accont = 0 THEN
- is_mx_menustr = is_mx_menustr + "|" + "Text=计算成本~tEvent=ue_reccl"
- is_mx_menustr = is_mx_menustr + "|" + "Text=查看明细~tEvent=ue_viewmx"
- // ELSE
- // is_mx_menustr = is_mx_menustr + "|" + "Text=计算成本~tEvent=ue_cmp_suliao"
- // END IF
-
- is_mx_menustr = is_mx_menustr + "|" + "Text=-"
- is_mx_menustr = is_mx_menustr + "|" + "Text=审核报价明细~tEvent=ue_mx_audit"
- is_mx_menustr = is_mx_menustr + "|" + "Text=撤审报价明细~tEvent=ue_mx_audit_cancel"
- is_mx_menustr = is_mx_menustr + "|" + "Text=-"
- is_mx_menustr = is_mx_menustr + "|" + "Text=终止报价明细~tEvent=ue_mx_stop"
- is_mx_menustr = is_mx_menustr + "|" + "Text=取消终止报价明细~tEvent=ue_mx_stop_cancel"
- is_mx_menustr = is_mx_menustr + "|" + "Text=-"
- is_mx_menustr = is_mx_menustr + "|" + "Text=查看产品相关信息~tEvent=ue_mtrl_info"
- ELSE
- is_mx_menustr = is_mx_menustr + "|" + "Text=明细导入价格表~tEvent=ue_importseleprice"
- is_mx_menustr = is_mx_menustr + "|" + "Text=明细导入客户价格表~tEvent=ue_importseleprice_cust"
- is_mx_menustr = is_mx_menustr + "|" + "Text=-"
- is_mx_menustr = is_mx_menustr + "|" + "Text=按公式批设定报价~tEvent=ue_p_price_com"
- is_mx_menustr = is_mx_menustr + "|" + "Text=按首行批设定报价~tEvent=ue_p_price"
- is_mx_menustr = is_mx_menustr + "|" + "Text=-"
- is_mx_menustr = is_mx_menustr + "|" + "Text=按公式批设定客户还价~tEvent=ue_p_cus_price_com"
- is_mx_menustr = is_mx_menustr + "|" + "Text=按首行批设定客户还价~tEvent=ue_p_cus_price"
- is_mx_menustr = is_mx_menustr + "|" + "Text=-"
- is_mx_menustr = is_mx_menustr + "|" + "Text=批设定"+sys_option_change_status+"~tEvent=ue_p_status"
- is_mx_menustr = is_mx_menustr + "|" + "Text=批设定"+sys_option_change_woodcode+"~tEvent=ue_p_woodcode"
- is_mx_menustr = is_mx_menustr + "|" + "Text=批设定"+sys_option_change_pcode+"~tEvent=ue_p_pcode"
- is_mx_menustr = is_mx_menustr + "|" + "Text=-"
- is_mx_menustr = is_mx_menustr + "|" + "Text=查看产品相关信息~tEvent=ue_mtrl_info"
-
- END IF
- CALL Super::Clicked
- end event
- type cb_retrieve from w_publ_1ton_share_detail`cb_retrieve within w_quote_record
- end type
- type cb_xls from w_publ_1ton_share_detail`cb_xls within w_quote_record
- end type
- type cb_help from w_publ_1ton_share_detail`cb_help within w_quote_record
- end type
- type cb_auditing_cancel from w_publ_1ton_share_detail`cb_auditing_cancel within w_quote_record
- end type
- event cb_auditing_cancel::clicked;call super::clicked;
- IF dw_edit_mode THEN RETURN
- String arg_msg = ''
- Long pagerert_row
- Long ll_quoteid,ll_scid
- pagerert_row = dw_pageretr.GetRow()
- IF pagerert_row <= 0 THEN
- MessageBox('系统提示','请选定当前目标单据!')
- RETURN
- END IF
- IF MessageBox ("IF","是否确定要对当前报价单作撤消审核吗?",Question!,YesNo! ) = 2 THEN RETURN
- ll_quoteid = dw_pageretr.Object.u_quote_quoteid[pagerert_row]
- ll_scid = dw_pageretr.Object.u_quote_scid[pagerert_row]
- IF dw_pageretr.Object.u_quote_flag[pagerert_row] = 4 THEN
- IF Not f_power_ind(1676,sys_msg_pow) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
-
- IF uo_quote_mtrl.cancelaudit(ll_scid,ll_quoteid,arg_msg,True) = 0 THEN
- MessageBox('Error!',arg_msg)
- ELSE
- MessageBox(publ_operator,'撤审成功!')
- wf_refresh_curuc(ll_scid,ll_quoteid)
- END IF
- ELSEIF dw_pageretr.Object.u_quote_flag[pagerert_row] = 1 THEN
- IF sys_option_quote_secaudit = 0 THEN
- IF Not (f_power_ind(1678,sys_msg_pow) Or f_power_ind(1676,sys_msg_pow)) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
-
- IF uo_quote_mtrl.cancelsecaudit(ll_scid,ll_quoteid,arg_msg,False) = 0 THEN
- MessageBox('Error!',arg_msg)
- RETURN
- ELSE
- IF uo_quote_mtrl.cancelaudit(ll_scid,ll_quoteid,arg_msg,True) = 0 THEN
- MessageBox('Error!',arg_msg)
- RETURN
- ELSE
- MessageBox(publ_operator,'撤审成功!')
- wf_refresh_curuc(ll_scid,ll_quoteid)
- END IF
- END IF
- ELSE
- IF Not f_power_ind(1678,sys_msg_pow) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
-
- IF uo_quote_mtrl.cancelsecaudit(ll_scid,ll_quoteid,arg_msg,True) = 0 THEN
- MessageBox('Error!',arg_msg)
- RETURN
- ELSE
- MessageBox(publ_operator,'撤审成功!')
- wf_refresh_curuc(ll_scid,ll_quoteid)
- END IF
-
- END IF
- END IF
- end event
- type p_msg from w_publ_1ton_share_detail`p_msg within w_quote_record
- end type
- type p_help from w_publ_1ton_share_detail`p_help within w_quote_record
- end type
- type p_encl from w_publ_1ton_share_detail`p_encl within w_quote_record
- end type
- type p_other from w_publ_1ton_share_detail`p_other within w_quote_record
- end type
- event p_other::clicked;call super::clicked;if sys_option_if_ljfieb = 0 then return
- m_Dfc_Control_PopupMenu dmPopupMenu
- string menustr
- menustr="Text=发送单据~tEvent=ue_send_ljfieb"
- menustr=menustr + "|" + "Text=-"
- menustr = menustr + "|" + "Text=查看电子商务记录~tEvent=ue_jdview_ljfieb"
-
- if len(trim(menustr))<>0 then
- dmPopupMenu = Create m_Dfc_Control_PopupMenu
- dmPopupMenu.mf_BuildMenu(This, menustr)
- dmPopupMenu.mf_PopMenu()
- Destroy dmPopupMenu
- end if
- end event
- type gb_3 from w_publ_1ton_share_detail`gb_3 within w_quote_record
- end type
- type ln_bar from w_publ_1ton_share_detail`ln_bar within w_quote_record
- end type
- type ln_bar2 from w_publ_1ton_share_detail`ln_bar2 within w_quote_record
- end type
- type r_bar from w_publ_1ton_share_detail`r_bar within w_quote_record
- integer x = 3264
- end type
- type ln_1 from w_publ_1ton_share_detail`ln_1 within w_quote_record
- end type
- type ln_2 from w_publ_1ton_share_detail`ln_2 within w_quote_record
- end type
- type ddlb_scid from uo_ddlb_scid within w_quote_record
- integer x = 878
- integer y = 192
- integer width = 549
- integer height = 468
- boolean bringtotop = true
- end type
- event constructor;call super::constructor;cur_scid=this.uo_scid
- cur_scid_arr = THIS.uo_scid_arr
- end event
- event selectionchanged;call super::selectionchanged;cur_scid=this.uo_scid
- cur_scid_arr = THIS.uo_scid_arr
- parent.triggerevent("retrieve_pageretr")
- end event
- type ddlb_status from dropdownlistbox within w_quote_record
- integer x = 1563
- integer y = 192
- integer width = 466
- integer height = 468
- integer taborder = 40
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "[全部]"
- boolean sorted = false
- string item[] = {"[全部]","待审核","已审核"}
- borderstyle borderstyle = stylelowered!
- end type
- event selectionchanged;if index=1 then
- cur_flag=-1
- elseif index=2 then
- cur_flag= 0
- elseif index=3 then
- cur_flag= 1
- end if
- parent.triggerevent('retrieve_pageretr')
- end event
- type st_2 from statictext within w_quote_record
- integer x = 704
- integer y = 204
- integer width = 165
- integer height = 48
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217739
- string text = "分部"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type st_3 from statictext within w_quote_record
- integer x = 1390
- integer y = 204
- integer width = 165
- integer height = 48
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217739
- string text = "状态"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type st_4 from statictext within w_quote_record
- integer x = 2053
- integer y = 200
- integer width = 270
- integer height = 60
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217739
- string text = "选择策略"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type ddlb_ch from dropdownlistbox within w_quote_record
- integer x = 2331
- integer y = 188
- integer width = 480
- integer height = 392
- integer taborder = 50
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "选物料资料"
- boolean sorted = false
- string item[] = {"选物料资料","选客户价格","选客户价格表","选指定价格表"}
- borderstyle borderstyle = stylelowered!
- end type
- event constructor;Int li_mxch
- li_mxch = Integer(f_ProfileString (sys_empid,dw_pageretr.DataObject, "mxch", '0'))
- CHOOSE CASE li_mxch
- CASE 0
- THIS.Text = '选物料资料'
- CASE 1
- THIS.Text = '选客户价格'
- case 2
- this.text = '选客户价格表'
- case 3
- this.text = '选指定价格表'
- END CHOOSE
- end event
- event selectionchanged;Int li_mxch
- CHOOSE CASE THIS.Text
- CASE '选物料资料'
- li_mxch = 0
- CASE '选客户价格'
- li_mxch = 1
- case '选客户价格表'
- li_mxch = 2
- case '选指定价格表'
- li_mxch = 3
- END CHOOSE
- f_SetProfileString (sys_empid,dw_pageretr.DataObject, "mxch", String(li_mxch))
- end event
|