12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using System.Drawing;
- using LYFZ.ComponentLibrary;
- using System.Data;
- using LYFZ.Software.MainBusiness.DoorCityProcess.NewOrderCustomControls;
- using System.Collections;
- using LYFZ.Model.API;
- namespace LYFZ.Software.MainBusiness.DoorCityProcess
- {
- public class frmNewOrder : LYFZ.Software.UI.DoorCityProcess.frmNewOrder
- {
- LYFZ.BLL.BLL_ErpPackages packageBll = new BLL.BLL_ErpPackages();
- LYFZ.BLL.BLL_ErpStyle styleBll = new BLL.BLL_ErpStyle();
- LYFZ.BLL.BLL_ErpOrder orderBll = new BLL.BLL_ErpOrder();
- LYFZ.BLL.BLL_ErpOrdersPerson ordersPersonBll = new BLL.BLL_ErpOrdersPerson();
- LYFZ.BLL.BLL_ErpCustomerGroup customerGroupBll = new BLL.BLL_ErpCustomerGroup();
- LYFZ.BLL.BLL_ErpCustomerGroupMembers customerGroupMembersBll = new BLL.BLL_ErpCustomerGroupMembers();
- LYFZ.BLL.BLL_ErpCustomer customerBll = new BLL.BLL_ErpCustomer();
- LYFZ.BLL.BLL_ErpMemberCard memberCardBll = new BLL.BLL_ErpMemberCard();
- LYFZ.BLL.BLL_ErpOrderDigital orderDigitalBll = new BLL.BLL_ErpOrderDigital();
- LYFZ.BLL.BLL_ErpOrdersPhotography photographyBll = new BLL.BLL_ErpOrdersPhotography();
- LYFZ.BLL.BLL_ErpWeddingService weddingServiceBll = new BLL.BLL_ErpWeddingService();
- LYFZ.BLL.BLL_ErpPayment paymentbll = new BLL.BLL_ErpPayment();
- LYFZ.BLL.BLL_ErpSystemConfigure systemConfigurebll = new BLL.BLL_ErpSystemConfigure();
- LYFZ.BLL.BLL_ErpMemberCardBackCashSet memberCardBackCashSetbll = new BLL.BLL_ErpMemberCardBackCashSet();
- /// <summary>
- /// 会员返现比例设置
- /// </summary>
- LYFZ.BLL.BLL_ErpMemberCardBackCashSet cardBackCashSetBll = new BLL.BLL_ErpMemberCardBackCashSet();
- /// <summary>
- /// 会员副卡表
- /// </summary>
- LYFZ.BLL.BLL_ErpMemberCardViceCard cardViceCardBll = new BLL.BLL_ErpMemberCardViceCard();
- /// <summary>
- /// 当前订单对象
- /// </summary>
- LYFZ.Model.Model_ErpOrder currentOrderModel = new Model.Model_ErpOrder();
- UCustomerInfo uMainCusInfo = new UCustomerInfo( true );
- /// <summary>
- /// 订单景点
- /// </summary>
- OrderSightsControlsEx orderSightsControl = new OrderSightsControlsEx();
- /// <summary>
- /// 拍摄阶段 用于儿童订单
- /// </summary>
- OrderStagesControlsEx orderStagesControl = new OrderStagesControlsEx();
- /// <summary>
- /// 订单商品
- /// </summary>
- OrderProductControlsEx orderProductControl = new OrderProductControlsEx();
- /// <summary>
- /// 订单服务
- /// </summary>
- OrderServiceControlsEx orderServiceControl = new OrderServiceControlsEx();
- public frmNewOrder()
- {
- this.Load += FrmNewOrder_Load;
- this.Shown += FrmNewOrder_Shown;
- this.lblOpenType.Click += LblOpenType_Click;//测试时 打开旧版开单页
- this.btnOrderClose.Click += BtnOrderClose_Click;
- this.PictAnnotation.Click += PictAnnotation_Click;
- this.lbHideBiaoZhu.Click += LbHideBiaoZhu_Click;
- this.lkSelectOrderPerson.Click += LkSelectOrderPerson_Click;
- this.rdoOther.CheckedChanged += RdoOther_CheckedChanged;
- this.lkSetClientSource.Click += LkSetClientSource_Click;
- this.rdoOldClient.Click += RdoOldClient_Click;
- this.rdoFriends.Click += RdoFriends_Click;
- this.rdoHospitalClient.Click += RdoHospitalClient_Click;
- this.lkYiXiangClient.Click += LkYiXiangClient_Click;
- this.lkSelectStyle.Click += LkSelectStyle_Click;
- this.lkSetStyle.Click += LkSetStyle_Click;
- this.lbSetOrderClass.Click += LbSetOrderClass_Click;
- this.lbSetTaoXiName.Click += LbSetTaoXiName_Click;
- this.lbSetLiBao.Click += LbSetLiBao_Click;
- this.cmbtreevTaoXiName.ComboBoxTree_NodeMouseClick += CmbtreevTaoXiName_ComboBoxTree_NodeMouseClick;
- this.cmbtreevPackageName.ComboBoxTree_NodeMouseClick += CmbtreevPackageName_ComboBoxTree_NodeMouseClick;
- this.plDingDanZhiNiao.Scroll += PlDingDanZhiNiao_Scroll;
- this.btnSave.Click += BtnSave_Click;
- this.rdoFriends.CheckedChanged += RdoFriends_CheckedChanged;
- this.txtCusName.KeyUp += TxtCusName_KeyUp;
- this.linkSelectSameNameBaby.Click += LinkSelectSameNameBaby_Click;
- this.uMainCusInfo.EventSelectIntentionOrderCustomer += UMainCusInfo_EventSelectIntentionOrderCustomer;
- this.PictEdit.Click += PictEdit_Click;
- this.PictReset.Click += PictReset_Click;
- this.btnNewOrder.Click += BtnNewOrder_Click;
- this.btnSaveIntent.Click += BtnSaveIntent_Click;
- this.btnPrint.Click += BtnPrint_Click;
- this.FormClosing += FrmNewOrder_FormClosing;
- this.FormClosed += FrmNewOrder_FormClosed;
- this.likbtnUpload.Click += LikbtnUpload_Click;
- this.lkAddGuoTongJiLu.Click += LkAddGuoTongJiLu_Click;
- this.lkGuoTongJiLuXiangQing.Click += LkGuoTongJiLuXiangQing_Click;
- this.lkQianQi.Click += LkQianQi_Click;
- this.lkHouQi.Click += LkHouQi_Click;
- this.lkBanLiHuiYuan.Click += LkBanLiHuiYuan_Click;
- this.lkHuiYuanGuanLi.Click += LkHuiYuanGuanLi_Click;
- this.lkHuFuShouKuan.Click += LkHuFuShouKuan_Click;
- this.tabControlMain.SelectedIndexChanged += TabControlMain_SelectedIndexChanged;
- this.lbTaoXiShenJi.Click += LbTaoXiShenJi_Click;
- this.maskBirthday.Leave += MaskBirthday_Leave;
- }
- List<Helper.CommandInfo> WorkAnPaiRecordlist = new List<Helper.CommandInfo>();
- LYFZ.BLL.BLL_ErpOrderWorkAnPaiRecord ordwr = new BLL.BLL_ErpOrderWorkAnPaiRecord();
- void AddOrderWorkAnPaiRecord(LYFZ.Model.Model_ErpOrdersPhotography model)
- {
- // loginUserName,
- // loginCompanyInfoID,
- // loginUserID,
- Model.Model_ErpOrderWorkAnPaiRecord modelRecord = new Model.Model_ErpOrderWorkAnPaiRecord();
- modelRecord.Ordwr_Number = "OWPR_" + LYFZ.BLL.BLL_ErpCustomer.GetClientNumber();
- modelRecord.Ordwr_WorkNumber = model.Ordpg_IDNumber;
- modelRecord.Ordwr_OrdNumber = model.Ordpg_Number;
- modelRecord.Ordwr_ViceNumber = model.Ordpg_ViceNumber;
- modelRecord.Ordwr_ModuleName = LYFZ.EnumPublic.WorkAnPaiChangeLogEnum.摄控安排拍照客人.ToString();
- modelRecord.Ordwr_UpdateOrderName = model.Ordpg_Sights;
- modelRecord.Ordwr_UpdateAgoPerson = model.Ordpg_Dispatcher;
- modelRecord.Ordwr_UpdateAgoTime = model.Ordpg_DispatchTime;
- modelRecord.Ordwr_UpdateAgoData = "修改订单时修改了拍摄时间, 修改前为 拍摄时间:" + LYFZ.BLL.OtherCommonModel.DateTimeToString(model.Ordpg_ReservationPhotographyTime) + " 摄影师:" + LYFZ.BLL.BLL_ErpOrderView.GetUserName(model.Ordpg_ReservationPhotographyName) + " 摄影助理:" + LYFZ.BLL.BLL_ErpOrderView.GetUserName(model.Ordpg_ReservationPhotographyAssistant) +
- " 化妆师:" + LYFZ.BLL.BLL_ErpOrderView.GetUserName(model.Ordpg_ReservationMakeupArtist) + " 化妆助理:" + LYFZ.BLL.BLL_ErpOrderView.GetUserName(model.Ordpg_ReservationMakeupAssistant) + " 引导师:" + LYFZ.BLL.BLL_ErpOrderView.GetUserName(model.Ordpg_ReservationBootDivision) + " 引导助理:" + LYFZ.BLL.BLL_ErpOrderView.GetUserName(model.Ordpg_ReservationBootDivisionAssistant);
- modelRecord.Ordwr_CreateDatetime = SDateTime.Now;
- modelRecord.Ordwr_CreateName = loginUserID;
- WorkAnPaiRecordlist.Add(ordwr.GetAddCommandInfo(modelRecord));
- }
- #region 订单详情页处理
- private void TabControlMain_SelectedIndexChanged( object sender, EventArgs e )
- {
- if ( this.tabControlMain.SelectedIndex == 2 )
- {
- this.GetPanelContactRecord();
- this.GetPanelPaymentDetailsControlsEx();
- this.GeneratingFlowchartImage();
- }
- }
- /// <summary>
- /// 生成流程图
- /// </summary>
- void GeneratingFlowchartImage()
- {
- if ( this.isGeneratingFlowchartImage || this.plFlowchartNodePanel.Controls.Count <= 0 )
- {
- this.isGeneratingFlowchartImage = false;
- this.plFlowchartNodePanel.Controls.Clear();
- FlowchartNode flowNode = new FlowchartNode( FlowchartNodeType.蓝色节点, "订单" );
- flowNode.PanelNode.Location = new Point( 8, 13 );
- this.plFlowchartNodePanel.Controls.Add( flowNode.PanelNode );
- VerticalLine vLine = new VerticalLine();
- vLine.Location = new Point( flowNode.PanelNode.Location.X + flowNode.PanelNode.Width / 2, flowNode.PanelNode.Location.Y + flowNode.PanelNode.Height / 2 );
- vLine.Height = 300;
- // vLine.SendToBack();
- //vLine.BringToFront();
- NodeDescription nodeDesc = new NodeDescription();
- nodeDesc.PanelGroup.Location = new Point( flowNode.PanelNode.Location.X + flowNode.PanelNode.Width + 4, flowNode.PanelNode.Location.Y - 4 );
- nodeDesc.LabelText.Text = this.currentOrderModel.Ord_CreateDateTime.ToYYYY_MM_dd_HH_mm_ss();
- nodeDesc.LabelDescription.Text = String.Format( "接单人:{0}", this.currentOrderModel.Ord_OrderPersonName );
- // nodeDesc.PanelGroup.BackColor = Color.Red;
- nodeDesc.PanelBg.Width = 270;
- this.plFlowchartNodePanel.Controls.Add( nodeDesc.PanelGroup );
- //拍照 修片 选片 精修 设计 看版 取件
- switch ( this.OrderType )
- {
- case EnumPublic.OrderType.婚纱订单:
- case EnumPublic.OrderType.写真订单:
- this.GeneratingFlowchartImage_WeddingOrders( flowNode, vLine );
- break;
- case EnumPublic.OrderType.儿童订单:
- this.GeneratingFlowchartImage_Child( flowNode, vLine );
- break;
- case EnumPublic.OrderType.婚庆订单:
- case EnumPublic.OrderType.服务订单:
- this.GeneratingFlowchartImage_Service( flowNode, vLine );
- break;
- }
- this.plFlowchartNodePanel.Controls.Add( vLine );
- this.plFlowchartNodePanel.Height = vLine.Location.Y + vLine.Height + 100;
- this.flowLayoutPanel2.Height = this.plFlowchartNodePanel.Location.Y + this.plFlowchartNodePanel.Height;
- this.flowLayoutPanel2.Refresh();
- this.flowLayoutPanel2.Update();
- }
- }
- //创建一个委托,是为访问DataGridVie控件服务的。
- //public delegate void UpdateControl();
- //void WaitThreadFunc(object b)
- //{
- // try
- // {
- // this.plFlowchartNodePanel.Invoke(new UpdateControl(delegate ()
- // {
- // this.GeneratingFlowchartImage();
- // }));
- // }
- // catch (Exception ex){
- // MessageBoxCustom.Show(ex.Message);
- // }
- //}
- /// <summary>
- /// 流程间隔
- /// </summary>
- int FlowchartInterval = 70;
- /// <summary>
- /// 拍照按钮数组
- /// </summary>
- string[] PhotographyBtnTexts = new string[] { "安排拍照", "导出原片", "查看原片", "导入原片" };
- /// <summary>
- /// 初修片
- /// </summary>
- string[] RetouchPhotoBtnTexts = new string[] { "安排修片", "查看初修片", "导入初修片" };
- /// <summary>
- /// 选片
- /// </summary>
- string[] SelectPhotoBtnTexts = new string[] { "安排选片", "开始选片" };
- /// <summary>
- /// 精修
- /// </summary>
- string[] RefinetPhotoBtnTexts = new string[] { "安排精修", "导入精修片", "导出选片" };
- /// <summary>
- /// 设计
- /// </summary>
- string[] DesignPhotoBtnTexts = new string[] { "安排设计", "导入设计", "导出精修" };
- /// <summary>
- /// 看版
- /// </summary>
- string[] LookPhotoBtnTexts = new string[] { "安排看版", "导出改设计", "看设计版" };
- /// <summary>
- /// 取件
- /// </summary>
- string[] PickupPhotoBtnTexts = new string[] { "安排取件", "安排发片", "发片取件", "安排服务" };
- /// <summary>
- /// 生成流程图 婚庆和服务订单
- /// </summary>
- void GeneratingFlowchartImage_Service( FlowchartNode rootNode, VerticalLine mainVLine )
- {
- int yIndex = 1;
- int interval = 140;
- if ( orderDigitalList.Count > 0 )
- {
- LYFZ.Model.Model_ErpOrderDigital digitaItem = orderDigitalList[0];
- FlowchartNode ServiceNode = AddFlowchartNode( rootNode.PanelNode.Location.X, rootNode.PanelNode.Location.Y + rootNode.PanelNode.Location.Y + rootNode.PanelNode.Height + yIndex * interval - 35
- , "服务", PickupPhotoBtnTexts, digitaItem, FlowchrtType.服务 );
- ServiceNode.DigitalItem = digitaItem;
- mainVLine.Height = ServiceNode.PanelNode.Location.Y + 2;
- }
- }
- /// <summary>
- /// 生成流程图 婚纱订单
- /// </summary>
- void GeneratingFlowchartImage_WeddingOrders( FlowchartNode rootNode, VerticalLine mainVLine )
- {
- FlowchartNode flowNode = new FlowchartNode( FlowchartNodeType.白色节点, "拍照" );
- flowNode.PanelNode.Location = new Point( rootNode.PanelNode.Location.X, rootNode.PanelNode.Location.Y + 70 );
- this.plFlowchartNodePanel.Controls.Add( flowNode.PanelNode );
- int yIndex = 0;
- int interval = 70;
- if ( orderDigitalList.Count > 0 )
- {
- LYFZ.Model.Model_ErpOrderDigital digitaItem = orderDigitalList[0];
- foreach ( LYFZ.Model.Model_ErpOrdersPhotography potoItem in photographyList )
- {
- NodeTitle nTitle = new NodeTitle( potoItem.Ordpg_Sights );
- nTitle.Location = new Point( mainVLine.Location.X + mainVLine.Width, flowNode.PanelNode.Location.Y + flowNode.PanelNode.Height + yIndex * interval );
- HorizontalLine hLine = new HorizontalLine();
- hLine.Location = new Point( mainVLine.Location.X + mainVLine.Width, nTitle.Location.Y + nTitle.Height + 1 );
- this.plFlowchartNodePanel.Controls.Add( nTitle );
- FlowchartNode potoNode = new FlowchartNode( FlowchartNodeType.白色节点, (yIndex + 1).ToString() );
- potoNode.PanelNode.Size = new Size( 24, 24 );
- potoNode.PanelNode.Location = new Point( hLine.Location.X + hLine.Width - 3, hLine.Location.Y - potoNode.PanelNode.Height / 2 );
- this.plFlowchartNodePanel.Controls.Add( potoNode.PanelNode );
- potoNode.DigitalItem = digitaItem;
- potoNode.PhotographyItem = potoItem;
- NodeDescription nodeDesc = new NodeDescription();
- nodeDesc.CurrentNode = potoNode;
- nodeDesc.PanelGroup.Location = new Point( potoNode.PanelNode.Location.X + potoNode.PanelNode.Width + 1, potoNode.PanelNode.Location.Y - 19 );
- this.SetPhotographyNodeDescription( nodeDesc, potoItem );
- nodeDesc.PanelBg.Width = 360;
- AddLinkLabelBtn( nodeDesc, PhotographyBtnTexts );
- this.plFlowchartNodePanel.Controls.Add( nodeDesc.PanelGroup );
- this.plFlowchartNodePanel.Controls.Add( hLine );
- yIndex++;
- }
- FlowchartNode RetouchPhotoNode = AddFlowchartNode( flowNode.PanelNode.Location.X, flowNode.PanelNode.Location.Y + flowNode.PanelNode.Location.Y + flowNode.PanelNode.Height + yIndex * interval - 35
- , "修片", RetouchPhotoBtnTexts, digitaItem, FlowchrtType.初修 );
- FlowchartNode SelectPhotoNode = AddFlowchartNode( RetouchPhotoNode.PanelNode.Location.X, RetouchPhotoNode.PanelNode.Location.Y + FlowchartInterval
- , "选片", SelectPhotoBtnTexts, digitaItem, FlowchrtType.选片 );
- FlowchartNode RefinetPhotoNode = AddFlowchartNode( SelectPhotoNode.PanelNode.Location.X, SelectPhotoNode.PanelNode.Location.Y + FlowchartInterval
- , "精修", RefinetPhotoBtnTexts, digitaItem, FlowchrtType.精修 );
- FlowchartNode DesignPhotoNode = AddFlowchartNode( RefinetPhotoNode.PanelNode.Location.X, RefinetPhotoNode.PanelNode.Location.Y + FlowchartInterval
- , "设计", DesignPhotoBtnTexts, digitaItem, FlowchrtType.设计 );
- FlowchartNode LookPhotoNode = AddFlowchartNode( DesignPhotoNode.PanelNode.Location.X, DesignPhotoNode.PanelNode.Location.Y + FlowchartInterval
- , "看版", LookPhotoBtnTexts, digitaItem, FlowchrtType.看版 );
- FlowchartNode PickupPhotoNode = AddFlowchartNode( LookPhotoNode.PanelNode.Location.X, LookPhotoNode.PanelNode.Location.Y + FlowchartInterval
- , "取件", PickupPhotoBtnTexts, digitaItem, FlowchrtType.取件 );
- RetouchPhotoNode.DigitalItem = digitaItem;
- SelectPhotoNode.DigitalItem = digitaItem;
- RefinetPhotoNode.DigitalItem = digitaItem;
- DesignPhotoNode.DigitalItem = digitaItem;
- LookPhotoNode.DigitalItem = digitaItem;
- PickupPhotoNode.DigitalItem = digitaItem;
- mainVLine.Height = PickupPhotoNode.PanelNode.Location.Y + 2;
- }
- }
- /// <summary>
- /// 设置婚纱订单拍照描述信息
- /// </summary>
- /// <param name="nodeDesc"></param>
- /// <param name="potoItem"></param>
- void SetPhotographyNodeDescription( NodeDescription nodeDesc, LYFZ.Model.Model_ErpOrdersPhotography potoItem )
- {
- nodeDesc.LabelText.Text = potoItem.Ordpg_PhotographyTime.ToYYYY_MM_dd_HH_mm_ss();
- if ( String.IsNullOrEmpty( nodeDesc.LabelText.Text ) )
- {
- nodeDesc.LabelText.Text = potoItem.Ordpg_ReservationPhotographyTime.ToYYYY_MM_dd_HH_mm_ss();
- }
- nodeDesc.LabelText2.Text = String.Format( "{0}", potoItem.GetPhotographyStatus() );
- nodeDesc.LabelDescription.Text = String.Format( "摄影师:{0} 化妆师:{1}\r\n摄影助理:{2} 化妆助理:{3}"
- , LYFZ.DAL.DAL_ErpUser.GetUserIDToUserName( potoItem.Ordpg_Photographer, ',' )
- , LYFZ.DAL.DAL_ErpUser.GetUserIDToUserName( potoItem.Ordpg_MakeupArtist, ',' )
- , LYFZ.DAL.DAL_ErpUser.GetUserIDToUserName( potoItem.Ordpg_PhotographyAssistant, ',' )
- , LYFZ.DAL.DAL_ErpUser.GetUserIDToUserName( potoItem.Ordpg_MakeupAssistant, ',' ) );
- }
- /// <summary>
- /// 设置儿童订单拍照描述信息
- /// </summary>
- /// <param name="nodeDesc"></param>
- /// <param name="potoItem"></param>
- void SetPhotographyNodeDescription_Child( NodeDescription nodeDesc, LYFZ.Model.Model_ErpOrdersPhotography potoItem )
- {
- nodeDesc.LabelText.Text = potoItem.Ordpg_PhotographyTime.ToYYYY_MM_dd_HH_mm_ss();
- if ( String.IsNullOrEmpty( nodeDesc.LabelText.Text ) )
- {
- nodeDesc.LabelText.Text = potoItem.Ordpg_ReservationPhotographyTime.ToYYYY_MM_dd_HH_mm_ss();
- }
- nodeDesc.LabelText2.Text = String.Format( "{0}", potoItem.GetPhotographyStatus() );
- nodeDesc.LabelDescription.Text = String.Format( "摄影师:{0} 化妆师:{1} 引导师:{2} \r\n摄影助理:{3} 化妆助理:{4} 引导助理:{5}"
- , LYFZ.DAL.DAL_ErpUser.GetUserIDToUserName( potoItem.Ordpg_Photographer, ',' )
- , LYFZ.DAL.DAL_ErpUser.GetUserIDToUserName( potoItem.Ordpg_MakeupArtist, ',' )
- , LYFZ.DAL.DAL_ErpUser.GetUserIDToUserName( potoItem.Ordpg_BootDivision, ',' )
- , LYFZ.DAL.DAL_ErpUser.GetUserIDToUserName( potoItem.Ordpg_PhotographyAssistant, ',' )
- , LYFZ.DAL.DAL_ErpUser.GetUserIDToUserName( potoItem.Ordpg_MakeupAssistant, ',' )
- , LYFZ.DAL.DAL_ErpUser.GetUserIDToUserName( potoItem.Ordpg_BootDivisionAssistant, ',' ) );
- }
- /// <summary>
- /// 生成流程图 儿童订单
- /// </summary>
- void GeneratingFlowchartImage_Child( FlowchartNode rootNode, VerticalLine mainVLine )
- {
- int yIndex = 0;
- int interval = 500;
- //最后一个节点 Y 值
- int endNode_Y = 0;
- foreach ( LYFZ.Model.Model_ErpOrderDigital digitaItem in orderDigitalList )
- {
- if ( photographyList.Any( p => p.Ordpg_ViceNumber.ToLower() == digitaItem.Ordv_ViceNumber.ToLower() ) )
- {
- LYFZ.Model.Model_ErpOrdersPhotography potoItem = photographyList.Find( p => p.Ordpg_ViceNumber.ToLower() == digitaItem.Ordv_ViceNumber.ToLower() );
- FlowchartNode flowNode = new FlowchartNode( FlowchartNodeType.白色节点, (yIndex + 1).ToString() );
- flowNode.PanelNode.Location = new Point( rootNode.PanelNode.Location.X, rootNode.PanelNode.Location.Y + 90 + interval * yIndex );
- this.plFlowchartNodePanel.Controls.Add( flowNode.PanelNode );
- endNode_Y = flowNode.PanelNode.Location.Y;
- HorizontalLine hLine = new HorizontalLine();
- hLine.Location = new Point( rootNode.PanelNode.Location.X + rootNode.PanelNode.Width - 2, flowNode.PanelNode.Location.Y + flowNode.PanelNode.Height / 2 );
- NodeTitle nTitle = new NodeTitle( potoItem.Ordpg_Sights );
- nTitle.Location = new Point( rootNode.PanelNode.Location.X + rootNode.PanelNode.Width - 2, hLine.Location.Y - hLine.Height - nTitle.Height );
- this.plFlowchartNodePanel.Controls.Add( nTitle );
- //拍照节点
- FlowchartNode potoNode = new FlowchartNode( FlowchartNodeType.白色节点, "拍照" );
- potoNode.PanelNode.Location = new Point( nTitle.Location.X + nTitle.Width - 2, flowNode.PanelNode.Location.Y );
- this.plFlowchartNodePanel.Controls.Add( potoNode.PanelNode );
- this.plFlowchartNodePanel.Controls.Add( hLine );
- potoNode.DigitalItem = digitaItem;
- potoNode.PhotographyItem = potoItem;
- //拍照节点描述
- NodeDescription nodeDesc = new NodeDescription();
- nodeDesc.CurrentNode = potoNode;
- nodeDesc.PanelGroup.Location = new Point( potoNode.PanelNode.Location.X + potoNode.PanelNode.Width + 1, potoNode.PanelNode.Location.Y - 9 );
- this.SetPhotographyNodeDescription_Child( nodeDesc, potoItem );
- // nodeDesc.PanelBg.Width = 360;
- AddLinkLabelBtn( nodeDesc, PhotographyBtnTexts );
- FlowchartNode RetouchPhotoNode = AddFlowchartNode( potoNode.PanelNode.Location.X, potoNode.PanelNode.Location.Y + FlowchartInterval
- , "修片", RetouchPhotoBtnTexts, digitaItem, FlowchrtType.初修 );
- FlowchartNode SelectPhotoNode = AddFlowchartNode( RetouchPhotoNode.PanelNode.Location.X, RetouchPhotoNode.PanelNode.Location.Y + FlowchartInterval
- , "选片", SelectPhotoBtnTexts, digitaItem, FlowchrtType.选片 );
- FlowchartNode RefinetPhotoNode = AddFlowchartNode( SelectPhotoNode.PanelNode.Location.X, SelectPhotoNode.PanelNode.Location.Y + FlowchartInterval
- , "精修", RefinetPhotoBtnTexts, digitaItem, FlowchrtType.精修 );
- FlowchartNode DesignPhotoNode = AddFlowchartNode( RefinetPhotoNode.PanelNode.Location.X, RefinetPhotoNode.PanelNode.Location.Y + FlowchartInterval
- , "设计", DesignPhotoBtnTexts, digitaItem, FlowchrtType.设计 );
- FlowchartNode LookPhotoNode = AddFlowchartNode( DesignPhotoNode.PanelNode.Location.X, DesignPhotoNode.PanelNode.Location.Y + FlowchartInterval
- , "看版", LookPhotoBtnTexts, digitaItem, FlowchrtType.看版 );
- FlowchartNode PickupPhotoNode = AddFlowchartNode( LookPhotoNode.PanelNode.Location.X, LookPhotoNode.PanelNode.Location.Y + FlowchartInterval
- , "取件", PickupPhotoBtnTexts, digitaItem, FlowchrtType.取件 );
- RetouchPhotoNode.DigitalItem = digitaItem;
- SelectPhotoNode.DigitalItem = digitaItem;
- RefinetPhotoNode.DigitalItem = digitaItem;
- DesignPhotoNode.DigitalItem = digitaItem;
- LookPhotoNode.DigitalItem = digitaItem;
- PickupPhotoNode.DigitalItem = digitaItem;
- RetouchPhotoNode.PhotographyItem = potoItem;
- SelectPhotoNode.PhotographyItem = potoItem;
- RefinetPhotoNode.PhotographyItem = potoItem;
- DesignPhotoNode.PhotographyItem = potoItem;
- LookPhotoNode.PhotographyItem = potoItem;
- PickupPhotoNode.PhotographyItem = potoItem;
- this.plFlowchartNodePanel.Controls.Add( nodeDesc.PanelGroup );
- //阶段流程线
- VerticalLine vLine = new VerticalLine();
- vLine.Location = new Point( potoNode.PanelNode.Location.X + potoNode.PanelNode.Width / 2, potoNode.PanelNode.Location.Y + potoNode.PanelNode.Height / 2 );
- vLine.Height = 400;
- //修片
- this.plFlowchartNodePanel.Controls.Add( vLine );
- yIndex++;
- }
- }
- mainVLine.Height = rootNode.PanelNode.Location.Y + 90 + interval * yIndex;
- //结尾节点
- FlowchartNode endNode = new FlowchartNode( FlowchartNodeType.白色节点, "" );
- // endNode.PanelNode.Size = new Size(24, 24);
- endNode.PanelNode.Location = new Point( rootNode.PanelNode.Location.X, mainVLine.Location.Y + mainVLine.Height - 5 );
- this.plFlowchartNodePanel.Controls.Add( endNode.PanelNode );
- }
- /// <summary>
- /// 添加流程节点
- /// </summary>
- /// <param name="x"></param>
- /// <param name="y"></param>
- /// <param name="nodeText">节点名</param>
- /// <param name="btnTexts">节点按钮组</param>
- /// <param name="status">流程状态</param>
- /// <param name="time">完成时间</param>
- /// <param name="lbDescription">相关人员</param>
- /// <returns></returns>
- FlowchartNode AddFlowchartNode( int x, int y, string nodeText, string[] btnTexts, LYFZ.Model.Model_ErpOrderDigital digitaItem, FlowchrtType fType )
- {
- //节点
- FlowchartNode potoNode = new FlowchartNode( FlowchartNodeType.白色节点, nodeText );
- potoNode.PanelNode.Location = new Point( x, y );
- this.plFlowchartNodePanel.Controls.Add( potoNode.PanelNode );
- //节点描述
- NodeDescription nodeDesc = new NodeDescription();
- nodeDesc.CurrentNode = potoNode;
- nodeDesc.PanelGroup.Location = new Point( potoNode.PanelNode.Location.X + potoNode.PanelNode.Width + 1, potoNode.PanelNode.Location.Y - 9 );
- this.SetFlowchartNodeDescription( nodeDesc, digitaItem, fType );
- nodeDesc.PanelBg.Width = 360;
- nodeDesc.LabelDescription.MouseEnter += LabelDescription_MouseEnter;
- nodeDesc.LabelDescription.Tag = nodeDesc;
- nodeDesc.BtnTexts = btnTexts;
- // AddLinkLabelBtn(nodeDesc, btnTexts);
- this.plFlowchartNodePanel.Controls.Add( nodeDesc.PanelGroup );
- return potoNode;
- }
- /// <summary>
- /// 设置流程描述
- /// </summary>
- /// <param name="nodeDesc"></param>
- /// <param name="status"></param>
- /// <param name="time"></param>
- /// <param name="lbDescription"></param>
- void SetFlowchartNodeDescription( NodeDescription nodeDesc, string status, string time, string lbDescription )
- {
- nodeDesc.LabelText.Text = time;
- nodeDesc.LabelText2.Text = String.Format( "{0}", status );
- nodeDesc.LabelDescription.Text = String.Format( lbDescription );
- }
- void SetFlowchartNodeDescription( NodeDescription nodeDesc, LYFZ.Model.Model_ErpOrderDigital digitaItem, FlowchrtType fType )
- {
- string status = "";
- string time = "";
- string lbDescription = "";
- if ( digitaItem != null )
- {
- switch ( fType )
- {
- case FlowchrtType.初修:
- status = digitaItem.GetEarlyRepairStatus();
- time = digitaItem.Ordv_EarlyRepairTime.ToYYYY_MM_dd_HH_mm_ss();
- lbDescription = String.Format( "{0}师:{1}", fType.ToString(), LYFZ.DAL.DAL_ErpUser.GetUserIDToUserName( digitaItem.Ordv_EarlyRepairName, ',' ) );
- break;
- case FlowchrtType.选片:
- status = digitaItem.GetFilmSelectionStatus();
- time = digitaItem.Ordv_FilmSelectionTime.ToYYYY_MM_dd_HH_mm_ss();
- lbDescription = String.Format( "{0}师:{1}", fType.ToString(), LYFZ.DAL.DAL_ErpUser.GetUserIDToUserName( digitaItem.Ordv_FilmSelectionName, ',' ) );
- break;
- case FlowchrtType.精修:
- status = digitaItem.GetRefinementStatus();
- time = digitaItem.Ordv_RefinementTime.ToYYYY_MM_dd_HH_mm_ss();
- lbDescription = String.Format( "{0}师:{1}", fType.ToString(), LYFZ.DAL.DAL_ErpUser.GetUserIDToUserName( digitaItem.Ordv_RefinementName, ',' ) );
- break;
- case FlowchrtType.设计:
- status = digitaItem.GetDesignerStatus();
- time = digitaItem.Ordv_DesignerTime.ToYYYY_MM_dd_HH_mm_ss();
- lbDescription = String.Format( "{0}师:{1}", fType.ToString(), LYFZ.DAL.DAL_ErpUser.GetUserIDToUserName( digitaItem.Ordv_DesignerName, ',' ) );
- break;
- case FlowchrtType.看版:
- status = digitaItem.GetLookDesignStatus();
- time = digitaItem.Ordv_LookDesignTime.ToYYYY_MM_dd_HH_mm_ss();
- lbDescription = String.Format( "{0}师:{1}", fType.ToString(), LYFZ.DAL.DAL_ErpUser.GetUserIDToUserName( digitaItem.Ordv_LookDesignName, ',' ) );
- break;
- case FlowchrtType.取件:
- string pickupTime = "";//最后取件时间
- string pickupName = "";//最后取件人
- GetLastPickupTime( digitaItem.Ordv_ViceNumber, ref pickupTime, ref pickupName );
- status = GetPickupStatus( digitaItem.Ordv_ViceNumber );
- time = pickupTime;
- lbDescription = String.Format( "{0}师:{1}", fType.ToString(), LYFZ.DAL.DAL_ErpUser.GetUserIDToUserName( pickupName, ',' ) );
- break;
- case FlowchrtType.服务:
- string serviceTime = "";//最后服务时间
- string serviceName = "";//最后服务人
- GetLasWeddingServiceTime( digitaItem.Ordv_ViceNumber, ref serviceTime, ref serviceName );
- status = GetWeddingServiceStatus( digitaItem.Ordv_ViceNumber );
- time = serviceTime;
- lbDescription = String.Format( "{0}人员:{1}", fType.ToString(), LYFZ.DAL.DAL_ErpUser.GetUserIDToUserName( serviceName, ',' ) );
- break;
- }
- }
- this.SetFlowchartNodeDescription( nodeDesc, status, time, lbDescription );
- }
- private void LabelDescription_MouseEnter( object sender, EventArgs e )
- {
- NodeDescription nodeDesc = (NodeDescription)((Control)sender).Tag;
- AddLinkLabelBtn( nodeDesc, nodeDesc.BtnTexts );
- }
- /// <summary>
- /// 添加按钮
- /// </summary>
- /// <param name="nodeDesc"></param>
- /// <param name="btnTexts"></param>
- void AddLinkLabelBtn( NodeDescription nodeDesc, string[] btnTexts )
- {
- if ( btnTexts != null && !nodeDesc.IsAddBtnText )
- {
- nodeDesc.IsAddBtnText = true;
- foreach ( string btnText in btnTexts )
- {
- System.Windows.Forms.LinkLabel likBtn = nodeDesc.NewLinkBtn( btnText );
- likBtn.Tag = nodeDesc;
- likBtn.Click += LikBtn_Click;
- nodeDesc.AddLinkBtn( likBtn );
- }
- }
- }
- private void LikBtn_Click( object sender, EventArgs e )
- {
- try
- {
- System.Windows.Forms.LinkLabel likBtn = (System.Windows.Forms.LinkLabel)sender;
- if ( likBtn.Tag == null )
- {
- return;
- }
- NodeDescription nodeDesc = (NodeDescription)likBtn.Tag;
- string StrSightsName = "";
- if ( nodeDesc.CurrentNode.PhotographyItem != null )
- {
- StrSightsName = nodeDesc.CurrentNode.PhotographyItem.Ordpg_Sights.Trim();
- }
- LYFZ.Model.Model_ErpOrderDigital _modelDigital = null;
- switch ( likBtn.Text.Trim() )
- {
- case "安排拍照":
- if ( !LYFZ.BLL.BLL_ErpUser.GetWebInterfaceRights( LYFZ.Model.Model_UserRights.GetQuickToolsPet(), "qt001" ) )
- {
- MessageBoxCustom.Show( "您无摄控本操作权限!" );
- return;
- }
- LYFZ.Software.MainBusiness.CameraControlBook.SmallForm.PhotographedReservationSmallForm frm8 = new CameraControlBook.SmallForm.PhotographedReservationSmallForm();
- frm8.OrdNumber = this.OrderNumber;
- frm8.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm8.Location = new Point( LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y );
- frm8.ShowDialog();
- if ( frm8.IsSave )
- {
- this.updateOrdersPhotography( nodeDesc.CurrentNode.PhotographyItem );
- if ( this.OrderType == EnumPublic.OrderType.儿童订单 )
- {
- this.SetPhotographyNodeDescription_Child( nodeDesc, nodeDesc.CurrentNode.PhotographyItem );
- }
- else
- {
- this.SetPhotographyNodeDescription( nodeDesc, nodeDesc.CurrentNode.PhotographyItem );
- }
- }
- break;
- case "导出原片":
- if ( !LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.StoresPhotograph, LYFZ.CustomAttributes.OperatingAuthority.PhotoExport ) )
- {
- MessageBoxCustom.Show( "您无导出原片权限!" );
- return;
- }
- if ( nodeDesc.CurrentNode.PhotographyItem != null )
- {
- if ( !LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.IsEnterPassword( nodeDesc.CurrentNode.PhotographyItem.Ordpg_ViceNumber.Trim() ) )
- {
- return;
- }
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ExportOriginalPiece( this.OrderNumber, nodeDesc.CurrentNode.PhotographyItem.Ordpg_ViceNumber.Trim(), nodeDesc.CurrentNode.PhotographyItem.Ordpg_Sights.Trim() );
- }
- else
- {
- MessageBoxCustom.Show( "订单数据不完整,你不能导出原片" );
- }
- break;
- case "查看原片":
- if ( !LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.StoresPhotograph, LYFZ.CustomAttributes.OperatingAuthority.PhotoView ) )
- {
- MessageBoxCustom.Show( "您无查看原片权限!" );
- return;
- }
- if ( nodeDesc.CurrentNode.PhotographyItem == null )
- {
- MessageBoxCustom.Show( "订单数据不完整,你不能查看原片" );
- return;
- }
- string Ordpg_ViceNumber = nodeDesc.CurrentNode.PhotographyItem.Ordpg_ViceNumber.Trim();
- string PhotographyName = nodeDesc.CurrentNode.PhotographyItem.Ordpg_Sights.Trim();
- if ( !LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.IsEnterPassword( Ordpg_ViceNumber ) )
- {
- return;
- }
- int Jid = 0;//景点ID
- string SightsName = PhotographyName.Trim();
- if ( this.photographyList.FindAll( p => p.Ordpg_ViceNumber.ToLower() == Ordpg_ViceNumber.Trim().ToLower() ).Count > 1 )
- {
- DialogResult Dialogresult = MessageBoxCustom.Show( "是否查看全部景点?", "信息提示", MessageBoxButtons.YesNoCancel );
- if ( Dialogresult == DialogResult.Yes )
- {
- SightsName = "";
- }
- else if ( Dialogresult == DialogResult.No )
- {
- Jid = nodeDesc.CurrentNode.PhotographyItem.ID;
- }
- else if ( Dialogresult == DialogResult.Cancel )
- {
- return;
- }
- }
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.CustomerPhotosViewSmallForm frm6 = new SetSmallForm.CustomerPhotosViewSmallForm();
- frm6.DirType = Model.Model_ErpOrder.DirectoryType.PrimitivePicture;
- frm6.ViceOrderNumber = Ordpg_ViceNumber.Trim();
- frm6.MainOrderNumber = this.OrderNumber;
- frm6.StrSightsName = SightsName;
- frm6.LoadType = "原片";
- frm6.JID = Jid;
- frm6.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm6.Location = new Point( LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y );
- frm6.Size = new Size( LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height );
- frm6.Show();
- break;
- case "导入原片":
- if ( !LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.StoresPhotograph, LYFZ.CustomAttributes.OperatingAuthority.PhotoImport ) )
- {
- MessageBoxCustom.Show( "您无导入原片权限!" );
- return;
- }
- if ( nodeDesc.CurrentNode.PhotographyItem == null )
- {
- MessageBoxCustom.Show( "订单数据不完整,你不能导入原片" );
- return;
- }
- LYFZ.Software.MainBusiness.DoorCityProcess.SuperSmallForm.OfficersConfirmSuperSmallForm frm5 = new SuperSmallForm.OfficersConfirmSuperSmallForm();
- frm5.OrdNumber = this.OrderNumber;
- frm5.OrdViceNumber = nodeDesc.CurrentNode.PhotographyItem.Ordpg_ViceNumber.Trim();
- frm5.JID = nodeDesc.CurrentNode.PhotographyItem.ID.ToString();
- frm5.SightsName = nodeDesc.CurrentNode.PhotographyItem.Ordpg_Sights.Trim();
- frm5.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm5.Location = new Point( LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y );
- frm5.ShowDialog();
- if ( frm5.IsSaveed )
- {
- this.updateOrdersPhotography( nodeDesc.CurrentNode.PhotographyItem );
- if ( this.OrderType == EnumPublic.OrderType.儿童订单 )
- {
- this.SetPhotographyNodeDescription_Child( nodeDesc, nodeDesc.CurrentNode.PhotographyItem );
- }
- else
- {
- this.SetPhotographyNodeDescription( nodeDesc, nodeDesc.CurrentNode.PhotographyItem );
- }
- }
- break;
- case "安排修片":
- if ( !LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.StoresDigital, LYFZ.CustomAttributes.OperatingAuthority.AnPaiWork ) )
- {
- MessageBoxCustom.Show( "您无数码安排工作权限!" );
- return;
- }
- if ( nodeDesc.CurrentNode.DigitalItem == null )
- {
- MessageBoxCustom.Show( "订单数据不完整,你不能安排修片" );
- return;
- }
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.AnPaiWorkSmallForm frm10 = new SetSmallForm.AnPaiWorkSmallForm();
- frm10.StrViceNumber = "'" + nodeDesc.CurrentNode.DigitalItem.Ordv_ViceNumber.Trim() + "'";
- frm10.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm10.Location = new Point( LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y );
- frm10.Size = new Size( LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height );
- frm10.ShowDialog();
- if ( frm10.IsSave )
- {
- this.updateOrderDigital( nodeDesc.CurrentNode.DigitalItem );
- this.SetFlowchartNodeDescription( nodeDesc, nodeDesc.CurrentNode.DigitalItem, FlowchrtType.初修 );
- }
- break;
- case "查看初修片":
- if ( !LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.StoresRepairPiece, LYFZ.CustomAttributes.OperatingAuthority.PhotoView ) )
- {
- MessageBoxCustom.Show( "您无查看初修片权限!" );
- return;
- }
- if ( nodeDesc.CurrentNode.DigitalItem == null )
- {
- MessageBoxCustom.Show( "订单数据不完整,你不能查看初修片" );
- return;
- }
- if ( !LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.IsEnterPassword( nodeDesc.CurrentNode.DigitalItem.Ordv_ViceNumber.Trim() ) )
- {
- return;
- }
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.CustomerPhotosViewSmallForm frm9 = new SetSmallForm.CustomerPhotosViewSmallForm();
- frm9.LoadType = "初修片";
- frm9.MainOrderNumber = this.OrderNumber;
- frm9.ViceOrderNumber = nodeDesc.CurrentNode.DigitalItem.Ordv_ViceNumber.Trim();
- frm9.DirType = Model.Model_ErpOrder.DirectoryType.EarlyRetouch;
- if ( nodeDesc.CurrentNode.PhotographyItem != null )
- {
- frm9.StrSightsName = nodeDesc.CurrentNode.PhotographyItem.Ordpg_Sights.Trim();
- }
- frm9.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm9.Location = new Point( LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y );
- frm9.Size = new Size( LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height );
- frm9.Show();
- break;
- case "导入初修片":
- if ( !LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.StoresRepairPiece, LYFZ.CustomAttributes.OperatingAuthority.PhotoImport ) )
- {
- MessageBoxCustom.Show( "您无导入初修片权限!" );
- return;
- }
- if ( nodeDesc.CurrentNode.DigitalItem == null )
- {
- MessageBoxCustom.Show( "订单数据不完整,你不能导入初修片" );
- return;
- }
-
- if ( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImportRepairPiece( this.OrderNumber, nodeDesc.CurrentNode.DigitalItem.Ordv_ViceNumber.Trim(), StrSightsName,ref _modelDigital) )
- {
- this.updateOrderDigital( nodeDesc.CurrentNode.DigitalItem );
- this.SetFlowchartNodeDescription( nodeDesc, nodeDesc.CurrentNode.DigitalItem, FlowchrtType.初修 );
- }
- break;
- case "安排选片":
- if ( !LYFZ.BLL.BLL_ErpUser.GetWebInterfaceRights( LYFZ.Model.Model_UserRights.GetQuickToolsPet(), "qt001" ) )
- {
- MessageBoxCustom.Show( "您无摄控本操作权限!" );
- return;
- }
- if ( nodeDesc.CurrentNode.DigitalItem == null )
- {
- MessageBoxCustom.Show( "订单数据不完整,你不能安排选片" );
- return;
- }
- LYFZ.Software.MainBusiness.CameraControlBook.SmallForm.FilmsSelectionReservationSmallForm frm11 = new CameraControlBook.SmallForm.FilmsSelectionReservationSmallForm();
- frm11.OrdViceNumber = nodeDesc.CurrentNode.DigitalItem.Ordv_ViceNumber.Trim();
- frm11.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm11.Location = new Point( LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y );
- frm11.ShowDialog();
- if ( frm11.IsSave )
- {
- this.updateOrderDigital( nodeDesc.CurrentNode.DigitalItem );
- this.SetFlowchartNodeDescription( nodeDesc, nodeDesc.CurrentNode.DigitalItem, FlowchrtType.选片 );
- }
- break;
- case "开始选片":
- if ( !LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.StoresFilmSelection, LYFZ.CustomAttributes.OperatingAuthority.StartFilmSelection ) )
- {
- MessageBoxCustom.Show( "您无选片权限!" );
- return;
- }
- if ( nodeDesc.CurrentNode.DigitalItem == null )
- {
- MessageBoxCustom.Show( "订单数据不完整,你不能开始选片" );
- return;
- }
- if ( !LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.IsEnterPassword( nodeDesc.CurrentNode.DigitalItem.Ordv_ViceNumber.Trim() ) )
- {
- return;
- }
- if ( LYFZ.Software.MainBusiness.DoorCityProcess.FilmSelectionStart.ShowPhotoSelectSystemMainPhotoSelect( this.OrderNumber, nodeDesc.CurrentNode.DigitalItem.Ordv_ViceNumber.Trim() ) )
- {
- this.updateOrderDigital( nodeDesc.CurrentNode.DigitalItem );
- this.SetFlowchartNodeDescription( nodeDesc, nodeDesc.CurrentNode.DigitalItem, FlowchrtType.选片 );
- }
- break;
- case "安排精修":
- if ( !LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.StoresDigital, LYFZ.CustomAttributes.OperatingAuthority.AnPaiWork ) )
- {
- MessageBoxCustom.Show( "您无数码安排工作权限!" );
- return;
- }
- if ( nodeDesc.CurrentNode.DigitalItem == null )
- {
- MessageBoxCustom.Show( "订单数据不完整,你不能开始选片" );
- return;
- }
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.AnPaiWorkSmallForm frm13 = new SetSmallForm.AnPaiWorkSmallForm();
- frm13.StrViceNumber = "'" + nodeDesc.CurrentNode.DigitalItem.Ordv_ViceNumber.Trim() + "'";
- frm13.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm13.Location = new Point( LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y );
- frm13.Size = new Size( LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height );
- frm13.ShowDialog();
- if ( frm13.IsSave )
- {
- this.updateOrderDigital( nodeDesc.CurrentNode.DigitalItem );
- this.SetFlowchartNodeDescription( nodeDesc, nodeDesc.CurrentNode.DigitalItem, FlowchrtType.精修 );
- }
- break;
- case "导入精修片":
- if ( !LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.StoresRefinedRepair, LYFZ.CustomAttributes.OperatingAuthority.PhotoImport ) )
- {
- MessageBoxCustom.Show( "您无导入精修片权限!" );
- return;
- }
- if ( nodeDesc.CurrentNode.DigitalItem == null )
- {
- MessageBoxCustom.Show( "订单数据不完整,你不能开始选片" );
- return;
- }
- if ( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImportRefinedRepairPiece( this.OrderNumber
- , nodeDesc.CurrentNode.DigitalItem.Ordv_ViceNumber.Trim(), StrSightsName,ref _modelDigital ) )
- {
- this.updateOrderDigital( nodeDesc.CurrentNode.DigitalItem );
- this.SetFlowchartNodeDescription( nodeDesc, nodeDesc.CurrentNode.DigitalItem, FlowchrtType.精修 );
- }
- break;
- case "导出选片":
- if ( !LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.StoresFilmSelection, LYFZ.CustomAttributes.OperatingAuthority.PhotoExport ) )
- {
- MessageBoxCustom.Show( "您无导出选好的片权限!" ); return;
- }
- if ( nodeDesc.CurrentNode.DigitalItem == null )
- {
- MessageBoxCustom.Show( "订单数据不完整,你不能开始选片" );
- return;
- }
- if ( !LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.IsEnterPassword( nodeDesc.CurrentNode.DigitalItem.Ordv_ViceNumber.Trim() ) )
- {
- return;
- }
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ExportSelectionPiece( this.OrderNumber, nodeDesc.CurrentNode.DigitalItem.Ordv_ViceNumber.Trim() );
- break;
- case "安排设计":
- if ( !LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.StoresDigital, LYFZ.CustomAttributes.OperatingAuthority.AnPaiWork ) )
- {
- MessageBoxCustom.Show( "您无数码安排工作权限!" );
- return;
- }
- if ( nodeDesc.CurrentNode.DigitalItem == null )
- {
- MessageBoxCustom.Show( "订单数据不完整,你不能安排设计" );
- return;
- }
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.AnPaiWorkSmallForm frm14 = new SetSmallForm.AnPaiWorkSmallForm();
- frm14.StrViceNumber = "'" + nodeDesc.CurrentNode.DigitalItem.Ordv_ViceNumber.Trim() + "'";
- frm14.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm14.Location = new Point( LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y );
- frm14.Size = new Size( LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height );
- frm14.ShowDialog();
- if ( frm14.IsSave )
- {
- this.updateOrderDigital( nodeDesc.CurrentNode.DigitalItem );
- this.SetFlowchartNodeDescription( nodeDesc, nodeDesc.CurrentNode.DigitalItem, FlowchrtType.设计 );
- }
- break;
- case "导入设计":
- if ( !LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.StoresDesign, LYFZ.CustomAttributes.OperatingAuthority.PhotoImport ) )
- {
- MessageBoxCustom.Show( "您无导入设计片权限!" );
- return;
- }
- if ( nodeDesc.CurrentNode.DigitalItem == null )
- {
- MessageBoxCustom.Show( "订单数据不完整,你不能导入设计" );
- return;
- }
- if ( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImportDesignPiece( this.OrderNumber
- , nodeDesc.CurrentNode.DigitalItem.Ordv_ViceNumber.Trim(), StrSightsName,ref _modelDigital ) )
- {
- this.updateOrderDigital( nodeDesc.CurrentNode.DigitalItem );
- this.SetFlowchartNodeDescription( nodeDesc, nodeDesc.CurrentNode.DigitalItem, FlowchrtType.设计 );
- }
- break;
- case "导出精修":
- if ( !LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.StoresRefinedRepair, LYFZ.CustomAttributes.OperatingAuthority.PhotoExport ) )
- {
- MessageBoxCustom.Show( "您无导出精修权限!" );
- return;
- }
- if ( nodeDesc.CurrentNode.DigitalItem == null )
- {
- MessageBoxCustom.Show( "订单数据不完整,你不能导出精修" );
- return;
- }
- if ( !LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.IsEnterPassword( nodeDesc.CurrentNode.DigitalItem.Ordv_ViceNumber.Trim() ) )
- {
- return;
- }
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ExportRefinedRepairPiece( this.OrderNumber
- , nodeDesc.CurrentNode.DigitalItem.Ordv_ViceNumber.Trim(), StrSightsName );
- break;
- case "安排看版":
- if ( !LYFZ.BLL.BLL_ErpUser.GetWebInterfaceRights( LYFZ.Model.Model_UserRights.GetQuickToolsPet(), "qt001" ) )
- {
- MessageBoxCustom.Show( "您无摄控本操作权限!" );
- return;
- }
- if ( nodeDesc.CurrentNode.DigitalItem == null )
- {
- MessageBoxCustom.Show( "订单数据不完整,你不能安排看版" );
- return;
- }
- LYFZ.Software.MainBusiness.CameraControlBook.SmallForm.LookDesignReservationSmallForm frm16 = new CameraControlBook.SmallForm.LookDesignReservationSmallForm();
- frm16.OrdViceNumber = nodeDesc.CurrentNode.DigitalItem.Ordv_ViceNumber.Trim();
- frm16.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm16.Location = new Point( LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y );
- frm16.ShowDialog();
- if ( frm16.IsSave )
- {
- this.updateOrderDigital( nodeDesc.CurrentNode.DigitalItem );
- this.SetFlowchartNodeDescription( nodeDesc, nodeDesc.CurrentNode.DigitalItem, FlowchrtType.看版 );
- }
- break;
- case "导出改设计":
- if ( !LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.StoresDesign, LYFZ.CustomAttributes.OperatingAuthority.PhotoExport ) )
- {
- MessageBoxCustom.Show( "您无导出改设计片权限!" );
- return;
- }
- if ( nodeDesc.CurrentNode.DigitalItem == null )
- {
- MessageBoxCustom.Show( "订单数据不完整,你不能导出改设计" );
- return;
- }
- if ( !LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.IsEnterPassword( nodeDesc.CurrentNode.DigitalItem.Ordv_ViceNumber.Trim() ) )
- {
- return;
- }
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ExportDesignPiece( this.OrderNumber
- , nodeDesc.CurrentNode.DigitalItem.Ordv_ViceNumber.Trim(), StrSightsName );
- break;
- case "看设计版":
- if ( !LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.StoresDesign, LYFZ.CustomAttributes.OperatingAuthority.LookDesign ) )
- {
- MessageBoxCustom.Show( "您无看设计版权限!" );
- return;
- }
- if ( nodeDesc.CurrentNode.DigitalItem == null )
- {
- MessageBoxCustom.Show( "订单数据不完整,你不能看设计版" );
- return;
- }
- if ( !LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.IsEnterPassword( nodeDesc.CurrentNode.DigitalItem.Ordv_ViceNumber.Trim() ) )
- {
- return;
- }
- LYFZ.PhotoSelectSystem.LookDesign frm15 = new PhotoSelectSystem.LookDesign( this.currentOrderModel, nodeDesc.CurrentNode.DigitalItem );
- frm15.ShowDialog();
- break;
- case "安排取件":
- if ( !LYFZ.BLL.BLL_ErpUser.GetWebInterfaceRights( LYFZ.Model.Model_UserRights.GetQuickToolsPet(), "qt001" ) )
- {
- MessageBoxCustom.Show( "您无摄控本操作权限!" );
- return;
- }
- if ( nodeDesc.CurrentNode.DigitalItem == null )
- {
- MessageBoxCustom.Show( "订单数据不完整,你不能安排取件" );
- return;
- }
- LYFZ.Software.MainBusiness.CameraControlBook.SmallForm.TakePiecesReservationSmallForm frm20 = new CameraControlBook.SmallForm.TakePiecesReservationSmallForm();
- frm20.OrdNumber = this.OrderNumber;
- frm20.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm20.Location = new Point( LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y );
- frm20.Size = new Size( LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height );
- frm20.ShowDialog();
- if ( frm20.IsSave )
- {
- this.updateOrderDigital( nodeDesc.CurrentNode.DigitalItem );
- this.SetFlowchartNodeDescription( nodeDesc, nodeDesc.CurrentNode.DigitalItem, FlowchrtType.取件 );
- }
- break;
- case "安排发片":
- if ( !LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.StoresDigital, LYFZ.CustomAttributes.OperatingAuthority.AnPaiWork ) )
- {
- MessageBoxCustom.Show( "您无数码安排工作权限!" );
- return;
- }
- if ( nodeDesc.CurrentNode.DigitalItem == null )
- {
- MessageBoxCustom.Show( "订单数据不完整,你不能安排发片" );
- return;
- }
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.AnPaiWorkSmallForm frm19 = new SetSmallForm.AnPaiWorkSmallForm();
- frm19.StrViceNumber = "'" + nodeDesc.CurrentNode.DigitalItem.Ordv_ViceNumber.Trim() + "'";
- frm19.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm19.Location = new Point( LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y );
- frm19.Size = new Size( LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height );
- frm19.ShowDialog();
- if ( frm19.IsSave )
- {
- this.updateOrderDigital( nodeDesc.CurrentNode.DigitalItem );
- }
- break;
- case "发片取件":
- if ( !LYFZ.BLL.BLL_ErpUser.GetWebInterfaceRights( "retailProcess", "st013" ) )
- {
- MessageBoxCustom.Show( "您无发片取件权限!" );
- return;
- }
- if ( nodeDesc.CurrentNode.DigitalItem == null )
- {
- MessageBoxCustom.Show( "订单数据不完整,你不能发片取件" );
- return;
- }
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.HairPieceSingleSmallForm frm18 = new SetSmallForm.HairPieceSingleSmallForm();
- frm18.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm18.Location = new Point( LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y );
- frm18.Size = new Size( LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height );
- Dictionary<string, string> DictDataArray = new Dictionary<string, string>();
- DictDataArray["ViceNumber"] = nodeDesc.CurrentNode.DigitalItem.Ordv_ViceNumber.Trim();
- DictDataArray["OrdNumber"] = this.OrderNumber;
- DictDataArray["OrdType"] = Enum.GetName( typeof( LYFZ.EnumPublic.OrderType ), Convert.ToInt32( this.OrderType ) );
- frm18.DictDataArray = DictDataArray;
- frm18.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm18.Location = new Point( LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y );
- frm18.Size = new Size( LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height );
- frm18.ShowDialog();
- if ( frm18.IsSave )
- {
- this.updateOrderDigital( nodeDesc.CurrentNode.DigitalItem );
- this.SetFlowchartNodeDescription( nodeDesc, nodeDesc.CurrentNode.DigitalItem, FlowchrtType.取件 );
- }
- break;
- case "安排服务":
- if ( !LYFZ.BLL.BLL_ErpUser.GetWebInterfaceRights( LYFZ.Model.Model_UserRights.GetQuickToolsPet(), "qt001" ) )
- {
- MessageBoxCustom.Show( "您无摄控本操作权限!" );
- return;
- }
- if ( nodeDesc.CurrentNode.DigitalItem == null )
- {
- MessageBoxCustom.Show( "订单数据不完整,你不能安排服务" );
- return;
- }
- LYFZ.Software.MainBusiness.CameraControlBook.SmallForm.WeddingReservationSmallForm frm17 = new CameraControlBook.SmallForm.WeddingReservationSmallForm();
- frm17.OrdNumber = this.OrderNumber;
- frm17.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm17.Location = new Point( LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y );
- frm17.Size = new Size( LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height );
- frm17.ShowDialog();
- if ( frm17.IsSaveed )
- {
- this.updateOrderDigital( nodeDesc.CurrentNode.DigitalItem );
- }
- break;
- }
- }
- catch ( Exception ex )
- {
- MessageBoxCustom.Show( "请求出错:{0}", ex.Message );
- }
- /*
- /// 拍照按钮数组 new string[] { "安排拍照", "导出原片", "查看原片", "导入原片" };
- /// 初修片 new string[] { "安排修片", "查看初修片", "导入初修片" };
- /// 选片 new string[] { "安排选片", "开始选片" };
- /// 精修 new string[] { "安排精修", "导入精修片","导出选片" };
- /// 设计 new string[] { "安排设计", "导入设计", "导出精修" };
- /// 看版 new string[] { "安排看版", "导出改设计", "看设计版" };
- /// 取件 new string[] { "安排取件", "安排发片", "发片取件", "安排服务" };
- */
- }
- /// <summary>
- /// 更新摄影表对象
- /// </summary>
- /// <param name="nodeDesc"></param>
- void updateOrdersPhotography( Model.Model_ErpOrdersPhotography oldPhotographyModel )
- {
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod( delegate ( object obj, BackgroundWorker backgroundWorker )
- {
- backgroundWorker.ReportProgress( 0, "正在更新数据... " );
- Model.Model_ErpOrdersPhotography newPhotographyModel = photographyBll.GetModel( oldPhotographyModel.ID );
- this.UpdateModel<Model.Model_ErpOrdersPhotography>( oldPhotographyModel, newPhotographyModel );
- } );
- }
- /// <summary>
- /// 更新数码表对象
- /// </summary>
- /// <param name="nodeDesc"></param>
- void updateOrderDigital( Model.Model_ErpOrderDigital oldOrderDigital )
- {
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod( delegate ( object obj, BackgroundWorker backgroundWorker )
- {
- backgroundWorker.ReportProgress( 0, "正在更新数据... " );
- Model.Model_ErpOrderDigital newOrderDigital = orderDigitalBll.GetModel( oldOrderDigital.ID );
- this.UpdateModel<Model.Model_ErpOrderDigital>( oldOrderDigital, newOrderDigital );
- } );
- }
- /// <summary>
- /// 获取属性集合
- /// </summary>
- public System.Reflection.PropertyInfo[] GetPropertyInfos<T>()
- {
- return typeof( T ).GetProperties().Where( i => i.CanWrite && i.Name != "id" ).ToArray();
- }
- /// <summary>
- /// 得到一个对象实体
- /// </summary>
- public void UpdateModel<T>( T oldModel, T newModel )
- {
- if ( newModel != null )
- {
- System.Reflection.PropertyInfo[] PropertyInfos = GetPropertyInfos<T>();
- for ( int i = 0; i < PropertyInfos.Length; i++ )
- {
- try
- {
- System.Reflection.PropertyInfo propertyInfo = PropertyInfos[i];
- string tempFieldName = propertyInfo.Name;//字段名
- object tempValue = LYFZ.WinAPI.CustomPublicMethod.GetPropertyValue( newModel, tempFieldName );//对应字段值
- LYFZ.WinAPI.CustomPublicMethod.SetPropertyValue( oldModel, propertyInfo, tempValue );
- }
- catch
- {
- }
- }
- }
- }
- /// <summary>
- /// 获取取件状态
- /// </summary>
- /// <param name="_ViceNumber"></param>
- /// <returns></returns>
- string GetPickupStatus( string _ViceNumber )
- {
- string retStatus = "无商品";
- if ( this.orderProductList.Count > 0 )
- {
- if ( this.orderProductList.Any( p => p.OPlist_ViceNumber.ToLower() == _ViceNumber.ToLower() && p.OPlist_PickupStatus == "0" )
- && !this.orderProductList.Any( p => p.OPlist_ViceNumber.ToLower() == _ViceNumber.ToLower() && p.OPlist_PickupStatus == "1" ) )
- {
- retStatus = "未取";
- }
- else if ( this.orderProductList.Any( p => p.OPlist_ViceNumber.ToLower() == _ViceNumber.ToLower() && p.OPlist_PickupStatus == "0" )
- && this.orderProductList.Any( p => p.OPlist_ViceNumber.ToLower() == _ViceNumber.ToLower() && p.OPlist_PickupStatus == "1" ) )
- {
- retStatus = "部分已取";
- }
- else if ( !this.orderProductList.Any( p => p.OPlist_ViceNumber.ToLower() == _ViceNumber.ToLower() && p.OPlist_PickupStatus == "0" )
- && this.orderProductList.Any( p => p.OPlist_ViceNumber.ToLower() == _ViceNumber.ToLower() && p.OPlist_PickupStatus == "1" ) )
- {
- retStatus = "已取";
- }
- }
- return retStatus;
- }
- /// <summary>
- /// 获取服务状态
- /// </summary>
- /// <param name="_ViceNumber"></param>
- /// <returns></returns>
- string GetWeddingServiceStatus( string _ViceNumber )
- {
- string retStatus = "无服务";
- if ( this.orderWeddingServiceList.Count > 0 )
- {
- if ( this.orderWeddingServiceList.Any( p => p.Ws_ViceNumber.ToLower() == _ViceNumber.ToLower() && p.Ws_Status == "0" )
- && !this.orderWeddingServiceList.Any( p => p.Ws_ViceNumber.ToLower() == _ViceNumber.ToLower() && p.Ws_Status == "1" )
- && !this.orderWeddingServiceList.Any( p => p.Ws_ViceNumber.ToLower() == _ViceNumber.ToLower() && p.Ws_Status == "2" ) )
- {
- retStatus = "未进行";
- }
- else if ( this.orderWeddingServiceList.Any( p => p.Ws_ViceNumber.ToLower() == _ViceNumber.ToLower() && p.Ws_Status == "2" )
- || this.orderWeddingServiceList.Any( p => p.Ws_ViceNumber.ToLower() == _ViceNumber.ToLower() && p.Ws_Status == "1" ) )
- {
- retStatus = "进行中";
- }
- else if ( !this.orderWeddingServiceList.Any( p => p.Ws_ViceNumber.ToLower() == _ViceNumber.ToLower() && p.Ws_Status == "0" )
- && !this.orderWeddingServiceList.Any( p => p.Ws_ViceNumber.ToLower() == _ViceNumber.ToLower() && p.Ws_Status == "2" )
- && this.orderWeddingServiceList.Any( p => p.Ws_ViceNumber.ToLower() == _ViceNumber.ToLower() && p.Ws_Status == "1" ) )
- {
- retStatus = "OK";
- }
- }
- return retStatus;
- }
- /// <summary>
- /// 获取最后服务时间 和 服务人员
- /// </summary>
- /// <param name="_ViceNumber"></param>
- /// <param name="serviceTime"></param>
- /// <param name="serviceName"></param>
- void GetLasWeddingServiceTime( string _ViceNumber, ref string serviceTime, ref string serviceName )
- {
- if ( this.orderWeddingServiceList.Count > 0 )
- {
- List<LYFZ.Model.Model_ErpWeddingService> tempWeddingServiceList = orderWeddingServiceList.FindAll( p => p.Ws_ViceNumber.ToLower() == _ViceNumber.ToLower() );
- if ( tempWeddingServiceList != null )
- {
- if ( tempWeddingServiceList.Count > 0 )
- {
- LYFZ.Model.Model_ErpWeddingService tempProduct = tempWeddingServiceList.OrderByDescending( p => p.Ws_WeddingDate ).First();
- if ( tempProduct.Ws_WeddingDate != null )
- {
- if ( tempProduct.Ws_WeddingDate > LYFZ.WinAPI.CustomPublicMethod.GetNullDateTime() )
- {
- serviceTime = Convert.ToDateTime( tempProduct.Ws_WeddingDate ).ToYYYY_MM_dd_HH_mm_ss();
- serviceName = tempProduct.Ws_Serviceman1 + "," + tempProduct.Ws_Serviceman2;
- }
- }
- }
- }
- }
- }
- /// <summary>
- /// 获取最后取件时间 和 取件人
- /// </summary>
- /// <param name="_ViceNumber"></param>
- /// <param name="pickupTime"></param>
- /// <param name="pickupName"></param>
- void GetLastPickupTime( string _ViceNumber, ref string pickupTime, ref string pickupName )
- {
- if ( this.orderProductList.Count > 0 )
- {
- List<LYFZ.Model.Model_ErpOrderProductList> tempProductList = this.orderProductList.FindAll( p => p.OPlist_ViceNumber.ToLower() == _ViceNumber.ToLower() );
- if ( tempProductList != null )
- {
- if ( tempProductList.Count > 0 )
- {
- LYFZ.Model.Model_ErpOrderProductList tempProduct = tempProductList.OrderByDescending( p => p.OPlist_PickupTime ).First();
- if ( tempProduct.OPlist_PickupTime != null )
- {
- if ( tempProduct.OPlist_PickupTime > LYFZ.WinAPI.CustomPublicMethod.GetNullDateTime() )
- {
- pickupTime = Convert.ToDateTime( tempProduct.OPlist_PickupTime ).ToYYYY_MM_dd_HH_mm_ss();
- pickupName = tempProduct.OPlist_PickupName;
- }
- }
- }
- }
- }
- }
- /// <summary>
- /// 服务收款
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void LkHuFuShouKuan_Click( object sender, EventArgs e )
- {
- if ( !LYFZ.BLL.BLL_ErpUser.GetWebInterfaceRights( "st040", "st041" ) )
- {
- MessageBoxCustom.Show( "您无会员资料权限!" ); return;
- }
- LYFZ.Software.MainBusiness.MembershipManage.SuperSmallForm.MemberServiceCardArrearsSuperSmallForm frm4 = new MembershipManage.SuperSmallForm.MemberServiceCardArrearsSuperSmallForm();
- if ( this.lbHuiYuanHao.Tag != null )
- {
- frm4.StrMemberNumber = this.lbHuiYuanHao.Tag.ToString().Trim();
- }
- else
- {
- frm4.StrMemberNumber = "";
- }
- frm4.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm4.Location = new Point( LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y );
- frm4.Size = new Size( LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height );
- frm4.ShowDialog();
- if ( frm4.IsSaveed )
- {
- this.GetPanelPaymentDetailsControlsEx();
- }
- }
- /// <summary>
- /// 会员管理
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void LkHuiYuanGuanLi_Click( object sender, EventArgs e )
- {
- if ( !LYFZ.BLL.BLL_ErpUser.GetWebInterfaceRights( "st040", "st041" ) )
- {
- MessageBoxCustom.Show( "您无会员资料权限!" );
- return;
- }
- LYFZ.Software.MainBusiness.MembershipManage.SetSmallForm.GoldManagementSmallForm frm3 = new MembershipManage.SetSmallForm.GoldManagementSmallForm();
- if ( this.lbHuiYuanHao.Tag != null )
- {
- frm3.StrNumber = this.lbHuiYuanHao.Tag.ToString().Trim();
- }
- else
- {
- frm3.StrNumber = "";
- }
- frm3.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm3.Location = new Point( LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y );
- frm3.ShowDialog();
- if ( frm3.IsSaveed )
- {
- this.GetPanelPaymentDetailsControlsEx();
- }
- }
- /// <summary>
- /// 办理会员
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void LkBanLiHuiYuan_Click( object sender, EventArgs e )
- {
- if ( !LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.MemberManage, LYFZ.CustomAttributes.OperatingAuthority.Member_OpenCard ) )
- {
- MessageBoxCustom.Show( "您无办理会员权限!" );
- return;
- }
- LYFZ.Software.MainBusiness.MembershipManage.SetSmallForm.AddGoldCardMemberSmallForm frm21 = new MembershipManage.SetSmallForm.AddGoldCardMemberSmallForm();
- frm21.StrClientNumber = this.M_Cus_CustomerNumber;
- frm21.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm21.Location = new Point( LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y );
- frm21.ShowDialog();
- if ( frm21.IsSaveed )
- {
- this.GetPanelPaymentDetailsControlsEx();
- }
- }
- /// <summary>
- /// 当前会员卡持卡人客户ID
- /// </summary>
- string M_Cus_CustomerNumber = "";
- /// <summary>
- /// 获取订单收款信息
- /// </summary>
- void GetPanelPaymentDetailsControlsEx()
- {
- string StrColumnName = "Ord_Number,M_Cus_CustomerNumber,Ord_SeriesPrice AS 套系金额,case when (Select sum(Plu_Amount) as Plu_Amount from tb_ErpPlusPickItems where Plu_OrdNumber = Ord_Number) is null then 0 else (Select sum(Plu_Amount) as Plu_Amount from tb_ErpPlusPickItems where Plu_OrdNumber = Ord_Number) end AS 加挑金额," +
- "case when (select sum(Pay_AmountOf) from dbo.tb_ErpPayment where Pay_OrdNumber = Ord_Number And Pay_Category in ('全款','预约收款','预约补款')) is null then 0 else (select sum(Pay_AmountOf) from dbo.tb_ErpPayment where Pay_OrdNumber = Ord_Number And Pay_Category in ('全款','预约收款','预约补款')) end AS 前期收款," +
- "case when (select sum(Pay_AmountOf) from dbo.tb_ErpPayment where Pay_OrdNumber = Ord_Number And Pay_Category = '后期收款') is null then 0 else (select sum(Pay_AmountOf) from dbo.tb_ErpPayment where Pay_OrdNumber = Ord_Number And Pay_Category = '后期收款') end AS 后期收款";
- DataTable dt = orderBll.GetView_Custom( "tb_ErpOrder Left Join tempTB_AggregationCustomer on GP_OrderNumber = Ord_Number", StrWhere: "Ord_Number = '" + this.currentOrderModel.Ord_Number + "'", ShowColumnName: StrColumnName ).Tables[0];
- #region 收款与会员信息
- try
- {
- if ( dt.Rows.Count > 0 )
- {
- this.lbQianQiShiShou.Text = dt.Rows[0]["套系金额"].ToString().Trim();
- this.lbQianQiYingShou.Text = dt.Rows[0]["前期收款"].ToString().Trim();
- this.lbQianQiQianKuan.Text = (Convert.ToDecimal( dt.Rows[0]["套系金额"] ) - Convert.ToDecimal( dt.Rows[0]["前期收款"] )).ToString();
- this.lbHouQiShiShou.Text = dt.Rows[0]["加挑金额"].ToString().Trim();
- this.lbHouQiYingShou.Text = dt.Rows[0]["后期收款"].ToString().Trim();
- this.lbHouQiQianKuan.Text = (Convert.ToDecimal( dt.Rows[0]["加挑金额"] ) - Convert.ToDecimal( dt.Rows[0]["后期收款"] )).ToString();
- this.M_Cus_CustomerNumber = dt.Rows[0]["M_Cus_CustomerNumber"].ToString().Trim();
- dt = orderBll.GetView_Custom( "BView_MemberMain_GoldMember", StrWhere: " Mc_Status='1' and 姓名编号 = '" + dt.Rows[0]["M_Cus_CustomerNumber"].ToString().Trim() + "'", ShowColumnName: "Mc_Number,姓名,会员卡号,等级,折扣,积分,金额,欠款" ).Tables[0];
- if ( dt.Rows.Count > 0 )
- {
- if ( !string.IsNullOrEmpty( dt.Rows[0]["会员卡号"].ToString().Trim() ) )
- {
- this.lbHuiYuanMing.Text = ObjectToString( dt.Rows[0]["姓名"] ).Trim();
- this.lbHuiYuanHao.Tag = ObjectToString( dt.Rows[0]["Mc_Number"] ).Trim();
- this.lbHuiYuanHao.Text = String.Format( "会员卡号:{0}", ObjectToString( dt.Rows[0]["会员卡号"] ).Trim() );
- this.lbKeYongJiE.Text = String.Format( "{0}元", ObjectToString( dt.Rows[0]["金额"] ).Trim() );
- this.lbKeYongJiFen.Text = String.Format( "{0}分", ObjectToString( dt.Rows[0]["积分"] ).Trim() );
- this.lbHuiYuanDengJi.Text = String.Format( "会员等级:{0}", ObjectToString( dt.Rows[0]["等级"] ).Trim() );
- if ( !String.IsNullOrEmpty( ObjectToString( dt.Rows[0]["折扣"] ).Trim() ) )
- {
- this.lbXiaoFieZheKou.Text = String.Format( "{0}折", ObjectToString( dt.Rows[0]["折扣"] ).Trim() );
- }
- else
- {
- this.lbXiaoFieZheKou.Text = "-";
- }
- this.lbHuFuQianKuan.Text = String.Format( "{0}元", ObjectToString( dt.Rows[0]["欠款"] ).Trim() );
- }
- }
- }
- }
- catch
- {
- }
- #endregion
- }
- string ObjectToString( object obj )
- {
- if ( obj != null )
- {
- return obj.ToString().Trim();
- }
- else
- {
- return "";
- }
- }
- /// <summary>
- /// 后期收款
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void LkHouQi_Click( object sender, EventArgs e )
- {
- LYFZ.Software.MainBusiness.FinancialManagement.OrdersReceivables.FrmLatePayment frm2 = new FinancialManagement.OrdersReceivables.FrmLatePayment();
- frm2.StrOrdType = this.OrderType.ToString();
- frm2.StrOrdNumber = this.currentOrderModel.Ord_Number;
- frm2.StrCope = Convert.ToDecimal( this.lbHouQiShiShou.Text );
- frm2.StrPaid = Convert.ToDecimal( this.lbHouQiYingShou.Text );
- frm2.StrArrears = Convert.ToDecimal( this.lbHouQiQianKuan.Text );
- frm2.ShowDialog();
- if ( frm2.IsSaveed )
- {
- this.GetPanelPaymentDetailsControlsEx();
- }
- }
- /// <summary>
- /// 前期收款
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void LkQianQi_Click( object sender, EventArgs e )
- {
- LYFZ.Software.MainBusiness.FinancialManagement.OrdersReceivables.FrmPrePayment frm1 = new FinancialManagement.OrdersReceivables.FrmPrePayment();
- frm1.StrOrdNumber = this.currentOrderModel.Ord_Number;
- frm1.IsShowButtonPayment = false;
- frm1.ShowDialog();
- if ( frm1.IsSaveed )
- {
- this.GetPanelPaymentDetailsControlsEx();
- }
- }
- void GetPanelContactRecord()
- {
- List<Control> hideControl = new List<Control>();
- hideControl.Add( this.panelContactRecord );
- LYFZ.Software.MainBusiness.VersionControl.StaticVersion.BindVersionShowHideControl(
- VersionControl.VersionFunctionEnum.沟通助手, hideControl, null, null );
- DataTable dt = orderBll.GetView_Custom( LYFZ.BLL.BLL_ErpOrderView.GetData_ProcessMonitorCommunicationRecord() + "select Top 1 * from tbB Where TR_OrdNumber = '" + this.currentOrderModel.Ord_Number + "' Order By 沟通时间 DESC" ).Tables[0];
- if ( dt.Rows.Count > 0 )
- {
- this.txtGoTongJiLu.Text = String.Format( "沟通类型:{0} 沟通人:{1} 沟通时间:{2} \r\n沟通备注:{3} "
- , dt.Rows[0]["注意事项"].ToString().Trim()
- , LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetUserName( dt.Rows[0]["客服人员"] )
- , LYFZ.BLL.OtherCommonModel.DateTimeToString( dt.Rows[0]["沟通时间"] )
- , dt.Rows[0]["沟通备注"].ToString().Trim() );
- }
- }
- private void LkGuoTongJiLuXiangQing_Click( object sender, EventArgs e )
- {
- LYFZ.Software.MainBusiness.OAShopManagement.frmCallCenterList frm0 = new OAShopManagement.frmCallCenterList();
- frm0.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm0.Location = new Point( LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y );
- frm0.Size = new Size( LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height );
- frm0.StrOrdNumber = this.currentOrderModel.Ord_Number;
- frm0.Show();
- }
- private void LkAddGuoTongJiLu_Click( object sender, EventArgs e )
- {
- if ( this.customerGroup.ID > 0 )
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SuperSmallForm.A_AddCommunicateRecords frm = new CameraControlBook.SuperSmallForm.A_AddCommunicateRecords();
- frm.StrClientNumber = this.customerGroup.GP_CustomerGroupID;
- frm.EnumClientServiceTaskType = EnumPublic.ClientServiceTaskType.订单确认;
- frm.EnumClientServiceTaskItem = EnumPublic.ClientServiceTaskItem.无分类;
- frm.Areminderdate = false;
- frm.ShowDialog();
- if ( frm.IsSaveed )
- {
- this.GetPanelContactRecord();
- }
- }
- }
- private void LikbtnUpload_Click( object sender, EventArgs e )
- {
- LYFZ.Software.MainBusiness.CameraControlBook.frmContractManagement frmCManagement = new LYFZ.Software.MainBusiness.CameraControlBook.frmContractManagement();
- frmCManagement.OrdNumber = this.OrderNumber;
- frmCManagement.ShowDialog();
- }
- #endregion
- private void MaskBirthday_Leave( object sender, EventArgs e )
- {
- int intMasse = this.maskBirthday.CheckDateValue( this.maskBirthday, chkBirthday );
- if ( intMasse == 1 )
- {
- MessageBoxCustom.Show( "宝贝生日日期格式输入错误" );
- return;
- }
- else if ( intMasse == 2 )
- {
- MessageBoxCustom.Show( "宝贝生日:" + this.maskBirthday.StrValue.Trim() + "不是公历日期,若要保存请勾上农历" );
- return;
- }
- if ( this.maskBirthday.StrValue.Trim().Length > 0 )
- {
- string[] StrArrayList = this.maskBirthday.StrValue.Trim().Split( '-' );
- if ( SDateTime.Now.Year < Convert.ToInt32( StrArrayList[0] ) )
- {
- MessageBoxCustom.Show( "您输入的宝贝生日不能大于今年!" );
- return;
- }
- this.txtZodiac.Text = LYFZ.Command.Command_CalendarTurnLunar.GetZodiac( this.maskBirthday.StrValue.Trim(), this.chkBirthday.Checked );
- }
- else
- {
- this.txtZodiac.Text = "";
- }
- }
- /// <summary>
- /// 是否保存过数据
- /// </summary>
- public bool IsSaveData = false;
- /// <summary>
- /// 如果没有保存权限,是否已授过权
- /// </summary>
- bool IsSaveedHadAuthorized = false;
- /// <summary>
- /// 保存订单
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void BtnSave_Click( object sender, EventArgs e )
- {
- this.dec_OrderDiscounts = LYFZ.BLL.BLL_ErpUser.CurrentUserRights.GetOrderDiscounts( Convert.ToInt32( this.OrderType ) );
-
- #region 检查授权
- if ( String.IsNullOrEmpty( this.OrderNumber ) )
- {
- //如果是新订单的话,要检查新订单数据是否已被修改过
- if ( !LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.StoresOPenSingle, LYFZ.CustomAttributes.OperatingAuthority.NewOrder ) )
- {
- if ( !this.IsSaveedHadAuthorized )
- {
- //检查新订单的套系内容是否被修改过
- bool IsCheckDataIsUpdate = this.CheckDataIsUpdate();
- string strWindowText = "开订单";
- if ( IsCheckDataIsUpdate )
- {
- strWindowText += "、修改新订单";
- }
- LYFZ.Software.MainBusiness.DoorCityProcess.SuperSmallForm.AuthorizeLoginSuperSmallForm frm = new SuperSmallForm.AuthorizeLoginSuperSmallForm( "StoresOPenSingle", LYFZ.CustomAttributes.OperatingAuthority.NewOrder );
- frm.StrWindowText = strWindowText;
- frm.ShowDialog();
- if ( !frm.IsSaveed )
- {
- return;
- }
- else if ( !LYFZ.BLL.BLL_ErpUser.GetRights( frm.CurrentAuthorizeUserRights.StoresOPenSingle, LYFZ.CustomAttributes.OperatingAuthority.NewOrder, frm.User_BelongRoles ) )
- {
- frm.SetAuthorizationResult( String.Format( "授权失败,授权人没有'开订单'权限" ) );
- MessageBoxCustom.Show( "对不起!授权帐号:" + frm.StrUserAccount + "没有'开订单'权限。" ); return;
- }
- else
- {
- frm.SetAuthorizationResult();
- }
- this.dec_OrderDiscounts = frm.CurrentAuthorizeUserRights.GetOrderDiscounts( Convert.ToInt32( this.OrderType ) );
- #region 检测套系是否被修改过
- if ( IsCheckDataIsUpdate )
- {
- if ( !LYFZ.BLL.BLL_ErpUser.GetRights( frm.CurrentAuthorizeUserRights.StoresOPenSingle, LYFZ.CustomAttributes.OperatingAuthority.ModifyNewOrder, frm.User_BelongRoles ) )
- {
- frm.SetAuthorizationResult( String.Format( "授权失败,授权人没有'修改新订单'权限" ) );
- MessageBoxCustom.Show( "对不起!授权帐号:" + frm.StrUserAccount + "没有'修改新订单'权限。" );
- return;
- }
- else
- {
- frm.SetAuthorizationResult();
- }
- }
- #endregion
- }
- }
- else
- {
- #region 检测套系是否被修改过
- if ( !LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.StoresOPenSingle, LYFZ.CustomAttributes.OperatingAuthority.ModifyNewOrder ) )
- {
- if ( this.CheckDataIsUpdate() )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.SuperSmallForm.AuthorizeLoginSuperSmallForm frm = new SuperSmallForm.AuthorizeLoginSuperSmallForm( "StoresOPenSingle", LYFZ.CustomAttributes.OperatingAuthority.ModifyNewOrder );
- frm.StrWindowText = "修改新订单";
- frm.ShowDialog();
- if ( !frm.IsSaveed )
- {
- return;
- }
- else if ( !LYFZ.BLL.BLL_ErpUser.GetRights( frm.CurrentAuthorizeUserRights.StoresOPenSingle, LYFZ.CustomAttributes.OperatingAuthority.ModifyNewOrder, frm.User_BelongRoles ) )
- {
- frm.SetAuthorizationResult( String.Format( "授权失败,授权人没有'修改新订单'权限" ) );
- MessageBoxCustom.Show( "对不起!授权帐号:" + frm.StrUserAccount + "没有'修改新订单'权限。" );
- return;
- }
- else
- {
- frm.SetAuthorizationResult();
- }
- }
- }
- #endregion
- this.dec_OrderDiscounts = LYFZ.BLL.BLL_ErpUser.CurrentUserRights.GetOrderDiscounts( Convert.ToInt32( this.OrderType ) );
- }
- }
- else
- {
- if ( LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.EnableOrderLockFeature )
- {
- //检查订单是否已被锁定
- bool isCheckOrderLock = this.orderBll.CheckOrderLock( this.currentOrderModel.ID );
- if ( !isCheckOrderLock )
- {
- if ( this.orderBll.CheckOrderDataHasBeenModified( this.currentOrderModel ) )
- {
- MessageBoxCustom.Show( String.Format( "当前订单在您修改订单期间已被其他人员修改,为保证订单数据正确性,您不能保存订单,请关闭后重新打开订单并修改。" ) );
- return;
- }
- }
- else
- {
- ExMessageBoxCustom.Show( "当前订单已被其他人员锁定,你不能修改不当前订单,如需修改,请找店长沟通并解锁订单" );
- this.LockOrderClientMarkID = "";
- return;
- }
- }
- //修改订单时
- if ( !LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.StoresOPenSingle, LYFZ.CustomAttributes.OperatingAuthority.ModifyOrder ) )
- {
- if ( !this.IsSaveedHadAuthorized )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.SuperSmallForm.AuthorizeLoginSuperSmallForm frm = new SuperSmallForm.AuthorizeLoginSuperSmallForm( "StoresOPenSingle", LYFZ.CustomAttributes.OperatingAuthority.ModifyOrder );
- frm.StrWindowText = "修改已订单";
- frm.ShowDialog();
- if ( !frm.IsSaveed )
- {
- return;
- }
- else
- {
- if ( !LYFZ.BLL.BLL_ErpUser.GetRights( frm.CurrentAuthorizeUserRights.StoresOPenSingle, LYFZ.CustomAttributes.OperatingAuthority.ModifyOrder, frm.User_BelongRoles ) )
- {
- frm.SetAuthorizationResult( String.Format( "授权失败,授权人没有'修改已订单'权限" ) );
- MessageBoxCustom.Show( "对不起!授权帐号:" + frm.StrUserAccount + "没有'修改已订单'权限。" );
- return;
- }
- else
- {
- frm.SetAuthorizationResult();
- }
- this.dec_OrderDiscounts = frm.CurrentAuthorizeUserRights.GetOrderDiscounts( Convert.ToInt32( this.OrderType ) );
- }
- }
- }
- else
- {
- this.dec_OrderDiscounts = LYFZ.BLL.BLL_ErpUser.CurrentUserRights.GetOrderDiscounts( Convert.ToInt32( this.OrderType ) );
- }
- }
- this.IsSaveedHadAuthorized = true;
- #endregion
- if (String.IsNullOrWhiteSpace(this.GetClientSource()))
- {
- MessageBoxCustom.Show("客户来源不能为空");
- return;
- }
- SaveOrderData( OrderSaveType.交易订单 );
- }
- /// <summary>
- /// 保存意向订单
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void BtnSaveIntent_Click( object sender, EventArgs e )
- {
- this.IsSaveData = true;
- SaveOrderData( OrderSaveType.意向订单 );
- }
- /// <summary>
- /// 检查新订单的套系内容是否被修改过
- /// </summary>
- /// <returns></returns>
- bool CheckDataIsUpdate()
- {
- bool IsUpdateSaveed = false;
- if ( this.OrderType != EnumPublic.OrderType.服务订单 )
- {
- if ( this.cmbtreevTaoXiName.Tag != null )
- {
- DataRow[] dtRow0 = null;
- DataRow[] dtRow1 = null;
- DataRow[] dtRow2 = null;
- DataTable tbl0 = null;
- DataTable tbl1 = null;
- DataTable tbl2 = null;
- dynamic packPage = this.cmbtreevTaoXiName.Tag;
- string ExecuteSql = "select tb_ErpPackagesGiftMerchandise.ID,Sc_ClassName,Pgm_GiveType,Pgm_IntoRegisterQuantity,Pgm_IntoBottomQuantity,Pgm_Quantity " +
- "from tb_ErpPackagesGiftMerchandise Left Join tb_ErpTheScenery on cast(tb_ErpTheScenery.ID as varchar(20)) = Pgm_ProductNumber " +
- "Left Join tb_ErpSystemCategory on Tsc_Rating = Sc_ClassCode where Pgm_GiveType in ('2','3') And Pgm_PackagesCode = '" +
- packPage.PackagesID
- + "';";
- ExecuteSql += "select tb_ErpPackagesGiftMerchandise.ID,Prod_Batch,Pgm_Quantity,Pgm_GiveType from tb_ErpPackagesGiftMerchandise " +
- "Left Join tb_ErpProduct on Prod_Number = Pgm_ProductNumber where Pgm_GiveType in ('0','1') And Pgm_PackagesCode = '" +
- packPage.PackagesID
- + "';";
- ExecuteSql += "select Pak_UnitPrice from tb_ErpPackages where Pak_PackagesID = '" +
- packPage.PackagesID
- + "';";
- DataSet dsData = orderBll.GetView_Custom( ExecuteSql );
- DataTable dt0 = dsData.Tables["ds"];
- DataTable dt1 = dsData.Tables["ds1"];
- DataTable dt2 = dsData.Tables["ds2"];
- switch ( this.OrderType )
- {
- case EnumPublic.OrderType.儿童订单:
- case EnumPublic.OrderType.婚纱订单:
- case EnumPublic.OrderType.写真订单:
- case EnumPublic.OrderType.婚庆订单:
- #region 判断价格
- if ( dt2.Rows.Count > 0 )
- {
- if ( Convert.ToDecimal( dt2.Rows[0]["Pak_UnitPrice"] ) != Convert.ToDecimal( this.numTaoXiJiaGe.Value ) )
- {
- IsUpdateSaveed = true;
- }
- }
- #endregion
- #region 判断入底入册
- /* switch ( this.OrderType )
- {
- case EnumPublic.OrderType.写真订单:
- case EnumPublic.OrderType.婚庆订单:
- try
- {
- DataTable dt = orderBll.GetView_Custom( "tb_ErpPackages", StrWhere: "Pak_PackagesID = '" + cmbtreevTaoXiName.Tag.ToString().Trim() + "'", ShowColumnName: "Pak_IntoTheArchive,Pak_IntoTheBook" ).Tables[0];
- if ( dt.Rows.Count == 0 )
- {
- IsUpdateSaveed = true;
- }
- else if ( Convert.ToInt32( dt.Rows[0]["Pak_IntoTheArchive"] ) != Convert.ToInt32( this.numIntoBottom.Value ) || Convert.ToInt32( dt.Rows[0]["Pak_IntoTheBook"] ) != Convert.ToInt32( this.numIntoRegister.Value ) )
- {
- IsUpdateSaveed = true;
- }
- }
- catch
- {
- }
- break;
- }*/
- #endregion
- #region 商品与服务
- if ( !IsUpdateSaveed )
- {
- dtRow0 = dt1.Select( "Pgm_GiveType = '0'" );
- tbl0 = this.orderProductControl.GetListViewData();
- if ( dtRow0.Length != tbl0.Rows.Count )
- {
- IsUpdateSaveed = true;
- }
- else if ( dtRow0.Length > 0 && tbl0.Rows.Count > 0 )
- {
- for ( int j = 0; j < tbl0.Rows.Count; j++ )
- {
- if ( string.IsNullOrEmpty( tbl0.Rows[j]["PgmID"].ToString().Trim() ) )
- {
- IsUpdateSaveed = true;
- break;
- }
- }
- if ( !IsUpdateSaveed )
- {
- for ( int i = 0; i < dtRow0.Length; i++ )
- {
- DataRow[] dtRow = tbl0.Select( "PgmID = '" + dtRow0[i]["ID"].ToString().Trim() + "'" );
- if ( dtRow0.Length <= 0 )
- {
- IsUpdateSaveed = true;
- }
- else
- {
- if ( Convert.ToInt32( dtRow[0]["商品P数"] ) != Convert.ToInt32( dtRow0[i]["Prod_Batch"] ) || Convert.ToInt32( dtRow[0]["商品数量"] ) != Convert.ToInt32( dtRow0[i]["Pgm_Quantity"] ) )
- {
- IsUpdateSaveed = true;
- break;
- }
- }
- }
- }
- }
- }
- if ( !IsUpdateSaveed )
- {
- dtRow1 = dt1.Select( "Pgm_GiveType = '1'" );
- tbl1 = this.orderServiceControl.GetListViewData();
- if ( dtRow1.Length != tbl1.Rows.Count )
- {
- IsUpdateSaveed = true;
- }
- else if ( dtRow1.Length > 0 && tbl1.Rows.Count > 0 )
- {
- for ( int j = 0; j < tbl1.Rows.Count; j++ )
- {
- if ( string.IsNullOrEmpty( tbl1.Rows[j]["PgmID"].ToString().Trim() ) )
- {
- IsUpdateSaveed = true;
- break;
- }
- }
- if ( !IsUpdateSaveed )
- {
- for ( int i = 0; i < dtRow1.Length; i++ )
- {
- DataRow[] dtRow = tbl1.Select( "PgmID = '" + dtRow1[i]["ID"].ToString().Trim() + "'" );
- if ( dtRow1.Length <= 0 )
- {
- IsUpdateSaveed = true;
- }
- else
- {
- if ( Convert.ToInt32( dtRow[0]["服务数量"] ) != Convert.ToInt32( dtRow1[i]["Pgm_Quantity"] ) )
- {
- IsUpdateSaveed = true;
- break;
- }
- }
- }
- }
- }
- }
- #endregion
- #region 景点与拍摄次数
- if ( !IsUpdateSaveed )
- {
- switch ( this.OrderType )
- {
- case EnumPublic.OrderType.婚纱订单:
- case EnumPublic.OrderType.写真订单:
- dtRow2 = dt0.Select( "Pgm_GiveType = '2'" );
- tbl2 = this.orderSightsControl.GetListViewData();
- break;
- case EnumPublic.OrderType.儿童订单:
- dtRow2 = dt0.Select( "Pgm_GiveType = '3'" );
- tbl2 = this.orderStagesControl.GetListViewData();
- break;
- }
- if (dtRow2 != null && tbl2 != null)
- {
- if (dtRow2.Length != tbl2.Rows.Count)
- {
- IsUpdateSaveed = true;
- }
- else if (dtRow2.Length > 0 && tbl2.Rows.Count > 0)
- {
- for (int j = 0; j < tbl2.Rows.Count; j++)
- {
- if (string.IsNullOrEmpty(tbl2.Rows[j]["PgmID"].ToString().Trim()))
- {
- IsUpdateSaveed = true;
- break;
- }
- }
- if (!IsUpdateSaveed)
- {
- for (int i = 0; i < dtRow2.Length; i++)
- {
- DataRow[] dtRow = tbl2.Select("PgmID = '" + dtRow2[i]["ID"].ToString().Trim() + "'");
- if (dtRow2.Length <= 0)
- {
- IsUpdateSaveed = true;
- }
- else
- {
- if (dtRow[0]["拍摄级别"].ToString().Trim() != dtRow2[i]["Sc_ClassName"].ToString().Trim() || Convert.ToInt32(dtRow[0]["服装套数"]) != Convert.ToInt32(dtRow2[i]["Pgm_Quantity"]))
- {
- IsUpdateSaveed = true;
- break;
- }
- if (!IsUpdateSaveed)
- {
- switch (this.OrderType)
- {
- case EnumPublic.OrderType.儿童订单:
- if (Convert.ToInt32(dtRow[0]["入册"]) != Convert.ToInt32(dtRow2[i]["Pgm_IntoRegisterQuantity"]) || Convert.ToInt32(dtRow[0]["入底"]) != Convert.ToInt32(dtRow2[i]["Pgm_IntoBottomQuantity"]) || Convert.ToInt32(dtRow[0]["服装套数"]) != Convert.ToInt32(dtRow2[i]["Pgm_Quantity"]))
- {
- IsUpdateSaveed = true;
- break;
- }
- break;
- }
- }
- }
- }
- }
- }
- }
- }
- #endregion
- break;
- }
- }
- }
- return IsUpdateSaveed;
- }
- private void FrmNewOrder_FormClosed( object sender, FormClosedEventArgs e )
- {
- if ( this.currentOrderModel.ID > 0 )
- {
- if (!IsSelectPhoto)
- {
- if (!String.IsNullOrEmpty(this.LockOrderClientMarkID))
- {
- orderBll.UnlockOrderUpdate(this.currentOrderModel.ID);
- }
- }
- }
- if ( this.IsGoForm )
- {
- if ( this.EnumLoadFormType == LoadFormType.开单选择 )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.OnSingleFirstFormMain frm = new OnSingleFirstFormMain();
- frm.StartPosition = FormStartPosition.CenterScreen;
- frm.Show();
- frm.Activate();
- }
- }
- }
- private void FrmNewOrder_FormClosing( object sender, FormClosingEventArgs e )
- {
- if ( !this.IsGoForm )
- {
- if ( MessageBoxCustom.Show( "你确定要关闭吗?", "温馨提示", MessageBoxButtons.YesNo ) == DialogResult.No )
- {
- e.Cancel = true;
- }
- }
- }
- /// <summary>
- /// 打印订单(打印预约单)
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void BtnPrint_Click( object sender, EventArgs e )
- {
- if ( !String.IsNullOrEmpty( this.OrderNumber ) )
- {
- Hashtable htData = new Hashtable();
- htData["strNumber"] = this.OrderNumber.Trim();
- htData["strOrdType"] = this.OrderType.ToString().Trim();
- // 获取全部景点;
- List<ReportPrint.SetSmallForm.PrintPreviewSmallForm.ScenicSpot2> listScenicSpot = null;
- if ( this.OrderType == EnumPublic.OrderType.儿童订单 )
- {
- listScenicSpot = new List<ReportPrint.SetSmallForm.PrintPreviewSmallForm.ScenicSpot2>();
- for ( int i = 0; i < this.orderStagesControl.listViewData_Stages.Items.Count; i++ )
- {
- ReportPrint.SetSmallForm.PrintPreviewSmallForm.ScenicSpot2 scenic = new ReportPrint.SetSmallForm.PrintPreviewSmallForm.ScenicSpot2();
- scenic.strScenicName = this.orderStagesControl.listViewData_Stages.Items[i].Text;
- scenic.strViceNumber = ((NewOrderCustomControls.StagesHeaderModel)this.orderStagesControl.listViewData_Stages.Items[i].Tag).StagesViceNumber;
- listScenicSpot.Add( scenic );
- }
- }
- LYFZ.Software.MainBusiness.ReportPrint.ReportFixedFormat.PrintFixedFormat( LYFZ.EnumPublic.PrintTypeEnum.订单预约单, htData, listScenicSpot );
- }
- }
- bool IsGoForm = false;
- public LoadFormType EnumLoadFormType;
- public enum LoadFormType
- {
- 订单报表,
- 开单选择
- }
- /// <summary>
- /// 新开订单(重置)
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void BtnNewOrder_Click( object sender, EventArgs e )
- {
- if ( MessageBoxCustom.Show( "重置后将清空所有数据,您确定要重置订单吗?", "温馨提示", MessageBoxButtons.YesNo ) == DialogResult.Yes )
- {
- this.IsGoForm = true;
- this.EnumLoadFormType = LoadFormType.开单选择;
- this.Close();
- }
- }
- private void PictReset_Click( object sender, EventArgs e )
- {
- this.ClearChildrenInfo();
- }
- private void PictEdit_Click( object sender, EventArgs e )
- {
- this.txtCusName.ReadOnly = false;
- }
- private void UMainCusInfo_EventSelectIntentionOrderCustomer( UCustomerInfo uCustomer, string _IntentionOrderNumber, string _IntentionCustomerGroupID, string _IntentionCustomerID )
- {
- this.SelectIntentClient( _IntentionOrderNumber, _IntentionCustomerGroupID );
- }
- private void LinkSelectSameNameBaby_Click( object sender, EventArgs e )
- {
- if ( this.linkSelectSameNameBaby.Tag.ToString() != "0" && !String.IsNullOrEmpty( this.txtCusName.Text.Trim() ) )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.SuperSmallForm.OrderHistoryCustomerSuperSmallForm frm = new SuperSmallForm.OrderHistoryCustomerSuperSmallForm();
- frm.StrWhere = String.Format( "Cus_Name Like '%{0}%' and Cus_Type = '儿童'", this.txtCusName.Text.Trim() );
- frm.IsChild = true;
- frm.ShowDialog();
- if ( frm.IsSaveed )
- {
- this.SetCusChildrenInfo( frm.model );
- this.TxtCusName_KeyUp( null, null );
- }
- }
- }
- //临时宝宝名
- string tempBabyName = "";
- private void TxtCusName_KeyUp( object sender, KeyEventArgs e )
- {
- if ( this.txtCusName.Text.ToLower().Trim() != tempBabyName.ToLower().Trim() )
- {
- this.tempBabyName = this.txtCusName.Text.Trim();
- this.toolTipMsg.SetToolTip( this.linkSelectSameNameBaby, "" );
- this.linkSelectSameNameBaby.Text = "";
- this.linkSelectSameNameBaby.Tag = 0;
- if ( !String.IsNullOrEmpty( this.txtCusName.Text.Trim() ) )
- {
- int RowsCounts = customerBll.GetRecordCount( "Cus_Name like '%" + this.txtCusName.Text.Trim() + "%' and Cus_Type = '儿童'" );
- if ( RowsCounts > 0 )
- {
- this.toolTipMsg.SetToolTip( this.linkSelectSameNameBaby, String.Format( "已有{0}个相拟名字的宝宝,点击查看", RowsCounts ) );
- this.linkSelectSameNameBaby.Text = String.Format( "{0}", RowsCounts.ToString().PadRight( 4, ' ' ) );
- this.linkSelectSameNameBaby.Tag = RowsCounts;
- }
- }
- }
- }
- private void RdoFriends_CheckedChanged( object sender, EventArgs e )
- {
- if ( !this.rdoFriends.Checked )
- {
- this.ClearFriendIntroduction();
- }
- }
- #region 获取用户输入数据
- /// <summary>
- /// 医院跟踪订单的来单批号
- /// </summary>
- string ComeSingleLotNumber = "";
- /// <summary>
- /// 当前登录者、授权者的保利系数
- /// </summary>
- decimal dec_OrderDiscounts = 0;
- /// <summary>
- /// 是否显示写真版
- /// </summary>
- private bool IsPortrait = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.IsEnablePhotoEdition;
- /// <summary>
- /// 登录者姓名
- /// </summary>
- string loginUserName = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.LoginUserModel.User_Name;
- /// <summary>
- /// 登录者员工ID
- /// </summary>
- string loginUserID = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.LoginUserModel.User_EmployeeID;
- /// <summary>
- /// 本地分店ID
- /// </summary>
- string loginCompanyInfoID = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetLocalCompanyInfoID();
- /// <summary>
- /// 获取客户来源
- /// </summary>
- /// <returns></returns>
- private string GetClientSource()
- {
- string StrClientSource = "";
- foreach ( Control control in this.plRuMenDiaoChaMain.Controls )
- {
- if ( control is RadioButtonEx )
- {
- RadioButtonEx tmpRdo = (RadioButtonEx)control;
- if ( tmpRdo.Checked )
- {
- if ( tmpRdo.Tag.ToString().Trim() == "其他" )
- {
- StrClientSource = this.cmbtreevClientSource.Text.Trim();
- }
- else
- {
- StrClientSource = tmpRdo.Tag.ToString().Trim();
- }
- }
- }
- }
- return StrClientSource;
- }
- /// <summary>
- /// 获取宝宝信息
- /// </summary>
- /// <param name="erpModel"></param>
- public void GetClientValueData( Api_ErpOrderModel erpModel )
- {
- if ( erpModel.customerData == null )
- {
- erpModel.customerData = new List<Api_CustomerModel>();
- }
- Api_CustomerModel apiModel = new Api_CustomerModel();
- apiModel.cusAttr = CusAttrType.Child_.ToString();
- apiModel.userRelation = "本人";
- apiModel.cus_Type = "儿童";
- if ( this.childModel.ID <= 0 )
- {
- apiModel.ClientModel.ID = -1;
- }
- apiModel.ClientModel.Cus_Birthday = this.maskBirthday.StrValue.Trim();
- apiModel.ClientModel.Cus_BirthdayLunar = "";
- if ( !String.IsNullOrEmpty( apiModel.ClientModel.Cus_Birthday ) )
- {
- apiModel.ClientModel.Cus_BirthdayLunar = this.chkBirthday.Checked ? "1" : "0";
- }
- apiModel.ClientModel.Cus_Name = LYFZ.BLL.OtherCommonModel.ClearSpecialCharacter( this.txtCusName.Text.Trim() );
- apiModel.ClientModel.Cus_NamePinyin = LYFZ.Command.Command_ChineseToPinyin.GetChineseSpellPinyin( this.txtCusName.Text.Trim() ).ToLower();
- apiModel.ClientModel.Cus_Sex = this.rdoCusSex1.Checked ? false : true;
- apiModel.ClientModel.Cus_Zodiac = this.txtZodiac.Text.Trim();
- erpModel.customerData.Add( apiModel );
- }
- /// <summary>
- /// 获取订单资料数据
- /// </summary>
- /// <param name="erpModel"></param>
- public void GetApiData( Api_ErpOrderModel erpModel )
- {
- erpModel.strOrderClass = this.cmbtreevOrderClass.Text;
- erpModel.bIsShowSinceOrderNumber = LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.IsCustomOrderNumber;
- erpModel.SinceOrderNumber = this.GetSinceOrderNumber();
- erpModel.strTaoXiCode = this.cmbtreevTaoXiName.Tag == null ? "" : (this.cmbtreevTaoXiName.Tag).ToString();
- erpModel.strNumIntoBottom = this.numIntoBottom.Value.ToString();
- erpModel.strBottomQuantityPackage = this.numIntoBottomPackage.Value.ToString();
- erpModel.strRegisterQuantityPackage = this.numIntoRegisterPackage.Value.ToString();
- erpModel.strNumIntoRegister = this.numIntoRegister.Value.ToString();
- erpModel.strRemark = this.txtOrderRemarks.Text;
- erpModel.strHotelInfo = this.txtHotelInfo.Text;
- erpModel.strPackageName = this.cmbtreevPackageName.Text;
- erpModel.strPackagePrice = this.numLiBaoJiaGe.Value.ToString( "n2" );
- erpModel.strTaoXiPrice = this.numTaoXiJiaGe.Value.ToString( "n2" );
- // erpModel.IsMagess = this.IsMagess;
- erpModel.strAnnotation = this.txtBiaoZhu.Text.Trim();
- if ( this.OrderType == EnumPublic.OrderType.儿童订单 )
- {
- erpModel.bIsShowIntoRegisterAndIntoBottom = false;
- }
- else
- {
- erpModel.bIsShowIntoRegisterAndIntoBottom = true;
- }
- if ( this.OrderType == EnumPublic.OrderType.服务订单 )
- {
- erpModel.strParentTaoXiName = "服务套系";
- erpModel.strTaoXiName = "服务套系";
- }
- else
- {
- erpModel.strParentTaoXiName = this.cmbtreevTaoXiName.TextFindParentText( this.cmbtreevTaoXiName.Text.Trim() );
- erpModel.strTaoXiName = this.cmbtreevTaoXiName.Text;
- }
- }
- #endregion
- /// <summary>
- /// 用于判断是否需要重新生成流程图
- /// </summary>
- bool isGeneratingFlowchartImage = true;
- /// <summary>
- /// 保存意向订单和真实订单数据
- /// </summary>
- /// <param name="saveType">订单保存类型</param>
- void SaveOrderData( OrderSaveType saveType )
- {
- Api_ErpOrderModel apiErpModel = new Api_ErpOrderModel()
- {
- OrderID = this.currentOrderModel.ID,
- strTime = SDateTime.Now,
- strUserName = loginUserName,
- dividedShop = this.cmbtreevStoreName.Tag.ToString().Trim(),
- strUserID = loginUserID,
- User_IP = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.User_IP,
- strMskMarriage = this.mskMarriage.StrValue,
- bChkCheckBox = this.chkMarriage.Checked,
- chkTransactmemberCard = this.chkTransactmemberCard.Checked,
- StrSaveClass = Convert.ToInt32(saveType).ToString(),
- strStyle = String.Join<string>("|", this.GetStyleList(true)),
- StrClientSource = this.GetClientSource(),
- dec_OrderDiscounts = this.dec_OrderDiscounts,
- strOldTaoXiName = this.currentOrderModel.Ord_OldSeriesName,
- strOldTaoXiCode = this.currentOrderModel.Ord_OldSeriesCode,
- strOldTaoXiPrice = this.currentOrderModel.Ord_OldSeriesPrice,
- UploadPath = this.currentOrderModel.Ord_UploadPath,
- CommissionRatio = this.customCommissionData,
- strOrderPerson = txtOrderPerson.Tag == null ? "" : txtOrderPerson.Tag.ToString(),
- strOrderPersonName = txtOrderPerson.Tag == null ? "" : txtOrderPerson.Text.ToString(),
- ComeSingleLotNumber = this.ComeSingleLotNumber,
- StrNewOrderNumber = (this.currentOrderModel.ID > 0 ? this.currentOrderModel.Ord_Number : null),
- OrderGroupNumber = this.customerGroup.GP_CustomerGroupID,
- customerData = new List<Api_CustomerModel>(),
- OrderSightData = new List<Api_StagesModel>(),
- OrderServiceData = new List<Api_ServiceModel>(),
- OrderProductData = new List<Api_ProductModel>(),
- modelFriends = new Model.Model_ErpCustomer(),
- modelViceCard = new Model.Model_ErpMemberCardViceCard(),
- SetOfSystemUpgradeLog = this.SetOfSystemUpgradeLog,
- IsMagess = true,
- UpCreateDateTime = (this.currentOrderModel.ID > 0 ? this.currentOrderModel.Ord_CreateDateTime : new DateTime())
- };
- apiErpModel.orderType = this.OrderType;
- ///会员副卡
- apiErpModel.modelViceCard = this.modelViceCardFriends;
- if ( apiErpModel.modelViceCard != null )
- {
- if ( apiErpModel.modelViceCard.Mvc_CreateDatetime == new DateTime() )
- {
- apiErpModel.modelViceCard.Mvc_CreateDatetime = LYFZ.WinAPI.CustomPublicMethod.GetNullDateTime();
- }
- if ( apiErpModel.modelViceCard.Mvc_UpdateDateTime == new DateTime() )
- {
- apiErpModel.modelViceCard.Mvc_UpdateDateTime = LYFZ.WinAPI.CustomPublicMethod.GetNullDateTime();
- }
- }
- //朋友介绍
- apiErpModel.modelFriends = this.customerFriends;
- if ( this.customerFriends != null )
- {
- apiErpModel.friend_CustomerNumber = this.customerFriends.Cus_CustomerNumber;
- }
- else
- {
- apiErpModel.friend_CustomerNumber = "";
- }
- if ( apiErpModel.modelFriends != null )
- {
- if ( apiErpModel.modelFriends.Cus_CreateDateTime == new DateTime() )
- {
- apiErpModel.modelFriends.Cus_CreateDateTime = LYFZ.WinAPI.CustomPublicMethod.GetNullDateTime();
- }
- if ( apiErpModel.modelFriends.Cus_UpdateDateTime == new DateTime() )
- {
- apiErpModel.modelFriends.Cus_UpdateDateTime = LYFZ.WinAPI.CustomPublicMethod.GetNullDateTime();
- }
- }
- if ( this.OrderType == EnumPublic.OrderType.儿童订单 )
- {
- this.GetClientValueData( apiErpModel );
- }
- foreach ( Control control in this.flKeFuZhiNiaoBlock.Controls )
- {
- ///成人客户信息
- if ( control is UCustomerInfo )
- {
- UCustomerInfo tmpCus = (UCustomerInfo)control;
- tmpCus.GetClientValueData( apiErpModel );
- }
- }
- try
- {
- //获取订单数据
- this.GetApiData(apiErpModel);
- }
- catch (Exception ex){
- MessageBoxCustom.Show(ex.Message);
- return;
- }
- //是否修改了预约时间
- bool isModifyAppointmentTime = false;
- //获取拍摄场景数据
- if ( this.OrderType == EnumPublic.OrderType.婚纱订单
- || this.OrderType == EnumPublic.OrderType.写真订单 )
- {
- this.orderSightsControl.GetOrderSightsValueData( apiErpModel );
- isModifyAppointmentTime = this.orderSightsControl.isModifyAppointmentTime;
- }
- else if ( this.OrderType == EnumPublic.OrderType.儿童订单 )
- {
- this.orderStagesControl.GetOrderStagesValueData( apiErpModel );
- isModifyAppointmentTime = this.orderStagesControl.isModifyAppointmentTime;
- }
- //服务的数据信息
- if ( this.orderServiceControl.Parent != null )
- {
- this.orderServiceControl.GetOrderServiceValueData( apiErpModel );
- }
- //商品数据信息
- if ( this.orderProductControl.Parent != null )
- {
- this.orderProductControl.GetOrderProductValueData( apiErpModel );
- }
- int indx = 0;
- bool bSelect = false;
- // string json = Json.JsonTool.ObjectToJson(apiErpModel);
- 数据检查队列:
- LYFZ.Command.Result result = orderBll.SaveErpOrderDataByCheck( apiErpModel, ref indx, ref bSelect );
- if ( !result.Status )
- {
- if ( result.StatusMsg == "手机号码重复,请核实客户数据!" )
- {
- MessageBoxCustom.Show( result.StatusMsg );
- return;
- }
- LYFZ.Command.Result<LYFZ.Command.EnumReturnMsg> resultMsg = ((LYFZ.Command.Result<LYFZ.Command.EnumReturnMsg>)result);
- if ( resultMsg.Data == Command.EnumReturnMsg.ReturnMsg )
- {
- MessageBoxCustom.Show( resultMsg.StatusMsg );
- return;
- }
- else if ( resultMsg.Data == Command.EnumReturnMsg.SelectMsg )
- {
- if ( MessageBoxCustom.Show( resultMsg.StatusMsg, "温馨提示",
- MessageBoxButtons.OKCancel ) == System.Windows.Forms.DialogResult.Cancel )
- {
- return;
- }
- else
- {
- bSelect = true;
- goto 数据检查队列;
- }
- }
- else if ( resultMsg.Data == Command.EnumReturnMsg.CostAuthorization )
- {
- if ( MessageBoxCustom.Show( resultMsg.StatusMsg, "温馨提示",
- MessageBoxButtons.OKCancel ) == System.Windows.Forms.DialogResult.OK )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.SuperSmallForm.AuthorizeLoginSuperSmallForm frm = new SuperSmallForm.AuthorizeLoginSuperSmallForm( null, CustomAttributes.OperatingAuthority.ErrorPrivilegeValue, 1 );
- frm.ShowDialog();
- if ( !frm.IsSaveed )
- {
- return;
- }
- else
- {
- decimal Ord_SeriesPrice = 0;
- decimal.TryParse( apiErpModel.strTaoXiPrice, out Ord_SeriesPrice );
- decimal Old_PackagesAmount = apiErpModel.ProductAmount();
- Old_PackagesAmount += apiErpModel.ServiceAmount();
- if ( apiErpModel.orderType == EnumPublic.OrderType.儿童订单 )
- {
- Old_PackagesAmount += apiErpModel.SightOrStageAmount();
- }
- else if ( apiErpModel.orderType != EnumPublic.OrderType.婚庆订单 )
- {
- Old_PackagesAmount += apiErpModel.SightOrStageAmount();
- }
- if ( Ord_SeriesPrice < (Old_PackagesAmount * frm.CurrentAuthorizeUserRights.GetOrderDiscounts( Convert.ToInt32( this.OrderType ) )) )
- {
- frm.SetAuthorizationResult( String.Format( "授权失败,授权人成本管控权限不够" ) );
- MessageBoxCustom.Show( "授权帐号:" + frm.StrUserAccount + ",授权后的套系价格低于订单总成本,无法保存!" ); return;
- }
- else
- {
- frm.SetAuthorizationResult();
- bSelect = true;
- goto 数据检查队列;
- }
- }
- }
- else
- {
- return;
- }
- }
- else
- {
- MessageBoxCustom.Show( resultMsg.StatusMsg );
- return;
- }
- }
- else
- {
- if (saveType == OrderSaveType.交易订单&&!this.IsNewOrder)
- {
- if (isModifyAppointmentTime)
- {
- foreach (LYFZ.Model.Model_ErpOrdersPhotography photography in this.photographyList)
- {
- this.AddOrderWorkAnPaiRecord(photography);
- }
- }
- }
- bool isAddOrder = false;
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod( delegate ( object obj, BackgroundWorker backgroundWorker )
- {
- backgroundWorker.ReportProgress( 0, "正在提交数据... " );
- result = orderBll.SaveErpOrderData( apiErpModel, ref isAddOrder );
- if (result.Status)
- {
- if (saveType == OrderSaveType.交易订单)
- {
- if (isCurrentOpentIntentOrder)
- {
- if (this.currentOrderModel.ID > 0)
- {
- this.orderBll.UpdateOrderCreateDateTime(this.currentOrderModel.ID, SDateTime.Now);
- }
- else
- {
- MessageBoxCustom.Show("当前订单数据异常");
- }
- }
- }
- }
- if (WorkAnPaiRecordlist.Count > 0)
- {
- LYFZ.BLL.BaseBllOperate.ExecuteSqlTran(WorkAnPaiRecordlist);
- }
- } );
- this.IsSaveData = true;
- if ( result.Status )
- {
- object obj;
- try
- {
- obj = ((LYFZ.Command.Result<object>)result).Data;
- }
- catch(Exception ex)
- {
- MessageBoxCustom.Show(String.Format("保存失败:{0}",ex.Message), "提示" );
- return;
- }
- MessageBoxCustom.Show( "订单保存成功" );
- if ( this.OpenLoadOrderData( apiErpModel.StrNewOrderNumber ) )
- {
- this.isGeneratingFlowchartImage = true;
- this.lkYiXiangClient.Hide();
- if ( this.tbQiTaXiangQing.Parent == null )
- {
- this.tbQiTaXiangQing.Parent = this.tabControlMain;
- }
- BindOrderData();
- }
- else
- {
- MessageBoxCustom.Show( "保存成功,但重新加载时失败", "提示" );
- return;
- }
- Model.Model_ErpOrder modelOrder = this.currentOrderModel;//(Model.Model_ErpOrder)(obj.GetType().GetProperty("modelOrder").GetValue(obj, null));
- LYFZ.Model.Model_ErpCustomer modelCilentMain = this.mainCusModel;//(Model.Model_ErpCustomer)(obj.GetType().GetProperty("modelCilentMain").GetValue(obj, null));
- this.LockOrderUpdate();
- if ( apiErpModel.StrSaveClass == "1" )
- {
- #region 短信发送操作
- LYFZ.BLL.BLL_SMSRecord smsRecord = new BLL.BLL_SMSRecord();
- smsRecord.SMSSend( orderBll,
- systemConfigurebll,
- memberCardBackCashSetbll,
- apiErpModel,
- modelOrder,
- isAddOrder,
- apiErpModel.StrSaveClass == "0",
- modelCilentMain.Cus_CustomerNumber );
- #endregion
- #region 收款 并 积分
- if ( LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.OrdersReceivablesCompetence, LYFZ.CustomAttributes.OperatingAuthority.OrdersReceivables ) )
- {
- if ( modelOrder.Ord_SeriesPrice > 0 )
- {
- if ( paymentbll.GetRecordCount( "Pay_OrdNumber = '" + modelOrder.Ord_Number + "'" ) <= 0 )
- {
- LYFZ.Software.MainBusiness.FinancialManagement.OrdersReceivables.FrmPrePayment frm = new FinancialManagement.OrdersReceivables.FrmPrePayment();
- frm.StrOrdNumber = this.OrderNumber;
- frm.IsShowButtonPayment = true;
- frm.ShowDialog();
- }
- }
- }
- #endregion
- }
- else
- {
- LYFZ.DAL.DAL_ErpCustomer.UpdateAggregationCustomer( this.OrderNumber );
- if ( modelOrder.Ord_Number.Trim().Length > 0 )
- {
- LYFZ.BLL.BLL_ErpOrderDigitalStatus.UpdateDigitalStatus( modelOrder.Ord_Number, LYFZ.EnumPublic.OrderDigitalStatusEnum.开单 );
- }
- }
- }
- else
- {
- MessageBoxCustom.Show( result.StatusMsg );
- }
- }
- }
- private void PlDingDanZhiNiao_Scroll( object sender, ScrollEventArgs e )
- {
- if ( e.Type == ScrollEventType.ThumbPosition )
- {
- this.RefreshNumericUpDownEx();
- }
- }
- /// <summary>
- /// 选择礼包时事件处理
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void CmbtreevPackageName_ComboBoxTree_NodeMouseClick( object sender, TreeNodeMouseClickEventArgs e )
- {
- //if (string.IsNullOrEmpty(this.cmbtreevPackageName.Text.Trim()))
- //{
- // return;
- //}
- if ( this.cmbtreevPackageName.Tag != null )
- {
- dynamic taoXiMingChenData = this.cmbtreevPackageName.Tag;
- this.SelectTaoXiAddItems( taoXiMingChenData, EnumPublic.EnumPackagesType.AAAAACA );
- }
- }
- /// <summary>
- /// 当前订单的新套系名称(在逻辑上临时使用)
- /// </summary>
- string newTempOrd_SeriesName = "";
- /// <summary>
- /// 选择套系名称事件处理
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void CmbtreevTaoXiName_ComboBoxTree_NodeMouseClick( object sender, TreeNodeMouseClickEventArgs e )
- {
- if ( string.IsNullOrEmpty( this.cmbtreevTaoXiName.Text.Trim() ) )
- {
- return;
- }
- if ( this.cmbtreevTaoXiName.Text.Trim().ToLower() == newTempOrd_SeriesName.Trim().ToLower() )
- {
- return;
- }
- if ( this.cmbtreevTaoXiName.Tag != null )
- {
- //设置当前订单的新套系名称(在逻辑上临时使用)
- this.newTempOrd_SeriesName = this.cmbtreevTaoXiName.Text.Trim();
- dynamic taoXiMingChenData = this.cmbtreevTaoXiName.Tag;
- this.SelectTaoXiAddItems( taoXiMingChenData, EnumPublic.EnumPackagesType.AAAAAAB );
- if ( String.IsNullOrEmpty( this.currentOrderModel.Ord_OldSeriesName ) )
- {
- this.currentOrderModel.Ord_OldSeriesName = this.currentOrderModel.Ord_SeriesName;
- this.currentOrderModel.Ord_OldSeriesPrice = this.currentOrderModel.Ord_SeriesPrice;
- }
- if ( this.lbTaoXiShenJi.Visible )
- {
- this.SetTaoXiShenJiJiLu( true );
- this.SetOfSystemUpgradeLog = String.Format( "用户:{0}({1})将套系从“{2}”升级为“{3}”", this.loginUserName, this.loginUserID, this.currentOrderModel.Ord_SeriesName, this.cmbtreevTaoXiName.Text.Trim() );
- }
- }
- }
- /// <summary>
- /// 移除礼包的项目
- /// </summary>
- public void RemovePackageItem()
- {
- this.cmbtreevPackageName.SetTextAndTag_ValueNull();
- this.numLiBaoJiaGe.Value = 0;
- this.numIntoRegisterPackage.Value = 0;
- this.numIntoBottomPackage.Value = 0;
- }
- /// <summary>
- /// 是否为活动套系
- /// </summary>
- bool GetIsActivity()
- {
- bool IsActivity = false;
- if ( this.cmbtreevTaoXiName.Tag != null )
- {
- if ( this.cmbtreevTaoXiName.Tag.ToString().Length > 3 )
- {
- dynamic taoXiMingChenData = this.cmbtreevTaoXiName.Tag;
- if ( this.cmbtreevTaoXiName.Tag.ToString().ToUpper().Trim() == BLL.BLL_ErpSystemCategory.GetSysTemCategoryCode( BLL.SysTemCategoryCodeType.活动套系 ).ToUpper() )
- {
- IsActivity = true;
- }
- else if ( this.cmbtreevTaoXiName.Parent != null && this.cmbtreevTaoXiName.Tag.ToString().Contains( "PackagesClass" ) )
- {
- try
- {
- if ( taoXiMingChenData.PackagesClass.ToString().ToUpper().Trim() == BLL.BLL_ErpSystemCategory.GetSysTemCategoryCode( BLL.SysTemCategoryCodeType.活动套系 ).ToUpper() )
- {
- IsActivity = true;
- }
- else
- {
- string TwoLevelCategoryCode = BLL.BLL_ErpSystemCategory.GetTwoLevelCategoryCode( taoXiMingChenData.PackagesClass.ToString().ToUpper().Trim(), "" );
- if ( TwoLevelCategoryCode.ToUpper().Trim() == BLL.BLL_ErpSystemCategory.GetSysTemCategoryCode( BLL.SysTemCategoryCodeType.活动套系 ).ToUpper() )
- {
- IsActivity = true;
- }
- }
- }
- catch
- {
- }
- }
- }
- }
- if ( IsActivity && !LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.ChangeActiveContent )
- {
- this.numTaoXiJiaGe.ReadOnly = true;
- this.numIntoBottom.Enabled = false;
- this.numIntoRegister.Enabled = false;
- }
- else
- {
- this.numTaoXiJiaGe.ReadOnly = false;
- this.numIntoBottom.Enabled = true;
- this.numIntoRegister.Enabled = true;
- }
- return IsActivity;
- }
- /// <summary>
- /// 设置订单资料(套系选择)
- /// </summary>
- /// <param name="dtRow">DataRow数据源</param>
- /// <param name="IsActivity">是否为活动套系</param>
- public bool SetOrderValue( LYFZ.Model.Model_ErpPackages packages )
- {
- bool IsActivity = GetIsActivity();
- this.numTaoXiJiaGe.Value = 0;
- this.numIntoRegister.Value = 0;
- this.numIntoBottom.Value = 0;
- if ( packages != null && packages.ID > 0 )
- {
- this.numTaoXiJiaGe.Value = packages.Pak_UnitPrice;
- if ( this.plDingDanXiangPian.Visible )
- {
- this.numIntoRegister.Value = packages.Pak_IntoTheBook;
- this.numIntoBottom.Value = packages.Pak_IntoTheArchive;
- }
- }
- return IsActivity;
- }
- /// <summary>
- /// 根据选择的套系添加容空到相应控件中
- /// </summary>
- /// <param name="taoXiData"></param>
- /// <param name="packages"></param>
- /// <param name="packType"></param>
- void SelectTaoXiAddItems( dynamic taoXiData, EnumPublic.EnumPackagesType packType )
- {
- LYFZ.Model.Model_ErpPackages packages = null;
- string packagesID = "";
- if ( taoXiData != null && taoXiData.ToString().Length > 3 )
- {
- packagesID = taoXiData.PackagesID.ToString().Trim();
- packages = packageBll.GetModel( "Pak_PackagesID", packagesID );
- }
- //new
- //{
- // PackagesClass = row["Pak_PackagesClass"].ToString(),
- // PackagesID = row["Pak_PackagesID"].ToString(),
- // Pak_Name = row["Pak_Name"].ToString(),
- //}
- bool IsActivity = false;
- List<int> packagesMerchandiseList = new List<int>();
- if ( packType == EnumPublic.EnumPackagesType.AAAAACA )
- {
- decimal StrUnitPrice = 0;
- int StrIntoRegisterQuantity = 0;
- int StrIntoBottomQuantity = 0;
- if ( !string.IsNullOrEmpty( this.cmbtreevPackageName.Text.Trim() ) )
- {
- if ( packages != null && packages.ID > 0 )
- {
- StrUnitPrice = packages.Pak_UnitPrice;
- if ( this.plLiBaoRuDiRuChe.Visible )
- {
- StrIntoRegisterQuantity = packages.Pak_IntoTheBook;
- StrIntoBottomQuantity = packages.Pak_IntoTheArchive;
- }
- }
- }
- this.numLiBaoJiaGe.Value = StrUnitPrice;
- this.numIntoRegisterPackage.Value = StrIntoRegisterQuantity;
- this.numIntoBottomPackage.Value = StrIntoBottomQuantity;
- if ( packages != null && packages.ID > 0 && packages.Pak_OptionalSeveral.ToString().Trim().Length > 0 && packages.Pak_OptionalSeveral >= 0 )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.ToolboxPackageListViewSamllForm frm = new SetSmallForm.ToolboxPackageListViewSamllForm();
- frm.intOptionalSeveral = packages.Pak_OptionalSeveral;
- frm.StrPackageCode = packagesID;
- frm.StrOrderType = this.OrderType;
- frm.ShowDialog();
- if ( frm.IsSaveed )
- {
- packagesMerchandiseList = frm.listID;
- }
- else
- {
- RemovePackageItem();
- packagesID = "";
- }
- }
- }
- else
- {
- IsActivity = SetOrderValue( packages );
- }
- string strMagess = "";
- if ( !string.IsNullOrEmpty( packagesID ) )
- {
- DataTable dtSights = null;
- DataTable dtProduct = null;
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod( delegate ( object obj, BackgroundWorker backgroundWorker )
- {
- DataSet dsData = DAL.DAL_ErpPackagesGiftMerchandise.GetPackagesSights( packagesID, packType, packagesMerchandiseList );
- dtSights = dsData.Tables["ds"];
- dtProduct = dsData.Tables["ds1"];
- } );
- try
- {
- if ( dtSights != null && dtProduct != null )
- {
- if ( this.orderSightsControl.Parent != null )
- {
- DataRow[] dtRow = dtSights.Select( "Pgm_GiveType = '2'" );
- strMagess += this.orderSightsControl.SetOrderSightsValue( dtRow, IsActivity, packType );
- }
- if ( this.orderStagesControl.Parent != null )
- {
- DataRow[] dtRow = dtSights.Select( "Pgm_GiveType = '3'" );
- strMagess += this.orderStagesControl.SetOrderStagesValue( dtRow, IsActivity, packType );
- }
- if ( this.orderServiceControl.Parent != null )
- {
- DataRow[] dtRow = dtProduct.Select( "Pgm_GiveType = '1'" );
- strMagess += this.orderServiceControl.SetOrderServiceValue( dtRow, IsActivity, packType );
- }
- if ( this.orderProductControl.Parent != null )
- {
- DataRow[] dtRow = dtProduct.Select( "Pgm_GiveType = '0'" );
- strMagess += this.orderProductControl.SetOrderProductValue( dtRow, IsActivity, packType );
- }
- }
- }
- catch { }
- }
- else if ( packType == EnumPublic.EnumPackagesType.AAAAACA )
- {
- if ( this.orderSightsControl.Parent != null )
- {
- try
- {
- this.orderSightsControl.RemovePackageItem();
- }
- catch { }
- }
- if ( this.orderStagesControl.Parent != null )
- {
- try
- {
- this.orderStagesControl.RemovePackageItem();
- }
- catch { }
- }
- if ( this.orderServiceControl.Parent != null )
- {
- try
- {
- this.orderServiceControl.RemovePackageItem();
- }
- catch { }
- }
- if ( this.orderProductControl.Parent != null )
- {
- try
- {
- this.orderProductControl.RemovePackageItem();
- }
- catch { }
- }
- }
- if ( !String.IsNullOrEmpty( strMagess ) )
- {
- MessageBoxCustom.Show( strMagess );
- }
- }
- /// <summary>
- /// 获取前缀
- /// </summary>
- /// <returns></returns>
- private string GetOrderCustomPrefix( EnumPublic.OrderType oType )
- {
- string StrCustomPrefix = "";
- switch ( oType )
- {
- case EnumPublic.OrderType.婚纱订单:
- StrCustomPrefix = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetPrefix( LYFZ.EnumPublic.OrderNumberPrefixType.婚纱订单 ).Trim();
- break;
- case EnumPublic.OrderType.儿童订单:
- StrCustomPrefix = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetPrefix( LYFZ.EnumPublic.OrderNumberPrefixType.儿童订单 ).Trim();
- break;
- case EnumPublic.OrderType.写真订单:
- StrCustomPrefix = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetPrefix( LYFZ.EnumPublic.OrderNumberPrefixType.写真订单 ).Trim();
- break;
- case EnumPublic.OrderType.服务订单:
- StrCustomPrefix = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetPrefix( LYFZ.EnumPublic.OrderNumberPrefixType.服务订单 ).Trim();
- break;
- case EnumPublic.OrderType.婚庆订单:
- StrCustomPrefix = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetPrefix( LYFZ.EnumPublic.OrderNumberPrefixType.婚庆订单 ).Trim();
- break;
- }
- return StrCustomPrefix;
- }
- /// <summary>
- /// 设置显示隐藏订单前缀
- /// </summary>
- /// <param name="qz"></param>
- /// <param name="isShow"></param>
- void SetDingDanQianZhuiShow( string qz, bool isShow )
- {
- if ( isShow && !String.IsNullOrEmpty( qz ) )
- {
- this.txtDingDanQianZhui.Text = qz.Trim();
- this.txtDingDanQianZhui.Show();
- this.txtDingDanQianZhui.Width = 9 * qz.Length;
- this.txtSinceOrderNumber.Padding = new Padding( 9 * qz.Length + 4, 5, 5, 5 );
- //this.txtSinceOrderNumber.ReadOnly = false;
- }
- else
- {
- this.txtDingDanQianZhui.Hide();
- this.txtDingDanQianZhui.Text = "";
- this.txtSinceOrderNumber.Padding = new Padding( 5 );
- }
- if ( IsNewOrder )
- {
- this.txtSinceOrderNumber.ReadOnly = false;
- }
- else
- {
- this.txtSinceOrderNumber.ReadOnly = true;
- }
- }
- /// <summary>
- /// 获取自定义单号
- /// </summary>
- /// <returns></returns>
- string GetSinceOrderNumber()
- {
- if ( this.txtSinceOrderNumber.ReadOnly )
- {
- return this.txtSinceOrderNumber.Text.Trim();
- }
- else
- {
- if ( LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.IsCustomOrderNumber )
- {
- if (this.txtSinceOrderNumber.Text.Trim().Length <= 0)
- {
- throw new Exception("自定义单号不能为空!");
- }
- return String.Format( "{0}{1}", this.txtDingDanQianZhui.Text.Trim(), this.txtSinceOrderNumber.Text.Trim() );
- }
- else
- {
- return "";
- }
- }
- }
- /// <summary>
- /// 订单礼包设置
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void LbSetLiBao_Click( object sender, EventArgs e )
- {
- LYFZ.Software.MainBusiness.InitialSet.PackagesGoodsSetFormMain frm = new InitialSet.PackagesGoodsSetFormMain( "1" );
- frm.ShowDialog();
- if ( frm.IsSaveed )
- {
- LoadAllSystemCategory();
- LoadAllPackagesName();
- this.BindLiBao();
- }
- }
- /// <summary>
- /// 订单套系名称设置
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void LbSetTaoXiName_Click( object sender, EventArgs e )
- {
- LYFZ.Software.MainBusiness.InitialSet.PackagesGoodsSetFormMain frm = new InitialSet.PackagesGoodsSetFormMain( "0" );
- frm.ShowDialog();
- if ( frm.IsSaveed )
- {
- LoadAllSystemCategory();
- LoadAllPackagesName();
- this.BindTaoXiMing();
- }
- }
- /// <summary>
- /// 订单类别设置
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void LbSetOrderClass_Click( object sender, EventArgs e )
- {
- LYFZ.Software.MainBusiness.InitialSet.FrmSystemSet frm = new InitialSet.FrmSystemSet();
- frm.TypeName = BLL.BLL_ErpSystemCategory.GetSysTemCategoryCode( BLL.SysTemCategoryCodeType.订单类别 ).ToUpper();
- frm.IsLoadAllCategory = false;
- if ( frm.ShowDialog() == DialogResult.OK )
- {
- LoadAllSystemCategory();
- this.BindOrderClass();
- }
- }
- /// <summary>
- /// 设置风格
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void LkSetStyle_Click( object sender, EventArgs e )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.StyleSetSmallForm frm = new SetSmallForm.StyleSetSmallForm();
- frm.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm.Location = new Point( LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y );
- frm.Size = new Size( LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height );
- frm.ShowDialog();
- if ( frm.IsSaveed )
- {
- List<LYFZ.Model.Model_ErpStyle> tbStyleList = new List<Model.Model_ErpStyle>();
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod( delegate ( object obj, BackgroundWorker backgroundWorker )
- {
- tbStyleList = styleBll.GetModelList( "1=1" );
- } );
- BindStyleList( tbStyleList );
- }
- }
- /// <summary>
- /// 选择喜爱风格
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void LkSelectStyle_Click( object sender, EventArgs e )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.StyleViewSmallForm frm = new SetSmallForm.StyleViewSmallForm();
- frm.frmStyleViewVersion = SetSmallForm.StyleViewSmallForm.StyleViewVersion.风格浏览;
- frm.OldSelectStyleList = GetStyleList();
- frm.WindowState = FormWindowState.Maximized;
- frm.ShowDialog();
- if ( frm.IsSaveed )
- {
- SetCheckedSelectStyle( frm.SelectStyleList, false );
- }
- }
- /// <summary>
- /// 根据已选风格值勾选风格控件
- /// </summary>
- /// <param name="styleValueList">值集合</param>
- /// <param name="isIDValue">为 true 时为风格ID 集合 为 false 时为风格的名称集合</param>
- void SetCheckedSelectStyle( List<string> styleValueList, bool isIDValue )
- {
- foreach ( Control control in this.plStyleMain.Controls )
- {
- if ( control is CheckBoxEx )
- {
- if ( (isIDValue && (styleValueList.Contains( control.Tag.ToString().Trim() ) || styleValueList.Contains( String.Format( "chk_{0}", control.Tag.ToString().Trim() ) )))
- || (!isIDValue && styleValueList.Contains( control.Text.Trim().ToString() )) )
- {
- CheckBoxEx tmp = (CheckBoxEx)control;
- tmp.Checked = true;
- }
- }
- }
- }
- /// <summary>
- /// 清除风格控件
- /// </summary>
- void ClearStyleList()
- {
- List<Control> removeChklist = new List<Control>();
- foreach ( Control control in this.plStyleMain.Controls )
- {
- if ( control is CheckBoxEx )
- {
- removeChklist.Add( control );
- }
- }
- foreach ( Control control in removeChklist )
- {
- this.plStyleMain.Controls.Remove( control );
- }
- }
- /// <summary>
- /// 绑定喜爱风格
- /// </summary>
- void BindStyleList( List<LYFZ.Model.Model_ErpStyle> styleList )
- {
- ClearStyleList();
- int chboxStarTablIndex = 10;
- int locationX = 82;//横向间隔 167
- int locationY = 29;//纵向间隔 27
- int starX_Index = 0;
- int starY_Index = 0;
- foreach ( LYFZ.Model.Model_ErpStyle styleModel in styleList )
- {
- chboxStarTablIndex++;
- CheckBoxEx chBox = new CheckBoxEx();
- chBox.Name = "chk_" + styleModel.ID.ToString();
- chBox.Text = styleModel.Style_Name;
- chBox.TabIndex = chboxStarTablIndex;
- chBox.Tag = styleModel.ID;
- chBox.Location = new Point( locationX + (starX_Index * 167), locationY + (starY_Index * 27) );
- this.plStyleMain.Controls.Add( chBox );
- starX_Index++;
- if ( starX_Index >= 5 )
- {
- starX_Index = 0;
- starY_Index++;
- }
- }
- this.plStyleMain.Height = 35 + 27 * (starY_Index + 1);
- UCustomerInfo.RefreshParentHeight( this.flKeFuZhiNiaoBlock );
- }
- /// <summary>
- /// 获取喜爱格调
- /// </summary>
- /// <param name="isPrefix">是否有前缀</param>
- /// <returns></returns>
- private List<string> GetStyleList( bool isPrefix = false )
- {
- List<string> ListID = new List<string>();
- foreach ( Control control in this.plStyleMain.Controls )//订单资料
- {
- if ( control is CheckBoxEx )
- {
- CheckBoxEx tmp = (CheckBoxEx)control;
- if ( tmp.Checked )
- {
- if ( isPrefix )
- {
- ListID.Add( String.Format( "{0}", tmp.Name.Trim() ) );
- }
- else
- {
- ListID.Add( String.Format( "{0}", tmp.Tag.ToString().Trim() ) );
- }
- }
- }
- }
- return ListID;
- }
- /// <summary>
- /// 选择意向客户
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void LkYiXiangClient_Click( object sender, EventArgs e )
- {
- if ( IsNewOrder )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.SuperSmallForm.OrderSelectSuperSmallForm frm = new SuperSmallForm.OrderSelectSuperSmallForm();
- frm.Text = "选择订单(双击选择)";
- if ( frm.ShowDialog() == DialogResult.OK )
- {
- this.SelectIntentClient( frm.SelectOrderNumber, frm.SelectClientGroupNumber );
- }
- }
- }
- /// <summary>
- /// 选择意向订单或意向客户组
- /// </summary>
- /// <param name="SelectOrderNumber"></param>
- /// <param name="SelectClientGroupNumber"></param>
- void SelectIntentClient( string SelectOrderNumber, string SelectClientGroupNumber )
- {
- if ( !this.IsNewOrder )
- {
- //如果不是新开订单时,不允许选择意向客户
- return;
- }
- if ( !string.IsNullOrEmpty( SelectOrderNumber ) )
- {
- this.OrderNumber = SelectOrderNumber.Trim();
- if ( this.OpenLoadOrderData( this.OrderNumber ) )
- {
- this.lkYiXiangClient.Hide();
- BindOrderData();
- }
- }
- else
- {
- this.customerGroup = customerGroupBll.GetModelByEntity( "GP_CustomerGroupID", SelectClientGroupNumber );
- if ( customerGroup.ID > 0 )
- {
- if ( !String.IsNullOrEmpty( customerGroup.GP_IntroducerCustomerID ) )
- {
- this.customerFriends = customerBll.GetModel( "Cus_CustomerNumber", customerGroup.GP_IntroducerCustomerID );
- if ( this.customerFriends.ID > 0 )
- {
- this.memberCardModelFriends = memberCardBll.GetModel( "Mc_CustomerNumber", this.customerFriends.Cus_CustomerNumber );
- }
- }
- this.customerGroupMembersList = customerGroupMembersBll.GetModelList( String.Format( "GM_CustomerGroupID = '{0}'", customerGroup.GP_CustomerGroupID ) );
- StringBuilder tempCusIDs = new StringBuilder();
- foreach ( LYFZ.Model.Model_ErpCustomerGroupMembers cusGroupMember in customerGroupMembersList )
- {
- tempCusIDs.Append( String.Format( "'{0}',", cusGroupMember.GM_CustomerID ) );
- }
- this.customerList = customerBll.GetModelList( String.Format( "Cus_CustomerNumber in ({0})", tempCusIDs.ToString().Trim( ',' ) ) );
- //设置客户信息
- this.BindCustomerInfo();
- }
- }
- }
- /// <summary>
- /// 选择医院跟踪客户
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void RdoHospitalClient_Click( object sender, EventArgs e )
- {
- if ( IsNewOrder )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.SuperSmallForm.SelectHospitalClientSuperSmallForm frm = new SuperSmallForm.SelectHospitalClientSuperSmallForm();
- if ( frm.ShowDialog() == DialogResult.OK )
- {
- this.ClearCustomerControls();
- this.ComeSingleLotNumber = frm.model.Hct_Oddnumber;
- this.uMainCusInfo.SetHospitalClientValue( frm.model );
- this.SetHospitalChildrenClientInfo( frm.model );
- }
- }
- }
- /// <summary>
- /// 设置医院跟踪系统选择的儿童信息
- /// </summary>
- /// <param name="model"></param>
- void SetHospitalChildrenClientInfo( LYFZ.Model.Model_ErpHospitalClient model )
- {
- this.childModel = new Model.Model_ErpCustomer();
- if ( model != null )
- {
- this.maskBirthday.StrValue = LYFZ.Command.Command_Validate.DateTimeToString( model.Hct_BabyBirthday );
- this.chkBirthday.Checked = model.Hct_AreLunar;
- this.txtCusName.Text = model.Hct_BabyName;
- if ( model.Hct_BabySex == "女" )
- {
- this.rdoCusSex2.Checked = true;
- }
- else
- {
- this.rdoCusSex1.Checked = true;
- }
- if ( !string.IsNullOrEmpty( this.maskBirthday.StrValue ) )
- {
- this.txtZodiac.Text = LYFZ.Command.Command_CalendarTurnLunar.GetZodiac( this.maskBirthday.StrValue, this.chkBirthday.Checked );
- }
- }
- }
- /// <summary>
- /// 清除儿童信息
- /// </summary>
- void ClearChildrenInfo()
- {
- this.childModel = new Model.Model_ErpCustomer();
- this.maskBirthday.StrValue = "";
- this.chkBirthday.Checked = false;
- this.txtCusName.Text = "";
- this.rdoCusSex1.Checked = true;
- this.txtZodiac.Text = "";
- this.txtCusName.ReadOnly = false;
- }
- /// <summary>
- /// 朋友介绍
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void RdoFriends_Click( object sender, EventArgs e )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.SuperSmallForm.FriendIntroducedSuperSmallForm frm = new SuperSmallForm.FriendIntroducedSuperSmallForm();
- if ( frm.ShowDialog() == DialogResult.OK )
- {
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod( delegate ( object obj, BackgroundWorker backgroundWorker )
- {
- backgroundWorker.ReportProgress( 0, "正在加载数据... " );
- this.memberCardModelFriends = memberCardBll.GetMemberCardModel( String.Format( "Mc_CustomerNumber='{0}'and Mc_Status='1'", frm.model.Cus_CustomerNumber ) );
- } );
- this.customerFriends = frm.model;
- if ( frm.modelVice != null )
- {
- this.modelViceCardFriends = frm.modelVice;
- }
- this.SetFriendIntroduction();
- }
- }
- /// <summary>
- /// 设置儿童信息
- /// </summary>
- /// <param name="childernCusModel"></param>
- void SetCusChildrenInfo( LYFZ.Model.Model_ErpCustomer childernCusModel )
- {
- this.childModel = childernCusModel;
- this.ClearChildrenInfo();
- if ( childernCusModel != null )
- {
- if ( childernCusModel.ID > 0 )
- {
- this.maskBirthday.StrValue = LYFZ.Command.Command_Validate.DateTimeToString( childernCusModel.Cus_Birthday );
- this.chkBirthday.Checked = childernCusModel.Cus_BirthdayLunar == "1" ? true : false;
- this.txtCusName.Text = childernCusModel.Cus_Name;
- if ( childernCusModel.Cus_Sex )
- {
- this.rdoCusSex2.Checked = true;
- }
- else
- {
- this.rdoCusSex1.Checked = true;
- }
- if ( !string.IsNullOrEmpty( this.maskBirthday.StrValue ) )
- {
- this.txtZodiac.Text = LYFZ.Command.Command_CalendarTurnLunar.GetZodiac( this.maskBirthday.StrValue, this.chkBirthday.Checked );
- }
- this.txtCusName.ReadOnly = true;
- }
- }
- }
- /// <summary>
- /// 选择老客户
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void RdoOldClient_Click( object sender, EventArgs e )
- {
- if ( IsNewOrder )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.SuperSmallForm.ClientGroupSelectSuperSmallForm frm = new SuperSmallForm.ClientGroupSelectSuperSmallForm();
- if ( frm.ShowDialog() == DialogResult.OK )
- {
- this.ClearCustomerControls();
- if ( frm.mlist.Count > 0 )
- {
- this.uMainCusInfo.SetOldCustomerInfo( frm.mlist, frm.htData["MainClientNumber"].ToString().Trim() );
- if ( this.plBaoBei.Visible )
- {
- this.SetCusChildrenInfo( frm.mlist.Find( c => c.Cus_Type == "儿童" && String.IsNullOrEmpty( c.Cus_Telephone ) ) );
- }
- }
- }
- }
- }
- /// <summary>
- /// 重新加载所有套系名称
- /// </summary>
- void LoadAllPackagesName()
- {
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod( delegate ( object obj, BackgroundWorker backgroundWorker )
- {
- LYFZ.BLL.BLL_ErpPackages.LoadAllPackagesName();
- } );
- }
- /// <summary>
- /// 重新加载所有类别
- /// </summary>
- void LoadAllSystemCategory()
- {
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod( delegate ( object obj, BackgroundWorker backgroundWorker )
- {
- LYFZ.BLL.WageStatisticsProcess.LoadAllSystemCategory();
- } );
- }
- /// <summary>
- /// 设置客户来源
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void LkSetClientSource_Click( object sender, EventArgs e )
- {
- LYFZ.Software.MainBusiness.InitialSet.FrmSystemSet frm = new InitialSet.FrmSystemSet();
- frm.TypeName = BLL.BLL_ErpSystemCategory.GetSysTemCategoryCode( BLL.SysTemCategoryCodeType.客户来源 ).ToUpper();
- frm.IsLoadAllCategory = false;
- if ( frm.ShowDialog() == DialogResult.OK )
- {
- LoadAllSystemCategory();
- this.BindClientSource();
- }
- }
- /// <summary>
- /// 客户来源其它选项 选择事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void RdoOther_CheckedChanged( object sender, EventArgs e )
- {
- this.cmbtreevClientSource.Enabled = this.rdoOther.Checked;
- if ( !this.rdoOther.Checked )
- {
- this.cmbtreevClientSource.SetTextAndTag_ValueNull();
- }
- }
- /// <summary>
- /// 自定义提成信息数据
- /// </summary>
- string customCommissionData = "";
- /// <summary>
- /// 选择接单人
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void LkSelectOrderPerson_Click( object sender, EventArgs e )
- {
- customCommissionData = new LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses().txtOrdersPerson( this.txtOrderPerson, this.customCommissionData );
- // this.ordersPersonList
- }
- /// <summary>
- /// 隐藏订单标注
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void LbHideBiaoZhu_Click( object sender, EventArgs e )
- {
- this.plBiaoZhiu.Hide();
- }
- /// <summary>
- /// 显示订单标注
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void PictAnnotation_Click( object sender, EventArgs e )
- {
- this.plBiaoZhiu.Show();
- }
- /// <summary>
- /// 关闭窗体
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void BtnOrderClose_Click( object sender, EventArgs e )
- {
- this.Close();
- }
- /// <summary>
- /// 测试时 打开旧版开单页
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void LblOpenType_Click( object sender, EventArgs e )
- {
- //this.OpenLoadOrderData("HS17051700005");
- //BindOrderData();
- // BindShowControls();
- // return;
- //LYFZ.Software.MainBusiness.DoorCityProcess.OnSingleFormMain01 frm = new OnSingleFormMain01();
- //frm.EnumLoadFormType = OnSingleFormMain01.LoadFormType.开单选择;
- //frm.OrdType = this.OrderType;
- //frm.IsShowUcNavigationTool = false;
- //frm.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- //frm.Show();
- }
- LYFZ.EnumPublic.OrderType _OrdType = EnumPublic.OrderType.写真订单;
- /// <summary>
- /// 订单类型
- /// </summary>
- public LYFZ.EnumPublic.OrderType OrderType
- {
- get
- {
- return _OrdType;
- }
- set
- {
- _OrdType = value;
- }
- }
- bool isSelectPhoto = false;
- /// <summary>
- /// 是否是从选片界面进入的修改订单
- /// </summary>
- public bool IsSelectPhoto { get => isSelectPhoto; set => isSelectPhoto = value; }
- string _OrderNumber = "";
- /// <summary>
- /// 当前订单号
- /// </summary>
- public string OrderNumber
- {
- get
- {
- return _OrderNumber.Trim();
- }
- set
- {
- _OrderNumber = value;
- }
- }
- /// <summary>
- /// 是否为新开订单
- /// </summary>
- bool IsNewOrder
- {
- get
- {
- return String.IsNullOrEmpty( this.OrderNumber );
- }
- }
- /// <summary>
- /// 接单人信息
- /// </summary>
- List<LYFZ.Model.Model_ErpOrdersPerson> ordersPersonList = new List<Model.Model_ErpOrdersPerson>();
- /// <summary>
- /// 客户组
- /// </summary>
- LYFZ.Model.Model_ErpCustomerGroup customerGroup = new Model.Model_ErpCustomerGroup();
- /// <summary>
- /// 客户组成员集合
- /// </summary>
- List<LYFZ.Model.Model_ErpCustomerGroupMembers> customerGroupMembersList = new List<Model.Model_ErpCustomerGroupMembers>();
- /// <summary>
- /// 客户成员信息集合
- /// </summary>
- List<LYFZ.Model.Model_ErpCustomer> customerList = new List<Model.Model_ErpCustomer>();
- /// <summary>
- /// 主要联系人成员表信息对象
- /// </summary>
- LYFZ.Model.Model_ErpCustomerGroupMembers mainCusGroupMember = new Model.Model_ErpCustomerGroupMembers();
- /// <summary>
- /// 当前主要联系人信息对象
- /// </summary>
- LYFZ.Model.Model_ErpCustomer mainCusModel = new Model.Model_ErpCustomer();
- /// <summary>
- /// 宝宝成员表信息对象
- /// </summary>
- LYFZ.Model.Model_ErpCustomerGroupMembers childGroupMember = new Model.Model_ErpCustomerGroupMembers();
- /// <summary>
- /// 当前宝宝信息对象
- /// </summary>
- LYFZ.Model.Model_ErpCustomer childModel = new Model.Model_ErpCustomer();
- /// <summary>
- /// 介绍人
- /// </summary>
- LYFZ.Model.Model_ErpCustomer customerFriends = new Model.Model_ErpCustomer();
- /// <summary>
- /// (介绍人)会员卡信息对象
- /// </summary>
- LYFZ.Model.Model_ErpMemberCard memberCardModelFriends = new Model.Model_ErpMemberCard();
- /// <summary>
- /// (介绍人)会员副卡信息对象
- /// </summary>
- LYFZ.Model.Model_ErpMemberCardViceCard modelViceCardFriends = new Model.Model_ErpMemberCardViceCard();
- /// <summary>
- /// 当前订单消费的返现副卡信息
- /// </summary>
- LYFZ.Model.Model_ErpMemberCardBackCashSet modelCashSet = new Model.Model_ErpMemberCardBackCashSet();
- /// <summary>
- /// 会员卡信息对象
- /// </summary>
- LYFZ.Model.Model_ErpMemberCard memberCardModel = new Model.Model_ErpMemberCard();
- /// <summary>
- /// 会员副卡信息对象
- /// </summary>
- LYFZ.Model.Model_ErpMemberCardViceCard modelViceCard = new Model.Model_ErpMemberCardViceCard();
- /// <summary>
- /// 订单数码表 儿童订单时一个订单对应数码表多条数据(每条数据表示一个阶段)、其它订单时一个订单只对应一条数据
- /// </summary>
- List<LYFZ.Model.Model_ErpOrderDigital> orderDigitalList = new List<Model.Model_ErpOrderDigital>();
- /// <summary>
- /// 订单摄影表 儿童订单时一个阶段对应一条数据,其它订单时一条数码数据对应多条数据(多个景点)
- /// </summary>
- List<LYFZ.Model.Model_ErpOrdersPhotography> photographyList = new List<Model.Model_ErpOrdersPhotography>();
- /// <summary>
- /// 订单商品集合
- /// </summary>
- List<LYFZ.Model.Model_ErpOrderProductList> orderProductList = new List<Model.Model_ErpOrderProductList>();
- /// <summary>
- /// 订单服务集合
- /// </summary>
- List<LYFZ.Model.Model_ErpWeddingService> orderWeddingServiceList = new List<Model.Model_ErpWeddingService>();
- /// <summary>
- /// 订单景店数据
- /// </summary>
- DataTable OrderSightsDataTable = null;
- /// <summary>
- /// 儿童订单 成长阶段数据
- /// </summary>
- DataTable OrderStagesDataTable = null;
- /// <summary>
- /// 订单商品数据
- /// </summary>
- DataTable OrderProductDataTable = null;
- /// <summary>
- /// 订单服务数据
- /// </summary>
- DataTable OrderServiceDataTable = null;
- #region 打开订单操作
- /// <summary>
- /// 当前打开的订单是否为意向订单
- /// </summary>
- bool isCurrentOpentIntentOrder = false;
- /// <summary>
- /// 加载订单数据
- /// </summary>
- bool LoadOrderData( string loadOrderNumber )
- {
- this.OrderNumber = loadOrderNumber;
- if ( !String.IsNullOrEmpty( loadOrderNumber ) )
- {
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod( delegate ( object obj, BackgroundWorker backgroundWorker )
- {
- backgroundWorker.ReportProgress( 0, "正在加载订单数据..." );
- this.currentOrderModel = this.orderBll.GetModel( this.OrderNumber );
- } );
- this.newTempOrd_SeriesName = this.currentOrderModel.Ord_SeriesName;
- this.cmbtreevStoreName.TagFindText(this.currentOrderModel.Ord_DividedShop);
- List<string> mlist = LYFZ.BLL.BLL_ErpUser.GetGroupRights("retailProcess", "CSA003");
- if(!mlist.Contains(this.currentOrderModel.Ord_DividedShop))
- {
- mlist.Add(this.currentOrderModel.Ord_DividedShop);
- }
- List<TreeNode> deleTreeNodes = new List<TreeNode>();
- foreach(TreeNode trNode in cmbtreevStoreName.TreeView.Nodes)
- {
- if(!mlist.Contains(trNode.Tag.ToString_s()))
- {
- deleTreeNodes.Add(trNode);
- }
- }
- foreach(TreeNode trNode in deleTreeNodes)
- {
- cmbtreevStoreName.TreeView.Nodes.Remove(trNode);
- }
- if ( currentOrderModel.ID > 0 )
- {
- if ( this.currentOrderModel.Ord_Class == "0" )
- {
- isCurrentOpentIntentOrder = true;
- this.btnSaveIntent.Show();
- }
- else
- {
- isCurrentOpentIntentOrder = false;
- this.btnSaveIntent.Hide();
- }
- this.OrderType = (LYFZ.EnumPublic.OrderType)Enum.Parse( typeof( LYFZ.EnumPublic.OrderType ), currentOrderModel.Ord_Type );
- this.orderProductControl.OrdType = this.OrderType;
- this.orderServiceControl.OrdType = this.OrderType;
- }
- else
- {
- MessageBoxCustom.Show( String.Format( "没有找到订单号“{0}”的订单数据,或该订单已被删除。", this.OrderNumber ) );
- return false;
- }
- }
- BindShowControls();
- return true;
- }
- /// <summary>
- /// 加载订单明细数据
- /// </summary>
- void LoadOrderDataDetails()
- {
- this.ClearFriendIntroduction();
- this.customerList.Clear();
- this.ordersPersonList.Clear();
- this.customerGroupMembersList.Clear();
- this.OrderStagesDataTable = null;
- this.OrderSightsDataTable = null;
- this.OrderProductDataTable = null;
- this.OrderServiceDataTable = null;
- this.orderWeddingServiceList.Clear();
- this.customerGroup = new Model.Model_ErpCustomerGroup();
- this.customerFriends = new Model.Model_ErpCustomer();
- this.modelCashSet = new Model.Model_ErpMemberCardBackCashSet();
- this.memberCardModelFriends = new Model.Model_ErpMemberCard();
- this.orderDigitalList.Clear();
- this.photographyList.Clear();
- this.orderProductList.Clear();
- this.ClearCustomerControls();
- if ( currentOrderModel.ID > 0 )
- {
- List<double> doubleList = new List<double>();
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod( delegate ( object obj, BackgroundWorker backgroundWorker )
- {
- backgroundWorker.ReportProgress( 0, "正在加载订单数据..." );
- DateTime starTime = DateTime.Now;
- // if (this.OrderType == EnumPublic.OrderType.儿童订单)
- this.OrderStagesDataTable = LYFZ.DAL.DAL_ErpOrder.GetOrderStagesDataTable( this.OrderNumber );
- this.OrderSightsDataTable = LYFZ.DAL.DAL_ErpOrder.GetOrderSightsDataTable( this.OrderNumber );
- this.OrderProductDataTable = LYFZ.DAL.DAL_ErpOrder.GetOrderProductDataTable( this.OrderNumber );
- this.OrderServiceDataTable = LYFZ.DAL.DAL_ErpOrder.GetOrderServiceDataTable( this.OrderNumber );
- doubleList.Add( LYFZ.WinAPI.CustomPublicMethod.ExecDateDiff( starTime, DateTime.Now ) );
- starTime = DateTime.Now;
- this.orderWeddingServiceList = this.weddingServiceBll.GetModelList( String.Format( "Ws_Number='{0}'", this.OrderNumber ) );
- doubleList.Add( LYFZ.WinAPI.CustomPublicMethod.ExecDateDiff( starTime, DateTime.Now ) );
- starTime = DateTime.Now;
- this.orderProductList = this.orderBll.GetOrderProductList( this.OrderNumber, DAL.OrderProductType.制作商品 );
- doubleList.Add( LYFZ.WinAPI.CustomPublicMethod.ExecDateDiff( starTime, DateTime.Now ) );
- starTime = DateTime.Now;
- this.ordersPersonList = ordersPersonBll.GetModelList( String.Format( "OrdPe_OrderNumber = '{0}'", this.OrderNumber ), "OrdPe_Type ASC" );
- doubleList.Add( LYFZ.WinAPI.CustomPublicMethod.ExecDateDiff( starTime, DateTime.Now ) );
- starTime = DateTime.Now;
- this.customerGroup = customerGroupBll.GetModelByEntity( "GP_OrderNumber", this.OrderNumber );
- doubleList.Add( LYFZ.WinAPI.CustomPublicMethod.ExecDateDiff( starTime, DateTime.Now ) );
- starTime = DateTime.Now;
- if ( customerGroup.ID > 0 )
- {
- if ( !String.IsNullOrEmpty( customerGroup.GP_IntroducerCustomerID ) )
- {
- this.customerFriends = customerBll.GetModel( "Cus_CustomerNumber", customerGroup.GP_IntroducerCustomerID );
- if ( this.customerFriends.ID > 0 )
- {
- this.memberCardModelFriends = memberCardBll.GetModel( "Mc_CustomerNumber", this.customerFriends.Cus_CustomerNumber );
- }
- modelCashSet = cardBackCashSetBll.GetModel( "Mcb_OrderNumber", this.OrderNumber );
- if ( modelCashSet.ID > 0 )
- {
- this.modelViceCardFriends = cardViceCardBll.GetModel( "Mvc_ViceNumber", modelCashSet.Mcb_ViceNumber );
- }
- }
- this.customerGroupMembersList = customerGroupMembersBll.GetModelList( String.Format( "GM_CustomerGroupID = '{0}'", customerGroup.GP_CustomerGroupID ) );
- StringBuilder tempCusIDs = new StringBuilder();
- foreach ( LYFZ.Model.Model_ErpCustomerGroupMembers cusGroupMember in customerGroupMembersList )
- {
- tempCusIDs.Append( String.Format( "'{0}',", cusGroupMember.GM_CustomerID ) );
- }
- doubleList.Add( LYFZ.WinAPI.CustomPublicMethod.ExecDateDiff( starTime, DateTime.Now ) );
- starTime = DateTime.Now;
- this.customerList = customerBll.GetModelList( String.Format( "Cus_CustomerNumber in ({0})", tempCusIDs.ToString().Trim( ',' ) ) );
- doubleList.Add( LYFZ.WinAPI.CustomPublicMethod.ExecDateDiff( starTime, DateTime.Now ) );
- starTime = DateTime.Now;
- }
- starTime = DateTime.Now;
- this.orderDigitalList = orderDigitalBll.GetModelList( String.Format( "Ordv_Number='{0}'", this.currentOrderModel.Ord_Number ), "Ordv_DigitalNumber asc" );
- doubleList.Add( LYFZ.WinAPI.CustomPublicMethod.ExecDateDiff( starTime, DateTime.Now ) );
- starTime = DateTime.Now;
- this.photographyList = photographyBll.GetModelList( String.Format( "Ordpg_Number='{0}'", this.currentOrderModel.Ord_Number ) );
- doubleList.Add( LYFZ.WinAPI.CustomPublicMethod.ExecDateDiff( starTime, DateTime.Now ) );
- } );
- }
- }
- /// <summary>
- /// 清除介绍人信息
- /// </summary>
- void ClearFriendIntroduction()
- {
- this.memberCardModelFriends = new Model.Model_ErpMemberCard();
- this.modelViceCardFriends = new Model.Model_ErpMemberCardViceCard();
- this.rdoFriends.Text = this.rdoFriends.Tag.ToString();
- this.toolTipMsg.SetToolTip( this.rdoFriends, "" );
- this.customerFriends = new Model.Model_ErpCustomer();
- }
- /// <summary>
- /// 设置朋友介绍信息显示
- /// </summary>
- void SetFriendIntroduction()
- {
- string StrCardType = "";//主卡等级 用于 SetToolTip 提示
- string StrCardTypeShow = ""; //主卡等级 用于显示到控到Text
- if ( this.memberCardModelFriends.ID > 0 && !String.IsNullOrEmpty( this.memberCardModelFriends.Mc_CradNumber.Trim() ) )
- {
- StrCardType = String.Format( " 主卡等级:{0}", this.memberCardModelFriends.Mc_CardType.Trim() );
- if ( this.memberCardModelFriends.Mc_CardType.Trim() != "无" )
- {
- StrCardTypeShow = "-" + this.memberCardModelFriends.Mc_CardType.Trim();
- }
- }
- if ( this.customerFriends.ID > 0 )
- {
- //如果使用了副卡时
- if ( this.modelViceCardFriends.ID > 0 )
- {
- this.rdoFriends.Text = String.Format( "{0}({1}{2}-副卡)", this.rdoFriends.Tag.ToString(), this.customerFriends.Cus_Name.Trim(), StrCardTypeShow );
- this.toolTipMsg.SetToolTip( this.rdoFriends, String.Format( "朋友介绍(介绍人:{0}{1};副卡卡号:{2})", this.customerFriends.Cus_Name, StrCardType, this.modelViceCardFriends.Mvc_ViceCardNumber ) );
- }
- else
- {
- this.rdoFriends.Text = String.Format( "{0}({1}{2})", this.rdoFriends.Tag.ToString(), this.customerFriends.Cus_Name.Trim(), StrCardTypeShow );
- this.toolTipMsg.SetToolTip( this.rdoFriends, String.Format( "朋友介绍(介绍人:{0}{1})", this.customerFriends.Cus_Name, StrCardType ) );
- }
- }
- }
- /// <summary>
- /// 清除客户控件
- /// </summary>
- void ClearCustomerControls()
- {
- this.ClearChildrenInfo();
- List<UCustomerInfo> delUcustomerList = new List<UCustomerInfo>();
- foreach ( Control control in this.flKeFuZhiNiaoBlock.Controls )
- {
- ///成人客户信息
- if ( control is UCustomerInfo )
- {
- UCustomerInfo tmpCus = (UCustomerInfo)control;
- if ( tmpCus.IsMainCustomer )
- {
- tmpCus.ClearCustomerInfo();
- }
- else
- {
- delUcustomerList.Add( tmpCus );
- }
- }
- }
- foreach ( UCustomerInfo ucus in delUcustomerList )
- {
- ucus.PictDelete_Click( null, null );
- }
- }
- /// <summary>
- /// 绑定客户信息
- /// </summary>
- void BindCustomerInfo()
- {
- if ( this.customerGroup.ID > 0 )
- {
- //主要联系人
- this.mainCusGroupMember = customerGroupMembersList.Find( c => c.GM_Master == 1 );
- this.mainCusModel = customerList.Find( c => c.Cus_CustomerNumber == this.mainCusGroupMember.GM_CustomerID );
- if (this.mainCusModel != null)
- {
- //设置婚期
- if (String.IsNullOrEmpty(this.mainCusModel.Cus_DayForMarriage))
- {
- this.mskMarriage.StrValue = "";
- }
- else
- {
- this.mskMarriage.StrValue = this.mainCusModel.Cus_DayForMarriage;
- }
- }
- else {
- this.mskMarriage.StrValue = "";
- }
- if (this.mainCusModel != null)
- this.chkMarriage.Checked = LYFZ.Command.Command_Validate.DateLunar( this.mainCusModel.Cus_DayForMarriageLunar );
- //设置宝宝资料
- //宝宝
- this.childGroupMember = customerGroupMembersList.Find( c => c.GM_CustomerID == c.GM_RelatedPersonID );
- this.SetCusChildrenInfo( customerList.Find( c => c.Cus_CustomerNumber == this.childGroupMember.GM_CustomerID ) );
- //主要联系人资料
- if (this.mainCusModel != null)
- this.uMainCusInfo.SetCustomerInfo( this.customerGroup, this.mainCusGroupMember, this.mainCusModel );
- //其它联系人
- UCustomerInfo newCusInfo = null;
- foreach ( LYFZ.Model.Model_ErpCustomerGroupMembers gMember in customerGroupMembersList )
- {
- if ( gMember.GM_CustomerID != this.mainCusGroupMember.GM_CustomerID && gMember.GM_CustomerID != this.childGroupMember.GM_CustomerID )
- {
- LYFZ.Model.Model_ErpCustomer tempCustomer = customerList.Find( c => c.Cus_CustomerNumber == gMember.GM_CustomerID );
- if ( tempCustomer != null && tempCustomer.ID > 0 )
- {
- if ( newCusInfo == null )
- {
- newCusInfo = uMainCusInfo.AddClientToParentControls();
- }
- else
- {
- newCusInfo = newCusInfo.AddClientToParentControls();
- }
- UCustomerInfo.RefreshParentHeight( this.flKeFuZhiNiaoBlock );
- newCusInfo.SetCustomerInfo( this.customerGroup, gMember, tempCustomer );
- }
- }
- }
- }
- }
- /// <summary>
- /// 套系升级日志
- /// </summary>
- string SetOfSystemUpgradeLog = "";
- /// <summary>
- /// 套系升级
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void LbTaoXiShenJi_Click( object sender, EventArgs e )
- {
- if ( MessageBoxCustom.Show( "你确定要升级套系吗?", msgBoxButton: MessageBoxButtons.YesNo ) == DialogResult.Yes )
- {
- this.cmbtreevTaoXiName.Enabled = true;
- }
- }
- /// <summary>
- /// 设置套系升级方案
- /// </summary>
- /// <param name="isShow"></param>
- void SetTaoXiShenJiJiLu( bool isShow = true )
- {
- if ( isShow )
- {
- this.lbTaoXiShenJiJiLu.Show();
- }
- else
- {
- this.lbTaoXiShenJiJiLu.Hide();
- }
- this.toolTipMsg.SetToolTip( this.lbTaoXiShenJiJiLu, String.Format( "升级前旧套系名称为:{0} 套系价格为:{1}元", currentOrderModel.Ord_OldSeriesName, currentOrderModel.Ord_OldSeriesPrice.ToString( "n2" ) ) );
- }
- /// <summary>
- /// 绑定订单数据
- /// </summary>
- void BindOrderData()
- {
- this.lbTaoXiShenJiJiLu.Hide();
- this.lbTaoXiShenJi.Hide();
- if ( currentOrderModel.ID > 0 )
- {
- #region 如果套系升过级时 显示旧套系信息处理
- if ( !String.IsNullOrEmpty( currentOrderModel.Ord_OldSeriesCode ) )
- {
- this.SetTaoXiShenJiJiLu( true );
- }
- #endregion
- #region 如果套系已有景点拍照OK,且需要修改套系时,显示套系升级按钮
- if ( this.photographyList != null && this.photographyList.Count > 0 )
- {
- if ( this.photographyList.Any( p => p.Ordpg_PhotographyStatus == "1" || p.Ordpg_PhotographyStatus == "2" ) )
- {
- this.cmbtreevTaoXiName.Enabled = false;
- if ( BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.SeriesUpgrade )
- {
- this.lbTaoXiShenJi.Show();
- }
- }
- }
- #endregion
- #region 接单人信息处理
- this.customCommissionData = this.currentOrderModel.Ord_CommissionRatio;
- string OrdersPersonString = String.Join<LYFZ.Model.Model_ErpOrdersPerson>( ",", ordersPersonList );
- string PersonTypeString = "0".PadRight( ordersPersonList.Count, '1' ).Replace( "1", ",1" );
- this.txtOrderPerson.Text = LYFZ.DAL.DAL_ErpUser.GetUserIDToUserName( OrdersPersonString, ',' );
- this.txtOrderPerson.Tag = String.Format( "{0}|{1}", OrdersPersonString, PersonTypeString );
- #endregion
- #region 客户来源处理
- switch ( this.currentOrderModel.Ord_CustomerSource.Trim() )
- {
- case "朋友介绍":
- #region 介绍人显示处理
- this.rdoFriends.Checked = true;
- this.SetFriendIntroduction();
- #endregion
- break;
- case "老客户":
- this.rdoOldClient.Checked = true;
- break;
- case "爱婴跟踪客户":
- this.rdoHospitalClient.Checked = true;
- break;
- default:
- this.rdoOther.Checked = true;
- this.cmbtreevClientSource.Enabled = true;
- this.cmbtreevClientSource.TextFindTag( this.currentOrderModel.Ord_CustomerSource.Trim() );
- break;
- }
- #endregion
- #region 喜爱格调处理
- if ( this.currentOrderModel.Ord_LovedStyle.Trim() != "" )
- {
- List<string> styleValueList = new List<string>();
- styleValueList.AddRange( this.currentOrderModel.Ord_LovedStyle.Trim().Split( '|' ) );
- this.SetCheckedSelectStyle( styleValueList, true );
- }
- #endregion
- #region 客户资料处理
- if ( this.customerGroup.ID > 0 )
- {
- this.BindCustomerInfo();
- }
- #endregion
- #region 订单资料处理
- #region 基本资料
- //订单号
- this.txtSysTempOrderNumber.Text = this.currentOrderModel.Ord_Number;
- this.txtSinceOrderNumber.Text = this.currentOrderModel.Ord_SinceOrderNumber;
- if ( this.currentOrderModel.Ord_Number.ToLower() == this.currentOrderModel.Ord_SinceOrderNumber.ToLower() )
- {
- this.plZhiDingYiDianHao.Hide();
- }
- else
- {
- this.plZhiDingYiDianHao.Show();
- }
- //套系资料
- this.cmbtreevOrderClass.TextFindTag( this.currentOrderModel.Ord_OrderClass.Trim() );//订单类别
- this.cmbtreevTaoXiName.TextFindTag( this.currentOrderModel.Ord_OrderClass.Trim() );//订单套系
- string orderSeriesName = this.currentOrderModel.Ord_SeriesName.Trim();
- if ( String.IsNullOrEmpty( orderSeriesName ) )
- {
- orderSeriesName = this.currentOrderModel.Ord_PhotographyCategory.Trim();
- }
- this.cmbtreevTaoXiName.TextFindTag( orderSeriesName );//套系名称
- this.numTaoXiJiaGe.Value = (this.currentOrderModel.Ord_SeriesPrice - this.currentOrderModel.Ord_PackagePrice);//this.currentOrderModel.Ord_SeriesPrice;//套系价格
- //礼包
- this.cmbtreevPackageName.TextFindTag( this.currentOrderModel.Ord_PackageName );
- this.numLiBaoJiaGe.Value = this.currentOrderModel.Ord_PackagePrice > 0 ? this.currentOrderModel.Ord_PackagePrice : 0;
- //订单相片 非儿童订单时的 入底、入册
- if ( this.OrderType != EnumPublic.OrderType.儿童订单 )
- {
- if ( this.orderDigitalList.Count > 0 )
- {
- LYFZ.Model.Model_ErpOrderDigital tempDigital = this.orderDigitalList.First();
- //礼包入底、入册
- this.numIntoRegisterPackage.Value = tempDigital.Ordv_IntoRegisterQuantityPackage;
- this.numIntoBottomPackage.Value = tempDigital.Ordv_IntoBottomQuantityPackage;
- //订单入底、入册
- this.numIntoRegister.Value = tempDigital.Ordv_IntoRegisterQuantity - tempDigital.Ordv_IntoRegisterQuantityPackage;
- this.numIntoBottom.Value = tempDigital.Ordv_IntoBottomQuantity;
- if ( tempDigital.Ordv_IntoBottomQuantity > 0 )
- {
- this.numIntoBottom.Value = tempDigital.Ordv_IntoBottomQuantity - tempDigital.Ordv_IntoBottomQuantityPackage;
- }
- }
- else
- {
- this.numIntoRegister.Value = 0;
- this.numIntoBottom.Value = 0;
- this.numIntoRegisterPackage.Value = 0;
- this.numIntoBottomPackage.Value = 0;
- }
- }
- //酒店信息
- this.txtHotelInfo.Text = this.currentOrderModel.Ord_HotelInfo;
- //订单备注
- this.txtOrderRemarks.Text = this.currentOrderModel.Ord_Remark;
- //订单套系标注
- this.txtBiaoZhu.Text = this.currentOrderModel.Ord_OrderAnnotation;
- if ( !String.IsNullOrEmpty( this.currentOrderModel.Ord_OrderAnnotation ) )
- {
- this.plBiaoZhiu.Show();
- }
- else
- {
- this.plBiaoZhiu.Hide();
- }
- #endregion
- #region 订单 景点、商品、服务 信息处理
- bool IsActivity = this.GetIsActivity();
- if ( this.orderSightsControl.Parent != null )
- {
- this.orderSightsControl.OrderPhotographyList = photographyList;
- this.orderSightsControl.OrderDigitalList = orderDigitalList;
- this.orderSightsControl.CurrentOrderModel = this.currentOrderModel;
- this.orderSightsControl.IsActivityTaoXi = IsActivity;
- this.orderSightsControl.SetOrderSightsValue( this.currentOrderModel.Ord_SeriesName, this.OrderSightsDataTable );
- }
- if ( this.orderStagesControl.Parent != null )
- {
- this.orderStagesControl.OrderPhotographyList = photographyList;
- this.orderStagesControl.OrderDigitalList = orderDigitalList;
- this.orderStagesControl.CurrentOrderModel = this.currentOrderModel;
- this.orderStagesControl.IsActivityTaoXi = IsActivity;
- this.orderStagesControl.SetOrderStagesValue( this.currentOrderModel.Ord_SeriesName, this.OrderStagesDataTable );
- }
- try
- {
- if ( this.orderServiceControl.Parent != null )
- {
- this.orderServiceControl.OrderPhotographyList = photographyList;
- this.orderServiceControl.OrderDigitalList = orderDigitalList;
- this.orderServiceControl.CurrentOrderModel = this.currentOrderModel;
- this.orderServiceControl.OrderWeddingServiceList = this.orderWeddingServiceList;
- this.orderServiceControl.SetOrderServiceValue( IsActivity, this.currentOrderModel.Ord_SeriesName, this.OrderServiceDataTable );
- }
- if ( this.orderProductControl.Parent != null )
- {
- this.orderProductControl.OrderPhotographyList = photographyList;
- this.orderProductControl.OrderDigitalList = orderDigitalList;
- this.orderProductControl.CurrentOrderModel = this.currentOrderModel;
- this.orderProductControl.OrderProductList = this.orderProductList;
- this.orderProductControl.SetOrderProductValue( IsActivity, this.currentOrderModel.Ord_SeriesName, this.OrderProductDataTable );
- }
- }
- catch ( Exception ex )
- {
- MessageBoxCustom.Show( ex.Message + ",原因:可能是“tb_ErpOrderProductList”商品唯一标识重复" );
- }
- #endregion
- #endregion
- }
- }
- #endregion
- /// <summary>
- /// 打开指定订单数据
- /// </summary>
- /// <param name="loadOrderNumber"></param>
- bool OpenLoadOrderData( string loadOrderNumber )
- {
- if ( !this.LoadOrderData( loadOrderNumber ) )
- {
- return false;
- }
- else
- {
- LoadOrderDataDetails();
- }
- return true;
- }
- /// <summary>
- /// 窗体加载时
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void FrmNewOrder_Load( object sender, EventArgs e )
- {
-
- //如果有传入订单号,为修改订单时,加载订单数据
- if ( !IsNewOrder )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindGroupStoreName(this.cmbtreevStoreName, IsShowAllText: false, bHideMainOpenForm: false);
-
- //this.cmbtreevStoreName.Enabled = false;
- if ( !this.OpenLoadOrderData( this.OrderNumber ) )
- {
- this.Close();
- return;
- }
- }
- else
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindGroupStoreName(this.cmbtreevStoreName, StrGroupKeyCode: "retailProcess", StrKeyCode: "CSA003", IsShowAllText: false, bHideMainOpenForm: false);
- BindShowControls();
- }
- }
- /// <summary>
- /// 绑定显示控件
- /// </summary>
- void BindShowControls()
- {
- this.Text = String.Format( "{0}", this.OrderType.ToString() );
- if ( this.OrderType == EnumPublic.OrderType.婚纱订单 )
- {
- uMainCusInfo.UCustomerAddMaximum = 2;
- }
- if ( this.OrderType == EnumPublic.OrderType.儿童订单 )
- {
- uMainCusInfo.IsChildCustomer = true;
- this.uMainCusInfo.SetShowRelation( true );
- }
- else
- {
- uMainCusInfo.IsChildCustomer = false;
- this.uMainCusInfo.SetShowRelation( false );
- }
- AddUCustomerInfo( uMainCusInfo );
- AddOrderControls( this.OrderType );
- this.btnPrint.Enabled = LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.StoresOPenSingle, LYFZ.CustomAttributes.OperatingAuthority.Print );
- this.lbStyle.Enabled = LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.StoresOPenSingle, LYFZ.CustomAttributes.OperatingAuthority.OrderLoveStyleSet );
- this.lkSetClientSource.Enabled = LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.StoresOPenSingle, LYFZ.CustomAttributes.OperatingAuthority.OrderClientSourceSet );
- this.lbSetOrderClass.Enabled = LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.StoresOPenSingle, LYFZ.CustomAttributes.OperatingAuthority.OrderClsssSet );
- this.lbSetTaoXiName.Enabled = LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.StoresOPenSingle, LYFZ.CustomAttributes.OperatingAuthority.OrderPackagesNameSet );
- //如果是新开订单 要隐藏订单详情页
- if ( IsNewOrder )
- {
- this.tbQiTaXiangQing.Parent = null;
- if ( LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.OrderAutoOpenMemberCard )
- {
- this.chkTransactmemberCard.Show();
- this.chkTransactmemberCard.Checked = true;
- }
- else
- {
- this.chkTransactmemberCard.Show();
- this.chkTransactmemberCard.Checked = false;
- }
- this.lkYiXiangClient.Show();
- this.SetDingDanQianZhuiShow( GetOrderCustomPrefix( this.OrderType ), true );
- }
- else
- {
- //保存为意向订单
- this.btnSaveIntent.Enabled = LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.StoresOPenSingle, LYFZ.CustomAttributes.OperatingAuthority.ModifyOrder );
- this.chkTransactmemberCard.Hide();
- this.lkYiXiangClient.Hide();
- this.SetDingDanQianZhuiShow( GetOrderCustomPrefix( this.OrderType ), false );
- }
- SystemSpecterTypeSet();
- SetOrderTypeShow( this.OrderType );
- SetCustomOrderNumber();
- }
- /// <summary>
- /// 当前锁定订单时的客户端ID
- /// </summary>
- string LockOrderClientMarkID = "";
- /// <summary>
- /// 锁定订单
- /// </summary>
- void LockOrderUpdate()
- {
- if (!IsSelectPhoto)
- {
- if (this.currentOrderModel.ID > 0)
- {
- if (orderBll.LockOrderUpdate(this.currentOrderModel.ID))
- {
- this.LockOrderClientMarkID = HPSocketCS.Extended.CommonLibrary.ClientMarkID;
- }
- }
- }
- }
- /// <summary>
- /// 窗体首次显示时
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void FrmNewOrder_Shown( object sender, EventArgs e )
- {
- if (LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.SoftwareInfo.SalesType == (int)EnumPermissions.SalesType.铂金版)
- {
- if(LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.OpenOrderChangeShop)
- {
- cmbtreevStoreName.Visible = true;
- labelEx9.Visible = true;
- }
- else
- {
- cmbtreevStoreName.Visible = false;
- labelEx9.Visible = false;
- }
- }
- else
- {
- cmbtreevStoreName.Visible = false;
- labelEx9.Visible = false;
- }
- this.Activate();
- List<LYFZ.Model.Model_ErpStyle> tbStyleList = new List<Model.Model_ErpStyle>();
- // 当前订单是否被锁定
- bool isLockOrder = false;
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod( delegate ( object obj, BackgroundWorker backgroundWorker )
- {
- backgroundWorker.ReportProgress( 0, "正在初始化..." );
- LYFZ.BLL.WageStatisticsProcess.LoadAllSystemCategory();
- tbStyleList = styleBll.GetModelList( "1=1" );
- LYFZ.BLL.BLL_ErpPackages.LoadAllPackagesName();
- if (!IsSelectPhoto)
- {
- if (this.currentOrderModel.ID > 0 && LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.EnableOrderLockFeature)
- {
- isLockOrder = orderBll.CheckOrderLock(this.currentOrderModel.ID);
- }
- }
- } );
- if ( LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.EnableOrderLockFeature )
- {
- if ( isLockOrder )
- {
- this.btnSave.Enabled = false;
- if ( MessageBoxCustom.Show( String.Format( "当前订单已被其他人员锁定,你不能修改此订单。\r\n当有人正在修改订单或选片时,订单会被锁定。\r\n如果要强制解锁请选“是”进行解锁订单" ), msgBoxButton: MessageBoxButtons.YesNo ) == DialogResult.Yes )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.SuperSmallForm.AuthorizeLoginSuperSmallForm frm = new MainBusiness.DoorCityProcess.SuperSmallForm.AuthorizeLoginSuperSmallForm( null, CustomAttributes.OperatingAuthority.ErrorPrivilegeValue, 2 );
- frm.StrWindowText = "解锁订单授权";
- if ( frm.ShowDialog() == System.Windows.Forms.DialogResult.OK )
- {
- // if (!LYFZ.BLL.BLL_ErpUser.CheckAdministrator(frm.User_BelongRoles))
- if ( !LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.OtherPermissionsSet, LYFZ.CustomAttributes.OperatingAuthority.UnlockOrderLock ) )
- {
- string msg = "授权失败,没有权限强制解锁订单";
- frm.SetAuthorizationResult( msg );
- MessageBoxCustom.Show( msg );
- }
- else
- {
- this.btnSave.Enabled = true;
- LockOrderUpdate();
- frm.SetAuthorizationResult();
- }
- }
- }
- }
- else
- {
- LockOrderUpdate();
- }
- }
- //绑定喜爱风格
- BindStyleList( tbStyleList );
- //绑定客户来源
- BindClientSource();
- //绑定订单类别
- BindOrderClass();
- //绑定套系名称
- BindTaoXiMing();
- //绑定礼包
- BindLiBao();
- //绑定订单数据
- BindOrderData();
- RefreshNumericUpDownEx();
- }
- #region 初始化控件操作
- /// <summary>
- /// 根据开单类型 添景点(阶段)、商品和服务控件
- /// </summary>
- /// <param name="_oType"></param>
- void AddOrderControls( LYFZ.EnumPublic.OrderType _oType )
- {
- this.flPanelDingDanZhiLiao.Height = 1115;
- switch ( _oType )
- {
- case EnumPublic.OrderType.婚纱订单:
- AddOrderSightsControls();
- break;
- case EnumPublic.OrderType.儿童订单:
- AddOrderStagesControls();
- break;
- case EnumPublic.OrderType.写真订单:
- AddOrderSightsControls();
- break;
- case EnumPublic.OrderType.婚庆订单:
- this.flPanelDingDanZhiLiao.Height = 850;
- break;
- case EnumPublic.OrderType.服务订单:
- this.flPanelDingDanZhiLiao.Height = 850;
- break;
- }
- AddOrderProductControls();
- AddOrderServiceControls();
- }
- /// <summary>
- /// 添加拍摄阶段
- /// </summary>
- void AddOrderStagesControls()
- {
- this.orderStagesControl.Width = 890;
- if ( this.orderStagesControl.Parent == null )
- {
- this.flPanelDingDanZhiLiao.Controls.Add( this.orderStagesControl );
- this.orderStagesControl.OrderProductEx = this.orderProductControl;
- this.orderStagesControl.OrderServiceEx = this.orderServiceControl;
- }
- if ( this.orderSightsControl.Parent != null )
- {
- this.flPanelDingDanZhiLiao.Controls.Remove( this.orderSightsControl );
- }
- this.orderProductControl.SendToBack();
- this.orderServiceControl.SendToBack();
- this.orderProductControl.Refresh();
- this.orderServiceControl.Refresh();
- this.flPanelDingDanZhiLiao.Refresh();
- }
- /// <summary>
- /// 添加订单景点
- /// </summary>
- void AddOrderSightsControls()
- {
- this.orderSightsControl.Width = 890;
- if ( this.orderSightsControl.Parent == null )
- {
- this.flPanelDingDanZhiLiao.Controls.Add( this.orderSightsControl );
- }
- if ( this.orderStagesControl.Parent != null )
- {
- this.flPanelDingDanZhiLiao.Controls.Remove( this.orderStagesControl );
- }
- this.orderProductControl.SendToBack();
- this.orderServiceControl.SendToBack();
- this.orderProductControl.Refresh();
- this.orderServiceControl.Refresh();
- this.flPanelDingDanZhiLiao.Refresh();
- }
- /// <summary>
- ///添加订单商品
- /// </summary>
- void AddOrderProductControls()
- {
- this.orderProductControl.Width = 890;
- this.orderProductControl.OrdType = this.OrderType;
- if ( this.orderProductControl.Parent == null )
- {
- this.flPanelDingDanZhiLiao.Controls.Add( this.orderProductControl );
- }
- }
- /// <summary>
- /// 添加订单服务
- /// </summary>
- void AddOrderServiceControls()
- {
- this.orderServiceControl.Width = 890;
- this.orderServiceControl.OrdType = this.OrderType;
- if ( this.orderServiceControl.Parent == null )
- {
- this.flPanelDingDanZhiLiao.Controls.Add( orderServiceControl );
- }
- }
- /// <summary>
- /// 添加客户控件
- /// </summary>
- /// <param name="ucusInfo"></param>
- void AddUCustomerInfo( UCustomerInfo ucusInfo )
- {
- ucusInfo.AddClientToParentControls( this.flKeFuZhiNiaoBlock );
- UCustomerInfo.RefreshParentHeight( this.flKeFuZhiNiaoBlock );
- }
- #endregion;
- /// <summary>
- /// 刷新NumericUpDownEx显示
- /// </summary>
- void RefreshNumericUpDownEx()
- {
- this.numTaoXiJiaGe.Refresh();
- this.numIntoBottom.Refresh();
- this.numIntoRegister.Refresh();
- this.numLiBaoJiaGe.Refresh();
- this.numIntoBottomPackage.Refresh();
- this.numIntoRegisterPackage.Refresh();
- }
- /// <summary>
- /// 绑定礼包
- /// </summary>
- void BindLiBao()
- {
- FinancialManagement.frmEditStatisticsProgram.BindTreeView_SystemCategory( BLL.BLL_ErpSystemCategory.GetSysTemCategoryCode( BLL.SysTemCategoryCodeType.订单礼包 ).ToUpper(), this.cmbtreevPackageName.TreeView, isExpandAll: false, IsFirstNodeNull: true, codeType: BLL.SysTemCategoryCodeType.订单礼包 );
- FinancialManagement.frmEditStatisticsProgram.RemoveInvalidTaoXi( this.cmbtreevPackageName.TreeView );
- }
- /// <summary>
- /// 绑定套系名称
- /// </summary>
- void BindTaoXiMing()
- {
- FinancialManagement.frmEditStatisticsProgram.BindTreeView_SystemCategory( BLL.BLL_ErpSystemCategory.GetSysTemCategoryCode( BLL.SysTemCategoryCodeType.套系名称 ).ToUpper(), this.cmbtreevTaoXiName.TreeView, isExpandAll: false, codeType: BLL.SysTemCategoryCodeType.套系名称 );
- FinancialManagement.frmEditStatisticsProgram.RemoveInvalidTaoXi( this.cmbtreevTaoXiName.TreeView );
- }
- /// <summary>
- /// 绑定订单类别
- /// </summary>
- void BindOrderClass()
- {
- FinancialManagement.frmEditStatisticsProgram.BindTreeView_SystemCategory( BLL.BLL_ErpSystemCategory.GetSysTemCategoryCode( BLL.SysTemCategoryCodeType.订单类别 ).ToUpper(), this.cmbtreevOrderClass.TreeView, isExpandAll: false );
- }
- /// <summary>
- /// 绑定客户来源
- /// </summary>
- void BindClientSource()
- {
- FinancialManagement.frmEditStatisticsProgram.BindTreeView_SystemCategory( BLL.BLL_ErpSystemCategory.GetSysTemCategoryCode( BLL.SysTemCategoryCodeType.客户来源 ).ToUpper(), this.cmbtreevClientSource.TreeView, isExpandAll: false, ExclusionsList: "BFACBABGBGBJGDHIE,BFAFBCBADBDCABFDD,AAAAABT" );
- }
- /// <summary>
- /// 设置是否显示自定义单号
- /// </summary>
- void SetCustomOrderNumber()
- {
- if ( LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.IsCustomOrderNumber )
- {
- this.plZhiDingYiDianHao.Show();
- }
- else
- {
- this.plZhiDingYiDianHao.Hide();
- }
- }
- /// <summary>
- /// 根据销售版本类型设置显示隐藏相关控件
- /// </summary>
- void SystemSpecterTypeSet()
- {
- ///保存意向订单的版本权限
- List<Control> hideControl = new List<Control>();
- //LYFZSS.SystemSpecterPossessed.ISystemSpecterPossessed.GetMySystemSpecter = LYFZSS.SystemSpecterType.SST_D;
- hideControl.Add( this.btnSaveIntent );
- LYFZ.Software.MainBusiness.VersionControl.StaticVersion.BindVersionShowHideControl(
- VersionControl.VersionFunctionEnum.开单保存意向订单, hideControl, null, null );
- ///自动开会员版本权
- hideControl = new List<Control>();
- hideControl.Add( this.chkTransactmemberCard );
- LYFZ.Software.MainBusiness.VersionControl.StaticVersion.BindVersionShowHideControl(
- VersionControl.VersionFunctionEnum.开单自动开会员, hideControl, null, null );
- if ( LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetBusinessType() == EnumPermissions.BusinessType.婚纱版 )
- {
- this.rdoHospitalClient.Hide();
- }
- else
- {
- if ( this.OrderType == EnumPublic.OrderType.婚纱订单 )
- {
- this.rdoHospitalClient.Hide();
- }
- else
- {
- this.rdoHospitalClient.Show();
- }
- }
- }
- /// <summary>
- /// 控制是否显示套系礼包功能
- /// </summary>
- void ShowLiBaoMain()
- {
- if ( LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.GiftsPacksSetsofLines )
- {
- this.plLiBaoMain.Show();
- }
- else
- {
- this.plLiBaoMain.Hide();
- }
- }
- /// <summary>
- /// 根据订单类型设置对应订单控件
- /// </summary>
- /// <param name="_oType"></param>
- void SetOrderTypeShow( LYFZ.EnumPublic.OrderType _oType )
- {
- switch ( _oType )
- {
- case EnumPublic.OrderType.婚纱订单:
- this.plHunQi.Show();
- this.plBaoBei.Hide();
- this.plStyleMain.Show();
- this.plTaoXiMingCheng.Show();
- this.plDingDanXiangPian.Show();
- this.plJiuDianXingXi.Hide();
- this.plLiBaoRuDiRuChe.Show();
- this.ShowLiBaoMain();
- break;
- case EnumPublic.OrderType.儿童订单:
- this.plHunQi.Hide();
- this.plBaoBei.Show();
- this.plStyleMain.Show();
- this.plTaoXiMingCheng.Show();
- this.plDingDanXiangPian.Hide();
- this.plJiuDianXingXi.Hide();
- this.plLiBaoRuDiRuChe.Hide();
- this.ShowLiBaoMain();
- break;
- case EnumPublic.OrderType.写真订单:
- this.plHunQi.Hide();
- this.plBaoBei.Hide();
- this.plStyleMain.Show();
- this.plTaoXiMingCheng.Show();
- this.plDingDanXiangPian.Show();
- this.plJiuDianXingXi.Hide();
- this.plLiBaoRuDiRuChe.Show();
- this.ShowLiBaoMain();
- break;
- case EnumPublic.OrderType.婚庆订单:
- this.plHunQi.Show();
- this.plBaoBei.Hide();
- this.plStyleMain.Hide();
- this.plTaoXiMingCheng.Show();
- this.plDingDanXiangPian.Hide();
- this.plJiuDianXingXi.Show();
- this.plLiBaoMain.Hide();
- break;
- case EnumPublic.OrderType.服务订单:
- this.plHunQi.Show();
- this.plBaoBei.Hide();
- this.plStyleMain.Hide();
- this.plTaoXiMingCheng.Hide();
- this.plDingDanXiangPian.Hide();
- this.plJiuDianXingXi.Hide();
- this.plLiBaoMain.Hide();
- break;
- }
- }
- /// <summary>
- /// 订单保存类型 0 意向订单保存,1为正常交易订单开单
- /// </summary>
- public enum OrderSaveType
- {
- 意向订单 = 0,
- 交易订单 = 1,
- }
- /// <summary>
- /// 流程类型
- /// </summary>
- public enum FlowchrtType
- {
- 初修 = 0,
- 选片 = 1,
- 精修 = 2,
- 设计 = 3,
- 看版 = 4,
- 取件 = 5,
- 服务 = 6
- }
- }
- }
|