shebeiyunxing.vue 338 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387
  1. <template>
  2. <div>
  3. <!-- 按钮区域 -->
  4. <header>
  5. <el-button type="primary" class="bt" @click="onBZ">班组维护</el-button>
  6. <el-button type="primary" class="bt" @click="onzhicheng" >制程检验</el-button>
  7. <el-button type="primary" class="bt" @click="onxuncha">管理巡查</el-button>
  8. <el-button type="primary" class="bt" @click="ondianjian">设备点检</el-button>
  9. <el-button type="primary" class="bt" @click="onyinban">印版领退</el-button>
  10. <!-- <el-button type="primary" @click="onstatus" >设置机台状态</el-button> -->
  11. <el-button type="primary" class="bt" @click="oncomplaints" >客诉记录</el-button>
  12. <el-button type="primary" class="bt" @click="onClear" >换型清场</el-button>
  13. <el-button type="primary" class="bt" @click="pd_gdprintonClick" >工单打印</el-button>
  14. <el-button type="primary" class="bt" @click="gzSel" >员工工资查询</el-button>
  15. <el-button type="primary" class="bt" @click="hesuan" v-if="AddType === true">核算参数调整</el-button>
  16. <el-button type="primary" icon="edit" @click="onxzhscsclick" class="bt" title="修正核算参数">修正核算参数</el-button>
  17. <el-button type="primary" icon="edit" @click="gd_gxclhconClick" class="bt" title="工序产量核查">工序产量核查</el-button>
  18. <el-button type="primary" class="bt" @click="onADD" v-if="AddType === true">新增</el-button>
  19. <el-button type="primary" class="bt" @click="onDel" v-if="DelType === true" >删除</el-button>
  20. <el-button type="primary" icon="edit" @click="deldbcl_onclick" :disabled="dbclSelection === ''" class="bt" title="当班产量明细" >当班产量明细删除</el-button>
  21. <el-button type="primary" class="bt" @click="onRCL">日产量批量维护</el-button>
  22. <el-button type="primary" class="bt" @click="pd_lcdlistonClick" >流程单查询</el-button>
  23. <el-button type="primary" class="bt" @click="scpconClick" >工单生产批次信息查询</el-button>
  24. <el-button type="primary" icon="Download" class="bt" @click="llexporttoExcel" >拉料导出Excel</el-button>
  25. <el-button @click="selectSameWorkOrder" type="success">全选同工单</el-button>
  26. <el-button @click="invertSelection" type="info">反选</el-button>
  27. <!-- <el-button type="primary" @click="onClear2" >换型清场</el-button> -->
  28. </header>
  29. <!-- 左侧树状图区域 -->
  30. <el-container>
  31. <layout-sider :resize-directions="['right']" :width="220" style="margin-right: 10px;" >
  32. <div class="JKWTree-tree" style="height: 70vh;" >
  33. <h3>设备运行跟踪</h3>
  34. <el-tree :data="treeData" class="treecolor" highlight-current @node-click="handleNodeClick" />
  35. </div>
  36. </layout-sider>
  37. <el-container>
  38. <el-main>
  39. <div class="button-container" v-if="showbutton" style="height: 50%;width: 100%; flex: 1; border: 0px magenta solid; margin: 0; padding: 0;">
  40. <button v-for="(item, index) in machineData" :key="index" class="custom-button" @click="handleButtonClick(item.设备编号)">
  41. <img :src="`/src/assets/${item.状态}.png`" :alt="altText" style="max-width: 100%; height: auto;"/>
  42. <span style="margin-top: 8px;">{{ item.设备编号 + ' - ' + item.设备名称 }}</span>
  43. </button>
  44. </div>
  45. <div class="gva-search-box" v-if="JTMCOn" style="overflow: hidden; padding: 0; display: flex;">
  46. <div style="flex: 1; border: 0px magenta solid; margin: 0; padding: 0;">
  47. <el-row :gutter="20">
  48. <el-col :span="24">
  49. <el-form-item label="工单编号" prop="name">
  50. <el-row :gutter="20">
  51. <el-col :span="6"><el-input v-model="formData.工单编号" disabled :clearable="true"/></el-col>
  52. <el-col :span="18"><el-input v-model="formData.产品名称" disabled :clearable="true"/></el-col>
  53. </el-row>
  54. </el-form-item>
  55. </el-col>
  56. </el-row>
  57. <el-row :gutter="20">
  58. <el-col :span="6">
  59. <el-form-item label="印件编号" prop="id"><el-input v-model="formData.印件编号" disabled :clearable="true" /></el-form-item>
  60. </el-col>
  61. <el-col :span="17">
  62. <el-form-item label="工序名称" prop="name"><el-input v-model="formData.工序名称" disabled :clearable="true" /></el-form-item>
  63. </el-col>
  64. </el-row>
  65. <el-row :gutter="20">
  66. <el-col :span="4"><el-form-item label="班组成员" prop="id"></el-form-item></el-col>
  67. </el-row>
  68. <el-row :gutter="1">
  69. <el-col :span="4"><el-input v-model="formData.sczl_bh1" disabled :clearable="true"/></el-col>
  70. <el-col :span="4"><el-input v-model="formData.sczl_bh2" disabled :clearable="true"/></el-col>
  71. <el-col :span="4"><el-input v-model="formData.sczl_bh3" disabled :clearable="true"/></el-col>
  72. <el-col :span="4"><el-input v-model="formData.sczl_bh4" disabled :clearable="true"/></el-col>
  73. <el-col :span="4"><el-input v-model="formData.sczl_bh5" disabled :clearable="true"/></el-col>
  74. <el-col :span="4"><el-input v-model="formData.sczl_bh6" disabled :clearable="true"/></el-col>
  75. </el-row>
  76. <el-row :gutter="1">
  77. <el-col :span="4"><el-input v-model="formData.sczl_name1" disabled :clearable="true" /></el-col>
  78. <el-col :span="4"><el-input v-model="formData.sczl_name2" disabled :clearable="true" /></el-col>
  79. <el-col :span="4"><el-input v-model="formData.sczl_name3" disabled :clearable="true" /></el-col>
  80. <el-col :span="4"><el-input v-model="formData.sczl_name4" disabled :clearable="true" /></el-col>
  81. <el-col :span="4"><el-input v-model="formData.sczl_name5" disabled :clearable="true" /></el-col>
  82. <el-col :span="4"><el-input v-model="formData.sczl_name6" disabled :clearable="true" /></el-col>
  83. </el-row>
  84. </div>
  85. <div style="flex: 1; border: 0px lawngreen solid; margin: 0; padding: 0; overflow: hidden;">
  86. <el-table tooltip-effect="dark" :data="selectData" row-key="ID" highlight-current-row="true"
  87. :row-style="{ height: '20px' }" :header-cell-style="{ padding: '0px' }"
  88. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  89. border style="width:100%;height: 30vh;" @row-dblclick="handleSelectClick" >
  90. <el-table-column prop="process" label="印件及工序" width="340" />
  91. <el-table-column prop="completed" label="已完成板数" width="150" />
  92. </el-table>
  93. </div>
  94. </div>
  95. <div v-if="JTMCOn" class="gva-table-box" >
  96. <div class="gva-btn-list"></div>
  97. <el-tabs v-model="activName" type="card" @tab-click="duohandleClick">
  98. <el-tab-pane label="设备作业清单" @click="showTable('印件资料')" name="first" :class="{ 'active-tab': activeTab === 'first' }" >
  99. <el-table ref="QDmultipleTable"
  100. :show-overflow-tooltip="true"
  101. highlight-current-row="true"
  102. :cell-class-name="sbzyqdsatusCellClass"
  103. :row-style="{ height: '20px' }"
  104. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  105. :header-cell-style="{ padding: '0px' }"
  106. @row-click="yjupdateCompanyFunc"
  107. style="width: 100%;height: 330px" border tooltip-effect="dark" :data="sbzyData" row-key="ID" @selection-change="handleSelectionChange">
  108. <!-- <el-table-column type="selection" width="55" />-->
  109. <!-- <el-table-column align="left" label="选择" prop="bh" width="80"/> -->
  110. <el-table-column align="left" sortable label="工单编号|质量信息" prop="工单编号|质量信息" width="170" />
  111. <el-table-column align="left" label="印件资料" prop="印件资料" width="220" />
  112. <el-table-column align="left" sortable label="工序名称" prop="工序名称" width="110" />
  113. <el-table-column align="left" label="计划产量/已完成" prop="计划产量/已完成" width="130"/>
  114. <el-table-column align="left" label="装版时数" prop="装版时数" width="85"/>
  115. <el-table-column align="left" label="工序产能" prop="工序产能" width="85"/>
  116. <el-table-column align="left" label="计划工时" prop="计划工时" width="85"/>
  117. <el-table-column align="left" sortable label="计划生产时段" prop="计划生产时段" width="210" />
  118. <el-table-column align="left" label="排产备注" prop="排产备注" width="85" />
  119. <el-table-column align="left" sortable label="产品名称" prop="产品名称" width="400" />
  120. </el-table>
  121. </el-tab-pane>
  122. <el-tab-pane label="班组人员及分配比例" @click="showTable('工艺资料')" name="second">
  123. <el-table ref="FPmultipleTable"
  124. highlight-current-row="true"
  125. :show-overflow-tooltip="true"
  126. :row-style="{ height: '20px' }"
  127. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  128. :header-cell-style="{ padding: '0px' }"
  129. @row-dblclick="gyupdateCompanyFunc"
  130. :row-class-name="rowClassStyle"
  131. style="width: 100%;height: 400px" border tooltip-effect="dark" :data="FPData" row-key="ID" @selection-change="handleSelectionChange"
  132. @row-click="clickybupdate">
  133. <!-- <el-table-column type="selection" width="55" />-->
  134. <!-- <el-table-column align="left" label="选择" prop="方案" width="70"/> -->
  135. <el-table-column align="left" sortable label="班组号" prop="班组号" width="95" />
  136. <el-table-column align="left" label="组员1" prop="0" width="180" />
  137. <el-table-column align="left" label="组员2" prop="1" width="180" />
  138. <el-table-column align="left" label="组员3" prop="2" width="180" />
  139. <el-table-column align="left" label="组员4" prop="3" width="180" />
  140. <el-table-column align="left" label="组员5" prop="4" width="180" />
  141. <el-table-column align="left" label="组员6" prop="5" width="180" />
  142. <el-table-column align="left" label="组员7" prop="6" width="180" />
  143. <el-table-column align="left" label="组员8" prop="7" width="180" />
  144. <el-table-column align="left" label="组员9" prop="8" width="180" />
  145. <el-table-column align="left" label="组员10" prop="9_正品版" width="180" />
  146. </el-table>
  147. </el-tab-pane>
  148. <el-tab-pane label="当班产量明细" @click="showTable('印版资料')" name="third">
  149. <el-table ref="DBmultipleTable" highlight-current-row="true"
  150. :show-overflow-tooltip="true" :row-style="{ height: '20px' }"
  151. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  152. :header-cell-style="{ padding: '0px' }" @row-dblclick="ybupdateCompanyFunc"
  153. style="width: 100%;height: 400px" border tooltip-effect="dark" :data="CLMXData" row-key="ID"
  154. @selection-change="dbclmxSelectionChange">
  155. <el-table-column type="selection" width="55" />
  156. <el-table-column fixed align="left" sortable label="生产时段" prop="生产时间段" width="180"/>
  157. <el-table-column fixed align="left" sortable label="工单编号" prop="工单编号" width="110" />
  158. <el-table-column fixed align="left" sortable label="产品名称" prop="产品名称" width="150" />
  159. <el-table-column fixed align="left" sortable label="印件及工序" prop="印件及工序" width="320"/>
  160. <el-table-column align="left" sortable label="标牌号" prop="标牌号" width="100"/>
  161. <el-table-column align="left" sortable label="产量" prop="产量" width="100"/>
  162. <el-table-column align="left" sortable label="制程废品" prop="制程废品" width="110" />
  163. <el-table-column align="left" sortable label="制程次品" prop="制程次品" width="110" />
  164. <el-table-column align="left" sortable label="前工序废" prop="前工序废" width="110" />
  165. <el-table-column align="left" sortable label="来料异常" prop="来料异常" width="110"/>
  166. <el-table-column align="left" sortable label="装版工时" prop="装版工时" width="110" />
  167. <el-table-column align="left" sortable label="保养工时" prop="保养工时" width="110" />
  168. <el-table-column align="left" sortable label="打样工时" prop="打样工时" width="110"/>
  169. <el-table-column align="left" sortable label="异常停机工时" prop="异常停机工时" width="135"/>
  170. <el-table-column align="left" sortable label="通电工时" prop="通电工时" width="110"/>
  171. <el-table-column align="left" sortable label="码开始行" prop="码开始行" width="110" />
  172. <el-table-column align="left" sortable label="码结束行" prop="码结束行" width="110" />
  173. <el-table-column align="left" sortable label="码包" prop="码包" width="100" />
  174. <el-table-column align="left" sortable label="主电表" prop="主电表" width="100"/>
  175. <el-table-column align="left" sortable label="辅电表" prop="辅电表" width="100" />
  176. <el-table-column align="left" sortable label="色度数" prop="色度数" width="100" />
  177. </el-table>
  178. </el-tab-pane>
  179. <el-tab-pane label="检验记录" @click="showTable('技术资料附件')" name="fourth">
  180. <el-table ref="JYmultipleTable"
  181. :row-style="{ height: '20px' }"
  182. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  183. :header-cell-style="{ padding: '0px' }"
  184. :show-overflow-tooltip="true"
  185. highlight-current-row="true"
  186. style="width: 100%;height: 400px" border tooltip-effect="dark" :data="JYData" row-key="ID" @selection-change="handleSelectionChange">
  187. <!-- <el-table-column type="selection" width="55" />-->
  188. <el-table-column align="left" sortable label="工单编号" prop="工单编号" width="105"/>
  189. <el-table-column align="left" label="印件号" prop="印件号" width="70" />
  190. <el-table-column align="left" sortable label="工序名称" prop="工序名称" width="130" />
  191. <el-table-column align="left" label="检验项目" prop="检验项目" width="160"/>
  192. <el-table-column v-for="time in columnNames" :key="time" :label="time" :prop="time" align="center" width="80" ></el-table-column>
  193. </el-table>
  194. </el-tab-pane>
  195. <el-tab-pane label="印版管理" @click="showTable('印版管理')" name="fifth">
  196. <el-table ref="multipleTable"
  197. highlight-current-row="true"
  198. :show-overflow-tooltip="true"
  199. :row-style="{ height: '20px' }"
  200. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  201. :header-cell-style="{ padding: '0px' }"
  202. @row-dblclick="ybupdateCompanyFunc"
  203. @row-click="ybClick"
  204. style="width: 100%;height: 40vh" border tooltip-effect="dark" :data="ybtableData" row-key="ID" @selection-change="handleSelectionChange"
  205. >
  206. <el-table-column type="selection" width="30" />
  207. <el-table-column align="left" sortable label="方案" prop="YB_方案" width="100"/>
  208. <el-table-column align="left" sortable label="印件号" prop="YB_Yjno" width="100" />
  209. <el-table-column align="left" sortable label="印版类别" prop="印版类别" width="110" />
  210. <el-table-column align="left" sortable label="存货编码" prop="存货编码" width="110"/>
  211. <el-table-column align="left" sortable label="供方批号" prop="供方批号" width="110"/>
  212. <el-table-column align="left" sortable label="印版名称" prop="印版名称" width="440"/>
  213. <el-table-column align="left" sortable label="考核印数" prop="考核印数" width="110"/>
  214. <el-table-column align="left" sortable label="领用机台" prop="领用机台" width="110"/>
  215. <el-table-column align="left" sortable label="印数" prop="印数" width="110"/>
  216. <el-table-column align="left" sortable label="建档用户" prop="Sys_id" width="120" />
  217. <el-table-column align="left" sortable label="建档日期" prop="建档日期" width="160" />
  218. <el-table-column align="left" sortable label="更新日期" prop="更新日期" width="160" />
  219. <el-table-column fixed="right" label="操作" width="80">
  220. <template #default="{ row, $index }">
  221. <el-button @click="record_outRow(row,$index)" type="success" size="small"
  222. style="font-size: 16px;padding: 0px;width: 60px;">
  223. 领用
  224. </el-button>
  225. </template>
  226. </el-table-column>
  227. </el-table>
  228. </el-tab-pane>
  229. </el-tabs>
  230. </div>
  231. <el-dialog v-model="detailShow" fullscreen style="font-size: 50px;font-weight: bold;" lock-scroll :before-close="closeDetailShow" title="机台班组维护" destroy-on-close>
  232. <div>
  233. <el-table ref="JTWHmultipleTable"
  234. :row-style="{ height: '20px' }"
  235. :cell-style="{ padding: '0px' ,color:'blue'}" :header-row-style="{ height: '20px' }"
  236. :header-cell-style="{ padding: '0px' }"
  237. :show-overflow-tooltip="true"
  238. highlight-current-row="true" @row-click="BZhandle"
  239. style="width: 100%;height: 250px;margin-top: 0px;" border tooltip-effect="dark"
  240. :data="bzData" row-key="ID" @selection-change="BZSelectionChange">
  241. <!-- <el-table-column type="selection" width="55" /> -->
  242. <el-table-column align="left" label="机台" prop="JTMC" width="100"/>
  243. <el-table-column align="left" label="班组" prop="班组号" width="60"/>
  244. <el-table-column align="left" label="组员1" prop="0" width="195"/>
  245. <el-table-column align="left" label="组员2" prop="1" width="195"/>
  246. <el-table-column align="left" label="组员3" prop="2" width="195"/>
  247. <el-table-column align="left" label="组员4" prop="3" width="195"/>
  248. <el-table-column align="left" label="组员5" prop="4" width="195"/>
  249. <el-table-column align="left" label="组员6" prop="5" width="100"/>
  250. <el-table-column align="left" label="组员7" prop="6" width="100"/>
  251. <el-table-column align="left" label="组员8" prop="7" width="100"/>
  252. <el-table-column align="left" label="组员9" prop="8" width="100"/>
  253. <el-table-column align="left" label="特殊组员" prop="9" width="100"/>
  254. <el-table-column align="left" label="UNIQID" prop="ID" width="100"/>
  255. </el-table>
  256. </div>
  257. <div style="margin-top:100px;">
  258. <el-row :gutter="20">
  259. <el-col :span="10">
  260. <el-form-item label="机台编号" prop="id">
  261. <el-select v-model="selectedOption" placeholder="请选择">
  262. <el-option v-for="item in dropdownOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
  263. </el-select>
  264. </el-form-item>
  265. </el-col>
  266. <el-col :span="10">
  267. <el-form-item label="班组编号" prop="id">
  268. <el-select v-model="BZMC" placeholder="" >
  269. <el-option label="A 班" value="A 班"></el-option>
  270. <el-option label="B 班" value="B 班"></el-option>
  271. </el-select>
  272. </el-form-item>
  273. </el-col>
  274. </el-row>
  275. <div style="display: flex;">
  276. <div class="groupbox float-div" style="height: 17vh; width: 130vh;">
  277. <span class="grouptitle">组员及分配比例</span>
  278. <el-row :gutter="10" style="margin-top: 0px; height: 5vh;">
  279. <el-col :span="2"><span></span></el-col>
  280. <el-col :span="2"></el-col>
  281. <el-col :span="2"></el-col>
  282. <el-col :span="2"></el-col>
  283. <el-col :span="2"></el-col>
  284. <el-col :span="2"></el-col>
  285. <el-col :span="2"></el-col>
  286. <el-col :span="2"></el-col>
  287. <el-col :span="2"></el-col>
  288. <el-col :span="3"></el-col>
  289. <el-col :span="3"><el-form-item label="特殊组员" prop="id"></el-form-item></el-col>
  290. </el-row>
  291. <el-row :gutter="10" style="margin-top: 0px;">
  292. <el-col :span="3"><el-input v-model="formDatas.code1" @keyup.enter.native="getbzyg($event, '1')"/></el-col>
  293. <el-col :span="3"><el-input v-model="formDatas.code2" @keyup.enter.native="getbzyg($event, '2')" /></el-col>
  294. <el-col :span="3"><el-input v-model="formDatas.code3" @keyup.enter.native="getbzyg($event, '3')"/></el-col>
  295. <el-col :span="3"><el-input v-model="formDatas.code4" @keyup.enter.native="getbzyg($event, '4')"/></el-col>
  296. <el-col :span="3"><el-input v-model="formDatas.code5" @keyup.enter.native="getbzyg($event, '5')"/></el-col>
  297. <el-col :span="3"><el-input v-model="formDatas.code6" @keyup.enter.native="getbzyg($event, '6')"/></el-col>
  298. <el-col :span="3"><el-input v-model="formDatas.code7" @keyup.enter.native="getbzyg($event, '7')"/></el-col>
  299. <el-col :span="3"><el-input v-model="formDatas.code8" @keyup.enter.native="getbzyg($event, '8')"/></el-col>
  300. </el-row>
  301. <el-row :gutter="10" style="margin-top: 1px;">
  302. <el-col :span="3"><el-input v-model="formDatas.name1" style="color:#00FF00"/></el-col>
  303. <el-col :span="3"><el-input v-model="formDatas.name2"/></el-col>
  304. <el-col :span="3"><el-input v-model="formDatas.name3"/></el-col>
  305. <el-col :span="3"><el-input v-model="formDatas.name4"/></el-col>
  306. <el-col :span="3"><el-input v-model="formDatas.name5"/></el-col>
  307. <el-col :span="3"><el-input v-model="formDatas.name6"/></el-col>
  308. <el-col :span="3"><el-input v-model="formDatas.name7"/></el-col>
  309. <el-col :span="3"><el-input v-model="formDatas.name8"/></el-col>
  310. </el-row>
  311. <el-row :gutter="10" style="margin-top: 1px;">
  312. <el-col :span="3"><el-input @input="updateTotal" :readonly="!formDatas.name1" v-model="formDatas.percentage1"/></el-col>
  313. <el-col :span="3"><el-input @input="updateTotal" v-model="formDatas.percentage2"/></el-col>
  314. <el-col :span="3"><el-input @input="updateTotal" v-model="formDatas.percentage3"/></el-col>
  315. <el-col :span="3"><el-input @input="updateTotal" v-model="formDatas.percentage4"/></el-col>
  316. <el-col :span="3"><el-input @input="updateTotal" v-model="formDatas.percentage5"/></el-col>
  317. <el-col :span="3"><el-input @input="updateTotal" v-model="formDatas.percentage6"/></el-col>
  318. <el-col :span="3"><el-input @input="updateTotal" v-model="formDatas.percentage7"/></el-col>
  319. <el-col :span="3"><el-input @input="updateTotal" v-model="formDatas.percentage8"/></el-col>
  320. </el-row>
  321. </div>
  322. <div style="height: 50vh; width: 15vh;margin-top: 3vh;">
  323. <el-button type="text"></el-button>
  324. <el-button style="margin-bottom: 1vh; width:15vh;background-color:cornflowerblue;font-size: 2.0vh;font-weight: bold; color: white;" @click="addBz" >新 增</el-button>
  325. <el-button style="margin-bottom: 1vh; width:15vh;background-color:cornflowerblue;font-size: 2.0vh;font-weight: bold; color: white;" @click="selectBz" >更新当前班组</el-button>
  326. <el-button style="margin-bottom: 1vh; width:15vh;background-color:cornflowerblue;font-size: 2.0vh;font-weight: bold; color: white;" @click="delBz" >删除当前班组</el-button>
  327. </div>
  328. </div>
  329. </div>
  330. </el-dialog>
  331. <!-- 日产量批量维护 -->
  332. <el-dialog v-model="detailShow_rcl" fullscreen
  333. style="font-size: 50px;font-weight: bold;" lock-scroll :before-close="closeDetailShow_rcl" title="日产量批量维护" destroy-on-close>
  334. <div>
  335. <el-table ref="WHmultipleTable"
  336. :row-style="{ height: '20px' }"
  337. :cell-style="{ padding: '0px' ,color:'blue'}" :header-row-style="{ height: '20px' }"
  338. :header-cell-style="{ padding: '0px' }"
  339. :show-overflow-tooltip="true"
  340. highlight-current-row="true" @row-click="BZhandle_rcl"
  341. style="width: 100%;height: 250px;margin-top: 0px;" border tooltip-effect="dark"
  342. :data="bzData_rcl" row-key="ID" @selection-change="BZSelectionChange_rcl">
  343. <!-- <el-table-column type="selection" width="55" /> -->
  344. <el-table-column align="left" label="机台" prop="JTMC" width="70"/>
  345. <el-table-column align="left" label="班组" prop="班组号" width="60"/>
  346. <el-table-column align="left" label="组员1" prop="0" width="195"/>
  347. <el-table-column align="left" label="组员2" prop="1" width="195"/>
  348. <el-table-column align="left" label="组员3" prop="2" width="195"/>
  349. <el-table-column align="left" label="组员4" prop="3" width="195"/>
  350. <el-table-column align="left" label="组员5" prop="4" width="195"/>
  351. <el-table-column align="left" label="组员6" prop="5" width="100"/>
  352. <el-table-column align="left" label="组员7" prop="6" width="100"/>
  353. <el-table-column align="left" label="组员8" prop="7" width="100"/>
  354. <el-table-column align="left" label="组员9" prop="8" width="100"/>
  355. <el-table-column align="left" label="特殊组员" prop="9" width="100"/>
  356. <el-table-column align="left" label="UNIQID" prop="ID" width="100"/>
  357. </el-table>
  358. </div>
  359. <div style="margin-top:100px;">
  360. <el-row :gutter="20">
  361. <el-col :span="10">
  362. <el-form-item label="机台编号" prop="id">
  363. <el-input v-model="selectedOption_rcl" disabled/>
  364. </el-form-item>
  365. </el-col>
  366. <el-col :span="10">
  367. <el-form-item label="班组编号" prop="id">
  368. <el-input v-model="BZMC_rcl" disabled/>
  369. </el-form-item>
  370. </el-col>
  371. </el-row>
  372. <div style="display: flex;">
  373. <div class="groupbox float-div" style="height: 17vh; width: 130vh;">
  374. <span class="grouptitle">组员及分配比例</span>
  375. <el-row :gutter="10" style="margin-top: 0px; height: 5vh;">
  376. <el-col :span="2"><span></span></el-col>
  377. <el-col :span="2"></el-col>
  378. <el-col :span="2"></el-col>
  379. <el-col :span="2"></el-col>
  380. <el-col :span="2"></el-col>
  381. <el-col :span="2"></el-col>
  382. <el-col :span="2"></el-col>
  383. <el-col :span="2"></el-col>
  384. <el-col :span="2"></el-col>
  385. <el-col :span="3"></el-col>
  386. <el-col :span="3"><el-form-item label="特殊组员" prop="id"></el-form-item></el-col>
  387. </el-row>
  388. <el-row :gutter="10" style="margin-top: 0px;">
  389. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.code1" @keyup.enter.native="getbzyg($event, '1')"/></el-col>
  390. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.code2" @keyup.enter.native="getbzyg($event, '2')" /></el-col>
  391. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.code3" @keyup.enter.native="getbzyg($event, '3')"/></el-col>
  392. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.code4" @keyup.enter.native="getbzyg($event, '4')"/></el-col>
  393. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.code5" @keyup.enter.native="getbzyg($event, '5')"/></el-col>
  394. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.code6" @keyup.enter.native="getbzyg($event, '6')"/></el-col>
  395. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.code7" @keyup.enter.native="getbzyg($event, '7')"/></el-col>
  396. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.code8" @keyup.enter.native="getbzyg($event, '8')"/></el-col>
  397. </el-row>
  398. <el-row :gutter="10" style="margin-top: 1px;">
  399. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.name1" style="color:#00FF00"/></el-col>
  400. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.name2"/></el-col>
  401. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.name3"/></el-col>
  402. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.name4"/></el-col>
  403. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.name5"/></el-col>
  404. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.name6"/></el-col>
  405. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.name7"/></el-col>
  406. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.name8"/></el-col>
  407. </el-row>
  408. <el-row :gutter="10" style="margin-top: 1px;">
  409. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.percentage1"/></el-col>
  410. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.percentage2"/></el-col>
  411. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.percentage3"/></el-col>
  412. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.percentage4"/></el-col>
  413. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.percentage5"/></el-col>
  414. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.percentage6"/></el-col>
  415. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.percentage7"/></el-col>
  416. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.percentage8"/></el-col>
  417. </el-row>
  418. </div>
  419. <div style="height: 50vh; width: 15vh;margin-top: 3vh;">
  420. <el-button type="text"></el-button>
  421. <el-button style="margin-bottom: 1vh; width:15vh;background-color:cornflowerblue;font-size: 2.0vh;font-weight: bold; color: white;" @click="selectBz_rcl" >更新</el-button>
  422. </div>
  423. </div>
  424. </div>
  425. </el-dialog>
  426. <!--流程单查询【弹窗】-->
  427. <el-dialog v-model="pd_lcdlist" title="工单工序生产进程" style="width: 100%;height: 100%;margin: 0px;padding: 0px;">
  428. <div style="width: 100%;height: 100%;">
  429. <el-button type="" @click="pd_lcdCancel">退出</el-button>
  430. </div>
  431. <br>
  432. <div style="width: 100%; height: 100%; display: flex; align-items: center;">
  433. <el-form-item label="工单编号" style="margin-right: 20px; padding: 0;">
  434. <el-input v-model="pd_lcdformData['gdbh']" @keyup.enter="pd_lcdProductValue"/>
  435. </el-form-item>
  436. <el-form-item label="印件号" style="margin-right: 5px; padding: 0;">
  437. <el-input v-model="pd_lcdformData['yjno']" @keyup.enter="pd_lcdProductValue"/>
  438. </el-form-item>
  439. <el-form-item label="" style="margin-right: 5px; padding: 0;">
  440. <el-input v-model="pd_lcdformData['code']" disabled/>
  441. </el-form-item>
  442. <el-form-item label="" style="margin-right: 5px; padding: 0;">
  443. <el-input v-model="pd_lcdformData['name']" disabled style="width: 500px"/>
  444. </el-form-item>
  445. </div>
  446. <div style="width: 100%; height: 70vh; display: flex;">
  447. <layout>
  448. <layout-sider :resize-directions="['right']" :width="240" style="margin-right: 10px;height: 70vh;">
  449. <div class="JKWTree-tree">
  450. <el-tree :data="pd_lcd_treeData" @node-click="pd_lcd_handleNodeClick" default-expand-all></el-tree>
  451. </div>
  452. </layout-sider>
  453. <!-- <br> -->
  454. <layout-main>
  455. <div style="display: flex; align-items: center;margin-left: 25px;">
  456. <el-tag type="success" style="width: 55px; height: 40px; margin-right: 10px;"><h2>流程号</h2></el-tag>
  457. <h2 style="margin: 0 20px 0 0;">绿格子图标表示“已完成”</h2>
  458. <el-tag type="danger" style="width: 55px; height: 40px; margin-right: 10px;"><h2>流程号</h2></el-tag>
  459. <h2 style="margin: 0;">红格子图标表示“未完成”</h2>
  460. </div>
  461. <!-- 这里放右侧的内容 -->
  462. <el-space wrap style="margin-left: 20px;">
  463. <!-- 右侧内容 -->
  464. <template v-for="item in processList.total_process" >
  465. <el-button class="custom-buttons" disabled :type="! processList.process.includes(item) ? 'danger' : 'info'" plain style="width: 50px;">{{ item }}</el-button>
  466. </template>
  467. </el-space>
  468. </layout-main>
  469. </layout>
  470. </div>
  471. </el-dialog>
  472. <!--工单生产批次信息查询【弹窗】-->
  473. <el-dialog v-model="scpconlist" title="工单生产批次信息查询" style="width: 100%;height: 100%;margin: 0px;padding: 0px;">
  474. <el-button type="primary" @click="ontuicclicks" style="color: white;margin-left: 20px;" class="bt" title="退出">退出</el-button>
  475. <div
  476. style="
  477. width: 60%;
  478. height: 470px;
  479. position: fixed;
  480. left: 25%;
  481. padding: 20px;
  482. border-radius: 8px;
  483. background-color: #fff;
  484. box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);">
  485. <div style="margin-top: 10px;">
  486. <!-- 提示信息 -->
  487. <hr>
  488. <p style="font-size: 14px; color: red; margin: 10px 0;">搜索栏目为空,则从最近2周完工的工单中选择</p>
  489. <p style="font-size: 14px; color: red; margin: 10px 0;">否则,以栏目值为关键字,从工单编号、产品名称、客户名称中选择</p>
  490. <hr>
  491. <!-- 输入框和按钮 -->
  492. <div style="display: flex; align-items: center; margin-top: 10px;">
  493. <el-input v-model="searchInfolcd" placeholder="Enter回车搜索工单编号" @keydown="Enterkeysearch" id="searchInfo" style="height: 40px;flex: 1;"></el-input>
  494. <el-button type="primary" title="搜索" icon="el-icon-search" style="width: 70px;height: 40px;font-size: 18px;" @click="onSubmitlcd" >搜索</el-button>
  495. <el-button type="primary" title="查看" icon="el-icon-search" style="width: 110px;height: 40px;font-size: 18px;" @click="onstatsuclick" >查看流程单</el-button>
  496. </div>
  497. <!-- 表格展示区域 -->
  498. <div class="gva-table-box" style="margin-top: 15px;">
  499. <el-table
  500. ref="PCmultipleTable"
  501. style="width: 100%; height: 30vh; verflow: auto;"
  502. :row-style="{ height: '20px' }" :header-cell-style="{ padding: '0px' }"
  503. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  504. :data="tableDatalcd"
  505. :border="true"
  506. :tooltip-effect="'dark'"
  507. row-key="ID"
  508. highlight-current-row
  509. @row-click="tableRowClicklcd"
  510. @row-dblclick="updateCompanyFunclcd"
  511. @selection-change="handleSelectionChange">
  512. <el-table-column align="left" label="工单编号" width="115" prop="Gd_gdbh" />
  513. <el-table-column align="left" label="行号" width="60" prop="行号" />
  514. <el-table-column align="left" label="工序名称" prop="Gd_cpmc" />
  515. <!-- <el-table-column prop="工单" label="工单编号-行号-工序名称" align="left" sortable show-overflow-tooltipmin-width="300"/> -->
  516. </el-table>
  517. </div>
  518. </div>
  519. </div>
  520. <!-- 机台生产日报表维护弹窗 -->
  521. <el-dialog v-model="popdialog" title="机台生产日报表维护" destroy-on-close width="90%" style="height: 92%; margin-left: 5%; margin-top: 1%;">
  522. <div>
  523. <!-- 顶层布局 -->
  524. <layout>
  525. <!-- 顶部的搜索区域 -->
  526. <layout-header>
  527. <el-form ref="elSearchFormRef" class="demo-form-inline" :rules="searchRule">
  528. <!-- 添加按钮 -->
  529. <el-button type="primary" icon="edit" style="color: white;margin-left: 20px;" @click="ontuicclick" class="bt" title="退出">退出</el-button>
  530. </el-form>
  531. </layout-header>
  532. <!-- 左右布局 -->
  533. <layout style="height: calc(100% - 50px); display: flex;">
  534. <!-- 左侧树形区域 -->
  535. <layout-sider style="width: 140px; margin-right: 10px; overflow: hidden;height: 584px;">
  536. <div class="JKWTree-tree" style="height: 100%; max-height: 100vh; overflow-y: auto;">
  537. <h3></h3>
  538. <el-tree
  539. :data="treeDatalcd"
  540. node-key="num"
  541. highlight-current
  542. :props="defaultProps"
  543. @node-click="handleNodeClicklcd"
  544. />
  545. </div>
  546. </layout-sider>
  547. <!-- 右侧表格区域 -->
  548. <layout-content style="flex: 1; overflow: auto;">
  549. <el-main>
  550. <div style="width: 100%; font-family: Arial, sans-serif; font-size: 14px;">
  551. <div style="display: flex; justify-content: space-between; margin-bottom: 10px;">
  552. <p style="flex: 0.4; margin: 0;">工单编号:<span style="color: red;">{{ _GetorderDetail['Gd_gdbh'] }}</span></p>
  553. <p style="flex: 0.3; margin: 0;">产品代号:<span style="color: red;">{{ _GetorderDetail['Gd_cpdh'] }}</span></p>
  554. <p style="flex: 1; margin: 0;">产品名称:<span style="color: red;">{{ _GetorderDetail['Gd_cpmc'] }}</span></p>
  555. </div>
  556. <div style="display: flex; justify-content: space-between; margin-bottom: 10px;">
  557. <p style="flex: 0.4; margin: 0;">订单数量:<span style="color: red;">{{ _GetorderDetail['订单数量'] }}</span></p>
  558. <p style="flex: 0.3; margin: 0;">实际投料:<span style="color: red;">{{ _GetorderDetail['实际投料'] }}</span></p>
  559. <p style="flex: 1; margin: 0;">
  560. 单位:<span style="color: red;">{{ _GetorderDetail['计量单位'] }}</span> 
  561. 目标合格率:<span style="color: red;">{{ _GetorderDetail['投料率'] }}</span>
  562. </p>
  563. </div>
  564. </div>
  565. <el-tabs v-model="activeName" @tab-click="handleClick">
  566. <el-tab-pane label="工艺及生产班组" @click="showTable('工艺及生产班组')" name="first">
  567. <el-table tooltip-effect="dark" :data="lcdtableData" row-key="ID"
  568. highlight-current-row="true"
  569. :row-style="{ height: '0px' }" :header-cell-style="{ padding: '0px' }"
  570. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
  571. border :show-overflow-tooltip="true" :cell-class-name="planUsageCellClass"
  572. style="width: 100%;height: 56vh" ref="tablesczl_gxmc"
  573. @row-dblclick="gyscbzSelectClick">
  574. <el-table-column align="left" label="流程单号" width="81" prop="流程单号" />
  575. <el-table-column align="left" label="工序号" width="68" prop="工序号" />
  576. <el-table-column align="left" label="工序名称" width="240" prop="工序名称" />
  577. <el-table-column align="left" label="生产日期" width="120" prop="生产日期" />
  578. <el-table-column align="left" label="机台编号" width="81" prop="机台编号" />
  579. <el-table-column align="left" label="班组人员01" width="105" :formatter="(row) => `${row.sczl_bh1 || ''} ${row.name1 || ''}`"/>
  580. <el-table-column align="left" label="班组人员02" width="105" :formatter="(row) => `${row.sczl_bh2 || ''} ${row.name2 || ''}`"/>
  581. <el-table-column align="left" label="班组人员03" width="105" :formatter="(row) => `${row.sczl_bh3 || ''} ${row.name3 || ''}`"/>
  582. <el-table-column align="left" label="班组人员04" width="105" :formatter="(row) => `${row.sczl_bh4 || ''} ${row.name4 || ''}`"/>
  583. <el-table-column align="left" label="班组人员05" width="105" :formatter="(row) => `${row.sczl_bh5 || ''} ${row.name5 || ''}`"/>
  584. <el-table-column align="left" label="班组人员06" width="105" :formatter="(row) => `${row.sczl_bh6 || ''} ${row.name6 || ''}`"/>
  585. <el-table-column align="left" label="班组人员07" width="105" :formatter="(row) => `${row.sczl_bh7 || ''} ${row.name7 || ''}`"/>
  586. <el-table-column align="left" label="班组人员08" width="105" :formatter="(row) => `${row.sczl_bh8 || ''} ${row.name8 || ''}`"/>
  587. <el-table-column align="left" label="班组人员09" width="105" :formatter="(row) => `${row.sczl_bh9 || ''} ${row.name9 || ''}`"/>
  588. <el-table-column align="left" label="班组人员10" width="105" :formatter="(row) => `${row.sczl_bh10 || ''} ${row.name10 || ''}`"/>
  589. </el-table>
  590. </el-tab-pane>
  591. <el-tab-pane label="制程异常记录" @click="showTable('制程异常记录')" name="second">
  592. <el-table tooltip-effect="dark" :data="zcycjltableData" row-key="ID"
  593. highlight-current-row="true"
  594. :row-style="{ height: '0px' }" :header-cell-style="{ padding: '0px' }"
  595. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
  596. border :show-overflow-tooltip="true" :cell-class-name="planUsageCellClass"
  597. style="width: 100%;height: 65vh" ref="tablzcycjl_gxmc"
  598. @row-dblclick="zcycjlSelectClick">
  599. <el-table-column align="left" label="流程单号" width="100" prop="流程单号" />
  600. <el-table-column align="left" label="数量" width="100" prop="数量" />
  601. <el-table-column align="left" label="异常备注" width="400" prop="缺陷备注" />
  602. <el-table-column align="left" label="用户" width="160" prop="用户" />
  603. </el-table>
  604. </el-tab-pane>
  605. </el-tabs>
  606. </el-main>
  607. </layout-content>
  608. </layout>
  609. </layout>
  610. </div>
  611. </el-dialog>
  612. </el-dialog>
  613. <!-- 组员及分配比例 -->
  614. <el-dialog v-model="blModel" :before-close="() => blModel = false" style="width: 20%" @keydown="selectBZRR($event)">
  615. <el-form>
  616. <div>
  617. <el-table :data="employeeData" border :show-overflow-tooltip="true" :cell-class-name="blplanUsageCellClass"
  618. highlight-current-row="true"
  619. ref="tableBZRR"
  620. @row-click="tablebllickHandler($event)">
  621. <el-table-column prop="员工编号" label="员工编号"></el-table-column>
  622. <el-table-column prop="ygxm" label="员工姓名"></el-table-column>
  623. </el-table>
  624. </div>
  625. </el-form>
  626. </el-dialog>
  627. <el-dialog v-model="dianjianVisible" :before-close="dianjiancloseDialog" title="设备点检记录" destroy-on-close width="1300px" style="height: 80%;">
  628. <el-row :gutter="24">
  629. <el-col :span="3">
  630. <el-form-item label="设备编号" prop="id">
  631. <el-input v-model="formData.JTMC" :clearable="true" />
  632. </el-form-item>
  633. </el-col>
  634. <el-col :span="10">
  635. <el-row>
  636. <el-col>
  637. <el-input v-model="formData.产品名称" :clearable="true" />
  638. </el-col>
  639. </el-row>
  640. </el-col>
  641. </el-row>
  642. <div style="display: flex;">
  643. <div style="flex: 0.1;">
  644. <el-aside width="200px" style="margin: 0;">
  645. <div class="JKWTree-tree" style="height: 100%; border-right: 1px solid #ebeef5;">
  646. <el-tree :data="dianjiantreeData" :props="defaultProps" highlight-current="true"
  647. @node-click="dianjianNodeClick" @node-dblclick="handleNodeDoubleClick"></el-tree>
  648. </div>
  649. </el-aside>
  650. </div>
  651. <div style="flex: 1; margin: 0;">
  652. <el-table
  653. tooltip-effect="dark"
  654. :data="dianjianselectData"
  655. row-key="ID"
  656. highlight-current-row="true"
  657. :show-overflow-tooltip="true"
  658. border @row-click="dianjianhandle"
  659. style="width:100%; height:400px;"
  660. @row-dblclick="handleSelectClick"
  661. :row-class-name="rowClassName">
  662. <el-table-column prop="检验项目" label="检验项目" width="300"/>
  663. <el-table-column prop="点检方法" label="点检方法" width="180"/>
  664. <el-table-column v-slot="scope" label="正常" width="80" >
  665. <el-checkbox v-model="scope.row.zc" @change="zcClick(scope.row)"></el-checkbox>
  666. </el-table-column>
  667. <el-table-column v-slot="scope" label="异常" width="80">
  668. <el-checkbox v-model="scope.row.yc" @change="ycClick(scope.row)"></el-checkbox>
  669. </el-table-column>
  670. <el-table-column label="备注说明" width="180">
  671. </el-table-column>
  672. <el-table-column
  673. v-slot="scope"
  674. label="不检测"
  675. width="80"
  676. >
  677. <el-checkbox v-model="scope.row.notjc" @change="notjcClick(scope.row)"></el-checkbox>
  678. </el-table-column>
  679. </el-table>
  680. <el-row :gutter="20">
  681. <el-col :span="20">
  682. <el-input v-model="pandingfangfa" style="height: 50px;" :clearable="true" />
  683. </el-col>
  684. </el-row>
  685. </div>
  686. </div>
  687. <!-- 弹窗底部按钮 -->
  688. <template #footer>
  689. <div class="dialog-footer" style="width: 100%;">
  690. <el-button @click="dianjiancloseDialog" style="width: 100px; height: 40px;">关 闭</el-button>
  691. <el-button type="primary" @click="dianjianenterDialog" style="width: 100px; height: 40px;">确 定</el-button>
  692. </div>
  693. </template>
  694. </el-dialog>
  695. <el-dialog
  696. v-model="yinbanVisible"
  697. title="机台印版领用"
  698. destroy-on-close
  699. width="1300px"
  700. @close="handleyinbanDialogClose"
  701. style="height: 75%;"
  702. >
  703. <div style="margin-top:-12px">
  704. <el-button type="primary" class="bt" icon="edit" :disabled="currentSelection.length === 0" @click="onout">领出</el-button>
  705. <el-button type="primary" class="bt" icon="document" :disabled="currentSelection.length === 0" @click="onwithdraw">收回</el-button>
  706. <el-button @click="yinbaninvertSelection" type="info">反选</el-button>
  707. </div>
  708. <el-row :gutter="24" style="margin-top: 10px;">
  709. <el-col :span="4">
  710. <el-form-item label="工单编号" prop="id">
  711. <el-input v-model="formData.工单编号" :clearable="true" />
  712. </el-form-item>
  713. </el-col>
  714. <el-col :span="4">
  715. <el-form-item label="印件号" prop="id">
  716. <el-input v-model="formData.印件号" :clearable="true" />
  717. </el-form-item>
  718. </el-col>
  719. <el-col :span="6">
  720. <el-form-item prop="id">
  721. <el-input v-model="formData.productCode" :clearable="true" />
  722. </el-form-item>
  723. </el-col>
  724. <el-col :span="14">
  725. <el-form-item prop="id">
  726. <el-input v-model="formData.产品名称" :clearable="true" />
  727. </el-form-item>
  728. </el-col>
  729. </el-row>
  730. <div style="display: flex;">
  731. <div style="flex: 1;">
  732. <el-aside width="250px" style="margin: 0;">
  733. <div class="JKWTree-tree" style="height: 100%; border-right: 1px solid #ebeef5;">
  734. <el-tree :data="yinbantreeData" :props="defaultProps" highlight-current="true"
  735. @node-click="yinbanNodeClick" @node-dblclick="handleNodeDoubleClick"></el-tree>
  736. </div>
  737. </el-aside>
  738. </div>
  739. <div style="flex: 1; margin: 0;">
  740. <el-table
  741. ref="yinbanmultipleTable"
  742. tooltip-effect="dark"
  743. :data="yinbanselectData"
  744. row-key="ID"
  745. highlight-current-row="true"
  746. border
  747. style="width:1000px; height:400px;"
  748. @row-dblclick="handleSelectClick"
  749. :row-class-name="rowClassName"
  750. @selection-change="yinbanSelectionChange">
  751. <el-table-column fixed type="selection" width="30" />
  752. <el-table-column
  753. prop="存货编码"
  754. label="存货编码"
  755. width="180"
  756. />
  757. <el-table-column
  758. prop="存货名称"
  759. label="存货名称"
  760. width="180"
  761. />
  762. <el-table-column
  763. prop="印版名称"
  764. label="印版名称"
  765. width="180"
  766. />
  767. <el-table-column
  768. prop="供方批号"
  769. label="供方批号"
  770. width="180"
  771. />
  772. <el-table-column
  773. prop="工单编号"
  774. label="当前领用工单"
  775. width="180"
  776. />
  777. <el-table-column
  778. prop="制造日期"
  779. label="制造日期"
  780. width="180"
  781. />
  782. <el-table-column
  783. prop="印数"
  784. label="印数"
  785. width="180"
  786. />
  787. <el-table-column
  788. prop="印版类别"
  789. label="印版类别"
  790. width="180"
  791. />
  792. <el-table-column
  793. prop="客户编号"
  794. label="客户编号"
  795. width="180"
  796. />
  797. <el-table-column
  798. prop="客户名称"
  799. label="客户名称"
  800. width="180"
  801. />
  802. <el-table-column
  803. prop="产品编号"
  804. label="产品编号"
  805. width="180"
  806. />
  807. <el-table-column
  808. prop="产品名称"
  809. label="产品名称"
  810. width="180"
  811. />
  812. </el-table>
  813. <!-- 分页 -->
  814. <div class="gva-pagination">
  815. <el-pagination
  816. @size-change="ybhandleSizeChange"
  817. @current-change="ybhandleCurrentChange"
  818. :current-page="ybpage"
  819. :page-size="ybpageSize"
  820. layout="total, sizes, prev, pager, next, jumper"
  821. :total="ybtotal">
  822. </el-pagination>
  823. </div>
  824. </div>
  825. </div>
  826. </el-dialog>
  827. <!-- 退回弹窗 -->
  828. <el-dialog
  829. v-model="dialogwithdrawVisible"
  830. title="印版印数(次数)"
  831. style="width: 20%; margin: 30vh auto;"
  832. >
  833. <el-form-item label="印数">
  834. <el-input v-model="Plate.印数" placeholder="请输入印数" />
  835. </el-form-item>
  836. <template #footer>
  837. <div class="dialog-footer" style="width: 100%;">
  838. <el-button @click="rawcloseDialog" style="width: 100px; height: 40px;">关 闭</el-button>
  839. <el-button type="primary" @click="rawenterDialog" style="width: 100px; height: 40px;">确 定</el-button>
  840. </div>
  841. </template>
  842. </el-dialog>
  843. <el-dialog
  844. v-model="xunchaVisible"
  845. title="管理人员现场巡查记录"
  846. destroy-on-close
  847. width="1300px"
  848. style="height: 65%;"
  849. >
  850. <div style="display: flex;">
  851. <div style="flex: 1;">
  852. <el-aside width="250px" style="margin: 0;">
  853. <div class="JKWTree-tree" style="height: 100%; border-right: 1px solid #ebeef5;">
  854. <el-tree :data="xunchatreeData" :props="defaultProps" highlight-current="true"
  855. @node-click="xunchaNodeClick"></el-tree>
  856. </div>
  857. </el-aside>
  858. </div>
  859. <div style="flex: 1; margin: 0;">
  860. <el-table
  861. tooltip-effect="dark"
  862. :data="xunchaselectData"
  863. row-key="ID"
  864. highlight-current-row="true"
  865. border
  866. style="width:1000px; height:400px;"
  867. @row-dblclick="handleSelectClick"
  868. :row-class-name="rowClassName"
  869. :show-overflow-tooltip="true"
  870. >
  871. <el-table-column
  872. prop="工单编号"
  873. label="工序编号"
  874. width="85"
  875. />
  876. <el-table-column
  877. prop="印件号"
  878. label="印件号"
  879. width="70"
  880. />
  881. <el-table-column
  882. prop="工序名称"
  883. label="工序名称"
  884. width="180"
  885. />
  886. <el-table-column
  887. prop="流程单号"
  888. label="流程单号"
  889. width="85"
  890. />
  891. <el-table-column
  892. prop="设备编号"
  893. label="设备编号"
  894. width="85"
  895. />
  896. <el-table-column
  897. prop="班组编号"
  898. label="班组编号"
  899. width="85"
  900. />
  901. <el-table-column
  902. prop="检验备注"
  903. label="检验备注"
  904. width="85"
  905. />
  906. <el-table-column
  907. prop="现场管理人员"
  908. label="现场管理人员"
  909. width="145"
  910. />
  911. <el-table-column
  912. prop="提交时间"
  913. label="提交时间"
  914. width="160"
  915. />
  916. <el-table-column
  917. prop="开工时间"
  918. label="开工时间"
  919. width="160"
  920. />
  921. <el-table-column
  922. prop="分钟差数"
  923. label="分钟差数"
  924. width="85"
  925. />
  926. <el-table-column
  927. prop="归属时段"
  928. label="归属时段"
  929. width="160"
  930. />
  931. </el-table>
  932. </div>
  933. </div>
  934. <template #footer>
  935. <div class="dialog-footer">
  936. <!-- <el-button @click="closeDialog">关 闭</el-button> -->
  937. <!-- <el-button type="primary" @click="xunjianerDialog">提 交</el-button> -->
  938. </div>
  939. </template>
  940. </el-dialog>
  941. <el-dialog
  942. v-model="zhichengVisible"
  943. title="制程检验记录"
  944. destroy-on-close
  945. width="1100px"
  946. style="height: 78%;"
  947. >
  948. <el-row :gutter="24" style="margin-top:0px; margin-bottom: 1px;">
  949. <el-col :span="4" style="margin-top:0px; margin-bottom: 0px;">
  950. <el-form-item label="工单编号" prop="id" style="margin-top:0px;; margin-bottom: 0px;">
  951. <el-input v-model="xunchaData.order" :clearable="true" placeholder="" style="margin-top:0px;; margin-bottom: 0px;"/>
  952. </el-form-item>
  953. </el-col>
  954. <el-col :span="9" style="margin-top:0px; margin-bottom: 0px;">
  955. <el-row style="margin-top:0px; margin-bottom: 0px;">
  956. <el-col style="margin-top:0px; margin-bottom: 0px;">
  957. <el-input v-model="xunchaData.product_name" :clearable="true" placeholder="" style="margin-top:0px; margin-bottom: 0px;"/>
  958. </el-col>
  959. </el-row>
  960. </el-col>
  961. <el-col :span="4" style="margin-top:0px; margin-bottom: 0px;">
  962. <el-form-item label="流程单" prop="id" style="margin-top:0px; margin-bottom: 0px;">
  963. <el-input v-model="xunchaData.lcdh" :clearable="true" placeholder="" style="margin-top:0px; margin-bottom: 0px;"/>
  964. </el-form-item>
  965. </el-col>
  966. </el-row>
  967. <el-row :gutter="24" style="margin-top:0px; margin-bottom: 1px;">
  968. <el-col :span="3" style="margin-top:0px; margin-bottom: 0px;">
  969. <el-form-item label="印件编号" prop="id" style="margin-top:0px; margin-bottom: 0px;">
  970. <el-input v-model="xunchaData.yjno" :clearable="true" placeholder="" style="margin-top:0px; margin-bottom: 0px;"/>
  971. </el-form-item>
  972. </el-col>
  973. <el-col :span="10" style="margin-top:0px; margin-bottom: 0px;">
  974. <el-row style="margin-top:0px; margin-bottom: 0px;">
  975. <el-col style="margin-top:0px; margin-bottom: 0px;">
  976. <el-input v-model="xunchaData.gxmc" :clearable="true" placeholder="" style="margin-top:0px; margin-bottom: 0px;"/>
  977. </el-col>
  978. </el-row>
  979. </el-col>
  980. </el-row>
  981. <div style="display: flex;">
  982. <div style="flex: 0.1;">
  983. <el-aside width="180px" style="margin: 0;">
  984. <div class="JKWTree-tree" style="height: 100%; border-right: 1px solid #ebeef5;">
  985. <el-tree :data="zhichengtreeData" :props="defaultProps" highlight-current="true"
  986. @node-click="zhichengNodeClick"></el-tree>
  987. </div>
  988. </el-aside>
  989. </div>
  990. <div v-if="zhichengstatus" style="flex: 0; margin: 0;">
  991. <el-tabs v-model="activNames" type="card" @tab-click="handleClick">
  992. <el-tab-pane label="指标检验" @click="showTable('指标检验')" name="first">
  993. <el-table
  994. tooltip-effect="dark"
  995. :data="zhibiaoselectData"
  996. row-key="ID"
  997. highlight-current-row="true"
  998. :show-overflow-tooltip="true"
  999. border
  1000. style="width:100%; height:310px;"
  1001. :row-class-name="rowClassName">
  1002. <el-table-column prop="检验项目" label="检验项目" width="270" />
  1003. <el-table-column label="不检测" width="70">
  1004. <template v-slot="scope">
  1005. <el-radio v-model="scope.row.selected" label="不检测">
  1006. <span style="visibility: hidden;">不检测</span>
  1007. </el-radio>
  1008. </template>
  1009. </el-table-column>
  1010. <el-table-column label="合格" width="60">
  1011. <template v-slot="scope">
  1012. <el-radio v-model="scope.row.selected" label="合格">
  1013. <span style="visibility: hidden;">合格</span>
  1014. </el-radio>
  1015. </template>
  1016. </el-table-column>
  1017. <el-table-column label="不合格" width="70">
  1018. <template v-slot="scope">
  1019. <el-radio v-model="scope.row.selected" label="不合格">
  1020. <span style="visibility: hidden;">不合格</span>
  1021. </el-radio>
  1022. </template>
  1023. </el-table-column>
  1024. <el-table-column prop="检测方法" label="检测方法" width="90" />
  1025. <el-table-column prop="检验频率" label="检验频率" width="150" />
  1026. <el-table-column prop="相关标准" label="相关标准" width="180" />
  1027. </el-table>
  1028. </el-tab-pane>
  1029. <el-tab-pane label="附加检验记录" @click="showTable('附加检验记录')" name="second">
  1030. <el-table
  1031. tooltip-effect="dark"
  1032. :data="fujiaselectData"
  1033. row-key="ID"
  1034. highlight-current-row="true"
  1035. :show-overflow-tooltip="true"
  1036. border
  1037. style="width:100%; height:320px;"
  1038. @row-dblclick="handleSelectClick"
  1039. :row-class-name="rowClassName">
  1040. <el-table-column v-slot="scope" label="不检测" width="75">
  1041. <el-checkbox v-model="scope.row.notjc"></el-checkbox>
  1042. </el-table-column>
  1043. <!-- 缺陷及记录列,转换为输入框 -->
  1044. <el-table-column label="缺陷及记录" width="720">
  1045. <template #default="scope">
  1046. <el-input v-model="scope.row['缺陷备注']" placeholder="请输入缺陷及记录"></el-input>
  1047. </template>
  1048. </el-table-column>
  1049. <!-- <el-table-column prop="缺陷备注" label="缺陷及记录" width="720"/> -->
  1050. <el-table-column prop="编号" label="编号" width="80"/>
  1051. </el-table>
  1052. </el-tab-pane>
  1053. </el-tabs>
  1054. </div>
  1055. </div>
  1056. <template #footer>
  1057. <div v-if="zhichengstatus" class="dialog-footer">
  1058. <el-button @click="closezhichengDialog">关 闭</el-button>
  1059. <el-button type="primary" @click="zhichengDialog">提 交</el-button>
  1060. </div>
  1061. </template>
  1062. </el-dialog>
  1063. <div v-if="dateOn" >
  1064. <el-tabs v-model="activName" type="card" @tab-click="handleClick">
  1065. <el-tab-pane label="当日上报产量" @click="showTable('当日上报产量')" name="first">
  1066. <!-- 非JP机台 -->
  1067. <el-table ref="multipleTable"
  1068. v-if="! isJPJT"
  1069. :show-overflow-tooltip="true"
  1070. @selection-change="selectionChange($event)"
  1071. :row-style="{ height: '20px' }" :selectable="checkboxT"
  1072. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  1073. :header-cell-style="{ padding: '0px' }" @row-click="getUid"
  1074. highlight-current-row="true" @row-dblclick="gytableDatadoubleClick"
  1075. style="width: 100%;height: 70vh" border tooltip-effect="dark" :data="gytableData" row-key="ID" >
  1076. <el-table-column type="selection" width="55" />
  1077. <!-- <el-table-column align="left" label="选择" prop="工单编号" width="100"/> -->
  1078. <el-table-column fixed align="left" label="产品名称" prop="产品名称" width="300"/>
  1079. <el-table-column fixed align="left" label="工序" prop="工序" width="170"/>
  1080. <el-table-column fixed align="left" label="产量" prop="产量" width="100"/>
  1081. <el-table-column align="left" label="千件工价" prop="千件工价" width="85"/>
  1082. <el-table-column align="left" label="日定额" prop="日定额" width="85"/>
  1083. <el-table-column align="left" label="流程" sortable prop="num" width="80"/>
  1084. <el-table-column align="left" label="补产标准" prop="补产标准" width="85"/>
  1085. <el-table-column align="left" label="难度系数" prop="难度系数" width="85"/>
  1086. <el-table-column align="left" label="备注" prop="备注" width="200"/>
  1087. <el-table-column align="left" label="组员1" prop="组员1" width="150" />
  1088. <el-table-column align="left" label="组员2" prop="组员2" width="150" />
  1089. <el-table-column align="left" label="组员3" prop="组员3" width="150" />
  1090. <el-table-column align="left" label="组员4" prop="组员4" width="150" />
  1091. <el-table-column align="left" label="组员5" prop="组员5" width="70" />
  1092. <el-table-column align="left" label="组员6" prop="组员6" width="70" />
  1093. <el-table-column align="left" label="组员7" prop="组员7" width="70" />
  1094. <el-table-column align="left" label="组员8" prop="组员8" width="70" />
  1095. <el-table-column align="left" label="组员9" prop="组员9" width="70" />
  1096. <el-table-column align="left" label="组员10" prop="组员10" width="70" />
  1097. <el-table-column align="left" label="制程废品" prop="制程废品" width="85" />
  1098. <el-table-column align="left" label="制程次品" prop="制程次品" width="85" />
  1099. <el-table-column align="left" label="前工序废" prop="前工序废" width="85" />
  1100. <el-table-column align="left" label="来料异常" prop="来料异常" width="85"/>
  1101. <el-table-column align="left" label="装版工时" prop="装版工时" width="85" />
  1102. <el-table-column align="left" label="保养工时" prop="保养工时" width="85" />
  1103. <el-table-column align="left" label="打样工时" prop="打样工时" width="85"/>
  1104. <el-table-column align="left" label="异常总工时" prop="异常总工时" width="100"/>
  1105. <el-table-column align="left" label="异常补时" prop="异常补时" width="85"/>
  1106. <el-table-column align="left" label="异常类型" prop="异常类型" width="110"/>
  1107. <el-table-column align="left" label="通电工时" prop="通电工时" width="85"/>
  1108. <el-table-column align="left" label="码开始行" prop="码开始行" width="85" />
  1109. <el-table-column align="left" label="码结束行" prop="码结束行" width="85" />
  1110. <el-table-column align="left" label="码包" prop="码包" width="70" />
  1111. <el-table-column align="left" label="主电表" prop="主电表" width="70"/>
  1112. <el-table-column align="left" label="辅电表" prop="辅电表" width="70" />
  1113. <el-table-column align="left" label="色度数" prop="色度数" width="70" />
  1114. <el-table-column align="left" label="印刷方式" prop="印刷方式" width="85"/>
  1115. <el-table-column align="left" label="用户" prop="用户" width="210" />
  1116. <el-table-column align="left" label="更新时间" prop="更新时间" width="160" />
  1117. </el-table>
  1118. <el-table ref="JPmultipleTable"
  1119. v-else
  1120. :show-overflow-tooltip="true"
  1121. @selection-change="selectionChange($event)"
  1122. :row-style="{ height: '20px' }" :row-class-name="totalClassName" :cell-class-name="tableDataCellClass"
  1123. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  1124. :header-cell-style="{ padding: '0px' }" @row-click="getUid"
  1125. highlight-current-row="true" @row-dblclick="JPgytableDatadoubleClick"
  1126. style="width: 100%;height: 70vh" border tooltip-effect="dark" :data="JPgytableData" row-key="ID" >
  1127. <el-table-column type="selection" width="55" />
  1128. <!-- <el-table-column fixed align="left" label="工单编号" prop="工单编号" width="130"/> -->
  1129. <el-table-column align="left" fixed label="产品名称" prop="产品名称" width="300"/>
  1130. <el-table-column align="left" fixed label="工序" prop="工序" width="150"/>
  1131. <!-- <el-table-column align="left" label="印件号" prop="yjno" width="115"/>
  1132. <el-table-column align="left" label="工序名称" prop="gxmc" width="200"/> -->
  1133. <el-table-column align="left" fixed label="班组" prop="bzdh" width="70"/>
  1134. <el-table-column align="left" label="计件箱数" prop="计件箱数" width="90"/>
  1135. <el-table-column align="left" label="每箱数量" prop="每箱数量" width="90"/>
  1136. <el-table-column align="left" label="日定额" prop="日定额" width="80"/>
  1137. <el-table-column align="left" label="流程" sortable prop="num" width="80"/>
  1138. <el-table-column align="left" label="检验类型" prop="检验类型" width="90"/>
  1139. <el-table-column align="left" label="废品率系数" prop="废品率系数" width="100"/>
  1140. <el-table-column align="left" label="千件工价" prop="千件工价" width="90"/>
  1141. <el-table-column align="left" label="补产标准" prop="补产标准" width="90"/>
  1142. <el-table-column align="left" label="组员1" prop="组员1" width="170"/>
  1143. <el-table-column align="left" label="组员2" prop="组员2" width="170"/>
  1144. <el-table-column align="left" label="组员3" prop="组员3" width="170"/>
  1145. <el-table-column align="left" label="组员4" prop="组员4" width="170"/>
  1146. <el-table-column align="left" label="组员5" prop="组员5" width="170"/>
  1147. <el-table-column align="left" label="组员6" prop="组员6" width="170"/>
  1148. <el-table-column align="left" label="组员7" prop="组员7" width="170"/>
  1149. <el-table-column align="left" label="换膜补时" prop="换膜补时" width="90"/>
  1150. <el-table-column align="left" label="保养工时" prop="保养工时" width="90"/>
  1151. <el-table-column align="left" label="异常总工时" prop="异常总工时" width="100"/>
  1152. <el-table-column align="left" label="通电工时" prop="通电工时" width="90"/>
  1153. <el-table-column align="left" label="难度系数" prop="难度系数" width="90"/>
  1154. <el-table-column align="left" label="定额代号" prop="定额代号" width="130"/>
  1155. <el-table-column align="left" label="更新时间" prop="更新时间" width="160"/>
  1156. </el-table>
  1157. </el-tab-pane>
  1158. <el-tab-pane label="当日制程检验记录" @click="showTable('印件资料')" name="second">
  1159. <el-table ref="JYmultipleTable"
  1160. :row-style="{ height: '20px' }"
  1161. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  1162. :header-cell-style="{ padding: '0px' }"
  1163. :show-overflow-tooltip="true"
  1164. highlight-current-row="true"
  1165. style="width: 100%;height: 70vh" border tooltip-effect="dark" :data="drzcDatas" row-key="ID" @selection-change="handleSelectionChange">
  1166. <el-table-column type="selection" width="55" />
  1167. <el-table-column align="left" label="工单编号" prop="工单编号" width="85"/>
  1168. <el-table-column align="left" label="印件号" prop="印件号" width="70" />
  1169. <el-table-column align="left" label="工序名称" prop="工序名称" width="85" />
  1170. <el-table-column align="left" label="检验项目" prop="检验项目" width="85"/>
  1171. <el-table-column
  1172. v-for="time in columnNames"
  1173. :key="time"
  1174. :label="time"
  1175. :prop="time"
  1176. align="center"
  1177. width="80"
  1178. ></el-table-column>
  1179. </el-table>
  1180. </el-tab-pane>
  1181. </el-tabs>
  1182. </div>
  1183. <el-dialog v-model="complaintsShow" style="width: 1000px" lock-scroll :before-close="closecomplaintsShow" title="=客诉记录" destroy-on-close>
  1184. <el-table ref="multipleTable"
  1185. :row-style="{ height: '20px' }"
  1186. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  1187. :header-cell-style="{ padding: '0px' }"
  1188. :show-overflow-tooltip="true"
  1189. highlight-current-row="true" @row-click="complaintshandle"
  1190. style="width: 100%;height: 250px;margin-top: 0px;" border tooltip-effect="dark"
  1191. :data="complaintsData" row-key="ID" @selection-change="complaintsSelectionChange">
  1192. <!-- <el-table-column type="selection" width="55" /> -->
  1193. <el-table-column align="left" label="产品编号" prop="产品编号" width="120"/>
  1194. <el-table-column align="left" label="产品名称" prop="产品名称" width="200"/>
  1195. <el-table-column align="left" label="客诉日期" prop="客诉日期" width="120"/>
  1196. <el-table-column align="left" label="客诉单号" prop="客诉单号" width="120"/>
  1197. <el-table-column align="left" label="客诉方式" prop="客诉方式" width="100"/>
  1198. <el-table-column align="left" label="订单编号" prop="订单编号" width="100"/>
  1199. <el-table-column align="left" label="缺陷关键字" prop="缺陷关键字" width="140"/>
  1200. <el-table-column align="left" label="客诉性质" prop="客诉性质" width="100"/>
  1201. <el-table-column align="left" label="主要责任部门" prop="主要责任部门" width="140"/>
  1202. <el-table-column align="left" label="次要责任部门" prop="次要责任部门" width="140"/>
  1203. </el-table>
  1204. <el-row :gutter="20">
  1205. <el-col :span="6">
  1206. <el-form-item label="客户编号" prop="id">
  1207. <el-input v-model="selectedRowData.客户编号" :clearable="true" placeholder="" />
  1208. </el-form-item>
  1209. </el-col>
  1210. <el-col :span="15">
  1211. <el-form-item label="客户名称" prop="id">
  1212. <el-input v-model="selectedRowData.客户名称" :clearable="true" placeholder="" />
  1213. </el-form-item>
  1214. </el-col>
  1215. </el-row>
  1216. <el-row :gutter="20">
  1217. <el-col :span="6">
  1218. <el-form-item label="客诉单号" prop="id">
  1219. <el-input v-model="selectedRowData.客诉单号" :clearable="true" placeholder="" />
  1220. </el-form-item>
  1221. </el-col>
  1222. <el-col :span="5">
  1223. <el-form-item label="客诉日期" prop="id">
  1224. <el-input v-model="selectedRowData.客诉日期" :clearable="true" placeholder="" />
  1225. </el-form-item>
  1226. </el-col>
  1227. <el-col :span="5">
  1228. <el-form-item label="方式" prop="id">
  1229. <el-input v-model="selectedRowData.客诉方式" :clearable="true" placeholder="" />
  1230. </el-form-item>
  1231. </el-col>
  1232. <el-col :span="5">
  1233. <el-form-item label="批次号" prop="id">
  1234. <el-input v-model="selectedRowData.订单编号" :clearable="true" placeholder="" />
  1235. </el-form-item>
  1236. </el-col>
  1237. </el-row>
  1238. <el-row :gutter="20">
  1239. <el-col :span="20">
  1240. <el-form-item label="反馈问题" prop="id">
  1241. <el-input v-model="selectedRowData.客诉描述" :clearable="true" placeholder="" />
  1242. </el-form-item>
  1243. </el-col>
  1244. </el-row>
  1245. <el-row :gutter="20">
  1246. <el-col :span="20">
  1247. <el-form-item label="缺陷关键字" prop="id">
  1248. <el-input v-model="selectedRowData.缺陷关键字" :clearable="true" placeholder="" />
  1249. </el-form-item>
  1250. </el-col>
  1251. </el-row>
  1252. <el-row :gutter="20">
  1253. <el-col :span="5">
  1254. <el-form-item label="性质" prop="id">
  1255. <el-input v-model="selectedRowData.客诉性质" :clearable="true" placeholder="" />
  1256. </el-form-item>
  1257. </el-col>
  1258. <el-col :span="5">
  1259. <el-form-item label="扣分" prop="id">
  1260. <el-input v-model="selectedRowData.扣分" :clearable="true" placeholder="" />
  1261. </el-form-item>
  1262. </el-col>
  1263. </el-row>
  1264. <div style="display: flex;">
  1265. </div>
  1266. </el-dialog>
  1267. <el-dialog
  1268. v-model="huanxingVisible"
  1269. title="换型清场"
  1270. destroy-on-close
  1271. width="145vh"
  1272. style="height: 78vh;"
  1273. :before-close="closehuanxingVisible"
  1274. >
  1275. <div style="display: flex;">
  1276. <div style="flex: 0.1;">
  1277. <el-aside width="26vh" style="margin: 0;">
  1278. <div class="JKWTree-tree" style="height: 60vh; border-right: 1px solid #ebeef5;">
  1279. <el-tree :data="huanxingtreeData" :props="defaultProps" highlight-current="true"
  1280. @node-click="huanxingNodeClick"></el-tree>
  1281. </div>
  1282. </el-aside>
  1283. </div>
  1284. <div v-if="huanxingstatus" style="flex: 0; margin: 0;">
  1285. <el-tabs v-model="activNames" type="card" @tab-click="handleClick">
  1286. <el-tab-pane label="换型清场明细信息" @click="showTable('换型清场明细信息')" name="first">
  1287. <div style="width:110vh">
  1288. <el-descriptions :column="9" border>
  1289. <el-descriptions-item :span="9">
  1290. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  1291. <el-col :span="6" style="margin-bottom: 0px;margin-top: 0px;">
  1292. <el-form-item label="日期:" prop="id" style="margin-top:0px; margin-bottom: 0px;">
  1293. <el-input v-model="huanxingData.日期" placeholder="" style="margin-top:0px; margin-bottom: 0px;"/>
  1294. </el-form-item>
  1295. </el-col>
  1296. <el-col :span="2" style="margin-bottom: 0px;margin-top: 0px;">
  1297. </el-col>
  1298. <el-col :span="6" style="margin-bottom: 0px;margin-top: 0px;">
  1299. <el-form-item label="机台编号:" prop="id" style="margin-top:0px; margin-bottom: 0px;">
  1300. <el-input v-model="huanxingData.机台编号" placeholder="" style="margin-top:0px; margin-bottom: 0px;"/>
  1301. </el-form-item>
  1302. </el-col>
  1303. <el-col :span="1" style="margin-bottom: 0px;margin-top: 0px;">
  1304. </el-col>
  1305. <el-col :span="6" style="margin-bottom: 0px;margin-top: 0px;">
  1306. <el-form-item label="班组:" prop="id" style="margin-top:0px; margin-bottom: 0px;">
  1307. <el-input v-model="huanxingData.班组" placeholder="" style="margin-top:0px; margin-bottom: 0px;"/>
  1308. </el-form-item>
  1309. </el-col>
  1310. </el-row>
  1311. </el-descriptions-item>
  1312. <el-descriptions-item label="清场原因 从" :span="9">
  1313. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  1314. <el-col :span="8" style="margin-bottom: 0px;margin-top: 0px;">
  1315. <el-form-item label="工单编号:" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1316. <el-input v-model="huanxingData.工单编号A" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1317. </el-form-item>
  1318. </el-col>
  1319. <el-col :span="16" style="margin-bottom: 0px;margin-top: 0px;">
  1320. <el-form-item label="印件名称:" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1321. <el-input v-model="huanxingData.印件名称A" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1322. </el-form-item>
  1323. </el-col>
  1324. </el-row>
  1325. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  1326. <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
  1327. <el-form-item label="印件工序:" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1328. <el-input v-model="huanxingData.印件工序A" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1329. </el-form-item>
  1330. </el-col>
  1331. <el-col :span="6" style="margin-bottom: 0px;margin-top: 0px;">
  1332. </el-col>
  1333. <el-col :span="6" style="margin-bottom: 0px;margin-top: 0px;">
  1334. <el-form-item label="码包号" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1335. <el-input v-model="huanxingData.码包号A" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1336. </el-form-item>
  1337. </el-col>
  1338. </el-row>
  1339. </el-descriptions-item>
  1340. <el-descriptions-item label="清场原因 到" :span="9">
  1341. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  1342. <el-col :span="8" style="margin-bottom: 0px;margin-top: 0px;">
  1343. <el-form-item label="工单编号:" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1344. <el-input v-model="huanxingData.工单编号B" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1345. </el-form-item>
  1346. </el-col>
  1347. <el-col :span="16" style="margin-bottom: 0px;margin-top: 0px;">
  1348. <el-form-item label="印件名称:" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1349. <el-input v-model="huanxingData.印件名称B" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1350. </el-form-item>
  1351. </el-col>
  1352. </el-row>
  1353. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  1354. <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
  1355. <el-form-item label="印件工序:" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1356. <el-input v-model="huanxingData.印件工序B" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1357. </el-form-item>
  1358. </el-col>
  1359. <el-col :span="6" style="margin-bottom: 0px;margin-top: 0px;">
  1360. </el-col>
  1361. <el-col :span="6" style="margin-bottom: 0px;margin-top: 0px;">
  1362. <el-form-item label="码包号" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1363. <el-input v-model="huanxingData.码包B" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1364. </el-form-item>
  1365. </el-col>
  1366. </el-row>
  1367. </el-descriptions-item>
  1368. <el-descriptions-item label="清场确认项目" :span="9">
  1369. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  1370. <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
  1371. <el-form-item label="菲林_标样_签样品_留样品" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1372. <el-checkbox v-model="huanxingData.项目1"></el-checkbox>
  1373. </el-form-item>
  1374. </el-col>
  1375. <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
  1376. <el-form-item label="版材_纸张_电化铝_油墨" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1377. <el-checkbox v-model="huanxingData.项目2"></el-checkbox>
  1378. </el-form-item>
  1379. </el-col>
  1380. </el-row>
  1381. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  1382. <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
  1383. <el-form-item label="过版纸_废品_次品" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1384. <el-checkbox v-model="huanxingData.项目3"></el-checkbox>
  1385. </el-form-item>
  1386. </el-col>
  1387. <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
  1388. <el-form-item label="半成品_成品_零头" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1389. <el-checkbox v-model="huanxingData.项目4"></el-checkbox>
  1390. </el-form-item>
  1391. </el-col>
  1392. </el-row>
  1393. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  1394. <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
  1395. <el-form-item label="操作台桌面_抽屉_地面" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1396. <el-checkbox v-model="huanxingData.项目5"></el-checkbox>
  1397. </el-form-item>
  1398. </el-col>
  1399. </el-row>
  1400. </el-descriptions-item>
  1401. <el-descriptions-item label="清场确认人" :span="9">
  1402. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  1403. <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
  1404. <el-form-item label="机长签字" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1405. <el-input v-model="huanxingData.机长" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1406. </el-form-item>
  1407. </el-col>
  1408. </el-row>
  1409. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  1410. <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
  1411. <el-form-item label="带班主管签字" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1412. <el-input v-model="huanxingData.班长" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1413. </el-form-item>
  1414. </el-col>
  1415. <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
  1416. <el-form-item label="质量巡查员签字" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1417. <el-input v-model="huanxingData.质量巡查员" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1418. </el-form-item>
  1419. </el-col>
  1420. </el-row>
  1421. </el-descriptions-item>
  1422. </el-descriptions>
  1423. </div>
  1424. </el-tab-pane>
  1425. <el-tab-pane label="当前设备换型记录" @click="showTable('当前设备换型记录')" name="second">
  1426. <el-table tooltip-effect="dark" :data="huanxingselectData" row-key="ID"
  1427. highlight-current-row="true" :show-overflow-tooltip="true" border
  1428. style="width:115vh; height:50vh;" @row-dblclick="handleSelectClick" :row-class-name="rowClassName" >
  1429. <el-table-column prop="日期" label="日期" width="160" />
  1430. <el-table-column prop="机台编号" label="机台编号" width="90" />
  1431. <el-table-column prop="班组" label="班组" width="70" />
  1432. <el-table-column prop="工单编号A" label="工单编号A" width="95" />
  1433. <el-table-column prop="印件名称A" label="印件名称A" width="130" />
  1434. <el-table-column prop="印件工序A" label="印件工序A" width="150" />
  1435. <el-table-column prop="码包号A" label="码包号A" width="80" />
  1436. <el-table-column prop="工单编号B" label="工单编号B" width="100" />
  1437. <el-table-column prop="印件名称B" label="印件名称B" width="100" />
  1438. <el-table-column prop="印件工序B" label="印件工序B" width="150" />
  1439. <el-table-column prop="码包号B" label="码包号B" width="80" />
  1440. <el-table-column prop="清场项目A" label="菲林_标样_签样品_留样品" width="190" />
  1441. <el-table-column prop="清场项目B" label="版材_纸张_电化铝_油墨" width="190" />
  1442. <el-table-column prop="清场项目C" label="过版纸_废品_次品" width="170" />
  1443. <el-table-column prop="清场项目D" label="半成品_成品_零头" width="170" />
  1444. <el-table-column prop="清场项目E" label="操作台桌面_抽屉_地面" width="180" />
  1445. <el-table-column prop="机长" label="机长" width="80" />
  1446. <el-table-column prop="班长" label="带班长" width="80" />
  1447. <el-table-column prop="质量巡查员" label="质量巡查员" width="100" />
  1448. <el-table-column prop="创建时间" label="创建时间" width="120" />
  1449. <el-table-column prop="UNIQID" label="UNIQID" width="80" />
  1450. </el-table>
  1451. </el-tab-pane>
  1452. </el-tabs>
  1453. </div>
  1454. </div>
  1455. </el-dialog>
  1456. <el-dialog v-model="chanliangVisible" destroy-on-close
  1457. width="85%" style="height: 94vh;margin-top: 1%;padding: 10px 10px 0px 10px;" :before-close="closechanliangVisible" :title="type2 === 'create' ? '新增' : '修改'">
  1458. <el-row :gutter="24" style="height: 40px;">
  1459. <el-col :span="6">
  1460. <el-form-item label="工单编号:" prop="flatFeed" class="mab" >
  1461. <el-input v-model="formdata3.value.工单编号" id="工单编号" @blur="getCPMCsubmit()" @keydown="ent1($event)" />
  1462. </el-form-item>
  1463. </el-col>
  1464. <el-col :span="18">
  1465. <el-form-item label="产品名称:" prop="perTenThousand" class="mab" label-width="150">
  1466. <el-input v-model="formdata3.value.cpmc" id="产品名称" readonly @keydown="ent1($event)" />
  1467. </el-form-item>
  1468. </el-col>
  1469. </el-row>
  1470. <el-row :gutter="24" style="height: 40px;">
  1471. <el-col :span="6">
  1472. <el-form-item label="印件号:" prop="flatFeed" class="mab"label-width="70">
  1473. <el-input v-model="formdata3.value.yjno" id="印件号" @keydown="ent1($event)" />
  1474. </el-form-item>
  1475. </el-col>
  1476. <el-col :span="18">
  1477. <el-form-item label="印件名称:" prop="perTenThousand" class="mab" label-width="150">
  1478. <el-input v-model="formdata3.value.yjmc" id="印件名称" @keydown="ent1($event)" />
  1479. </el-form-item>
  1480. </el-col>
  1481. </el-row>
  1482. <el-row :gutter="24" style="height: 40px;">
  1483. <el-col :span="14">
  1484. <el-form-item label="工序名称:" prop="flatFeed" class="mab">
  1485. <el-input v-model="formdata3.value.gxmc" id="工序名称" @focus="gxmcHandleFocus()" @blur="getGXsubmit()" @keydown="ent1($event)" style="width: 350px;" />
  1486. <el-input v-model="formdata3.value.gxh" id="工序号" :readonly=true :clearable="true" style="width: 80px;" />
  1487. </el-form-item>
  1488. </el-col>
  1489. <el-col :span="10">
  1490. <el-form-item label="工艺名称:" prop="perTenThousand" class="mab">
  1491. <el-input v-model="formdata3.value.gymc" id="工艺名称" @keydown="ent1($event)" :readonly=true :clearable="true" style="width: 200px;" />
  1492. </el-form-item>
  1493. </el-col>
  1494. </el-row>
  1495. <el-row :gutter="24" style="height: 40px;">
  1496. <el-col :span="6">
  1497. <el-form-item label="日期:" prop="flatFeed" class="mab" label-width="70">
  1498. <el-date-picker v-model="formdata3.value.rq" type="datetime" format="YYYY/MM/DD" value-format="YYYY-MM-DD" @keydown="ent1($event)"/>
  1499. </el-form-item>
  1500. </el-col>
  1501. <el-col :span="6">
  1502. <el-form-item label="机器:" class="mab" prop="remark">
  1503. <el-select v-model="formdata3.value.sczl_jtbh"
  1504. id="机器" @keydown="ent1($event)" @change="jtbh_change()"
  1505. style="flex: 1; height: auto; width: 100px;">
  1506. <el-option
  1507. v-for="(item, index) in gdzl_MachineList_address.data"
  1508. :key="index"
  1509. :label="item.split('-->')[0].trim()"
  1510. :value="item.split('-->')[0].trim()">
  1511. {{ item }}
  1512. </el-option>
  1513. </el-select>
  1514. </el-form-item>
  1515. </el-col>
  1516. <el-col :span="7">
  1517. <el-form-item label="开工时间:" prop="flatFeed" class="mab">
  1518. <el-date-picker v-model="formdata3.value.starttime" type="datetime" format="YYYY/MM/DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" @keydown="ent1($event)" />
  1519. </el-form-item>
  1520. </el-col>
  1521. <el-col :span="5" style="margin-top:0px; margin-bottom: 1px;">
  1522. <el-form-item label="流程单号" prop="id" style="margin-top:0px; margin-bottom: 1px;">
  1523. <el-input v-model="formdata3.value.num" id="流程单号" style="margin-top:0px; margin-bottom: 1px;" @keydown="ent1($event)" placeholder="" />
  1524. </el-form-item>
  1525. </el-col>
  1526. </el-row>
  1527. <el-row :gutter="24" style="height: 40px;">
  1528. <el-col :span="9">
  1529. <el-form-item label="上机时间:" prop="flatFeed" class="mab">
  1530. <el-date-picker
  1531. v-model="formdata3.value.sj1"
  1532. type="datetime"
  1533. format="YYYY/MM/DD hh:mm:ss"
  1534. value-format="YYYY-MM-DD h:m:s"
  1535. @keydown="ent1($event)"
  1536. />
  1537. </el-form-item>
  1538. </el-col>
  1539. <el-col :span="9">
  1540. <el-form-item label="下机时间:" prop="flatFeed" class="mab">
  1541. <el-date-picker
  1542. v-model="formdata3.value.sj2"
  1543. type="datetime"
  1544. format="YYYY/MM/DD hh:mm:ss"
  1545. value-format="YYYY-MM-DD h:m:s"
  1546. @keydown="ent1($event)"
  1547. />
  1548. </el-form-item>
  1549. </el-col>
  1550. </el-row>
  1551. <el-row :gutter="24">
  1552. <el-col :span="6">
  1553. <el-form-item label="墨色:" prop="flatFeed" class="mab">
  1554. <el-input v-model="formdata3.value.色度数" id="墨色" @keydown="ent1($event)" style="width: 200px;" />
  1555. </el-form-item>
  1556. </el-col>
  1557. <el-col :span="8">
  1558. <el-form-item label="加工联数:" prop="flatFeed" class="mab" >
  1559. <el-input v-model="formdata3.value.联数" id="加工联数" @keydown="ent1($event)" style="width: 100px; margin-right: 30px;" />
  1560. </el-form-item>
  1561. </el-col>
  1562. <el-col :span="5">
  1563. <el-form-item label="产量:" prop="flatFeed" class="mab">
  1564. <el-input v-model="formdata3.value.产量" id="产量" @keydown="ent1($event)" style="width: 200px;" />
  1565. </el-form-item>
  1566. </el-col>
  1567. <el-col :span="5">
  1568. <el-form-item label="制程废品:" prop="flatFeed" class="mab">
  1569. <el-input v-model="formdata3.value.制程废品" id="制程废品" @keydown="ent1($event)" style="width: 200px;" />
  1570. </el-form-item>
  1571. </el-col>
  1572. </el-row>
  1573. <el-row :gutter="24" style="height: 40px;">
  1574. <el-col :span="4">
  1575. <el-form-item label="制程次品:" prop="flatFeed" class="mab">
  1576. <el-input v-model="formdata3.value.制程次品" id="制程次品" @keydown="ent1($event)" style="width: 200px;" />
  1577. </el-form-item>
  1578. </el-col>
  1579. <el-col :span="4">
  1580. <el-form-item label="前工序废:" prop="flatFeed" class="mab" >
  1581. <el-input v-model="formdata3.value.前工序废" id="前工序废" @keydown="ent1($event)" style="width: 100px; margin-right: 30px;" />
  1582. </el-form-item>
  1583. </el-col>
  1584. <el-col :span="4">
  1585. <el-form-item label="来料异常:" prop="flatFeed" class="mab">
  1586. <el-input v-model="formdata3.value.来料异常" id="来料异常" @keydown="ent1($event)" style="width: 200px;" />
  1587. </el-form-item>
  1588. </el-col>
  1589. <el-col :span="8">
  1590. <el-form-item label="换版类型:" prop="flatFeed" class="mab">
  1591. <el-radio v-model="formdata3.value.换版类型" label="装新版" @keydown="ent1($event)"
  1592. :readonly="type2 !== 'create'"
  1593. :title="type2 === 'create' ? '新增' : 'readonly'">装新版</el-radio>
  1594. <el-radio v-model="formdata3.value.换版类型" label="装旧版" @keydown="ent1($event)"
  1595. :readonly="type2 !== 'create'"
  1596. :title="type2 === 'create' ? '新增' : 'readonly'">装旧版</el-radio>
  1597. <el-radio v-model="formdata3.value.换版类型" label="换版" @keydown="ent1($event)"
  1598. :readonly="type2 !== 'create'"
  1599. :title="type2 === 'create' ? '新增' : 'readonly'">换版</el-radio>
  1600. </el-form-item>
  1601. </el-col>
  1602. <el-col :span="4">
  1603. <el-form-item label="换版联拼数:" prop="flatFeed" class="mab">
  1604. <el-input v-model="formdata3.value.换版联拼数" id="换版联拼数" @keydown="ent1($event)" style="width: 100px;" :disabled="type2 !== 'create'"
  1605. :title="type2 === 'create' ? '新增' : 'disabled'"/>
  1606. </el-form-item>
  1607. </el-col>
  1608. </el-row>
  1609. <el-row :gutter="30" style="height: 40px;">
  1610. <el-col :span="5">
  1611. <el-form-item label="装版总工时:" prop="flatFeed" class="mab">
  1612. <el-input v-model="formdata3.value.装版总工时" id="装版总工时" @keydown="ent1($event)" style="width: 200px;" />
  1613. </el-form-item>
  1614. </el-col>
  1615. <el-col :span="5">
  1616. <el-form-item label="装版补产工时:" prop="flatFeed" class="mab" >
  1617. <el-input v-model="formdata3.value.装版工时" id="装版补产工时" @keydown="ent1($event)" style="width: 200px;" />
  1618. </el-form-item>
  1619. </el-col>
  1620. <el-col :span="5">
  1621. <el-form-item label="打样总工时:" prop="flatFeed" class="mab">
  1622. <el-input v-model="formdata3.value.打样总工时" id="打样总工时" @keydown="ent1($event)" style="width: 200px;" />
  1623. </el-form-item>
  1624. </el-col>
  1625. <el-col :span="5">
  1626. <el-form-item label="打样补产工时:" prop="flatFeed" class="mab">
  1627. <el-input v-model="formdata3.value.打样工时" id="打样补产工时" @keydown="ent1($event)" style="width: 200px;" />
  1628. </el-form-item>
  1629. </el-col>
  1630. <el-col :span="4">
  1631. <el-form-item label="保养工时:" prop="flatFeed" class="mab">
  1632. <el-input v-model="formdata3.value.保养工时" id="保养工时" @keydown="ent1($event)" style="width: 200px;" />
  1633. </el-form-item>
  1634. </el-col>
  1635. </el-row>
  1636. <el-row :gutter="24">
  1637. <el-col :span="6">
  1638. <el-form-item label="异常总工时:" prop="flatFeed" class="mab">
  1639. <el-input v-model="formdata3.value.异常总工时" id="异常总工时" style="margin-top:0px; margin-bottom: 1px;" @keydown="ent1($event)" placeholder="" />
  1640. </el-form-item>
  1641. </el-col>
  1642. <el-col :span="8">
  1643. <el-form-item label="异常类型:" prop="flatFeed" class="mab">
  1644. <el-input v-model="formdata3.value.异常类型" disabled id="异常类型" style="width: 100px;" />
  1645. </el-form-item>
  1646. </el-col>
  1647. <el-col :span="5" style="margin-top:0px; margin-bottom: 1px;">
  1648. <el-form-item label="异常补贴工时" prop="id" style="margin-top:0px; margin-bottom: 1px;">
  1649. <el-input v-model="formdata3.value.异常补时" id="异常补贴工时" style="margin-top:0px; margin-bottom: 1px;" @keydown="ent1($event)" placeholder="" />
  1650. </el-form-item>
  1651. </el-col>
  1652. </el-row>
  1653. <el-row :gutter="24" style="height: 40px;">
  1654. <el-col :span="8">
  1655. <el-form-item label="通电工时:" prop="flatFeed" class="mab">
  1656. <el-input v-model="formdata3.value.通电工时" id="通电工时" @keydown="ent1($event)" style="width: 100px;" />
  1657. </el-form-item>
  1658. </el-col>
  1659. <el-col :span="5" style="margin-top:0px; margin-bottom: 1px;">
  1660. <el-form-item label="定额代号" prop="id" style="margin-top:0px; margin-bottom: 1px;">
  1661. <el-input v-model="formdata3.value.dedh" id="定额代号" readonly style="margin-top:0px; margin-bottom: 1px;" @keydown="ent1($event)" placeholder="" />
  1662. </el-form-item>
  1663. </el-col>
  1664. <el-col :span="3" style="margin-top:0px; margin-bottom: 1px;">
  1665. <el-form-item label="码包" prop="id" style="margin-top:0px; margin-bottom: 1px;">
  1666. <el-input v-model="formdata3.value.码包" id="码包" style="margin-top:0px; margin-bottom: 1px;" @keydown="ent1($event)" placeholder="" />
  1667. </el-form-item>
  1668. </el-col>
  1669. </el-row>
  1670. <el-row :gutter="24" style="height: 40px;">
  1671. <el-col :span="5">
  1672. <el-form-item label="码开始行:" prop="flatFeed" class="mab">
  1673. <el-input v-model="formdata3.value.码开始行" id="码开始行" @keydown="ent1($event)" style="width: 200px;" />
  1674. </el-form-item>
  1675. </el-col>
  1676. <el-col :span="5">
  1677. <el-form-item label="码结束行:" prop="flatFeed" class="mab" >
  1678. <el-input v-model="formdata3.value.码结束行" id="码结束行" @keydown="ent1($event)" style="width: 100px; margin-right: 30px;" />
  1679. </el-form-item>
  1680. </el-col>
  1681. <el-col :span="5">
  1682. <el-form-item label="主电表:" prop="flatFeed" class="mab">
  1683. <el-input v-model="formdata3.value.主电表" id="主电表" @keydown="ent1($event)" style="width: 200px;" />
  1684. </el-form-item>
  1685. </el-col>
  1686. <el-col :span="7">
  1687. <el-form-item label="辅电表:" prop="flatFeed" class="mab">
  1688. <el-input v-model="formdata3.value.辅电表" id="辅电表" @keydown="ent1($event)" style="width: 200px;" />
  1689. </el-form-item>
  1690. </el-col>
  1691. </el-row>
  1692. <div style="display: flex;">
  1693. <div style="width: 95vh;">组员及分配比例</div>
  1694. <div style="width: 9vh;margin-left: 70px;">特殊组员</div>
  1695. <div style="">拉料人员</div>
  1696. </div>
  1697. <el-row :gutter="10" style="margin-top: 1vh;">
  1698. <el-col :span="2"><el-input v-model="formdata3.value.bzdh" id="bzdh" @keydown="ent1($event)"/></el-col>
  1699. <el-col :span="2"><el-input v-model="formdata3.value.组员1['编号']" id="bh1" @keyup.enter.native="GetYg($event, '1')"/></el-col>
  1700. <el-col :span="2"><el-input v-model="formdata3.value.组员2['编号']" id="bh2" @keyup.enter.native="GetYg($event, '2')"/></el-col>
  1701. <el-col :span="2"><el-input v-model="formdata3.value.组员3['编号']" id="bh3" @keyup.enter.native="GetYg($event, '3')"/></el-col>
  1702. <el-col :span="2"><el-input v-model="formdata3.value.组员4['编号']" id="bh4" @keyup.enter.native="GetYg($event, '4')"/></el-col>
  1703. <el-col :span="2"><el-input v-model="formdata3.value.组员5['编号']" id="bh5" @keyup.enter.native="GetYg($event, '5')"/></el-col>
  1704. <el-col :span="2"><el-input v-model="formdata3.value.组员6['编号']" id="bh6" @keyup.enter.native="GetYg($event, '6')"/></el-col>
  1705. <el-col :span="2"><el-input v-model="formdata3.value.组员7['编号']" id="bh7" @keyup.enter.native="GetYg($event, '7')"/></el-col>
  1706. <el-col :span="2"><el-input v-model="formdata3.value.组员8['编号']" id="bh8" @keyup.enter.native="GetYg($event, '8')"/></el-col>
  1707. <el-col :span="2"><el-input v-model="formdata3.value.组员9['编号']" id="bh9" @keyup.enter.native="GetYg($event, '9')"/></el-col>
  1708. <el-col :span="2"><el-input v-model="formdata3.value.组员10['编号']" id="bh10" @keyup.enter.native="GetYg($event, '10')"/></el-col>
  1709. <el-col :span="2">
  1710. <el-select v-model="formdata3.value.拉料['编号']" id="bh11" @change="GetLl('create')">
  1711. <el-option label="" value="" />
  1712. <el-option label="自备" value="自备" />
  1713. <el-option label="李有文" value="李有文" />
  1714. <el-option label="张杭强" value="张杭强" />
  1715. <el-option label="朱喜文" value="朱喜文" />
  1716. <el-option label="刘旭青" value="刘旭青" />
  1717. <el-option label="刘芳民" value="刘芳民" />
  1718. <el-option label="李当林" value="李当林" />
  1719. <el-option label="王赞文" value="王赞文" />
  1720. </el-select>
  1721. </el-col>
  1722. </el-row>
  1723. <el-row :gutter="10" style="margin-top: 10px;">
  1724. <el-col :span="2"></el-col>
  1725. <el-col :span="2"><el-input v-model="formdata3.value.组员1['姓名']" id="name1"/></el-col>
  1726. <el-col :span="2"><el-input v-model="formdata3.value.组员2['姓名']" id="name2"/></el-col>
  1727. <el-col :span="2"><el-input v-model="formdata3.value.组员3['姓名']" id="name3"/></el-col>
  1728. <el-col :span="2"><el-input v-model="formdata3.value.组员4['姓名']" id="name4"/></el-col>
  1729. <el-col :span="2"><el-input v-model="formdata3.value.组员5['姓名']" id="name5"/></el-col>
  1730. <el-col :span="2"><el-input v-model="formdata3.value.组员6['姓名']" id="name6"/></el-col>
  1731. <el-col :span="2"><el-input v-model="formdata3.value.组员7['姓名']" id="name7"/></el-col>
  1732. <el-col :span="2"><el-input v-model="formdata3.value.组员8['姓名']" id="name8"/></el-col>
  1733. <el-col :span="2"><el-input v-model="formdata3.value.组员9['姓名']" id="name9"/></el-col>
  1734. <el-col :span="2"><el-input v-model="formdata3.value.组员10['姓名']" id="name10"/></el-col>
  1735. <el-col :span="2"><el-input v-model="formdata3.value.拉料['姓名']" id="name11"/></el-col>
  1736. </el-row>
  1737. <el-row :gutter="10" style="margin-top: 10px;">
  1738. <el-col :span="2"></el-col>
  1739. <el-col :span="2"><el-input v-model="formdata3.value.组员1['比例']" id="rate1" @input="updateTotal" @keydown="ent($event, 'bh11', 'rate1', 'rate2')" placeholder="" /></el-col>
  1740. <el-col :span="2"><el-input v-model="formdata3.value.组员2['比例']" id="rate2" @input="updateTotal" @keydown="ent($event, 'rate1', 'rate2', 'rate3')" placeholder="" /></el-col>
  1741. <el-col :span="2"><el-input v-model="formdata3.value.组员3['比例']" id="rate3" @input="updateTotal" @keydown="ent($event, 'rate2', 'rate3', 'rate4')" placeholder="" /></el-col>
  1742. <el-col :span="2"><el-input v-model="formdata3.value.组员4['比例']" id="rate4" @input="updateTotal" @keydown="ent($event, 'rate3', 'rate4', 'rate5')" placeholder="" /></el-col>
  1743. <el-col :span="2"><el-input v-model="formdata3.value.组员5['比例']" id="rate5" @input="updateTotal" @keydown="ent($event, 'rate4', 'rate5', 'rate6')" placeholder="" /></el-col>
  1744. <el-col :span="2"><el-input v-model="formdata3.value.组员6['比例']" id="rate6" @input="updateTotal" @keydown="ent($event, 'rate5', 'rate6', 'rate7')" placeholder="" /></el-col>
  1745. <el-col :span="2"><el-input v-model="formdata3.value.组员7['比例']" id="rate7" @input="updateTotal" @keydown="ent($event, 'rate6', 'rate7', 'rate8')" placeholder="" /></el-col>
  1746. <el-col :span="2"><el-input v-model="formdata3.value.组员8['比例']" id="rate8" @input="updateTotal" @keydown="ent($event, 'rate7', 'rate8', 'rate9')" placeholder="" /></el-col>
  1747. <el-col :span="2"><el-input v-model="formdata3.value.组员9['比例']" id="rate9" @input="updateTotal" @keydown="ent($event, 'rate8', 'rate9', 'rate10')" placeholder="" /></el-col>
  1748. <el-col :span="2"><el-input v-model="formdata3.value.组员10['比例']" id="rate10" @input="updateTotal" @keydown="ent($event, 'rate9', 'rate10', '工单编号')" placeholder="" /></el-col>
  1749. <el-col :span="2"></el-col>
  1750. </el-row>
  1751. <template #footer>
  1752. <div class="dialog-footer">
  1753. <el-button
  1754. v-if="type2 !== 'create'"
  1755. type="primary"
  1756. @click="banzuzhang"
  1757. >
  1758. 班组长审核
  1759. </el-button>
  1760. <el-button
  1761. v-if="type2 !== 'create'"
  1762. type="primary"
  1763. @click="tongjiyuan"
  1764. >
  1765. 统计员审核
  1766. </el-button>
  1767. <el-button @click="closeDialog">取 消</el-button>
  1768. <el-button type="primary" @click="chanliangenterDialog">确 定</el-button>
  1769. </div>
  1770. </template>
  1771. </el-dialog>
  1772. <!-- 班组长审核 -->
  1773. <el-dialog v-model="leaderAuditDialog" title="班组长审核" width="700px" @close="closeLeaderAudit">
  1774. <div class="detail-form">
  1775. <el-row :gutter="20">
  1776. <el-col :span="12">
  1777. <el-form-item label="系数" label-width="80px">
  1778. <el-input v-model="leaderForm.coefficient" placeholder="请输入系数" />
  1779. </el-form-item>
  1780. </el-col>
  1781. <el-col :span="12">
  1782. <el-form-item label="换版联拼数">
  1783. <el-input v-model="leaderForm.换版联拼数" placeholder="" />
  1784. </el-form-item>
  1785. </el-col>
  1786. <el-col :span="12">
  1787. <el-form-item label="换版总工时">
  1788. <el-input v-model="leaderForm.换版总工时" placeholder="" />
  1789. </el-form-item>
  1790. </el-col>
  1791. <el-col :span="12">
  1792. <el-form-item label="换版类型" label-width="80px">
  1793. <el-select v-model="leaderForm.换版类型" placeholder="请选择换版类型">
  1794. <el-option label="装新版" value="装新版" />
  1795. <el-option label="装旧版" value="装旧版" />
  1796. <el-option label="换版" value="换版" />
  1797. </el-select>
  1798. </el-form-item>
  1799. </el-col>
  1800. </el-row>
  1801. </div>
  1802. <template #footer>
  1803. <span class="dialog-footer">
  1804. <el-button @click="closeLeaderAudit">取消</el-button>
  1805. <el-button type="primary" @click="submitLeaderAudit">确认</el-button>
  1806. </span>
  1807. </template>
  1808. </el-dialog>
  1809. <!-- 统计员审核 -->
  1810. <el-dialog v-model="statAuditDialog" title="统计员审核" width="700px" @close="closeStatAudit">
  1811. <div class="detail-form">
  1812. <el-row :gutter="20">
  1813. <el-col :span="12">
  1814. <el-form-item label="装版补产工时">
  1815. <el-input v-model="statForm.装版补产工时" placeholder="" />
  1816. </el-form-item>
  1817. </el-col>
  1818. </el-row>
  1819. </div>
  1820. <template #footer>
  1821. <span class="dialog-footer">
  1822. <el-button @click="closeStatAudit">取消</el-button>
  1823. <el-button type="primary" @click="submitStatAudit">确认</el-button>
  1824. </span>
  1825. </template>
  1826. </el-dialog>
  1827. <!-- JP机新增定额代号弹窗 -->
  1828. <el-dialog v-model="FJPGetDedhVisible" id="tableFplb" @keydown="FJPent($event)" style="margin-top: 5%;" >
  1829. <el-form>
  1830. <el-form-item label="选择定额代号" class="mab" prop="keyOrder"></el-form-item>
  1831. <div style="border:1px solid #eee; width:100%; height: 600px; overflow-y: auto;">
  1832. <el-tree :data="FJPGetDedhtreeData" ref="FJPtable_fplb"
  1833. @keydown="FJPhandleTreeKeydown"
  1834. :props="{ children: 'children',label: 'label'}"
  1835. node-key="id" @node-click="FJPhandleFplbClick">
  1836. </el-tree>
  1837. </div>
  1838. </el-form>
  1839. </el-dialog>
  1840. <!-- JP机台独立页面 新增-->
  1841. <el-dialog v-model="JPchanliangVisible" :before-close="JPcloseDialog" style="width: 60%;margin-top: 5%;" :title="'新增班组产量提报'" destroy-on-close>
  1842. <el-row>
  1843. <el-form :model="JPformdata" label-position="right" ref="elFormRef" :rules="rule" >
  1844. <el-row :gutter="24">
  1845. <el-form-item label="工单编号:" prop="customerCode" class="mab" label-width="90">
  1846. <el-input v-model="JPformdata['工单编号']" style="width: 110px;" placeholder="Enter回车" id="新增工单编号" @blur="JPgetCPMCsubmit()" @keydown="JPent($event)"/>
  1847. </el-form-item>
  1848. <el-form-item label="产品名称:" prop="customerName" class="mab" label-width="100">
  1849. <el-input v-model="JPformdata['产品名称']" readonly style="width: 520px;" id="产品名称"/>
  1850. </el-form-item>
  1851. </el-row>
  1852. <el-row :gutter="24">
  1853. <el-form-item label="印件号:" prop="customerCode" class="mab" label-width="90">
  1854. <el-input v-model="JPformdata['印件号']" style="width: 110px;" id="印件号" placeholder="Enter回车" @keydown="JPent($event)"/>
  1855. </el-form-item>
  1856. <el-form-item label="印件名称:" prop="customerName" class="mab" label-width="100">
  1857. <el-input v-model="JPformdata['印件名称']" readonly style="width: 520px;" id="印件名称" />
  1858. </el-form-item>
  1859. </el-row>
  1860. <el-row :gutter="24">
  1861. <el-form-item label="工序号:" prop="customerCode" class="mab" label-width="90">
  1862. <el-input v-model="JPformdata['工序号']" style="width: 110px;" id="工序号" placeholder="Enter回车" @blur="JPgetGXsubmit()" @keydown="JPent($event)"/>
  1863. </el-form-item>
  1864. <el-form-item label="工序名称" prop="customerName" class="mab" label-width="100">
  1865. <el-input v-model="JPformdata['工序名称']" readonly style="width: 300px;" id="工序名称" />
  1866. </el-form-item>
  1867. <el-form-item label="检验类别:" prop="customerCode" class="mab" label-width="90">
  1868. <el-input v-model="JPformdata['检验类别']" readonly placeholder="Enter回车" style="width: 100px;" id="检验类别" @keydown="JPent($event)"/>
  1869. </el-form-item>
  1870. <el-form-item label="废品率系数:" prop="customerCode" class="mab" label-width="100">
  1871. <el-input v-model="JPformdata['废品率系数']" style="width: 100px;" id="废品率系数" @keydown="JPent($event)"/>
  1872. </el-form-item>
  1873. </el-row>
  1874. <el-row :gutter="24">
  1875. <el-form-item label="日期: " label-width="90">
  1876. <el-input type="date" max="9999-12-31" v-model="JPformdata['日期']" id = '日期' @keydown="JPent($event)" @focus="rqHandleFocus()"
  1877. style="width: 110px;" />
  1878. </el-form-item>
  1879. <el-form-item label="机器:" prop="customerCode" class="mab" label-width="100">
  1880. <el-input v-model="JPformdata['机器']" style="width: 110px;" placeholder="Enter回车" id="机器" @keydown="JPent($event)"/>
  1881. </el-form-item>
  1882. <el-form-item label="流程标牌:" prop="customerCode" class="mab" label-width="100">
  1883. <el-input v-model="JPformdata['流程标牌']" style="width: 80px;" id="流程标牌" @keydown="JPent($event)"/>
  1884. </el-form-item>
  1885. <el-form-item label="计件箱数:" prop="customerCode" class="mab" label-width="100">
  1886. <el-input v-model="JPformdata['计件箱数']" style="width: 100px;" id="计件箱数" @keydown="JPent($event)"/>
  1887. </el-form-item>
  1888. <el-form-item label="每箱数量:" prop="customerCode" class="mab" label-width="100">
  1889. <el-input v-model="JPformdata['每箱数量']" style="width: 100px;" id="每箱数量" @keydown="JPent($event)"/>
  1890. </el-form-item>
  1891. </el-row>
  1892. <el-row :gutter="24">
  1893. <el-form-item label="换膜总工时" prop="customerCode" class="mab" label-width="90">
  1894. <el-input v-model="JPformdata['换膜总工时']" style="width: 100px;" id="换膜总工时" @keydown="JPent($event)"/>
  1895. </el-form-item>
  1896. <el-form-item label="换膜补产工时" prop="customerCode" class="mab" label-width="110">
  1897. <el-input v-model="JPformdata['换膜补产工时']" style="width: 100px;" id="换膜总工时" @keydown="JPent($event)"/>
  1898. </el-form-item>
  1899. <el-form-item label="保养工时:" prop="customerCode" class="mab" label-width="290">
  1900. <el-input v-model="JPformdata['保养工时']" style="width: 100px;" id="保养工时" @keydown="JPent($event)"/>
  1901. </el-form-item>
  1902. </el-row>
  1903. <el-row :gutter="24">
  1904. <el-form-item label="异常总工时:" prop="customerCode" class="mab" label-width="110">
  1905. <el-input v-model="JPformdata['异常总工时']" style="width: 100px;" id="异常总工时" @keydown="JPent($event)"/>
  1906. </el-form-item>
  1907. <el-form-item label="异常类型:" prop="customerCode" class="mab" label-width="110">
  1908. <el-input v-model="JPformdata['异常类型']" style="width: 100px;" id="异常类型" @keydown="JPent($event)"/>
  1909. </el-form-item>
  1910. <el-form-item label="异常补贴工时:" prop="customerCode" class="mab" label-width="290">
  1911. <el-input v-model="JPformdata['异常补贴工时']" style="width: 100px;" id="异常补贴工时" @keydown="JPent($event)"/>
  1912. </el-form-item>
  1913. <el-form-item label="通电工时" prop="customerCode" class="mab" label-width="100">
  1914. <el-input v-model="JPformdata['通电工时']" style="width: 100px;" id="通电工时" @keydown="JPent($event)"/>
  1915. </el-form-item>
  1916. </el-row>
  1917. <el-row :gutter="24">
  1918. <el-form-item label="定额代号:" prop="customerCode" class="mab" label-width="90">
  1919. <el-input v-model="JPformdata['定额代号']" style="width: 160px;" placeholder="Enter回车" id="定额代号" @keydown="JPent($event)"/>
  1920. </el-form-item>
  1921. </el-row>
  1922. <br>
  1923. <div style="display: flex;">
  1924. <div>组员及分配比例</div>
  1925. </div>
  1926. <el-row :gutter="10" style="margin-top: 1vh;">
  1927. <el-col :span="2">
  1928. <el-input v-model="JPformdata['bzdh']" id="bzdh" @keydown="JPent($event)"/>
  1929. </el-col>
  1930. <el-col v-for="i in 10" :key="i" :span="2">
  1931. <el-input v-model="JPformdata['组员' + i]['编号']" :id="'bh' + i" @keydown="JPent($event,i,'1')"/>
  1932. </el-col>
  1933. </el-row>
  1934. <el-row :gutter="10" style="margin-top: 1vh;">
  1935. <el-col :span="2">
  1936. <!-- 空列,用于对齐 -->
  1937. </el-col>
  1938. <el-col v-for="i in 10" :key="i" :span="2">
  1939. <el-input v-model="JPformdata['组员' + i]['姓名']" :id="'xm' + i" readonly/>
  1940. </el-col>
  1941. </el-row>
  1942. <el-row :gutter="10" style="margin-top: 1vh;">
  1943. <el-col :span="2">
  1944. <!-- 空列,用于对齐 -->
  1945. </el-col>
  1946. <el-col v-for="i in 10" :key="i" :span="2">
  1947. <el-input v-model="JPformdata['组员' + i]['比例']" :id="'bl' + i" @keydown="JPent($event,i,'比例')" />
  1948. </el-col>
  1949. </el-row>
  1950. </el-form>
  1951. </el-row>
  1952. <template #footer>
  1953. <div class="dialog-footer" style="text-align: right;">
  1954. <el-button @click="JPcloseDialog">取 消</el-button>
  1955. <el-button type="primary" @click="JPenterDialog">确 定</el-button>
  1956. </div>
  1957. </template>
  1958. </el-dialog>
  1959. <!-- JP检品独立 印件选择-->
  1960. <el-dialog v-model="JPdialogSelectVisible_Yj" title="选择" destroy-on-close width="600px" style='height: 400px;' @keydown="JPselect_Yj($event)" >
  1961. <el-table tooltip-effect="dark" :data="JPselectData_Yj" ref="table_xzyj"
  1962. row-key="ID" highlight-current-row="true"
  1963. border style="width:100%"
  1964. :row-style="{ height: '20px' }" :cell-style="{ padding: '0px' }"
  1965. :header-row-style="{ height: '20px' }" :header-cell-style="{ padding: '0px' }"
  1966. @row-dblclick="JPhandleSelectClick_Yj" >
  1967. <el-table-column prop="yjno" label="印件号" width="80" />
  1968. <el-table-column prop="yjmc" label="印件名称" width="480" />
  1969. </el-table>
  1970. </el-dialog>
  1971. <!-- JP检品独立 新增机台机器-->
  1972. <el-dialog v-model="JPdialogVisible_JT" title="机台机器选择" destroy-on-close width="600px" style="height: 600px;" @keydown="JPselect_JT($event)">
  1973. <el-table tooltip-effect="dark" :data="JPselectData_JT" row-key="ID" highlight-current-row="true"
  1974. border style="width:100%" ref="table_JT" :row-style="{ height: '20px' }" :cell-style="{ padding: '0px' }"
  1975. :header-row-style="{ height: '20px' }" :header-cell-style="{ padding: '0px' }" @row-dblclick="JPhandleSelectClick_JT">
  1976. <el-table-column prop="机台" label="机台" />
  1977. </el-table>
  1978. </el-dialog>
  1979. <!-- JP检品独立 新增印件选择 -->
  1980. <el-dialog v-model="JPdialogSelectVisible_Gx" title="选择" destroy-on-close width="600px" style="margin-top: 2%;" @keydown="JPselect_xz($event)" >
  1981. <el-table tooltip-effect="dark" :data="JPselectData_Gx" ref="table_gx"
  1982. row-key="ID" highlight-current-row="true"
  1983. :row-style="{ height: '0px' }" :cell-style="{ padding: '0px' }"
  1984. :header-row-style="{ height: '0px' }" :header-cell-style="{ padding: '0px' }"
  1985. border style="width:100%"
  1986. @row-dblclick="JPhandleSelectClick_Gx">
  1987. <el-table-column prop="name" label="" width="560" />
  1988. </el-table>
  1989. </el-dialog>
  1990. <el-dialog v-model="JPdialogSelectVisible_LX" title="选择" destroy-on-close width="300px" @keydown="JPselect_jylb($event)" >
  1991. <el-table
  1992. :data="JPtableData"
  1993. ref="jylb_table" row-key="ID"
  1994. :row-style="{ height: '50px' }"
  1995. :cell-style="{ padding: '0px' }"
  1996. :header-row-style="{ height: '0px' }"
  1997. :header-cell-style="{ padding: '0px' }"
  1998. @row-dblclick="JPhandleRowClick"
  1999. highlight-current-row
  2000. >
  2001. <el-table-column prop="name" label="名称" width="150"></el-table-column>
  2002. <el-table-column prop="type" label="类别" width="100"></el-table-column>
  2003. </el-table>
  2004. </el-dialog>
  2005. <el-dialog v-model="MachineVisible" :before-close="closeMachineVisible" :title="type === '0' ? '新增' : '机台状态显示'"
  2006. destroy-on-close width="80%" style="height: 100%;">
  2007. <div class="button-container">
  2008. <button v-for="(item, index) in machineData" :key="index" class="custom-button" @click="handleButtonClick(item.设备编号)">
  2009. <img :src="`/src/assets/${item.状态}.png`" :alt="altText" style="max-width: 100%; height: auto;"/>
  2010. <span style="margin-top: 8px;">{{ item.设备编号 + ' - ' + item.设备名称 }}</span>
  2011. </button>
  2012. </div>
  2013. </el-dialog>
  2014. <!-- JP机新增定额代号弹窗 -->
  2015. <el-dialog v-model="GetDedhVisible" id="tableFplb" @keydown="ent($event)" style="margin-top: 5%;" >
  2016. <el-form>
  2017. <el-form-item label="选择定额代号" class="mab" prop="keyOrder"></el-form-item>
  2018. <div style="border:1px solid #eee; width:100%; height: 600px; overflow-y: auto;">
  2019. <el-tree :data="GetDedhtreeData" ref="table_fplb"
  2020. @keydown="handleTreeKeydown"
  2021. :props="{ children: 'children',label: 'label'}"
  2022. node-key="id" @node-click="handleFplbClick">
  2023. </el-tree>
  2024. </div>
  2025. </el-form>
  2026. </el-dialog>
  2027. <!--当日上报产量 组员及分配比例-->
  2028. <el-dialog v-model="blModellist" :before-close="() => blModellist = false" style="width: 20%" @keydown="selectBZRRs($event)">
  2029. <el-form>
  2030. <div>
  2031. <el-table :data="employeeDatalist" border :show-overflow-tooltip="true" :cell-class-name="blplanUsageCellClass"
  2032. ref="tableBZRRs"
  2033. highlight-current-row="true"
  2034. @row-click="tablebllickHandlerlist($event)">
  2035. <el-table-column prop="员工编号" label="员工编号"></el-table-column>
  2036. <el-table-column prop="ygxm" label="员工姓名"></el-table-column>
  2037. </el-table>
  2038. </div>
  2039. </el-form>
  2040. </el-dialog>
  2041. <!--当日上报产量 组员及分配比例-->
  2042. <el-dialog v-model="JPblModellist" style="width: 20%" @keydown="JPselect_zyfp($event)" >
  2043. <el-form>
  2044. <div>
  2045. <el-table :data="JPemployeeDatalist"
  2046. ref="zyfp_table" row-key="ID"
  2047. :row-style="{ height: '0px' }"
  2048. :cell-style="{ padding: '0px' }"
  2049. :header-row-style="{ height: '0px' }"
  2050. :header-cell-style="{ padding: '0px' }"
  2051. highlight-current-row
  2052. border :show-overflow-tooltip="true" :cell-class-name="JPblplanUsageCellClass" @row-click="JPtablebllickHandlerlist($event)">
  2053. <el-table-column prop="员工编号" label="员工编号"></el-table-column>
  2054. <el-table-column prop="ygxm" label="员工姓名"></el-table-column>
  2055. </el-table>
  2056. </div>
  2057. </el-form>
  2058. </el-dialog>
  2059. <!-- 修改班组产量提报 -->
  2060. <el-dialog v-model="JPchanliangVisibleedit" :before-close="JPcloseDialogedit" style="width: 60%;margin: 50px auto" :title="'修改班组产量提报'" destroy-on-close>
  2061. <el-row>
  2062. <el-form :model="JPformdata" label-position="right" ref="elFormRef" :rules="rule" >
  2063. <el-row :gutter="24">
  2064. <el-form-item label="工单编号:" prop="customerCode" class="mab" label-width="90">
  2065. <el-input v-model="JPformdataedit['工单编号']" style="width: 110px;" placeholder="Enter回车" id="修改工单编号" @blur="JPgetCPMCsubmitedit()" @keydown="JPentedit($event)"/>
  2066. </el-form-item>
  2067. <el-form-item label="" prop="customerName" class="mab" >
  2068. <el-input v-model="JPformdataedit['产品名称']" readonly style="width: 520px;" id="产品名称" />
  2069. </el-form-item>
  2070. </el-row>
  2071. <el-row :gutter="24">
  2072. <el-form-item label="印件号:" prop="customerCode" class="mab" label-width="90">
  2073. <el-input v-model="JPformdataedit['印件号']" style="width: 110px;" id="印件号" placeholder="Enter回车" @keydown="JPentedit($event)"/>
  2074. </el-form-item>
  2075. <el-form-item label="" prop="customerName" class="mab">
  2076. <el-input v-model="JPformdataedit['印件名称']" readonly style="width: 520px;" id="印件名称" />
  2077. </el-form-item>
  2078. </el-row>
  2079. <el-row :gutter="24">
  2080. <el-form-item label="工序号" prop="customerCode" class="mab" label-width="90">
  2081. <el-input v-model="JPformdataedit['工序号']" style="width: 110px;" id="工序号" placeholder="Enter回车" @keydown="JPentedit($event)"/>
  2082. </el-form-item>
  2083. <el-form-item label="" prop="customerName" class="mab">
  2084. <el-input v-model="JPformdataedit['工序名称']" readonly style="width: 520px;" id="工序名称" />
  2085. </el-form-item>
  2086. <el-form-item label="检验类别:" prop="customerCode" class="mab" label-width="100">
  2087. <el-input v-model="JPformdataedit['检验类别']" readonly style="width: 110px;" id="检验类别" @keydown="JPentedit($event)"/>
  2088. </el-form-item>
  2089. <el-form-item label="废品率系数:" prop="customerCode" class="mab" label-width="100">
  2090. <el-input v-model="JPformdataedit['废品率系数']" style="width: 110px;" id="废品率系数" @keydown="JPentedit($event)"/>
  2091. </el-form-item>
  2092. </el-row>
  2093. <el-row :gutter="24">
  2094. <el-form-item label="日期:" prop="customerCode" class="mab" label-width="90">
  2095. <el-date-picker v-model="JPformdataedit['日期']" style="width: 130px;" type="datetime" format="YYYY/MM/DD" value-format="YYYY-MM-DD" @keydown="JPentedit($event)"/>
  2096. </el-form-item>
  2097. <el-form-item label="机器:" prop="customerCode" class="mab" label-width="80">
  2098. <el-input v-model="JPformdataedit['机器']" style="width: 90px;" id="机器" @keydown="JPentedit($event)"/>
  2099. </el-form-item>
  2100. <el-form-item label="流程标牌:" prop="customerCode" class="mab" label-width="80">
  2101. <el-input v-model="JPformdataedit['流程标牌']" style="width: 110px;" id="流程标牌" @keydown="JPentedit($event)"/>
  2102. </el-form-item>
  2103. <el-form-item label="计件箱数:" prop="customerCode" class="mab" label-width="180">
  2104. <el-input v-model="JPformdataedit['计件箱数']" style="width: 110px;" id="计件箱数" @keydown="JPentedit($event)"/>
  2105. </el-form-item>
  2106. <el-form-item label="每箱数量:" prop="customerCode" class="mab" label-width="100">
  2107. <el-input v-model="JPformdataedit['每箱数量']" style="width: 110px;" id="每箱数量" @keydown="JPentedit($event)"/>
  2108. </el-form-item>
  2109. </el-row>
  2110. <el-row :gutter="24">
  2111. <el-form-item label="换膜总工时" prop="customerCode" class="mab" label-width="90">
  2112. <el-input v-model="JPformdataedit['换膜总工时']" style="width: 110px;" id="换膜总工时" @keydown="JPentedit($event)"/>
  2113. </el-form-item>
  2114. <el-form-item label="换膜补产工时:" prop="customerCode" class="mab" label-width="130">
  2115. <el-input v-model="JPformdataedit['换膜补产工时']" style="width: 110px;" id="换膜补产工时" @keydown="JPentedit($event)"/>
  2116. </el-form-item>
  2117. <el-form-item label="保养工时" prop="customerCode" class="mab" label-width="320">
  2118. <el-input v-model="JPformdataedit['保养工时']" style="width: 110px;" id="保养工时:" @keydown="JPentedit($event)"/>
  2119. </el-form-item>
  2120. </el-row>
  2121. <el-row :gutter="24">
  2122. <el-form-item label="异常总工时" prop="customerCode" class="mab" label-width="110">
  2123. <el-input v-model="JPformdataedit['异常总工时']" style="width: 110px;" id="异常总工时" @keydown="JPentedit($event)"/>
  2124. </el-form-item>
  2125. <el-form-item label="异常类型:" prop="customerCode" class="mab" label-width="130">
  2126. <el-input v-model="JPformdataedit['异常类型']" style="width: 110px;" id="异常类型" @keydown="JPentedit($event)"/>
  2127. </el-form-item>
  2128. <el-form-item label="异常补贴工时" prop="customerCode" class="mab" label-width="350">
  2129. <el-input v-model="JPformdataedit['异常补贴工时']" style="width: 110px;" id="异常补贴工时" @keydown="JPentedit($event)"/>
  2130. </el-form-item>
  2131. <el-form-item label="通电工时" prop="customerCode" class="mab" label-width="90">
  2132. <el-input v-model="JPformdataedit['通电工时']" style="width: 110px;" id="通电工时" @keydown="JPentedit($event)"/>
  2133. </el-form-item>
  2134. </el-row>
  2135. <el-row :gutter="24">
  2136. <el-form-item label="定额代号" prop="customerCode" class="mab" label-width="90">
  2137. <el-input v-model="JPformdataedit['定额代号']" style="width: 200px;" readonly id="定额代号" @keydown="JPentedit($event)"/>
  2138. </el-form-item>
  2139. </el-row>
  2140. <div style="display: flex;">
  2141. <div>组员及分配比例</div>
  2142. </div>
  2143. <el-row :gutter="10" style="margin-top: 1vh;">
  2144. <el-col :span="2">
  2145. <el-input v-model="JPformdataedit['bzdh']" id="bzdh" @keydown="JPentedit($event)"/>
  2146. </el-col>
  2147. <el-col v-for="i in 10" :key="i" :span="2">
  2148. <el-input v-model="JPformdataedit['组员' + i]['编号']" :id="'bh' + i" @keydown="JPentedit($event,i,'1')"/>
  2149. </el-col>
  2150. </el-row>
  2151. <el-row :gutter="10" style="margin-top: 1vh;">
  2152. <el-col :span="2">
  2153. <!-- 空列,用于对齐 -->
  2154. </el-col>
  2155. <el-col v-for="i in 10" :key="i" :span="2">
  2156. <el-input readonly v-model="JPformdataedit['组员' + i]['姓名']" :id="'xm' + i" @keydown="JPentedit($event)"/>
  2157. </el-col>
  2158. </el-row>
  2159. <el-row :gutter="10" style="margin-top: 1vh;">
  2160. <el-col :span="2">
  2161. <!-- 空列,用于对齐 -->
  2162. </el-col>
  2163. <el-col v-for="i in 10" :key="i" :span="2">
  2164. <el-input v-model="JPformdataedit['组员' + i]['比例']" :id="'bl' + i" @keydown="JPentedit($event)" />
  2165. </el-col>
  2166. </el-row>
  2167. </el-form>
  2168. </el-row>
  2169. <template #footer>
  2170. <div class="dialog-footer" style="text-align: right;">
  2171. <el-button @click="JPcloseDialogedit">取 消</el-button>
  2172. <el-button type="primary" @click="JPenterDialogedit">确 定</el-button>
  2173. </div>
  2174. </template>
  2175. </el-dialog>
  2176. <!-- 修改 JP检品独立 印件选择-->
  2177. <el-dialog v-model="JPdialogSelectVisible_Yjedit" title="选择" destroy-on-close width="600px" @keydown="JPselect_Yjedit($event)" >
  2178. <el-table tooltip-effect="dark" :data="JPselectData_Yjedit" ref="table_xgyj"
  2179. row-key="ID" highlight-current-row="true"
  2180. border style="width:100%"
  2181. @row-dblclick="JPhandleSelectClick_Yjedit" >
  2182. <el-table-column prop="yjno" label="印件号" width="80" />
  2183. <el-table-column prop="yjmc" label="印件名称" width="480" />
  2184. </el-table>
  2185. </el-dialog>
  2186. <!-- 修改 JP检品独立 工序选择 -->
  2187. <el-dialog v-model="JPdialogSelectVisible_Gxedit" title="选择" destroy-on-close width="600px" style="margin-top: 2%;" @keydown="JPselect_xzedit($event)">
  2188. <el-table tooltip-effect="dark" :data="JPselectData_Gxedit" ref="table_gxedit"
  2189. row-key="ID" highlight-current-row="true"
  2190. :row-style="{ height: '0px' }" :cell-style="{ padding: '0px' }"
  2191. :header-row-style="{ height: '0px' }" :header-cell-style="{ padding: '0px' }"
  2192. border style="width:100%"
  2193. @row-dblclick="JPhandleSelectClick_Gxedit">
  2194. <el-table-column prop="name" label="" width="560" />
  2195. </el-table>
  2196. </el-dialog>
  2197. <!-- JP检品独立 修改机台机器-->
  2198. <el-dialog v-model="JPdialogVisible_JTedit" title="机台机器选择" destroy-on-close width="600px" style="height: 600px;" @keydown="JPselect_JTedit($event)">
  2199. <el-table tooltip-effect="dark" :data="JPselectData_JTedit" row-key="ID" highlight-current-row="true"
  2200. border style="width:100%" ref="table_JTedit" :row-style="{ height: '20px' }" :cell-style="{ padding: '0px' }"
  2201. :header-row-style="{ height: '20px' }" :header-cell-style="{ padding: '0px' }" @row-dblclick="JPhandleSelectClick_JTedit">
  2202. <el-table-column prop="机台" label="机台" />
  2203. </el-table>
  2204. </el-dialog>
  2205. <el-dialog v-model="JPdialogSelectVisible_LXedit" title="选择" destroy-on-close width="300px" @keydown="JPselect_jylbedit($event)">
  2206. <el-table :data="JPtableDataedit" ref="jylbedit_table"
  2207. :row-style="{ height: '50px' }" :cell-style="{ padding: '0px' }"
  2208. :header-row-style="{ height: '0px' }" :header-cell-style="{ padding: '0px' }"
  2209. @row-dblclick="JPhandleRowClickedit" highlight-current-row>
  2210. <el-table-column prop="name" label="名称" width="150"></el-table-column>
  2211. <el-table-column prop="type" label="类别" width="100"></el-table-column>
  2212. </el-table>
  2213. </el-dialog>
  2214. <!-- JP机修改定额代号弹窗 -->
  2215. <el-dialog v-model="GetDedhVisibleedit" id="tableFplb" @keydown="entedit($event)" style="margin-top: 5%;" >
  2216. <el-form>
  2217. <el-form-item label="选择定额代号" class="mab" prop="keyOrder"></el-form-item>
  2218. <div style="border:1px solid #eee; width:100%; height: 600px; overflow-y: auto;">
  2219. <el-tree :data="GetDedhtreeDataedit" ref="table_fplbedit" @keydown="handleTreeKeydownedit"
  2220. :props="{ children: 'children',label: 'label'}" node-key="id" @node-click="handleFplbClickedit">
  2221. </el-tree>
  2222. </div>
  2223. </el-form>
  2224. </el-dialog>
  2225. <!--修改 JP检品机 当日上报产量 组员及分配比例-->
  2226. <el-dialog v-model="JPblModellistedit" style="width: 20%" @keydown="JPselect_zyfpedit($event)" >
  2227. <el-form>
  2228. <div>
  2229. <el-table :data="JPemployeeDatalistedit" ref="zyfpedit_table" row-key="ID" highlight-current-row
  2230. :row-style="{ height: '0px' }" :cell-style="{ padding: '10px' }"
  2231. :header-row-style="{ height: '0px' }" :header-cell-style="{ padding: '10px' }"
  2232. border :show-overflow-tooltip="true" :cell-class-name="JPblplanUsageCellClassedit"
  2233. @row-click="JPtablebllickHandlerlistedit($event)">
  2234. <el-table-column prop="员工编号" label="员工编号"></el-table-column>
  2235. <el-table-column prop="ygxm" label="员工姓名"></el-table-column>
  2236. </el-table>
  2237. </div>
  2238. </el-form>
  2239. </el-dialog>
  2240. <el-dialog v-model="hesuanVisible" :before-close="closehesuanVisible" title="核算参数调整" destroy-on-close width="40%" style="height: 50%;">
  2241. <div>
  2242. <el-radio-group v-model="selected" @change="agreeChange" style="display: flex; flex-direction: column;">
  2243. <div style="display: flex; align-items: center;">
  2244. <label>参数类型:</label>
  2245. <el-radio label="难度调整系数"></el-radio>
  2246. </div>
  2247. <div style="display: flex; align-items: center;margin-left: 40px;">
  2248. <el-radio label="凹印版距"></el-radio>
  2249. </div>
  2250. <div style="display: flex; align-items: center;margin-left: 25px;">
  2251. <el-radio label="色度数"></el-radio>
  2252. </div>
  2253. <div style="display: flex; align-items: center;margin-left: 55px;">
  2254. <el-radio label="废品率系数"></el-radio>
  2255. </div>
  2256. </el-radio-group>
  2257. </div>
  2258. <div style="margin-left: 70px;">
  2259. <el-col :span="15">
  2260. <el-form-item label="废品率系数:" prop="flatFeed" class="mab" v-if="FPlxs === true">
  2261. <el-input v-model="hesuanValue.废品率系数" id="辅电表" @keydown="ent1($event)" style="width: 200px;" v-if="FPlxs === true"/>
  2262. </el-form-item>
  2263. <el-form-item label="缩放系数:" prop="flatFeed" class="mab" v-if="SFType === true">
  2264. <el-input v-model="hesuanValue.缩放系数" id="辅电表" @keydown="ent1($event)" style="width: 200px;" v-if="SFType === true"/>
  2265. </el-form-item>
  2266. <el-form-item label="产品板距:" prop="flatFeed" class="mab" v-if="CPType === true">
  2267. <el-input v-model="hesuanValue.产品板距" id="辅电表" @keydown="ent1($event)" style="width: 200px;" v-if="CPType === true"/>
  2268. </el-form-item>
  2269. <el-form-item label="印刷方式:" prop="flatFeed" class="mab" v-if="CPType === true">
  2270. <el-select v-model="hesuanValue.印刷方式" placeholder="" style="width: 190px;" v-if="CPType === true" >
  2271. <el-option label="卷对卷" value="卷对卷"></el-option>
  2272. <el-option label="卷对张" value="卷对张"></el-option>
  2273. </el-select>
  2274. </el-form-item>
  2275. <el-form-item label="色度数 :" prop="flatFeed" class="mab" v-if="SDType === true">
  2276. <el-input v-model="hesuanValue.色度数" id="辅电表" @keydown="ent1($event)" :clearable="true" style="width: 200px;" v-if="SDType === true" />
  2277. </el-form-item>
  2278. </el-col>
  2279. </div>
  2280. <template #footer>
  2281. <div class="dialog-footer">
  2282. <el-button @click="hesuanVisiblecloseDialog">取 消</el-button>
  2283. <el-button type="primary" @click="hesuanenterDialog">确 定</el-button>
  2284. </div>
  2285. </template>
  2286. </el-dialog>
  2287. <!--工序产量核查【弹窗】-->
  2288. <el-dialog v-model="gd_gxclhclist" title="工序产量核查" style="width: 100%;height: 100%;margin: 0px;padding: 0px">
  2289. <el-button type="" @click="gxclhcCancel">退出</el-button>
  2290. <div style="width: 100%; height: 60px; padding: 0px; margin: 10px 0px 0px 0px; display: flex; align-items: center;">
  2291. <div style="width: 100%; height: 60px; padding: 0px; display: flex; align-items: center;">
  2292. <el-form-item label="工单编号" prop="currentProcess" style="margin-right: 20px; padding: 20px 0 0 0">
  2293. <el-input v-model="gxclhcformData['gdbh']" @keyup.enter="gxclhcProductValue" />
  2294. </el-form-item>
  2295. 印件选择:
  2296. <el-select v-model="gdwhformData.yjno" placeholder="请选择" allow-create filterable style="width: 100px;margin-right: 20px; padding: 0px;">
  2297. <el-option v-for="option in gdwhformData.yinjian" @click="ongdwhfanclick" :key="option" :label="option" :value="option" />
  2298. </el-select>
  2299. <el-input v-model="inputCpmc" readonly style="width: 50vw; margin-right: 0px;" />
  2300. </div>
  2301. </div>
  2302. <el-table ref="paichengRef"
  2303. :show-overflow-tooltip="true"
  2304. :row-style="{ height: '0px' }"
  2305. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
  2306. :header-cell-style="{ padding: '0px' }"
  2307. style="width: 100%;height: 70vh" border tooltip-effect="dark"
  2308. highlight-current-row="true"
  2309. @row-click="gxclhc_tableRowClick"
  2310. :data="gxclhc_Data" row-key="ID"
  2311. :cell-class-name="gxclhcCellClass">
  2312. <template v-for="(item, idx) in gxclhc_Columns">
  2313. <el-table-column #default="{ row, column, $index }" align="left" :label="item.label" :width="item.width" >
  2314. {{row[item.prop]}}
  2315. </el-table-column>
  2316. </template>
  2317. </el-table>
  2318. </el-dialog>
  2319. <!--修正核算参数-->
  2320. <el-dialog v-model="xzhscslist" title="修正核算参数" style="width: 100%;height: 100%;margin: 0px;padding: 0px">
  2321. <el-button type="primary" @click="xzhscsConfirm">更新</el-button>
  2322. <el-button type="" @click="sxzhscsCancel">退出</el-button>
  2323. <div style="width: 100%; height: 60px; padding: 0px; margin: 10px 0px 0px 0px; display: flex; align-items: center;">
  2324. <el-form-item label="当前工单 :" prop="currentProcess" style="margin-right: 20px; padding: 0px">
  2325. <el-input v-model="xzhscsformData['gdbh']" @keyup.enter="xzhscsgetProductValue" style="width: 200px;"/>
  2326. <el-input v-model="xzhscsformData['cpdh']" disabled style="width: 120px;margin-left: 10px;"/>
  2327. <el-input v-model="xzhscsformData['gdmc']" disabled style="width: 500px;"/>
  2328. </el-form-item>
  2329. </div>
  2330. <div style="width: 100%; height: 60px; padding: 0px; margin: 5px 0px 0px 260px; display: flex; align-items: center;">
  2331. <el-form-item label=" :" prop="currentProcess" style="margin-right: 20px; padding: 0px">
  2332. <el-input v-model="xzhscsformData['yjdh']" disabled style="width: 120px;margin-left: 10px;"/>
  2333. <el-input v-model="xzhscsformData['yjmc']" disabled style="width: 500px;"/>
  2334. </el-form-item>
  2335. </div>
  2336. <el-table ref="paichengRef" :show-overflow-tooltip="true"
  2337. :row-style="{ height: '0px' }" :header-cell-style="{ padding: '0px' }"
  2338. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
  2339. style="width: 100%;height: 74vh" border tooltip-effect="dark"
  2340. :data="sxzhscstableData" row-key="ID" :cell-class-name="sxzhscsCellClass">
  2341. <template v-for="(item, idx) in xzhstableColumns">
  2342. <el-table-column #default="{ row, column, $index }" align="left" :label="item.label" :width="item.width" >
  2343. <div v-if="['难度系数', '损耗代号', '印刷方式', '版距','计损色数', '损耗系数'].includes(item.prop)">
  2344. <el-input v-model="row[item.prop]" :clearable="false" :id="`input${idx}${$index}`" />
  2345. </div>
  2346. <div v-else>{{ row[item.prop] }}</div>
  2347. </el-table-column>
  2348. </template>
  2349. </el-table>
  2350. </el-dialog>
  2351. <el-dialog v-model="gzSelVisible" title="员工工资明细查询" destroy-on-close fullscreen style="font-size: 50px;font-weight: bold;">
  2352. <el-button v-for="ygbh in gz_bzbh" type="primary" @click="gz_ontable(ygbh)">{{ ygbh }}</el-button>
  2353. <!-- 数据展示 -->
  2354. <el-table ref="gz_multipleTable" style="width: 100%;height: 40vh;padding-top: 5px;" tooltip-effect="dark" :data="gz_tableData" row-key="ID"
  2355. highlight-current-row="true" border :show-overflow-tooltip="true"
  2356. :row-style="{ height: '20px' }"
  2357. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  2358. :header-cell-style="{ padding: '0px' }">
  2359. <el-table-column v-for="column in tableCols1" :key="column.prop" :prop="column.prop" :label="column.label" :width="column.width" show-overflow-tooltip="true" sortable/>
  2360. </el-table>
  2361. <!-- 数据展示 -->
  2362. <el-table ref="gz_multipleTable2" style="width: 100%;height: 40vh;padding-top: 30px;" tooltip-effect="dark" :data="gz_tableData2" row-key="ID"
  2363. highlight-current-row="true" border
  2364. :row-style="{ height: '20px' }"
  2365. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  2366. :header-cell-style="{ padding: '0px' }"
  2367. :show-overflow-tooltip="true">
  2368. <el-table-column v-for="column in tableCols2" :key="column.prop" :prop="column.prop" :label="column.label" :width="column.width" show-overflow-tooltip="true" sortable/>
  2369. </el-table>
  2370. </el-dialog>
  2371. <!-- 印件选择 -->
  2372. <el-dialog v-model="dialogSelectVisible_Yj" title="选择" destroy-on-close width="600px" @keydown="select_Yj($event)" >
  2373. <el-table tooltip-effect="dark" :data="selectData_Yj" ref="table_YJH"
  2374. row-key="ID" highlight-current-row="true"
  2375. border style="width:100%" @row-dblclick="handleSelectClick_Yj">
  2376. <el-table-column prop="yjno" label="印件号" width="80" />
  2377. <el-table-column prop="yjmc" label="印件名称" width="480" />
  2378. </el-table>
  2379. </el-dialog>
  2380. <!-- 工序名称选择 -->
  2381. <el-dialog v-model="dialogSelectVisible_Gx" title="工序名称选择" @keydown="select_gxmc($event)"
  2382. destroy-on-close width="600px" style="margin-top: 3%;" >
  2383. <el-table tooltip-effect="dark" :data="selectData_Gx" ref="table_GXMC"
  2384. row-key="ID" highlight-current-row="true" border style="width:100%"
  2385. @row-dblclick="handleSelectClick_Gx">
  2386. <el-table-column prop="name" label="" width="560" />
  2387. </el-table>
  2388. </el-dialog>
  2389. <!-- 拉料导出弹窗 -->
  2390. <el-dialog v-model="onllexcel" title="拉料数据导出" destroy-on-close style="height: 20%;width: 20%;">
  2391. <el-form-item label="选择年月" label-width="100px">
  2392. <el-date-picker
  2393. v-model="onllexcelrq"
  2394. type="month"
  2395. placeholder="选择年月"
  2396. :default-value="new Date()"
  2397. @change="onchange_data"
  2398. style="width: 200px;"
  2399. />
  2400. </el-form-item>
  2401. <template #footer>
  2402. <div class="dialog-footer" style="text-align: right;">
  2403. <el-button @click="rcgdsjcloseDialog">取消</el-button>
  2404. <el-button type="primary" @click="rcgdsjonDialog">确定</el-button>
  2405. </div>
  2406. </template>
  2407. </el-dialog>
  2408. <!-- 班组选择弹窗 -->
  2409. <el-dialog v-model="dialogSelectVisible_Bz" title="班组选择" @keydown="select_bzmc($event)"
  2410. destroy-on-close width="400px" style="margin-top: 10%;">
  2411. <el-table
  2412. tooltip-effect="dark"
  2413. :data="selectData_Bz"
  2414. ref="table_BZMC"
  2415. row-key="code"
  2416. highlight-current-row
  2417. border
  2418. style="width:100%"
  2419. @row-dblclick="handleSelectClick_Bz">
  2420. <el-table-column prop="name" label="班组名称" width="380" />
  2421. </el-table>
  2422. </el-dialog>
  2423. <Shebeizhuangtai
  2424. v-if="dialogSbyxgl"
  2425. v-model="dialogSbyxgl"
  2426. :title="titinfo"
  2427. :formData="formData" />
  2428. </el-main>
  2429. </el-container>
  2430. </el-container>
  2431. <PrintPage ref="printPageRef" />
  2432. </div>
  2433. </template>
  2434. <script setup>
  2435. import {
  2436. createCompany,
  2437. deleteCompany,
  2438. deleteCompanyByIds,
  2439. updateCompany,
  2440. findCompany,
  2441. getCompanyList
  2442. } from '@/api/company'
  2443. import {
  2444. EquipmentSchedulingEdit, Procedure,
  2445. teamDel, WorkList, WorkOrderDel,PrintDetailList,
  2446. getOrderProcessLeft,
  2447. getOrderProcessRight
  2448. } from "@/api/yunyin/yunying";
  2449. import {
  2450. facilityTab,
  2451. facilitychanLiang,
  2452. facilityInspect,
  2453. facilityProduction,
  2454. facilityTeam,
  2455. facilityMachineList,
  2456. facilitySpotCheckItem,
  2457. facilityInspectionItem,
  2458. reportProduceInfo,
  2459. reportName,
  2460. reportInfo,
  2461. reportMachineMac,
  2462. facilityWorklist,
  2463. setProcessStatus,
  2464. submitDailyProduction,
  2465. facilityDetail,
  2466. inspectionRecord,
  2467. getYg,
  2468. facilityProcedure,
  2469. facilityPrintGetTab,
  2470. facilityPrintDetail,
  2471. ProcessInspectionRecordsItem,
  2472. InspectionItemAdd,
  2473. MachineDetailList,
  2474. ComplaintRecord,
  2475. remodelGetTab,
  2476. ModelChangeRecord,
  2477. MachineChanliangDetail,
  2478. chanliangEdit,
  2479. productionGdmc,
  2480. productionYjmc,
  2481. ChanliangDel,
  2482. ChanliangAdd,
  2483. MachineChanliangDetailEdit,
  2484. ChanliangWorkorder,
  2485. ChanliangPrintDetail,
  2486. ChanliangProcessDetail,
  2487. EmployeeData,
  2488. RemodelDetail,
  2489. AdditionalInspectionRecordAdd,
  2490. ProcessInspectionRecordsItemAdd,
  2491. CoefficientEdit,
  2492. ChromaDataEdit,
  2493. PrintingModeDataEdit,
  2494. dailysearch,
  2495. dailygetGzByYgbh,
  2496. productionDedh,
  2497. JPproductionDedh,
  2498. YieldTeamEdit,
  2499. getTimelist,
  2500. JPmachineDetail,
  2501. JpChanliangEdit,
  2502. JpUploade,
  2503. getRejectRate,
  2504. LazhiGongData
  2505. } from '@/api/jixiaoguanli/jitairibaobiao'
  2506. import{
  2507. AccountingParameter,
  2508. ProductNameData,
  2509. AccountingParameterEdit,
  2510. gdzl_MachineList,
  2511. getOrderProcessCount,
  2512. RejectionEdit,
  2513. JPchanliangDetailList,
  2514. getProductData
  2515. } from "@/api/yunyin/yunying";
  2516. import {
  2517. MachineTeamAdd,
  2518. setMachineTeam,
  2519. PrintDetailAdd,
  2520. PrintDetailEdit
  2521. } from '@/api/jixiaoguanli/baogong'
  2522. import {
  2523. FieldInspectionRecord,
  2524. StaGetOrderList,
  2525. StaGetList,
  2526. StaProcessList,
  2527. StaGetOrderDetail,
  2528. StaProcessAnomaly,
  2529. Mount_Hours_getTab,
  2530. getMountList,
  2531. leaderConfirm,
  2532. statisticsConfirm,
  2533. } from "@/api/mes/job";
  2534. import Shebeizhuangtai from '@/view/performance/09-workOrderVerification/componets/shebeizhuangtai.vue'
  2535. // 全量引入格式化工具 请按需保留
  2536. import { getDictFunc, formatDate, formatBoolean, filterDict, ReturnArrImg, onDownloadFile } from '@/utils/format'
  2537. import * as XLSX from 'xlsx'
  2538. import FileSaver from 'file-saver'
  2539. import { Layout, LayoutContent, LayoutHeader, LayoutSider } from '@arco-design/web-vue'
  2540. import { ElMessage, ElMessageBox } from 'element-plus'
  2541. import { ref, reactive,watch,onMounted, registerRuntimeCompiler } from 'vue'
  2542. import { useUserStore } from '@/pinia/modules/user'
  2543. import PrintPage from './components/print.vue'
  2544. const userStore = useUserStore()
  2545. const sys_id='['+userStore.userInfo.userName+'/'+userStore.userInfo.nickName+']'
  2546. defineOptions({
  2547. name: 'Company'
  2548. })
  2549. // 获取当前日期
  2550. const today = new Date();
  2551. const year = today.getFullYear();
  2552. const month = String(today.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,需要补零
  2553. const day = String(today.getDate()).padStart(2, '0');
  2554. const hours = String(today.getHours()).padStart(2, '0');
  2555. const minutes = String(today.getMinutes()).padStart(2, '0');
  2556. const seconds = String(today.getSeconds()).padStart(2, '0');
  2557. const currentDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
  2558. const currentDates = `${year}-${month}-${day}`;
  2559. const printPageRef = ref()
  2560. const DelType = ref(false)
  2561. const AddType = ref(false)
  2562. const gytableData = ref([])
  2563. const drzcDatas =ref([])
  2564. const detailData = reactive([])
  2565. const treeData=ref([])
  2566. const yinbantreeData=ref([])
  2567. let dianjiantreeData;
  2568. let JTMC=ref()
  2569. let date=ref()
  2570. let titinfo=ref()
  2571. let JTMCOn=ref()
  2572. let showbutton=ref()
  2573. let dateOn=ref()
  2574. const activName = ref('first')
  2575. let productCode=ref()
  2576. const sbzyData = reactive([])
  2577. const FPData = reactive([])
  2578. const CLMXData = reactive([])
  2579. let JYData = reactive([])
  2580. const selectData = ref([])
  2581. const isJPJT = ref(false)
  2582. const handleNodeClick = (nodeData,node) => {
  2583. //清空流程单查询的工单
  2584. lcd_Gd_gdbh.value=''
  2585. lcd_Gd_gdbh.value=formData.value.工单编号;
  2586. // 取消所有节点的颜色
  2587. const allNodes = document.querySelectorAll('.treecolor .el-tree-node');
  2588. allNodes.forEach(node => {
  2589. node.querySelector('.el-tree-node__label').style.color = '';
  2590. });
  2591. // 获取点击的节点
  2592. console.log(node)
  2593. const clickedNodeId = node['id'];
  2594. const clickedNode = document.querySelector(`.treecolor .el-tree-node[data-key="${clickedNodeId}"]`);
  2595. if (clickedNode) {
  2596. // 给当前点击的节点改变颜色
  2597. clickedNode.querySelector('.el-tree-node__label').style.color = 'red';
  2598. }
  2599. //存放当前节点的nodeId
  2600. if (nodeData.level === 1) {
  2601. CJMC.value=node.label
  2602. showbutton.value=true
  2603. JTMCOn.value=false
  2604. dateOn.value=false
  2605. MachinelList()
  2606. DelType.value = false
  2607. AddType.value = false
  2608. // MachineVisible.value=true
  2609. } else if (nodeData.level === 2) {
  2610. sbzyData.length = 0;
  2611. FPData.length=0;
  2612. CLMXData.length=0;
  2613. JYData.length=0;
  2614. JTMC=node.label.split("-")[0]
  2615. CJMC.value=nodeData.parentNode.label
  2616. JTMCOn.value=true
  2617. dateOn.value=false
  2618. showbutton.value=false
  2619. FacilityProduction()
  2620. FacilityWorklist()
  2621. DelType.value = false
  2622. AddType.value = false
  2623. } else if (nodeData.level === 3) {
  2624. CJMC.value=nodeData.parentNode.parentNode.label
  2625. JTMC=nodeData.machineName.split("-")[0]
  2626. // 等于JP开头的机台
  2627. if (/^JP.+/.test(JTMC)) {
  2628. isJPJT.value = true
  2629. JTMCOn.value=false
  2630. dateOn.value=true
  2631. FacilityInspect()
  2632. JPmachineDetails(JTMC, nodeData.label);
  2633. date=node.label
  2634. JPgytableData.value=[]
  2635. drzcDatas.value=[]
  2636. columnNames=[]
  2637. drzcData=[]
  2638. showbutton.value=false
  2639. DelType.value = true
  2640. AddType.value = true
  2641. } else {
  2642. isJPJT.value = false
  2643. JTMCOn.value=false
  2644. dateOn.value=true
  2645. date=node.label
  2646. gytableData.value=[]
  2647. drzcDatas.value=[]
  2648. columnNames=[]
  2649. drzcData=[]
  2650. showbutton.value=false
  2651. FacilityInspect()
  2652. FacilitychanLiang()
  2653. DelType.value = true
  2654. AddType.value = true
  2655. }
  2656. }
  2657. }
  2658. // JP当日上报产量
  2659. const JPgytableData = ref([])
  2660. const JPmachineDetails = async (jt, riqi) => {
  2661. const JPmachineDetail_data = await JPmachineDetail({machine: jt, date: riqi});
  2662. _rclsb_gdbh.value = JPmachineDetail_data.data[0]['工单编号']
  2663. _rclsb_yjno.value = JPmachineDetail_data.data[0]['yjno']
  2664. if (JPmachineDetail_data.code === 0) {
  2665. let totalA = JPmachineDetail_data.data.totalA
  2666. let totalB = JPmachineDetail_data.data.totalB
  2667. // 对 totalA 和 totalB 进行排序 结果放在 sortedTotalA 和 sortedTotalB 中
  2668. const sortedTotalA = totalA.sort((a, b) => {
  2669. const typeOrder = {
  2670. "": 1, // 空字符串排在最前面
  2671. "次品版": 2,
  2672. "废品版": 3,
  2673. "正品版": 4
  2674. };
  2675. // 如果某个类型不存在于typeOrder中,则默认它排在最后(可以调整这个逻辑)
  2676. const orderA = typeOrder[a["检验类型"]] || Infinity;
  2677. const orderB = typeOrder[b["检验类型"]] || Infinity;
  2678. return orderA - orderB; // 升序排序
  2679. });
  2680. const sortedTotalB = totalB.sort((a, b) => {
  2681. const typeOrder = {
  2682. "": 1, // 空字符串排在最前面
  2683. "次品版": 2,
  2684. "废品版": 3,
  2685. "正品版": 4
  2686. };
  2687. // 如果某个类型不存在于typeOrder中,则默认它排在最后(可以调整这个逻辑)
  2688. const orderA = typeOrder[a["检验类型"]] || Infinity;
  2689. const orderB = typeOrder[b["检验类型"]] || Infinity;
  2690. return orderA - orderB; // 升序排序
  2691. });
  2692. delete JPmachineDetail_data.data.totalA
  2693. delete JPmachineDetail_data.data.totalB
  2694. JPgytableData.value = Object.values(JPmachineDetail_data.data)
  2695. // 遍历 sortedTotalA 和 sortedTotalB 数组,将每个元素添加到新的行中
  2696. if (sortedTotalA.length !== 0) {
  2697. sortedTotalA.forEach((item) => {
  2698. let rowA = {
  2699. 产品名称: `A班${item.检验类型}合计:`,
  2700. 计件箱数: `${item.箱数}`, // 添加合计箱数字段
  2701. 换膜补时: `${item.总换膜补时}`,
  2702. 保养工时: `${item.总保养工时}`,
  2703. 异常总工时: `${item.总异常总工时}`,
  2704. 通电工时: `${item.总通电工时}`,
  2705. isTotal: true //标识合计行改变颜色
  2706. };
  2707. JPgytableData.value.push(rowA);
  2708. });
  2709. }
  2710. if (sortedTotalB.length !== 0) {
  2711. sortedTotalB.forEach((item) => {
  2712. let rowB = {
  2713. 产品名称: `B班${item.检验类型}合计:`,
  2714. 计件箱数: `${item.箱数}`,// 添加合计箱数字段
  2715. 换膜补时: `${item.总换膜补时}`,
  2716. 保养工时: `${item.总保养工时}`,
  2717. 异常总工时: `${item.总异常总工时}`,
  2718. 通电工时: `${item.总通电工时}`,
  2719. isTotal: true //标识合计行改变颜色
  2720. };
  2721. JPgytableData.value.push(rowB);
  2722. });
  2723. }
  2724. // return require(`@/assets/${machineData.状态}.png`);
  2725. // MachineVisible.value=true
  2726. }
  2727. }
  2728. // 定义方法来确定合计行的CSS类名
  2729. function totalClassName({ row }) {
  2730. console.log(row)
  2731. // if (row.计件箱数=== ) {
  2732. // }
  2733. return row.isTotal ? 'total-row' : '';
  2734. }
  2735. //表格文字颜色
  2736. const tableDataCellClass = ({row, column, rowIndex, columnIndex}) =>{
  2737. if (column.property === '计件箱数'||column.property === '每箱数量') {
  2738. return 'plan-usage-low';
  2739. }
  2740. }
  2741. const hesuanVisible = ref(false)
  2742. const MachineVisible = ref(false)
  2743. const machineData = reactive([])
  2744. const hesuanValue = reactive({})
  2745. const MachinelList = async () => {
  2746. const response = await MachineDetailList({workshop:CJMC.value});
  2747. if (response.code === 0) {
  2748. machineData.splice(0, machineData.length, ...response.data);
  2749. console.log(machineData)
  2750. // return require(`@/assets/${machineData.状态}.png`);
  2751. // MachineVisible.value=true
  2752. }
  2753. }
  2754. //设置机台状态
  2755. function handleButtonClick(deviceId) {
  2756. console.log(deviceId);
  2757. MachineVisible.value=false
  2758. // dialogSbyxgl.value=true
  2759. JTMC=deviceId.split("-")[0]
  2760. // JTMCOn.value=true
  2761. // dateOn.value=false
  2762. console.log(JTMC)
  2763. GetdialogSbyxgl()
  2764. // GetdialogSbyxgl(deviceId)
  2765. }
  2766. const GetdialogSbyxgl = async () => {
  2767. const response = await facilityProduction({machine:JTMC});
  2768. if (response.code === 0) {
  2769. console.log(response)
  2770. // 填充formData对象的基本字段
  2771. // formData.value.工单编号 = response.data.工单编号;
  2772. // formData.value.印件编号 = response.data.印件号;
  2773. // formData.value.工序名称 = response.data.工序名称;
  2774. // formData.value.产品名称 = response.data.产品名称;
  2775. // formData.value.班组 = response.data.班组编号;
  2776. formData.value.工单编号 = response.data.工单编号;
  2777. formData.value.印件号 = response.data.印件号;
  2778. formData.value.工序号 = response.data.工序名称.substring(0,2);
  2779. formData.value.工序名称 = response.data.工序名称;
  2780. formData.value.产品名称 = response.data.产品名称;
  2781. formData.value.班组成员 = response.data.班组成员;
  2782. formData.value.班组Id=response.data.班组Id
  2783. formData.value.machine=JTMC
  2784. formData.value.状态=response.data.状态
  2785. let time = new Date();
  2786. time.setDate(time.getDate() - 0); // 今天的前N天的日期,N自定义
  2787. titinfo = `${time.getFullYear()}-${time.getMonth() + 1}-${time.getDate()}`;
  2788. titinfo+='【'+JTMC+response.data.工单编号+response.data.产品名称+'】'+response.data.工序名称
  2789. let sczl_bhkey=''
  2790. let sczl_namekey=''
  2791. if (response.data.班组成员) {
  2792. for (let i = 0; i < Math.min(Object.keys(response.data.班组成员).length, 6); i++) {
  2793. sczl_bhkey=`sczl_bh${i+1}`
  2794. sczl_namekey=`sczl_name${i+1}`
  2795. formData.value[sczl_bhkey] = response.data.班组成员[i]['编号'];
  2796. formData.value[sczl_namekey] = response.data.班组成员[i]['姓名'];
  2797. console.log(response.data.班组成员[i]['编号'])
  2798. classbz.value[i]=response.data.班组成员[i]['编号']
  2799. }
  2800. }
  2801. formData.value.class=classbz.value.join(',')
  2802. console.log(formData.value.class)
  2803. formData.value.JTMC=JTMC
  2804. const responses = await MachineDetailList({workshop:CJMC.value});
  2805. if(responses.code===0){
  2806. responses.data.map(item=>{
  2807. if(item.设备编号==JTMC){
  2808. formData.value.status=item.状态
  2809. }
  2810. })
  2811. }
  2812. // console.log(formData.value.工单编号)
  2813. }
  2814. FacilityWorklist()
  2815. onstatus()
  2816. }
  2817. const gzSelVisible = ref(false)
  2818. const gz_tableData = reactive([])
  2819. const gz_tableData2 = reactive([])
  2820. let gz_bzbh = [];
  2821. const tableCols1 = [
  2822. { label: '员工编号', prop: 'bh', width: '105' },
  2823. { label: '员工姓名', prop: '员工姓名', width: '105' },
  2824. { label: '日期', prop: 'sczl_rq', width: '120' },
  2825. { label: '计件工资', prop: '计件工资', width: '105' },
  2826. { label: '加班工资', prop: '加班工资', width: '105' },
  2827. { label: '计时时数', prop: '计时时数', width: '105' },
  2828. { label: '计时工资', prop: '计时工资', width: '135' },
  2829. { label: '日工资合计', prop: '日工资合计', width: '135' },
  2830. ]
  2831. const tableCols2 = [
  2832. { label: '日期', prop: 'sczl_rq', width: '100' },
  2833. { label: '工单编号', prop: 'sczl_gdbh', width: '105' },
  2834. { label: '产品名称', prop: 'Gd_cpmc', width: '120' },
  2835. { label: '印件及工序', prop: 'sczl_type', width: '120' },
  2836. { label: '机台', prop: 'sczl_jtbh', width: '87' },
  2837. { label: '车头产量', prop: '班组车头产量', width: '105' },
  2838. { label: '计件产量', prop: '计件产量', width: '105' },
  2839. { label: '补产产量', prop: '补产产量', width: '105' },
  2840. { label: '核算产量', prop: '核算产量', width: '105' },
  2841. { label: '达标定额', prop: '达标定额', width: '105' },
  2842. { label: '千件工价', prop: '千件工价', width: '105' },
  2843. { label: '计件工资', prop: '个人计件工资', width: '105' },
  2844. { label: '加班工资', prop: '个人加班工资', width: '105' },
  2845. { label: '装版工时', prop: '装版工时', width: '120' },
  2846. { label: '保养工时', prop: '保养工时', width: '105' },
  2847. { label: '打样工时', prop: '打样工时', width: '105' },
  2848. { label: '异常停机', prop: '异常停机工时', width: '105' },
  2849. { label: '补产标准', prop: '补产标准', width: '120' },
  2850. { label: '分摊比例', prop: 'Rate', width: '105' },
  2851. ]
  2852. //员工工资查询
  2853. const gzSel = () =>{
  2854. if(formData.value.班组成员==undefined){
  2855. ElMessage({ type: 'warning', message: '请先选择机台' });
  2856. return
  2857. }
  2858. if(formData.value.班组成员.length==0){
  2859. ElMessage({ type: 'warning', message: '未获取到员工' });
  2860. return
  2861. }
  2862. for (let index in formData.value.班组成员) {
  2863. gz_bzbh[index] = formData.value.班组成员[index]['编号']
  2864. }
  2865. gzSelVisible.value=true
  2866. }
  2867. // 查询
  2868. const gz_ontable = (ygbh) => {
  2869. // 创建一个Date对象
  2870. var currentDate = new Date();
  2871. // 获取年份
  2872. var year = currentDate.getFullYear();
  2873. // 获取月份(注意,月份从0开始,所以需要加1)
  2874. var month = currentDate.getMonth() + 1;
  2875. if (month < 10) {
  2876. month = "0" + month;
  2877. }
  2878. var date = year+ "" +month
  2879. const response = dailysearch({date: date, search: ygbh}).then(response=>{
  2880. if (response.code === 0) {
  2881. const originalData = response.data;
  2882. const summaryData = generateSummaryData(originalData);
  2883. // 将合计数据插入到原始数据中
  2884. const combinedData = [];
  2885. originalData.forEach((item, index) => {
  2886. combinedData.push(item);
  2887. const nextItem = originalData[index + 1];
  2888. if (nextItem==undefined) {
  2889. // 如果下一个员工姓名与当前不同,插入合计数据
  2890. const currentSummary = summaryData.shift();
  2891. combinedData.push(currentSummary);
  2892. }
  2893. });
  2894. // 更新表格数据
  2895. gz_tableData.splice(0, gz_tableData.length, ...combinedData);
  2896. }
  2897. });
  2898. dailygetGzByYgbh({date:date,code:ygbh}).then(response=>{
  2899. if(response.code==0){
  2900. gz_tableData2.splice(0, gz_tableData2.length, ...response.data);
  2901. }
  2902. })
  2903. }
  2904. const generateSummaryData = (data) => {
  2905. const summaryData = [];
  2906. let currentName = null;
  2907. let currentSummary = null;
  2908. data.forEach((item) => {
  2909. const name = item['员工姓名'].trim(); // 获取员工姓名并去除空格
  2910. if (name !== currentName) {
  2911. // 如果员工姓名发生改变,说明需要插入合计数据
  2912. if (currentSummary) {
  2913. // 将上一个员工的合计数据插入到数组中
  2914. summaryData.push(currentSummary);
  2915. }
  2916. // 创建新的合计数据
  2917. currentSummary = {
  2918. '员工姓名': name,
  2919. '日期': 0,
  2920. '计件工资': 0,
  2921. '加班工资': 0,
  2922. '计时时数': 0,
  2923. '计时工资': 0,
  2924. '日工资合计': 0
  2925. };
  2926. currentName = name;
  2927. }
  2928. // 更新合计数据
  2929. currentSummary['日期']++;
  2930. currentSummary['计件工资'] += parseFloat(item['计件工资']);
  2931. currentSummary['加班工资'] += parseFloat(item['加班工资']);
  2932. currentSummary['计时时数'] += parseFloat(item['计时时数']);
  2933. currentSummary['计时工资'] += parseFloat(item['计时工资']);
  2934. currentSummary['日工资合计'] += parseFloat(item['日工资合计']);
  2935. currentSummary['员工姓名']='合计('+currentSummary['日期']+'天)';
  2936. });
  2937. // 将最后一个员工的合计数据插入到数组中
  2938. if (currentSummary) {
  2939. summaryData.push(currentSummary);
  2940. }
  2941. // 将日期填充到表格中
  2942. summaryData.forEach((summary) => {
  2943. summary['计件工资'] = summary['计件工资'].toFixed(2); // 保留两位小数
  2944. summary['加班工资'] = summary['加班工资'].toFixed(2);
  2945. summary['计时时数'] = summary['计时时数'].toFixed(2);
  2946. summary['计时工资'] = summary['计时工资'].toFixed(2);
  2947. summary['日工资合计'] = summary['日工资合计'].toFixed(2);
  2948. });
  2949. return summaryData;
  2950. };
  2951. // const getImagePath = async (machineData.状态) => {
  2952. // return require(`@/assets/${status}.png`);
  2953. // }
  2954. const classbz=ref([])
  2955. const GDBH=ref()
  2956. //当前生产订单
  2957. const FacilityProduction = async () => {
  2958. const response = await facilityProduction({machine:JTMC});
  2959. if (response.code === 0) {
  2960. console.log(response)
  2961. if(response.data===null){
  2962. formData.value.工单编号 = '';
  2963. formData.value.印件号 = '';
  2964. formData.value.工序号 = '';
  2965. formData.value.工序名称 = '';
  2966. formData.value.产品名称 = '';
  2967. formData.value.班组Id=''
  2968. formData.value.machine=JTMC
  2969. formData.value.状态=''
  2970. let sczl_bhkey=''
  2971. let sczl_namekey=''
  2972. for (let i = 0; i < 6; i++) {
  2973. sczl_bhkey=`sczl_bh${i+1}`
  2974. sczl_namekey=`sczl_name${i+1}`
  2975. formData.value[sczl_bhkey] = '';
  2976. formData.value[sczl_namekey] = '';
  2977. }
  2978. console.log(sbzyData)
  2979. }else{
  2980. // 填充formData对象的基本字段
  2981. // formData.value.工单编号 = response.data.工单编号;
  2982. // formData.value.印件编号 = response.data.印件号;
  2983. // formData.value.工序名称 = response.data.工序名称;
  2984. // formData.value.产品名称 = response.data.产品名称;
  2985. // formData.value.班组 = response.data.班组编号;
  2986. formData.value.工单编号 = response.data.工单编号;
  2987. formData.value.印件号 = response.data.印件号;
  2988. formData.value.工序号 = response.data.工序名称.substring(0,2);
  2989. formData.value.工序名称 = response.data.工序名称;
  2990. formData.value.产品名称 = response.data.产品名称;
  2991. formData.value.班组成员 = response.data.班组成员;
  2992. formData.value.班组Id=response.data.班组Id
  2993. formData.value.machine=JTMC
  2994. formData.value.状态=response.data.状态
  2995. let sczl_bhkey=''
  2996. let sczl_namekey=''
  2997. if (response.data.班组成员) {
  2998. for (let i = 0; i < Math.min(Object.keys(response.data.班组成员).length, 6); i++) {
  2999. sczl_bhkey=`sczl_bh${i+1}`
  3000. sczl_namekey=`sczl_name${i+1}`
  3001. formData.value[sczl_bhkey] = response.data.班组成员[i]['编号'];
  3002. formData.value[sczl_namekey] = response.data.班组成员[i]['姓名'];
  3003. classbz.value[i]=response.data.班组成员[i]['编号']
  3004. }
  3005. }
  3006. formData.value.class=classbz.value.join(',')
  3007. formData.value.JTMC=JTMC
  3008. const responses = await MachineDetailList({workshop:CJMC.value});
  3009. if(responses.code===0){
  3010. responses.data.map(item=>{
  3011. if(item.设备编号==JTMC){
  3012. formData.value.status=item.状态
  3013. }
  3014. })
  3015. }
  3016. }
  3017. }
  3018. // getTableData()
  3019. }
  3020. let CJMC=ref()
  3021. //设备工作清单
  3022. const FacilityWorklist = async () => {
  3023. const response = await facilityWorklist({machine:JTMC});
  3024. if (response.code === 0) {
  3025. // console.log(response)
  3026. sbzyData.splice(0, sbzyData.length, ...response.data);
  3027. const res = await facilityProcedure({ Gd_gdbh: sbzyData[0]['工单编号|质量信息'].substring(0, 7) })
  3028. formData.value.productCode= response.data[0]['产品代号']
  3029. // console.log(res)
  3030. if (res.code === 0) {
  3031. selectData.value = res.data
  3032. }
  3033. // console.log('33333')
  3034. FacilityTeam(JTMC)
  3035. }
  3036. }
  3037. //检验记录
  3038. const InspectionRecord = async () => {
  3039. console.log(formData.value.班组)
  3040. const response = await inspectionRecord({machine:JTMC,Gd_gdbh:formData.value.工单编号,team:BZMC.value});
  3041. // const response = await inspectionRecord({machine:'JY01#',Gd_gdbh:'2311114',team:'A班'});
  3042. // const response = await inspectionRecord({machine:'JY01#',Gd_gdbh:'2312191',team:'A班'});
  3043. console.log(response)
  3044. if(response.code==0){
  3045. // 提取 inspectiontime 作为列名
  3046. // Extract inspectiontime as columnNames
  3047. columnNames = response.data.inspectiontime;
  3048. // Populate drzcData with row data
  3049. for (const key in response.data) {
  3050. if (key !== 'inspectiontime') {
  3051. const item = response.data[key];
  3052. const rowData = {
  3053. '工单编号': item['工单编号'],
  3054. '印件号': item['印件号'],
  3055. '工序名称': item['工序名称'],
  3056. '检验项目': item['检验项目']
  3057. };
  3058. // Initialize time columns with '—'
  3059. columnNames.forEach(time => {
  3060. rowData[time] = '';
  3061. });
  3062. // Split inspectresult and fill the corresponding time columns
  3063. const results = item['inspectresult'].split(',');
  3064. results.forEach(result => {
  3065. if (columnNames.includes(result)) {
  3066. rowData[result] = '√';
  3067. }else{rowData[result] = ''}
  3068. });
  3069. // Add the row data to drzcData
  3070. JYData.push(rowData);
  3071. }
  3072. }
  3073. console.log(JYData);
  3074. }
  3075. }
  3076. const dbclSelection = ref('')
  3077. //当班产量明细复选框
  3078. const dbclmxSelectionChange = (selection, type) => {
  3079. console.log("selection",selection)
  3080. if (selection.length > 1) {
  3081. ElMessage({type: 'warning',message: '您只能选择一条进行删除!'})
  3082. // 重置选择项
  3083. dbclSelection.value = ''; // 清空之前的选择
  3084. selection.splice(0, selection.length); // 清空当前选择数组
  3085. return false;
  3086. }else{
  3087. const ids = selection.map(item => item.UniqId);
  3088. dbclSelection.value = ids.join(',');
  3089. console.log(dbclSelection.value)
  3090. }
  3091. }
  3092. //当班产量明细
  3093. const deldbcl_onclick = async () => {
  3094. console.log(dbclSelection.value)
  3095. if (dbclSelection.value !== '') {
  3096. try {
  3097. //产量上报数据删除
  3098. const res1 = await ChanliangDel({UniqId: dbclSelection.value})
  3099. if(res1.code === 0){
  3100. ElMessage.success('当班产量明细删除成功')
  3101. //当班产量明细
  3102. const response = await facilityDetail({ machine: JTMC, Gd_gdbh: formData.value.工单编号, team: BZMC.value });
  3103. console.log(response);
  3104. if (response.code === 0) {
  3105. CLMXData.splice(0, CLMXData.length, ...Object.values(response.data));
  3106. formData.value.production_now=response.data[0].产量
  3107. formData.value.production_all=response.data.total.产量
  3108. }
  3109. }
  3110. } catch(err) {
  3111. ElMessage.error(err)
  3112. }
  3113. }
  3114. }
  3115. const FacilityDetail = async () => {
  3116. console.log('123123')
  3117. console.log(JTMC)
  3118. console.log('123123')
  3119. console.log(formData.value.工单编号)
  3120. console.log('123123')
  3121. console.log(formData.value.班组)
  3122. formData.value.production_now=0
  3123. formData.value.production_all=0
  3124. // const response = await facilityDetail({ machine: JTMC, Gd_gdbh: formData.value.工单编号, team: formData.value.班组 });
  3125. const response = await facilityDetail({ machine: JTMC, Gd_gdbh: formData.value.工单编号, team: BZMC.value });
  3126. // const response = await facilityDetail({ machine: JTMC, Gd_gdbh: '2311114', team:'A班' });
  3127. if (response.code === 0) {
  3128. console.log('123123')
  3129. console.log(response);
  3130. CLMXData.splice(0, CLMXData.length, ...Object.values(response.data));
  3131. formData.value.production_now=response.data[0].产量
  3132. formData.value.production_all=response.data.total.产量
  3133. }
  3134. };
  3135. // 验证规则
  3136. const rule = reactive({
  3137. })
  3138. const searchRule = reactive({
  3139. createdAt: [
  3140. { validator: (rule, value, callback) => {
  3141. if (searchInfo.value.startCreatedAt && !searchInfo.value.endCreatedAt) {
  3142. callback(new Error('请填写结束日期'))
  3143. } else if (!searchInfo.value.startCreatedAt && searchInfo.value.endCreatedAt) {
  3144. callback(new Error('请填写开始日期'))
  3145. } else if (searchInfo.value.startCreatedAt && searchInfo.value.endCreatedAt && (searchInfo.value.startCreatedAt.getTime() === searchInfo.value.endCreatedAt.getTime() || searchInfo.value.startCreatedAt.getTime() > searchInfo.value.endCreatedAt.getTime())) {
  3146. callback(new Error('开始日期应当早于结束日期'))
  3147. } else {
  3148. callback()
  3149. }
  3150. }, trigger: 'change' }
  3151. ],
  3152. })
  3153. const elFormRef = ref()
  3154. const elSearchFormRef = ref()
  3155. // =========== 表格控制部分 ===========
  3156. const page = ref(1)
  3157. const total = ref(0)
  3158. const pageSize = ref(10)
  3159. const tableData = ref([])
  3160. const searchInfo = ref({})
  3161. const xunchaVisible = ref(false)
  3162. const xunchatreeData=ref([{label: '现场巡查记录',} ])
  3163. // 重置
  3164. const onReset = () => {
  3165. searchInfo.value = {}
  3166. getTableData()
  3167. }
  3168. // 搜索
  3169. const onSubmit = () => {
  3170. elSearchFormRef.value?.validate(async(valid) => {
  3171. if (!valid) return
  3172. page.value = 1
  3173. pageSize.value = 10
  3174. getTableData()
  3175. })
  3176. }
  3177. // 分页
  3178. const handleSizeChange = (val) => {
  3179. pageSize.value = val
  3180. getTableData()
  3181. }
  3182. // 修改页面容量
  3183. const handleCurrentChange = (val) => {
  3184. page.value = val
  3185. getTableData()
  3186. }
  3187. const getTableData = async () => {
  3188. const response = await facilityTab();
  3189. if (response.code === 0 && response.data) {
  3190. const workshops = response.data; // 车间数据
  3191. // 在推送新项之前将 treeData 重置为空数组
  3192. treeData.value = []; // 使用 .value 访问响应式引用的值
  3193. for (const workshopName in workshops) {
  3194. const workshopNode = {
  3195. label: workshopName,
  3196. children: [],
  3197. level: 1 // 添加层级属性
  3198. };
  3199. const machines = workshops[workshopName]; // 车间下的机器
  3200. for (const machineName in machines) {
  3201. const machineNode = {
  3202. label: machineName,
  3203. children: [],
  3204. level: 2, // 添加层级属性
  3205. parentNode: workshopNode
  3206. };
  3207. // Now that machineNode is initialized, you can refer to it
  3208. const childrenNodes = machines[machineName].map(dateTime => {
  3209. const dateOnly = dateTime.split(' ')[0];
  3210. return {
  3211. label: dateOnly,
  3212. machineName:machineName,
  3213. level: 3, // 添加层级属性
  3214. parentNode: machineNode
  3215. };
  3216. });
  3217. // Assign the childrenNodes to the machineNode's children property
  3218. machineNode.children = childrenNodes;
  3219. // Finally, push the machineNode to the workshopNode's children array
  3220. workshopNode.children.push(machineNode);
  3221. }
  3222. // 将 workshopNode 推送到响应式 treeData 数组
  3223. treeData.value.push(workshopNode);
  3224. }
  3225. }
  3226. };
  3227. // 查询
  3228. const getTableList = async() => {
  3229. const table = await getCompanyList({ page: page.value, pageSize: pageSize.value, ...searchInfo.value })
  3230. if (table.code === 0) {
  3231. tableData.value = table.data.list
  3232. total.value = table.data.total
  3233. page.value = table.data.page
  3234. pageSize.value = table.data.pageSize
  3235. }
  3236. }
  3237. getTableData()
  3238. const type2 = ref('')
  3239. // 修改班组产量提报
  3240. const JPchanliangVisibleedit = ref(false)
  3241. const JPformdataedit = reactive({
  3242. '工单编号':'',
  3243. '产品名称':'',
  3244. '印件号':'',
  3245. '印件名称':'',
  3246. '工序号':'',
  3247. '工序名称':'',
  3248. '日期':'',
  3249. '流程标牌':'',
  3250. '检验类别':'',
  3251. '废品率系数':'',
  3252. '计件箱数':'',
  3253. '每箱数量':'',
  3254. '换膜总工时':'',
  3255. '通电工时':'',
  3256. '定额代号':'',
  3257. '组员1': {'编号': '','姓名': '','比例': '',},
  3258. '组员2': {'编号': '','姓名': '','比例': '',},
  3259. '组员3': {'编号': '','姓名': '','比例': '',},
  3260. '组员4': {'编号': '','姓名': '','比例': '',},
  3261. '组员5': {'编号': '','姓名': '','比例': '',},
  3262. '组员6': {'编号': '','姓名': '','比例': '',},
  3263. '组员7': {'编号': '','姓名': '','比例': '',},
  3264. '组员8': {'编号': '','姓名': '','比例': '',},
  3265. '组员9': {'编号': '','姓名': '','比例': '',},
  3266. '组员10': {'编号': '','姓名': '','比例': '',}
  3267. })
  3268. // 双击JP当日上报产量
  3269. const JPgytableDatadoubleClick = async (row) => {
  3270. console.log(row)
  3271. const response = await JPchanliangDetailList({UniqId:row.UniqId})
  3272. console.log(response)
  3273. JPformdataedit['工单编号'] = response.data['工单编号'];
  3274. JPformdataedit['产品名称'] = response.data['成品名称'];
  3275. JPformdataedit['印件号'] = response.data['yjno'];
  3276. JPformdataedit['印件名称'] = response.data['产品名称'];
  3277. JPformdataedit['工序号'] = response.data['gxh'];
  3278. JPformdataedit['工序名称'] = response.data['gxmc'];
  3279. JPformdataedit['检验类别'] = response.data['检验类型'];
  3280. JPformdataedit['废品率系数'] = response.data['废品率系数'];
  3281. JPformdataedit['日期'] = response.data['sczl_rq'];
  3282. JPformdataedit['机器'] = JTMC;
  3283. JPformdataedit['流程标牌'] = response.data['num'];
  3284. JPformdataedit['计件箱数'] = response.data['计件箱数'];
  3285. JPformdataedit['每箱数量'] = response.data['每箱数量'];
  3286. JPformdataedit['换膜总工时'] = response.data['换膜总工时'];
  3287. JPformdataedit['换膜补产工时'] = response.data['换膜补时'];
  3288. JPformdataedit['保养工时'] = response.data['保养工时'];
  3289. JPformdataedit['异常总工时'] = response.data['异常总工时'];
  3290. JPformdataedit['异常类型'] = response.data['异常类型'];
  3291. JPformdataedit['异常补贴工时'] = response.data['异常补时'];
  3292. JPformdataedit['通电工时'] = response.data['通电工时'];
  3293. JPformdataedit['定额代号'] = response.data['定额代号'];
  3294. JPformdataedit['bzdh'] = response.data['bzdh'];
  3295. for (let i = 1; i <= 10; i++) {
  3296. JPformdataedit[`组员${i}`]['编号'] = response.data[`sczl_bh${i}`];
  3297. }
  3298. for (let i = 1; i <= 10; i++) {
  3299. JPformdataedit[`组员${i}`]['姓名'] = response.data[`sczl_name${i}`];
  3300. }
  3301. for (let i = 1; i <= 10; i++) {
  3302. JPformdataedit[`组员${i}`]['比例'] = response.data[`sczl_rate${i}`];
  3303. }
  3304. //自动聚焦光标
  3305. setTimeout(() => {
  3306. const inputElement = document.getElementById('修改工单编号');
  3307. if (inputElement) {
  3308. inputElement.focus();
  3309. }
  3310. }, 100);
  3311. // Object.assign(JPformdataedit,row);
  3312. JPchanliangVisibleedit.value = true
  3313. }
  3314. //当日上报产量确定
  3315. const JPenterDialogedit = async () => {
  3316. // console.log(JPformdataedit)
  3317. const JPformattedData = {
  3318. UniqId:uid.value,
  3319. sczl_jtbh:JTMC+'#',
  3320. sczl_gdbh: JPformdataedit['工单编号'],
  3321. sczl_yjno: JPformdataedit['印件号'],
  3322. sczl_gxh: JPformdataedit['工序号'],
  3323. sczl_gxmc: JPformdataedit['工序名称'],
  3324. sczl_type: JPformdataedit['检验类别'],
  3325. sczl_废品率系数: JPformdataedit['废品率系数'],
  3326. sczl_rq: JPformdataedit['日期'],
  3327. sczl_jtbh: JPformdataedit['机器'],
  3328. sczl_num: JPformdataedit['流程标牌'],
  3329. sczl_cl: JPformdataedit['计件箱数'],
  3330. sczl_Pgcl: JPformdataedit['每箱数量'],
  3331. sczl_装版总工时: JPformdataedit['换膜总工时'],
  3332. sczl_装版工时: JPformdataedit['换膜补产工时'],
  3333. sczl_保养工时: JPformdataedit['保养工时'],
  3334. sczl_异常停机工时: JPformdataedit['异常总工时'],
  3335. sczl_异常类型1: JPformdataedit['异常类型'],
  3336. sczl_异常工时1: JPformdataedit['异常补贴工时'],
  3337. sczl_设备运行工时: JPformdataedit['通电工时'],
  3338. sczl_dedh: JPformdataedit['定额代号'],
  3339. sczl_bzdh: JPformdataedit['bzdh'],
  3340. sczl_bh1: JPformdataedit.组员1['编号'],
  3341. sczl_bh2: JPformdataedit.组员2['编号'],
  3342. sczl_bh3: JPformdataedit.组员3['编号'],
  3343. sczl_bh4: JPformdataedit.组员4['编号'],
  3344. sczl_bh5: JPformdataedit.组员5['编号'],
  3345. sczl_bh6: JPformdataedit.组员6['编号'],
  3346. sczl_bh7: JPformdataedit.组员7['编号'],
  3347. sczl_bh8: JPformdataedit.组员8['编号'],
  3348. sczl_bh9: JPformdataedit.组员9['编号'],
  3349. sczl_bh10: JPformdataedit.组员10['编号'],
  3350. sczl_bh98:'',
  3351. sczl_rate1: JPformdataedit.组员1['比例'],
  3352. sczl_rate2: JPformdataedit.组员2['比例'],
  3353. sczl_rate3: JPformdataedit.组员3['比例'],
  3354. sczl_rate4: JPformdataedit.组员4['比例'],
  3355. sczl_rate5: JPformdataedit.组员5['比例'],
  3356. sczl_rate6: JPformdataedit.组员6['比例'],
  3357. sczl_rate7: JPformdataedit.组员7['比例'],
  3358. sczl_rate8: JPformdataedit.组员8['比例'],
  3359. sczl_rate9: JPformdataedit.组员9['比例'],
  3360. sczl_rate10: JPformdataedit.组员10['比例'],
  3361. };
  3362. console.log(JPformattedData)
  3363. const JpChanliangEdit_edit = await JpChanliangEdit(JPformattedData);
  3364. console.log(JpChanliangEdit_edit)
  3365. if (JpChanliangEdit_edit.code === 0) {
  3366. JPchanliangVisibleedit.value = false
  3367. JPmachineDetails(JTMC,date);
  3368. ElMessage({type: 'success',message: '修改成功'})
  3369. } else {
  3370. ElMessage({type: 'error',message: '修改失败'})
  3371. }
  3372. }
  3373. //当日上报产量取消
  3374. const JPcloseDialogedit = async () => {
  3375. JPchanliangVisibleedit.value = false
  3376. }
  3377. //班组产量提报 JP检品机单独页面
  3378. const JPchanliangVisible = ref(false)
  3379. const JPformdata = reactive({
  3380. '工单编号':'',
  3381. '产品名称':'',
  3382. '印件号':'',
  3383. '印件名称':'',
  3384. '工序号':'',
  3385. '工序名称':'',
  3386. '日期':'',
  3387. '机器':'',
  3388. '流程标牌':'',
  3389. '检验类别':'',
  3390. '废品率系数':'',
  3391. '计件箱数':'',
  3392. '每箱数量':'',
  3393. '换膜总工时':'',
  3394. '换膜补产工时':'',
  3395. '保养工时':'',
  3396. '异常总工时':'',
  3397. '异常类型':'',
  3398. '异常补贴工时':'',
  3399. '通电工时':'',
  3400. '定额代号':'',
  3401. '组员1': {'编号': '','姓名': '','比例': '',},
  3402. '组员2': {'编号': '','姓名': '','比例': '',},
  3403. '组员3': {'编号': '','姓名': '','比例': '',},
  3404. '组员4': {'编号': '','姓名': '','比例': '',},
  3405. '组员5': {'编号': '','姓名': '','比例': '',},
  3406. '组员6': {'编号': '','姓名': '','比例': '',},
  3407. '组员7': {'编号': '','姓名': '','比例': '',},
  3408. '组员8': {'编号': '','姓名': '','比例': '',},
  3409. '组员9': {'编号': '','姓名': '','比例': '',},
  3410. '组员10': {'编号': '','姓名': '','比例': '',}
  3411. })
  3412. //班组产量提报 JP检品机 班组产量提报确定
  3413. const JPenterDialog = async() => {
  3414. const JPformattedData = {
  3415. sczl_jtbh:JTMC+'#',
  3416. sczl_gdbh: JPformdata['工单编号'],
  3417. sczl_yjno: JPformdata['印件号'],
  3418. sczl_gxh: JPformdata['工序号'],
  3419. sczl_gxmc: JPformdata['工序名称'],
  3420. sczl_type: JPformdata['检验类别'],
  3421. sczl_废品率系数: JPformdata['废品率系数'],
  3422. sczl_rq: JPformdata['日期'],
  3423. sczl_jtbh: JPformdata['机器'],
  3424. sczl_num: JPformdata['流程标牌'],
  3425. sczl_cl: JPformdata['计件箱数'],
  3426. sczl_Pgcl: JPformdata['每箱数量'],
  3427. sczl_装版总工时: JPformdata['换膜总工时'],
  3428. sczl_装版工时: JPformdata['换膜补产工时'],
  3429. sczl_保养工时: JPformdata['保养工时'],
  3430. sczl_异常停机工时: JPformdata['异常总工时'],
  3431. sczl_异常类型1: JPformdata['异常类型'],
  3432. sczl_异常工时1: JPformdata['异常补贴工时'],
  3433. sczl_设备运行工时: JPformdata['通电工时'],
  3434. sczl_dedh: JPformdata['定额代号'],
  3435. sczl_bzdh: JPformdata['bzdh'],
  3436. sczl_bh1: JPformdata.组员1['编号'],
  3437. sczl_bh2: JPformdata.组员2['编号'],
  3438. sczl_bh3: JPformdata.组员3['编号'],
  3439. sczl_bh4: JPformdata.组员4['编号'],
  3440. sczl_bh5: JPformdata.组员5['编号'],
  3441. sczl_bh6: JPformdata.组员6['编号'],
  3442. sczl_bh7: JPformdata.组员7['编号'],
  3443. sczl_bh8: JPformdata.组员8['编号'],
  3444. sczl_bh9: JPformdata.组员9['编号'],
  3445. sczl_bh10: JPformdata.组员10['编号'],
  3446. sczl_bh98:'',
  3447. sczl_rate1: JPformdata.组员1['比例'],
  3448. sczl_rate2: JPformdata.组员2['比例'],
  3449. sczl_rate3: JPformdata.组员3['比例'],
  3450. sczl_rate4: JPformdata.组员4['比例'],
  3451. sczl_rate5: JPformdata.组员5['比例'],
  3452. sczl_rate6: JPformdata.组员6['比例'],
  3453. sczl_rate7: JPformdata.组员7['比例'],
  3454. sczl_rate8: JPformdata.组员8['比例'],
  3455. sczl_rate9: JPformdata.组员9['比例'],
  3456. sczl_rate10: JPformdata.组员10['比例'],
  3457. };
  3458. console.log(JPformattedData)
  3459. // console.log("新增了")
  3460. console.log(JTMC)
  3461. console.log(date)
  3462. const JpUploade_add = await JpUploade(JPformattedData);
  3463. console.log(JpUploade_add)
  3464. if (JpUploade_add.code === 0) {
  3465. // JPchanliangVisible.value = false
  3466. ElMessage({type: 'success',message: '添加成功'})
  3467. JPmachineDetails(JTMC+'#',date);
  3468. //自动聚焦光标
  3469. setTimeout(() => {
  3470. const inputElement = document.getElementById('新增工单编号');
  3471. if (inputElement) {
  3472. inputElement.focus();
  3473. }
  3474. }, 100);
  3475. JPformdata['流程标牌'] = ''
  3476. JPformdata['检验类别'] = ''
  3477. JPformdata['换膜总工时'] = ''
  3478. JPformdata['换膜补产工时'] = ''
  3479. JPformdata['保养工时'] = ''
  3480. JPformdata['异常总工时'] = ''
  3481. JPformdata['异常类型'] = ''
  3482. JPformdata['异常补贴工时'] = ''
  3483. JPformdata['通电工时'] = ''
  3484. JPformdata['计件箱数'] = 0
  3485. } else {
  3486. ElMessage({type: 'error',message: '添加失败'})
  3487. }
  3488. }
  3489. //班组产量提报 JP检品机 班组产量提报取消
  3490. const JPcloseDialog = async() => {
  3491. JPchanliangVisible.value = false
  3492. }
  3493. //班组产量提报 回车
  3494. const JPblModellistedit = ref(false)
  3495. const JPdialogSelectVisible_LXedit = ref(false)
  3496. const JPtableDataedit = reactive([
  3497. { name: ' ', type: ' ' },
  3498. { name: '废品版', type: '废品版' },
  3499. { name: '正品版', type: '正品版' },
  3500. { name: '次品版', type: '次品版' },
  3501. ])
  3502. const JPhandleRowClickedit = async (row) => {
  3503. JPformdataedit['检验类别'] = row['name']
  3504. JPdialogSelectVisible_LXedit.value = false
  3505. const fplxs = await getRejectRate({order:JPformdataedit['工单编号'],yjno:JPformdataedit['印件号'],gxh:JPformdataedit['工序号'],type:JPformdataedit['检验类别']})
  3506. if (fplxs.code === 0) {
  3507. JPformdataedit['废品率系数'] = fplxs.data
  3508. }
  3509. }
  3510. const currentIndex_jylbedit = ref(0);
  3511. //弹窗键盘事件
  3512. const JPselect_jylbedit = (event) => {
  3513. if (event.keyCode === 40) { // 向下箭头
  3514. if (currentIndex_jylbedit.value < JPtableDataedit.length - 1) {
  3515. currentIndex_jylbedit.value++;
  3516. setCurrent_jylbedit(JPtableDataedit[currentIndex_jylbedit.value]);
  3517. } else {
  3518. currentIndex_jylbedit.value = 0;
  3519. setCurrent_jylbedit(JPtableDataedit[currentIndex_jylbedit.value]); // 到达最后一行时回到第一行
  3520. }
  3521. } else if (event.keyCode === 38) { // 向上箭头
  3522. if (currentIndex_jylbedit.value > 0) {
  3523. currentIndex_jylbedit.value--;
  3524. setCurrent_jylbedit(JPtableDataedit[currentIndex_jylbedit.value]);
  3525. } else {
  3526. currentIndex_jylbedit.value = JPtableDataedit.length - 1;
  3527. setCurrent_jylbedit(JPtableDataedit[currentIndex_jylbedit.value]); // 到达第一行时回到最后一行
  3528. }
  3529. } else if (event.keyCode === 13) { // 回车键
  3530. JPdialogSelectVisible_LXedit.value = false
  3531. }
  3532. }
  3533. const jylbedit_table = ref()
  3534. const setCurrent_jylbedit = async (row) => {
  3535. setTimeout(() => {
  3536. jylbedit_table.value?.setCurrentRow(row)
  3537. const {name} = row
  3538. JPformdataedit['检验类别'] = name
  3539. })
  3540. }
  3541. //工单编号回车事件
  3542. const JPgetCPMCsubmitedit = () => {
  3543. if(JPformdataedit.工单编号!=''){
  3544. ChanliangWorkorder({search:JPformdataedit['工单编号'],machine:JTMC}).then(response=>{
  3545. if (response.code === 0) {
  3546. if(response.data){
  3547. JPformdataedit['产品名称'] = response.data[0].cpmc
  3548. document.getElementById('产品名称').style.color = 'red';
  3549. // JPgetYJMCsubmit()
  3550. }else{
  3551. ElMessage({
  3552. type: 'error',
  3553. message: response.msg
  3554. })
  3555. JPformdataedit['工单编号'] = '';
  3556. JPformdataedit['产品名称'] = '';
  3557. document.getElementById('产品名称').style.color = 'black';
  3558. }
  3559. }else{
  3560. JPformdataedit['工单编号'] = '';
  3561. JPformdataedit['产品名称'] = '';
  3562. document.getElementById('产品名称').style.color = 'black';
  3563. }
  3564. });
  3565. }else{
  3566. ElMessage({
  3567. type: 'error',
  3568. message: '请注意, 工单编号输入空置, 除非有特殊需要!'
  3569. })
  3570. gxmc.value = '';
  3571. document.getElementById('产品名称').style.color = 'black';
  3572. }
  3573. }
  3574. //印件选择
  3575. const JPdialogSelectVisible_Yjedit = ref(false)
  3576. const JPselectData_Yjedit = reactive([])
  3577. // 处理选择框
  3578. const JPhandleSelectClick_Yjedit = (row, column, event) => {
  3579. const { yjno, yjmc, ls } = row
  3580. JPformdataedit['印件号'] = yjno
  3581. JPformdataedit['印件名称'] = yjmc
  3582. JPdialogSelectVisible_Yjedit.value = false
  3583. }
  3584. const JPselect_Yjedit = (event) => {
  3585. if (event.keyCode === 40) { // 向下箭头
  3586. if (currentIndex.value < JPselectData_Yjedit.length - 1) {
  3587. currentIndex.value++;
  3588. JPsetCurrent_Yjedit(JPselectData_Yjedit[currentIndex.value]);
  3589. } else {
  3590. currentIndex.value = 0;
  3591. JPsetCurrent_Yjedit(JPselectData_Yjedit[currentIndex.value]); // 到达最后一行时回到第一行
  3592. }
  3593. } else if (event.keyCode === 38) { // 向上箭头
  3594. if (currentIndex.value > 0) {
  3595. currentIndex.value--;
  3596. JPsetCurrent_Yjedit(JPselectData_Yjedit[currentIndex.value]);
  3597. } else {
  3598. currentIndex.value = JPselectData_Yjedit.length - 1;
  3599. JPsetCurrent_Yjedit(JPselectData_Yjedit[currentIndex.value]); // 到达第一行时回到最后一行
  3600. }
  3601. } else if (event.keyCode === 13) { // 回车键
  3602. JPdialogSelectVisible_Yjedit.value = false;
  3603. }
  3604. }
  3605. const table_xgyj = ref();
  3606. const JPsetCurrent_Yjedit = (row) => {
  3607. setTimeout(() => {
  3608. table_xgyj.value?.setCurrentRow(row);
  3609. const { ls, yjno, yjmc } = row
  3610. console.log(row)
  3611. JPformdataedit['印件号'] = yjno
  3612. JPformdataedit['印件名称'] = yjmc
  3613. });
  3614. };
  3615. //工序选择
  3616. const JPdialogSelectVisible_Gxedit = ref(false)
  3617. const JPselectData_Gxedit = reactive([])
  3618. const JPtable_Gxedit = ref()
  3619. // 处理选择框
  3620. const JPhandleSelectClick_Gxedit = (row, column, event) => {
  3621. const { gxh, name, gxmc } = row
  3622. JPformdataedit['工序号'] = gxh
  3623. JPformdataedit['工序名称'] = name
  3624. JPdialogSelectVisible_Gxedit.value = false
  3625. }
  3626. const currentIndex_gxedit = ref(0);
  3627. //弹窗键盘事件
  3628. const JPselect_xzedit = (event) => {
  3629. if (event.keyCode === 40) { // 向下箭头
  3630. if (currentIndex_gxedit.value < JPselectData_Gxedit.length - 1) {
  3631. currentIndex_gxedit.value++;
  3632. setCurrent_gxedit(JPselectData_Gxedit[currentIndex_gxedit.value]);
  3633. } else {
  3634. currentIndex_gxedit.value = 0;
  3635. setCurrent_gxedit(JPselectData_Gxedit[currentIndex_gxedit.value]); // 到达最后一行时回到第一行
  3636. }
  3637. } else if (event.keyCode === 38) { // 向上箭头
  3638. if (currentIndex_gxedit.value > 0) {
  3639. currentIndex_gxedit.value--;
  3640. setCurrent_gxedit(JPselectData_Gxedit[currentIndex_gxedit.value]);
  3641. } else {
  3642. currentIndex_gxedit.value = JPselectData_Gxedit.length - 1;
  3643. setCurrent_gxedit(JPselectData_Gxedit[currentIndex_gxedit.value]); // 到达第一行时回到最后一行
  3644. }
  3645. } else if (event.keyCode === 13) { // 回车键
  3646. JPdialogSelectVisible_Gxedit.value = false
  3647. }
  3648. }
  3649. const table_gxedit = ref()
  3650. const setCurrent_gxedit = (row) => {
  3651. setTimeout(() => {
  3652. table_gxedit.value?.setCurrentRow(row)
  3653. const { gxh, name, gxmc } = row
  3654. JPformdataedit['工序号'] = gxh
  3655. JPformdataedit['工序名称'] = name
  3656. })
  3657. }
  3658. const JPentedit = async (event,key,val) => {
  3659. if(event.keyCode === 13){
  3660. //组员及比例分配
  3661. if(event.keyCode === 13 && val === '1'){
  3662. let bzyg=''
  3663. bzyg=`组员${key}`
  3664. let bzxm=''
  3665. bzxm=`组员${key}`
  3666. if(JPformdataedit[bzyg]['编号']){
  3667. const getYg_response = await getYg({sczl_bh:JPformdataedit[bzyg]['编号']});
  3668. if (getYg_response.code === 0) {
  3669. if(getYg_response.data.length === 1){
  3670. JPformdataedit[bzyg]['姓名'] = getYg_response.data[0].ygxm
  3671. JPformdataedit[bzyg]['编号'] = getYg_response.data[0].员工编号
  3672. }else{
  3673. JPblModellistedit.value = true;
  3674. JPemployeeDatalistedit.value = getYg_response.data // 假设响应数据是数组
  3675. }
  3676. }
  3677. }
  3678. // 阻止回车键的默认行为
  3679. event.preventDefault();
  3680. event.stopPropagation();
  3681. // 获取所有以 "bh" 开头的输入框
  3682. const inputs = document.querySelectorAll('input[id^="bh"]');
  3683. const currentIndex = Array.from(inputs).indexOf(event.target); // 获取当前触发事件的input索引
  3684. // 判断是否是最后一个输入框
  3685. if (currentIndex === inputs.length - 1) {
  3686. console.log('当前是最后一个输入框');
  3687. if(JPblModellist.value === false){
  3688. // 弹出存盘确认框
  3689. ElMessageBox.confirm('数据存盘?', '提示', {
  3690. confirmButtonText: '确定',
  3691. cancelButtonText: '取消',
  3692. type: 'warning'
  3693. }).then(() => {
  3694. // 用户点击“确定”,执行存盘操作
  3695. JPenterDialogedit();
  3696. }).catch(() => {
  3697. console.log('用户取消了存盘操作');
  3698. });
  3699. }
  3700. }
  3701. }
  3702. if(event.target.id === '检验类别'){
  3703. JPdialogSelectVisible_LXedit.value = true
  3704. }
  3705. if(event.target.id === '印件号'){
  3706. if(JPformdataedit['工单编号']!=''){
  3707. //获取印件名称
  3708. ChanliangPrintDetail({gdbh:JPformdataedit['工单编号']}).then(response=>{
  3709. if (response.code === 0) {
  3710. if(response.data){
  3711. if(response.data.length==1){
  3712. JPformdataedit['印件号'] = response.data[0].yjno
  3713. JPformdataedit['印件名称'] = response.data[0].yjmc
  3714. setColorReadonly('印件名称')
  3715. }else{
  3716. JPselectData_Yjedit.splice(0, JPselectData_Yjedit.length, ...response.data)
  3717. JPdialogSelectVisible_Yjedit.value=true
  3718. }
  3719. }else{
  3720. ElMessage({
  3721. type: 'error',
  3722. message: response.msg
  3723. })
  3724. }
  3725. }
  3726. });
  3727. }else{
  3728. ElMessage({
  3729. type: 'error',
  3730. message: '印件编号不存在, 将恢复默认值, 请仔细确认数据准确性!'
  3731. })
  3732. }
  3733. }
  3734. if(event.target.id === '工序号'){
  3735. document.getElementById('工序名称').style.color = 'red';
  3736. //弹出选择
  3737. ChanliangProcessDetail({gdbh:JPformdataedit['工单编号'],yjno:JPformdataedit['印件号'],machine:''}).then(response=>{
  3738. if (response.code === 0) {
  3739. if(response.data){
  3740. if(response.data.length === 1){
  3741. JPformdataedit['工序号']=response.data[0].gxh
  3742. JPformdataedit['工序名称']=response.data[0].name
  3743. }else{
  3744. JPselectData_Gxedit.splice(0, JPselectData_Gxedit.length, ...response.data)
  3745. JPdialogSelectVisible_Gxedit.value = true
  3746. }
  3747. }else{
  3748. ElMessage({
  3749. type: 'error',
  3750. message: response.msg
  3751. })
  3752. }
  3753. }
  3754. })
  3755. }
  3756. if (event.target.id === '机器') {
  3757. // 获取当前输入框的值
  3758. const machineInputValue = JPformdataedit['机器'];
  3759. // 调用接口获取机台数据
  3760. const MachineListdata = await gdzl_MachineList({ address: CJMC.value });
  3761. console.log("MachineListdata", MachineListdata);
  3762. //机台列表数据
  3763. JPselectData_JTedit.value = MachineListdata.data.map((item, index) => ({
  3764. ID: index + 1,
  3765. 机台: item,
  3766. }));
  3767. JPselectData_JTedit.splice(0, JPselectData_JTedit.length, ...JPselectData_JTedit.value);
  3768. // 检查输入的机器名称是否存在于接口返回的数据中
  3769. const isMachineValid = JPselectData_JTedit.value.some(item => item.机台 === machineInputValue);
  3770. //完全匹配时,输入错误在弹窗
  3771. // const isMachineValid = JPselectData_JT.value.some(item => item.机台.split('-->')[0] === machineInputValue);
  3772. if (!isMachineValid) {
  3773. // 如果机器名称无效,则弹出弹窗
  3774. JPdialogVisible_JTedit.value = true;
  3775. // console.log('输入的机器不在列表中,弹出弹窗');
  3776. } else {
  3777. // console.log('输入的机器匹配列表,弹窗不显示');
  3778. }
  3779. }
  3780. if (event.target.id === '定额代号') {
  3781. if(JPformdataedit['机器'] === ''){
  3782. ElMessage({
  3783. type: 'error',
  3784. message: '请先选择机台!'
  3785. })
  3786. //自动聚焦光标
  3787. setTimeout(() => {
  3788. const inputElement = document.getElementById('机器');
  3789. if (inputElement) {
  3790. inputElement.focus();
  3791. }
  3792. }, 100);
  3793. }else{
  3794. getDedhsubmitedit();
  3795. }
  3796. }
  3797. if (event.target.id === 'bzdh') {
  3798. console.log('检品修改选择班组')
  3799. openBanzuDialog()
  3800. }
  3801. }
  3802. const inputs = document.getElementsByTagName('input');
  3803. const currentIndex = Array.from(inputs).indexOf(event.target);
  3804. if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
  3805. let nextIndex = currentIndex + 1;
  3806. while (nextIndex < inputs.length) {
  3807. if (inputs[nextIndex].disabled) {
  3808. console.log("当前输入框为disabled,跳过");
  3809. nextIndex++; // 跳过disabled的输入框
  3810. continue;
  3811. }
  3812. if (!inputs[nextIndex].readOnly) {
  3813. nextTick(() => {
  3814. inputs[nextIndex].focus();
  3815. inputs[nextIndex].select();
  3816. });
  3817. break;
  3818. }
  3819. nextIndex++;
  3820. }
  3821. }
  3822. else if (event.keyCode === 38) { // 向上箭头
  3823. for (let i = currentIndex - 1; i >= 0; i--) {
  3824. if (!inputs[i].readOnly) {
  3825. nextTick(()=>{
  3826. inputs[i].focus();
  3827. inputs[i].select();
  3828. })
  3829. break;
  3830. }
  3831. }
  3832. // } else if (event.keyCode === 8) { // 删除箭头
  3833. // if (event.target.selectionStart === 0) {
  3834. // for (let i = currentIndex - 1; i >= 0; i--) {
  3835. // if (!inputs[i].readOnly) {
  3836. // nextTick(()=>{
  3837. // inputs[i].focus();
  3838. // inputs[i].setSelectionRange(0, 0);
  3839. // })
  3840. // break;
  3841. // }
  3842. // }
  3843. // }
  3844. } else if (event.keyCode === 37) { // 向左箭头
  3845. if (event.target.selectionStart === 0) {
  3846. for (let i = currentIndex - 1; i >= 0; i--) {
  3847. if (!inputs[i].readOnly) {
  3848. nextTick(()=>{
  3849. inputs[i].focus();
  3850. inputs[i].select();
  3851. })
  3852. break;
  3853. }
  3854. }
  3855. }
  3856. } else if (event.keyCode === 39) { // 向右箭头
  3857. if (event.target.selectionStart === event.target.value.length) {
  3858. for (let i = currentIndex + 1; i < inputs.length; i++) {
  3859. if (!inputs[i].readOnly) {
  3860. nextTick(()=>{
  3861. inputs[i].focus();
  3862. inputs[i].select();
  3863. })
  3864. break;
  3865. }
  3866. }
  3867. }
  3868. }
  3869. }
  3870. /*
  3871. 机台机器选择修改
  3872. */
  3873. const JPdialogVisible_JTedit = ref(false) // 弹窗
  3874. const JPselectData_JTedit = reactive([]) // table data
  3875. const currentIndex_JTedit = ref(0);
  3876. //双击事件
  3877. const JPhandleSelectClick_JTedit = async (row) => {
  3878. // 使用 split() 截取 '机器' 字符串中 '-->' 前面的部分
  3879. const machineName = row['机台'].split('-->')[0];
  3880. JPformdataedit['机器'] = machineName;
  3881. }
  3882. // 键盘事件
  3883. const JPselect_JTedit = async (event) => {
  3884. if (event.keyCode === 40) { // 向下箭头
  3885. if (currentIndex_JTedit.value < JPselectData_JTedit.length - 1) {
  3886. currentIndex_JTedit.value++;
  3887. setCurrent_JTedit(JPselectData_JTedit[currentIndex_JTedit.value]);
  3888. } else {
  3889. currentIndex_JTedit.value = 0;
  3890. setCurrent_JTedit(JPselectData_JTedit[currentIndex_JTedit.value]); // 到达最后一行时回到第一行
  3891. }
  3892. } else if (event.keyCode === 38) { // 向上箭头
  3893. if (currentIndex_JTedit.value > 0) {
  3894. currentIndex_JTedit.value--;
  3895. setCurrent_JTedit(JPselectData_JTedit[currentIndex_JTedit.value]);
  3896. } else {
  3897. currentIndex_JTedit.value = JPselectData_JTedit.length - 1;
  3898. setCurrent_JTedit(JPselectData_JTedit[currentIndex_JTedit.value]); // 到达第一行时回到最后一行
  3899. }
  3900. } else if (event.keyCode === 13) { // 回车键
  3901. JPdialogVisible_JTedit.value = false;
  3902. }
  3903. }
  3904. // ref属性
  3905. const table_JTedit = ref();
  3906. const setCurrent_JTedit = (row) => {
  3907. setTimeout(() => {
  3908. table_JTedit.value?.setCurrentRow(row);
  3909. // 使用 split() 截取 '机器' 字符串中 '-->' 前面的部分
  3910. const machineName = row['机台'].split('-->')[0];
  3911. JPformdataedit['机器'] = machineName;
  3912. });
  3913. }
  3914. //班组产量提报 打开新增页面
  3915. const onADD = async() => {
  3916. //判断是否为JP 检品机器【是检品机独立页面】
  3917. if (JTMC.startsWith('JP')) {
  3918. JPchanliangVisible.value = true
  3919. //获取当天日期接口
  3920. getTimelistss();
  3921. //获取产量上报数据信息接口
  3922. getMachineReportInfos();
  3923. } else {
  3924. type2.value="create"
  3925. //通过车间名称查询机台【机器】
  3926. gdzl_MachineList({address:CJMC.value}).then( MachineList_jitai =>{
  3927. gdzl_MachineList_address.data = MachineList_jitai.data;
  3928. });
  3929. console.log('点击新增')
  3930. //打开新增按钮获取
  3931. qita_jitaidata();
  3932. if(uid.value == undefined){
  3933. initfordata3()
  3934. chanliangVisible.value=true
  3935. return
  3936. }
  3937. const response = await MachineChanliangDetail({UniqId:uid.value});
  3938. if (response.code === 0) {
  3939. chanliangVisible.value=true
  3940. formdata3.value=response.data
  3941. const result=formdata3.value.gxmc.match(/-(.{2})/)
  3942. formdata3.value.gymc=result[1]
  3943. formdata3.value.sczl_jtbh=JTMC
  3944. formdata3.value.yjmc=response.data.印件名称
  3945. formdata3.value.rq=date
  3946. if (formdata3.value.bzdh === 'A班') {
  3947. formdata3.value.starttime = ''; // 清空值
  3948. setTimeout(()=>{
  3949. formdata3.value.starttime = date + " 08:30:00"; // 设置为 20:30:00
  3950. })
  3951. } else if (formdata3.value.bzdh === 'B班') {
  3952. formdata3.value.starttime = ''; // 清空值
  3953. setTimeout(()=>{
  3954. formdata3.value.starttime = date + " 20:30:00"; // 设置为 20:30:00
  3955. })
  3956. }
  3957. //部分数据置空
  3958. formdata3.value.产量 = '';
  3959. formdata3.value.制程废品 = '0.0';
  3960. formdata3.value.制程次品 = '0.0';
  3961. formdata3.value.前工序废 = '0.0';
  3962. formdata3.value.来料异常 = '0.0';
  3963. formdata3.value.装版工时 = '0.00';
  3964. formdata3.value.装版补产工时 = '0.00';
  3965. formdata3.value.打样工时 = '0.00';
  3966. formdata3.value.打样补产工时 = '0.00';
  3967. formdata3.value.保养工时 = '0.00';
  3968. formdata3.value.异常总工时 = '0.00';
  3969. formdata3.value.通电工时 = '0.00';
  3970. }
  3971. }
  3972. //自动聚焦光标
  3973. setTimeout(() => {
  3974. const inputElement = document.getElementById('新增工单编号');
  3975. if (inputElement) {
  3976. inputElement.focus();
  3977. }
  3978. }, 100);
  3979. //自动聚焦光标
  3980. setTimeout(() => {
  3981. const inputElement = document.getElementById('工单编号');
  3982. if (inputElement) {
  3983. inputElement.focus();
  3984. }
  3985. }, 100);
  3986. }
  3987. //班组产量提报 获取当天日期接口
  3988. const getTimelistss = async () => {
  3989. const getTimelistss = await getTimelist();
  3990. JPformdata['日期'] = getTimelistss.data.date
  3991. }
  3992. //班组产量提报 获取产量上报数据信息接口
  3993. const getMachineReportInfos = async () => {
  3994. const getMachineReportInfos = await reportInfo({machine:JTMC = JTMC.replace(/#/g, '')});
  3995. JPformdata['bzdh'] = getMachineReportInfos.data.class.sczl_bzdh
  3996. JPformdata['工单编号'] = _rclsb_gdbh.value
  3997. JPformdata['产品名称'] = getMachineReportInfos.data.order_info.product_name
  3998. // JPformdata['定额代号'] = getMachineReportInfos.data.order_info.dedh
  3999. for (let i = 1; i <= 10; i++) {
  4000. JPformdata[`组员${i}`]['比例'] = getMachineReportInfos.data.class[`sczl_rate${i}`];
  4001. }
  4002. }
  4003. //工单编号回车事件
  4004. const JPgetCPMCsubmit = () => {
  4005. if(JPformdata.工单编号!=''){
  4006. ChanliangWorkorder({search:JPformdata['工单编号'],machine:JTMC}).then(response=>{
  4007. if (response.code === 0) {
  4008. if(response.data){
  4009. JPformdata['产品名称'] = response.data[0].cpmc
  4010. document.getElementById('产品名称').style.color = 'red';
  4011. // JPgetYJMCsubmit()
  4012. }else{
  4013. ElMessage({
  4014. type: 'error',
  4015. message: response.msg
  4016. })
  4017. JPformdata['工单编号'] = '';
  4018. JPformdata['产品名称'] = '';
  4019. document.getElementById('产品名称').style.color = 'black';
  4020. }
  4021. }else{
  4022. JPformdata['工单编号'] = '';
  4023. JPformdata['产品名称'] = '';
  4024. document.getElementById('产品名称').style.color = 'black';
  4025. }
  4026. });
  4027. }else{
  4028. ElMessage({
  4029. type: 'error',
  4030. message: '请注意, 工单编号输入空置, 除非有特殊需要!'
  4031. })
  4032. gxmc.value = '';
  4033. document.getElementById('产品名称').style.color = 'black';
  4034. }
  4035. }
  4036. //印件选择
  4037. const JPdialogSelectVisible_Yj = ref(false)
  4038. const JPselectData_Yj = reactive([])
  4039. // 处理选择框
  4040. const JPhandleSelectClick_Yj = (row, column, event) => {
  4041. const { yjno, yjmc, ls } = row
  4042. JPformdata['印件号'] = yjno
  4043. JPformdata['印件名称'] = yjmc
  4044. JPdialogSelectVisible_Yj.value = false
  4045. }
  4046. const JPselect_Yj = (event) => {
  4047. if (event.keyCode === 40) { // 向下箭头
  4048. if (currentIndex.value < JPselectData_Yj.length - 1) {
  4049. currentIndex.value++;
  4050. JPsetCurrent_Yj(JPselectData_Yj[currentIndex.value]);
  4051. } else {
  4052. currentIndex.value = 0;
  4053. JPsetCurrent_Yj(JPselectData_Yj[currentIndex.value]); // 到达最后一行时回到第一行
  4054. }
  4055. } else if (event.keyCode === 38) { // 向上箭头
  4056. if (currentIndex.value > 0) {
  4057. currentIndex.value--;
  4058. JPsetCurrent_Yj(JPselectData_Yj[currentIndex.value]);
  4059. } else {
  4060. currentIndex.value = JPselectData_Yj.length - 1;
  4061. JPsetCurrent_Yj(JPselectData_Yj[currentIndex.value]); // 到达第一行时回到最后一行
  4062. }
  4063. } else if (event.keyCode === 13) { // 回车键
  4064. JPdialogSelectVisible_Yj.value = false;
  4065. }
  4066. }
  4067. const table_xzyj = ref();
  4068. const JPsetCurrent_Yj = (row) => {
  4069. setTimeout(() => {
  4070. table_xzyj.value?.setCurrentRow(row);
  4071. const { ls, yjno, yjmc } = row
  4072. console.log(row)
  4073. JPformdata['印件号'] = yjno
  4074. JPformdata['印件名称'] = yjmc
  4075. });
  4076. };
  4077. /*
  4078. 工序选择
  4079. */
  4080. const JPdialogSelectVisible_Gx = ref(false)//弹窗控件
  4081. const JPselectData_Gx = reactive([])//表格data数据
  4082. // const JPtable_Gx = ref()
  4083. //点击事件
  4084. const JPhandleSelectClick_Gx = (row, column, event) => {
  4085. const { gxh, name, gxmc } = row
  4086. JPformdata['工序号'] = gxh
  4087. JPformdata['工序名称'] = name
  4088. JPdialogSelectVisible_Gx.value = false
  4089. }
  4090. const currentIndex_gx = ref(0);
  4091. //弹窗键盘事件
  4092. const JPselect_xz = (event) => {
  4093. if (event.keyCode === 40) { // 向下箭头
  4094. if (currentIndex_gx.value < JPselectData_Gx.length - 1) {
  4095. currentIndex_gx.value++;
  4096. setCurrent_gx(JPselectData_Gx[currentIndex_gx.value]);
  4097. } else {
  4098. currentIndex_gx.value = 0;
  4099. setCurrent_gx(JPselectData_Gx[currentIndex_gx.value]); // 到达最后一行时回到第一行
  4100. }
  4101. } else if (event.keyCode === 38) { // 向上箭头
  4102. if (currentIndex_gx.value > 0) {
  4103. currentIndex_gx.value--;
  4104. setCurrent_gx(JPselectData_Gx[currentIndex_gx.value]);
  4105. } else {
  4106. currentIndex_gx.value = JPselectData_Gx.length - 1;
  4107. setCurrent_gx(JPselectData_Gx[currentIndex_gx.value]); // 到达第一行时回到最后一行
  4108. }
  4109. } else if (event.keyCode === 13) { // 回车键
  4110. JPdialogSelectVisible_Gx.value = false
  4111. }
  4112. }
  4113. const table_gx = ref()
  4114. const setCurrent_gx = (row) => {
  4115. setTimeout(() => {
  4116. table_gx.value?.setCurrentRow(row)
  4117. const { gxh, name, gxmc } = row
  4118. JPformdata['工序号'] = gxh
  4119. JPformdata['工序名称'] = gxmc
  4120. })
  4121. }
  4122. //班组产量提报 回车
  4123. const JPblModellist = ref(false)
  4124. const JPdialogSelectVisible_LX = ref(false)
  4125. const JPtableData = reactive([
  4126. { name: ' ', type: ' ' },
  4127. { name: '废品版', type: '废品版' },
  4128. { name: '正品版', type: '正品版' },
  4129. { name: '次品版', type: '次品版' },
  4130. ])
  4131. const JPhandleRowClick = async (row) => {
  4132. JPformdata['检验类别'] = row['name']
  4133. JPdialogSelectVisible_LX.value = false
  4134. const fplxs = await getRejectRate({order:JPformdata['工单编号'],yjno:JPformdata['印件号'],gxh:JPformdata['工序号'],type:JPformdata['检验类别']})
  4135. if (fplxs.code === 0) {
  4136. JPformdata['废品率系数'] = fplxs.data
  4137. }
  4138. }
  4139. const currentIndex_jylb = ref(0);
  4140. //弹窗键盘事件
  4141. const JPselect_jylb = (event) => {
  4142. if (event.keyCode === 40) { // 向下箭头
  4143. if (currentIndex_jylb.value < JPtableData.length - 1) {
  4144. currentIndex_jylb.value++;
  4145. setCurrent_jylb(JPtableData[currentIndex_jylb.value]);
  4146. } else {
  4147. currentIndex_jylb.value = 0;
  4148. setCurrent_jylb(JPtableData[currentIndex_jylb.value]); // 到达最后一行时回到第一行
  4149. }
  4150. } else if (event.keyCode === 38) { // 向上箭头
  4151. if (currentIndex_jylb.value > 0) {
  4152. currentIndex_jylb.value--;
  4153. setCurrent_jylb(JPtableData[currentIndex_jylb.value]);
  4154. } else {
  4155. currentIndex_jylb.value = JPtableData.length - 1;
  4156. setCurrent_jylb(JPtableData[currentIndex_jylb.value]); // 到达第一行时回到最后一行
  4157. }
  4158. } else if (event.keyCode === 13) { // 回车键
  4159. JPdialogSelectVisible_LX.value = false
  4160. }
  4161. }
  4162. const jylb_table = ref()
  4163. const setCurrent_jylb = async (row) => {
  4164. setTimeout(() => {
  4165. jylb_table.value?.setCurrentRow(row)
  4166. const {name} = row
  4167. JPformdata['检验类别'] = name
  4168. })
  4169. }
  4170. //日期获得焦点事件
  4171. const rqHandleFocus = () => {
  4172. if (JPformdata['日期'] == undefined || JPformdata['日期'] == '') {
  4173. JPformdata['日期'] = new Date().toISOString().split('T')[0]
  4174. }
  4175. }
  4176. //回车事件
  4177. const JPent = async (event,key,val) => {
  4178. if(event.keyCode === 13){
  4179. //组员及比例分配
  4180. if (val === '1') {
  4181. let bzyg = `组员${key}`;
  4182. if (JPformdata[bzyg] && JPformdata[bzyg]['编号']) {
  4183. try {
  4184. const getYg_response = await getYg({ sczl_bh: JPformdata[bzyg]['编号'] });
  4185. if (getYg_response.code === 0) {
  4186. if (getYg_response.data.length === 1) {
  4187. JPformdata[bzyg]['姓名'] = getYg_response.data[0].ygxm;
  4188. JPformdata[bzyg]['编号'] = getYg_response.data[0].员工编号;
  4189. } else {
  4190. // 显示员工选择列表
  4191. JPblModellist.value = true;
  4192. JPemployeeDatalist.value = getYg_response.data;
  4193. }
  4194. }
  4195. } catch (error) {
  4196. console.error("获取员工信息失败", error);
  4197. }
  4198. }
  4199. // 阻止回车键的默认行为
  4200. event.preventDefault();
  4201. event.stopPropagation();
  4202. // 获取所有以 "bh" 开头的输入框
  4203. const inputs = document.querySelectorAll('input[id^="bh"]');
  4204. const currentIndex = Array.from(inputs).indexOf(event.target); // 获取当前触发事件的input索引
  4205. // 判断是否是最后一个输入框
  4206. if (currentIndex === inputs.length - 1) {
  4207. console.log('当前是最后一个输入框');
  4208. if(JPblModellist.value === false){
  4209. // 弹出存盘确认框
  4210. ElMessageBox.confirm('数据存盘?', '提示', {
  4211. confirmButtonText: '确定',
  4212. cancelButtonText: '取消',
  4213. type: 'warning'
  4214. }).then(() => {
  4215. // 用户点击“确定”,执行存盘操作
  4216. JPenterDialog(); // 存盘函数
  4217. }).catch(() => {
  4218. console.log('用户取消了存盘操作');
  4219. });
  4220. }
  4221. }
  4222. }
  4223. if(event.target.id === '检验类别'){
  4224. JPdialogSelectVisible_LX.value = true
  4225. }
  4226. if(event.target.id === '印件号'){
  4227. if(JPformdata['工单编号']!=''){
  4228. //获取印件名称
  4229. ChanliangPrintDetail({gdbh:JPformdata['工单编号']}).then(response=>{
  4230. if (response.code === 0) {
  4231. if(response.data){
  4232. if(response.data.length==1){
  4233. JPformdata['印件号'] = response.data[0].yjno
  4234. JPformdata['印件名称'] = response.data[0].yjmc
  4235. setColorReadonly('印件名称')
  4236. }else{
  4237. JPselectData_Yj.splice(0, JPselectData_Yj.length, ...response.data)
  4238. JPdialogSelectVisible_Yj.value=true
  4239. }
  4240. }else{
  4241. ElMessage({
  4242. type: 'error',
  4243. message: response.msg
  4244. })
  4245. }
  4246. }
  4247. });
  4248. }else{
  4249. ElMessage({
  4250. type: 'error',
  4251. message: '印件编号不存在, 将恢复默认值, 请仔细确认数据准确性!'
  4252. })
  4253. }
  4254. }
  4255. if(event.target.id === '工序号'){
  4256. document.getElementById('工序名称').style.color = 'red';
  4257. //弹出选择
  4258. ChanliangProcessDetail({gdbh:JPformdata['工单编号'],yjno:JPformdata['印件号'],machine: CJMC.value}).then(response=>{
  4259. if (response.code === 0) {
  4260. if(response.data){
  4261. if(response.data.length === 1){
  4262. JPformdata['工序号']=response.data[0].gxh
  4263. JPformdata['工序名称']=response.data[0].name
  4264. }else{
  4265. JPselectData_Gx.splice(0, JPselectData_Gx.length, ...response.data)
  4266. JPdialogSelectVisible_Gx.value = true
  4267. }
  4268. }else{
  4269. ElMessage({
  4270. type: 'error',
  4271. message: response.msg
  4272. })
  4273. }
  4274. }
  4275. })
  4276. }
  4277. if (event.target.id === '机器') {
  4278. // 获取当前输入框的值
  4279. const machineInputValue = JPformdata['机器'];
  4280. // 调用接口获取机台数据
  4281. const MachineListdata = await gdzl_MachineList({ address: CJMC.value });
  4282. console.log("MachineListdata", MachineListdata);
  4283. //机台列表数据
  4284. JPselectData_JT.value = MachineListdata.data.map((item, index) => ({
  4285. ID: index + 1,
  4286. 机台: item,
  4287. }));
  4288. JPselectData_JT.splice(0, JPselectData_JT.length, ...JPselectData_JT.value);
  4289. // 检查输入的机器名称是否存在于接口返回的数据中
  4290. const isMachineValid = JPselectData_JT.value.some(item => item.机台 === machineInputValue);
  4291. //完全匹配时,输入错误在弹窗
  4292. // const isMachineValid = JPselectData_JT.value.some(item => item.机台.split('-->')[0] === machineInputValue);
  4293. if (!isMachineValid) {
  4294. // 如果机器名称无效,则弹出弹窗
  4295. JPdialogVisible_JT.value = true;
  4296. // console.log('输入的机器不在列表中,弹出弹窗');
  4297. } else {
  4298. // console.log('输入的机器匹配列表,弹窗不显示');
  4299. }
  4300. }
  4301. if (event.target.id === '定额代号') {
  4302. if(JPformdata['机器'] === ''){
  4303. ElMessage({
  4304. type: 'error',
  4305. message: '请先选择机台!'
  4306. })
  4307. //自动聚焦光标
  4308. setTimeout(() => {
  4309. const inputElement = document.getElementById('机器');
  4310. if (inputElement) {
  4311. inputElement.focus();
  4312. }
  4313. }, 100);
  4314. }else{
  4315. getDedhsubmit();
  4316. }
  4317. }
  4318. if (event.target.id === 'bzdh') {
  4319. console.log('检品新增选择班组')
  4320. openBanzuDialog()
  4321. }
  4322. }
  4323. const inputs = document.getElementsByTagName('input');
  4324. const currentIndex = Array.from(inputs).indexOf(event.target);
  4325. if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
  4326. let nextIndex = currentIndex + 1;
  4327. while (nextIndex < inputs.length) {
  4328. if (inputs[nextIndex].disabled) {
  4329. console.log("当前输入框为disabled,跳过");
  4330. nextIndex++; // 跳过disabled的输入框
  4331. continue;
  4332. }
  4333. if (!inputs[nextIndex].readOnly) {
  4334. nextTick(() => {
  4335. inputs[nextIndex].focus();
  4336. inputs[nextIndex].select();
  4337. });
  4338. break;
  4339. }
  4340. nextIndex++;
  4341. }
  4342. }
  4343. else if (event.keyCode === 38) { // 向上箭头
  4344. for (let i = currentIndex - 1; i >= 0; i--) {
  4345. if (!inputs[i].readOnly) {
  4346. nextTick(()=>{
  4347. inputs[i].focus();
  4348. inputs[i].select();
  4349. })
  4350. break;
  4351. }
  4352. }
  4353. // } else if (event.keyCode === 8) { // 删除箭头
  4354. // if (event.target.selectionStart === 0) {
  4355. // for (let i = currentIndex - 1; i >= 0; i--) {
  4356. // if (!inputs[i].readOnly) {
  4357. // nextTick(()=>{
  4358. // inputs[i].focus();
  4359. // inputs[i].setSelectionRange(0, 0);
  4360. // })
  4361. // break;
  4362. // }
  4363. // }
  4364. // }
  4365. } else if (event.keyCode === 37) { // 向左箭头
  4366. if (event.target.selectionStart === 0) {
  4367. for (let i = currentIndex - 1; i >= 0; i--) {
  4368. if (!inputs[i].readOnly) {
  4369. nextTick(()=>{
  4370. inputs[i].focus();
  4371. inputs[i].select();
  4372. })
  4373. break;
  4374. }
  4375. }
  4376. }
  4377. } else if (event.keyCode === 39) { // 向右箭头
  4378. if (event.target.selectionStart === event.target.value.length) {
  4379. for (let i = currentIndex + 1; i < inputs.length; i++) {
  4380. if (!inputs[i].readOnly) {
  4381. nextTick(()=>{
  4382. inputs[i].focus();
  4383. inputs[i].select();
  4384. })
  4385. break;
  4386. }
  4387. }
  4388. }
  4389. }
  4390. }
  4391. /*
  4392. 机台机器选择新增
  4393. */
  4394. const JPdialogVisible_JT = ref(false) // 弹窗
  4395. const JPselectData_JT = reactive([]) // table data
  4396. const currentIndex_JT = ref(0);
  4397. //双击事件
  4398. const JPhandleSelectClick_JT = async (row) => {
  4399. // 使用 split() 截取 '机器' 字符串中 '-->' 前面的部分
  4400. const machineName = row['机台'].split('-->')[0];
  4401. JPformdata['机器'] = machineName;
  4402. }
  4403. // 键盘事件
  4404. const JPselect_JT = async (event) => {
  4405. if (event.keyCode === 40) { // 向下箭头
  4406. if (currentIndex_JT.value < JPselectData_JT.length - 1) {
  4407. currentIndex_JT.value++;
  4408. setCurrent_JT(JPselectData_JT[currentIndex_JT.value]);
  4409. } else {
  4410. currentIndex_JT.value = 0;
  4411. setCurrent_JT(JPselectData_JT[currentIndex_JT.value]); // 到达最后一行时回到第一行
  4412. }
  4413. } else if (event.keyCode === 38) { // 向上箭头
  4414. if (currentIndex_JT.value > 0) {
  4415. currentIndex_JT.value--;
  4416. setCurrent_JT(JPselectData_JT[currentIndex_JT.value]);
  4417. } else {
  4418. currentIndex_JT.value = JPselectData_JT.length - 1;
  4419. setCurrent_JT(JPselectData_JT[currentIndex_JT.value]); // 到达第一行时回到最后一行
  4420. }
  4421. } else if (event.keyCode === 13) { // 回车键
  4422. JPdialogVisible_JT.value = false;
  4423. }
  4424. }
  4425. // ref属性
  4426. const table_JT = ref();
  4427. const setCurrent_JT = (row) => {
  4428. setTimeout(() => {
  4429. table_JT.value?.setCurrentRow(row);
  4430. // 使用 split() 截取 '机器' 字符串中 '-->' 前面的部分
  4431. const machineName = row['机台'].split('-->')[0];
  4432. JPformdata['机器'] = machineName;
  4433. });
  4434. }
  4435. /*
  4436. 组员及分配比例弹窗
  4437. */
  4438. const JPclickedlist = ref(false);
  4439. const JPemployeeDatalist = ref('')
  4440. // 当前选中的行索引
  4441. const currentIndex_zyfp = ref(0);
  4442. // 表格引用
  4443. const zyfp_table = ref(null);
  4444. // 设置当前选中行
  4445. const setCurrent_zyfp = (row) => {
  4446. setTimeout(() => {
  4447. zyfp_table.value?.setCurrentRow(row);
  4448. console.log("当前选中行:", row);
  4449. });
  4450. };
  4451. // 表格行点击处理(用于将数据填充到表单中)
  4452. const JPtablebllickHandlerlist = (row, column, event) => {
  4453. if (JPclickedlist.value) return; // 如果短时间内重复点击,直接退出
  4454. let nextIndex = 1; // 从组员1开始检查
  4455. while (JPformdata[`组员${nextIndex}`]['姓名'] !== "") {
  4456. nextIndex++; // 找到下一个空的组员字段
  4457. if (nextIndex > 10) return; // 如果超过最大组员数量(10个),直接退出
  4458. }
  4459. // 清空所有姓名为空的列的编号(避免之前的编号残留)
  4460. for (let i = 1; i <= 10; i++) {
  4461. if (JPformdata[`组员${i}`]['姓名'] === "") {
  4462. JPformdata[`组员${i}`]['编号'] = ""; // 清空编号
  4463. }
  4464. }
  4465. // 将选中的员工信息填充到表单中
  4466. JPformdata[`组员${nextIndex}`]['编号'] = row.员工编号;
  4467. JPformdata[`组员${nextIndex}`]['姓名'] = row.ygxm;
  4468. JPblModellist.value = false; // 关闭弹窗
  4469. // 防止短时间内重复点击(设置点击锁)
  4470. JPclickedlist.value = true;
  4471. setTimeout(() => (JPclickedlist.value = false), 300); // 300毫秒后解除锁定
  4472. };
  4473. // 键盘事件处理
  4474. const JPselect_zyfp = (event) => {
  4475. if (!JPemployeeDatalist.value.length) return;
  4476. if (event.keyCode === 40) {
  4477. // 向下箭头
  4478. if (currentIndex_zyfp.value < JPemployeeDatalist.value.length - 1) {
  4479. currentIndex_zyfp.value++;
  4480. } else {
  4481. currentIndex_zyfp.value = 0; // 到达最后一行时回到第一行
  4482. }
  4483. setCurrent_zyfp(JPemployeeDatalist.value[currentIndex_zyfp.value]);
  4484. } else if (event.keyCode === 38) {
  4485. // 向上箭头
  4486. if (currentIndex_zyfp.value > 0) {
  4487. currentIndex_zyfp.value--;
  4488. } else {
  4489. currentIndex_zyfp.value = JPemployeeDatalist.value.length - 1; // 到达第一行时回到最后一行
  4490. }
  4491. setCurrent_zyfp(JPemployeeDatalist.value[currentIndex_zyfp.value]);
  4492. } else if (event.keyCode === 13) {
  4493. // 回车键
  4494. const currentRow = JPemployeeDatalist.value[currentIndex_zyfp.value];
  4495. if (currentRow) {
  4496. JPtablebllickHandlerlist(currentRow);
  4497. }
  4498. }
  4499. };
  4500. /*
  4501. 修改组员及分配比例弹窗
  4502. */
  4503. const JPclickedlistedit = ref(false);
  4504. const JPemployeeDatalistedit = ref('')
  4505. // 当前选中的行索引
  4506. const currentIndex_zyfpedit = ref(0);
  4507. // 表格引用
  4508. const zyfpedit_table = ref(null);
  4509. // 设置当前选中行
  4510. const setCurrent_zyfpedit = (row) => {
  4511. setTimeout(() => {
  4512. zyfpedit_table.value?.setCurrentRow(row);
  4513. console.log("当前选中行:", row);
  4514. });
  4515. };
  4516. // // 表格行点击处理(用于将数据填充到表单中)
  4517. const JPtablebllickHandlerlistedit = (row, column, event) => {
  4518. if (JPclickedlistedit.value) return; // 如果短时间内重复点击,直接退出
  4519. // 判断并清空所有包含字母的编号及对应的姓名
  4520. for (let i = 1; i <= 10; i++) {
  4521. const current编号 = JPformdataedit[`组员${i}`]['编号'];
  4522. if (/[a-zA-Z]/.test(current编号)) { // 使用正则检测编号中是否包含字母
  4523. JPformdataedit[`组员${i}`]['编号'] = ""; // 清空编号
  4524. JPformdataedit[`组员${i}`]['姓名'] = ""; // 清空姓名
  4525. console.log(`组员${i}的编号包含字母,已清空编号和姓名`);
  4526. }
  4527. }
  4528. // 从第1个组员开始检查空位
  4529. let nextIndex = 1; // 从组员1开始检查
  4530. while (JPformdataedit[`组员${nextIndex}`]['姓名'] !== "") {
  4531. nextIndex++; // 找到下一个空的组员字段
  4532. if (nextIndex > 10) return; // 如果超过最大组员数量(10个),直接退出
  4533. }
  4534. // 清空所有姓名为空的列的编号(避免之前的编号残留)
  4535. for (let i = 1; i <= 10; i++) {
  4536. if (JPformdataedit[`组员${i}`]['姓名'] === "") {
  4537. JPformdataedit[`组员${i}`]['编号'] = ""; // 清空编号
  4538. }
  4539. }
  4540. // 将选中的员工信息填充到表单中
  4541. JPformdataedit[`组员${nextIndex}`]['编号'] = row.员工编号;
  4542. JPformdataedit[`组员${nextIndex}`]['姓名'] = row.ygxm;
  4543. console.log(`填充数据到组员${nextIndex}:`, {
  4544. 编号: row.员工编号,
  4545. 姓名: row.ygxm
  4546. });
  4547. JPblModellistedit.value = false; // 关闭弹窗
  4548. // 防止短时间内重复点击(设置点击锁)
  4549. JPclickedlistedit.value = true;
  4550. setTimeout(() => (JPclickedlistedit.value = false), 300); // 300毫秒后解除锁定
  4551. };
  4552. // const JPtablebllickHandlerlistedit = (row, column, event) => {
  4553. // if (JPclickedlistedit.value) return; // 如果短时间内重复点击,直接退出
  4554. // let nextIndex = 1; // 从组员1开始检查
  4555. // while (JPformdataedit[`组员${nextIndex}`]['姓名'] !== "") {
  4556. // nextIndex++; // 找到下一个空的组员字段
  4557. // if (nextIndex > 10) return; // 如果超过最大组员数量(10个),直接退出
  4558. // }
  4559. // // 清空所有姓名为空的列的编号(避免之前的编号残留)
  4560. // for (let i = 1; i <= 10; i++) {
  4561. // if (JPformdataedit[`组员${i}`]['姓名'] === "") {
  4562. // JPformdataedit[`组员${i}`]['编号'] = ""; // 清空编号
  4563. // }
  4564. // }
  4565. // // 将选中的员工信息填充到表单中
  4566. // JPformdataedit[`组员${nextIndex}`]['编号'] = row.员工编号;
  4567. // JPformdataedit[`组员${nextIndex}`]['姓名'] = row.ygxm;
  4568. // JPblModellistedit.value = false; // 关闭弹窗
  4569. // // 防止短时间内重复点击(设置点击锁)
  4570. // JPclickedlistedit.value = true;
  4571. // setTimeout(() => (JPclickedlistedit.value = false), 300); // 300毫秒后解除锁定
  4572. // };
  4573. // 键盘事件处理
  4574. const JPselect_zyfpedit = (event) => {
  4575. if (!JPemployeeDatalistedit.value.length) return;
  4576. if (event.keyCode === 40) {
  4577. // 向下箭头
  4578. if (currentIndex_zyfpedit.value < JPemployeeDatalistedit.value.length - 1) {
  4579. currentIndex_zyfpedit.value++;
  4580. } else {
  4581. currentIndex_zyfpedit.value = 0; // 到达最后一行时回到第一行
  4582. }
  4583. setCurrent_zyfpedit(JPemployeeDatalistedit.value[currentIndex_zyfpedit.value]);
  4584. } else if (event.keyCode === 38) {
  4585. // 向上箭头
  4586. if (currentIndex_zyfpedit.value > 0) {
  4587. currentIndex_zyfpedit.value--;
  4588. } else {
  4589. currentIndex_zyfpedit.value = JPemployeeDatalistedit.value.length - 1; // 到达第一行时回到最后一行
  4590. }
  4591. setCurrent_zyfpedit(JPemployeeDatalistedit.value[currentIndex_zyfpedit.value]);
  4592. } else if (event.keyCode === 13) {
  4593. // 回车键
  4594. const currentRow = JPemployeeDatalistedit.value[currentIndex_zyfpedit.value];
  4595. if (currentRow) {
  4596. JPtablebllickHandlerlistedit(currentRow);
  4597. }
  4598. }
  4599. };
  4600. const multipleTable = ref(null) // 确保已经获取表格ref
  4601. const JPmultipleTable = ref(null)
  4602. const Selection_ids = ref('')
  4603. const customer = ref('')
  4604. // // 印件资料多选、工艺资料多选
  4605. // const selectionChange = (selection) => {
  4606. // if(selection.length !==0){
  4607. // customer.value = selection[0].工单编号
  4608. // }else{
  4609. // customer.value = ''
  4610. // }
  4611. // const ids = selection.map(item => {
  4612. // return item.UniqId
  4613. // })
  4614. // Selection_ids.value = ids.join(',')
  4615. // }
  4616. // const checkboxT = (row, index) => {
  4617. // if(customer.value != ''){
  4618. // return row.工单编号 === customer.value
  4619. // }else{
  4620. // return true
  4621. // }
  4622. // }
  4623. // 复选框变化时记录工单编号
  4624. const selectionChange = (selection) => {
  4625. if (selection.length !== 0) {
  4626. customer.value = selection[0].工单编号
  4627. } else {
  4628. customer.value = ''
  4629. }
  4630. const ids = selection.map(item => item.UniqId)
  4631. Selection_ids.value = ids.join(',')
  4632. }
  4633. // 全选同工单(自动识别当前表格类型)
  4634. const selectSameWorkOrder = () => {
  4635. if (!customer.value) return ElMessage.warning('请先选择一条数据')
  4636. // 动态获取当前表格数据
  4637. const currentTableData = isJPJT.value ? JPgytableData.value : gytableData.value
  4638. const validData = currentTableData.filter(item =>
  4639. !item.isTotal &&
  4640. !(item.产品名称?.includes('A班产量:') || item.产品名称?.includes('B班产量:'))
  4641. )
  4642. // 找出相同工单的数据
  4643. const sameWorkOrderItems = validData.filter(item =>
  4644. item.工单编号 === customer.value
  4645. )
  4646. // 根据 isJPJT.value 选择对应的表格引用
  4647. const tableRef = isJPJT.value ? JPmultipleTable.value : multipleTable.value
  4648. // 清除选择
  4649. tableRef.clearSelection()
  4650. // 选择相同工单的行
  4651. sameWorkOrderItems.forEach(row => {
  4652. tableRef.toggleRowSelection(row, true)
  4653. })
  4654. Selection_ids.value = sameWorkOrderItems.map(item => item.UniqId).join(',')
  4655. }
  4656. const invertSelection = async () => {
  4657. // 动态获取当前表格数据
  4658. const currentTableData = isJPJT.value ? JPgytableData.value : gytableData.value
  4659. const validData = currentTableData.filter(item =>
  4660. !item.isTotal &&
  4661. !(item.产品名称?.includes('A班产量:') || item.产品名称?.includes('B班产量:'))
  4662. )
  4663. // 根据 isJPJT.value 选择对应的表格引用
  4664. const tableRef = isJPJT.value ? JPmultipleTable.value : multipleTable.value
  4665. // 获取当前选择
  4666. const currentSelected = tableRef.getSelectionRows()
  4667. // 清除选择
  4668. tableRef.clearSelection()
  4669. // 反选操作
  4670. validData.forEach(row => {
  4671. tableRef.toggleRowSelection(
  4672. row,
  4673. !currentSelected.some(selected => selected.UniqId === row.UniqId)
  4674. )
  4675. })
  4676. Selection_ids.value = tableRef
  4677. .getSelectionRows()
  4678. .map(item => item.UniqId)
  4679. .join(',')
  4680. }
  4681. //删除
  4682. function onDel() {
  4683. Chanliangdel()
  4684. }
  4685. // 日产量上报删除
  4686. const Chanliangdel = async() => {
  4687. if(!Selection_ids.value){
  4688. ElMessage({
  4689. type: 'warning',
  4690. message: '请勾选要删除的数据'
  4691. })
  4692. return
  4693. }
  4694. const res = await ChanliangDel({ UniqId:Selection_ids.value})
  4695. if (res.code === 0) {
  4696. ElMessage({
  4697. type: 'success',
  4698. message: '成功'
  4699. })
  4700. FacilitychanLiang()
  4701. }else{
  4702. ElMessage({
  4703. type: 'error',
  4704. message: '失败'
  4705. })
  4706. }
  4707. }
  4708. //核算调整
  4709. function hesuan(){
  4710. hesuanVisible.value=true
  4711. }
  4712. //制程检验
  4713. const zhichengstatus=ref(false)
  4714. const xunchaData = ref([]);
  4715. const zhichengVisible = ref(false)
  4716. const zhichengtreeData=ref([{
  4717. label: '首件与过程确认'
  4718. },{
  4719. label: '机台检验'
  4720. },{
  4721. label: 'IPQC检验'
  4722. }])
  4723. const onzhicheng = async () => {
  4724. zhichengstatus.value=false
  4725. xunchaData.value=[]
  4726. const response = await reportProduceInfo({machine:JTMC.split("#")[0]});
  4727. if (response.code === 0) {
  4728. xunchaData.value.order=response.data.order
  4729. xunchaData.value.yjno=response.data.yjno
  4730. xunchaData.value.product_name=response.data.product_name
  4731. xunchaData.value.gxmc=response.data.gxmc
  4732. xunchaData.value.lcdh=0
  4733. xunchaData.value.sczl_bh=''
  4734. xunchaData.value.sczl_name=''
  4735. xunchaData.value.remark=''
  4736. zhichengVisible.value = true;
  4737. }
  4738. }
  4739. const category =ref()
  4740. const zhibiaoselectData=ref([])
  4741. const fujiaselectData=ref([])
  4742. const zhichengNodeClick = (node, check) => {
  4743. if(node.label){
  4744. zhichengstatus.value=true
  4745. category.value=node.label
  4746. processInspectionRecordsItem()
  4747. }
  4748. };
  4749. //工单打印
  4750. const pd_gdprintonClick = () => {
  4751. if(formData.value.工单编号==''){
  4752. ElMessage({ type: 'warning', message: '未获取到工单' });
  4753. return
  4754. }
  4755. printPageRef.value.open(formData.value.工单编号)
  4756. }
  4757. const processInspectionRecordsItem = async (value) => {
  4758. const response = await ProcessInspectionRecordsItem({ process: xunchaData.value.gxmc });
  4759. if (response.code === 0) {
  4760. zhibiaoselectData.value=response.data.首件.指标检验.map(item=>{
  4761. item.notjc=true;
  4762. item.zc=false;
  4763. item.yc=false;
  4764. item.remark=''
  4765. item.category=category.value
  4766. item.workOrder=xunchaData.value.order
  4767. item.yjno=xunchaData.value.yjno
  4768. item.flow=xunchaData.value.lcdh
  4769. item.team=BZMC.value
  4770. item.machine=JTMC.split("#")[0]
  4771. item.selected = '不检测';
  4772. return item
  4773. })
  4774. fujiaselectData.value=response.data.首件.附加.map(item=>{
  4775. item.notjc=true;
  4776. item.workOrder=xunchaData.value.order
  4777. item.yjno=xunchaData.value.yjno
  4778. item.flow=xunchaData.value.lcdh
  4779. item.machine=JTMC.split("#")[0]
  4780. return item
  4781. })
  4782. }
  4783. };
  4784. const zhichengDialog = async () => {
  4785. let arr =[]
  4786. zhibiaoselectData.value.map(item=>{
  4787. if(item.zc==true){
  4788. item.result='合格'
  4789. item.item=item.检验项目
  4790. item.instrument=item.检测方法
  4791. item.standard=item.相关标准
  4792. delete item.notjc
  4793. delete item.zc
  4794. delete item.yc
  4795. delete item.检验项目
  4796. delete item.检测方法
  4797. delete item.相关标准
  4798. delete item.检验频率
  4799. arr.push(item)
  4800. return item
  4801. }
  4802. if(item.yc==true){
  4803. item.result='不合格'
  4804. item.item=item.检验项目
  4805. item.instrument=item.检测方法
  4806. item.standard=item.相关标准
  4807. delete item.notjc
  4808. delete item.zc
  4809. delete item.yc
  4810. delete item.检验项目
  4811. delete item.检测方法
  4812. delete item.相关标准
  4813. delete item.检验频率
  4814. arr.push(item)
  4815. return item
  4816. }
  4817. if(item.notjc==true){
  4818. item.result='不检测'
  4819. item.item=item.检验项目
  4820. item.instrument=item.检测方法
  4821. item.standard=item.相关标准
  4822. delete item.notjc
  4823. delete item.zc
  4824. delete item.yc
  4825. delete item.检验项目
  4826. delete item.检测方法
  4827. delete item.相关标准
  4828. delete item.检验频率
  4829. // arr.push(item)
  4830. return item
  4831. }
  4832. })
  4833. let arrs=[]
  4834. let fujiastatus=0
  4835. fujiaselectData.value.map(item=>{
  4836. if(item.notjc==true){
  4837. return item
  4838. }else{
  4839. fujiastatus=1
  4840. item.remark=item.缺陷备注
  4841. delete item.notjc
  4842. delete item.缺陷备注
  4843. delete item.编号
  4844. arrs.push(item)
  4845. return item
  4846. }
  4847. })
  4848. // return
  4849. if(fujiastatus==1){
  4850. const responses = await AdditionalInspectionRecordAdd(arrs);
  4851. fujiastatus=0
  4852. }
  4853. // 使用filter方法过滤掉所有result为"不检测"的对象
  4854. const filteredData = zhibiaoselectData.value.filter(item => item.selected !== "不检测");
  4855. const response = await ProcessInspectionRecordsItemAdd(filteredData);
  4856. if (response.code === 0) {
  4857. ElMessage({
  4858. type: 'success',
  4859. message: '成功'
  4860. })
  4861. zhichengVisible.value=false
  4862. zhibiaoselectData.value=[]
  4863. fujiaselectData.value=[]
  4864. }
  4865. }
  4866. const closezhichengDialog = async () => {
  4867. zhichengVisible.value=false
  4868. }
  4869. //设置机台状态
  4870. const dialogSbyxgl=ref(false)
  4871. function onstatus() {
  4872. dialogSbyxgl.value=true
  4873. SetMachineStatus()
  4874. }
  4875. //设置机台状态
  4876. const SetMachineStatus = async () => {
  4877. }
  4878. //客诉记录
  4879. const complaintsShow = ref(false)
  4880. const complaintsData = reactive([])
  4881. function oncomplaints() {
  4882. Complaints()
  4883. }
  4884. // 客诉记录表格填充
  4885. const Complaints = async() => {
  4886. if(finishedcode.value==null){
  4887. ElMessage({
  4888. type: 'error',
  4889. message: '请先选择产品',
  4890. })
  4891. return
  4892. }
  4893. const res = await ComplaintRecord({productCode :finishedcode.value})
  4894. if (res.code === 0) {
  4895. if(res.data==null){
  4896. ElMessage({
  4897. type: 'error',
  4898. message: '此产品暂无客诉记录',
  4899. })
  4900. }else{
  4901. complaintsData.splice(0, complaintsData.length, ...res.data);
  4902. selectedRowData.value=complaintsData[0]
  4903. complaintsShow.value=true
  4904. }
  4905. }
  4906. }
  4907. const selectedRowData = ref({
  4908. })
  4909. //客诉表格单击
  4910. const complaintshandle = (val, row) => {
  4911. selectedRowData.value=val
  4912. };
  4913. //换型清场
  4914. const huanxingVisible = ref(false)
  4915. const huanxingtreeData=ref([])
  4916. const huanxingselectData = ref([])
  4917. const huanxingstatus=ref(false)
  4918. const activNames=ref('first')
  4919. function onClear() {
  4920. huanxingVisible.value=true
  4921. RemodelGetTab()
  4922. }
  4923. // function onClear2() {
  4924. // console.log(formData.value.工单编号)
  4925. // console.log(BZMC)
  4926. // }
  4927. const RemodelGetTab = async() => {
  4928. const response = await remodelGetTab()
  4929. let arr=[]
  4930. if (response.code === 0) {
  4931. for(let key in response.data){
  4932. if(response.data[key][0]){
  4933. let children =[]
  4934. for (let i = 0; i < response.data[key].length; i++) {
  4935. children.push({label:response.data[key][i],machine:key})
  4936. }
  4937. arr.push({
  4938. label:key,
  4939. children:children
  4940. })
  4941. }else{
  4942. arr.push({label:key})
  4943. }
  4944. }
  4945. huanxingtreeData.value=arr
  4946. }else{
  4947. ElMessage({
  4948. type: 'error',
  4949. message: '请注意, 工单编号输入空置, 除非有特殊需要!'
  4950. })
  4951. }
  4952. }
  4953. const huanxingNodeClick = (node) => {
  4954. //存放当前节点的nodeId
  4955. if(node.machine){
  4956. huanxingstatus.value=true
  4957. remodelDetail(node.label.split('/')[1])
  4958. modelChangeRecord(node.machine)
  4959. }else{
  4960. console.log('2')
  4961. }
  4962. }
  4963. const huanxingData = ref({})
  4964. const remodelDetail = async (val) => {
  4965. const response = await RemodelDetail({UniqId:val});
  4966. if (response.code === 0) {
  4967. huanxingData.value=response.data
  4968. if(response.data.项目1==1){
  4969. huanxingData.value.项目1=true
  4970. }else{
  4971. huanxingData.value.项目1=false
  4972. }
  4973. if(response.data.项目2==1){
  4974. huanxingData.value.项目2=true
  4975. }else{
  4976. huanxingData.value.项目2=false
  4977. }
  4978. if(response.data.项目3==1){
  4979. huanxingData.value.项目3=true
  4980. }else{
  4981. huanxingData.value.项目3=false
  4982. }
  4983. if(response.data.项目4==1){
  4984. huanxingData.value.项目4=true
  4985. }else{
  4986. huanxingData.value.项目4=false
  4987. }
  4988. if(response.data.项目5==1){
  4989. huanxingData.value.项目5=true
  4990. }else{
  4991. huanxingData.value.项目5=false
  4992. }
  4993. }else{
  4994. ElMessage({
  4995. type: 'error',
  4996. message: '请注意, 工单编号输入空置, 除非有特殊需要!'
  4997. })
  4998. }
  4999. }
  5000. const modelChangeRecord = async (val) => {
  5001. const response = await ModelChangeRecord({machine:val});
  5002. if (response.code === 0) {
  5003. huanxingselectData.value=response.data
  5004. }
  5005. }
  5006. import { nextTick } from 'vue';
  5007. //设备点检
  5008. function ondianjian() {
  5009. getSpotCheckItem(JTMC).then(treeData => {
  5010. if (treeData) {
  5011. // 如果获取成功,treeData 就是我们需要的树形结构数据
  5012. dianjiantreeData = treeData;
  5013. // 使用 nextTick 来确保在更新 dianjianVisible 后立即刷新视图
  5014. nextTick(() => {
  5015. dianjianVisible.value = true;
  5016. });
  5017. // 这里可以处理treeData,例如将其赋值给某个状态管理变量或者用于渲染界面
  5018. } else {
  5019. // 如果获取失败,则treeData为null
  5020. console.log('获取巡检项目树形结构数据失败');
  5021. }
  5022. });
  5023. }
  5024. const onyinban = async() => {
  5025. console.log(formData.value.productCode)
  5026. const res = await facilityPrintGetTab({productCode:formData.value.productCode})
  5027. if(res.code===0){
  5028. yinbantreeData.value=[{
  5029. label:'产品印版库',
  5030. children:res.data.map(item=>({
  5031. label:item.印版分类,
  5032. code:item.编号
  5033. }))
  5034. }]
  5035. // console.log(res.data.map(item=>({
  5036. // label:item.印版分类,
  5037. // code:item.编号
  5038. // })))
  5039. yinbanVisible.value = true;
  5040. }
  5041. }
  5042. const handleyinbanDialogClose = () =>{
  5043. yinbanselectData.value = []
  5044. }
  5045. const onxuncha = async() => {
  5046. xunchaVisible.value=true
  5047. }
  5048. //获取设备点检->检验项目
  5049. const FacilityInspectionItem = async (value) => {
  5050. try {
  5051. // 调用接口获取巡检项目数据
  5052. const response = await facilityInspectionItem({ unitName: value ,machine:JTMC.split("#")[0]});
  5053. // 检查接口返回的状态码
  5054. if (response.code === 0) {
  5055. dianjianselectData.splice(0, dianjianselectData.length, ...response.data.map(item=>{
  5056. item.notjc=true;
  5057. item.zc=false;
  5058. item.yc=false;
  5059. item.remark=''
  5060. item.unitName=value
  5061. item.team=BZMC.value
  5062. item.machine=JTMC
  5063. return item
  5064. }))
  5065. }
  5066. } catch (error) {
  5067. // 捕获并打印异常
  5068. console.error("获取巡检项目数据出错:" + error);
  5069. return null;
  5070. }
  5071. };
  5072. //机台印版领用->右侧详情
  5073. const facilityPrintDetailItem = async (value) => {
  5074. try {
  5075. // 调用接口获取巡检项目数据
  5076. const response = await facilityPrintDetail({ workOrder: formData.value.工单编号,code:value,productCode:formData.value.productCode,page:ybpage.value,limit:ybpageSize.value });
  5077. // 检查接口返回的状态码
  5078. if (response.code === 0) {
  5079. ybtotal.value = response.data.total
  5080. yinbanselectData.value=response.data.data
  5081. }
  5082. } catch (error) {
  5083. // 捕获并打印异常
  5084. console.error("获取数据出错:" + error);
  5085. return null;
  5086. }
  5087. };
  5088. let currentSelection = ref([]); // 存储选中的数据
  5089. // 勾选回调
  5090. const yinbanSelectionChange = (selection) => {
  5091. currentSelection.value = selection; // 更新选中的数据
  5092. console.log("当前勾选数据:", currentSelection.value);
  5093. };
  5094. const onout = async () => {
  5095. try {
  5096. console.log("当前选中数据:", currentSelection.value);
  5097. // 检查必填字段
  5098. const missingFields = [];
  5099. const requestData = currentSelection.value.map((item, index) => {
  5100. const 印数 = item.印数 != null ? item.印数.toString() : '0';
  5101. // 定义必填字段及其映射关系
  5102. const requiredFields = {
  5103. '工单编号': formData.value.工单编号,
  5104. '存货编码': item.存货编码,
  5105. '供方批号': item.供方批号,
  5106. '印数':印数,
  5107. '印件号': formData.value.印件号,
  5108. '系统ID': sys_id
  5109. };
  5110. // 检查必填字段是否为空
  5111. Object.entries(requiredFields).forEach(([fieldName, value]) => {
  5112. if (value === undefined || value === null || value === "") {
  5113. missingFields.push(`第${index + 1}条数据的${fieldName}`);
  5114. }
  5115. });
  5116. // 构建请求数据对象
  5117. return {
  5118. Yb_工单编号: formData.value.工单编号,
  5119. Yb_存货编码: item.存货编码,
  5120. Yb_供方批号: item.供方批号,
  5121. Yb_领用机台: JTMC,
  5122. Yb_印数: 印数,
  5123. Yb_印件号: formData.value.印件号,
  5124. Sys_id: sys_id
  5125. };
  5126. });
  5127. // 如果有缺失字段,抛出错误
  5128. if (missingFields.length > 0) {
  5129. throw new Error(`以下字段为必填项且不能为空:\n${missingFields.join("\n")}`);
  5130. }
  5131. console.log("提交数据:", requestData);
  5132. const response = await PrintDetailAdd(requestData);
  5133. if (response?.code === 0) {
  5134. ElMessage.success("领出成功!");
  5135. facilityPrintDetailItem(yinbancode.value);
  5136. } else {
  5137. ElMessage.error(`领出失败: ${response?.msg || "未知错误"}`);
  5138. }
  5139. } catch (error) {
  5140. console.error("领出失败:", error);
  5141. ElMessage.error(`调用失败: ${error.message}`);
  5142. }
  5143. };
  5144. const dialogwithdrawVisible = ref(false)
  5145. const Plate = ref({ 印数: '' });
  5146. const onwithdraw = async () => {
  5147. console.log(currentSelection.value);
  5148. // 检查是否有印数为 null 或 undefined
  5149. const hasInvalidUniqId = currentSelection.value.some(item => {
  5150. return item?.UniqId === null || item?.UniqId === undefined;
  5151. });
  5152. if (hasInvalidUniqId) {
  5153. ElMessage.error("选择的数据中有未领用的印版,无法收回!");
  5154. return;
  5155. }
  5156. // 所有 UniqId 都有效,才打开弹窗
  5157. dialogwithdrawVisible.value = true;
  5158. };
  5159. // 删除操作
  5160. const rawenterDialog = async () => {
  5161. console.log(Plate.value.印数)
  5162. try {
  5163. await ElMessageBox.confirm('确定收回吗', '提示', {
  5164. confirmButtonText: '确定',
  5165. cancelButtonText: '取消',
  5166. type: 'warning'
  5167. })
  5168. console.log('收回选中的数据:', currentSelection.value)
  5169. const uniqIds = currentSelection.value.map(item => item.UniqId).join(',');
  5170. console.log(uniqIds);
  5171. // 调用收回API,假设是批量删除接口
  5172. const res = await PrintDetailEdit({ id: uniqIds,number:Plate.value.印数})
  5173. if (res.code === 0) {
  5174. ElMessage.success('收回成功')
  5175. facilityPrintDetailItem(yinbancode.value);
  5176. rawcloseDialog()
  5177. // 清空选中
  5178. currentSelection.value = []
  5179. } else {
  5180. ElMessage.error(res.msg || '收回失败')
  5181. }
  5182. } catch (error) {
  5183. if (error !== 'cancel') {
  5184. console.error('收回失败:', error)
  5185. ElMessage.error('收回操作已取消')
  5186. }
  5187. }
  5188. }
  5189. const rawcloseDialog = () => {
  5190. Plate.value.印数 = ''
  5191. console.log(Plate)
  5192. dialogwithdrawVisible.value = false
  5193. }
  5194. const yinbanmultipleTable = ref(null); // 表格ref
  5195. const yinbaninvertSelection = () => {
  5196. // 1. 获取当前表格的所有有效数据(排除不需要的行)
  5197. const validData = yinbanselectData.value.filter(item =>
  5198. !item.isTotal &&
  5199. !(item.产品名称?.includes('A班产量:') || item.产品名称?.includes('B班产量:'))
  5200. );
  5201. // 2. 获取当前已选中的行
  5202. const currentSelected = yinbanmultipleTable.value?.getSelectionRows() || [];
  5203. // 3. 清除当前所有选择
  5204. yinbanmultipleTable.value?.clearSelection();
  5205. // 4. 执行反选操作
  5206. validData.forEach(row => {
  5207. yinbanmultipleTable.value?.toggleRowSelection(
  5208. row,
  5209. !currentSelected.some(selected => selected.UniqId === row.UniqId)
  5210. );
  5211. });
  5212. };
  5213. //树形结构单机
  5214. const dianjianselectData = reactive([])
  5215. const yinbanselectData = ref([])
  5216. const xunchaselectData = ref([])
  5217. const yinbancode = ref('')
  5218. const dianjianNodeClick = (node, check, nodeData) => {
  5219. if (node.children && node.children.length > 0) {
  5220. // 点击的是父节点,且有子节点
  5221. } else {
  5222. FacilityInspectionItem(node.label,)
  5223. }
  5224. };
  5225. const yinbanNodeClick = (node, check, nodeData) => {
  5226. if (node.children && node.children.length > 0) {
  5227. // 点击的是父节点,且有子节点
  5228. } else {
  5229. yinbancode.value = node.code
  5230. facilityPrintDetailItem(node.code)
  5231. }
  5232. };
  5233. // 印版分页
  5234. const ybpage = ref(1)
  5235. const ybtotal = ref(0)
  5236. const ybpageSize = ref(50)
  5237. const ybhandleCurrentChange = (val) => {
  5238. ybpage.value = val;
  5239. facilityPrintDetailItem(yinbancode.value);
  5240. };
  5241. // 修改页面容量 点击多少条/页
  5242. const ybhandleSizeChange = (val) => {
  5243. // page.value = 10;
  5244. ybpageSize.value = val;
  5245. facilityPrintDetailItem(yinbancode.value);
  5246. };
  5247. const xunchaNodeClick = (node, check, nodeData) => {
  5248. if(node){
  5249. fieldInspectionRecord()
  5250. }
  5251. }
  5252. const fieldInspectionRecord = async () => {
  5253. let time = new Date();
  5254. time.setDate(time.getDate() - 0); // 今天的前N天的日期,N自定义
  5255. time= `${time.getFullYear()}-${time.getMonth() + 1}-${time.getDate()}`;
  5256. const response = await FieldInspectionRecord({ workOrder: formData.value.工单编号,team:BZMC.value,start:time+' 08:30:00' });
  5257. if (response.code === 0) {
  5258. xunchaselectData.value=response.data
  5259. }
  5260. }
  5261. let pandingfangfa=ref()
  5262. //检验项目单击
  5263. const dianjianhandle = (val, row) => {
  5264. try {
  5265. pandingfangfa.value = val.判定标准;
  5266. } catch (error) {
  5267. console.error('An error occurred:', error);
  5268. }
  5269. };
  5270. const notjcClick = (val) => {
  5271. console.log("不检测")
  5272. val.notjc=true
  5273. val.zc=false
  5274. val.yc=false
  5275. };
  5276. const zcClick = (val) => {
  5277. console.log("合格")
  5278. val.notjc=false
  5279. val.zc=true
  5280. val.yc=false
  5281. };
  5282. const ycClick = (val) => {
  5283. console.log("不合格")
  5284. val.notjc=false
  5285. val.zc=false
  5286. val.yc=true
  5287. };
  5288. const rowClassName = (row, column) => {
  5289. try {
  5290. if (row.unchecked) {
  5291. return 'row-yellow';
  5292. }
  5293. return '';
  5294. } catch (error) {
  5295. console.error('An error occurred:', error);
  5296. return '';
  5297. }
  5298. };
  5299. // 异步函数,用于获取指定设备的巡检项目,并且将结果格式化为树形结构数据
  5300. const getSpotCheckItem = async (machineName) => {
  5301. try {
  5302. // 调用接口获取巡检项目数据
  5303. const response = await facilitySpotCheckItem({ machine: machineName });
  5304. // 检查接口返回的状态码
  5305. if (response.code === 0) {
  5306. // 构建树形结构数据
  5307. const childrenData = Object.entries(response.data).map(([id, label]) => {
  5308. return {
  5309. id, // 子节点的唯一标识
  5310. label, // 子节点的标签
  5311. children: [] // 初始化子节点数组
  5312. };
  5313. });
  5314. // 创建包含父节点的树形结构数据
  5315. const treeData = [{
  5316. id: machineName, // 父节点的唯一标识
  5317. label: machineName, // 父节点的标签
  5318. children: childrenData // 子节点数据
  5319. }];
  5320. // 返回构建好的树形结构数据
  5321. return treeData;
  5322. } else {
  5323. // 如果接口返回的状态码不是0,打印错误信息
  5324. console.error("接口返回错误:" + response.msg);
  5325. return null;
  5326. }
  5327. } catch (error) {
  5328. // 捕获并打印异常
  5329. console.error("获取巡检项目数据出错:" + error);
  5330. return null;
  5331. }
  5332. };
  5333. const dianjianenterDialog = async () => {
  5334. // 转换数据格式
  5335. const formattedData = dianjianselectData.map(item => {
  5336. // 判断状态
  5337. let status;
  5338. if (item.notjc) {
  5339. status = "不检测";
  5340. } else if (item.yc) {
  5341. status = "不合格";
  5342. } else if (item.zc) {
  5343. status = "合格";
  5344. } else {
  5345. status = "";
  5346. }
  5347. // 返回接口需要的格式
  5348. return {
  5349. team: item.team,
  5350. machine: item.machine,
  5351. unitName: item.unitName,
  5352. itemName: item.检验项目,
  5353. method: item.点检方法,
  5354. status: status,
  5355. remark: item.remark,
  5356. standard: item.判定标准,
  5357. };
  5358. });
  5359. console.log("转换后的数据:", formattedData);
  5360. // 调用接口提交数据
  5361. try {
  5362. const res = await InspectionItemAdd(formattedData); // 替换成你的 API 方法
  5363. if (res.code === 0) {
  5364. ElMessage.success("提交成功!");
  5365. dianjianVisible.value = false;
  5366. } else {
  5367. ElMessage.error(res.msg || "提交失败!");
  5368. }
  5369. } catch (error) {
  5370. ElMessage.error("请求出错:" + error.message);
  5371. }
  5372. };
  5373. const dianjiancloseDialog = () => {
  5374. dianjianVisible.value = false;
  5375. }
  5376. //班组维护
  5377. // function onBZ() {
  5378. const onBZ = async () => {
  5379. FacilityTeam(JTMC)
  5380. fetchData()
  5381. detailShow.value=true
  5382. }
  5383. // 班组人员及分配比例
  5384. const FacilityTeam = async (value) => {
  5385. const response = await facilityTeam({ machine: value });
  5386. if (response.code === 0) {
  5387. BZMC.value=response.data[0]['班组号']
  5388. InspectionRecord()
  5389. FacilityDetail()
  5390. // 清空 bzData 数组
  5391. bzData.splice(0, bzData.length);
  5392. FPData.splice(0, FPData.length);
  5393. // 遍历接口返回的数据,并给每个对象添加 JTMC 属性
  5394. const updatedData = response.data.map(item => {
  5395. return { ...item, JTMC: value }; // 添加 JTMC 属性
  5396. });
  5397. // 将更新后的数据添加到 bzData 数组
  5398. bzData.push(...updatedData)
  5399. FPData.push(...updatedData)
  5400. return 1
  5401. }
  5402. };
  5403. //日产量批量维护
  5404. function onRCL() {
  5405. if(!Selection_ids.value){
  5406. ElMessage({
  5407. type: 'warning',
  5408. message: '请先勾选数据'
  5409. })
  5410. return
  5411. }
  5412. FacilityTeam_rcl(JTMC)
  5413. detailShow_rcl.value=true
  5414. console.log('333')
  5415. }
  5416. let BZMC_rcl=ref()
  5417. const bzData_rcl = reactive([])
  5418. const selectedOption_rcl = ref('');
  5419. // 班组人员及分配比例
  5420. const FacilityTeam_rcl = async (value) => {
  5421. const response = await facilityTeam({ machine: value });
  5422. if (response.code === 0) {
  5423. // formData.value.班组 = response.data[0]['班组号'];
  5424. BZMC_rcl.value = response.data[0]['班组号']
  5425. selectedOption_rcl.value = JTMC
  5426. // 清空 bzData 数组
  5427. bzData_rcl.splice(0, bzData_rcl.length);
  5428. // 遍历接口返回的数据,并给每个对象添加 JTMC 属性
  5429. const updatedData = response.data.map(item => {
  5430. return { ...item, JTMC: value }; // 添加 JTMC 属性
  5431. });
  5432. // 将更新后的数据添加到 bzData 数组
  5433. bzData_rcl.push(...updatedData);
  5434. return 1
  5435. }
  5436. };
  5437. //班组单击
  5438. const currentBz_rcl ={}
  5439. const BZvalue_rcl=ref()
  5440. const BZhandle_rcl = (val) => {
  5441. currentBz_rcl.value = val
  5442. BZvalue_rcl.value=val.ID
  5443. formDatas_rcl.value = {};
  5444. let sczl_bhkey_rcl = ''
  5445. let sczl_namekey_rcl = ''
  5446. let percentagekey_rcl = ''
  5447. if (currentBz_rcl.value[9]) {
  5448. for (let i = 1; i <= 9; i++) {
  5449. sczl_bhkey_rcl = `code${i}`
  5450. sczl_namekey_rcl = `name${i}`
  5451. percentagekey_rcl = `percentage${i}`
  5452. formDatas_rcl.value[sczl_bhkey_rcl] = '';
  5453. formDatas_rcl.value[sczl_namekey_rcl] = '';
  5454. formDatas_rcl.value[percentagekey_rcl] = '';
  5455. }
  5456. formDatas_rcl.value.code8 = currentBz_rcl.value[9].split(' ')[0];
  5457. formDatas_rcl.value.name8 = currentBz_rcl.value[9].split(' ')[1]
  5458. formDatas_rcl.value.percentage8 = Math.round((parseFloat(currentBz_rcl.value[9].split(' ')[2].split('(')[1].split(')')[0]) / 100 * 10000)) / 10000;
  5459. for (let i = 1; i <= Math.min(Object.keys(currentBz_rcl.value).length - 5, 6); i++) {
  5460. sczl_bhkey_rcl = `code${i}`
  5461. sczl_namekey_rcl = `name${i}`
  5462. percentagekey_rcl = `percentage${i}`
  5463. formDatas_rcl.value[sczl_bhkey_rcl] = currentBz_rcl.value[i - 1].split(' ')[0];
  5464. formDatas_rcl.value[sczl_namekey_rcl] = currentBz_rcl.value[i - 1].split(' ')[1];
  5465. if(isNaN(parseFloat(currentBz_rcl.value[i - 1].split(' ')[2].split('(')[1].split(')')[0]))){
  5466. formDatas_rcl.value[percentagekey_rcl] = currentBz_rcl.value[i - 1].split(' ')[2].split('(')[1].split(')')[0];
  5467. }else{
  5468. formDatas_rcl.value[percentagekey_rcl] = Math.round((parseFloat(currentBz_rcl.value[i - 1].split(' ')[2].split('(')[1].split(')')[0]) / 100 * 10000)) / 10000;
  5469. }
  5470. }
  5471. } else {
  5472. for (let i = 1; i <= 10; i++) {
  5473. sczl_bhkey_rcl = `code${i}`
  5474. sczl_namekey_rcl = `name${i}`
  5475. percentagekey_rcl = `percentage${i}`
  5476. formDatas_rcl.value[sczl_bhkey_rcl] = '';
  5477. formDatas_rcl.value[sczl_namekey_rcl] = '';
  5478. formDatas_rcl.value[percentagekey_rcl] = '';
  5479. }
  5480. for (let i = 1; i <= Math.min(Object.keys(currentBz_rcl.value).length - 4, 6); i++) {
  5481. sczl_bhkey_rcl = `code${i}`
  5482. sczl_namekey_rcl = `name${i}`
  5483. percentagekey_rcl = `percentage${i}`
  5484. formDatas_rcl.value[sczl_bhkey_rcl] = currentBz_rcl.value[i - 1].split(' ')[0];
  5485. formDatas_rcl.value[sczl_namekey_rcl] = currentBz_rcl.value[i - 1].split(' ')[1];
  5486. if(isNaN(parseFloat(currentBz_rcl.value[i - 1].split(' ')[2].split('(')[1].split(')')[0]))){
  5487. formDatas_rcl.value[percentagekey_rcl] = currentBz_rcl.value[i - 1].split(' ')[2].split('(')[1].split(')')[0];
  5488. }else{
  5489. formDatas_rcl.value[percentagekey_rcl] = Math.round((parseFloat(currentBz_rcl.value[i - 1].split(' ')[2].split('(')[1].split(')')[0]) / 100 * 10000)) / 10000;
  5490. }
  5491. }
  5492. }
  5493. BZMC_rcl.value=val.班组号
  5494. };
  5495. const selectBz_rcl = () => {
  5496. if(currentBz_rcl.value==undefined){
  5497. ElMessage({
  5498. type: 'warning',
  5499. message: '请选择班组'
  5500. })
  5501. return
  5502. }
  5503. YieldTeamEdit({'Uniqid': Selection_ids.value, 'teamID': currentBz_rcl.value.ID}).then( res => {
  5504. if(res.code==0){
  5505. ElMessage({
  5506. type: 'success',
  5507. message: '成功'
  5508. })
  5509. closeDetailShow_rcl()
  5510. FacilitychanLiang()
  5511. }
  5512. })
  5513. }
  5514. // =========== 流程单查询 ===========
  5515. const pd_lcdlist = ref(false);
  5516. const pd_lcdformData = reactive({
  5517. gdbh: '',
  5518. code: '',
  5519. name: '',
  5520. yjno: '',
  5521. });
  5522. // 流程单查询按钮
  5523. const processList = ref([]);
  5524. const pd_lcdlistonClick = async () => {
  5525. if(formData.value.工单编号 === ''){
  5526. ElMessage({
  5527. type: 'warning',
  5528. message: '请选择一条工单'
  5529. })
  5530. return;
  5531. }
  5532. console.log(formData)
  5533. if(lcd_Gd_yjno.value === '' || lcd_Gd_yjno.value === null){
  5534. console.log(formData.value.工单编号)
  5535. console.log(formData.value.印件号)
  5536. pd_lcdformData['gdbh'] = formData.value.工单编号;
  5537. pd_lcdformData['yjno'] = formData.value.印件号;
  5538. // ElMessage({type: 'warning',message: '请选择具体的工单,在进行操作'})
  5539. // return false;
  5540. }else{
  5541. pd_lcdformData['gdbh'] = lcd_Gd_gdbh.value;
  5542. pd_lcdformData['yjno'] = lcd_Gd_yjno.value;
  5543. console.log(pd_lcdformData)
  5544. }
  5545. pd_lcdlist.value = true;
  5546. processList.value = []
  5547. _getOrderProcessLeft_list();
  5548. }
  5549. const pd_lcdProductValue = async () => {
  5550. _getOrderProcessLeft_list();
  5551. }
  5552. const pd_lcd_treeData = ref([]);
  5553. const _getOrderProcessLeft_list = async () => {
  5554. const order = pd_lcdformData['gdbh'];
  5555. const yjno = pd_lcdformData['yjno']
  5556. // console.log(order)
  5557. try {
  5558. //5.1流程单查询-工单工序生产进程菜单栏
  5559. const getOrderProcessLeft_list = await getOrderProcessLeft({ order:order,yjno:yjno});
  5560. console.log(getOrderProcessLeft_list)
  5561. pd_lcdformData['code'] = getOrderProcessLeft_list.data.Gd_info['code'];
  5562. pd_lcdformData['name'] = getOrderProcessLeft_list.data.Gd_info['name'];
  5563. pd_lcd_treeData.value = [{
  5564. label: order + '-' + getOrderProcessLeft_list.data.Gd_info['name'],
  5565. // label: order + '-' + getOrderProcessLeft_list.data.Gd_info['code'] + '-' + getOrderProcessLeft_list.data.Gd_info['name'],
  5566. value: undefined,
  5567. children: []
  5568. }]
  5569. const newData = [];
  5570. for (let key in getOrderProcessLeft_list.data.Gy_info) {
  5571. let temp = getOrderProcessLeft_list.data.Gy_info[key];
  5572. let concatenatedValue = `${temp.Gy0_yjno}-${temp.Gy0_gxh} ---> ${temp.Gy0_gxmc}`;
  5573. newData.push({ label: concatenatedValue,value: temp.Gy0_gxh });
  5574. }
  5575. pd_lcd_treeData.value[0].children = newData;
  5576. //5.2流程单查询-获取工单工序生产进程右侧【进入页面默认显示第一个】
  5577. const getOrderProcessRight_list = await getOrderProcessRight({order:order, gxNo:newData[0].value,yjno:yjno});
  5578. processList.value = getOrderProcessRight_list.data
  5579. } catch (error) {
  5580. console.error(error);
  5581. }
  5582. };
  5583. const pd_lcd_handleNodeClick = async (node) => {
  5584. if (node.value === undefined) return
  5585. const order = pd_lcdformData['gdbh'];
  5586. const yjno = pd_lcdformData['yjno'];
  5587. ////5.2流程单查询-获取工单工序生产进程右侧
  5588. const getOrderProcessRight_list = await getOrderProcessRight({order:order, gxNo:node.value,yjno:yjno});
  5589. console.log(getOrderProcessRight_list)
  5590. processList.value = getOrderProcessRight_list.data
  5591. };
  5592. // 流程单查询退出
  5593. const pd_lcdCancel = async () => {
  5594. pd_lcdlist.value = false;
  5595. }
  5596. /*
  5597. 工单生产批次信息查询
  5598. */
  5599. const scpconlist = ref(false);
  5600. const scpconClick = async () => {
  5601. console.log(formData.value.工单编号)
  5602. if(lcd_Gd_gdbh.value){
  5603. searchInfolcd.value = lcd_Gd_gdbh.value
  5604. }else{
  5605. searchInfolcd.value = formData.value.工单编号
  5606. }
  5607. scpconlist.value = true;
  5608. tableDatalcd.splice(0,tableDatalcd.length,...[]);//表格数据
  5609. onSubmitlcd()//调用接口
  5610. }
  5611. //进入页面默认光标加载
  5612. setTimeout(() => {
  5613. const inputElement = document.getElementById('searchInfo');
  5614. if (inputElement) {
  5615. inputElement.focus();
  5616. }
  5617. }, 100);
  5618. //搜索
  5619. const searchInfolcd = ref('');
  5620. const tableDatalcd = reactive([])
  5621. //查询按钮
  5622. const onSubmitlcd = () => {
  5623. _StaGetOrderList()
  5624. };
  5625. //搜索回车
  5626. const Enterkeysearch = (event) => {
  5627. if (event.key === 'Enter') {
  5628. _StaGetOrderList();
  5629. }
  5630. };
  5631. //调用接口
  5632. const _StaGetOrderList = async (node) => {
  5633. const StaGetOrderListdata = await StaGetOrderList({search:searchInfolcd.value});
  5634. console.log(StaGetOrderListdata)
  5635. if (StaGetOrderListdata.data === null) {
  5636. ElMessage({
  5637. type: 'warning',
  5638. message: '未搜索具体查询条件',
  5639. });
  5640. }
  5641. tableDatalcd.splice(0,tableDatalcd.length,...StaGetOrderListdata.data);//表格数据
  5642. };
  5643. // 树形节点属性映射
  5644. const treeDatalcd = reactive([]);
  5645. const defaultProps = {
  5646. label: 'label',
  5647. children: 'children',
  5648. };
  5649. //全局调用工单编号、印件号
  5650. const _Gd_gdbhlcd = ref(null)
  5651. const _Gd_yjnolcd = ref(null)
  5652. const _GetorderDetail = ref(null)
  5653. /*
  5654. 弹窗页面
  5655. */
  5656. const popdialog = ref(false);
  5657. const currentRow = ref('');
  5658. // 获取当前行数据
  5659. const tableRowClicklcd = (row) => {
  5660. currentRow.value = row; // 保存当前选中行
  5661. };
  5662. // 按钮点击逻辑
  5663. const onstatsuclick = async () => {
  5664. console.log(currentRow)
  5665. if (!currentRow.value) {
  5666. ElMessage({
  5667. type: "warning",
  5668. message: "请先点击选择一行数据",
  5669. });
  5670. return;
  5671. }
  5672. await updateCompanyFunclcd(currentRow.value);
  5673. };
  5674. //双击
  5675. const updateCompanyFunclcd = async (row) => {
  5676. console.log("双击",row)
  5677. _Gd_gdbhlcd.value = row['Gd_gdbh']
  5678. _Gd_yjnolcd.value =row['行号']
  5679. const StaGetOrderDetaildata = await StaGetOrderDetail({ gdbh: row['Gd_gdbh'], yjno: row['行号'] });
  5680. let resultData = StaGetOrderDetaildata.data;
  5681. // 遍历对象,将 null 值替换为空字符串
  5682. Object.keys(resultData).forEach((key) => {
  5683. if (resultData[key] === null) {
  5684. resultData[key] = '';
  5685. }
  5686. });
  5687. _GetorderDetail.value = resultData;
  5688. // console.log("_GetorderDetail.value", _GetorderDetail.value);
  5689. _StaGetList(row)
  5690. }
  5691. //左侧树形节点点击事件
  5692. const handleNodeClicklcd = (node) => {
  5693. _StaProcessList(node['num'])
  5694. _StaProcessAnomaly()
  5695. };
  5696. //获取左侧菜单栏
  5697. const _StaGetList = async (row) => {
  5698. const StaGetListdata = await StaGetList({ gdbh: row['Gd_gdbh'], yjno: row['行号'] });
  5699. if (StaGetListdata.msg === '成功') {
  5700. // 转换数据:确保每个节点有 label 属性
  5701. const formattedData = StaGetListdata.data.map(item => ({
  5702. ...item,
  5703. label: item.流程单 || `流程单-${item.num}`,
  5704. }));
  5705. treeDatalcd.splice(0, treeDatalcd.length, ...formattedData);
  5706. popdialog.value = true;
  5707. } else {
  5708. ElMessage({ type: 'warning', message: StaGetListdata.msg });
  5709. }
  5710. };
  5711. //工艺及生产班组
  5712. const lcdtableData = reactive([])
  5713. const _StaProcessList = async (node) => {
  5714. const StaProcessListdata = await StaProcessList({gdbh:_Gd_gdbhlcd.value,yjno:_Gd_yjnolcd.value,num:node});
  5715. lcdtableData.splice(0,lcdtableData.length,...StaProcessListdata.data);
  5716. };
  5717. //制程异常记录
  5718. const zcycjltableData = reactive([])
  5719. const _StaProcessAnomaly = async () => {
  5720. const StaProcessAnomalydata = await StaProcessAnomaly({gdbh:_Gd_gdbhlcd.value,yjno:_Gd_yjnolcd.value});
  5721. zcycjltableData.splice(0,zcycjltableData.length,...StaProcessAnomalydata.data);
  5722. };
  5723. //退出按钮
  5724. const ontuicclick = async () => {
  5725. popdialog.value = false
  5726. };
  5727. //退出按钮
  5728. const ontuicclicks = async () => {
  5729. scpconlist.value = false
  5730. };
  5731. /*
  5732. 特殊机台组员及分配比例
  5733. */
  5734. const blModel = ref(false)
  5735. const employeeData = ref('')
  5736. const bz_Special = ref('')
  5737. const getbzyg = async (value,key) => {
  5738. bz_Special.value = key
  5739. let bzyg=''
  5740. bzyg=`code${key}`
  5741. let bzxm=''
  5742. bzxm=`name${key}`
  5743. const response = await getYg({sczl_bh:formDatas.value[bzyg]});
  5744. if (response.code === 0) {
  5745. if(response.data.length === 1){
  5746. formDatas.value[bzxm]= response.data[0].ygxm
  5747. formDatas.value[bzyg]= response.data[0].员工编号
  5748. }else{
  5749. blModel.value = true;
  5750. employeeData.value = response.data // 假设响应数据是数组
  5751. }
  5752. }
  5753. }
  5754. const clicked = ref(false);
  5755. const currentIndex = ref(0);
  5756. const tableBZRR = ref();
  5757. // 模拟点击某一行
  5758. const setCurrent = (row) => {
  5759. setTimeout(() => {
  5760. tableBZRR.value?.setCurrentRow(row);
  5761. const { 员工编号, ygxm } = row;
  5762. console.log("选中行数据:", row);
  5763. });
  5764. };
  5765. // 键盘事件处理逻辑
  5766. const selectBZRR = (event) => {
  5767. if (event.keyCode === 40) {
  5768. // 向下箭头
  5769. if (currentIndex.value < employeeData.value.length - 1) {
  5770. currentIndex.value++;
  5771. } else {
  5772. // 如果是最后一行,回到第一行
  5773. currentIndex.value = 0;
  5774. }
  5775. } else if (event.keyCode === 38) {
  5776. // 向上箭头
  5777. if (currentIndex.value > 0) {
  5778. currentIndex.value--;
  5779. } else {
  5780. // 如果是第一行,跳到最后一行
  5781. currentIndex.value = employeeData.value.length - 1;
  5782. }
  5783. } else if (event.keyCode === 13) {
  5784. // 回车键,模拟触发点击事件
  5785. const row = employeeData.value[currentIndex.value];
  5786. tablebllickHandler(row); // 手动调用行点击事件
  5787. }
  5788. //高亮当前选中的行
  5789. setCurrent(employeeData.value[currentIndex.value]);
  5790. };
  5791. // 表格行点击事件处理
  5792. const tablebllickHandler = async (row, column, event) => {
  5793. if (clicked.value) {
  5794. // 如果已经点击过一次,则不再执行操作
  5795. return;
  5796. }
  5797. for (let i = 1; i <= 8; i++) {
  5798. const codeKey = `code${i}`;
  5799. const nameKey = `name${i}`;
  5800. // 如果 code 有值,且对应的 name 没有值,则清空 code 的值
  5801. if (formDatas.value[codeKey] !== '' && formDatas.value[nameKey] === '') {
  5802. formDatas.value[codeKey] = '';
  5803. // console.log(`清空了 ${codeKey} 的值,因为 ${nameKey} 为空`);
  5804. }
  5805. // 检查 code 是否包含字母(使用正则表达式)
  5806. if (/[a-zA-Z]/.test(formDatas.value[codeKey])) {
  5807. formDatas.value[codeKey] = ''; // 清空 code
  5808. formDatas.value[nameKey] = ''; // 清空 name
  5809. // console.log(`清空了 ${codeKey} 和 ${nameKey} 的值,因为 ${codeKey} 中包含字母`);
  5810. }
  5811. }
  5812. let nextIndex = 1;
  5813. // 找到下一个需要填充的空位置
  5814. while (
  5815. formDatas.value[`code${nextIndex}`] !== '' &&
  5816. formDatas.value[`name${nextIndex}`] !== ''
  5817. ) {
  5818. nextIndex++;
  5819. if (nextIndex > 8) { // 这里只处理8个输入框的情况
  5820. // 如果所有字段都已经填满,则不做任何事情并退出函数
  5821. return;
  5822. }
  5823. }
  5824. // 特殊情况:直接填充到第8个位置
  5825. if (bz_Special.value === "8") {
  5826. formDatas.value.code8 = row.员工编号;
  5827. formDatas.value.name8 = row.ygxm;
  5828. // 弹窗关闭并防止重复点击
  5829. setTimeout(() => {
  5830. blModel.value = false;
  5831. clicked.value = false;
  5832. }, 300);
  5833. } else {
  5834. // 当前按下回车的输入框索引
  5835. const currentInputIndex = currentIndex.value + 1;
  5836. // 如果找到的空位不是当前输入框,则填充前面的空位
  5837. if (nextIndex !== currentInputIndex) {
  5838. // 填充前面空位
  5839. formDatas.value[`code${nextIndex}`] = row.员工编号;
  5840. formDatas.value[`name${nextIndex}`] = row.ygxm;
  5841. // 检查当前输入框是否需要清空
  5842. if (formDatas.value[`name${currentInputIndex}`] === '' &&formDatas.value[`code${currentInputIndex}`] !== '') {
  5843. // 如果当前输入框的 name 为空,但 code 有值,清空当前输入框
  5844. formDatas.value[`code${currentInputIndex}`] = '';
  5845. }
  5846. } else {
  5847. // 如果当前输入框就是下一个空位,则直接填充到当前输入框
  5848. formDatas.value[`code${currentInputIndex}`] = row.员工编号;
  5849. formDatas.value[`name${currentInputIndex}`] = row.ygxm;
  5850. }
  5851. // 弹窗关闭并防止重复点击
  5852. setTimeout(() => {
  5853. blModel.value = false; // 延迟关闭弹窗
  5854. clicked.value = false; // 恢复点击标志
  5855. }, 300);
  5856. }
  5857. };
  5858. /*
  5859. 组员及分配比例规则算法
  5860. */
  5861. const fpsum = ref();
  5862. const fpsum2 = ref();
  5863. //自动计算分配系数和
  5864. function updateTotal() {
  5865. //机台班组维护中分配系数字段
  5866. const relevantKeys = ['percentage1', 'percentage2', 'percentage3', 'percentage4', 'percentage5', 'percentage6', 'percentage7'];
  5867. const values = relevantKeys.map(key => parseFloat(formDatas.value[key], 10) * 100 || 0); // 转换为百分比
  5868. const sum = values.reduce((sum, value) => sum + value, 0);
  5869. fpsum.value = Math.round(sum * 100) / 10000; // 四舍五入到2位小数
  5870. //修改中分配系数字段
  5871. const relevantKeys2 = ['组员1', '组员2','组员3','组员4','组员5','组员6','组员7','组员8','组员9',];
  5872. const valuess = relevantKeys2.map(key => parseFloat(formdata3.value[key]['比例'], 10) * 100 || 0);
  5873. const sum2 = valuess.reduce((sum, value) => sum + value, 0);
  5874. fpsum2.value = Math.round(sum2 * 100) / 10000; // 四舍五入到2位小数
  5875. }
  5876. // 在组件初始化时就设置监听
  5877. const setupWatchers = () => {
  5878. for (let i = 1; i <= 8; i++) {
  5879. const codeKey = `code${i}`;
  5880. const nameKey = `name${i}`;
  5881. const percentageKey = `percentage${i}`;
  5882. watch(
  5883. () => formDatas.value[codeKey],
  5884. (newVal) => {
  5885. if (!newVal) {
  5886. formDatas.value[nameKey] = '';
  5887. formDatas.value[percentageKey] = '';
  5888. }
  5889. }
  5890. );
  5891. }
  5892. };
  5893. // 在组件创建时调用
  5894. onMounted(() => {
  5895. setupWatchers();
  5896. });
  5897. //机台班组维护新增
  5898. const addBz = async() => {
  5899. //数据初始化
  5900. updateTotal()
  5901. //判断机台和班组是否为空
  5902. if(!selectedOption.value || !BZMC.value){
  5903. ElMessage({
  5904. type: 'warning',
  5905. message: '机台或者班组编号不能为空'
  5906. })
  5907. return;
  5908. }
  5909. const jt = selectedOption.value.split('|')[0]//获取车间数据
  5910. //判断车间是否是【SY、PM】
  5911. const shouldCheckLessThanOne = !jt.includes('SY') && !jt.includes('PM');
  5912. let hasValidMember = false; // 标志变量,用于检查是否有有效的组员
  5913. let hasEmptyBefore = false; // 标记是否已经出现过空项
  5914. // 按1-10的顺序验证
  5915. for (let i = 1; i <= 7; i++) {
  5916. const codeKey = `code${i}`;
  5917. const percentageKey = `percentage${i}`;
  5918. const hasCode = formDatas.value[codeKey] && formDatas.value[codeKey].trim() !== '';
  5919. const hasPercentage = formDatas.value[percentageKey] !== undefined &&
  5920. formDatas.value[percentageKey] !== null &&
  5921. formDatas.value[percentageKey] !== '';
  5922. // 如果当前项为空,标记hasEmptyBefore为true
  5923. if (!hasCode && !hasPercentage) {
  5924. hasEmptyBefore = true;
  5925. continue; // 跳过空项的进一步检查
  5926. }
  5927. // 如果当前项有值,但前面已经有空项了,报错
  5928. if (hasEmptyBefore) {
  5929. ElMessage({
  5930. type: "error",
  5931. message: `请按顺序填写组员信息,第${i}项之前不能有空项`,
  5932. });
  5933. return;
  5934. }
  5935. // 检查对应关系 - code和percentage必须同时有
  5936. if (!hasCode || !hasPercentage) {
  5937. ElMessage({
  5938. type: "error",
  5939. message: `第${i}项的工号和分配系数必须同时填写`,
  5940. });
  5941. return;
  5942. }
  5943. // 检查百分比值是否有效
  5944. const percentageValue = parseFloat(formDatas.value[percentageKey]);
  5945. if (isNaN(percentageValue) || percentageValue <= 0 || percentageValue > 1) {
  5946. ElMessage({
  5947. type: "error",
  5948. message: `第${i}项分配系数必须在0到1之间`,
  5949. });
  5950. return;
  5951. }
  5952. hasValidMember = true;
  5953. }
  5954. // 循环结束后检查标志变量
  5955. if (!hasValidMember) {
  5956. ElMessage({
  5957. type: "error",
  5958. message: "至少需要填写一个有效的组员和分配系数",
  5959. });
  5960. return;
  5961. } else if (shouldCheckLessThanOne && fpsum.value < 1) {
  5962. ElMessage({
  5963. type: "error",
  5964. message: "分配系数相加不能小于1",
  5965. });
  5966. return;
  5967. } else if(fpsum.value > 1) {
  5968. ElMessage({
  5969. type: "error",
  5970. message: "分配系数相加不能大于1",
  5971. });
  5972. return;
  5973. }
  5974. const response = await MachineTeamAdd({
  5975. sczl_jtbh: selectedOption.value.split('|')[0],
  5976. sczl_bzdh: BZMC.value,
  5977. sczl_bh1: formDatas.value.code1,
  5978. sczl_bh2: formDatas.value.code2,
  5979. sczl_bh3: formDatas.value.code3,
  5980. sczl_bh4: formDatas.value.code4,
  5981. sczl_bh5: formDatas.value.code5,
  5982. sczl_bh6: formDatas.value.code6,
  5983. sczl_bh7: formDatas.value.code7,
  5984. sczl_bh8: formDatas.value.code10,
  5985. sczl_bh9: formDatas.value.code9,
  5986. sczl_bh10: formDatas.value.code8,
  5987. sczl_rate1: formDatas.value.percentage1,
  5988. sczl_rate2: formDatas.value.percentage2,
  5989. sczl_rate3: formDatas.value.percentage3,
  5990. sczl_rate4: formDatas.value.percentage4,
  5991. sczl_rate5: formDatas.value.percentage5,
  5992. sczl_rate6: formDatas.value.percentage6,
  5993. sczl_rate7: formDatas.value.percentage7,
  5994. sczl_rate8: formDatas.value.percentage10,
  5995. sczl_rate9: formDatas.value.percentage9,
  5996. sczl_rate10: formDatas.value.percentage8,
  5997. sys_id: sys_id
  5998. })
  5999. if (response.code === 0) {
  6000. ElMessage({
  6001. type: 'success',
  6002. message: '成功'
  6003. })
  6004. FacilityTeam(JTMC)
  6005. fetchData()
  6006. }
  6007. }
  6008. const currentBz ={}
  6009. const selectBz = async() => {
  6010. initfordata3()
  6011. updateTotal()
  6012. if(!selectedOption.value || !BZMC.value){
  6013. ElMessage({
  6014. type: 'warning',
  6015. message: '机台或者班组不能为空'
  6016. })
  6017. return;
  6018. }
  6019. const jt = selectedOption.value.split('|')[0]//获取车间数据
  6020. //判断车间分配比例【SY、PM】
  6021. const shouldCheckLessThanOne = !jt.includes('SY') && !jt.includes('PM');
  6022. const relevantKeys = ['percentage1', 'percentage2', 'percentage3', 'percentage4', 'percentage5', 'percentage6', 'percentage7', 'percentage8'];
  6023. const values = relevantKeys.reduce((acc, key) => {
  6024. const value = parseFloat(formDatas.value[key], 10);
  6025. if (!isNaN(value)) {
  6026. acc.push(value); // 只有当 value 不是 NaN 时才添加到数组中
  6027. }
  6028. return acc;
  6029. }, []); // 初始化为空数组
  6030. const hasInvalidValue = values.some(value => value <= 0 || value > 1);
  6031. if (hasInvalidValue) {
  6032. ElMessage({
  6033. type: "error",
  6034. message: "某人分配系数有误",
  6035. });
  6036. return;
  6037. }
  6038. if (fpsum.value > 1) {
  6039. ElMessage({
  6040. type: "error",
  6041. message: "分配系数相加不能大于1",
  6042. });
  6043. return;
  6044. }
  6045. // 只有当 shouldCheckLessThanOne 为 true 时才检查 fpsum.value < 1
  6046. if (shouldCheckLessThanOne && fpsum.value < 1) {
  6047. ElMessage({
  6048. type: "error",
  6049. message: "分配系数相加不能小于1",
  6050. });
  6051. return;
  6052. }
  6053. if(currentBz.value){
  6054. BZMC.value=currentBz.value.班组号
  6055. let sczl_bhkey=''
  6056. let sczl_namekey=''
  6057. if (currentBz.value[9]) {
  6058. for (let i = 1; i <= 9; i++) {
  6059. sczl_bhkey=`sczl_bh${i}`
  6060. sczl_namekey=`sczl_name${i}`
  6061. formData.value[sczl_bhkey] = '';
  6062. formData.value[sczl_namekey] = '';
  6063. }
  6064. formData.value.sczl_bh10 = currentBz.value[9].split(' ')[0];
  6065. formData.value.sczl_name10=currentBz.value[9].split(' ')[1]
  6066. for (let i = 1; i <= Math.min(Object.keys(currentBz.value).length-5, 6); i++) {
  6067. sczl_bhkey=`sczl_bh${i}`
  6068. sczl_namekey=`sczl_name${i}`
  6069. formData.value[sczl_bhkey] = currentBz.value[i-1].split(' ')[0];
  6070. formData.value[sczl_namekey] = currentBz.value[i-1].split(' ')[1];
  6071. classbz.value[i-1]=currentBz.value[i-1].split(' ')[0]
  6072. }
  6073. classbz.value.push(currentBz.value[9].split(' ')[0])
  6074. formData.value.class=classbz.value.join(',')
  6075. }else{
  6076. for (let i = 1; i <= 10; i++) {
  6077. sczl_bhkey=`sczl_bh${i}`
  6078. sczl_namekey=`sczl_name${i}`
  6079. formData.value[sczl_bhkey] = '';
  6080. formData.value[sczl_namekey] = '';
  6081. }
  6082. for (let i = 1; i <= Math.min(Object.keys(currentBz.value).length-4, 6); i++) {
  6083. sczl_bhkey=`sczl_bh${i}`
  6084. sczl_namekey=`sczl_name${i}`
  6085. formData.value[sczl_bhkey] = currentBz.value[i-1].split(' ')[0];
  6086. formData.value[sczl_namekey] = currentBz.value[i-1].split(' ')[1];
  6087. classbz.value[i-1]=currentBz.value[i-1].split(' ')[0]
  6088. }
  6089. formData.value.class=classbz.value.join(',')
  6090. }
  6091. const response = await setMachineTeam({
  6092. machine: JTMC.split("#")[0],
  6093. order:formData.value.工单编号,
  6094. yjno:formData.value.印件号,
  6095. gy_name:formData.value.工序名称,
  6096. sczl_bzdh:BZMC.value,
  6097. status:'生产',
  6098. production_now:0,
  6099. production_all:0,
  6100. team_id:currentBz.value.ID
  6101. })
  6102. if(response.code===0){
  6103. ElMessage({
  6104. type: 'success',
  6105. message: '成功'
  6106. })
  6107. FacilityProduction()
  6108. }
  6109. // currentBz.value={}
  6110. }
  6111. detailShow.value = false;
  6112. }
  6113. const delBz = async() => {
  6114. const UniqId=currentBz.value.ID
  6115. if(currentBz.value){
  6116. ElMessageBox.confirm('确定要删除吗?', '提示', {
  6117. confirmButtonText: '确定',
  6118. cancelButtonText: '取消',
  6119. type: 'warning'
  6120. }).then(() => {
  6121. const response = teamDel({UniqId:UniqId})
  6122. response.then(result => {
  6123. if(result.code===0){
  6124. let messageType = 'success';
  6125. // 检查 result.msg 是否包含特定的错误提示
  6126. if (result.msg.includes('无法删除正在生产的班组资料,请先切换班组')) {
  6127. messageType = 'error';
  6128. }
  6129. ElMessage({
  6130. type: messageType,
  6131. message: result.msg
  6132. })
  6133. FacilityTeam(JTMC)
  6134. fetchData()
  6135. }
  6136. });
  6137. })
  6138. currentBz.value={}
  6139. }
  6140. }
  6141. const selected = ref('');
  6142. // 下拉框选项数据
  6143. const dropdownOptions = ref([]);
  6144. // 选中的选项
  6145. const selectedOption = ref('');
  6146. // 获取接口数据并转换为下拉框需要的格式
  6147. const fetchData = async () => {
  6148. try {
  6149. const response = await facilityMachineList();
  6150. if (response.code === 0) {
  6151. const options = response.data.map((item) => ({
  6152. label: item,
  6153. value: item
  6154. }));
  6155. const selectionValue = options.find(item => {
  6156. return item.value.indexOf(JTMC) !== -1
  6157. })
  6158. selectedOption.value = selectionValue.value ?? options[0].value
  6159. dropdownOptions.value = options
  6160. }
  6161. } catch (error) {
  6162. console.error('Error fetching data:', error);
  6163. // Handle the error appropriately
  6164. }
  6165. };
  6166. // formData
  6167. let BZMC=ref()
  6168. let lastCellValue=ref()
  6169. let parts =reactive([])
  6170. // 自动化生成的字典(可能为空)以及字段
  6171. const formData= ref({
  6172. 工单编号:'',
  6173. 印件编号:'',
  6174. 工序名称:'',
  6175. 产品名称:'',
  6176. sczl_bh1:'',
  6177. sczl_bh2:'',
  6178. sczl_bh3:'',
  6179. sczl_bh4:'',
  6180. sczl_bh5:'',
  6181. sczl_bh6:'',
  6182. sczl_bh7:'',
  6183. sczl_bh8:'',
  6184. sczl_bh9:'',
  6185. sczl_bh10:'',
  6186. sczl_name1:'',
  6187. sczl_name2:'',
  6188. sczl_name3:'',
  6189. sczl_name4:'',
  6190. sczl_name5:'',
  6191. sczl_name6:'',
  6192. sczl_name7:'',
  6193. sczl_name8:'',
  6194. sczl_name9:'',
  6195. sczl_name10:'',
  6196. })
  6197. const formDatasData= reactive([])
  6198. const formDatas = ref({
  6199. code1:'',
  6200. code2:'',
  6201. code3:'',
  6202. code4:'',
  6203. code5:'',
  6204. code6:'',
  6205. code7:'',
  6206. code8:'',
  6207. code9:'',
  6208. code10:'',
  6209. name1:'',
  6210. name2:'',
  6211. name3:'',
  6212. name4:'',
  6213. name5:'',
  6214. name6:'',
  6215. name7:'',
  6216. name8:'',
  6217. name9:'',
  6218. name10:'',
  6219. percentage1:'',
  6220. percentage2:'',
  6221. percentage3:'',
  6222. percentage4:'',
  6223. percentage5:'',
  6224. percentage6:'',
  6225. percentage7:'',
  6226. percentage8:'',
  6227. percentage9:'',
  6228. percentage10:'',
  6229. })
  6230. const formDatas_rcl = ref({
  6231. code1:'',
  6232. code2:'',
  6233. code3:'',
  6234. code4:'',
  6235. code5:'',
  6236. code6:'',
  6237. code7:'',
  6238. code8:'',
  6239. code9:'',
  6240. code10:'',
  6241. name1:'',
  6242. name2:'',
  6243. name3:'',
  6244. name4:'',
  6245. name5L:'',
  6246. name6:'',
  6247. name7:'',
  6248. name8:'',
  6249. name9:'',
  6250. name10:'',
  6251. percentage1:'',
  6252. percentage2:'',
  6253. percentage3:'',
  6254. percentage4:'',
  6255. percentage5:'',
  6256. percentage6:'',
  6257. percentage7:'',
  6258. percentage8:'',
  6259. percentage9:'',
  6260. percentage10:'',
  6261. })
  6262. //班组单击
  6263. const BZvalue=ref()
  6264. const BZhandle = (val) => {
  6265. currentBz.value = val
  6266. BZvalue.value=val.ID
  6267. formDatas.value = {};
  6268. let sczl_bhkey = ''
  6269. let sczl_namekey = ''
  6270. let percentagekey = ''
  6271. console.log(currentBz.value)
  6272. if (currentBz.value[9]) {
  6273. for (let i = 1; i <= 9; i++) {
  6274. sczl_bhkey = `code${i}`
  6275. sczl_namekey = `name${i}`
  6276. percentagekey = `percentage${i}`
  6277. formDatas.value[sczl_bhkey] = '';
  6278. formDatas.value[sczl_namekey] = '';
  6279. formDatas.value[percentagekey] = '';
  6280. }
  6281. formDatas.value.code8 = currentBz.value[9].split(' ')[0];
  6282. formDatas.value.name8 = currentBz.value[9].split(' ')[1]
  6283. formDatas.value.percentage8 = Math.round((parseFloat(currentBz.value[9].split(' ')[2].split('(')[1].split(')')[0]) / 100 * 10000)) / 10000;
  6284. for (let i = 1; i <= Math.min(Object.keys(currentBz.value).length - 5, 6); i++) {
  6285. sczl_bhkey = `code${i}`
  6286. sczl_namekey = `name${i}`
  6287. percentagekey = `percentage${i}`
  6288. formDatas.value[sczl_bhkey] = currentBz.value[i - 1].split(' ')[0];
  6289. formDatas.value[sczl_namekey] = currentBz.value[i - 1].split(' ')[1];
  6290. if(isNaN(parseFloat(currentBz.value[i - 1].split(' ')[2].split('(')[1].split(')')[0]))){
  6291. formDatas.value[percentagekey] = currentBz.value[i - 1].split(' ')[2].split('(')[1].split(')')[0];
  6292. }else{
  6293. formDatas.value[percentagekey] = Math.round((parseFloat(currentBz.value[i - 1].split(' ')[2].split('(')[1].split(')')[0]) / 100 * 10000)) / 10000;
  6294. }
  6295. }
  6296. } else {
  6297. for (let i = 1; i <= 10; i++) {
  6298. sczl_bhkey = `code${i}`
  6299. sczl_namekey = `name${i}`
  6300. percentagekey = `percentage${i}`
  6301. formDatas.value[sczl_bhkey] = '';
  6302. formDatas.value[sczl_namekey] = '';
  6303. formDatas.value[percentagekey] = '';
  6304. }
  6305. for (let i = 1; i <= Math.min(Object.keys(currentBz.value).length - 4, 6); i++) {
  6306. sczl_bhkey = `code${i}`
  6307. sczl_namekey = `name${i}`
  6308. percentagekey = `percentage${i}`
  6309. formDatas.value[sczl_bhkey] = currentBz.value[i - 1].split(' ')[0];
  6310. formDatas.value[sczl_namekey] = currentBz.value[i - 1].split(' ')[1];
  6311. if(isNaN(parseFloat(currentBz.value[i - 1].split(' ')[2].split('(')[1].split(')')[0]))){
  6312. formDatas.value[percentagekey] = currentBz.value[i - 1].split(' ')[2].split('(')[1].split(')')[0];
  6313. }else{
  6314. formDatas.value[percentagekey] = Math.round((parseFloat(currentBz.value[i - 1].split(' ')[2].split('(')[1].split(')')[0]) / 100 * 10000)) / 10000;
  6315. }
  6316. }
  6317. }
  6318. BZMC.value=val.班组号
  6319. };
  6320. const chanliangVisible = ref(false)
  6321. const formdata3=reactive([])
  6322. const initfordata3 = () => {
  6323. formdata3.value = {
  6324. '工单编号':'',
  6325. 'cpmc':'',
  6326. 'yjno':'',
  6327. 'yjmc':'',
  6328. 'gxmc':'',
  6329. 'gxh':'',
  6330. 'gymc':'',
  6331. 'rq':'',
  6332. 'sczl_jtbh':'',
  6333. 'starttime':'',
  6334. 'num':'',
  6335. 'sj1':'',
  6336. '色度数':'',
  6337. '联数':'',
  6338. '产量':'',
  6339. '制程废品':'',
  6340. '制程次品':'',
  6341. '前工序废':'',
  6342. '来料异常':'',
  6343. '换型类型':'',
  6344. '装版总工时':'',
  6345. '装版工时':'',
  6346. '打样总工时':'',
  6347. '打样工时':'',
  6348. '保养工时':'',
  6349. '异常总工时':'',
  6350. '异常类型':'',
  6351. '异常补时':'',
  6352. '通电工时':'',
  6353. 'dedh':'',
  6354. '码包':'',
  6355. '码开始行':'',
  6356. '码结束行':'',
  6357. '主电表':'',
  6358. '辅电表':'',
  6359. '组员1':{
  6360. '编号':'',
  6361. '姓名':'',
  6362. '比例':'',
  6363. },
  6364. '组员2':{
  6365. '编号':'',
  6366. '姓名':'',
  6367. '比例':'',
  6368. },
  6369. '组员3':{
  6370. '编号':'',
  6371. '姓名':'',
  6372. '比例':'',
  6373. },
  6374. '组员4':{
  6375. '编号':'',
  6376. '姓名':'',
  6377. '比例':'',
  6378. },
  6379. '组员5':{
  6380. '编号':'',
  6381. '姓名':'',
  6382. '比例':'',
  6383. },
  6384. '组员6':{
  6385. '编号':'',
  6386. '姓名':'',
  6387. '比例':'',
  6388. },
  6389. '组员7':{
  6390. '编号':'',
  6391. '姓名':'',
  6392. '比例':'',
  6393. },
  6394. '组员8':{
  6395. '编号':'',
  6396. '姓名':'',
  6397. '比例':'',
  6398. },
  6399. '组员9':{
  6400. '编号':'',
  6401. '姓名':'',
  6402. '比例':'',
  6403. },
  6404. '组员10':{
  6405. '编号':'',
  6406. '姓名':'',
  6407. '比例':'',
  6408. },
  6409. '拉料':{
  6410. '编号':'',
  6411. '姓名':'',
  6412. }
  6413. }
  6414. }
  6415. initfordata3()
  6416. for (let i = 1; i <= 10; i++) {
  6417. (function(index) {
  6418. watch(
  6419. () => formdata3.value[`组员${index}`].编号,
  6420. (newVal, oldVal) => {
  6421. if (!newVal) {
  6422. formdata3.value[`组员${index}`].姓名 = '';
  6423. formdata3.value[`组员${index}`].比例 = '';
  6424. }
  6425. }
  6426. );
  6427. })(i); // 使用立即执行的函数表达式(IIFE)来捕获当前的i值
  6428. }
  6429. function gytableDatadoubleClick(row, column, event) {
  6430. console.log("双击当日上报产量")
  6431. type2.value="update"
  6432. MachineChanliang(row.UniqId)
  6433. }
  6434. const uid=ref()
  6435. const _Gd_gdbh=ref()
  6436. function getUid(row, column, event) {
  6437. console.log(row)
  6438. uid.value=row['UniqId']
  6439. _Gd_gdbh.value=row['工单编号']
  6440. _gdbhlist.value=row['工单编号']
  6441. lcd_Gd_gdbh.value = row['工单编号']
  6442. lcd_Gd_yjno.value = row['yjno']
  6443. console.log("工单编号"+lcd_Gd_gdbh.value)
  6444. console.log("UniqId"+uid.value)
  6445. }
  6446. //班组产量提报 获取当天日期接口
  6447. const qita_jitaidata = async () => {
  6448. const qita_jitaidata = await getTimelist();
  6449. formdata3.value.rq = qita_jitaidata.data.date
  6450. }
  6451. //班组长审核
  6452. const leaderAuditDialog = ref(false)
  6453. const leaderForm = reactive({
  6454. coefficient: '',
  6455. leader: '',
  6456. Uniqid: '',
  6457. 换版联拼数: '',
  6458. 换版总工时: '',
  6459. 换版类型: ''
  6460. })
  6461. const banzuzhang = async () => {
  6462. leaderAuditDialog.value = true
  6463. }
  6464. //统计员审核
  6465. const statAuditDialog = ref(false)
  6466. const statForm = reactive({
  6467. 装版补产工时: '',
  6468. statistics: '',
  6469. Uniqid: '',
  6470. yieldUid: ''
  6471. })
  6472. const tongjiyuan = async () => {
  6473. statAuditDialog.value = true
  6474. }
  6475. // 班组长审核提交
  6476. const submitLeaderAudit = async () => {
  6477. console.log('提交班组长审核参数:', leaderForm)
  6478. // return;
  6479. const res = await leaderConfirm(leaderForm)
  6480. if (res.code === 0) {
  6481. ElMessage.success('班组长审核成功')
  6482. leaderAuditDialog.value = false
  6483. } else {
  6484. ElMessage.error(res.msg || '班组长审核失败')
  6485. }
  6486. }
  6487. // 统计员审核提交
  6488. const submitStatAudit = async () => {
  6489. console.log('提交统计员审核参数:', statForm)
  6490. // return;
  6491. const res = await statisticsConfirm(statForm)
  6492. if (res.code === 0) {
  6493. ElMessage.success('统计员审核成功')
  6494. statAuditDialog.value = false
  6495. } else {
  6496. ElMessage.error(res.msg || '统计员审核失败')
  6497. }
  6498. }
  6499. // 关闭班组长审核
  6500. const closeLeaderAudit = () => {
  6501. leaderAuditDialog.value = false
  6502. }
  6503. // 关闭统计员审核
  6504. const closeStatAudit = () => {
  6505. statAuditDialog.value = false
  6506. }
  6507. //获取详细信息
  6508. const MachineChanliang = async(value) => {
  6509. //打开新增按钮获取
  6510. qita_jitaidata();
  6511. if(uid.value == undefined){
  6512. initfordata3()
  6513. chanliangVisible.value=true
  6514. return
  6515. }
  6516. const response = await MachineChanliangDetail({UniqId:value});
  6517. console.log('MachineChanliangDetail',response)
  6518. leaderForm.coefficient = response.data['系数']
  6519. leaderForm.leader = sys_id
  6520. leaderForm.Uniqid = response.data['Uid']
  6521. leaderForm.换版联拼数 = response.data['换版联拼数']
  6522. leaderForm.换版总工时 = response.data['装版总工时']
  6523. leaderForm.换版类型 = response.data['换版类型']
  6524. statForm.装版补产工时 = response.data['装版补产工时']
  6525. statForm.statistics = sys_id
  6526. statForm.Uniqid = response.data['Uid']
  6527. statForm.yieldUid = response.data['UniqId']
  6528. if (response.code === 0) {
  6529. chanliangVisible.value=true
  6530. formdata3.value=response.data
  6531. const result=formdata3.value.gxmc.match(/-(.{2})/)
  6532. formdata3.value.gymc=result[1]
  6533. formdata3.value.sczl_jtbh=JTMC
  6534. formdata3.value.yjmc=response.data.印件名称
  6535. formdata3.value.rq=date
  6536. console.log("formdata3.value.换版类型",formdata3.value.换版类型)
  6537. if(formdata3.value.换版类型 === '装新版'){
  6538. console.log('装新版')
  6539. formdata3.value.换版类型 = '装新版'
  6540. }else if(formdata3.value.换版类型 === '装旧版'){
  6541. console.log('装旧版')
  6542. formdata3.value.换版类型 = '装旧版'
  6543. }else if(formdata3.value.换版类型 === '换版'){
  6544. console.log('换版')
  6545. formdata3.value.换版类型 = '换版'
  6546. }
  6547. if (formdata3.value.bzdh === 'A班') {
  6548. formdata3.value.starttime = ''; // 清空值
  6549. setTimeout(()=>{
  6550. formdata3.value.starttime = date + " 08:30:00"; // 设置为 20:30:00
  6551. })
  6552. } else if (formdata3.value.bzdh === 'B班') {
  6553. formdata3.value.starttime = ''; // 清空值
  6554. setTimeout(()=>{
  6555. formdata3.value.starttime = date + " 20:30:00"; // 设置为 20:30:00
  6556. })
  6557. }
  6558. }
  6559. }
  6560. const yjnoArr = ref([0])
  6561. const gxmc = ref('')
  6562. //工单编号回车事件
  6563. const getCPMCsubmit = () => {
  6564. if(formdata3.value.工单编号!=''){
  6565. ChanliangWorkorder({search:formdata3.value.工单编号,machine:JTMC}).then(response=>{
  6566. if (response.code === 0) {
  6567. if(response.data){
  6568. formdata3.value.cpmc = response.data[0].cpmc
  6569. document.getElementById('产品名称').style.color = 'red';
  6570. getYJMCsubmit()
  6571. }else{
  6572. ElMessage({
  6573. type: 'error',
  6574. message: response.msg
  6575. })
  6576. formdata3.value.工单编号 = '';
  6577. formdata3.value.cpmc = '';
  6578. document.getElementById('产品名称').style.color = 'black';
  6579. }
  6580. }else{
  6581. formdata3.value.工单编号 = '';
  6582. formdata3.value.cpmc = '';
  6583. document.getElementById('产品名称').style.color = 'black';
  6584. }
  6585. });
  6586. }else{
  6587. ElMessage({
  6588. type: 'error',
  6589. message: '请注意, 工单编号输入空置, 除非有特殊需要!'
  6590. })
  6591. gxmc.value = '';
  6592. document.getElementById('产品名称').style.color = 'black';
  6593. }
  6594. }
  6595. const yjnoHandleFocus = () =>{
  6596. if(yjnoArr.value[0] == 0){
  6597. formdata3.value.yjno = 1;
  6598. }else{
  6599. formdata3.value.yjno = yjnoArr.value[0];
  6600. }
  6601. }
  6602. //印件号失去焦点事件
  6603. const getYJMCsubmit = () => {
  6604. if(formdata3.value.工单编号!=''){
  6605. //获取印件名称
  6606. ChanliangPrintDetail({gdbh:formdata3.value.工单编号}).then(response=>{
  6607. if (response.code === 0) {
  6608. if(response.data){
  6609. if(response.data.length==1){
  6610. formdata3.value.yjmc = response.data[0].yjmc
  6611. formdata3.value.yjno = response.data[0].yjno
  6612. formdata3.value.联数 = response.data[0].ls
  6613. setColorReadonly('印件名称')
  6614. }else{
  6615. selectData_Yj.splice(0, selectData_Yj.length, ...response.data)
  6616. dialogSelectVisible_Yj.value=true
  6617. }
  6618. }else{
  6619. ElMessage({
  6620. type: 'error',
  6621. message: response.msg
  6622. })
  6623. }
  6624. }
  6625. });
  6626. }else{
  6627. ElMessage({
  6628. type: 'error',
  6629. message: '印件编号不存在, 将恢复默认值, 请仔细确认数据准确性!'
  6630. })
  6631. }
  6632. }
  6633. //印件选择
  6634. const dialogSelectVisible_Yj = ref(false)
  6635. const selectData_Yj = reactive([])
  6636. // 处理选择框
  6637. const handleSelectClick_Yj = (row, column, event) => {
  6638. const { yjno, yjmc, ls } = row
  6639. formdata3.value.yjno = yjno
  6640. formdata3.value.yjmc = yjmc
  6641. formdata3.value.联数 = ls
  6642. dialogSelectVisible_Yj.value = false
  6643. }
  6644. const select_Yj = (event) => {
  6645. if (event.keyCode === 40) { // 向下箭头
  6646. if (currentIndex.value < selectData_Yj.length - 1) {
  6647. currentIndex.value++;
  6648. setCurrent_Yj(selectData_Yj[currentIndex.value]);
  6649. } else {
  6650. currentIndex.value = 0;
  6651. setCurrent_Yj(selectData_Yj[currentIndex.value]); // 到达最后一行时回到第一行
  6652. }
  6653. } else if (event.keyCode === 38) { // 向上箭头
  6654. if (currentIndex.value > 0) {
  6655. currentIndex.value--;
  6656. setCurrent_Yj(selectData_Yj[currentIndex.value]);
  6657. } else {
  6658. currentIndex.value = selectData_Yj.length - 1;
  6659. setCurrent_Yj(selectData_Yj[currentIndex.value]); // 到达第一行时回到最后一行
  6660. }
  6661. } else if (event.keyCode === 13) { // 回车键
  6662. dialogSelectVisible_Yj.value = false;
  6663. }
  6664. }
  6665. const table_YJH = ref();
  6666. const setCurrent_Yj = (row) => {
  6667. setTimeout(() => {
  6668. table_YJH.value?.setCurrentRow(row);
  6669. const { ls, yjno, yjmc } = row
  6670. console.log(row)
  6671. console.log(yjno)
  6672. formdata3.value.联数 = ls
  6673. formdata3.value.yjno = yjno
  6674. formdata3.value.yjmc = yjmc
  6675. });
  6676. };
  6677. //工序选择
  6678. const dialogSelectVisible_Gx = ref(false)
  6679. const selectData_Gx = reactive([])
  6680. const table_Gx = ref()
  6681. // 处理选择框
  6682. const handleSelectClick_Gx = (row, column, event) => {
  6683. const { gxh, name, gxmc } = row
  6684. formdata3.value.gxh = gxh
  6685. formdata3.value.gxmc = name
  6686. formdata3.value.gymc = gxmc
  6687. dialogSelectVisible_Gx.value = false
  6688. }
  6689. const select_gxmc = (event) => {
  6690. if (event.keyCode === 40) { // 向下箭头
  6691. if (currentIndex.value < selectData_Gx.length - 1) {
  6692. currentIndex.value++;
  6693. setCurrent_GXMC(selectData_Gx[currentIndex.value]);
  6694. } else {
  6695. currentIndex.value = 0;
  6696. setCurrent_GXMC(selectData_Gx[currentIndex.value]); // 到达最后一行时回到第一行
  6697. }
  6698. } else if (event.keyCode === 38) { // 向上箭头
  6699. if (currentIndex.value > 0) {
  6700. currentIndex.value--;
  6701. setCurrent_GXMC(selectData_Gx[currentIndex.value]);
  6702. } else {
  6703. currentIndex.value = selectData_Gx.length - 1;
  6704. setCurrent_GXMC(selectData_Gx[currentIndex.value]); // 到达第一行时回到最后一行
  6705. }
  6706. } else if (event.keyCode === 13) { // 回车键
  6707. dialogSelectVisible_Gx.value = false;
  6708. }
  6709. }
  6710. const table_GXMC = ref();
  6711. const setCurrent_GXMC = (row) => {
  6712. setTimeout(() => {
  6713. table_GXMC.value?.setCurrentRow(row);
  6714. const { gxh, name, gxmc } = row
  6715. formdata3.value.gxh = row.gxh
  6716. formdata3.value.gxmc = row.name
  6717. formdata3.value.gymc = row.gxmc
  6718. });
  6719. };
  6720. //工序失去焦点事件
  6721. const getGXsubmit = () => {
  6722. //弹出选择
  6723. ChanliangProcessDetail({gdbh:formdata3.value.工单编号,yjno:formdata3.value.yjno,machine:''}).then(response=>{
  6724. if (response.code === 0) {
  6725. if(response.data){
  6726. if(response.data.length==1){
  6727. formdata3.value.gxmc=response.data[0].name
  6728. formdata3.value.gxh=response.data[0].gxh
  6729. formdata3.value.gymc=response.data[0].gxmc
  6730. }else{
  6731. selectData_Gx.splice(0, selectData_Gx.length, ...response.data)
  6732. dialogSelectVisible_Gx.value = true
  6733. }
  6734. }else{
  6735. ElMessage({
  6736. type: 'error',
  6737. message: response.msg
  6738. })
  6739. }
  6740. }
  6741. })
  6742. }
  6743. //机台编号失去焦点事件
  6744. const GetjtbhVisible = ref(false)
  6745. const JTBHselectData = reactive([])
  6746. const getJtbhsubmit = () => {
  6747. gdzl_MachineList({address:CJMC.value}).then(response=>{
  6748. if(response.code==0){
  6749. if(response.data.length!=0 && !response.data.some(item => item.jtbh === formData.value.sczl_jtbh)){
  6750. JTBHselectData.splice(0, selectData.length, ...response.data)
  6751. GetjtbhVisible.value=true
  6752. }
  6753. }
  6754. });
  6755. }
  6756. const JTBHSelectClick = (row, column, event) => {
  6757. const { jtbh, jtmc } = row
  6758. formdata3.value.sczl_jtbh=jtbh
  6759. GetjtbhVisible.value = false
  6760. }
  6761. //点击设备编号
  6762. const gdzl_MachineList_address = reactive({
  6763. data: []
  6764. });
  6765. //选择机台编号确定工艺以及开工时间
  6766. const jtbh_change = () => {
  6767. //弹出选择
  6768. productionDedh({sczl_jtbh:formdata3.value.sczl_jtbh}).then(response=>{
  6769. if (response.code === 0) {
  6770. if(response.data){
  6771. formdata3.value.dedh=response.data.sys_bh
  6772. }else{
  6773. formdata3.value.dedh=''
  6774. }
  6775. }
  6776. })
  6777. }
  6778. //获取拉料人员
  6779. const GetLl = (falg) => {
  6780. let llyg = {
  6781. '自备':'自备',
  6782. '李有文':1027,
  6783. '张杭强':1024,
  6784. '朱喜文':2022,
  6785. '刘旭青':2021,
  6786. '刘芳民':2020,
  6787. '李当林':2019,
  6788. '王赞文':2018,
  6789. }
  6790. switch(falg){
  6791. case 'create':
  6792. if(formdata3.value.拉料['编号']){
  6793. formdata3.value.拉料['姓名'] = formdata3.value.拉料['编号']
  6794. formdata3.value.拉料['编号'] = llyg[formdata3.value.拉料['姓名']]
  6795. }
  6796. break;
  6797. case create:
  6798. break;
  6799. }
  6800. }
  6801. /*
  6802. 其他机台组员及分配比例
  6803. */
  6804. const blModellist = ref(false)
  6805. const employeeDatalist = ref('')
  6806. const Special = ref('')
  6807. const GetYg = async (event,key) => {
  6808. Special.value = key
  6809. let bzyg=''
  6810. bzyg=`组员${key}`
  6811. let bzxm=''
  6812. bzxm=`组员${key}`
  6813. const response = await getYg({sczl_bh:formdata3.value[bzyg]['编号']});
  6814. formdata3.value[bzyg]['编号'] = ""
  6815. if (response.code === 0) {
  6816. if(response.data.length === 1){
  6817. formdata3.value[bzxm]['姓名'] = response.data[0].ygxm
  6818. formdata3.value[bzyg]['编号'] = response.data[0].员工编号
  6819. }else{
  6820. blModellist.value = true;
  6821. employeeDatalist.value = response.data // 假设响应数据是数组
  6822. }
  6823. }
  6824. }
  6825. const clickeds = ref(false);
  6826. const currentIndexs = ref(0);
  6827. const tableBZRRs = ref();
  6828. // 模拟点击某一行
  6829. const setCurrents = (row) => {
  6830. setTimeout(() => {
  6831. tableBZRRs .value?.setCurrentRow(row); // 高亮选中当前行
  6832. const { 员工编号, ygxm } = row;
  6833. console.log("选中行数据:", row);
  6834. });
  6835. };
  6836. // 键盘事件处理逻辑
  6837. const selectBZRRs = (event) => {
  6838. if (event.keyCode === 40) {
  6839. // 向下箭头
  6840. if (currentIndexs.value < employeeDatalist.value.length - 1) {
  6841. currentIndexs.value++;
  6842. } else {
  6843. // 如果是最后一行,回到第一行
  6844. currentIndexs.value = 0;
  6845. }
  6846. } else if (event.keyCode === 38) {
  6847. // 向上箭头
  6848. if (currentIndexs.value > 0) {
  6849. currentIndexs.value--;
  6850. } else {
  6851. // 如果是第一行,跳到最后一行
  6852. currentIndexs.value = employeeDatalist.value.length - 1;
  6853. }
  6854. } else if (event.keyCode === 13) {
  6855. // 回车键,模拟触发点击事件
  6856. const row = employeeDatalist.value[currentIndexs.value];
  6857. tablebllickHandlerlist(row); // 手动调用行点击事件
  6858. }
  6859. setCurrents(employeeDatalist.value[currentIndexs.value]); // 高亮当前选中的行
  6860. };
  6861. // 表格行点击事件处理
  6862. const tablebllickHandlerlist = async (row, column, event) => {
  6863. if (clickeds.value) {
  6864. // 如果已经点击过一次,则不再执行操作
  6865. return;
  6866. }
  6867. let nextIndex = 1;
  6868. // 检查每个组员是否有空位
  6869. while (formdata3.value[`组员${nextIndex}`]['编号'] !== '' && formdata3.value[`组员${nextIndex}`]['姓名'] !== '') {
  6870. nextIndex++;
  6871. if (nextIndex > 10) {
  6872. // 如果所有组员字段已填满,则不做任何操作,直接退出
  6873. return;
  6874. }
  6875. }
  6876. // 在填充数据之前,检查当前组员编号是否包含字母,如果包含字母,则清空该组员的编号和姓名
  6877. const current编号 = formdata3.value[`组员${nextIndex}`]['编号'];
  6878. if (/[a-zA-Z]/.test(current编号)) { // 判断编号中是否包含字母
  6879. formdata3.value[`组员${nextIndex}`]['编号'] = "";
  6880. formdata3.value[`组员${nextIndex}`]['姓名'] = "";
  6881. console.log(`组员${nextIndex}的编号包含字母,已清空编号和姓名`);
  6882. }
  6883. // 如果 Special 的值是 10,则直接填充到组员10
  6884. if (Special.value === "10") {
  6885. formdata3.value.组员10['编号'] = row.员工编号;
  6886. formdata3.value.组员10['姓名'] = row.ygxm;
  6887. blModellist.value = false;
  6888. clickedlist.value = true;
  6889. } else {
  6890. // 否则填充到下一个空的组员位置
  6891. formdata3.value[`组员${nextIndex}`]['编号'] = row.员工编号;
  6892. formdata3.value[`组员${nextIndex}`]['姓名'] = row.ygxm;
  6893. blModellist.value = false;
  6894. clickedlist.value = true;
  6895. }
  6896. // 设置点击锁,防止短时间内重复点击
  6897. setTimeout(() => {
  6898. clickedlist.value = false;
  6899. }, 300); // 300毫秒内再次点击不会触发事件,可以根据需要调整这个延迟时间
  6900. };
  6901. /*
  6902. 除JP定额代号弹窗
  6903. */
  6904. const FJPGetDedhtreeData = reactive([]);
  6905. const FJPGetDedhVisible = ref(false);
  6906. const FJPtable_fplb = ref(null); // el-tree 的 ref
  6907. const FJPgetDedhsubmit = async () => {
  6908. try {
  6909. const response = await productionDedh({
  6910. sczl_jtbh: formdata3.value.sczl_jtbh, // 请求参数
  6911. });
  6912. if (response.code === 0) {
  6913. const data = response.data;
  6914. // 处理单条记录的情况,直接赋值
  6915. if (!Array.isArray(data) && !data.bh_mc) {
  6916. formdata3.value.dedh = data.sys_bh;
  6917. return;
  6918. }
  6919. // 定义递归函数,用于构造树形结构
  6920. const buildTree = (node) => {
  6921. const treeNode = {
  6922. id: node.sys_bh,
  6923. label: node.sys_bh + (node.sys_mc ? `【${node.sys_mc}】` : ""), // 显示内容
  6924. children: [],
  6925. key: node.Key_ || node.sys_bh, // 保留 key 属性,用于操作
  6926. };
  6927. // 如果有子节点,递归处理
  6928. if (node.bh_mc && Array.isArray(node.bh_mc)) {
  6929. treeNode.children = node.bh_mc.map((childNode) => buildTree(childNode));
  6930. }
  6931. return treeNode;
  6932. };
  6933. // 处理数组数据结构,生成树形结构并展示弹窗
  6934. if (Array.isArray(data)) {
  6935. FJPGetDedhtreeData.splice(
  6936. 0,
  6937. FJPGetDedhtreeData.length,
  6938. ...data.map((item) => ({
  6939. id: item.sys_bh,
  6940. label: item.sys_bh,
  6941. children: [],
  6942. key: item.sys_bh,
  6943. }))
  6944. );
  6945. FJPGetDedhVisible.value = true; // 展示弹窗
  6946. }
  6947. // 处理嵌套的树形结构数据
  6948. if (!Array.isArray(data) && data.bh_mc) {
  6949. FJPGetDedhtreeData.splice(0, FJPGetDedhtreeData.length, buildTree(data));
  6950. FJPGetDedhVisible.value = true; // 展示弹窗
  6951. }
  6952. // 使用 nextTick 确保树形组件渲染完成后执行操作
  6953. nextTick(() => {
  6954. const tree = FJPtable_fplb.value; // 获取树形组件实例
  6955. if (tree) {
  6956. const firstNode = tree.getNode(0); // 获取树形的第一个节点
  6957. if (firstNode) {
  6958. firstNode.el.focus(); // 聚焦到第一个节点
  6959. }
  6960. }
  6961. });
  6962. }
  6963. } catch (error) {
  6964. console.error("获取数据失败:", error);
  6965. }
  6966. };
  6967. //键盘事件
  6968. const FJPhandleTreeKeydown = (event) => {
  6969. const tree = FJPtable_fplb.value; // 获取树实例
  6970. if (!tree) {
  6971. console.error("树组件未加载");
  6972. return;
  6973. }
  6974. const focusedElement = document.activeElement;
  6975. const focusedNodeId = focusedElement?.getAttribute("data-key"); // 获取 DOM 的 data-key 属性
  6976. if (event.keyCode === 13 && focusedNodeId) { // 判断是否是回车键
  6977. tree.setCurrentKey(focusedNodeId); // 设置当前节点为选中
  6978. tree.$nextTick(() => {
  6979. const currentNode = tree.getCurrentNode(); // 获取当前选中的节点
  6980. if (!currentNode) {
  6981. console.warn("没有选中的节点");
  6982. return;
  6983. }
  6984. // 清除上一次的选中状态
  6985. FJPclearPreviousSelection(tree);
  6986. // 收起所有其他节点
  6987. Object.keys(tree.store.nodesMap).forEach((key) => {
  6988. tree.store.nodesMap[key].expanded = false; // 收起所有节点
  6989. });
  6990. // 展开当前节点
  6991. tree.store.nodesMap[currentNode.id].expanded = true;
  6992. // 如果当前节点有子节点,选中第一个子节点
  6993. if (currentNode.children && currentNode.children.length > 0) {
  6994. const firstChild = currentNode.children[0];
  6995. if (firstChild) {
  6996. const firstChildKey = firstChild.id.toString();
  6997. tree.setCurrentKey(firstChildKey); // 设置第一个子节点为选中
  6998. setTimeout(() => {
  6999. const firstChildDom = tree.$el.querySelector(`[data-key="${firstChildKey}"]`);
  7000. if (firstChildDom) {
  7001. firstChildDom.focus();
  7002. firstChildDom.scrollIntoView({ block: "nearest" });
  7003. }
  7004. });
  7005. }
  7006. } else {
  7007. console.log("当前子节点:", currentNode.label);
  7008. // 如果节点没有子节点,打印节点名称
  7009. formdata3.value.dedh = currentNode.label.split("【")[0];
  7010. FJPGetDedhVisible.value = false;
  7011. }
  7012. });
  7013. } else if (event.keyCode === 38 || event.keyCode === 40) { // 上下箭头键
  7014. const currentNode = tree.getCurrentNode();
  7015. if (currentNode) {
  7016. const currentNodeDom = tree.$el.querySelector(`[data-key="${currentNode.id}"]`);
  7017. if (currentNodeDom) {
  7018. currentNodeDom.focus();
  7019. }
  7020. }
  7021. }
  7022. };
  7023. // 清除之前的选中状态
  7024. const FJPclearPreviousSelection = (tree) => {
  7025. const selectedNodes = tree.getCheckedNodes();
  7026. selectedNodes.forEach(node => {
  7027. tree.setChecked(node, false);
  7028. });
  7029. tree.setCurrentKey(null);
  7030. };
  7031. // 弹出框键盘事件
  7032. const FJPent = (event) => {
  7033. if (document.activeElement.id === "tableFplb") {
  7034. if (FJPtable_fplb.value) {
  7035. const tree = FJPtable_fplb.value?.$el;
  7036. if (tree) {
  7037. const node = tree.querySelector("[data-key]");
  7038. if (event.keyCode === 13) {
  7039. // GetDedhVisible.value = false;
  7040. }
  7041. if (node) {
  7042. node.scrollIntoView({ block: "nearest" }); // 确保节点可见
  7043. node.focus(); // 确保焦点正确
  7044. }
  7045. }
  7046. }
  7047. }
  7048. };
  7049. //点击事件
  7050. const FJPhandleFplbClick = (nodeData, node, component) => {
  7051. //存放当前节点的nodeId
  7052. if (!nodeData.children || nodeData.children.length === 0) {
  7053. // 如果节点没有子节点,打印节点名称
  7054. formdata3.value.dedh= nodeData.label.split("【")[0];
  7055. FJPGetDedhVisible.value = false;
  7056. }
  7057. };
  7058. /*
  7059. JP定额代号弹窗
  7060. */
  7061. const GetDedhtreeData = reactive([]);
  7062. const GetDedhVisible = ref(false);
  7063. const table_fplb = ref(null); // el-tree 的 ref
  7064. const getDedhsubmit = async () => {
  7065. try {
  7066. const response = await JPproductionDedh({
  7067. sczl_jtbh: JPformdata['机器']
  7068. });
  7069. if (response.code === 0) {
  7070. const data = response.data;
  7071. // 处理单条记录的情况,直接赋值
  7072. if (!Array.isArray(data) && !data.bh_mc) {
  7073. JPformdata['定额代号'] = data.sys_bh;
  7074. return;
  7075. }
  7076. // 定义递归函数,用于构造树形结构
  7077. const buildTree = (node) => {
  7078. const treeNode = {
  7079. id: node.sys_bh,
  7080. label: node.sys_bh + (node.sys_mc ? `【${node.sys_mc}】` : ""), // 显示内容
  7081. children: [],
  7082. key: node.Key_ || node.sys_bh, // 保留 key 属性,用于操作
  7083. };
  7084. // 如果有子节点,递归处理
  7085. if (node.bh_mc && Array.isArray(node.bh_mc)) {
  7086. treeNode.children = node.bh_mc.map((childNode) => buildTree(childNode));
  7087. }
  7088. return treeNode;
  7089. };
  7090. // 处理数组数据结构,生成树形结构并展示弹窗
  7091. if (Array.isArray(data)) {
  7092. GetDedhtreeData.splice(
  7093. 0,
  7094. GetDedhtreeData.length,
  7095. ...data.map((item) => ({
  7096. id: item.sys_bh,
  7097. label: item.sys_bh + (item.sys_mc ? `【${item.sys_mc}】` : ""),
  7098. children: [],
  7099. key: item.sys_bh,
  7100. }))
  7101. );
  7102. GetDedhVisible.value = true; // 展示弹窗
  7103. }
  7104. // 处理嵌套的树形结构数据
  7105. if (!Array.isArray(data) && data.bh_mc) {
  7106. GetDedhtreeData.splice(0, GetDedhtreeData.length, buildTree(data));
  7107. GetDedhVisible.value = true; // 展示弹窗
  7108. }
  7109. // 使用 nextTick 确保树形组件渲染完成后执行操作
  7110. nextTick(() => {
  7111. const tree = table_fplb.value; // 获取树形组件实例
  7112. if (tree) {
  7113. const firstNode = tree.getNode(0); // 获取树形的第一个节点
  7114. if (firstNode) {
  7115. firstNode.el.focus(); // 聚焦到第一个节点
  7116. }
  7117. }
  7118. });
  7119. }
  7120. } catch (error) {
  7121. console.error("获取数据失败:", error);
  7122. }
  7123. };
  7124. //键盘事件
  7125. const handleTreeKeydown = (event) => {
  7126. const tree = table_fplb.value; // 获取树实例
  7127. if (!tree) {
  7128. console.error("树组件未加载");
  7129. return;
  7130. }
  7131. const focusedElement = document.activeElement;
  7132. const focusedNodeId = focusedElement?.getAttribute("data-key"); // 获取 DOM 的 data-key 属性
  7133. if (event.keyCode === 13 && focusedNodeId) { // 判断是否是回车键
  7134. tree.setCurrentKey(focusedNodeId); // 设置当前节点为选中
  7135. tree.$nextTick(() => {
  7136. const currentNode = tree.getCurrentNode(); // 获取当前选中的节点
  7137. if (!currentNode) {
  7138. console.warn("没有选中的节点");
  7139. return;
  7140. }
  7141. // 清除上一次的选中状态
  7142. clearPreviousSelection(tree);
  7143. // 收起所有其他节点
  7144. Object.keys(tree.store.nodesMap).forEach((key) => {
  7145. tree.store.nodesMap[key].expanded = false; // 收起所有节点
  7146. });
  7147. // 展开当前节点
  7148. tree.store.nodesMap[currentNode.id].expanded = true;
  7149. // 如果当前节点有子节点,选中第一个子节点
  7150. if (currentNode.children && currentNode.children.length > 0) {
  7151. const firstChild = currentNode.children[0];
  7152. if (firstChild) {
  7153. const firstChildKey = firstChild.id.toString();
  7154. tree.setCurrentKey(firstChildKey); // 设置第一个子节点为选中
  7155. setTimeout(() => {
  7156. const firstChildDom = tree.$el.querySelector(`[data-key="${firstChildKey}"]`);
  7157. if (firstChildDom) {
  7158. firstChildDom.focus();
  7159. firstChildDom.scrollIntoView({ block: "nearest" });
  7160. }
  7161. });
  7162. }
  7163. } else {
  7164. console.log("当前子节点:", currentNode.label);
  7165. // 如果节点没有子节点,打印节点名称
  7166. JPformdata['定额代号'] = currentNode.label.split("【")[0];
  7167. GetDedhVisible.value = false;
  7168. }
  7169. });
  7170. } else if (event.keyCode === 38 || event.keyCode === 40) { // 上下箭头键
  7171. const currentNode = tree.getCurrentNode();
  7172. if (currentNode) {
  7173. const currentNodeDom = tree.$el.querySelector(`[data-key="${currentNode.id}"]`);
  7174. if (currentNodeDom) {
  7175. currentNodeDom.focus();
  7176. }
  7177. }
  7178. }
  7179. };
  7180. // 清除之前的选中状态
  7181. const clearPreviousSelection = (tree) => {
  7182. const selectedNodes = tree.getCheckedNodes();
  7183. selectedNodes.forEach(node => {
  7184. tree.setChecked(node, false);
  7185. });
  7186. tree.setCurrentKey(null);
  7187. };
  7188. // 弹出框键盘事件
  7189. const ent = (event) => {
  7190. if (document.activeElement.id === "tableFplb") {
  7191. if (table_fplb.value) {
  7192. const tree = table_fplb.value?.$el;
  7193. if (tree) {
  7194. const node = tree.querySelector("[data-key]");
  7195. if (event.keyCode === 13) {
  7196. // GetDedhVisible.value = false;
  7197. }
  7198. if (node) {
  7199. node.scrollIntoView({ block: "nearest" }); // 确保节点可见
  7200. node.focus(); // 确保焦点正确
  7201. }
  7202. }
  7203. }
  7204. }
  7205. };
  7206. //点击事件
  7207. const handleFplbClick = (nodeData, node, component) => {
  7208. //存放当前节点的nodeId
  7209. if (!nodeData.children || nodeData.children.length === 0) {
  7210. // 如果节点没有子节点,打印节点名称
  7211. JPformdata['定额代号']= nodeData.label.split("【")[0];
  7212. GetDedhVisible.value = false;
  7213. }
  7214. };
  7215. /*
  7216. JP修改定额代号弹窗
  7217. */
  7218. const GetDedhtreeDataedit = reactive([]);
  7219. const GetDedhVisibleedit = ref(false);
  7220. const table_fplbedit = ref(null); // el-tree 的 ref
  7221. const getDedhsubmitedit = async () => {
  7222. try {
  7223. const response = await JPproductionDedh({
  7224. sczl_jtbh: JPformdataedit['机器']
  7225. });
  7226. console.log(response)
  7227. if (response.code === 0) {
  7228. const data = response.data;
  7229. // 处理单条记录的情况,直接赋值
  7230. if (!Array.isArray(data) && !data.bh_mc) {
  7231. JPformdataedit['定额代号'] = data.sys_bh;
  7232. return;
  7233. }
  7234. // 定义递归函数,用于构造树形结构
  7235. const buildTree = (node) => {
  7236. const treeNode = {
  7237. id: node.sys_bh,
  7238. // label: node.sys_bh + (node.sys_mc ? `【${node.sys_mc}】` : ""), // 显示内容
  7239. label: node.sys_bh + (node.sys_mc ? `【${node.sys_mc}】` : ""),
  7240. children: [],
  7241. key: node.Key_ || node.sys_bh, // 保留 key 属性,用于操作
  7242. };
  7243. // 如果有子节点,递归处理
  7244. if (node.bh_mc && Array.isArray(node.bh_mc)) {
  7245. treeNode.children = node.bh_mc.map((childNode) => buildTree(childNode));
  7246. }
  7247. return treeNode;
  7248. };
  7249. // 处理数组数据结构,生成树形结构并展示弹窗
  7250. if (Array.isArray(data)) {
  7251. GetDedhtreeDataedit.splice(
  7252. 0,
  7253. GetDedhtreeDataedit.length,
  7254. ...data.map((item) => ({
  7255. id: item.sys_bh,
  7256. // label: item.sys_bh,
  7257. label: item.sys_bh + (item.sys_mc ? `【${item.sys_mc}】` : ""),
  7258. children: [],
  7259. key: item.sys_bh,
  7260. }))
  7261. );
  7262. GetDedhVisibleedit.value = true; // 展示弹窗
  7263. }
  7264. // 处理嵌套的树形结构数据
  7265. if (!Array.isArray(data) && data.bh_mc) {
  7266. GetDedhtreeDataedit.splice(0, GetDedhtreeDataedit.length, buildTree(data));
  7267. GetDedhVisibleedit.value = true; // 展示弹窗
  7268. }
  7269. // 使用 nextTick 确保树形组件渲染完成后执行操作
  7270. nextTick(() => {
  7271. const tree = table_fplb.value; // 获取树形组件实例
  7272. if (tree) {
  7273. const firstNode = tree.getNode(0); // 获取树形的第一个节点
  7274. if (firstNode) {
  7275. firstNode.el.focus(); // 聚焦到第一个节点
  7276. }
  7277. }
  7278. });
  7279. }
  7280. } catch (error) {
  7281. console.error("获取数据失败:", error);
  7282. }
  7283. };
  7284. //键盘事件
  7285. const handleTreeKeydownedit = (event) => {
  7286. const tree = table_fplbedit.value; // 获取树实例
  7287. if (!tree) {
  7288. console.error("树组件未加载");
  7289. return;
  7290. }
  7291. const focusedElement = document.activeElement;
  7292. const focusedNodeId = focusedElement?.getAttribute("data-key"); // 获取 DOM 的 data-key 属性
  7293. if (event.keyCode === 13 && focusedNodeId) { // 判断是否是回车键
  7294. tree.setCurrentKey(focusedNodeId); // 设置当前节点为选中
  7295. tree.$nextTick(() => {
  7296. const currentNode = tree.getCurrentNode(); // 获取当前选中的节点
  7297. if (!currentNode) {
  7298. console.warn("没有选中的节点");
  7299. return;
  7300. }
  7301. // 清除上一次的选中状态
  7302. clearPreviousSelectionedit(tree);
  7303. // 收起所有其他节点
  7304. Object.keys(tree.store.nodesMap).forEach((key) => {
  7305. tree.store.nodesMap[key].expanded = false; // 收起所有节点
  7306. });
  7307. // 展开当前节点
  7308. tree.store.nodesMap[currentNode.id].expanded = true;
  7309. // 如果当前节点有子节点,选中第一个子节点
  7310. if (currentNode.children && currentNode.children.length > 0) {
  7311. const firstChild = currentNode.children[0];
  7312. if (firstChild) {
  7313. const firstChildKey = firstChild.id.toString();
  7314. tree.setCurrentKey(firstChildKey); // 设置第一个子节点为选中
  7315. setTimeout(() => {
  7316. const firstChildDom = tree.$el.querySelector(`[data-key="${firstChildKey}"]`);
  7317. if (firstChildDom) {
  7318. firstChildDom.focus();
  7319. firstChildDom.scrollIntoView({ block: "nearest" });
  7320. }
  7321. });
  7322. }
  7323. } else {
  7324. console.log("当前子节点:", currentNode.label);
  7325. // 如果节点没有子节点,打印节点名称
  7326. JPformdataedit['定额代号'] = currentNode.label.split("【")[0];
  7327. GetDedhVisibleedit.value = false;
  7328. }
  7329. });
  7330. } else if (event.keyCode === 38 || event.keyCode === 40) { // 上下箭头键
  7331. const currentNode = tree.getCurrentNode();
  7332. if (currentNode) {
  7333. const currentNodeDom = tree.$el.querySelector(`[data-key="${currentNode.id}"]`);
  7334. if (currentNodeDom) {
  7335. currentNodeDom.focus();
  7336. }
  7337. }
  7338. }
  7339. };
  7340. // 清除之前的选中状态
  7341. const clearPreviousSelectionedit = (tree) => {
  7342. const selectedNodes = tree.getCheckedNodes();
  7343. selectedNodes.forEach(node => {
  7344. tree.setChecked(node, false);
  7345. });
  7346. tree.setCurrentKey(null);
  7347. };
  7348. // 弹出框键盘事件
  7349. const entedit = (event) => {
  7350. if (document.activeElement.id === "tableFplb") {
  7351. if (table_fplbedit.value) {
  7352. const tree = table_fplbedit.value?.$el;
  7353. if (tree) {
  7354. const node = tree.querySelector("[data-key]");
  7355. if (event.keyCode === 13) {
  7356. // GetDedhVisibleedit.value = false;
  7357. }
  7358. if (node) {
  7359. node.scrollIntoView({ block: "nearest" }); // 确保节点可见
  7360. node.focus(); // 确保焦点正确
  7361. }
  7362. }
  7363. }
  7364. }
  7365. };
  7366. //点击事件
  7367. const handleFplbClickedit = (nodeData, node, component) => {
  7368. //存放当前节点的nodeId
  7369. if (!nodeData.children || nodeData.children.length === 0) {
  7370. // 如果节点没有子节点,打印节点名称
  7371. JPformdataedit['定额代号']= nodeData.label.split("【")[0];
  7372. GetDedhVisibleedit.value = false;
  7373. }
  7374. };
  7375. //追加字体颜色和不可输入
  7376. const setColorReadonly = (id) => {
  7377. const newInput = document.getElementById(id)
  7378. newInput.style.color = 'red';
  7379. newInput.setAttribute('readonly', true);
  7380. }
  7381. //追加字体颜色和可输入
  7382. const unsetColorReadonly = (id) => {
  7383. const newInput = document.getElementById(id)
  7384. newInput.style.color = 'black';
  7385. newInput.removeAttribute('readonly');
  7386. }
  7387. //日报表修改弹窗确定
  7388. const chanliangenterDialog = async () => {
  7389. // console.log(formdata3.value.换版类型)
  7390. // return;
  7391. updateTotal()
  7392. const jt = formdata3.value.sczl_jtbh
  7393. // 定义一个变量来决定是否应该检查 fpsum2.value < 1
  7394. const shouldCheckLessThanOne = !jt.includes('SY') && !jt.includes('PM');
  7395. const relevantKeys2 = ['组员1', '组员2','组员3','组员4','组员5','组员6','组员7','组员8','组员9',];
  7396. const values = relevantKeys2.reduce((acc, key) => {
  7397. const value = parseFloat(formDatas.value[key], 10);
  7398. if (!isNaN(value)) {
  7399. acc.push(value); // 只有当 value 不是 NaN 时才添加到数组中
  7400. }
  7401. return acc;
  7402. }, []); // 初始化为空数组
  7403. const hasInvalidValue = values.some(value => value <= 0 || value > 1);
  7404. if (hasInvalidValue) {
  7405. ElMessage({
  7406. type: "error",
  7407. message: "某人分配系数有误",
  7408. });
  7409. return;
  7410. }
  7411. console.log(1145,fpsum2)
  7412. if (fpsum2.value > 1) {
  7413. ElMessage({
  7414. type: "error",
  7415. message: "分配系数相加不能大于1",
  7416. });
  7417. return;
  7418. }
  7419. // 只有当 shouldCheckLessThanOne 为 true 时才检查 fpsum2.value < 1
  7420. if (shouldCheckLessThanOne && fpsum2.value < 1) {
  7421. ElMessage({
  7422. type: "error",
  7423. message: "分配系数相加不能小于1",
  7424. });
  7425. return;
  7426. }
  7427. //判断是否选择了拉料人员
  7428. if(formdata3.value.拉料['编号'] === ''){
  7429. ElMessage({
  7430. type: "error",
  7431. message: "请选择拉料人员",
  7432. });
  7433. }else if (type2.value === 'update') {
  7434. SubmitDailyProduction()
  7435. } else if (type2.value === 'create') {
  7436. add()
  7437. }
  7438. }
  7439. //日报表新增
  7440. const add = async () => {
  7441. const rate1=(parseFloat(formdata3.value.组员1['比例'])).toFixed(5)
  7442. const rate2=(parseFloat(formdata3.value.组员2['比例'])).toFixed(5)
  7443. const rate3=(parseFloat(formdata3.value.组员3['比例'])).toFixed(5)
  7444. const rate4=(parseFloat(formdata3.value.组员4['比例'])).toFixed(5)
  7445. const rate5=(parseFloat(formdata3.value.组员5['比例'])).toFixed(5)
  7446. const rate6=(parseFloat(formdata3.value.组员6['比例'])).toFixed(5)
  7447. const rate7=(parseFloat(formdata3.value.组员7['比例'])).toFixed(5)
  7448. const rate8=(parseFloat(formdata3.value.组员8['比例'])).toFixed(5)
  7449. const rate9=(parseFloat(formdata3.value.组员9['比例'])).toFixed(5)
  7450. const rate10=(parseFloat(formdata3.value.组员10['比例'])).toFixed(5)
  7451. const restoredData = {
  7452. sczl_gdbh:formdata3.value.工单编号,
  7453. sczl_yjno:formdata3.value.yjno,
  7454. sczl_gxh:formdata3.value.gxh,
  7455. sczl_gxmc: formdata3.value.gxmc,
  7456. sczl_bzdh: formdata3.value.bzdh,
  7457. sczl_bh1: formdata3.value.组员1['编号'],
  7458. sczl_bh2: formdata3.value.组员2['编号'],
  7459. sczl_bh3: formdata3.value.组员3['编号'],
  7460. sczl_bh4: formdata3.value.组员4['编号'],
  7461. sczl_bh5: formdata3.value.组员5['编号'],
  7462. sczl_bh6: formdata3.value.组员6['编号'],
  7463. sczl_bh7: formdata3.value.组员7['编号'],
  7464. sczl_bh8: formdata3.value.组员8['编号'],
  7465. sczl_bh9: formdata3.value.组员9['编号'],
  7466. sczl_bh10: formdata3.value.组员10['编号'],
  7467. // sczl_bh98: formdata3.value.拉料['编号'],
  7468. sczl_bh98:formdata3.value.拉料['编号'] === '自备' ? '' : formdata3.value.拉料['编号'],
  7469. sczl_rate1: rate1,
  7470. sczl_rate2: rate2,
  7471. sczl_rate3: rate3,
  7472. sczl_rate4: rate4,
  7473. sczl_rate5: rate5,
  7474. sczl_rate6: rate6,
  7475. sczl_rate7: rate7,
  7476. sczl_rate8: rate8,
  7477. sczl_rate9: rate9,
  7478. sczl_rate10: rate10,
  7479. sczl_jtbh: formdata3.value.sczl_jtbh,
  7480. 开工时间:formdata3.value.starttime,
  7481. 码开始行:formdata3.value.码开始行,
  7482. 码结束行:formdata3.value.码结束行,
  7483. sys_id:sys_id,
  7484. sczl_装版工时:formdata3.value.装版工时,
  7485. sczl_打样工时:formdata3.value.打样工时,
  7486. sczl_异常类型1:formdata3.value.异常类型,
  7487. sczl_异常停机工时:formdata3.value.异常总工时,
  7488. sczl_异常工时1:formdata3.value.异常补时,
  7489. sczl_保养工时:formdata3.value.保养工时,
  7490. sczl_dedh:formdata3.value.dedh,
  7491. sczl_rq: formdata3.value.rq,
  7492. sczl_num: formdata3.value.num,
  7493. sczl_cl: formdata3.value.产量,
  7494. sczl_zcfp: formdata3.value.制程废品,
  7495. sczl_zccp: formdata3.value.制程次品,
  7496. sczl_前工序废: formdata3.value.前工序废,
  7497. sczl_来料少数: formdata3.value.来料异常,
  7498. sczl_ls: formdata3.value.联数,
  7499. sczl_ms: formdata3.value.色度数,
  7500. sczl_装版总工时: formdata3.value.装版总工时,
  7501. sczl_打样总工时: formdata3.value.打样总工时,
  7502. sczl_设备运行工时: formdata3.value.通电工时,
  7503. 码包: formdata3.value.码包,
  7504. 辅电表: formdata3.value.辅电表,
  7505. 主电表:formdata3.value.主电表,
  7506. 换版类型:formdata3.value.换版类型,
  7507. sczl_换版联拼数:formdata3.value.换版联拼数,
  7508. }
  7509. if(restoredData.开工时间==undefined){
  7510. restoredData.开工时间 = '1900-01-01 00:00:00'
  7511. }
  7512. console.log('新增数据打印',restoredData);
  7513. // return;
  7514. const response = await ChanliangAdd(restoredData);
  7515. if (response.code === 0) {
  7516. ElMessage({type: 'success',message: '成功'})
  7517. FacilitychanLiang()
  7518. FacilityDetail()
  7519. chanliangVisible.value=false
  7520. }
  7521. }
  7522. //日报表上传
  7523. const SubmitDailyProduction = async () => {
  7524. const rate1=(parseFloat(formdata3.value.组员1['比例'])).toFixed(5)
  7525. const rate2=(parseFloat(formdata3.value.组员2['比例'])).toFixed(5)
  7526. const rate3=(parseFloat(formdata3.value.组员3['比例'])).toFixed(5)
  7527. const rate4=(parseFloat(formdata3.value.组员4['比例'])).toFixed(5)
  7528. const rate5=(parseFloat(formdata3.value.组员5['比例'])).toFixed(5)
  7529. const rate6=(parseFloat(formdata3.value.组员6['比例'])).toFixed(5)
  7530. const rate7=(parseFloat(formdata3.value.组员7['比例'])).toFixed(5)
  7531. const rate8=(parseFloat(formdata3.value.组员8['比例'])).toFixed(5)
  7532. const rate9=(parseFloat(formdata3.value.组员9['比例'])).toFixed(5)
  7533. const rate10=(parseFloat(formdata3.value.组员10['比例'])).toFixed(5)
  7534. const restoredData = {
  7535. sczl_gdbh:formdata3.value.工单编号,
  7536. sczl_yjno:formdata3.value.yjno,
  7537. sczl_gxh:formdata3.value.gxh,
  7538. sczl_gxmc: formdata3.value.gxmc,
  7539. sczl_bzdh: formdata3.value.bzdh,
  7540. sczl_bh1: formdata3.value.组员1['编号'],
  7541. sczl_bh2: formdata3.value.组员2['编号'],
  7542. sczl_bh3: formdata3.value.组员3['编号'],
  7543. sczl_bh4: formdata3.value.组员4['编号'],
  7544. sczl_bh5: formdata3.value.组员5['编号'],
  7545. sczl_bh6: formdata3.value.组员6['编号'],
  7546. sczl_bh7: formdata3.value.组员7['编号'],
  7547. sczl_bh8: formdata3.value.组员8['编号'],
  7548. sczl_bh9: formdata3.value.组员9['编号'],
  7549. sczl_bh10: formdata3.value.组员10['编号'],
  7550. sczl_bh98:formdata3.value.拉料['编号'] === '自备' ? '' : formdata3.value.拉料['编号'],
  7551. sczl_rate1: rate1,
  7552. sczl_rate2: rate2,
  7553. sczl_rate3: rate3,
  7554. sczl_rate4: rate4,
  7555. sczl_rate5: rate5,
  7556. sczl_rate6: rate6,
  7557. sczl_rate7: rate7,
  7558. sczl_rate8: rate8,
  7559. sczl_rate9: rate9,
  7560. sczl_rate10: rate10,
  7561. sczl_jtbh: formdata3.value.sczl_jtbh,
  7562. 开工时间:"2024-03-12 08:30:00",
  7563. 码开始行:formdata3.value.码开始行,
  7564. 码结束行:formdata3.value.码结束行,
  7565. sys_id:sys_id,
  7566. sczl_装版工时:formdata3.value.装版工时,
  7567. sczl_打样工时:formdata3.value.打样工时,
  7568. sczl_异常类型1:formdata3.value.异常类型,
  7569. sczl_异常停机工时:formdata3.value.异常总工时,
  7570. sczl_异常工时1:formdata3.value.异常补时,
  7571. sczl_保养工时:formdata3.value.保养工时,
  7572. sczl_dedh:formdata3.value.dedh,
  7573. sczl_rq: formdata3.value.rq,
  7574. // sczl_rq: date,
  7575. sczl_num: formdata3.value.num,
  7576. // sczl_rq: formData3.value.sczl_rq,
  7577. sczl_cl: formdata3.value.产量,
  7578. sczl_zcfp: formdata3.value.制程废品,
  7579. sczl_zccp: formdata3.value.制程次品,
  7580. sczl_前工序废: formdata3.value.前工序废,
  7581. sczl_来料少数: formdata3.value.来料异常,
  7582. sczl_ls: formdata3.value.联数,
  7583. sczl_ms: formdata3.value.色度数,
  7584. sczl_装版总工时: formdata3.value.装版总工时,
  7585. sczl_打样总工时: formdata3.value.打样总工时,
  7586. sczl_设备运行工时: formdata3.value.通电工时,
  7587. 码包: formdata3.value.码包,
  7588. 辅电表: formdata3.value.辅电表,
  7589. 主电表:formdata3.value.主电表,
  7590. UniqId:uid.value,
  7591. 换版类型:formdata3.value.换版类型,
  7592. sczl_换版联拼数:formdata3.value.换版联拼数,
  7593. }
  7594. const response = await MachineChanliangDetailEdit(restoredData);
  7595. if (response.code === 0) {
  7596. ElMessage({
  7597. type: 'success',
  7598. message: '成功'
  7599. })
  7600. FacilitychanLiang()
  7601. FacilityDetail()
  7602. chanliangVisible.value=false
  7603. }
  7604. }
  7605. selected.value='难度调整系数'
  7606. const SFType=ref(false)
  7607. const CPType=ref(false)
  7608. const SDType=ref(false)
  7609. const FPlxs=ref(false)
  7610. if(selected.value==='难度调整系数'){
  7611. SFType.value=true
  7612. CPType.value=false
  7613. SDType.value=false
  7614. }else if(selected.value=== '凹印版距'){
  7615. CPType.value=true
  7616. SFType.value=false
  7617. SDType.value=false
  7618. }else if(selected.value=== '色度数'){
  7619. SDType.value=true
  7620. SFType.value=false
  7621. CPType.value=false
  7622. }
  7623. //选择变化
  7624. const agreeChange = async () => {
  7625. if(selected.value=== '难度调整系数'){
  7626. SFType.value=true
  7627. CPType.value=false
  7628. SDType.value=false
  7629. FPlxs.value=false
  7630. }else if(selected.value=== '凹印版距'){
  7631. CPType.value=true
  7632. SFType.value=false
  7633. SDType.value=false
  7634. FPlxs.value=false
  7635. }else if(selected.value=== '色度数'){
  7636. SDType.value=true
  7637. SFType.value=false
  7638. CPType.value=false
  7639. FPlxs.value=false
  7640. }else if(selected.value=== '废品率系数'){
  7641. FPlxs.value=true
  7642. SFType.value= false
  7643. SDType.value= false
  7644. CPType.value=false
  7645. }
  7646. }
  7647. //核算调整弹窗确定
  7648. const hesuanenterDialog = async () => {
  7649. if(selected.value==='难度调整系数'){
  7650. const res = await CoefficientEdit({id:Selection_ids.value,工价系数:hesuanValue.缩放系数 })
  7651. if(res.code===0){
  7652. ElMessage({
  7653. type: 'success',
  7654. message: '成功'
  7655. })
  7656. hesuanVisible.value=false
  7657. FacilitychanLiang()
  7658. }else{
  7659. ElMessage({
  7660. type: 'error',
  7661. message: '失败'
  7662. })
  7663. }
  7664. }else if(selected.value=== '凹印版距'){
  7665. const res = await PrintingModeDataEdit({id:Selection_ids.value,plate:hesuanValue.产品板距,mode:hesuanValue.印刷方式 })
  7666. if(res.code===0){
  7667. ElMessage({
  7668. type: 'success',
  7669. message: '成功'
  7670. })
  7671. hesuanVisible.value=false
  7672. FacilitychanLiang()
  7673. }else{
  7674. ElMessage({
  7675. type: 'error',
  7676. message: '失败'
  7677. })
  7678. }
  7679. }else if(selected.value=== '色度数'){
  7680. const res = await ChromaDataEdit({id:Selection_ids.value,ms:hesuanValue.色度数 })
  7681. if(res.code===0){
  7682. ElMessage({
  7683. type: 'success',
  7684. message: '成功'
  7685. })
  7686. hesuanVisible.value=false
  7687. FacilitychanLiang()
  7688. }else{
  7689. ElMessage({
  7690. type: 'error',
  7691. message: '失败'
  7692. })
  7693. }
  7694. }else if(selected.value=== '废品率系数'){
  7695. const res = await RejectionEdit({id:Selection_ids.value,rejection:hesuanValue.废品率系数 })
  7696. if(res.code===0){
  7697. ElMessage({
  7698. type: 'success',
  7699. message: '成功'
  7700. })
  7701. hesuanVisible.value=false
  7702. FacilitychanLiang()
  7703. }else{
  7704. ElMessage({
  7705. type: 'error',
  7706. message: '失败'
  7707. })
  7708. }
  7709. }
  7710. }
  7711. // 核算参数调整取消
  7712. const hesuanVisiblecloseDialog = async () => {
  7713. hesuanVisible.value = false
  7714. }
  7715. // 班组选择相关变量
  7716. const dialogSelectVisible_Bz = ref(false)
  7717. const selectData_Bz = reactive([
  7718. { code: 'A 班', name: 'A 班' },
  7719. { code: 'B 班', name: 'B 班' }
  7720. ])
  7721. const currentBzIndex = ref(0)
  7722. const table_BZMC = ref()
  7723. // 打开班组选择弹窗
  7724. const openBanzuDialog = () => {
  7725. dialogSelectVisible_Bz.value = true
  7726. nextTick(() => {
  7727. currentBzIndex.value = 0
  7728. setCurrent_BZMC(selectData_Bz[0])
  7729. })
  7730. }
  7731. // 处理班组选择
  7732. const handleSelectClick_Bz = (row) => {
  7733. formdata3.value.bzdh = row.code
  7734. JPformdata['bzdh'] = row.code
  7735. JPformdataedit['bzdh'] = row.code
  7736. // formdata3.value.bzmc = row.name
  7737. dialogSelectVisible_Bz.value = false
  7738. }
  7739. // 班组键盘选择
  7740. const select_bzmc = (event) => {
  7741. if (event.keyCode === 40) { // 向下箭头
  7742. if (currentBzIndex.value < selectData_Bz.length - 1) {
  7743. currentBzIndex.value++
  7744. setCurrent_BZMC(selectData_Bz[currentBzIndex.value])
  7745. } else {
  7746. currentBzIndex.value = 0
  7747. setCurrent_BZMC(selectData_Bz[currentBzIndex.value])
  7748. }
  7749. } else if (event.keyCode === 38) { // 向上箭头
  7750. if (currentBzIndex.value > 0) {
  7751. currentBzIndex.value--
  7752. setCurrent_BZMC(selectData_Bz[currentBzIndex.value])
  7753. } else {
  7754. currentBzIndex.value = selectData_Bz.length - 1
  7755. setCurrent_BZMC(selectData_Bz[currentBzIndex.value])
  7756. }
  7757. } else if (event.keyCode === 13) { // 回车键
  7758. if (selectData_Bz[currentBzIndex.value]) {
  7759. handleSelectClick_Bz(selectData_Bz[currentBzIndex.value])
  7760. }
  7761. dialogSelectVisible_Bz.value = false
  7762. }
  7763. }
  7764. // 设置当前选中班组
  7765. const setCurrent_BZMC = (row) => {
  7766. setTimeout(() => {
  7767. table_BZMC.value?.setCurrentRow(row)
  7768. })
  7769. }
  7770. const ent1 = async (event) => {
  7771. const inputs = document.getElementsByTagName('input');
  7772. const currentIndex = Array.from(inputs).indexOf(event.target);
  7773. if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
  7774. if (event.target.id === '定额代号') {
  7775. if(formdata3.value.sczl_jtbh === ''){
  7776. ElMessage({
  7777. type: 'error',
  7778. message: '请先选择机台!'
  7779. })
  7780. //自动聚焦光标
  7781. setTimeout(() => {
  7782. const inputElement = document.getElementById('机器');
  7783. if (inputElement) {
  7784. inputElement.focus();
  7785. }
  7786. }, 100);
  7787. }else{
  7788. FJPgetDedhsubmit();
  7789. }
  7790. }else if (event.target.id === 'bzdh') {
  7791. console.log('选择班组')
  7792. openBanzuDialog()
  7793. }
  7794. let nextIndex = currentIndex + 1;
  7795. while (nextIndex < inputs.length) {
  7796. if (inputs[nextIndex].disabled) {
  7797. console.log("当前输入框为disabled,跳过");
  7798. nextIndex++; // 跳过disabled的输入框
  7799. continue;
  7800. }
  7801. if (!inputs[nextIndex].readOnly) {
  7802. nextTick(() => {
  7803. inputs[nextIndex].focus();
  7804. inputs[nextIndex].select();
  7805. });
  7806. break;
  7807. }
  7808. nextIndex++;
  7809. }
  7810. }
  7811. else if (event.keyCode === 38) { // 向上箭头
  7812. for (let i = currentIndex - 1; i >= 0; i--) {
  7813. if (!inputs[i].readOnly) {
  7814. nextTick(()=>{
  7815. inputs[i].focus();
  7816. inputs[i].select();
  7817. })
  7818. break;
  7819. }
  7820. }
  7821. // } else if (event.keyCode === 8) { // 删除箭头
  7822. // if (event.target.selectionStart === 0) {
  7823. // for (let i = currentIndex - 1; i >= 0; i--) {
  7824. // if (!inputs[i].readOnly) {
  7825. // nextTick(()=>{
  7826. // inputs[i].focus();
  7827. // inputs[i].setSelectionRange(0, 0);
  7828. // })
  7829. // break;
  7830. // }
  7831. // }
  7832. // }
  7833. } else if (event.keyCode === 37) { // 向左箭头
  7834. if (event.target.selectionStart === 0) {
  7835. for (let i = currentIndex - 1; i >= 0; i--) {
  7836. if (!inputs[i].readOnly) {
  7837. nextTick(()=>{
  7838. inputs[i].focus();
  7839. inputs[i].select();
  7840. })
  7841. break;
  7842. }
  7843. }
  7844. }
  7845. } else if (event.keyCode === 39) { // 向右箭头
  7846. if (event.target.selectionStart === event.target.value.length) {
  7847. for (let i = currentIndex + 1; i < inputs.length; i++) {
  7848. if (!inputs[i].readOnly) {
  7849. nextTick(()=>{
  7850. inputs[i].focus();
  7851. inputs[i].select();
  7852. })
  7853. break;
  7854. }
  7855. }
  7856. }
  7857. }
  7858. }
  7859. // =========== 修正核算参数 ===========
  7860. const xzhstableColumns = ref(
  7861. [
  7862. { label: '方案', prop: '方案', width: '65' },
  7863. { label: '印件号及工序名称', prop: '印件号及工序名称', width: '300' },
  7864. { label: '参照设备', prop: '参照设备', width: '90' },
  7865. { label: '难度系数', prop: 'sxzhscsold_难度系数', width: '90' },
  7866. { label: '新难度系数', prop: '难度系数', width: '100' },
  7867. { label: '原损耗代号', prop: 'sxzhscsold_损耗代号', width: '150' },
  7868. { label: '基础损耗', prop: '基础损耗', width: '90' },
  7869. { label: '新损耗代号', prop: '损耗代号', width: '150' },
  7870. { label: '原印刷方式', prop: 'sxzhscsold_印刷方式', width: '150' },
  7871. { label: '原来版距', prop: 'sxzhscsold_版距', width: '100' },
  7872. { label: '新印刷方式', prop: '印刷方式', width: '100' },
  7873. { label: '新来版距', prop: '版距', width: '90' },
  7874. { label: '原计损色数', prop: 'sxzhscsold_计损色数', width: '100' },
  7875. { label: '新计损色数', prop: '计损色数', width: '100' },
  7876. { label: '原损耗系数', prop: 'sxzhscsold_损耗系数', width: '100' },
  7877. { label: '新损耗系数', prop: '损耗系数', width: '100' },
  7878. ]
  7879. )
  7880. const handleKeyDown = (event, x, y, prop) => {
  7881. const currentElement = document.getElementById(`input${x}${y}`);
  7882. if (currentElement === null && currentElement === undefined) return
  7883. let move = 0
  7884. switch (event.keyCode) {
  7885. case 13: // Enter
  7886. case 40: // 向下箭头
  7887. if (y < sxzhscstableData.value.length )
  7888. document.getElementById(`input${x}${y + 1}`).focus();
  7889. break;
  7890. case 38: // 向上箭头
  7891. if ( y > 0) {
  7892. document.getElementById(`input${x}${y - 1}`).focus();
  7893. }
  7894. break;
  7895. case 39: // 向左箭头
  7896. if ( x === 4) {
  7897. move = x + 3
  7898. } else if(x === 7){
  7899. move = x + 3
  7900. } else if( x === 10){
  7901. move = x + 1
  7902. }else if( x === 11){
  7903. move = x + 2
  7904. }else if( x === 13){
  7905. move = x + 2
  7906. }
  7907. document.getElementById(`input${move}${y}`).focus();
  7908. break;
  7909. case 37: // 向右箭头
  7910. if ( x === 15) {
  7911. move = x - 2
  7912. } else if (x=== 13) {
  7913. move = x - 2
  7914. }else if (x=== 11) {
  7915. move = x - 1
  7916. }else if (x=== 10) {
  7917. move = x - 3
  7918. }else if (x=== 7) {
  7919. move = x - 3
  7920. }
  7921. document.getElementById(`input${move}${y}`).focus();
  7922. break;
  7923. default:
  7924. break;
  7925. }
  7926. }
  7927. const xzhscslist = ref(false);
  7928. const xzhscsformData = reactive({
  7929. gdbh: '',
  7930. cpdh: '',
  7931. gdmc: '',
  7932. yjdh:'',
  7933. yjmc:'',
  7934. });
  7935. const sxzhscstableData = ref([]);
  7936. //修正核算参数按钮
  7937. const onxzhscsclick = () => {
  7938. if(_gdbhlist.value == null || _gdbhlist.value == ''){
  7939. xzhscslist.value = false;
  7940. ElMessage({type: 'warning',message: '请选择 设备作业清单工单后,再操作此功能' })
  7941. }else{
  7942. xzhscsformData['gdbh'] = _gdbhlist.value;
  7943. _AccountingParameterdata();
  7944. xzhscslist.value = true;
  7945. }
  7946. };
  7947. //修正核算参数回车
  7948. const xzhscsgetProductValue = () => {
  7949. _AccountingParameterdata()
  7950. };
  7951. // 修正工单核算参数表格数据
  7952. const _AccountingParameterdata = async ()=>{
  7953. const ProductNamedata = await ProductNameData({workOrder:xzhscsformData['gdbh']});
  7954. if(ProductNamedata.code===0){
  7955. xzhscsformData['cpdh']=ProductNamedata.data.产品代号
  7956. xzhscsformData['gdmc']=ProductNamedata.data.产品名称
  7957. xzhscsformData['yjdh']=ProductNamedata.data.印件代号
  7958. xzhscsformData['yjmc']=ProductNamedata.data.印件名称
  7959. }
  7960. let workOrder = xzhscsformData['gdbh'];
  7961. try {
  7962. const AccountingParameterdata = await AccountingParameter({workOrder:workOrder});
  7963. sxzhscstableData.value = AccountingParameterdata.data;
  7964. const formattedData = AccountingParameterdata.data.map(item=>{
  7965. item.sxzhscsold_难度系数 = item.难度系数;
  7966. item.sxzhscsold_损耗代号 = item.损耗代号;
  7967. item.sxzhscsold_印刷方式 = item.印刷方式;
  7968. item.sxzhscsold_版距 = item.版距;
  7969. item.sxzhscsold_计损色数 = item.计损色数;
  7970. item.sxzhscsold_损耗系数 = item.损耗系数;
  7971. return item
  7972. });
  7973. } catch (error) {
  7974. console.error(error);
  7975. }
  7976. }
  7977. //修正核算参数更新
  7978. const xzhscsConfirm = async () => {
  7979. const firstCharValid = sxzhscstableData.value.map(item => {
  7980. const firstChar = item["损耗代号"] ? item["损耗代号"].charAt(0) : '';
  7981. return firstChar === '0' || firstChar === '';
  7982. });
  7983. if (sxzhscstableData.value) {
  7984. const formattedData = sxzhscstableData.value.map(item => {
  7985. return {
  7986. Uniqid: parseInt(item.UniqId),
  7987. chromatic: parseFloat(item.计损色数) ?? '',
  7988. difficulty: parseFloat(item.难度系数) ?? '',
  7989. loss: item.损耗代号 ??'',
  7990. plate: parseInt(item.版距) ?? '',
  7991. printMode: item.印刷方式 ?? '',
  7992. wastage: parseFloat(item.损耗系数),
  7993. }
  7994. });
  7995. const AccountingParameterEditdata = await AccountingParameterEdit(formattedData);
  7996. if (AccountingParameterEditdata.code === 0) {
  7997. xzhscslist.value = false;
  7998. ElMessage({ type: 'success', message: '更新成功' });
  7999. sxzhscstableData.value =''
  8000. xzhscsformData=''
  8001. } else {
  8002. ElMessage({ type: 'error', message: '更新失败' });
  8003. }
  8004. } else {
  8005. console.error("数据错误");
  8006. }
  8007. };
  8008. //修正核算参数退出
  8009. const sxzhscsCancel = () => {
  8010. xzhscslist.value = false;
  8011. sxzhscstableData.value =''
  8012. xzhscsformData=''
  8013. };
  8014. //修正核算参数颜色
  8015. const sxzhscsCellClass = ({row, column, rowIndex, columnIndex}) =>{
  8016. if (column.label === '新难度系数' || column.label === '新损耗代号' || column.label === '新印刷方式' || column.label === '新来版距' || column.label === '新计损色数' || column.label === '新损耗系数') {
  8017. return 'background-plan-usage-low';
  8018. }
  8019. }
  8020. //=========工序产量核查===========
  8021. const gd_gxclhclist = ref(false);
  8022. const gxclhc_Data = ref([]);
  8023. const gxclhc_Columns = ref(
  8024. [
  8025. { label: '印件及工序名称', prop: 'concatenatedData', width: '380' },
  8026. // { label: '印件', prop: 'Gy0_yjno', width: '130' },
  8027. // { label: '工序', prop: 'Gy0_gxh', width: '130' },
  8028. // { label: '名称', prop: 'Gy0_gxmc', width: '130' },
  8029. { label: '工序计划产量', prop: 'Gy0_计划接货数', width: '120' },
  8030. { label: '联数', prop: 'Gy0_ls', width: '70' },
  8031. { label: '折算车头产量', prop: '折算车头产量', width: '120' },
  8032. { label: '实际上报产量', prop: 'sczl_cl', width: '120' },
  8033. { label: '制程废品', prop: 'sczl_zcfp', width: '120' },
  8034. { label: '制程废品率', prop: '制程废品率', width: '120' },
  8035. { label: '来料异常', prop: '来料异常', width: '90' },
  8036. { label: '流程单数', prop: 'process_num', width: '90' },
  8037. { label: '当前设备', prop: 'Gy0_sbbh', width: '120' },
  8038. { label: '工序状态', prop: 'PD_WG', width: '90'},
  8039. { label: '首板生产日期', prop: 'sczl_rq', width: '160' },
  8040. ]
  8041. )
  8042. const gxclhcformData = reactive({
  8043. gdbh: '',
  8044. gdmc: '',
  8045. yjno: '',
  8046. });
  8047. const gdwhformData = reactive({
  8048. // 下拉框选项数据
  8049. yinjian: [],
  8050. // 设置默认值
  8051. yjno: '',
  8052. });
  8053. const inputCpmc = ref('')
  8054. // 工序产量核查按钮
  8055. const gd_gxclhconClick = async () => {
  8056. if(_rclsb_gdbh.value === '' || _rclsb_gdbh.value === null){
  8057. ElMessage({type: 'warning',message: '请选择具体的工单,在进行操作'})
  8058. return false;
  8059. }
  8060. gxclhcformData['gdbh'] = _rclsb_gdbh.value;
  8061. gxclhcformData['yjno'] = _rclsb_yjno.value;
  8062. gd_gxclhclist.value = true;
  8063. const response = await PrintDetailList ({workOrder:_Gd_gdbh.value});
  8064. gdwhformData.yjno = response.data[0].no
  8065. inputCpmc.value = response.data[0].name
  8066. if (response.code === 0) {
  8067. const noFields = response.data.map(item => item.no);
  8068. gdwhformData.yinjian = noFields
  8069. } else {
  8070. console.error('查询失败:', response.msg);
  8071. }
  8072. _getOrderProcessCount();
  8073. };
  8074. //点击印件下拉框
  8075. const ongdwhfanclick = async() => {
  8076. _PrintDetailList();
  8077. _getOrderProcessCount();
  8078. }
  8079. //工序产量核查回车
  8080. const gxclhcProductValue = async () => {
  8081. const response = await PrintDetailList ({workOrder:gxclhcformData['gdbh']});
  8082. gdwhformData.yjno = response.data[0].no
  8083. inputCpmc.value = response.data[0].name
  8084. if (response.code === 0) {
  8085. const noFields = response.data.map(item => item.no);
  8086. gdwhformData.yinjian = noFields
  8087. } else {
  8088. console.error('查询失败:', response.msg);
  8089. }
  8090. _getOrderProcessCount();
  8091. _PrintDetailList();
  8092. }
  8093. //工序产量核查退出
  8094. const gxclhcCancel = async () => {
  8095. gd_gxclhclist.value = false;
  8096. };
  8097. //印件编号获取方法接口
  8098. const _PrintDetailList = async () => {
  8099. const order = gxclhcformData['gdbh'];
  8100. const response = await PrintDetailList ({workOrder:order});
  8101. const matchingItem = response.data.find(item => item.no === gdwhformData.yjno);
  8102. if (matchingItem) {
  8103. inputCpmc.value = matchingItem.name;
  8104. } else {
  8105. console.log(`No matching item found for no: ${gdwhformData.yjno}`);
  8106. }
  8107. }
  8108. //工序产量核查方法接口
  8109. const _getOrderProcessCount = async () => {
  8110. const order = gxclhcformData['gdbh'];
  8111. const yjno = gdwhformData.yjno;
  8112. const getOrderProcessCount_list = await getOrderProcessCount({order:order,yjno:yjno});
  8113. const concatenatedData = getOrderProcessCount_list.data.map(item => {
  8114. // 优化后的代码,使用模板字符串连接字段值并在单个数字前添加零
  8115. const formattedYjno = item.Gy0_yjno.length === 1 ? `0${item.Gy0_yjno}` : item.Gy0_yjno;
  8116. const formattedGxh = item.Gy0_gxh.length === 1 ? `0${item.Gy0_gxh}` : item.Gy0_gxh;
  8117. const concatenatedValue = `${formattedYjno}-${formattedGxh} ${item.Gy0_gxmc} 【${item.Add_gxmc} 】`;
  8118. return {
  8119. ...item,
  8120. concatenatedData: concatenatedValue, // 使用新属性名
  8121. };
  8122. });
  8123. gxclhc_Data.value = concatenatedData;
  8124. };
  8125. // 获取需要的字典 可能为空 按需保留
  8126. const setOptions = async () =>{
  8127. }
  8128. // 获取需要的字典 可能为空 按需保留
  8129. setOptions()
  8130. // 多选数据
  8131. const multipleSelection = reactive([])
  8132. // 多选
  8133. const handleSelectionChange = (val) => {
  8134. multipleSelection.value= val
  8135. }
  8136. // 删除行
  8137. const deleteRow = (row) => {
  8138. ElMessageBox.confirm('确定要删除吗?', '提示', {
  8139. confirmButtonText: '确定',
  8140. cancelButtonText: '取消',
  8141. type: 'warning'
  8142. }).then(() => {
  8143. deleteCompanyFunc(row)
  8144. })
  8145. }
  8146. // 批量删除控制标记
  8147. const deleteVisible = ref(false)
  8148. // 多选删除
  8149. const onDelete = async() => {
  8150. const ids = []
  8151. if (multipleSelection.value.length === 0) {
  8152. ElMessage({
  8153. type: 'warning',
  8154. message: '请选择要删除的数据'
  8155. })
  8156. return
  8157. }
  8158. multipleSelection.value &&
  8159. multipleSelection.value.map(item => {
  8160. ids.push(item.ID)
  8161. })
  8162. const res = await deleteCompanyByIds({ ids })
  8163. if (res.code === 0) {
  8164. ElMessage({
  8165. type: 'success',
  8166. message: '删除成功'
  8167. })
  8168. if (tableData.value.length === ids.length && page.value > 1) {
  8169. page.value--
  8170. }
  8171. deleteVisible.value = false
  8172. getTableData()
  8173. }
  8174. }
  8175. // 行为控制标记(弹窗内部需要增还是改)
  8176. const type = ref('')
  8177. // 更新行
  8178. const updateCompanyFunc = async(row) => {
  8179. const res = await findCompany({ ID: row.ID })
  8180. type.value = 'update'
  8181. if (res.code === 0) {
  8182. formData.value = res.data.recompany
  8183. dialogFormVisible.value = true
  8184. }
  8185. }
  8186. const cpcode=ref('')
  8187. const finishedcode=ref()
  8188. const _gdbhlist = ref('')
  8189. const lcd_Gd_gdbh = ref(null)
  8190. const lcd_Gd_yjno = ref(null)
  8191. const ybtableData = reactive([])
  8192. const yjupdateCompanyFunc = async(row) => {
  8193. console.log(row)
  8194. lcd_Gd_gdbh.value = row['工单编号|质量信息'].replace(/\|$/, '')
  8195. lcd_Gd_yjno.value = row['印件号'].slice(0, 2)
  8196. const Procedurelist = await Procedure({ Gd_gdbh: row['工单编号|质量信息'].replace(/\|$/, '') })
  8197. selectData.value = Procedurelist.data;
  8198. cpcode.value=row.产品代号
  8199. formData.value.工单编号 = row['工单编号|质量信息'].replace(/\|$/, '')
  8200. formData.value.印件号 = row['印件号'].slice(0, 2)
  8201. formData.value.productCode = row.产品代号
  8202. formData.value.产品名称 = row.产品名称
  8203. _gdbhlist.value = row['工单编号|质量信息'].split('|')[0]
  8204. finishedcode.value=row.产品代号
  8205. const res = await getProductData({product_code:row.产品代号});
  8206. ybtableData.splice(0, ybtableData.length, ...res.data.ybData);
  8207. const response = await facilityPrintDetail({ workOrder: lcd_Gd_gdbh.value,code:'',productCode:row.产品代号,page:ybpage.value,limit:ybpageSize.value });
  8208. // 检查接口返回的状态码
  8209. if (response.code === 0) {
  8210. ybtotal.value = response.data.total
  8211. yinbanselectData.value=response.data.data
  8212. }
  8213. }
  8214. //印版管理领用
  8215. const record_outRow = async (row, index) => {
  8216. console.log(row);
  8217. // 使用 ElMessageBox 提示确认删除
  8218. ElMessageBox.confirm('确定领出此印版?', '提示', {
  8219. confirmButtonText: '确定',
  8220. cancelButtonText: '取消',
  8221. type: 'warning'
  8222. }).then(async () => {
  8223. // 点击确认领出,检查当前机台是否为空
  8224. if (row.领用机台 != null || row.供方批号 === null) {
  8225. ElMessage({
  8226. type: 'error',
  8227. message: '此印版已停用或已被领用'
  8228. });
  8229. } else {
  8230. console.log('调用领出');
  8231. const requestData = [{
  8232. Yb_工单编号: formData.value?.工单编号 || '',
  8233. Yb_存货编码: row.存货编码 || '',
  8234. Yb_供方批号: row.供方批号 || '',
  8235. Yb_领用机台: JTMC || '',
  8236. Yb_印数: row.印数 ? Number(row.印数).toFixed(2) : "0.00",
  8237. Yb_印件号: row.YB_Yjno || '',
  8238. Sys_id: sys_id || ''
  8239. }];
  8240. console.log('领出请求参数:', requestData);
  8241. const Bomdel_del = await PrintDetailAdd(requestData);
  8242. if (Bomdel_del.code === 0) {
  8243. ElMessage({
  8244. type: 'success',
  8245. message: '领出成功'
  8246. });
  8247. const res = await getProductData({product_code:cpcode.value});
  8248. ybtableData.splice(0, ybtableData.length, ...res.data.ybData);
  8249. } else {
  8250. ElMessage({
  8251. type: 'error',
  8252. message: '领出失败'
  8253. });
  8254. }
  8255. }
  8256. }).catch(() => {
  8257. // 取消删除
  8258. ElMessage({
  8259. type: 'info',
  8260. message: '已取消删除'
  8261. });
  8262. });
  8263. }
  8264. // 删除行
  8265. const deleteCompanyFunc = async (row) => {
  8266. const res = await deleteCompany({ ID: row.ID })
  8267. if (res.code === 0) {
  8268. ElMessage({
  8269. type: 'success',
  8270. message: '删除成功'
  8271. })
  8272. if (tableData.value.length === 1 && page.value > 1) {
  8273. page.value--
  8274. }
  8275. getTableData()
  8276. }
  8277. }
  8278. // 弹窗控制标记
  8279. const dialogFormVisible = ref(false)
  8280. const dianjianVisible = ref(false)
  8281. const yinbanVisible = ref(false)
  8282. // 查看详情控制标记
  8283. const detailShow = ref(false)
  8284. const bzData = reactive([])
  8285. // 打开详情弹窗
  8286. const openDetailShow = () => {
  8287. detailShow.value = true
  8288. }
  8289. // 打开详情
  8290. const getDetails = async (row) => {
  8291. // 打开弹窗
  8292. const res = await findCompany({ ID: row.ID })
  8293. if (res.code === 0) {
  8294. formData.value = res.data.recompany
  8295. openDetailShow()
  8296. }
  8297. }
  8298. // 关闭详情弹窗
  8299. const closeDetailShow = () => {
  8300. detailShow.value = false
  8301. }
  8302. const detailShow_rcl = ref(false)
  8303. // 关闭详情弹窗
  8304. const closeDetailShow_rcl = () => {
  8305. detailShow_rcl.value = false
  8306. }
  8307. // 打开弹窗
  8308. const openDialog = () => {
  8309. FacilityInspect()
  8310. FacilitychanLiang()
  8311. dialogFormVisible.value = true
  8312. }
  8313. let drzcData=[]
  8314. let columnNames=[]
  8315. //当日制程检验记录
  8316. const FacilityInspect = async () => {
  8317. const response = await facilityInspect({machine:JTMC,date:date});
  8318. if(response.code==0){
  8319. columnNames = response.data.InspectionTime;
  8320. for (const key in response.data.row[0]) {
  8321. if (key !== 'InspectionTime') {
  8322. const item = response.data.row[0][key];
  8323. const rowData = {
  8324. '工单编号': item['工单编号'],
  8325. '印件号': item['印件号'],
  8326. '工序名称': item['工序名称'],
  8327. '检验项目': item['检验项目']
  8328. };
  8329. columnNames.forEach(time => {
  8330. rowData[time] = '';
  8331. });
  8332. const results = item['time'].split(',');
  8333. results.forEach(result => {
  8334. if (columnNames.includes(result)) {
  8335. rowData[result] = '√';
  8336. }else{rowData[result] = ''}
  8337. });
  8338. drzcData.push(rowData);
  8339. }
  8340. }
  8341. drzcDatas.value=drzcData
  8342. }
  8343. }
  8344. const _rclsb_gdbh = ref('')
  8345. const _rclsb_yjno = ref('')
  8346. // 当日上报产量数据
  8347. const FacilitychanLiang = async () => {
  8348. const response = await facilitychanLiang({machine:JTMC,date:date});
  8349. _rclsb_gdbh.value = response.data[0]['工单编号']
  8350. _rclsb_yjno.value = response.data[0]['yjno']
  8351. if(response.code==0){
  8352. let totalA = response.data['totalA']
  8353. let totalB = response.data['totalB']
  8354. let 保养工时A = response.data['保养工时A']
  8355. let 保养工时B = response.data['保养工时B']
  8356. let 制程废品A = response.data['制程废品A']
  8357. let 制程废品B = response.data['制程废品B']
  8358. let 制程次品A = response.data['制程次品A']
  8359. let 制程次品B = response.data['制程次品B']
  8360. let 前工序废A = response.data['前工序废A']
  8361. let 前工序废B = response.data['前工序废B']
  8362. let 异常工时A = response.data['异常工时A']
  8363. let 异常工时B = response.data['异常工时B']
  8364. let 异常补时工时A = response.data['异常补时工时A']
  8365. let 异常补时工时B = response.data['异常补时工时B']
  8366. let 打样工时A = response.data['打样工时A']
  8367. let 打样工时B = response.data['打样工时B']
  8368. let 来料异常A = response.data['来料异常A']
  8369. let 来料异常B = response.data['来料异常B']
  8370. let 装版工时A = response.data['装版工时A']
  8371. let 装版工时B = response.data['装版工时B']
  8372. let 通电工时A = response.data['通电工时A']
  8373. let 通电工时B = response.data['通电工时B']
  8374. delete response.data['totalA']
  8375. delete response.data['totalB']
  8376. delete response.data['保养工时A']
  8377. delete response.data['保养工时B']
  8378. delete response.data['制程废品A']
  8379. delete response.data['制程废品B']
  8380. delete response.data['制程次品A']
  8381. delete response.data['制程次品B']
  8382. delete response.data['前工序废A']
  8383. delete response.data['前工序废B']
  8384. delete response.data['异常工时A']
  8385. delete response.data['异常工时B']
  8386. delete response.data['异常补时工时A']
  8387. delete response.data['异常补时工时B']
  8388. delete response.data['打样工时A']
  8389. delete response.data['打样工时B']
  8390. delete response.data['来料异常A']
  8391. delete response.data['来料异常B']
  8392. delete response.data['装版工时A']
  8393. delete response.data['装版工时B']
  8394. delete response.data['通电工时A']
  8395. delete response.data['通电工时B']
  8396. gytableData.value=Object.values(response.data)
  8397. if(totalA){
  8398. let rowA = {
  8399. 产品名称: 'A班产量:',
  8400. UniqId: "",bzdh: "",cpmc: "",dedh: "",gxh: "",gxmc: "",num: "",sczl_bh98: "",sj1: "",sj2: "",yjno: "",
  8401. 主电表: "",产量:totalA,保养工时: 保养工时A,制程废品: 制程废品A,制程次品:制程次品A,前工序废: 前工序废A,千件工价: "",印刷方式: "",备注: "",
  8402. 工单编号: "",工序: "",异常总工时: 异常工时A,异常类型: "",异常补时: 异常补时工时A,打样工时: 打样工时A,日定额: "",更新时间: "",来料异常: 来料异常A,用户: "",码包: "",
  8403. 码开始行: "",码结束行: "",组员1: "",组员2: "",组员3: "",色度数: "",装版工时: 装版工时A,辅电表: "",通电工时: 通电工时A,难度系数: "",isTotal: true,
  8404. }
  8405. gytableData.value.push(rowA)
  8406. }
  8407. if(totalB){
  8408. let rowB = {
  8409. 产品名称: 'B班产量:',
  8410. UniqId: "",bzdh: "",cpmc: "",dedh: "",gxh: "",gxmc: "",num: "",sczl_bh98: "",sj1: "",sj2: "",yjno: "",
  8411. 主电表: "",产量:totalB,保养工时: 保养工时B,制程废品: 制程废品B,制程次品:制程次品B,前工序废: 前工序废B,千件工价: "",印刷方式: "",备注: "",
  8412. 工单编号: "",工序: "",异常总工时: 异常工时B,异常类型: "",异常补时: 异常补时工时B,打样工时: 打样工时B,日定额: "",更新时间: "",来料异常: 来料异常B,用户: "",码包: "",
  8413. 码开始行: "",码结束行: "",组员1: "",组员2: "",组员3: "",色度数: "",装版工时: 装版工时B,辅电表: "",通电工时: 通电工时B,难度系数: "",isTotal: true,
  8414. }
  8415. gytableData.value.push(rowB)
  8416. }
  8417. }
  8418. }
  8419. // 关闭弹窗
  8420. const closeDialog = () => {
  8421. dialogFormVisible.value = false
  8422. chanliangVisible.value=false
  8423. formData.value = {
  8424. address: '',
  8425. image: '',
  8426. name: '',
  8427. }
  8428. }
  8429. // 弹窗确定
  8430. const enterDialog = async () => {
  8431. elFormRef.value?.validate( async (valid) => {
  8432. if (!valid) return
  8433. let res
  8434. switch (type.value) {
  8435. case 'create':
  8436. res = await createCompany(formData.value)
  8437. break
  8438. case 'update':
  8439. res = await updateCompany(formData.value)
  8440. break
  8441. default:
  8442. res = await createCompany(formData.value)
  8443. break
  8444. }
  8445. if (res.code === 0) {
  8446. ElMessage({
  8447. type: 'success',
  8448. message: '创建/更改成功'
  8449. })
  8450. closeDialog()
  8451. getTableData()
  8452. }
  8453. })
  8454. }
  8455. //点击label获取表格数据
  8456. function duohandleClick(table) {
  8457. if(table.props.label === '设备作业清单'){
  8458. FacilityWorklist();
  8459. }
  8460. if(table.props.label === '班组人员及分配比例'){
  8461. FacilityTeam(JTMC)
  8462. }
  8463. if(table.props.label === '检验记录'){
  8464. InspectionRecord()
  8465. }
  8466. }
  8467. /*
  8468. 样式事件
  8469. */
  8470. const blplanUsageCellClass = ({row, column, rowIndex, columnIndex}) =>{
  8471. if (column.property === '员工编号' || column.property === 'ygxm') {
  8472. return 'plan-usage-low';
  8473. }
  8474. }
  8475. const JPblplanUsageCellClass = ({row, column, rowIndex, columnIndex}) =>{
  8476. if (column.property === '员工编号' || column.property === 'ygxm') {
  8477. return 'plan-usage-low';
  8478. }
  8479. }
  8480. //修改 JP检品机 当日上报产量 组员及分配比例
  8481. const JPblplanUsageCellClassedit = ({row, column, rowIndex, columnIndex}) =>{
  8482. if (column.property === '员工编号' || column.property === 'ygxm') {
  8483. return 'plan-usage-low';
  8484. }
  8485. }
  8486. //设备作业清单 正在生产中 背景颜色
  8487. const sbzyqdsatusCellClass = ({row, column, rowIndex, columnIndex}) =>{
  8488. if (row.status === 1) {
  8489. return 'status-plan-usage-low';
  8490. }
  8491. }
  8492. //工序产量核查
  8493. const gxclhcCellClass = ({row, column, rowIndex, columnIndex}) =>{
  8494. if (column.label === '实际上报产量' ||column.label === '制程废品' || column.label === '制程废品率' ||
  8495. column.label === '来料异常' || column.label === '流程单数' || column.label === '当前设备') {
  8496. return 'lan-plan-usage-lows';
  8497. }
  8498. if (column.label === '折算车头产量') {
  8499. return 'gxclhc—color-column-red';
  8500. }
  8501. // 如果不是 'PD_WG' 列,返回空字符串或其他样式类
  8502. if (column.label === '工序状态'){
  8503. if(row['PD_WG'] === '完工'){
  8504. return 'lan-plan-usage-lowshui';
  8505. }else{
  8506. return 'pczccolor-column-lan';
  8507. }
  8508. }
  8509. }
  8510. //拉料导出弹窗
  8511. const onllexcel = ref(false)
  8512. const onllexcelrq = ref('')
  8513. const llexporttoExcel = async () => {
  8514. console.log('导出')
  8515. onllexcelrq.value = currentDates.split('-').slice(0, 2).join('-')
  8516. onllexcel.value = true
  8517. }
  8518. //选择日期
  8519. const onchange_data = (val) => {
  8520. if (val) {
  8521. // 将日期对象转换为本地时间的年月格式
  8522. const year = val.getFullYear()
  8523. const month = (val.getMonth() + 1).toString().padStart(2, '0')
  8524. onllexcelrq.value = `${year}-${month}`
  8525. } else {
  8526. onllexcelrq.value = ''
  8527. }
  8528. }
  8529. //导出确认
  8530. const rcgdsjonDialog = async () => {
  8531. try {
  8532. // 获取数据
  8533. const response = await LazhiGongData({ mouth: onllexcelrq.value });
  8534. const originalData = response.data;
  8535. // 创建工作表
  8536. const worksheet = XLSX.utils.json_to_sheet(originalData);
  8537. //从某列开始转化成数字
  8538. //设置从C列开始为数字格式
  8539. const range = XLSX.utils.decode_range(worksheet['!ref']);
  8540. for (let col = 2; col <= range.e.c; col++) { // 从C列(索引2)开始
  8541. for (let row = range.s.r + 1; row <= range.e.r; row++) { // 跳过表头行
  8542. const cellAddress = XLSX.utils.encode_cell({ r: row, c: col });
  8543. if (worksheet[cellAddress]) {
  8544. // 尝试转换为数字
  8545. const cellValue = worksheet[cellAddress].v;
  8546. const numValue = Number(cellValue);
  8547. if (!isNaN(numValue)) {
  8548. worksheet[cellAddress].t = 'n'; // 数字类型
  8549. worksheet[cellAddress].v = numValue; // 更新值
  8550. worksheet[cellAddress].z = '0.0'; // 数字格式
  8551. }
  8552. }
  8553. }
  8554. }
  8555. // 创建并导出工作簿
  8556. const workbook = XLSX.utils.book_new();
  8557. XLSX.utils.book_append_sheet(workbook, worksheet, 'Sheet1');
  8558. XLSX.writeFile(workbook, '拉料人员数据.xlsx');
  8559. } catch (error) {
  8560. console.error('导出失败:', error);
  8561. ElMessage.error('导出数据失败,请重试');
  8562. }
  8563. };
  8564. const rcgdsjcloseDialog = () => {onllexcel.value = false}
  8565. </script>
  8566. <style scoped>
  8567. /* .button-container {
  8568. display: flex;
  8569. flex-wrap: wrap;
  8570. } */
  8571. .bt{
  8572. /* margin-left: 2px !important;
  8573. padding: 3px !important;
  8574. font-size: 12px; */
  8575. margin-bottom: 5px !important;
  8576. }
  8577. .button-container {
  8578. display: flex;
  8579. flex-wrap: wrap;
  8580. justify-content: flex-start;
  8581. }
  8582. .custom-button {
  8583. display: flex;
  8584. flex-direction: column;
  8585. align-items: center;
  8586. text-align: center;
  8587. flex: 0 0 150px;
  8588. height: 170px;
  8589. margin: 7px;
  8590. }
  8591. .custom-button img {
  8592. max-width: 100%;
  8593. }
  8594. .JKWTree-container {
  8595. display: flex;
  8596. }
  8597. .JKWTree-tree {
  8598. width: 440px;
  8599. background-color: #fff;
  8600. padding: 10px;
  8601. margin-right: 20px;
  8602. }
  8603. .JKWTree-tree h3 {
  8604. font-size: 15px;
  8605. font-weight: 700;
  8606. margin: 10px 0;
  8607. }
  8608. .JKWTree-content {
  8609. flex: 1;
  8610. }
  8611. /*!* 选中某行时的背景色*/
  8612. :deep(.el-table__body tr.current-row)>td {
  8613. background: #ff80ff !important;
  8614. }
  8615. :deep(.statusy-plan-usage-low div) {
  8616. color: #8c939d !important;
  8617. }
  8618. /* 设备作业清单 正在生产中 背景颜色 */
  8619. :deep(.status-plan-usage-low ) {
  8620. background: yellow !important;
  8621. }
  8622. ::v-deep .el-tabs--card > .el-tabs__header .el-tabs__item.is-active {
  8623. color: white;
  8624. background-color: #4d70ff;
  8625. }
  8626. .groupbox{
  8627. margin:10px;
  8628. width:500px;
  8629. height:500px;
  8630. border:thin solid black;
  8631. padding:10px
  8632. }
  8633. .grouptitle{
  8634. display:block;
  8635. margin-top:-24px;
  8636. margin-left:20px;
  8637. width:150px;
  8638. text-align:center;
  8639. background-color:white
  8640. }
  8641. /*工序产量核查*/
  8642. :deep(.gxclhc—color-column-red div) {
  8643. color: red !important;
  8644. }
  8645. :deep(.lan-plan-usage-lows div) {
  8646. color: blue !important;
  8647. font-weight: bold;
  8648. }
  8649. :deep(.lan-plan-usage-lowshui div) {
  8650. color: #8c939d !important;
  8651. }
  8652. :deep(.plan-usage-low div) {
  8653. color: blue !important;
  8654. font-size: 16px;
  8655. font-weight: bold;
  8656. }
  8657. </style>
  8658. <style scoped>
  8659. :deep(.el-table td .cell) {
  8660. line-height: 20px !important;
  8661. }
  8662. :deep(.el-tabs__header) {
  8663. margin-bottom: 0;
  8664. }
  8665. .search {
  8666. margin-left: 0px !important;
  8667. margin-right: 10px !important;
  8668. }
  8669. /* .bt {
  8670. margin-left: 2px !important;
  8671. padding: 3px !important;
  8672. font-size: 12px;
  8673. } */
  8674. .el-tabs__header {
  8675. margin: 0px !important;
  8676. }
  8677. .gva-table-box {
  8678. padding: 0px !important;
  8679. }
  8680. :deep(.total-row) {
  8681. background-color: yellow !important;
  8682. }
  8683. :deep(.plan-usage-low div) {
  8684. color: red !important;
  8685. font-size: 14px;
  8686. font-weight: normal;
  8687. }
  8688. /* tree组件背景高亮 */
  8689. :deep(.el-tree-node:focus > .el-tree-node__content){
  8690. background: #ff80ff !important;
  8691. }
  8692. /*!* 流程单查询按钮颜色控制未完成*/
  8693. :deep(.custom-buttons.el-button--info) {
  8694. background-color: palegreen !important;
  8695. color: #155724;
  8696. font-size: 20px;
  8697. border-color: #c3e6cb;
  8698. }
  8699. /* 已完成 */
  8700. :deep(.custom-buttons.el-button--danger) {
  8701. background-color: rgb(236, 135, 135) !important;
  8702. color: #721c24;
  8703. font-size: 20px;
  8704. border-color: #f5c6cb;
  8705. }
  8706. </style>