shebeiyunxing.vue 243 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617
  1. <template>
  2. <div>
  3. <header>
  4. <el-button type="primary" class="bt" @click="onBZ">班组维护</el-button>
  5. <el-button type="primary" class="bt" @click="onzhicheng" >制程检验</el-button>
  6. <el-button type="primary" class="bt" @click="onxuncha">管理巡查</el-button>
  7. <el-button type="primary" class="bt" @click="ondianjian">设备点检</el-button>
  8. <el-button type="primary" class="bt" @click="onyinban">印版领退</el-button>
  9. <!-- <el-button type="primary" @click="onstatus" >设置机台状态</el-button> -->
  10. <el-button type="primary" class="bt" @click="oncomplaints" >客诉记录</el-button>
  11. <el-button type="primary" class="bt" @click="onClear" >换型清场</el-button>
  12. <el-button type="primary" class="bt" @click="pd_gdprintonClick" >工单打印</el-button>
  13. <el-button type="primary" class="bt" @click="gzSel" >员工工资查询</el-button>
  14. <el-button type="primary" class="bt" @click="hesuan" v-if="AddType === true">核算参数调整</el-button>
  15. <el-button type="primary" icon="edit" @click="onxzhscsclick" class="bt" title="修正核算参数">修正核算参数</el-button>
  16. <el-button type="primary" icon="edit" @click="gd_gxclhconClick" class="bt" title="工序产量核查">工序产量核查</el-button>
  17. <el-button type="primary" class="bt" @click="onADD" v-if="AddType === true">新增</el-button>
  18. <el-button type="primary" class="bt" @click="onDel" v-if="DelType === true" >删除</el-button>
  19. <el-button type="primary" icon="edit" @click="deldbcl_onclick" :disabled="dbclSelection === ''" class="bt" title="当班产量明细" >当班产量明细删除</el-button>
  20. <el-button type="primary" class="bt" @click="onRCL">日产量批量维护</el-button>
  21. <!-- <el-button type="primary" @click="onClear2" >换型清场</el-button> -->
  22. </header>
  23. <el-container>
  24. <layout-sider :resize-directions="['right']" :width="220" style="margin-right: 10px;" >
  25. <div class="JKWTree-tree" style="height: 70vh;" >
  26. <h3>设备运行跟踪</h3>
  27. <el-tree :data="treeData" class="treecolor" highlight-current @node-click="handleNodeClick" />
  28. </div>
  29. </layout-sider>
  30. <el-container>
  31. <el-main>
  32. <div class="button-container" v-if="showbutton" style="height: 50%;width: 100%; flex: 1; border: 0px magenta solid; margin: 0; padding: 0;">
  33. <button v-for="(item, index) in machineData" :key="index" class="custom-button" @click="handleButtonClick(item.设备编号)">
  34. <img :src="`/src/assets/${item.状态}.png`" :alt="altText" style="max-width: 100%; height: auto;"/>
  35. <span style="margin-top: 8px;">{{ item.设备编号 + ' - ' + item.设备名称 }}</span>
  36. </button>
  37. </div>
  38. <div class="gva-search-box" v-if="JTMCOn" style="overflow: hidden; padding: 0; display: flex;">
  39. <div style="flex: 1; border: 0px magenta solid; margin: 0; padding: 0;">
  40. <el-row :gutter="20">
  41. <el-col :span="24">
  42. <el-form-item label="工单编号" prop="name">
  43. <el-row :gutter="20">
  44. <el-col :span="6"><el-input v-model="formData.工单编号" disabled :clearable="true"/></el-col>
  45. <el-col :span="18"><el-input v-model="formData.产品名称" disabled :clearable="true"/></el-col>
  46. </el-row>
  47. </el-form-item>
  48. </el-col>
  49. </el-row>
  50. <el-row :gutter="20">
  51. <el-col :span="6">
  52. <el-form-item label="印件编号" prop="id"><el-input v-model="formData.印件编号" disabled :clearable="true" /></el-form-item>
  53. </el-col>
  54. <el-col :span="17">
  55. <el-form-item label="工序名称" prop="name"><el-input v-model="formData.工序名称" disabled :clearable="true" /></el-form-item>
  56. </el-col>
  57. </el-row>
  58. <el-row :gutter="20">
  59. <el-col :span="4"><el-form-item label="班组成员" prop="id"></el-form-item></el-col>
  60. </el-row>
  61. <el-row :gutter="1">
  62. <el-col :span="4"><el-input v-model="formData.sczl_bh1" disabled :clearable="true" /></el-col>
  63. <el-col :span="4"><el-input v-model="formData.sczl_bh2" disabled :clearable="true" /></el-col>
  64. <el-col :span="4"><el-input v-model="formData.sczl_bh3" disabled :clearable="true" /></el-col>
  65. <el-col :span="4"><el-input v-model="formData.sczl_bh4" disabled :clearable="true" /></el-col>
  66. <el-col :span="4"><el-input v-model="formData.sczl_bh5" disabled :clearable="true" /></el-col>
  67. <el-col :span="4"><el-input v-model="formData.sczl_bh6" disabled :clearable="true" /></el-col>
  68. </el-row>
  69. <el-row :gutter="1">
  70. <el-col :span="4"><el-input v-model="formData.sczl_name1" disabled :clearable="true" /></el-col>
  71. <el-col :span="4"><el-input v-model="formData.sczl_name2" disabled :clearable="true" /></el-col>
  72. <el-col :span="4"><el-input v-model="formData.sczl_name3" disabled :clearable="true" /></el-col>
  73. <el-col :span="4"><el-input v-model="formData.sczl_name4" disabled :clearable="true" /></el-col>
  74. <el-col :span="4"><el-input v-model="formData.sczl_name5" disabled :clearable="true" /></el-col>
  75. <el-col :span="4"><el-input v-model="formData.sczl_name6" disabled :clearable="true" /></el-col>
  76. </el-row>
  77. </div>
  78. <div style="flex: 1; border: 0px lawngreen solid; margin: 0; padding: 0; overflow: hidden;">
  79. <el-table tooltip-effect="dark" :data="selectData" row-key="ID" highlight-current-row="true"
  80. border style="width:100%;height: 30vh;" @row-dblclick="handleSelectClick" >
  81. <el-table-column prop="process" label="印件及工序" width="340" />
  82. <el-table-column prop="completed" label="已完成板数" width="150" />
  83. </el-table>
  84. </div>
  85. </div>
  86. <div v-if="JTMCOn" class="gva-table-box" >
  87. <div class="gva-btn-list">
  88. </div>
  89. <el-tabs v-model="activName" type="card" @tab-click="duohandleClick">
  90. <el-tab-pane label="设备作业清单" @click="showTable('印件资料')" name="first" :class="{ 'active-tab': activeTab === 'first' }" >
  91. <el-table ref="multipleTable"
  92. :show-overflow-tooltip="true"
  93. highlight-current-row="true"
  94. :cell-class-name="sbzyqdsatusCellClass"
  95. :row-style="{ height: '20px' }"
  96. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  97. :header-cell-style="{ padding: '0px' }"
  98. @row-click="yjupdateCompanyFunc"
  99. style="width: 100%;height: 330px" border tooltip-effect="dark" :data="sbzyData" row-key="ID" @selection-change="handleSelectionChange">
  100. <!-- <el-table-column type="selection" width="55" />-->
  101. <!-- <el-table-column align="left" label="选择" prop="bh" width="80"/> -->
  102. <el-table-column align="left" sortable label="工单编号|质量信息" prop="工单编号|质量信息" width="145" />
  103. <el-table-column align="left" sortable label="印件资料" prop="印件资料" width="240" />
  104. <el-table-column align="left" sortable label="工序名称" prop="工序名称" width="100" />
  105. <el-table-column align="left" sortable label="计划产量/已完成" prop="计划产量/已完成" width="130"/>
  106. <el-table-column align="left" sortable label="装版时数" prop="装版时数" width="85"/>
  107. <el-table-column align="left" sortable label="工序产能" prop="工序产能" width="85"/>
  108. <el-table-column align="left" sortable label="计划工时" prop="计划工时" width="85"/>
  109. <el-table-column align="left" sortable label="计划生产时段" prop="计划生产时段" width="210" />
  110. <el-table-column align="left" sortable label="排产备注" prop="排产备注" width="100" />
  111. <el-table-column align="left" sortable label="产品名称" prop="产品名称" width="240" />
  112. </el-table>
  113. </el-tab-pane>
  114. <el-tab-pane label="班组人员及分配比例" @click="showTable('工艺资料')" name="second">
  115. <el-table ref="multipleTable"
  116. highlight-current-row="true"
  117. :show-overflow-tooltip="true"
  118. :row-style="{ height: '20px' }"
  119. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  120. :header-cell-style="{ padding: '0px' }"
  121. @row-dblclick="gyupdateCompanyFunc"
  122. :row-class-name="rowClassStyle"
  123. style="width: 100%;height: 400px" border tooltip-effect="dark" :data="FPData" row-key="ID" @selection-change="handleSelectionChange"
  124. @row-click="clickybupdate">
  125. <!-- <el-table-column type="selection" width="55" />-->
  126. <!-- <el-table-column align="left" label="选择" prop="方案" width="70"/> -->
  127. <el-table-column align="left" sortable label="班组号" prop="班组号" width="70" />
  128. <el-table-column align="left" sortable label="组员1" prop="0" width="200" />
  129. <el-table-column align="left" sortable label="组员2" prop="1" width="200" />
  130. <el-table-column align="left" sortable label="组员3" prop="2" width="200" />
  131. <el-table-column align="left" sortable label="组员4" prop="3" width="200" />
  132. <el-table-column align="left" sortable label="组员5" prop="4" width="200" />
  133. <el-table-column align="left" sortable label="组员6" prop="5" width="70" />
  134. <el-table-column align="left" sortable label="组员7" prop="6" width="70" />
  135. <el-table-column align="left" sortable label="组员8" prop="7" width="70" />
  136. <el-table-column align="left" sortable label="组员9" prop="8" width="70" />
  137. <el-table-column align="left" sortable label="组员10" prop="9_正品版" width="70" />
  138. </el-table>
  139. </el-tab-pane>
  140. <el-tab-pane label="当班产量明细" @click="showTable('印版资料')" name="third">
  141. <el-table ref="multipleTable" highlight-current-row="true"
  142. :show-overflow-tooltip="true" :row-style="{ height: '20px' }"
  143. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  144. :header-cell-style="{ padding: '0px' }" @row-dblclick="ybupdateCompanyFunc"
  145. style="width: 100%;height: 400px" border tooltip-effect="dark" :data="CLMXData" row-key="ID"
  146. @selection-change="dbclmxSelectionChange">
  147. <el-table-column type="selection" width="55" />
  148. <el-table-column fixed align="left" sortable label="生产时段" prop="生产时间段" width="180"/>
  149. <el-table-column fixed align="left" sortable label="工单编号" prop="工单编号" width="90" />
  150. <el-table-column fixed align="left" sortable label="产品名称" prop="产品名称" width="150" />
  151. <el-table-column fixed align="left" sortable label="印件及工序" prop="印件及工序" width="320"/>
  152. <el-table-column align="left" sortable label="标牌号" prop="标牌号" width="80"/>
  153. <el-table-column align="left" sortable label="产量" prop="产量" width="100"/>
  154. <el-table-column align="left" sortable label="制程废品" prop="制程废品" width="100" />
  155. <el-table-column align="left" sortable label="制程次品" prop="制程次品" width="100" />
  156. <el-table-column align="left" sortable label="前工序废" prop="前工序废" width="100" />
  157. <el-table-column align="left" sortable label="来料异常" prop="来料异常" width="100"/>
  158. <el-table-column align="left" sortable label="装版工时" prop="装版工时" width="100" />
  159. <el-table-column align="left" sortable label="保养工时" prop="保养工时" width="100" />
  160. <el-table-column align="left" sortable label="打样工时" prop="打样工时" width="100"/>
  161. <el-table-column align="left" sortable label="异常停机工时" prop="异常停机工时" width="120"/>
  162. <el-table-column align="left" sortable label="通电工时" prop="通电工时" width="100"/>
  163. <el-table-column align="left" sortable label="码开始行" prop="码开始行" width="100" />
  164. <el-table-column align="left" sortable label="码结束行" prop="码结束行" width="100" />
  165. <el-table-column align="left" sortable label="码包" prop="码包" width="100" />
  166. <el-table-column align="left" sortable label="主电表" prop="主电表" width="100"/>
  167. <el-table-column align="left" sortable label="辅电表" prop="辅电表" width="100" />
  168. <el-table-column align="left" sortable label="色度数" prop="色度数" width="100" />
  169. </el-table>
  170. </el-tab-pane>
  171. <el-tab-pane label="检验记录" @click="showTable('技术资料附件')" name="fourth">
  172. <el-table ref="multipleTable"
  173. :row-style="{ height: '20px' }"
  174. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  175. :header-cell-style="{ padding: '0px' }"
  176. :show-overflow-tooltip="true"
  177. highlight-current-row="true"
  178. style="width: 100%;height: 400px" border tooltip-effect="dark" :data="JYData" row-key="ID" @selection-change="handleSelectionChange">
  179. <!-- <el-table-column type="selection" width="55" />-->
  180. <el-table-column align="left" sortable label="工单编号" prop="工单编号" width="85"/>
  181. <el-table-column align="left" sortable label="印件号" prop="印件号" width="70" />
  182. <el-table-column align="left" sortable label="工序名称" prop="工序名称" width="85" />
  183. <el-table-column align="left" sortable label="检验项目" prop="检验项目" width="85"/>
  184. <el-table-column v-for="time in columnNames" :key="time" :label="time" :prop="time" align="center" width="80" ></el-table-column>
  185. </el-table>
  186. </el-tab-pane>
  187. </el-tabs>
  188. </div>
  189. <el-dialog v-model="detailShow" fullscreen
  190. style="font-size: 50px;font-weight: bold;" lock-scroll :before-close="closeDetailShow" title="机台班组维护" destroy-on-close>
  191. <div>
  192. <el-table ref="multipleTable"
  193. :row-style="{ height: '20px' }"
  194. :cell-style="{ padding: '0px' ,color:'blue'}" :header-row-style="{ height: '20px' }"
  195. :header-cell-style="{ padding: '0px' }"
  196. :show-overflow-tooltip="true"
  197. highlight-current-row="true" @row-click="BZhandle"
  198. style="width: 100%;height: 250px;margin-top: 0px;" border tooltip-effect="dark"
  199. :data="bzData" row-key="ID" @selection-change="BZSelectionChange">
  200. <!-- <el-table-column type="selection" width="55" /> -->
  201. <el-table-column align="left" label="机台" prop="JTMC" width="70"/>
  202. <el-table-column align="left" label="班组" prop="班组号" width="60"/>
  203. <el-table-column align="left" label="组员1" prop="0" width="195"/>
  204. <el-table-column align="left" label="组员2" prop="1" width="195"/>
  205. <el-table-column align="left" label="组员3" prop="2" width="195"/>
  206. <el-table-column align="left" label="组员4" prop="3" width="195"/>
  207. <el-table-column align="left" label="组员5" prop="4" width="195"/>
  208. <el-table-column align="left" label="组员6" prop="5" width="100"/>
  209. <el-table-column align="left" label="组员7" prop="6" width="100"/>
  210. <el-table-column align="left" label="组员8" prop="7" width="100"/>
  211. <el-table-column align="left" label="组员9" prop="8" width="100"/>
  212. <el-table-column align="left" label="特殊组员" prop="9" width="100"/>
  213. <el-table-column align="left" label="UNIQID" prop="ID" width="100"/>
  214. </el-table>
  215. </div>
  216. <div style="margin-top:100px;">
  217. <el-row :gutter="20">
  218. <el-col :span="10">
  219. <el-form-item label="机台编号" prop="id">
  220. <el-select v-model="selectedOption" placeholder="请选择">
  221. <el-option
  222. v-for="item in dropdownOptions"
  223. :key="item.value"
  224. :label="item.label"
  225. :value="item.value"
  226. ></el-option>
  227. </el-select>
  228. </el-form-item>
  229. </el-col>
  230. <el-col :span="10">
  231. <el-form-item label="班组编号" prop="id">
  232. <el-select v-model="BZMC" placeholder="" >
  233. <el-option label="A 班" value="A 班"></el-option>
  234. <el-option label="B 班" value="B 班"></el-option>
  235. </el-select>
  236. </el-form-item>
  237. </el-col>
  238. </el-row>
  239. <div style="display: flex;">
  240. <div class="groupbox float-div" style="height: 17vh; width: 130vh;">
  241. <span class="grouptitle">组员及分配比例</span>
  242. <el-row :gutter="10" style="margin-top: 0px; height: 5vh;">
  243. <el-col :span="2"><span></span></el-col>
  244. <el-col :span="2"></el-col>
  245. <el-col :span="2"></el-col>
  246. <el-col :span="2"></el-col>
  247. <el-col :span="2"></el-col>
  248. <el-col :span="2"></el-col>
  249. <el-col :span="2"></el-col>
  250. <el-col :span="2"></el-col>
  251. <el-col :span="2"></el-col>
  252. <el-col :span="3"></el-col>
  253. <el-col :span="3"><el-form-item label="特殊组员" prop="id"></el-form-item></el-col>
  254. </el-row>
  255. <el-row :gutter="10" style="margin-top: 0px;">
  256. <el-col :span="3"><el-input v-model="formDatas.code1" @keyup.enter.native="getbzyg($event, '1')"/></el-col>
  257. <el-col :span="3"><el-input v-model="formDatas.code2" @keyup.enter.native="getbzyg($event, '2')" /></el-col>
  258. <el-col :span="3"><el-input v-model="formDatas.code3" @keyup.enter.native="getbzyg($event, '3')"/></el-col>
  259. <el-col :span="3"><el-input v-model="formDatas.code4" @keyup.enter.native="getbzyg($event, '4')"/></el-col>
  260. <el-col :span="3"><el-input v-model="formDatas.code5" @keyup.enter.native="getbzyg($event, '5')"/></el-col>
  261. <el-col :span="3"><el-input v-model="formDatas.code6" @keyup.enter.native="getbzyg($event, '6')"/></el-col>
  262. <el-col :span="3"><el-input v-model="formDatas.code7" @keyup.enter.native="getbzyg($event, '7')"/></el-col>
  263. <el-col :span="3"><el-input v-model="formDatas.code8" @keyup.enter.native="getbzyg($event, '8')"/></el-col>
  264. </el-row>
  265. <el-row :gutter="10" style="margin-top: 1px;">
  266. <el-col :span="3"><el-input v-model="formDatas.name1" style="color:#00FF00"/></el-col>
  267. <el-col :span="3"><el-input v-model="formDatas.name2"/></el-col>
  268. <el-col :span="3"><el-input v-model="formDatas.name3"/></el-col>
  269. <el-col :span="3"><el-input v-model="formDatas.name4"/></el-col>
  270. <el-col :span="3"><el-input v-model="formDatas.name5"/></el-col>
  271. <el-col :span="3"><el-input v-model="formDatas.name6"/></el-col>
  272. <el-col :span="3"><el-input v-model="formDatas.name7"/></el-col>
  273. <el-col :span="3"><el-input v-model="formDatas.name8"/></el-col>
  274. </el-row>
  275. <el-row :gutter="10" style="margin-top: 1px;">
  276. <el-col :span="3"><el-input v-model="formDatas.percentage1"/></el-col>
  277. <el-col :span="3"><el-input v-model="formDatas.percentage2"/></el-col>
  278. <el-col :span="3"><el-input v-model="formDatas.percentage3"/></el-col>
  279. <el-col :span="3"><el-input v-model="formDatas.percentage4"/></el-col>
  280. <el-col :span="3"><el-input v-model="formDatas.percentage5"/></el-col>
  281. <el-col :span="3"><el-input v-model="formDatas.percentage6"/></el-col>
  282. <el-col :span="3"><el-input v-model="formDatas.percentage7"/></el-col>
  283. <el-col :span="3"><el-input v-model="formDatas.percentage8"/></el-col>
  284. </el-row>
  285. </div>
  286. <div style="height: 50vh; width: 15vh;margin-top: 3vh;">
  287. <el-button type="text"></el-button>
  288. <el-button style="margin-bottom: 1vh; width:15vh;background-color:cornflowerblue;font-size: 2.0vh;font-weight: bold; color: white;" @click="addBz" >新 增</el-button>
  289. <el-button style="margin-bottom: 1vh; width:15vh;background-color:cornflowerblue;font-size: 2.0vh;font-weight: bold; color: white;" @click="selectBz" >更新当前班组</el-button>
  290. <el-button style="margin-bottom: 1vh; width:15vh;background-color:cornflowerblue;font-size: 2.0vh;font-weight: bold; color: white;" @click="delBz" >删除当前班组</el-button>
  291. </div>
  292. </div>
  293. </div>
  294. </el-dialog>
  295. <!-- 日产量批量维护 -->
  296. <el-dialog v-model="detailShow_rcl" fullscreen
  297. style="font-size: 50px;font-weight: bold;" lock-scroll :before-close="closeDetailShow_rcl" title="日产量批量维护" destroy-on-close>
  298. <div>
  299. <el-table ref="multipleTable"
  300. :row-style="{ height: '20px' }"
  301. :cell-style="{ padding: '0px' ,color:'blue'}" :header-row-style="{ height: '20px' }"
  302. :header-cell-style="{ padding: '0px' }"
  303. :show-overflow-tooltip="true"
  304. highlight-current-row="true" @row-click="BZhandle_rcl"
  305. style="width: 100%;height: 250px;margin-top: 0px;" border tooltip-effect="dark"
  306. :data="bzData_rcl" row-key="ID" @selection-change="BZSelectionChange_rcl">
  307. <!-- <el-table-column type="selection" width="55" /> -->
  308. <el-table-column align="left" label="机台" prop="JTMC" width="70"/>
  309. <el-table-column align="left" label="班组" prop="班组号" width="60"/>
  310. <el-table-column align="left" label="组员1" prop="0" width="195"/>
  311. <el-table-column align="left" label="组员2" prop="1" width="195"/>
  312. <el-table-column align="left" label="组员3" prop="2" width="195"/>
  313. <el-table-column align="left" label="组员4" prop="3" width="195"/>
  314. <el-table-column align="left" label="组员5" prop="4" width="195"/>
  315. <el-table-column align="left" label="组员6" prop="5" width="100"/>
  316. <el-table-column align="left" label="组员7" prop="6" width="100"/>
  317. <el-table-column align="left" label="组员8" prop="7" width="100"/>
  318. <el-table-column align="left" label="组员9" prop="8" width="100"/>
  319. <el-table-column align="left" label="特殊组员" prop="9" width="100"/>
  320. <el-table-column align="left" label="UNIQID" prop="ID" width="100"/>
  321. </el-table>
  322. </div>
  323. <div style="margin-top:100px;">
  324. <el-row :gutter="20">
  325. <el-col :span="10">
  326. <el-form-item label="机台编号" prop="id">
  327. <el-input v-model="selectedOption_rcl" disabled/>
  328. </el-form-item>
  329. </el-col>
  330. <el-col :span="10">
  331. <el-form-item label="班组编号" prop="id">
  332. <el-input v-model="BZMC_rcl" disabled/>
  333. </el-form-item>
  334. </el-col>
  335. </el-row>
  336. <div style="display: flex;">
  337. <div class="groupbox float-div" style="height: 17vh; width: 130vh;">
  338. <span class="grouptitle">组员及分配比例</span>
  339. <el-row :gutter="10" style="margin-top: 0px; height: 5vh;">
  340. <el-col :span="2"><span></span></el-col>
  341. <el-col :span="2"></el-col>
  342. <el-col :span="2"></el-col>
  343. <el-col :span="2"></el-col>
  344. <el-col :span="2"></el-col>
  345. <el-col :span="2"></el-col>
  346. <el-col :span="2"></el-col>
  347. <el-col :span="2"></el-col>
  348. <el-col :span="2"></el-col>
  349. <el-col :span="3"></el-col>
  350. <el-col :span="3"><el-form-item label="特殊组员" prop="id"></el-form-item></el-col>
  351. </el-row>
  352. <el-row :gutter="10" style="margin-top: 0px;">
  353. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.code1" @keyup.enter.native="getbzyg($event, '1')"/></el-col>
  354. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.code2" @keyup.enter.native="getbzyg($event, '2')" /></el-col>
  355. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.code3" @keyup.enter.native="getbzyg($event, '3')"/></el-col>
  356. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.code4" @keyup.enter.native="getbzyg($event, '4')"/></el-col>
  357. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.code5" @keyup.enter.native="getbzyg($event, '5')"/></el-col>
  358. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.code6" @keyup.enter.native="getbzyg($event, '6')"/></el-col>
  359. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.code7" @keyup.enter.native="getbzyg($event, '7')"/></el-col>
  360. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.code8" @keyup.enter.native="getbzyg($event, '8')"/></el-col>
  361. </el-row>
  362. <el-row :gutter="10" style="margin-top: 1px;">
  363. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.name1" style="color:#00FF00"/></el-col>
  364. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.name2"/></el-col>
  365. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.name3"/></el-col>
  366. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.name4"/></el-col>
  367. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.name5"/></el-col>
  368. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.name6"/></el-col>
  369. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.name7"/></el-col>
  370. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.name8"/></el-col>
  371. </el-row>
  372. <el-row :gutter="10" style="margin-top: 1px;">
  373. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.percentage1"/></el-col>
  374. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.percentage2"/></el-col>
  375. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.percentage3"/></el-col>
  376. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.percentage4"/></el-col>
  377. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.percentage5"/></el-col>
  378. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.percentage6"/></el-col>
  379. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.percentage7"/></el-col>
  380. <el-col :span="3"><el-input disabled v-model="formDatas_rcl.percentage8"/></el-col>
  381. </el-row>
  382. </div>
  383. <div style="height: 50vh; width: 15vh;margin-top: 3vh;">
  384. <el-button type="text"></el-button>
  385. <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>
  386. </div>
  387. </div>
  388. </div>
  389. </el-dialog>
  390. <!-- 组员及分配比例 -->
  391. <el-dialog v-model="blModel" :before-close="() => blModel = false" style="width: 20%">
  392. <el-form>
  393. <div>
  394. <el-table :data="employeeData" border :show-overflow-tooltip="true" :cell-class-name="blplanUsageCellClass" @row-click="tablebllickHandler($event)">
  395. <el-table-column prop="员工编号" label="员工编号"></el-table-column>
  396. <el-table-column prop="ygxm" label="员工姓名"></el-table-column>
  397. </el-table>
  398. </div>
  399. </el-form>
  400. </el-dialog>
  401. <el-dialog
  402. v-model="dianjianVisible"
  403. title="设备点检记录"
  404. destroy-on-close
  405. width="1300px"
  406. style="height: 80%;"
  407. >
  408. <el-row :gutter="24">
  409. <el-col :span="3">
  410. <el-form-item label="设备编号" prop="id">
  411. <el-input v-model="formData.JTMC" :clearable="true" />
  412. </el-form-item>
  413. </el-col>
  414. <el-col :span="10">
  415. <el-row>
  416. <el-col>
  417. <el-input v-model="formData.产品名称" :clearable="true" />
  418. </el-col>
  419. </el-row>
  420. </el-col>
  421. </el-row>
  422. <div style="display: flex;">
  423. <div style="flex: 0.1;">
  424. <el-aside width="200px" style="margin: 0;">
  425. <div class="JKWTree-tree" style="height: 100%; border-right: 1px solid #ebeef5;">
  426. <el-tree :data="dianjiantreeData" :props="defaultProps" highlight-current="true"
  427. @node-click="dianjianNodeClick" @node-dblclick="handleNodeDoubleClick"></el-tree>
  428. </div>
  429. </el-aside>
  430. </div>
  431. <div style="flex: 1; margin: 0;">
  432. <el-table
  433. tooltip-effect="dark"
  434. :data="dianjianselectData"
  435. row-key="ID"
  436. highlight-current-row="true"
  437. :show-overflow-tooltip="true"
  438. border @row-click="dianjianhandle"
  439. style="width:100%; height:400px;"
  440. @row-dblclick="handleSelectClick"
  441. :row-class-name="rowClassName"
  442. >
  443. <el-table-column
  444. prop="检验项目"
  445. label="检验项目"
  446. width="300"
  447. />
  448. <el-table-column
  449. prop="点检方法"
  450. label="点检方法"
  451. width="180"
  452. />
  453. <el-table-column
  454. v-slot="scope"
  455. label="正常"
  456. width="80"
  457. >
  458. <el-checkbox v-model="scope.row.zc" @change="zcClick(scope.row)"></el-checkbox>
  459. </el-table-column>
  460. <el-table-column
  461. v-slot="scope"
  462. label="异常"
  463. width="80"
  464. >
  465. <el-checkbox v-model="scope.row.yc" @change="ycClick(scope.row)"></el-checkbox>
  466. </el-table-column>
  467. <el-table-column
  468. label="备注说明"
  469. width="180"
  470. >
  471. </el-table-column>
  472. <el-table-column
  473. v-slot="scope"
  474. label="不检测"
  475. width="80"
  476. >
  477. <el-checkbox v-model="scope.row.notjc" @change="notjcClick(scope.row)"></el-checkbox>
  478. </el-table-column>
  479. </el-table>
  480. <el-row :gutter="20">
  481. <el-col :span="20">
  482. <el-input v-model="pandingfangfa" style="height: 50px;" :clearable="true" />
  483. </el-col>
  484. </el-row>
  485. </div>
  486. </div>
  487. </el-dialog>
  488. <el-dialog
  489. v-model="yinbanVisible"
  490. title="选择"
  491. destroy-on-close
  492. width="1300px"
  493. style="height: 110%;"
  494. >
  495. <el-row :gutter="24">
  496. <el-col :span="4">
  497. <el-form-item label="工单编号" prop="id">
  498. <el-input v-model="formData.工单编号" :clearable="true" />
  499. </el-form-item>
  500. </el-col>
  501. <el-col :span="6">
  502. <el-form-item prop="id">
  503. <el-input v-model="formData.productCode" :clearable="true" />
  504. </el-form-item>
  505. </el-col>
  506. <el-col :span="14">
  507. <el-form-item prop="id">
  508. <el-input v-model="formData.产品名称" :clearable="true" />
  509. </el-form-item>
  510. </el-col>
  511. </el-row>
  512. <div style="display: flex;">
  513. <div style="flex: 1;">
  514. <el-aside width="250px" style="margin: 0;">
  515. <div class="JKWTree-tree" style="height: 100%; border-right: 1px solid #ebeef5;">
  516. <el-tree :data="yinbantreeData" :props="defaultProps" highlight-current="true"
  517. @node-click="yinbanNodeClick" @node-dblclick="handleNodeDoubleClick"></el-tree>
  518. </div>
  519. </el-aside>
  520. </div>
  521. <div style="flex: 1; margin: 0;">
  522. <el-table
  523. tooltip-effect="dark"
  524. :data="yinbanselectData"
  525. row-key="ID"
  526. highlight-current-row="true"
  527. border @row-click="dianjianhandle"
  528. style="width:1000px; height:400px;"
  529. @row-dblclick="handleSelectClick"
  530. :row-class-name="rowClassName"
  531. >
  532. <el-table-column
  533. prop="存货编码"
  534. label="存货编码"
  535. width="180"
  536. />
  537. <el-table-column
  538. prop="存货名称"
  539. label="存货名称"
  540. width="180"
  541. />
  542. <el-table-column
  543. prop="印版名称"
  544. label="印版名称"
  545. width="180"
  546. />
  547. <el-table-column
  548. prop="供方批号"
  549. label="供方批号"
  550. width="180"
  551. />
  552. <el-table-column
  553. prop="制造日期"
  554. label="制造日期"
  555. width="180"
  556. />
  557. <el-table-column
  558. prop="印数"
  559. label="印数"
  560. width="180"
  561. />
  562. <el-table-column
  563. prop="印版类别"
  564. label="印版类别"
  565. width="180"
  566. />
  567. <el-table-column
  568. prop="客户编号"
  569. label="客户编号"
  570. width="180"
  571. />
  572. <el-table-column
  573. prop="客户名称"
  574. label="客户名称"
  575. width="180"
  576. />
  577. <el-table-column
  578. prop="产品编号"
  579. label="产品编号"
  580. width="180"
  581. />
  582. <el-table-column
  583. prop="产品名称"
  584. label="产品名称"
  585. width="180"
  586. />
  587. <el-table-column
  588. prop="点检方法"
  589. label="备注说明"
  590. width="180"
  591. />
  592. <el-table-column
  593. prop="点检方法"
  594. label="备注说明"
  595. width="180"
  596. />
  597. </el-table>
  598. </div>
  599. </div>
  600. </el-dialog>
  601. <el-dialog
  602. v-model="xunchaVisible"
  603. title="管理人员现场巡查记录"
  604. destroy-on-close
  605. width="1300px"
  606. style="height: 65%;"
  607. >
  608. <div style="display: flex;">
  609. <div style="flex: 1;">
  610. <el-aside width="250px" style="margin: 0;">
  611. <div class="JKWTree-tree" style="height: 100%; border-right: 1px solid #ebeef5;">
  612. <el-tree :data="xunchatreeData" :props="defaultProps" highlight-current="true"
  613. @node-click="xunchaNodeClick"></el-tree>
  614. </div>
  615. </el-aside>
  616. </div>
  617. <div style="flex: 1; margin: 0;">
  618. <el-table
  619. tooltip-effect="dark"
  620. :data="xunchaselectData"
  621. row-key="ID"
  622. highlight-current-row="true"
  623. border @row-click="dianjianhandle"
  624. style="width:1000px; height:400px;"
  625. @row-dblclick="handleSelectClick"
  626. :row-class-name="rowClassName"
  627. :show-overflow-tooltip="true"
  628. >
  629. <el-table-column
  630. prop="工单编号"
  631. label="工序编号"
  632. width="85"
  633. />
  634. <el-table-column
  635. prop="印件号"
  636. label="印件号"
  637. width="70"
  638. />
  639. <el-table-column
  640. prop="工序名称"
  641. label="工序名称"
  642. width="180"
  643. />
  644. <el-table-column
  645. prop="流程单号"
  646. label="流程单号"
  647. width="85"
  648. />
  649. <el-table-column
  650. prop="设备编号"
  651. label="设备编号"
  652. width="85"
  653. />
  654. <el-table-column
  655. prop="班组编号"
  656. label="班组编号"
  657. width="85"
  658. />
  659. <el-table-column
  660. prop="检验备注"
  661. label="检验备注"
  662. width="85"
  663. />
  664. <el-table-column
  665. prop="现场管理人员"
  666. label="现场管理人员"
  667. width="145"
  668. />
  669. <el-table-column
  670. prop="提交时间"
  671. label="提交时间"
  672. width="160"
  673. />
  674. <el-table-column
  675. prop="开工时间"
  676. label="开工时间"
  677. width="160"
  678. />
  679. <el-table-column
  680. prop="分钟差数"
  681. label="分钟差数"
  682. width="85"
  683. />
  684. <el-table-column
  685. prop="归属时段"
  686. label="归属时段"
  687. width="160"
  688. />
  689. </el-table>
  690. </div>
  691. </div>
  692. <template #footer>
  693. <div class="dialog-footer">
  694. <!-- <el-button @click="closeDialog">关 闭</el-button> -->
  695. <!-- <el-button type="primary" @click="xunjianerDialog">提 交</el-button> -->
  696. </div>
  697. </template>
  698. </el-dialog>
  699. <el-dialog
  700. v-model="zhichengVisible"
  701. title="制程检验记录"
  702. destroy-on-close
  703. width="1100px"
  704. style="height: 78%;"
  705. >
  706. <el-row :gutter="24" style="margin-top=0px; margin-bottom: 1px;">
  707. <el-col :span="4" style="margin-top=0px; margin-bottom: 0px;">
  708. <el-form-item label="工单编号" prop="id" style="margin-top=0px; margin-bottom: 0px;">
  709. <el-input v-model="xunchaData.order" :clearable="true" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  710. </el-form-item>
  711. </el-col>
  712. <el-col :span="9" style="margin-top=0px; margin-bottom: 0px;">
  713. <el-row style="margin-top=0px; margin-bottom: 0px;">
  714. <el-col style="margin-top=0px; margin-bottom: 0px;">
  715. <el-input v-model="xunchaData.product_name" :clearable="true" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  716. </el-col>
  717. </el-row>
  718. </el-col>
  719. <el-col :span="4" style="margin-top=0px; margin-bottom: 0px;">
  720. <el-form-item label="流程单" prop="id" style="margin-top=0px; margin-bottom: 0px;">
  721. <el-input v-model="xunchaData.lcdh" :clearable="true" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  722. </el-form-item>
  723. </el-col>
  724. </el-row>
  725. <el-row :gutter="24" style="margin-top=0px; margin-bottom: 1px;">
  726. <el-col :span="3" style="margin-top=0px; margin-bottom: 0px;">
  727. <el-form-item label="印件编号" prop="id" style="margin-top=0px; margin-bottom: 0px;">
  728. <el-input v-model="xunchaData.yjno" :clearable="true" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  729. </el-form-item>
  730. </el-col>
  731. <el-col :span="10" style="margin-top=0px; margin-bottom: 0px;">
  732. <el-row style="margin-top=0px; margin-bottom: 0px;">
  733. <el-col style="margin-top=0px; margin-bottom: 0px;">
  734. <el-input v-model="xunchaData.gxmc" :clearable="true" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  735. </el-col>
  736. </el-row>
  737. </el-col>
  738. </el-row>
  739. <div style="display: flex;">
  740. <div style="flex: 0.1;">
  741. <el-aside width="180px" style="margin: 0;">
  742. <div class="JKWTree-tree" style="height: 100%; border-right: 1px solid #ebeef5;">
  743. <el-tree :data="zhichengtreeData" :props="defaultProps" highlight-current="true"
  744. @node-click="zhichengNodeClick"></el-tree>
  745. </div>
  746. </el-aside>
  747. </div>
  748. <div v-if="zhichengstatus" style="flex: 0; margin: 0;">
  749. <el-tabs v-model="activNames" type="card" @tab-click="handleClick">
  750. <el-tab-pane label="指标检验" @click="showTable('指标检验')" name="first">
  751. <el-table
  752. tooltip-effect="dark"
  753. :data="zhibiaoselectData"
  754. row-key="ID"
  755. highlight-current-row="true"
  756. :show-overflow-tooltip="true"
  757. border
  758. style="width:100%; height:310px;"
  759. :row-class-name="rowClassName">
  760. <el-table-column prop="检验项目" label="检验项目" width="270" />
  761. <el-table-column label="不检测" width="70">
  762. <template v-slot="scope">
  763. <el-radio v-model="scope.row.selected" label="不检测">
  764. <span style="visibility: hidden;">不检测</span>
  765. </el-radio>
  766. </template>
  767. </el-table-column>
  768. <el-table-column label="合格" width="60">
  769. <template v-slot="scope">
  770. <el-radio v-model="scope.row.selected" label="合格">
  771. <span style="visibility: hidden;">合格</span>
  772. </el-radio>
  773. </template>
  774. </el-table-column>
  775. <el-table-column label="不合格" width="70">
  776. <template v-slot="scope">
  777. <el-radio v-model="scope.row.selected" label="不合格">
  778. <span style="visibility: hidden;">不合格</span>
  779. </el-radio>
  780. </template>
  781. </el-table-column>
  782. <el-table-column prop="检测方法" label="检测方法" width="90" />
  783. <el-table-column prop="检验频率" label="检验频率" width="150" />
  784. <el-table-column prop="相关标准" label="相关标准" width="180" />
  785. </el-table>
  786. </el-tab-pane>
  787. <el-tab-pane label="附加检验记录" @click="showTable('附加检验记录')" name="second">
  788. <el-table
  789. tooltip-effect="dark"
  790. :data="fujiaselectData"
  791. row-key="ID"
  792. highlight-current-row="true"
  793. :show-overflow-tooltip="true"
  794. border @row-click="dianjianhandle"
  795. style="width:100%; height:320px;"
  796. @row-dblclick="handleSelectClick"
  797. :row-class-name="rowClassName">
  798. <el-table-column v-slot="scope" label="不检测" width="75">
  799. <el-checkbox v-model="scope.row.notjc"></el-checkbox>
  800. </el-table-column>
  801. <!-- 缺陷及记录列,转换为输入框 -->
  802. <el-table-column label="缺陷及记录" width="720">
  803. <template #default="scope">
  804. <el-input v-model="scope.row['缺陷备注']" placeholder="请输入缺陷及记录"></el-input>
  805. </template>
  806. </el-table-column>
  807. <!-- <el-table-column prop="缺陷备注" label="缺陷及记录" width="720"/> -->
  808. <el-table-column prop="编号" label="编号" width="80"/>
  809. </el-table>
  810. </el-tab-pane>
  811. </el-tabs>
  812. </div>
  813. </div>
  814. <template #footer>
  815. <div v-if="zhichengstatus" class="dialog-footer">
  816. <el-button @click="closezhichengDialog">关 闭</el-button>
  817. <el-button type="primary" @click="zhichengDialog">提 交</el-button>
  818. </div>
  819. </template>
  820. </el-dialog>
  821. <div v-if="dateOn" >
  822. <el-tabs v-model="activName" type="card" @tab-click="handleClick">
  823. <el-tab-pane label="当日上报产量" @click="showTable('当日上报产量')" name="first">
  824. <!-- 非JP机台 -->
  825. <el-table ref="multipleTable"
  826. v-if="! isJPJT"
  827. :show-overflow-tooltip="true"
  828. @selection-change="selectionChange($event)"
  829. :row-style="{ height: '20px' }"
  830. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  831. :header-cell-style="{ padding: '0px' }" @row-click="getUid"
  832. highlight-current-row="true" @row-dblclick="gytableDatadoubleClick"
  833. style="width: 100%;height: 70vh" border tooltip-effect="dark" :data="gytableData" row-key="ID" >
  834. <el-table-column type="selection" width="55" />
  835. <!-- <el-table-column align="left" label="选择" prop="工单编号" width="100"/> -->
  836. <el-table-column fixed align="left" label="产品名称" prop="产品名称" width="200"/>
  837. <el-table-column fixed align="left" label="工序" prop="工序" width="100"/>
  838. <el-table-column fixed align="left" label="产量" prop="产量" width="70"/>
  839. <el-table-column align="left" label="千件工价" prop="千件工价" width="85"/>
  840. <el-table-column align="left" label="日定额" prop="日定额" width="85"/>
  841. <el-table-column align="left" label="补产标准" prop="补产标准" width="85"/>
  842. <el-table-column align="left" label="难度系数" prop="难度系数" width="85"/>
  843. <el-table-column align="left" label="印刷方式" prop="印刷方式" width="85"/>
  844. <el-table-column align="left" label="备注" prop="备注" width="100"/>
  845. <el-table-column align="left" label="组员1" prop="组员1" width="170" />
  846. <el-table-column align="left" label="组员2" prop="组员2" width="170" />
  847. <el-table-column align="left" label="组员3" prop="组员3" width="170" />
  848. <el-table-column align="left" label="组员4" prop="组员4" width="170" />
  849. <el-table-column align="left" label="组员5" prop="组员5" width="70" />
  850. <el-table-column align="left" label="组员6" prop="组员6" width="70" />
  851. <el-table-column align="left" label="组员7" prop="组员7" width="70" />
  852. <el-table-column align="left" label="组员8" prop="组员8" width="70" />
  853. <el-table-column align="left" label="组员9" prop="组员9" width="70" />
  854. <el-table-column align="left" label="组员10" prop="组员10" width="70" />
  855. <el-table-column align="left" label="制程废品" prop="制程废品" width="85" />
  856. <el-table-column align="left" label="制程次品" prop="制程次品" width="85" />
  857. <el-table-column align="left" label="前工序废" prop="前工序废" width="85" />
  858. <el-table-column align="left" label="来料异常" prop="来料异常" width="85"/>
  859. <el-table-column align="left" label="装版工时" prop="装版工时" width="85" />
  860. <el-table-column align="left" label="保养工时" prop="保养工时" width="85" />
  861. <el-table-column align="left" label="打样工时" prop="打样工时" width="85"/>
  862. <el-table-column align="left" label="异常总工时" prop="异常总工时" width="85"/>
  863. <el-table-column align="left" label="异常补时" prop="异常补时" width="85"/>
  864. <el-table-column align="left" label="异常类型" prop="异常类型" width="110"/>
  865. <el-table-column align="left" label="通电工时" prop="通电工时" width="85"/>
  866. <el-table-column align="left" label="码开始行" prop="码开始行" width="85" />
  867. <el-table-column align="left" label="码结束行" prop="码结束行" width="85" />
  868. <el-table-column align="left" label="码包" prop="码包" width="70" />
  869. <el-table-column align="left" label="主电表" prop="主电表" width="70"/>
  870. <el-table-column align="left" label="辅电表" prop="辅电表" width="70" />
  871. <el-table-column align="left" label="色度数" prop="色度数" width="70" />
  872. <el-table-column align="left" label="用户" prop="用户" width="210" />
  873. <el-table-column align="left" label="更新时间" prop="更新时间" width="160" />
  874. </el-table>
  875. <el-table ref="multipleTable"
  876. v-else
  877. :show-overflow-tooltip="true"
  878. @selection-change="selectionChange($event)"
  879. :row-style="{ height: '20px' }"
  880. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  881. :header-cell-style="{ padding: '0px' }" @row-click="getUid"
  882. highlight-current-row="true" @row-dblclick="JPgytableDatadoubleClick"
  883. style="width: 100%;height: 70vh" border tooltip-effect="dark" :data="JPgytableData" row-key="ID" >
  884. <el-table-column type="selection" width="55" />
  885. <el-table-column fixed align="left" label="工单编号" prop="工单编号" width="130"/>
  886. <el-table-column align="left" label="印件号" prop="yjno" width="115"/>
  887. <el-table-column align="left" label="产品名称" prop="产品名称" width="200"/>
  888. <el-table-column align="left" label="工序名称" prop="gxmc" width="200"/>
  889. <el-table-column align="left" label="千件工价" prop="千件工价" width="100"/>
  890. <el-table-column align="left" label="检验类型" prop="检验类型" width="130"/>
  891. <el-table-column align="left" label="计件箱数" prop="计件箱数" width="100"/>
  892. <el-table-column align="left" label="每箱数量" prop="每箱数量" width="100"/>
  893. <el-table-column align="left" label="废品率系数" prop="废品率系数" width="100"/>
  894. <el-table-column align="left" label="班组" prop="bzdh" width="115"/>
  895. <el-table-column align="left" label="换膜补时" prop="换膜补时" width="100"/>
  896. <el-table-column align="left" label="保养工时" prop="保养工时" width="100"/>
  897. <el-table-column align="left" label="异常总工时" prop="异常总工时" width="100"/>
  898. <el-table-column align="left" label="通电工时" prop="通电工时" width="100"/>
  899. <el-table-column align="left" label="难度系数" prop="难度系数" width="100"/>
  900. <el-table-column align="left" label="定额代号" prop="定额代号" width="100"/>
  901. <el-table-column align="left" label="千件工价" prop="千件工价" width="100"/>
  902. <el-table-column align="left" label="日定额" prop="日定额" width="100"/>
  903. <el-table-column align="left" label="补产标准" prop="补产标准" width="100"/>
  904. <el-table-column align="left" label="工序" prop="工序" width="100"/>
  905. <el-table-column align="left" label="组员1" prop="组员1" width="100"/>
  906. <el-table-column align="left" label="组员2" prop="组员2" width="100"/>
  907. <el-table-column align="left" label="更新时间" prop="更新时间" width="160"/>
  908. </el-table>
  909. </el-tab-pane>
  910. <el-tab-pane label="当日制程检验记录" @click="showTable('印件资料')" name="second">
  911. <el-table ref="multipleTable"
  912. :row-style="{ height: '20px' }"
  913. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  914. :header-cell-style="{ padding: '0px' }"
  915. :show-overflow-tooltip="true"
  916. highlight-current-row="true"
  917. style="width: 100%;height: 70vh" border tooltip-effect="dark" :data="drzcDatas" row-key="ID" @selection-change="handleSelectionChange">
  918. <el-table-column type="selection" width="55" />
  919. <el-table-column align="left" label="工单编号" prop="工单编号" width="85"/>
  920. <el-table-column align="left" label="印件号" prop="印件号" width="70" />
  921. <el-table-column align="left" label="工序名称" prop="工序名称" width="85" />
  922. <el-table-column align="left" label="检验项目" prop="检验项目" width="85"/>
  923. <el-table-column
  924. v-for="time in columnNames"
  925. :key="time"
  926. :label="time"
  927. :prop="time"
  928. align="center"
  929. width="80"
  930. ></el-table-column>
  931. </el-table>
  932. </el-tab-pane>
  933. </el-tabs>
  934. </div>
  935. <el-dialog v-model="complaintsShow" style="width: 1000px" lock-scroll :before-close="closecomplaintsShow" title="=客诉记录" destroy-on-close>
  936. <el-table ref="multipleTable"
  937. :row-style="{ height: '20px' }"
  938. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  939. :header-cell-style="{ padding: '0px' }"
  940. :show-overflow-tooltip="true"
  941. highlight-current-row="true" @row-click="complaintshandle"
  942. style="width: 100%;height: 250px;margin-top: 0px;" border tooltip-effect="dark"
  943. :data="complaintsData" row-key="ID" @selection-change="complaintsSelectionChange">
  944. <!-- <el-table-column type="selection" width="55" /> -->
  945. <el-table-column align="left" label="产品编号" prop="产品编号" width="120"/>
  946. <el-table-column align="left" label="产品名称" prop="产品名称" width="200"/>
  947. <el-table-column align="left" label="客诉日期" prop="客诉日期" width="120"/>
  948. <el-table-column align="left" label="客诉单号" prop="客诉单号" width="120"/>
  949. <el-table-column align="left" label="客诉方式" prop="客诉方式" width="100"/>
  950. <el-table-column align="left" label="订单编号" prop="订单编号" width="100"/>
  951. <el-table-column align="left" label="缺陷关键字" prop="缺陷关键字" width="140"/>
  952. <el-table-column align="left" label="客诉性质" prop="客诉性质" width="100"/>
  953. <el-table-column align="left" label="主要责任部门" prop="主要责任部门" width="140"/>
  954. <el-table-column align="left" label="次要责任部门" prop="次要责任部门" width="140"/>
  955. </el-table>
  956. <el-row :gutter="20">
  957. <el-col :span="6">
  958. <el-form-item label="客户编号" prop="id">
  959. <el-input v-model="selectedRowData.客户编号" :clearable="true" placeholder="" />
  960. </el-form-item>
  961. </el-col>
  962. <el-col :span="15">
  963. <el-form-item label="客户名称" prop="id">
  964. <el-input v-model="selectedRowData.客户名称" :clearable="true" placeholder="" />
  965. </el-form-item>
  966. </el-col>
  967. </el-row>
  968. <el-row :gutter="20">
  969. <el-col :span="6">
  970. <el-form-item label="客诉单号" prop="id">
  971. <el-input v-model="selectedRowData.客诉单号" :clearable="true" placeholder="" />
  972. </el-form-item>
  973. </el-col>
  974. <el-col :span="5">
  975. <el-form-item label="客诉日期" prop="id">
  976. <el-input v-model="selectedRowData.客诉日期" :clearable="true" placeholder="" />
  977. </el-form-item>
  978. </el-col>
  979. <el-col :span="5">
  980. <el-form-item label="方式" prop="id">
  981. <el-input v-model="selectedRowData.客诉方式" :clearable="true" placeholder="" />
  982. </el-form-item>
  983. </el-col>
  984. <el-col :span="5">
  985. <el-form-item label="批次号" prop="id">
  986. <el-input v-model="selectedRowData.订单编号" :clearable="true" placeholder="" />
  987. </el-form-item>
  988. </el-col>
  989. </el-row>
  990. <el-row :gutter="20">
  991. <el-col :span="20">
  992. <el-form-item label="反馈问题" prop="id">
  993. <el-input v-model="selectedRowData.客诉描述" :clearable="true" placeholder="" />
  994. </el-form-item>
  995. </el-col>
  996. </el-row>
  997. <el-row :gutter="20">
  998. <el-col :span="20">
  999. <el-form-item label="缺陷关键字" prop="id">
  1000. <el-input v-model="selectedRowData.缺陷关键字" :clearable="true" placeholder="" />
  1001. </el-form-item>
  1002. </el-col>
  1003. </el-row>
  1004. <el-row :gutter="20">
  1005. <el-col :span="5">
  1006. <el-form-item label="性质" prop="id">
  1007. <el-input v-model="selectedRowData.客诉性质" :clearable="true" placeholder="" />
  1008. </el-form-item>
  1009. </el-col>
  1010. <el-col :span="5">
  1011. <el-form-item label="扣分" prop="id">
  1012. <el-input v-model="selectedRowData.扣分" :clearable="true" placeholder="" />
  1013. </el-form-item>
  1014. </el-col>
  1015. </el-row>
  1016. <div style="display: flex;">
  1017. </div>
  1018. </el-dialog>
  1019. <el-dialog
  1020. v-model="huanxingVisible"
  1021. title="换型清场"
  1022. destroy-on-close
  1023. width="145vh"
  1024. style="height: 78vh;"
  1025. :before-close="closehuanxingVisible"
  1026. >
  1027. <div style="display: flex;">
  1028. <div style="flex: 0.1;">
  1029. <el-aside width="26vh" style="margin: 0;">
  1030. <div class="JKWTree-tree" style="height: 60vh; border-right: 1px solid #ebeef5;">
  1031. <el-tree :data="huanxingtreeData" :props="defaultProps" highlight-current="true"
  1032. @node-click="huanxingNodeClick"></el-tree>
  1033. </div>
  1034. </el-aside>
  1035. </div>
  1036. <div v-if="huanxingstatus" style="flex: 0; margin: 0;">
  1037. <el-tabs v-model="activNames" type="card" @tab-click="handleClick">
  1038. <el-tab-pane label="换型清场明细信息" @click="showTable('换型清场明细信息')" name="first">
  1039. <div style="width:110vh">
  1040. <el-descriptions :column="9" border>
  1041. <el-descriptions-item :span="9">
  1042. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  1043. <el-col :span="6" style="margin-bottom: 0px;margin-top: 0px;">
  1044. <el-form-item label="日期:" prop="id" style="margin-top=0px; margin-bottom: 0px;">
  1045. <el-input v-model="huanxingData.日期" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  1046. </el-form-item>
  1047. </el-col>
  1048. <el-col :span="2" style="margin-bottom: 0px;margin-top: 0px;">
  1049. </el-col>
  1050. <el-col :span="6" style="margin-bottom: 0px;margin-top: 0px;">
  1051. <el-form-item label="机台编号:" prop="id" style="margin-top=0px; margin-bottom: 0px;">
  1052. <el-input v-model="huanxingData.机台编号" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  1053. </el-form-item>
  1054. </el-col>
  1055. <el-col :span="1" style="margin-bottom: 0px;margin-top: 0px;">
  1056. </el-col>
  1057. <el-col :span="6" style="margin-bottom: 0px;margin-top: 0px;">
  1058. <el-form-item label="班组:" prop="id" style="margin-top=0px; margin-bottom: 0px;">
  1059. <el-input v-model="huanxingData.班组" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  1060. </el-form-item>
  1061. </el-col>
  1062. </el-row>
  1063. </el-descriptions-item>
  1064. <el-descriptions-item label="清场原因 从" :span="9">
  1065. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  1066. <el-col :span="8" style="margin-bottom: 0px;margin-top: 0px;">
  1067. <el-form-item label="工单编号:" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1068. <el-input v-model="huanxingData.工单编号A" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1069. </el-form-item>
  1070. </el-col>
  1071. <el-col :span="16" style="margin-bottom: 0px;margin-top: 0px;">
  1072. <el-form-item label="印件名称:" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1073. <el-input v-model="huanxingData.印件名称A" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1074. </el-form-item>
  1075. </el-col>
  1076. </el-row>
  1077. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  1078. <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
  1079. <el-form-item label="印件工序:" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1080. <el-input v-model="huanxingData.印件工序A" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1081. </el-form-item>
  1082. </el-col>
  1083. <el-col :span="6" style="margin-bottom: 0px;margin-top: 0px;">
  1084. </el-col>
  1085. <el-col :span="6" style="margin-bottom: 0px;margin-top: 0px;">
  1086. <el-form-item label="码包号" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1087. <el-input v-model="huanxingData.码包号A" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1088. </el-form-item>
  1089. </el-col>
  1090. </el-row>
  1091. </el-descriptions-item>
  1092. <el-descriptions-item label="清场原因 到" :span="9">
  1093. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  1094. <el-col :span="8" style="margin-bottom: 0px;margin-top: 0px;">
  1095. <el-form-item label="工单编号:" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1096. <el-input v-model="huanxingData.工单编号B" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1097. </el-form-item>
  1098. </el-col>
  1099. <el-col :span="16" style="margin-bottom: 0px;margin-top: 0px;">
  1100. <el-form-item label="印件名称:" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1101. <el-input v-model="huanxingData.印件名称B" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1102. </el-form-item>
  1103. </el-col>
  1104. </el-row>
  1105. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  1106. <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
  1107. <el-form-item label="印件工序:" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1108. <el-input v-model="huanxingData.印件工序B" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1109. </el-form-item>
  1110. </el-col>
  1111. <el-col :span="6" style="margin-bottom: 0px;margin-top: 0px;">
  1112. </el-col>
  1113. <el-col :span="6" style="margin-bottom: 0px;margin-top: 0px;">
  1114. <el-form-item label="码包号" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1115. <el-input v-model="huanxingData.码包B" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1116. </el-form-item>
  1117. </el-col>
  1118. </el-row>
  1119. </el-descriptions-item>
  1120. <el-descriptions-item label="清场确认项目" :span="9">
  1121. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  1122. <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
  1123. <el-form-item label="菲林_标样_签样品_留样品" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1124. <el-checkbox v-model="huanxingData.项目1"></el-checkbox>
  1125. </el-form-item>
  1126. </el-col>
  1127. <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
  1128. <el-form-item label="版材_纸张_电化铝_油墨" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1129. <el-checkbox v-model="huanxingData.项目2"></el-checkbox>
  1130. </el-form-item>
  1131. </el-col>
  1132. </el-row>
  1133. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  1134. <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
  1135. <el-form-item label="过版纸_废品_次品" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1136. <el-checkbox v-model="huanxingData.项目3"></el-checkbox>
  1137. </el-form-item>
  1138. </el-col>
  1139. <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
  1140. <el-form-item label="半成品_成品_零头" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1141. <el-checkbox v-model="huanxingData.项目4"></el-checkbox>
  1142. </el-form-item>
  1143. </el-col>
  1144. </el-row>
  1145. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  1146. <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
  1147. <el-form-item label="操作台桌面_抽屉_地面" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1148. <el-checkbox v-model="huanxingData.项目5"></el-checkbox>
  1149. </el-form-item>
  1150. </el-col>
  1151. </el-row>
  1152. </el-descriptions-item>
  1153. <el-descriptions-item label="清场确认人" :span="9">
  1154. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  1155. <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
  1156. <el-form-item label="机长签字" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1157. <el-input v-model="huanxingData.机长" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1158. </el-form-item>
  1159. </el-col>
  1160. </el-row>
  1161. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  1162. <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
  1163. <el-form-item label="带班主管签字" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1164. <el-input v-model="huanxingData.班长" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1165. </el-form-item>
  1166. </el-col>
  1167. <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
  1168. <el-form-item label="质量巡查员签字" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1169. <el-input v-model="huanxingData.质量巡查员" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1170. </el-form-item>
  1171. </el-col>
  1172. </el-row>
  1173. </el-descriptions-item>
  1174. </el-descriptions>
  1175. </div>
  1176. </el-tab-pane>
  1177. <el-tab-pane label="当前设备换型记录" @click="showTable('当前设备换型记录')" name="second">
  1178. <el-table
  1179. tooltip-effect="dark"
  1180. :data="huanxingselectData"
  1181. row-key="ID"
  1182. highlight-current-row="true"
  1183. :show-overflow-tooltip="true"
  1184. border @row-click="dianjianhandle"
  1185. style="width:115vh; height:50vh;"
  1186. @row-dblclick="handleSelectClick"
  1187. :row-class-name="rowClassName"
  1188. >
  1189. <el-table-column
  1190. prop="日期"
  1191. label="日期"
  1192. width="160"
  1193. />
  1194. <el-table-column
  1195. prop="机台编号"
  1196. label="机台编号"
  1197. width="90"
  1198. />
  1199. <el-table-column
  1200. prop="班组"
  1201. label="班组"
  1202. width="70"
  1203. />
  1204. <el-table-column
  1205. prop="工单编号A"
  1206. label="工单编号A"
  1207. width="95"
  1208. />
  1209. <el-table-column
  1210. prop="印件名称A"
  1211. label="印件名称A"
  1212. width="130"
  1213. />
  1214. <el-table-column
  1215. prop="印件工序A"
  1216. label="印件工序A"
  1217. width="150"
  1218. />
  1219. <el-table-column
  1220. prop="码包号A"
  1221. label="码包号A"
  1222. width="80"
  1223. />
  1224. <el-table-column
  1225. prop="工单编号B"
  1226. label="工单编号B"
  1227. width="100"
  1228. />
  1229. <el-table-column
  1230. prop="印件名称B"
  1231. label="印件名称B"
  1232. width="100"
  1233. />
  1234. <el-table-column
  1235. prop="印件工序B"
  1236. label="印件工序B"
  1237. width="150"
  1238. />
  1239. <el-table-column
  1240. prop="码包号B"
  1241. label="码包号B"
  1242. width="80"
  1243. />
  1244. <el-table-column
  1245. prop="清场项目A"
  1246. label="菲林_标样_签样品_留样品"
  1247. width="190"
  1248. />
  1249. <el-table-column
  1250. prop="清场项目B"
  1251. label="版材_纸张_电化铝_油墨"
  1252. width="190"
  1253. />
  1254. <el-table-column
  1255. prop="清场项目C"
  1256. label="过版纸_废品_次品"
  1257. width="170"
  1258. />
  1259. <el-table-column
  1260. prop="清场项目D"
  1261. label="半成品_成品_零头"
  1262. width="170"
  1263. />
  1264. <el-table-column
  1265. prop="清场项目E"
  1266. label="操作台桌面_抽屉_地面"
  1267. width="180"
  1268. />
  1269. <el-table-column
  1270. prop="机长"
  1271. label="机长"
  1272. width="80"
  1273. />
  1274. <el-table-column
  1275. prop="班长"
  1276. label="带班长"
  1277. width="80"
  1278. />
  1279. <el-table-column
  1280. prop="质量巡查员"
  1281. label="质量巡查员"
  1282. width="100"
  1283. />
  1284. <el-table-column
  1285. prop="创建时间"
  1286. label="创建时间"
  1287. width="120"
  1288. />
  1289. <el-table-column
  1290. prop="UNIQID"
  1291. label="UNIQID"
  1292. width="80"
  1293. />
  1294. </el-table>
  1295. </el-tab-pane>
  1296. </el-tabs>
  1297. </div>
  1298. </div>
  1299. </el-dialog>
  1300. <el-dialog v-model="chanliangVisible" destroy-on-close
  1301. width="70%" style="height: 110vh;" :before-close="closechanliangVisible" :title="type2 === 'create' ? '新增' : '修改'">
  1302. <el-row :gutter="24">
  1303. <el-col :span="6">
  1304. <el-form-item label="工单编号:" prop="flatFeed" class="mab">
  1305. <el-input v-model="formdata3.value.工单编号" id="工单编号" @blur="getCPMCsubmit()" @keydown="ent1($event)" :clearable="true" />
  1306. </el-form-item>
  1307. </el-col>
  1308. <el-col :span="18">
  1309. <el-form-item label="产品名称:" prop="perTenThousand" class="mab" label-width="150">
  1310. <el-input v-model="formdata3.value.cpmc" id="产品名称" @keydown="ent1($event)" :clearable="true" />
  1311. </el-form-item>
  1312. </el-col>
  1313. </el-row>
  1314. <el-row :gutter="24">
  1315. <el-col :span="6">
  1316. <el-form-item label="印件号:" prop="flatFeed" class="mab">
  1317. <el-input v-model="formdata3.value.yjno" id="印件号" @keydown="ent1($event)" :clearable="true" />
  1318. </el-form-item>
  1319. </el-col>
  1320. <el-col :span="18">
  1321. <el-form-item label="印件名称:" prop="perTenThousand" class="mab" label-width="150">
  1322. <el-input v-model="formdata3.value.yjmc" id="印件名称" @keydown="ent1($event)" :clearable="true" />
  1323. </el-form-item>
  1324. </el-col>
  1325. </el-row>
  1326. <el-row :gutter="24">
  1327. <el-col :span="14">
  1328. <el-form-item label="工序名称:" prop="flatFeed" class="mab">
  1329. <el-input v-model="formdata3.value.gxmc" id="工序名称" @focus="gxmcHandleFocus()" @blur="getGXsubmit()" @keydown="ent1($event)" :clearable="true" style="width: 350px;" />
  1330. <el-input v-model="formdata3.value.gxh" id="工序号" :readonly=true :clearable="true" style="width: 50px; margin-left: 10px;" />
  1331. </el-form-item>
  1332. </el-col>
  1333. <el-col :span="10">
  1334. <el-form-item label="工艺名称:" prop="perTenThousand" class="mab">
  1335. <el-input v-model="formdata3.value.gymc" id="工艺名称" @keydown="ent1($event)" :readonly=true :clearable="true" style="width: 200px;" />
  1336. </el-form-item>
  1337. </el-col>
  1338. </el-row>
  1339. <el-row :gutter="24">
  1340. <el-col :span="6">
  1341. <el-form-item label="日期:" prop="flatFeed" class="mab">
  1342. <el-date-picker v-model="formdata3.value.rq" type="datetime" format="YYYY/MM/DD" value-format="YYYY-MM-DD" @keydown="ent1($event)"/>
  1343. </el-form-item>
  1344. </el-col>
  1345. <el-col :span="6">
  1346. <el-form-item label="机器:" class="mab" prop="remark">
  1347. <el-select v-model="formdata3.value.sczl_jtbh"
  1348. id="机器" @keydown="ent1($event)" @change="jtbh_change()"
  1349. style="flex: 1; height: auto; width: 100px;">
  1350. <el-option
  1351. v-for="(item, index) in gdzl_MachineList_address.data"
  1352. :key="index"
  1353. :label="item.split('-->')[0].trim()"
  1354. :value="item.split('-->')[0].trim()">
  1355. {{ item }}
  1356. </el-option>
  1357. </el-select>
  1358. </el-form-item>
  1359. <!-- <el-form-item label="机器:" prop="flatFeed" class="mab">
  1360. <el-input v-model="formdata3.value.sczl_jtbh" id="机器" @keydown="ent1($event)" @blur="getJtbhsubmit()" :clearable="true" style="width: 100px;" />
  1361. </el-form-item> -->
  1362. </el-col>
  1363. <el-col :span="7">
  1364. <el-form-item label="开工时间:" prop="flatFeed" class="mab">
  1365. <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)" />
  1366. </el-form-item>
  1367. </el-col>
  1368. <el-col :span="5" style="margin-top=0px; margin-bottom: 1px;">
  1369. <el-form-item label="流程单号" prop="id" style="margin-top=0px; margin-bottom: 1px;">
  1370. <el-input v-model="formdata3.value.num" id="流程单号" style="margin-top=0px; margin-bottom: 1px;" @keydown="ent1($event)" placeholder="" />
  1371. </el-form-item>
  1372. </el-col>
  1373. </el-row>
  1374. <el-row :gutter="24">
  1375. <el-col :span="9">
  1376. <el-form-item label="上机时间:" prop="flatFeed" class="mab">
  1377. <!-- <el-input v-model="formdata3.value.sj1" id="日期" @keydown="ent1($event)" :clearable="true" style="width: 170px;" /> -->
  1378. <el-date-picker
  1379. v-model="formdata3.value.sj1"
  1380. type="datetime"
  1381. format="YYYY/MM/DD hh:mm:ss"
  1382. value-format="YYYY-MM-DD h:m:s"
  1383. @keydown="ent1($event)"
  1384. />
  1385. </el-form-item>
  1386. </el-col>
  1387. <el-col :span="6">
  1388. <el-form-item label="下机时间:" prop="flatFeed" class="mab">
  1389. <!-- <el-input v-model="formdata3.value.sj2" id="机器" @keydown="ent1($event)" :clearable="true" style="width: 170px;" /> -->
  1390. <el-date-picker
  1391. v-model="formdata3.value.sj2"
  1392. type="datetime"
  1393. format="YYYY/MM/DD hh:mm:ss"
  1394. value-format="YYYY-MM-DD h:m:s"
  1395. @keydown="ent1($event)"
  1396. />
  1397. </el-form-item>
  1398. </el-col>
  1399. </el-row>
  1400. <el-row :gutter="24">
  1401. <el-col :span="6">
  1402. <el-form-item label="墨色:" prop="flatFeed" class="mab">
  1403. <el-input v-model="formdata3.value.色度数" id="墨色" @keydown="ent1($event)" :clearable="true" style="width: 200px;" />
  1404. </el-form-item>
  1405. </el-col>
  1406. <el-col :span="8">
  1407. <el-form-item label="加工联数:" prop="flatFeed" class="mab" >
  1408. <el-input v-model="formdata3.value.联数" id="加工联数" @keydown="ent1($event)" :clearable="true" style="width: 100px; margin-right: 30px;" />
  1409. </el-form-item>
  1410. </el-col>
  1411. <el-col :span="5">
  1412. <el-form-item label="产量:" prop="flatFeed" class="mab">
  1413. <el-input v-model="formdata3.value.产量" id="产量" @keydown="ent1($event)" :clearable="true" style="width: 200px;" />
  1414. </el-form-item>
  1415. </el-col>
  1416. <el-col :span="5">
  1417. <el-form-item label="制程废品:" prop="flatFeed" class="mab">
  1418. <el-input v-model="formdata3.value.制程废品" id="制程废品" @keydown="ent1($event)" :clearable="true" style="width: 200px;" />
  1419. </el-form-item>
  1420. </el-col>
  1421. </el-row>
  1422. <el-row :gutter="24">
  1423. <el-col :span="4">
  1424. <el-form-item label="制程次品:" prop="flatFeed" class="mab">
  1425. <el-input v-model="formdata3.value.制程次品" id="制程次品" @keydown="ent1($event)" :clearable="true" style="width: 200px;" />
  1426. </el-form-item>
  1427. </el-col>
  1428. <el-col :span="4">
  1429. <el-form-item label="前工序废:" prop="flatFeed" class="mab" >
  1430. <el-input v-model="formdata3.value.前工序废" id="前工序废" @keydown="ent1($event)" :clearable="true" style="width: 100px; margin-right: 30px;" />
  1431. </el-form-item>
  1432. </el-col>
  1433. <el-col :span="5">
  1434. <el-form-item label="来料异常:" prop="flatFeed" class="mab">
  1435. <el-input v-model="formdata3.value.来料异常" id="来料异常" @keydown="ent1($event)" :clearable="true" style="width: 200px;" />
  1436. </el-form-item>
  1437. </el-col>
  1438. <el-col :span="10">
  1439. <el-form-item label="换型类型:" prop="flatFeed" class="mab">
  1440. <el-input v-model="formdata3.value.换型类型" id="换型类型" disabled :clearable="true" style="width: 200px;" />
  1441. </el-form-item>
  1442. </el-col>
  1443. </el-row>
  1444. <el-row :gutter="30">
  1445. <el-col :span="5">
  1446. <el-form-item label="装版总工时:" prop="flatFeed" class="mab">
  1447. <el-input v-model="formdata3.value.装版工时" id="装版总工时" @keydown="ent1($event)" :clearable="true" style="width: 200px;" />
  1448. </el-form-item>
  1449. </el-col>
  1450. <el-col :span="5">
  1451. <el-form-item label="装版补产工时:" prop="flatFeed" class="mab" >
  1452. <el-input v-model="formdata3.value.装版补产工时" id="装版补产工时" @keydown="ent1($event)" :clearable="true" style="width: 100px; margin-right: 30px;" />
  1453. </el-form-item>
  1454. </el-col>
  1455. <el-col :span="5">
  1456. <el-form-item label="打样总工时:" prop="flatFeed" class="mab">
  1457. <el-input v-model="formdata3.value.打样工时" id="打样工时" @keydown="ent1($event)" :clearable="true" style="width: 200px;" />
  1458. </el-form-item>
  1459. </el-col>
  1460. <el-col :span="5">
  1461. <el-form-item label="打样补产工时:" prop="flatFeed" class="mab">
  1462. <el-input v-model="formdata3.value.打样补产工时" id="打样补产工时" @keydown="ent1($event)" :clearable="true" style="width: 200px;" />
  1463. </el-form-item>
  1464. </el-col>
  1465. <el-col :span="4">
  1466. <el-form-item label="保养工时:" prop="flatFeed" class="mab">
  1467. <el-input v-model="formdata3.value.保养工时" id="保养工时" @keydown="ent1($event)" :clearable="true" style="width: 200px;" />
  1468. </el-form-item>
  1469. </el-col>
  1470. </el-row>
  1471. <el-row :gutter="24">
  1472. <el-col :span="6">
  1473. <el-form-item label="异常总工时:" prop="flatFeed" class="mab">
  1474. <el-input v-model="formdata3.value.异常总工时" id="异常总工时" style="margin-top=0px; margin-bottom: 1px;" @keydown="ent1($event)" placeholder="" />
  1475. </el-form-item>
  1476. </el-col>
  1477. <el-col :span="8">
  1478. <el-form-item label="异常类型:" prop="flatFeed" class="mab">
  1479. <el-input v-model="formdata3.value.异常类型" disabled id="异常类型" :clearable="true" style="width: 100px;" />
  1480. </el-form-item>
  1481. </el-col>
  1482. <el-col :span="5" style="margin-top=0px; margin-bottom: 1px;">
  1483. <el-form-item label="异常补贴工时" prop="id" style="margin-top=0px; margin-bottom: 1px;">
  1484. <el-input v-model="formdata3.value.异常补时" id="异常补贴工时" style="margin-top=0px; margin-bottom: 1px;" @keydown="ent1($event)" placeholder="" />
  1485. </el-form-item>
  1486. </el-col>
  1487. </el-row>
  1488. <el-row :gutter="24">
  1489. <el-col :span="8">
  1490. <el-form-item label="通电时间:" prop="flatFeed" class="mab">
  1491. <el-input v-model="formdata3.value.通电工时" id="通电时间" @keydown="ent1($event)" :clearable="true" style="width: 100px;" />
  1492. </el-form-item>
  1493. </el-col>
  1494. <el-col :span="5" style="margin-top=0px; margin-bottom: 1px;">
  1495. <el-form-item label="定额代号" prop="id" style="margin-top=0px; margin-bottom: 1px;">
  1496. <el-input v-model="formdata3.value.dedh" id="定额代号" style="margin-top=0px; margin-bottom: 1px;" @keydown="ent1($event)" placeholder="" />
  1497. </el-form-item>
  1498. </el-col>
  1499. <el-col :span="3" style="margin-top=0px; margin-bottom: 1px;">
  1500. <el-form-item label="码包" prop="id" style="margin-top=0px; margin-bottom: 1px;">
  1501. <el-input v-model="formdata3.value.码包" id="码包" style="margin-top=0px; margin-bottom: 1px;" @keydown="ent1($event)" placeholder="" />
  1502. </el-form-item>
  1503. </el-col>
  1504. </el-row>
  1505. <el-row :gutter="24">
  1506. <el-col :span="4">
  1507. <el-form-item label="码开始行:" prop="flatFeed" class="mab">
  1508. <el-input v-model="formdata3.value.码开始行" id="码开始行" @keydown="ent1($event)" :clearable="true" style="width: 200px;" />
  1509. </el-form-item>
  1510. </el-col>
  1511. <el-col :span="4">
  1512. <el-form-item label="码结束行:" prop="flatFeed" class="mab" >
  1513. <el-input v-model="formdata3.value.码结束行" id="码结束行" @keydown="ent1($event)" :clearable="true" style="width: 100px; margin-right: 30px;" />
  1514. </el-form-item>
  1515. </el-col>
  1516. <el-col :span="5">
  1517. <el-form-item label="主电表:" prop="flatFeed" class="mab">
  1518. <el-input v-model="formdata3.value.主电表" id="主电表" @keydown="ent1($event)" :clearable="true" style="width: 200px;" />
  1519. </el-form-item>
  1520. </el-col>
  1521. <el-col :span="10">
  1522. <el-form-item label="辅电表:" prop="flatFeed" class="mab">
  1523. <el-input v-model="formdata3.value.辅电表" id="辅电表" @keydown="ent1($event)" :clearable="true" style="width: 200px;" />
  1524. </el-form-item>
  1525. </el-col>
  1526. </el-row>
  1527. <div style="display: flex;">
  1528. <div style="width: 95vh;">组员及分配比例</div>
  1529. <div style="width: 9vh;">特殊组员</div>
  1530. <div>拉料人员</div>
  1531. </div>
  1532. <el-row :gutter="10" style="margin-top: 1vh;">
  1533. <el-col :span="2"><el-input v-model="formdata3.value.bzdh" id="bzdh" @keydown="ent1($event)"/></el-col>
  1534. <el-col :span="2"><el-input v-model="formdata3.value.组员1['编号']" id="bh1" @keyup.enter.native="GetYg($event, '1')"/></el-col>
  1535. <el-col :span="2"><el-input v-model="formdata3.value.组员2['编号']" id="bh2" @keyup.enter.native="GetYg($event, '2')"/></el-col>
  1536. <el-col :span="2"><el-input v-model="formdata3.value.组员3['编号']" id="bh3" @keyup.enter.native="GetYg($event, '3')"/></el-col>
  1537. <el-col :span="2"><el-input v-model="formdata3.value.组员4['编号']" id="bh4" @keyup.enter.native="GetYg($event, '4')"/></el-col>
  1538. <el-col :span="2"><el-input v-model="formdata3.value.组员5['编号']" id="bh5" @keyup.enter.native="GetYg($event, '5')"/></el-col>
  1539. <el-col :span="2"><el-input v-model="formdata3.value.组员6['编号']" id="bh6" @keyup.enter.native="GetYg($event, '6')"/></el-col>
  1540. <el-col :span="2"><el-input v-model="formdata3.value.组员7['编号']" id="bh7" @keyup.enter.native="GetYg($event, '7')"/></el-col>
  1541. <el-col :span="2"><el-input v-model="formdata3.value.组员8['编号']" id="bh8" @keyup.enter.native="GetYg($event, '8')"/></el-col>
  1542. <el-col :span="2"><el-input v-model="formdata3.value.组员9['编号']" id="bh9" @keyup.enter.native="GetYg($event, '9')"/></el-col>
  1543. <el-col :span="2"><el-input v-model="formdata3.value.组员10['编号']" id="bh10" @keyup.enter.native="GetYg($event, '10')"/></el-col>
  1544. <el-col :span="2">
  1545. <el-select v-model="formdata3.value.拉料['编号']" id="bh11" @change="GetLl('create')">
  1546. <el-option label="" value="" />
  1547. <el-option label="李有文" value="李有文" />
  1548. <el-option label="张杭强" value="张杭强" />
  1549. <el-option label="朱喜文" value="朱喜文" />
  1550. <el-option label="刘旭青" value="刘旭青" />
  1551. <el-option label="刘芳民" value="刘芳民" />
  1552. <el-option label="李当林" value="李当林" />
  1553. <el-option label="王赞文" value="王赞文" />
  1554. </el-select>
  1555. <!-- <el-input v-model="formdata3.value.拉料['编号']" id="bh11" @keyup.enter.native="GetYg($event, '11')"/> -->
  1556. </el-col>
  1557. </el-row>
  1558. <el-row :gutter="10" style="margin-top: 10px;">
  1559. <el-col :span="2"></el-col>
  1560. <el-col :span="2"><el-input v-model="formdata3.value.组员1['姓名']" id="name1"/></el-col>
  1561. <el-col :span="2"><el-input v-model="formdata3.value.组员2['姓名']" id="name2"/></el-col>
  1562. <el-col :span="2"><el-input v-model="formdata3.value.组员3['姓名']" id="name3"/></el-col>
  1563. <el-col :span="2"><el-input v-model="formdata3.value.组员4['姓名']" id="name4"/></el-col>
  1564. <el-col :span="2"><el-input v-model="formdata3.value.组员5['姓名']" id="name5"/></el-col>
  1565. <el-col :span="2"><el-input v-model="formdata3.value.组员6['姓名']" id="name6"/></el-col>
  1566. <el-col :span="2"><el-input v-model="formdata3.value.组员7['姓名']" id="name7"/></el-col>
  1567. <el-col :span="2"><el-input v-model="formdata3.value.组员8['姓名']" id="name8"/></el-col>
  1568. <el-col :span="2"><el-input v-model="formdata3.value.组员9['姓名']" id="name9"/></el-col>
  1569. <el-col :span="2"><el-input v-model="formdata3.value.组员10['姓名']" id="name10"/></el-col>
  1570. <el-col :span="2"><el-input v-model="formdata3.value.拉料['姓名']" id="name11"/></el-col>
  1571. </el-row>
  1572. <el-row :gutter="10" style="margin-top: 10px;">
  1573. <el-col :span="2"></el-col>
  1574. <el-col :span="2"><el-input v-model="formdata3.value.组员1['比例']" id="rate1" @keydown="ent($event, 'bh11', 'rate1', 'rate2')" placeholder="" /></el-col>
  1575. <el-col :span="2"><el-input v-model="formdata3.value.组员2['比例']" id="rate2" @keydown="ent($event, 'rate1', 'rate2', 'rate3')" placeholder="" /></el-col>
  1576. <el-col :span="2"><el-input v-model="formdata3.value.组员3['比例']" id="rate3" @keydown="ent($event, 'rate2', 'rate3', 'rate4')" placeholder="" /></el-col>
  1577. <el-col :span="2"><el-input v-model="formdata3.value.组员4['比例']" id="rate4" @keydown="ent($event, 'rate3', 'rate4', 'rate5')" placeholder="" /></el-col>
  1578. <el-col :span="2"><el-input v-model="formdata3.value.组员5['比例']" id="rate5" @keydown="ent($event, 'rate4', 'rate5', 'rate6')" placeholder="" /></el-col>
  1579. <el-col :span="2"><el-input v-model="formdata3.value.组员6['比例']" id="rate6" @keydown="ent($event, 'rate5', 'rate6', 'rate7')" placeholder="" /></el-col>
  1580. <el-col :span="2"><el-input v-model="formdata3.value.组员7['比例']" id="rate7" @keydown="ent($event, 'rate6', 'rate7', 'rate8')" placeholder="" /></el-col>
  1581. <el-col :span="2"><el-input v-model="formdata3.value.组员8['比例']" id="rate8" @keydown="ent($event, 'rate7', 'rate8', 'rate9')" placeholder="" /></el-col>
  1582. <el-col :span="2"><el-input v-model="formdata3.value.组员9['比例']" id="rate9" @keydown="ent($event, 'rate8', 'rate9', 'rate10')" placeholder="" /></el-col>
  1583. <el-col :span="2"><el-input v-model="formdata3.value.组员10['比例']" id="rate10" @keydown="ent($event, 'rate9', 'rate10', '工单编号')" placeholder="" /></el-col>
  1584. <el-col :span="2"></el-col>
  1585. </el-row>
  1586. <!-- </el-scrollbar> -->
  1587. <template #footer>
  1588. <div class="dialog-footer">
  1589. <el-button @click="closeDialog">取 消</el-button>
  1590. <el-button type="primary" @click="chanliangenterDialog">确 定</el-button>
  1591. </div>
  1592. </template>
  1593. </el-dialog>
  1594. <!-- JP机台独立页面 -->
  1595. <el-dialog v-model="JPchanliangVisible" :before-close="JPcloseDialog" style="width: 60%;margin: 50px auto" :title="'班组产量提报'" destroy-on-close>
  1596. <el-row>
  1597. <el-form :model="JPformdata" label-position="right" ref="elFormRef" :rules="rule" >
  1598. <el-row :gutter="24">
  1599. <el-form-item label="工单编号:" prop="customerCode" class="mab" label-width="90">
  1600. <el-input v-model="JPformdata['工单编号']" style="width: 110px;" placeholder="Enter回车" id="工单编号" @blur="JPgetCPMCsubmit()" @keydown="JPent($event)"/>
  1601. </el-form-item>
  1602. <el-form-item label="产品名称:" prop="customerName" class="mab" label-width="130">
  1603. <el-input v-model="JPformdata['产品名称']" style="width: 520px;" id="产品名称" @keydown="JPent($event)"/>
  1604. </el-form-item>
  1605. </el-row>
  1606. <el-row :gutter="24">
  1607. <el-form-item label="印件号:" prop="customerCode" class="mab" label-width="90">
  1608. <el-input v-model="JPformdata['印件号']" style="width: 110px;" id="印件号" placeholder="Enter回车" @keydown="JPent($event)"/>
  1609. </el-form-item>
  1610. <el-form-item label="印件名称:" prop="customerName" class="mab" label-width="130">
  1611. <el-input v-model="JPformdata['印件名称']" style="width: 520px;" id="印件名称" @keydown="JPent($event)"/>
  1612. </el-form-item>
  1613. </el-row>
  1614. <el-row :gutter="24">
  1615. <el-form-item label="工序号:" prop="customerCode" class="mab" label-width="90">
  1616. <el-input v-model="JPformdata['工序号']" style="width: 110px;" id="工序号" placeholder="Enter回车" @blur="JPgetGXsubmit()" @keydown="JPent($event)"/>
  1617. </el-form-item>
  1618. <el-form-item label="工序名称" prop="customerName" class="mab" label-width="130">
  1619. <el-input v-model="JPformdata['工序名称']" style="width: 520px;" id="工序名称" @keydown="JPent($event)"/>
  1620. </el-form-item>
  1621. </el-row>
  1622. <el-row :gutter="24">
  1623. <el-form-item label="日期:" prop="customerCode" class="mab" label-width="80">
  1624. <el-date-picker v-model="JPformdata['日期']" style="width: 130px;" type="datetime" format="YYYY/MM/DD" value-format="YYYY-MM-DD" @keydown="ent1($event)"/>
  1625. <!-- <el-input v-model="JPformdata['日期']" style="width: 110px;" id="日期" @keydown="JPent($event)"/> -->
  1626. </el-form-item>
  1627. <el-form-item label="流程标牌:" prop="customerCode" class="mab" label-width="130">
  1628. <el-input v-model="JPformdata['流程标牌']" style="width: 110px;" id="流程标牌" @keydown="JPent($event)"/>
  1629. </el-form-item>
  1630. <el-form-item label="检验类别:" prop="customerCode" class="mab" label-width="90">
  1631. <el-input v-model="JPformdata['检验类别']" style="width: 110px;" id="检验类别" @keydown="JPent($event)"/>
  1632. </el-form-item>
  1633. <el-form-item label="废品率系数:" prop="customerCode" class="mab" label-width="100">
  1634. <el-input v-model="JPformdata['废品率系数']" style="width: 110px;" id="废品率系数" @keydown="JPent($event)"/>
  1635. </el-form-item>
  1636. </el-row>
  1637. <el-row :gutter="24">
  1638. <el-form-item label="计件箱数:" prop="customerCode" class="mab" label-width="540">
  1639. <el-input v-model="JPformdata['计件箱数']" style="width: 110px;" id="计件箱数" @keydown="JPent($event)"/>
  1640. </el-form-item>
  1641. <el-form-item label="每箱数量:" prop="customerCode" class="mab" label-width="100">
  1642. <el-input v-model="JPformdata['每箱数量']" style="width: 110px;" id="每箱数量" @keydown="JPent($event)"/>
  1643. </el-form-item>
  1644. </el-row>
  1645. <el-row :gutter="24">
  1646. <el-form-item label="换膜总工时" prop="customerCode" class="mab" label-width="90">
  1647. <el-input v-model="JPformdata['换膜总工时']" style="width: 110px;" id="换膜总工时" @keydown="JPent($event)"/>
  1648. </el-form-item>
  1649. <el-form-item label="通电工时:" prop="customerCode" class="mab" label-width="130">
  1650. <el-input v-model="JPformdata['通电工时']" style="width: 110px;" id="通电工时" @keydown="JPent($event)"/>
  1651. </el-form-item>
  1652. <el-form-item label="定额代号:" prop="customerCode" class="mab" label-width="90">
  1653. <el-input v-model="JPformdata['定额代号']" style="width: 160px;" id="定额代号" @keydown="JPent($event)"/>
  1654. </el-form-item>
  1655. </el-row>
  1656. <div style="display: flex;">
  1657. <div>组员及分配比例</div>
  1658. </div>
  1659. <el-row :gutter="10" style="margin-top: 1vh;">
  1660. <el-col :span="2">
  1661. <el-input v-model="JPformdata['bzdh']" id="bzdh" @keydown="JPent($event)"/>
  1662. </el-col>
  1663. <el-col v-for="i in 10" :key="i" :span="2">
  1664. <el-input v-model="JPformdata['组员' + i]['编号']" :id="'bh' + i" @keydown="JPent($event,i,'1')"/>
  1665. </el-col>
  1666. </el-row>
  1667. <el-row :gutter="10" style="margin-top: 1vh;">
  1668. <el-col :span="2">
  1669. <!-- 空列,用于对齐 -->
  1670. </el-col>
  1671. <el-col v-for="i in 10" :key="i" :span="2">
  1672. <el-input v-model="JPformdata['组员' + i]['姓名']" :id="'xm' + i" @keydown="JPent($event)"/>
  1673. </el-col>
  1674. </el-row>
  1675. <el-row :gutter="10" style="margin-top: 1vh;">
  1676. <el-col :span="2">
  1677. <!-- 空列,用于对齐 -->
  1678. </el-col>
  1679. <el-col v-for="i in 10" :key="i" :span="2">
  1680. <el-input v-model="JPformdata['组员' + i]['比例']" :id="'bl' + i" @keydown="JPent($event)" />
  1681. </el-col>
  1682. </el-row>
  1683. </el-form>
  1684. </el-row>
  1685. <template #footer>
  1686. <div class="dialog-footer" style="text-align: right;">
  1687. <el-button @click="JPcloseDialog">取 消</el-button>
  1688. <el-button type="primary" @click="JPenterDialog">确 定</el-button>
  1689. </div>
  1690. </template>
  1691. </el-dialog>
  1692. <!-- JP检品独立 印件选择-->
  1693. <el-dialog v-model="JPdialogSelectVisible_Yj" title="选择" destroy-on-close width="600px" @keydown="JPselect_Yj($event)" >
  1694. <el-table tooltip-effect="dark" :data="JPselectData_Yj"
  1695. row-key="ID" highlight-current-row="true"
  1696. border style="width:100%"
  1697. @row-dblclick="JPhandleSelectClick_Yj" >
  1698. <el-table-column prop="yjno" label="印件号" width="80" />
  1699. <el-table-column prop="yjmc" label="印件名称" width="480" />
  1700. </el-table>
  1701. </el-dialog>
  1702. <!-- JP检品独立 印件选择 -->
  1703. <el-dialog v-model="JPdialogSelectVisible_Gx" title="选择" destroy-on-close width="600px" >
  1704. <el-table tooltip-effect="dark" :data="JPselectData_Gx"
  1705. row-key="ID" highlight-current-row="true"
  1706. border style="width:100%"
  1707. @row-dblclick="JPhandleSelectClick_Gx">
  1708. <el-table-column prop="name" label="" width="560" />
  1709. </el-table>
  1710. </el-dialog>
  1711. <el-dialog v-model="JPdialogSelectVisible_LX" title="选择" destroy-on-close width="300px" >
  1712. <el-table
  1713. :data="JPtableData"
  1714. ref="table"
  1715. @row-dblclick="JPhandleRowClick"
  1716. highlight-current-row>
  1717. <el-table-column prop="name" label="名称" width="150"></el-table-column>
  1718. <el-table-column prop="type" label="类别" width="100"></el-table-column>
  1719. </el-table>
  1720. </el-dialog>
  1721. <el-dialog v-model="MachineVisible" :before-close="closeMachineVisible" :title="type === '0' ? '新增' : '机台状态显示'"
  1722. destroy-on-close width="80%" style="height: 100%;">
  1723. <div class="button-container">
  1724. <button v-for="(item, index) in machineData" :key="index" class="custom-button" @click="handleButtonClick(item.设备编号)">
  1725. <img :src="`/src/assets/${item.状态}.png`" :alt="altText" style="max-width: 100%; height: auto;"/>
  1726. <span style="margin-top: 8px;">{{ item.设备编号 + ' - ' + item.设备名称 }}</span>
  1727. </button>
  1728. </div>
  1729. </el-dialog>
  1730. <!--当日上报产量 组员及分配比例-->
  1731. <el-dialog v-model="blModellist" :before-close="() => blModellist = false" style="width: 20%">
  1732. <el-form>
  1733. <div>
  1734. <el-table :data="employeeDatalist" border :show-overflow-tooltip="true" :cell-class-name="blplanUsageCellClass" @row-click="tablebllickHandlerlist($event)">
  1735. <el-table-column prop="员工编号" label="员工编号"></el-table-column>
  1736. <el-table-column prop="ygxm" label="员工姓名"></el-table-column>
  1737. </el-table>
  1738. </div>
  1739. </el-form>
  1740. </el-dialog>
  1741. <!--当日上报产量 组员及分配比例-->
  1742. <el-dialog v-model="JPblModellist" :before-close="() => JPblModellist = false" style="width: 20%">
  1743. <el-form>
  1744. <div>
  1745. <el-table :data="JPemployeeDatalist" border :show-overflow-tooltip="true" :cell-class-name="JPblplanUsageCellClass" @row-click="JPtablebllickHandlerlist($event)">
  1746. <el-table-column prop="员工编号" label="员工编号"></el-table-column>
  1747. <el-table-column prop="ygxm" label="员工姓名"></el-table-column>
  1748. </el-table>
  1749. </div>
  1750. </el-form>
  1751. </el-dialog>
  1752. <el-dialog v-model="JPchanliangVisibleedit" :before-close="JPcloseDialogedit" style="width: 60%;margin: 50px auto" :title="'修改班组产量提报'" destroy-on-close>
  1753. <el-row>
  1754. <el-form :model="JPformdata" label-position="right" ref="elFormRef" :rules="rule" >
  1755. <el-row :gutter="24">
  1756. <el-form-item label="工单编号:" prop="customerCode" class="mab" label-width="90">
  1757. <el-input v-model="JPformdataedit['工单编号']" style="width: 110px;" placeholder="Enter回车" id="工单编号" @blur="JPgetCPMCsubmitedit()" @keydown="JPentedit($event)"/>
  1758. </el-form-item>
  1759. <el-form-item label="" prop="customerName" class="mab" >
  1760. <el-input v-model="JPformdataedit['产品名称']" style="width: 520px;" id="产品名称" @keydown="JPentedit($event)"/>
  1761. </el-form-item>
  1762. </el-row>
  1763. <el-row :gutter="24">
  1764. <el-form-item label="印件号:" prop="customerCode" class="mab" label-width="90">
  1765. <el-input v-model="JPformdataedit['印件号']" style="width: 110px;" id="印件号" placeholder="Enter回车" @keydown="JPentedit($event)"/>
  1766. </el-form-item>
  1767. <el-form-item label="" prop="customerName" class="mab">
  1768. <el-input v-model="JPformdataedit['印件名称']" style="width: 520px;" id="印件名称" @keydown="JPentedit($event)"/>
  1769. </el-form-item>
  1770. </el-row>
  1771. <el-row :gutter="24">
  1772. <el-form-item label="工序名称" prop="customerName" class="mab" label-width="90">
  1773. <el-input v-model="JPformdataedit['工序名称']" style="width: 520px;" id="工序名称" @keydown="JPentedit($event)"/>
  1774. </el-form-item>
  1775. <el-form-item label="" prop="customerCode" class="mab">
  1776. <el-input v-model="JPformdataedit['工序号']" style="width: 50px;" id="工序号" placeholder="Enter回车" @blur="JPgetGXsubmit()" @keydown="JPentedit($event)"/>
  1777. </el-form-item>
  1778. <el-form-item label="检验类别:" prop="customerCode" class="mab" label-width="100">
  1779. <el-input v-model="JPformdataedit['检验类别']" style="width: 110px;" id="检验类别" @keydown="JPentedit($event)"/>
  1780. </el-form-item>
  1781. <el-form-item label="废品率系数:" prop="customerCode" class="mab" label-width="100">
  1782. <el-input v-model="JPformdataedit['废品率系数']" style="width: 110px;" id="废品率系数" @keydown="JPentedit($event)"/>
  1783. </el-form-item>
  1784. </el-row>
  1785. <el-row :gutter="24">
  1786. <el-form-item label="日期:" prop="customerCode" class="mab" label-width="90">
  1787. <el-date-picker v-model="JPformdataedit['日期']" style="width: 130px;" type="datetime" format="YYYY/MM/DD" value-format="YYYY-MM-DD" @keydown="JPentedit($event)"/>
  1788. </el-form-item>
  1789. <el-form-item label="机器:" prop="customerCode" class="mab" label-width="80">
  1790. <el-input v-model="JPformdataedit['机器']" style="width: 90px;" id="机器" @keydown="JPentedit($event)"/>
  1791. </el-form-item>
  1792. <el-form-item label="流程标牌:" prop="customerCode" class="mab" label-width="80">
  1793. <el-input v-model="JPformdataedit['流程标牌']" style="width: 110px;" id="流程标牌" @keydown="JPentedit($event)"/>
  1794. </el-form-item>
  1795. <el-form-item label="计件箱数:" prop="customerCode" class="mab" label-width="180">
  1796. <el-input v-model="JPformdataedit['计件箱数']" style="width: 110px;" id="计件箱数" @keydown="JPentedit($event)"/>
  1797. </el-form-item>
  1798. <el-form-item label="每箱数量:" prop="customerCode" class="mab" label-width="100">
  1799. <el-input v-model="JPformdataedit['每箱数量']" style="width: 110px;" id="每箱数量" @keydown="JPentedit($event)"/>
  1800. </el-form-item>
  1801. </el-row>
  1802. <el-row :gutter="24">
  1803. <el-form-item label="换膜总工时" prop="customerCode" class="mab" label-width="90">
  1804. <el-input v-model="JPformdataedit['换膜总工时']" style="width: 110px;" id="换膜总工时" @keydown="JPentedit($event)"/>
  1805. </el-form-item>
  1806. <el-form-item label="换膜补产工时:" prop="customerCode" class="mab" label-width="130">
  1807. <el-input v-model="JPformdataedit['换膜补产工时']" style="width: 110px;" id="换膜补产工时" @keydown="JPentedit($event)"/>
  1808. </el-form-item>
  1809. <el-form-item label="保养工时:" prop="customerCode" class="mab" label-width="320">
  1810. <el-input v-model="JPformdataedit['保养工时:']" style="width: 110px;" id="保养工时:" @keydown="JPentedit($event)"/>
  1811. </el-form-item>
  1812. </el-row>
  1813. <el-row :gutter="24">
  1814. <el-form-item label="异常总工时" prop="customerCode" class="mab" label-width="90">
  1815. <el-input v-model="JPformdataedit['异常总工时']" style="width: 110px;" id="异常总工时" @keydown="JPentedit($event)"/>
  1816. </el-form-item>
  1817. <el-form-item label="异常类型:" prop="customerCode" class="mab" label-width="130">
  1818. <el-input v-model="JPformdataedit['异常类型']" style="width: 110px;" id="异常类型" @keydown="JPentedit($event)"/>
  1819. </el-form-item>
  1820. <el-form-item label="异常补贴工时:" prop="customerCode" class="mab" label-width="350">
  1821. <el-input v-model="JPformdataedit['异常补贴工时:']" style="width: 110px;" id="异常补贴工时:" @keydown="JPentedit($event)"/>
  1822. </el-form-item>
  1823. <el-form-item label="通电时间:" prop="customerCode" class="mab" label-width="90">
  1824. <el-input v-model="JPformdataedit['通电时间:']" style="width: 110px;" id="通电时间:" @keydown="JPentedit($event)"/>
  1825. </el-form-item>
  1826. </el-row>
  1827. <el-row :gutter="24">
  1828. <el-form-item label="定额代号" prop="customerCode" class="mab" label-width="90">
  1829. <el-input v-model="JPformdataedit['定额代号']" style="width: 200px;" id="定额代号" @keydown="JPentedit($event)"/>
  1830. </el-form-item>
  1831. </el-row>
  1832. <div style="display: flex;">
  1833. <div>组员及分配比例</div>
  1834. </div>
  1835. <el-row :gutter="10" style="margin-top: 1vh;">
  1836. <el-col :span="2">
  1837. <el-input v-model="JPformdataedit['bzdh']" id="bzdh" @keydown="JPentedit($event)"/>
  1838. </el-col>
  1839. <el-col v-for="i in 10" :key="i" :span="2">
  1840. <el-input v-model="JPformdataedit['组员' + i]['编号']" :id="'bh' + i" @keydown="JPentedit($event,i,'1')"/>
  1841. </el-col>
  1842. </el-row>
  1843. <el-row :gutter="10" style="margin-top: 1vh;">
  1844. <el-col :span="2">
  1845. <!-- 空列,用于对齐 -->
  1846. </el-col>
  1847. <el-col v-for="i in 10" :key="i" :span="2">
  1848. <el-input v-model="JPformdataedit['组员' + i]['姓名']" :id="'xm' + i" @keydown="JPentedit($event)"/>
  1849. </el-col>
  1850. </el-row>
  1851. <el-row :gutter="10" style="margin-top: 1vh;">
  1852. <el-col :span="2">
  1853. <!-- 空列,用于对齐 -->
  1854. </el-col>
  1855. <el-col v-for="i in 10" :key="i" :span="2">
  1856. <el-input v-model="JPformdataedit['组员' + i]['比例']" :id="'bl' + i" @keydown="JPentedit($event)" />
  1857. </el-col>
  1858. </el-row>
  1859. </el-form>
  1860. </el-row>
  1861. <template #footer>
  1862. <div class="dialog-footer" style="text-align: right;">
  1863. <el-button @click="JPcloseDialogedit">取 消</el-button>
  1864. <el-button type="primary" @click="JPenterDialogedit">确 定</el-button>
  1865. </div>
  1866. </template>
  1867. </el-dialog>
  1868. <!-- 修改 JP检品独立 印件选择-->
  1869. <el-dialog v-model="JPdialogSelectVisible_Yjedit" title="选择" destroy-on-close width="600px" @keydown="JPselect_Yjedit($event)" >
  1870. <el-table tooltip-effect="dark" :data="JPselectData_Yjedit"
  1871. row-key="ID" highlight-current-row="true"
  1872. border style="width:100%"
  1873. @row-dblclick="JPhandleSelectClick_Yjedit" >
  1874. <el-table-column prop="yjno" label="印件号" width="80" />
  1875. <el-table-column prop="yjmc" label="印件名称" width="480" />
  1876. </el-table>
  1877. </el-dialog>
  1878. <!-- 修改 JP检品独立 印件选择 -->
  1879. <el-dialog v-model="JPdialogSelectVisible_Gxedit" title="选择" destroy-on-close width="600px" >
  1880. <el-table tooltip-effect="dark" :data="JPselectData_Gxedit"
  1881. row-key="ID" highlight-current-row="true"
  1882. border style="width:100%"
  1883. @row-dblclick="JPhandleSelectClick_Gxedit">
  1884. <el-table-column prop="name" label="" width="560" />
  1885. </el-table>
  1886. </el-dialog>
  1887. <el-dialog v-model="JPdialogSelectVisible_LXedit" title="选择" destroy-on-close width="300px" >
  1888. <el-table
  1889. :data="JPtableDataedit"
  1890. ref="table"
  1891. @row-dblclick="JPhandleRowClickedit"
  1892. highlight-current-row>
  1893. <el-table-column prop="name" label="名称" width="150"></el-table-column>
  1894. <el-table-column prop="type" label="类别" width="100"></el-table-column>
  1895. </el-table>
  1896. </el-dialog>
  1897. <!--修改 JP检品机 当日上报产量 组员及分配比例-->
  1898. <el-dialog v-model="JPblModellistedit" :before-close="() => JPblModellistedit = false" style="width: 20%">
  1899. <el-form>
  1900. <div>
  1901. <el-table :data="JPemployeeDatalistedit" border :show-overflow-tooltip="true" :cell-class-name="JPblplanUsageCellClassedit" @row-click="JPtablebllickHandlerlistedit($event)">
  1902. <el-table-column prop="员工编号" label="员工编号"></el-table-column>
  1903. <el-table-column prop="ygxm" label="员工姓名"></el-table-column>
  1904. </el-table>
  1905. </div>
  1906. </el-form>
  1907. </el-dialog>
  1908. <el-dialog v-model="hesuanVisible" :before-close="closehesuanVisible" title="核算参数调整" destroy-on-close width="40%" style="height: 50%;">
  1909. <div>
  1910. <el-radio-group v-model="selected" @change="agreeChange" style="display: flex; flex-direction: column;">
  1911. <div style="display: flex; align-items: center;">
  1912. <label>参数类型:</label>
  1913. <el-radio label="难度调整系数"></el-radio>
  1914. </div>
  1915. <div style="display: flex; align-items: center;margin-left: 40px;">
  1916. <el-radio label="凹印版距"></el-radio>
  1917. </div>
  1918. <div style="display: flex; align-items: center;margin-left: 25px;">
  1919. <el-radio label="色度数"></el-radio>
  1920. </div>
  1921. <div style="display: flex; align-items: center;margin-left: 55px;">
  1922. <el-radio label="废品率系数"></el-radio>
  1923. </div>
  1924. </el-radio-group>
  1925. </div>
  1926. <div style="margin-left: 70px;">
  1927. <el-col :span="15">
  1928. <el-form-item label="废品率系数:" prop="flatFeed" class="mab" v-if="FPlxs === true">
  1929. <el-input v-model="hesuanValue.废品率系数" id="辅电表" @keydown="ent1($event)" style="width: 200px;" v-if="FPlxs === true"/>
  1930. </el-form-item>
  1931. <el-form-item label="缩放系数:" prop="flatFeed" class="mab" v-if="SFType === true">
  1932. <el-input v-model="hesuanValue.缩放系数" id="辅电表" @keydown="ent1($event)" style="width: 200px;" v-if="SFType === true"/>
  1933. </el-form-item>
  1934. <el-form-item label="产品板距:" prop="flatFeed" class="mab" v-if="CPType === true">
  1935. <el-input v-model="hesuanValue.产品板距" id="辅电表" @keydown="ent1($event)" style="width: 200px;" v-if="CPType === true"/>
  1936. </el-form-item>
  1937. <el-form-item label="印刷方式:" prop="flatFeed" class="mab" v-if="CPType === true">
  1938. <el-select v-model="hesuanValue.印刷方式" placeholder="" style="width: 190px;" v-if="CPType === true" >
  1939. <el-option label="卷对卷" value="卷对卷"></el-option>
  1940. <el-option label="卷对张" value="卷对张"></el-option>
  1941. </el-select>
  1942. <!-- <el-input v-model="hesuanValue.印刷方式" id="辅电表" @keydown="ent1($event)" :clearable="true" style="width: 200px;" v-if="CPType === true"/> -->
  1943. </el-form-item>
  1944. <el-form-item label="色度数 :" prop="flatFeed" class="mab" v-if="SDType === true">
  1945. <el-input v-model="hesuanValue.色度数" id="辅电表" @keydown="ent1($event)" :clearable="true" style="width: 200px;" v-if="SDType === true" />
  1946. </el-form-item>
  1947. </el-col>
  1948. </div>
  1949. <template #footer>
  1950. <div class="dialog-footer">
  1951. <el-button @click="hesuanVisiblecloseDialog">取 消</el-button>
  1952. <el-button type="primary" @click="hesuanenterDialog">确 定</el-button>
  1953. </div>
  1954. </template>
  1955. </el-dialog>
  1956. <!--工序产量核查【弹窗】-->
  1957. <el-dialog v-model="gd_gxclhclist" title="工序产量核查" style="width: 100%;height: 100%;margin: 0px;padding: 0px">
  1958. <el-button type="" @click="gxclhcCancel">退出</el-button>
  1959. <div style="width: 100%; height: 60px; padding: 0px; margin: 10px 0px 0px 0px; display: flex; align-items: center;">
  1960. <div style="width: 100%; height: 60px; padding: 0px; display: flex; align-items: center;">
  1961. <el-form-item label="工单编号" prop="currentProcess" style="margin-right: 20px; padding: 0px">
  1962. <el-input v-model="gxclhcformData['gdbh']" @keyup.enter="gxclhcProductValue" />
  1963. </el-form-item>
  1964. </div>
  1965. </div>
  1966. <el-table ref="paichengRef"
  1967. :show-overflow-tooltip="true"
  1968. :row-style="{ height: '0px' }"
  1969. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
  1970. :header-cell-style="{ padding: '0px' }"
  1971. style="width: 100%;height: 70vh" border tooltip-effect="dark"
  1972. highlight-current-row="true"
  1973. @row-click="gxclhc_tableRowClick"
  1974. :data="gxclhc_Data" row-key="ID"
  1975. :cell-class-name="gxclhcCellClass">
  1976. <template v-for="(item, idx) in gxclhc_Columns">
  1977. <el-table-column #default="{ row, column, $index }" align="left" :label="item.label" :width="item.width" >
  1978. {{row[item.prop]}}
  1979. </el-table-column>
  1980. </template>
  1981. </el-table>
  1982. </el-dialog>
  1983. <!--修正核算参数-->
  1984. <el-dialog v-model="xzhscslist" title="修正核算参数" style="width: 100%;height: 100%;margin: 0px;padding: 0px">
  1985. <el-button type="primary" @click="xzhscsConfirm">更新</el-button>
  1986. <el-button type="" @click="sxzhscsCancel">退出</el-button>
  1987. <div style="width: 100%; height: 60px; padding: 0px; margin: 10px 0px 0px 0px; display: flex; align-items: center;">
  1988. <el-form-item label="当前工单 :" prop="currentProcess" style="margin-right: 20px; padding: 0px">
  1989. <el-input v-model="xzhscsformData['gdbh']"
  1990. @keyup.enter="xzhscsgetProductValue" style="width: 200px;"/>
  1991. <el-input v-model="xzhscsformData['cpdh']" disabled style="width: 120px;margin-left: 10px;"/>
  1992. <el-input v-model="xzhscsformData['gdmc']" disabled style="width: 500px;"/>
  1993. <!-- <el-input v-model="xzhscsformData['yjdh']" disabled style="width: 120px;margin-left: 10px;"/>
  1994. <el-input v-model="xzhscsformData['yjmc']" disabled style="width: 500px;"/> -->
  1995. </el-form-item>
  1996. </div>
  1997. <div style="width: 100%; height: 60px; padding: 0px; margin: 5px 0px 0px 260px; display: flex; align-items: center;">
  1998. <el-form-item label=" :" prop="currentProcess" style="margin-right: 20px; padding: 0px">
  1999. <!-- <el-input v-model="xzhscsformData['gdbh']"
  2000. @keyup.enter="xzhscsgetProductValue" style="width: 200px;"/>
  2001. <el-input v-model="xzhscsformData['cpdh']" disabled style="width: 120px;margin-left: 10px;"/>
  2002. <el-input v-model="xzhscsformData['gdmc']" disabled style="width: 500px;"/> -->
  2003. <el-input v-model="xzhscsformData['yjdh']" disabled style="width: 120px;margin-left: 10px;"/>
  2004. <el-input v-model="xzhscsformData['yjmc']" disabled style="width: 500px;"/>
  2005. </el-form-item>
  2006. </div>
  2007. <el-table ref="paichengRef"
  2008. :show-overflow-tooltip="true"
  2009. :row-style="{ height: '0px' }"
  2010. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
  2011. :header-cell-style="{ padding: '0px' }"
  2012. style="width: 100%;height: 74vh" border tooltip-effect="dark"
  2013. :data="sxzhscstableData" row-key="ID"
  2014. :cell-class-name="sxzhscsCellClass">
  2015. <template v-for="(item, idx) in xzhstableColumns">
  2016. <el-table-column #default="{ row, column, $index }" align="left" :label="item.label" :width="item.width" >
  2017. <div v-if="['难度系数', '损耗代号', '印刷方式', '版距','计损色数', '损耗系数'].includes(item.prop)">
  2018. <el-input v-model="row[item.prop]" :clearable="false"
  2019. :id="`input${idx}${$index}`" />
  2020. </div>
  2021. <div v-else>{{ row[item.prop] }}</div>
  2022. </el-table-column>
  2023. </template>
  2024. </el-table>
  2025. </el-dialog>
  2026. <el-dialog v-model="gzSelVisible" title="员工工资明细查询"
  2027. destroy-on-close fullscreen
  2028. style="font-size: 50px;font-weight: bold;"
  2029. >
  2030. <el-button v-for="ygbh in gz_bzbh" type="primary" @click="gz_ontable(ygbh)">{{ ygbh }}</el-button>
  2031. <!-- 数据展示 -->
  2032. <el-table ref="gz_multipleTable" style="width: 100%;height: 40vh;padding-top: 5px;" tooltip-effect="dark" :data="gz_tableData" row-key="ID"
  2033. highlight-current-row="true" border :show-overflow-tooltip="true"
  2034. :row-style="{ height: '20px' }"
  2035. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  2036. :header-cell-style="{ padding: '0px' }"
  2037. >
  2038. <el-table-column v-for="column in tableCols1"
  2039. :key="column.prop" :prop="column.prop"
  2040. :label="column.label" :width="column.width"
  2041. show-overflow-tooltip="true" sortable
  2042. />
  2043. </el-table>
  2044. <!-- 数据展示 -->
  2045. <el-table ref="gz_multipleTable2" style="width: 100%;height: 40vh;padding-top: 30px;" tooltip-effect="dark" :data="gz_tableData2" row-key="ID"
  2046. highlight-current-row="true" border
  2047. :row-style="{ height: '20px' }"
  2048. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  2049. :header-cell-style="{ padding: '0px' }"
  2050. :show-overflow-tooltip="true"
  2051. >
  2052. <el-table-column v-for="column in tableCols2"
  2053. :key="column.prop" :prop="column.prop"
  2054. :label="column.label" :width="column.width"
  2055. show-overflow-tooltip="true" sortable
  2056. />
  2057. </el-table>
  2058. </el-dialog>
  2059. <!-- 印件选择 -->
  2060. <el-dialog v-model="dialogSelectVisible_Yj" title="选择" destroy-on-close width="600px" @keydown="select_Yj($event)" >
  2061. <el-table tooltip-effect="dark" :data="selectData_Yj"
  2062. row-key="ID" highlight-current-row="true"
  2063. border style="width:100%"
  2064. @row-dblclick="handleSelectClick_Yj"
  2065. >
  2066. <el-table-column prop="yjno" label="印件号" width="80" />
  2067. <el-table-column prop="yjmc" label="印件名称" width="480" />
  2068. </el-table>
  2069. </el-dialog>
  2070. <!-- 机台编号选择 -->
  2071. <el-dialog v-model="dialogSelectVisible_Gx" title="选择" destroy-on-close width="600px" >
  2072. <el-table tooltip-effect="dark" :data="selectData_Gx"
  2073. row-key="ID" highlight-current-row="true"
  2074. border style="width:100%"
  2075. @row-dblclick="handleSelectClick_Gx"
  2076. >
  2077. <el-table-column prop="name" label="" width="560" />
  2078. </el-table>
  2079. </el-dialog>
  2080. <Shebeizhuangtai
  2081. v-if="dialogSbyxgl"
  2082. v-model="dialogSbyxgl"
  2083. :title="titinfo"
  2084. :formData="formData"
  2085. />
  2086. </el-main>
  2087. </el-container>
  2088. </el-container>
  2089. <PrintPage ref="printPageRef" />
  2090. </div>
  2091. </template>
  2092. <script setup>
  2093. import {
  2094. createCompany,
  2095. deleteCompany,
  2096. deleteCompanyByIds,
  2097. updateCompany,
  2098. findCompany,
  2099. getCompanyList
  2100. } from '@/api/company'
  2101. import {
  2102. EquipmentSchedulingEdit, Procedure,
  2103. teamDel, WorkList, WorkOrderDel
  2104. } from "@/api/yunyin/yunying";
  2105. import {
  2106. facilityTab,
  2107. facilitychanLiang,
  2108. facilityInspect,
  2109. facilityProduction,
  2110. facilityTeam,
  2111. facilityMachineList,
  2112. facilitySpotCheckItem,
  2113. facilityInspectionItem,
  2114. reportProduceInfo,
  2115. reportName,
  2116. reportInfo,
  2117. reportMachineMac,
  2118. facilityWorklist,
  2119. setProcessStatus,
  2120. submitDailyProduction,
  2121. facilityDetail,
  2122. inspectionRecord,
  2123. getYg,
  2124. facilityProcedure,
  2125. facilityPrintGetTab,
  2126. facilityPrintDetail,
  2127. ProcessInspectionRecordsItem,
  2128. MachineDetailList,
  2129. ComplaintRecord,
  2130. remodelGetTab,
  2131. ModelChangeRecord,
  2132. MachineChanliangDetail,
  2133. chanliangEdit,
  2134. productionGdmc,
  2135. productionYjmc,
  2136. ChanliangDel,
  2137. ChanliangAdd,
  2138. MachineChanliangDetailEdit,
  2139. ChanliangWorkorder,
  2140. ChanliangPrintDetail,
  2141. ChanliangProcessDetail,
  2142. EmployeeData,
  2143. RemodelDetail,
  2144. AdditionalInspectionRecordAdd,
  2145. ProcessInspectionRecordsItemAdd,
  2146. CoefficientEdit,
  2147. ChromaDataEdit,
  2148. PrintingModeDataEdit,
  2149. dailysearch,
  2150. dailygetGzByYgbh,
  2151. productionDedh,
  2152. YieldTeamEdit,
  2153. getTimelist,
  2154. JPmachineDetail,
  2155. JpChanliangEdit,
  2156. JpUploade
  2157. } from '@/api/jixiaoguanli/jitairibaobiao'
  2158. import{
  2159. AccountingParameter,
  2160. ProductNameData,
  2161. AccountingParameterEdit,
  2162. gdzl_MachineList,
  2163. getOrderProcessCount,
  2164. RejectionEdit
  2165. } from "@/api/yunyin/yunying";
  2166. import {
  2167. MachineTeamAdd,
  2168. setMachineTeam,
  2169. } from '@/api/jixiaoguanli/baogong'
  2170. import {
  2171. FieldInspectionRecord
  2172. } from "@/api/mes/job";
  2173. import Shebeizhuangtai from '@/view/performance/09-workOrderVerification/componets/shebeizhuangtai.vue'
  2174. // 全量引入格式化工具 请按需保留
  2175. import { getDictFunc, formatDate, formatBoolean, filterDict, ReturnArrImg, onDownloadFile } from '@/utils/format'
  2176. import { Layout, LayoutContent, LayoutHeader, LayoutSider } from '@arco-design/web-vue'
  2177. import { ElMessage, ElMessageBox } from 'element-plus'
  2178. import { ref, reactive } from 'vue'
  2179. import { useUserStore } from '@/pinia/modules/user'
  2180. import PrintPage from './components/print.vue'
  2181. const userStore = useUserStore()
  2182. const sys_id='['+userStore.userInfo.userName+'/'+userStore.userInfo.nickName+']'
  2183. defineOptions({
  2184. name: 'Company'
  2185. })
  2186. const printPageRef = ref()
  2187. const DelType = ref(false)
  2188. const AddType = ref(false)
  2189. const gytableData = ref([])
  2190. const drzcDatas =ref([])
  2191. const detailData = reactive([])
  2192. const treeData=ref([])
  2193. const yinbantreeData=ref([])
  2194. let dianjiantreeData;
  2195. let JTMC=ref()
  2196. let date=ref()
  2197. let titinfo=ref()
  2198. let JTMCOn=ref()
  2199. let showbutton=ref()
  2200. let dateOn=ref()
  2201. const activName = ref('first')
  2202. let productCode=ref()
  2203. const sbzyData = reactive([])
  2204. const FPData = reactive([])
  2205. const CLMXData = reactive([])
  2206. let JYData = reactive([])
  2207. const selectData = ref([])
  2208. const isJPJT = ref(false)
  2209. const handleNodeClick = (nodeData,node) => {
  2210. // 取消所有节点的颜色
  2211. const allNodes = document.querySelectorAll('.treecolor .el-tree-node');
  2212. allNodes.forEach(node => {
  2213. node.querySelector('.el-tree-node__label').style.color = '';
  2214. });
  2215. // 获取点击的节点
  2216. const clickedNodeId = node['id'];
  2217. const clickedNode = document.querySelector(`.treecolor .el-tree-node[data-key="${clickedNodeId}"]`);
  2218. if (clickedNode) {
  2219. // 给当前点击的节点改变颜色
  2220. clickedNode.querySelector('.el-tree-node__label').style.color = 'red';
  2221. }
  2222. //存放当前节点的nodeId
  2223. if (nodeData.level === 1) {
  2224. CJMC.value=node.label
  2225. showbutton.value=true
  2226. JTMCOn.value=false
  2227. dateOn.value=false
  2228. MachinelList()
  2229. DelType.value = false
  2230. AddType.value = false
  2231. // MachineVisible.value=true
  2232. } else if (nodeData.level === 2) {
  2233. sbzyData.length = 0;
  2234. FPData.length=0;
  2235. CLMXData.length=0;
  2236. JYData.length=0;
  2237. JTMC=node.label.split("-")[0]
  2238. CJMC.value=nodeData.parentNode.label
  2239. JTMCOn.value=true
  2240. dateOn.value=false
  2241. showbutton.value=false
  2242. FacilityProduction()
  2243. FacilityWorklist()
  2244. DelType.value = false
  2245. AddType.value = false
  2246. } else if (nodeData.level === 3) {
  2247. CJMC.value=nodeData.parentNode.parentNode.label
  2248. JTMC=nodeData.machineName.split("-")[0]
  2249. console.log(nodeData)
  2250. // 等于JP开头的机台
  2251. if (/^JP.+/.test(JTMC)) {
  2252. isJPJT.value = true
  2253. JTMCOn.value=false
  2254. dateOn.value=true
  2255. FacilityInspect()
  2256. JPmachineDetails(JTMC, nodeData.label);
  2257. date=node.label
  2258. JPgytableData.value=[]
  2259. drzcDatas.value=[]
  2260. columnNames=[]
  2261. drzcData=[]
  2262. showbutton.value=false
  2263. DelType.value = true
  2264. AddType.value = true
  2265. } else {
  2266. isJPJT.value = false
  2267. JTMCOn.value=false
  2268. dateOn.value=true
  2269. date=node.label
  2270. gytableData.value=[]
  2271. drzcDatas.value=[]
  2272. columnNames=[]
  2273. drzcData=[]
  2274. showbutton.value=false
  2275. FacilityInspect()
  2276. FacilitychanLiang()
  2277. DelType.value = true
  2278. AddType.value = true
  2279. }
  2280. }
  2281. }
  2282. // JP当日上报产量
  2283. const JPgytableData = ref([])
  2284. const JPmachineDetails = async (jt, riqi) => {
  2285. const JPmachineDetail_data = await JPmachineDetail({machine: jt, date: riqi});
  2286. console.log(JPmachineDetail_data)
  2287. _rclsb_gdbh.value = JPmachineDetail_data.data[0]['工单编号']
  2288. if (JPmachineDetail_data.code === 0) {
  2289. let totalA = JPmachineDetail_data.data.totalA
  2290. let totalB = JPmachineDetail_data.data.totalB
  2291. delete JPmachineDetail_data.data.totalA
  2292. delete JPmachineDetail_data.data.totalB
  2293. JPgytableData.value = Object.values(JPmachineDetail_data.data)
  2294. console.log(totalA)
  2295. if(totalA.length === 1){
  2296. if(totalA){
  2297. let rowA = {
  2298. 工单编号: 'A班产量:',
  2299. yjno: totalA[0].检验类型+ ':' +totalA[0].箱数,
  2300. }
  2301. JPgytableData.value.push(rowA)
  2302. }
  2303. if(totalB){
  2304. let rowB = {
  2305. 工单编号: 'B班产量:',
  2306. yjno: totalB[0].检验类型+ ':' +totalB[0].箱数,
  2307. }
  2308. JPgytableData.value.push(rowB)
  2309. }
  2310. }else{
  2311. if(totalA){
  2312. let rowA = {
  2313. 工单编号: 'A班产量:',
  2314. yjno: totalA[0].检验类型+ ':' +totalA[0].箱数,
  2315. 产品名称: totalA[1].检验类型+ ':' +totalA[1].箱数,
  2316. }
  2317. JPgytableData.value.push(rowA)
  2318. }
  2319. if(totalB){
  2320. let rowB = {
  2321. 工单编号: 'B班产量:',
  2322. yjno: totalB[0].检验类型+ ':' +totalB[0].箱数,
  2323. 产品名称: totalB[1].检验类型+ ':' +totalB[1].箱数,
  2324. }
  2325. JPgytableData.value.push(rowB)
  2326. }
  2327. }
  2328. // return require(`@/assets/${machineData.状态}.png`);
  2329. // MachineVisible.value=true
  2330. }
  2331. }
  2332. const hesuanVisible = ref(false)
  2333. const MachineVisible = ref(false)
  2334. const machineData = reactive([])
  2335. const hesuanValue = reactive({})
  2336. const MachinelList = async () => {
  2337. const response = await MachineDetailList({workshop:CJMC.value});
  2338. if (response.code === 0) {
  2339. machineData.splice(0, machineData.length, ...response.data);
  2340. console.log(machineData)
  2341. // return require(`@/assets/${machineData.状态}.png`);
  2342. // MachineVisible.value=true
  2343. }
  2344. }
  2345. //设置机台状态
  2346. function handleButtonClick(deviceId) {
  2347. console.log(deviceId);
  2348. MachineVisible.value=false
  2349. // dialogSbyxgl.value=true
  2350. JTMC=deviceId.split("-")[0]
  2351. // JTMCOn.value=true
  2352. // dateOn.value=false
  2353. console.log(JTMC)
  2354. GetdialogSbyxgl()
  2355. // GetdialogSbyxgl(deviceId)
  2356. }
  2357. const GetdialogSbyxgl = async () => {
  2358. const response = await facilityProduction({machine:JTMC});
  2359. if (response.code === 0) {
  2360. console.log(response)
  2361. // 填充formData对象的基本字段
  2362. // formData.value.工单编号 = response.data.工单编号;
  2363. // formData.value.印件编号 = response.data.印件号;
  2364. // formData.value.工序名称 = response.data.工序名称;
  2365. // formData.value.产品名称 = response.data.产品名称;
  2366. // formData.value.班组 = response.data.班组编号;
  2367. formData.value.工单编号 = response.data.工单编号;
  2368. formData.value.印件号 = response.data.印件号;
  2369. formData.value.工序号 = response.data.工序名称.substring(0,2);
  2370. formData.value.工序名称 = response.data.工序名称;
  2371. formData.value.产品名称 = response.data.产品名称;
  2372. formData.value.班组成员 = response.data.班组成员;
  2373. formData.value.班组Id=response.data.班组Id
  2374. formData.value.machine=JTMC
  2375. formData.value.状态=response.data.状态
  2376. let time = new Date();
  2377. time.setDate(time.getDate() - 0); // 今天的前N天的日期,N自定义
  2378. titinfo = `${time.getFullYear()}-${time.getMonth() + 1}-${time.getDate()}`;
  2379. titinfo+='【'+JTMC+response.data.工单编号+response.data.产品名称+'】'+response.data.工序名称
  2380. let sczl_bhkey=''
  2381. let sczl_namekey=''
  2382. if (response.data.班组成员) {
  2383. for (let i = 0; i < Math.min(Object.keys(response.data.班组成员).length, 6); i++) {
  2384. sczl_bhkey=`sczl_bh${i+1}`
  2385. sczl_namekey=`sczl_name${i+1}`
  2386. formData.value[sczl_bhkey] = response.data.班组成员[i]['编号'];
  2387. formData.value[sczl_namekey] = response.data.班组成员[i]['姓名'];
  2388. console.log(response.data.班组成员[i]['编号'])
  2389. classbz.value[i]=response.data.班组成员[i]['编号']
  2390. }
  2391. }
  2392. formData.value.class=classbz.value.join(',')
  2393. console.log(formData.value.class)
  2394. formData.value.JTMC=JTMC
  2395. const responses = await MachineDetailList({workshop:CJMC.value});
  2396. if(responses.code===0){
  2397. responses.data.map(item=>{
  2398. if(item.设备编号==JTMC){
  2399. formData.value.status=item.状态
  2400. }
  2401. })
  2402. }
  2403. // console.log(formData.value.工单编号)
  2404. }
  2405. FacilityWorklist()
  2406. onstatus()
  2407. }
  2408. const gzSelVisible = ref(false)
  2409. const gz_tableData = reactive([])
  2410. const gz_tableData2 = reactive([])
  2411. let gz_bzbh = [];
  2412. const tableCols1 = [
  2413. { label: '员工编号', prop: 'bh', width: '105' },
  2414. { label: '员工姓名', prop: '员工姓名', width: '105' },
  2415. { label: '日期', prop: 'sczl_rq', width: '120' },
  2416. { label: '计件工资', prop: '计件工资', width: '105' },
  2417. { label: '加班工资', prop: '加班工资', width: '105' },
  2418. { label: '计时时数', prop: '计时时数', width: '105' },
  2419. { label: '计时工资', prop: '计时工资', width: '135' },
  2420. { label: '日工资合计', prop: '日工资合计', width: '135' },
  2421. ]
  2422. const tableCols2 = [
  2423. { label: '日期', prop: 'sczl_rq', width: '100' },
  2424. { label: '工单编号', prop: 'sczl_gdbh', width: '105' },
  2425. { label: '产品名称', prop: 'Gd_cpmc', width: '120' },
  2426. { label: '印件及工序', prop: 'sczl_type', width: '120' },
  2427. { label: '机台', prop: 'sczl_jtbh', width: '87' },
  2428. { label: '车头产量', prop: '班组车头产量', width: '105' },
  2429. { label: '计件产量', prop: '计件产量', width: '105' },
  2430. { label: '补产产量', prop: '补产产量', width: '105' },
  2431. { label: '核算产量', prop: '核算产量', width: '105' },
  2432. { label: '达标定额', prop: '达标定额', width: '105' },
  2433. { label: '千件工价', prop: '千件工价', width: '105' },
  2434. { label: '计件工资', prop: '个人计件工资', width: '105' },
  2435. { label: '加班工资', prop: '个人加班工资', width: '105' },
  2436. { label: '装版工时', prop: '装版工时', width: '120' },
  2437. { label: '保养工时', prop: '保养工时', width: '105' },
  2438. { label: '打样工时', prop: '打样工时', width: '105' },
  2439. { label: '异常停机', prop: '异常停机工时', width: '105' },
  2440. { label: '补产标准', prop: '补产标准', width: '120' },
  2441. { label: '分摊比例', prop: 'Rate', width: '105' },
  2442. ]
  2443. //员工工资查询
  2444. const gzSel = () =>{
  2445. if(formData.value.班组成员==undefined){
  2446. ElMessage({ type: 'warning', message: '请先选择机台' });
  2447. return
  2448. }
  2449. if(formData.value.班组成员.length==0){
  2450. ElMessage({ type: 'warning', message: '未获取到员工' });
  2451. return
  2452. }
  2453. for (let index in formData.value.班组成员) {
  2454. gz_bzbh[index] = formData.value.班组成员[index]['编号']
  2455. }
  2456. gzSelVisible.value=true
  2457. }
  2458. // 查询
  2459. const gz_ontable = (ygbh) => {
  2460. // 创建一个Date对象
  2461. var currentDate = new Date();
  2462. // 获取年份
  2463. var year = currentDate.getFullYear();
  2464. // 获取月份(注意,月份从0开始,所以需要加1)
  2465. var month = currentDate.getMonth() + 1;
  2466. if (month < 10) {
  2467. month = "0" + month;
  2468. }
  2469. var date = year+ "" +month
  2470. const response = dailysearch({date: date, search: ygbh}).then(response=>{
  2471. if (response.code === 0) {
  2472. const originalData = response.data;
  2473. const summaryData = generateSummaryData(originalData);
  2474. // 将合计数据插入到原始数据中
  2475. const combinedData = [];
  2476. originalData.forEach((item, index) => {
  2477. combinedData.push(item);
  2478. const nextItem = originalData[index + 1];
  2479. if (nextItem==undefined) {
  2480. // 如果下一个员工姓名与当前不同,插入合计数据
  2481. const currentSummary = summaryData.shift();
  2482. combinedData.push(currentSummary);
  2483. }
  2484. });
  2485. // 更新表格数据
  2486. gz_tableData.splice(0, gz_tableData.length, ...combinedData);
  2487. }
  2488. });
  2489. dailygetGzByYgbh({date:date,code:ygbh}).then(response=>{
  2490. if(response.code==0){
  2491. gz_tableData2.splice(0, gz_tableData2.length, ...response.data);
  2492. }
  2493. })
  2494. }
  2495. const generateSummaryData = (data) => {
  2496. const summaryData = [];
  2497. let currentName = null;
  2498. let currentSummary = null;
  2499. data.forEach((item) => {
  2500. const name = item['员工姓名'].trim(); // 获取员工姓名并去除空格
  2501. if (name !== currentName) {
  2502. // 如果员工姓名发生改变,说明需要插入合计数据
  2503. if (currentSummary) {
  2504. // 将上一个员工的合计数据插入到数组中
  2505. summaryData.push(currentSummary);
  2506. }
  2507. // 创建新的合计数据
  2508. currentSummary = {
  2509. '员工姓名': name,
  2510. '日期': 0,
  2511. '计件工资': 0,
  2512. '加班工资': 0,
  2513. '计时时数': 0,
  2514. '计时工资': 0,
  2515. '日工资合计': 0
  2516. };
  2517. currentName = name;
  2518. }
  2519. // 更新合计数据
  2520. currentSummary['日期']++;
  2521. currentSummary['计件工资'] += parseFloat(item['计件工资']);
  2522. currentSummary['加班工资'] += parseFloat(item['加班工资']);
  2523. currentSummary['计时时数'] += parseFloat(item['计时时数']);
  2524. currentSummary['计时工资'] += parseFloat(item['计时工资']);
  2525. currentSummary['日工资合计'] += parseFloat(item['日工资合计']);
  2526. currentSummary['员工姓名']='合计('+currentSummary['日期']+'天)';
  2527. });
  2528. // 将最后一个员工的合计数据插入到数组中
  2529. if (currentSummary) {
  2530. summaryData.push(currentSummary);
  2531. }
  2532. // 将日期填充到表格中
  2533. summaryData.forEach((summary) => {
  2534. summary['计件工资'] = summary['计件工资'].toFixed(2); // 保留两位小数
  2535. summary['加班工资'] = summary['加班工资'].toFixed(2);
  2536. summary['计时时数'] = summary['计时时数'].toFixed(2);
  2537. summary['计时工资'] = summary['计时工资'].toFixed(2);
  2538. summary['日工资合计'] = summary['日工资合计'].toFixed(2);
  2539. });
  2540. return summaryData;
  2541. };
  2542. // const getImagePath = async (machineData.状态) => {
  2543. // return require(`@/assets/${status}.png`);
  2544. // }
  2545. const classbz=ref([])
  2546. const GDBH=ref()
  2547. //当前生产订单
  2548. const FacilityProduction = async () => {
  2549. const response = await facilityProduction({machine:JTMC});
  2550. if (response.code === 0) {
  2551. console.log(response)
  2552. if(response.data===null){
  2553. formData.value.工单编号 = '';
  2554. formData.value.印件号 = '';
  2555. formData.value.工序号 = '';
  2556. formData.value.工序名称 = '';
  2557. formData.value.产品名称 = '';
  2558. formData.value.班组Id=''
  2559. formData.value.machine=JTMC
  2560. formData.value.状态=''
  2561. let sczl_bhkey=''
  2562. let sczl_namekey=''
  2563. for (let i = 0; i < 6; i++) {
  2564. sczl_bhkey=`sczl_bh${i+1}`
  2565. sczl_namekey=`sczl_name${i+1}`
  2566. formData.value[sczl_bhkey] = '';
  2567. formData.value[sczl_namekey] = '';
  2568. }
  2569. console.log(sbzyData)
  2570. }else{
  2571. // 填充formData对象的基本字段
  2572. // formData.value.工单编号 = response.data.工单编号;
  2573. // formData.value.印件编号 = response.data.印件号;
  2574. // formData.value.工序名称 = response.data.工序名称;
  2575. // formData.value.产品名称 = response.data.产品名称;
  2576. // formData.value.班组 = response.data.班组编号;
  2577. formData.value.工单编号 = response.data.工单编号;
  2578. formData.value.印件号 = response.data.印件号;
  2579. formData.value.工序号 = response.data.工序名称.substring(0,2);
  2580. formData.value.工序名称 = response.data.工序名称;
  2581. formData.value.产品名称 = response.data.产品名称;
  2582. formData.value.班组成员 = response.data.班组成员;
  2583. formData.value.班组Id=response.data.班组Id
  2584. formData.value.machine=JTMC
  2585. formData.value.状态=response.data.状态
  2586. let sczl_bhkey=''
  2587. let sczl_namekey=''
  2588. if (response.data.班组成员) {
  2589. for (let i = 0; i < Math.min(Object.keys(response.data.班组成员).length, 6); i++) {
  2590. sczl_bhkey=`sczl_bh${i+1}`
  2591. sczl_namekey=`sczl_name${i+1}`
  2592. formData.value[sczl_bhkey] = response.data.班组成员[i]['编号'];
  2593. formData.value[sczl_namekey] = response.data.班组成员[i]['姓名'];
  2594. classbz.value[i]=response.data.班组成员[i]['编号']
  2595. }
  2596. }
  2597. formData.value.class=classbz.value.join(',')
  2598. formData.value.JTMC=JTMC
  2599. const responses = await MachineDetailList({workshop:CJMC.value});
  2600. if(responses.code===0){
  2601. responses.data.map(item=>{
  2602. if(item.设备编号==JTMC){
  2603. formData.value.status=item.状态
  2604. }
  2605. })
  2606. }
  2607. }
  2608. }
  2609. // getTableData()
  2610. }
  2611. let CJMC=ref()
  2612. //设备工作清单
  2613. const FacilityWorklist = async () => {
  2614. const response = await facilityWorklist({machine:JTMC});
  2615. if (response.code === 0) {
  2616. // console.log(response)
  2617. sbzyData.splice(0, sbzyData.length, ...response.data);
  2618. const res = await facilityProcedure({ Gd_gdbh: sbzyData[0]['工单编号|质量信息'].substring(0, 7) })
  2619. formData.value.productCode= response.data[0]['产品代号']
  2620. // console.log(res)
  2621. if (res.code === 0) {
  2622. selectData.value = res.data
  2623. }
  2624. // console.log('33333')
  2625. FacilityTeam(JTMC)
  2626. }
  2627. }
  2628. //检验记录
  2629. const InspectionRecord = async () => {
  2630. console.log(formData.value.班组)
  2631. const response = await inspectionRecord({machine:JTMC,Gd_gdbh:formData.value.工单编号,team:BZMC.value});
  2632. // const response = await inspectionRecord({machine:'JY01#',Gd_gdbh:'2311114',team:'A班'});
  2633. // const response = await inspectionRecord({machine:'JY01#',Gd_gdbh:'2312191',team:'A班'});
  2634. console.log(response)
  2635. if(response.code==0){
  2636. // 提取 inspectiontime 作为列名
  2637. // Extract inspectiontime as columnNames
  2638. columnNames = response.data.inspectiontime;
  2639. // Populate drzcData with row data
  2640. for (const key in response.data) {
  2641. if (key !== 'inspectiontime') {
  2642. const item = response.data[key];
  2643. const rowData = {
  2644. '工单编号': item['工单编号'],
  2645. '印件号': item['印件号'],
  2646. '工序名称': item['工序名称'],
  2647. '检验项目': item['检验项目']
  2648. };
  2649. // Initialize time columns with '—'
  2650. columnNames.forEach(time => {
  2651. rowData[time] = '';
  2652. });
  2653. // Split inspectresult and fill the corresponding time columns
  2654. const results = item['inspectresult'].split(',');
  2655. results.forEach(result => {
  2656. if (columnNames.includes(result)) {
  2657. rowData[result] = '√';
  2658. }else{rowData[result] = ''}
  2659. });
  2660. // Add the row data to drzcData
  2661. JYData.push(rowData);
  2662. }
  2663. }
  2664. console.log(JYData);
  2665. }
  2666. }
  2667. const dbclSelection = ref('')
  2668. //当班产量明细复选框
  2669. const dbclmxSelectionChange = (selection, type) => {
  2670. console.log(selection)
  2671. if (selection.length > 1) {
  2672. ElMessage({type: 'warning',message: '您只能选择一条进行删除!'})
  2673. // 重置选择项
  2674. dbclSelection.value = ''; // 清空之前的选择
  2675. selection.splice(0, selection.length); // 清空当前选择数组
  2676. return false;
  2677. }else{
  2678. const ids = selection.map(item => item.UniqId);
  2679. dbclSelection.value = ids.join(',');
  2680. console.log(dbclSelection.value)
  2681. }
  2682. }
  2683. //当班产量明细
  2684. const deldbcl_onclick = async () => {
  2685. console.log(dbclSelection.value)
  2686. if (dbclSelection.value !== '') {
  2687. try {
  2688. //产量上报数据删除
  2689. const res1 = await ChanliangDel({UniqId: dbclSelection.value})
  2690. if(res1.code === 0){
  2691. ElMessage.success('当班产量明细删除成功')
  2692. //当班产量明细
  2693. const response = await facilityDetail({ machine: JTMC, Gd_gdbh: formData.value.工单编号, team: BZMC.value });
  2694. console.log(response);
  2695. if (response.code === 0) {
  2696. CLMXData.splice(0, CLMXData.length, ...Object.values(response.data));
  2697. formData.value.production_now=response.data[0].产量
  2698. formData.value.production_all=response.data.total.产量
  2699. }
  2700. }
  2701. } catch(err) {
  2702. ElMessage.error(err)
  2703. }
  2704. }
  2705. }
  2706. const FacilityDetail = async () => {
  2707. console.log('123123')
  2708. console.log(JTMC)
  2709. console.log('123123')
  2710. console.log(formData.value.工单编号)
  2711. console.log('123123')
  2712. console.log(formData.value.班组)
  2713. formData.value.production_now=0
  2714. formData.value.production_all=0
  2715. // const response = await facilityDetail({ machine: JTMC, Gd_gdbh: formData.value.工单编号, team: formData.value.班组 });
  2716. const response = await facilityDetail({ machine: JTMC, Gd_gdbh: formData.value.工单编号, team: BZMC.value });
  2717. // const response = await facilityDetail({ machine: JTMC, Gd_gdbh: '2311114', team:'A班' });
  2718. if (response.code === 0) {
  2719. console.log('123123')
  2720. console.log(response);
  2721. CLMXData.splice(0, CLMXData.length, ...Object.values(response.data));
  2722. formData.value.production_now=response.data[0].产量
  2723. formData.value.production_all=response.data.total.产量
  2724. }
  2725. };
  2726. // 验证规则
  2727. const rule = reactive({
  2728. })
  2729. const searchRule = reactive({
  2730. createdAt: [
  2731. { validator: (rule, value, callback) => {
  2732. if (searchInfo.value.startCreatedAt && !searchInfo.value.endCreatedAt) {
  2733. callback(new Error('请填写结束日期'))
  2734. } else if (!searchInfo.value.startCreatedAt && searchInfo.value.endCreatedAt) {
  2735. callback(new Error('请填写开始日期'))
  2736. } else if (searchInfo.value.startCreatedAt && searchInfo.value.endCreatedAt && (searchInfo.value.startCreatedAt.getTime() === searchInfo.value.endCreatedAt.getTime() || searchInfo.value.startCreatedAt.getTime() > searchInfo.value.endCreatedAt.getTime())) {
  2737. callback(new Error('开始日期应当早于结束日期'))
  2738. } else {
  2739. callback()
  2740. }
  2741. }, trigger: 'change' }
  2742. ],
  2743. })
  2744. const elFormRef = ref()
  2745. const elSearchFormRef = ref()
  2746. // =========== 表格控制部分 ===========
  2747. const page = ref(1)
  2748. const total = ref(0)
  2749. const pageSize = ref(10)
  2750. const tableData = ref([])
  2751. const searchInfo = ref({})
  2752. const xunchaVisible = ref(false)
  2753. const xunchatreeData=ref([{label: '现场巡查记录',} ])
  2754. // 重置
  2755. const onReset = () => {
  2756. searchInfo.value = {}
  2757. getTableData()
  2758. }
  2759. // 搜索
  2760. const onSubmit = () => {
  2761. elSearchFormRef.value?.validate(async(valid) => {
  2762. if (!valid) return
  2763. page.value = 1
  2764. pageSize.value = 10
  2765. getTableData()
  2766. })
  2767. }
  2768. // 分页
  2769. const handleSizeChange = (val) => {
  2770. pageSize.value = val
  2771. getTableData()
  2772. }
  2773. // 修改页面容量
  2774. const handleCurrentChange = (val) => {
  2775. page.value = val
  2776. getTableData()
  2777. }
  2778. const getTableData = async () => {
  2779. const response = await facilityTab();
  2780. if (response.code === 0 && response.data) {
  2781. const workshops = response.data; // 车间数据
  2782. // 在推送新项之前将 treeData 重置为空数组
  2783. treeData.value = []; // 使用 .value 访问响应式引用的值
  2784. for (const workshopName in workshops) {
  2785. const workshopNode = {
  2786. label: workshopName,
  2787. children: [],
  2788. level: 1 // 添加层级属性
  2789. };
  2790. const machines = workshops[workshopName]; // 车间下的机器
  2791. for (const machineName in machines) {
  2792. const machineNode = {
  2793. label: machineName,
  2794. children: [],
  2795. level: 2, // 添加层级属性
  2796. parentNode: workshopNode
  2797. };
  2798. // Now that machineNode is initialized, you can refer to it
  2799. const childrenNodes = machines[machineName].map(dateTime => {
  2800. const dateOnly = dateTime.split(' ')[0];
  2801. return {
  2802. label: dateOnly,
  2803. machineName:machineName,
  2804. level: 3, // 添加层级属性
  2805. parentNode: machineNode
  2806. };
  2807. });
  2808. // Assign the childrenNodes to the machineNode's children property
  2809. machineNode.children = childrenNodes;
  2810. // Finally, push the machineNode to the workshopNode's children array
  2811. workshopNode.children.push(machineNode);
  2812. }
  2813. // 将 workshopNode 推送到响应式 treeData 数组
  2814. treeData.value.push(workshopNode);
  2815. }
  2816. }
  2817. };
  2818. // 查询
  2819. const getTableList = async() => {
  2820. const table = await getCompanyList({ page: page.value, pageSize: pageSize.value, ...searchInfo.value })
  2821. if (table.code === 0) {
  2822. tableData.value = table.data.list
  2823. total.value = table.data.total
  2824. page.value = table.data.page
  2825. pageSize.value = table.data.pageSize
  2826. }
  2827. }
  2828. getTableData()
  2829. const type2 = ref('')
  2830. // 修改班组产量提报
  2831. const JPchanliangVisibleedit = ref(false)
  2832. const JPformdataedit = reactive({
  2833. '工单编号':'',
  2834. '产品名称':'',
  2835. '印件号':'',
  2836. '印件名称':'',
  2837. '工序号':'',
  2838. '工序名称':'',
  2839. '日期':'',
  2840. '流程标牌':'',
  2841. '检验类别':'',
  2842. '废品率系数':'',
  2843. '计件箱数':'',
  2844. '每箱数量':'',
  2845. '换膜总工时':'',
  2846. '通电工时':'',
  2847. '定额代号':'',
  2848. '组员1': {'编号': '','姓名': '','比例': '',},
  2849. '组员2': {'编号': '','姓名': '','比例': '',},
  2850. '组员3': {'编号': '','姓名': '','比例': '',},
  2851. '组员4': {'编号': '','姓名': '','比例': '',},
  2852. '组员5': {'编号': '','姓名': '','比例': '',},
  2853. '组员6': {'编号': '','姓名': '','比例': '',},
  2854. '组员7': {'编号': '','姓名': '','比例': '',},
  2855. '组员8': {'编号': '','姓名': '','比例': '',},
  2856. '组员9': {'编号': '','姓名': '','比例': '',},
  2857. '组员10': {'编号': '','姓名': '','比例': '',}
  2858. })
  2859. // 双击JP当日上报产量
  2860. const JPgytableDatadoubleClick = async (row) => {
  2861. console.log(row)
  2862. JPformdataedit['工单编号'] = row['工单编号'];
  2863. JPformdataedit['产品名称'] = row['产品名称'];
  2864. JPformdataedit['印件号'] = row['yjno'];
  2865. JPformdataedit['印件名称'] = row['cpmc'];
  2866. JPformdataedit['工序号'] = row['gxh'];
  2867. JPformdataedit['工序名称'] = row['工序'];
  2868. JPformdataedit['检验类别'] = row['检验类型'];
  2869. JPformdataedit['废品率系数'] = row['废品率系数'];
  2870. JPformdataedit['日期'] = row['sczl_rq'];
  2871. JPformdataedit['机器'] = JTMC;
  2872. JPformdataedit['流程标牌'] = row['num'];
  2873. JPformdataedit['计件箱数'] = row['计件箱数'];
  2874. JPformdataedit['每箱数量'] = row['每箱数量'];
  2875. JPformdataedit['换膜总工时'] = row['换膜总工时'];
  2876. JPformdataedit['换膜补产工时'] = row['换膜补时'];
  2877. JPformdataedit['保养工时'] = row['保养工时'];
  2878. JPformdataedit['异常总工时'] = row['异常总工时'];
  2879. JPformdataedit['异常类型'] = row['异常类型'];
  2880. JPformdataedit['异常补贴工时'] = row['异常补时'];
  2881. JPformdataedit['通电工时'] = row['通电工时'];
  2882. JPformdataedit['定额代号'] = row['定额代号'];
  2883. JPformdataedit['bzdh'] = row['bzdh'];
  2884. for (let i = 1; i <= 10; i++) {
  2885. JPformdataedit[`组员${i}`]['编号'] = row[`sczl_bh${i}`];
  2886. }
  2887. for (let i = 1; i <= 10; i++) {
  2888. JPformdataedit[`组员${i}`]['姓名'] = row[`sczl_name${i}`];
  2889. }
  2890. for (let i = 1; i <= 10; i++) {
  2891. JPformdataedit[`组员${i}`]['比例'] = row[`sczl_rate${i}`];
  2892. }
  2893. // Object.assign(JPformdataedit,row);
  2894. JPchanliangVisibleedit.value = true
  2895. }
  2896. //当日上报产量确定
  2897. const JPenterDialogedit = async () => {
  2898. // console.log(JPformdataedit)
  2899. const JPformattedData = {
  2900. UniqId:uid.value,
  2901. sczl_jtbh:JTMC+'#',
  2902. sczl_gdbh: JPformdataedit['工单编号'],
  2903. sczl_yjno: JPformdataedit['印件号'],
  2904. sczl_gxh: JPformdataedit['工序号'],
  2905. sczl_gxmc: JPformdataedit['工序名称'],
  2906. sczl_type: JPformdataedit['检验类别'],
  2907. sczl_废品率系数: JPformdataedit['废品率系数'],
  2908. sczl_rq: JPformdataedit['日期'],
  2909. sczl_jtbh: JPformdataedit['机器'],
  2910. sczl_num: JPformdataedit['流程标牌'],
  2911. sczl_cl: JPformdataedit['计件箱数'],
  2912. sczl_Pgcl: JPformdataedit['每箱数量'],
  2913. sczl_装版总工时: JPformdataedit['换膜总工时'],
  2914. sczl_装版工时: JPformdataedit['换膜补产工时'],
  2915. sczl_保养工时: JPformdataedit['保养工时'],
  2916. sczl_异常停机工时: JPformdataedit['异常总工时'],
  2917. sczl_异常类型1: JPformdataedit['异常类型'],
  2918. sczl_异常工时1: JPformdataedit['异常补贴工时'],
  2919. sczl_设备运行工时: JPformdataedit['通电工时'],
  2920. sczl_dedh: JPformdataedit['定额代号'],
  2921. sczl_bzdh: JPformdataedit['bzdh'],
  2922. sczl_bh1: JPformdataedit.组员1['编号'],
  2923. sczl_bh2: JPformdataedit.组员2['编号'],
  2924. sczl_bh3: JPformdataedit.组员3['编号'],
  2925. sczl_bh4: JPformdataedit.组员4['编号'],
  2926. sczl_bh5: JPformdataedit.组员5['编号'],
  2927. sczl_bh6: JPformdataedit.组员6['编号'],
  2928. sczl_bh7: JPformdataedit.组员7['编号'],
  2929. sczl_bh8: JPformdataedit.组员8['编号'],
  2930. sczl_bh9: JPformdataedit.组员9['编号'],
  2931. sczl_bh10: JPformdataedit.组员10['编号'],
  2932. sczl_bh98:'',
  2933. sczl_rate1: JPformdataedit.组员1['比例'],
  2934. sczl_rate2: JPformdataedit.组员2['比例'],
  2935. sczl_rate3: JPformdataedit.组员3['比例'],
  2936. sczl_rate4: JPformdataedit.组员4['比例'],
  2937. sczl_rate5: JPformdataedit.组员5['比例'],
  2938. sczl_rate6: JPformdataedit.组员6['比例'],
  2939. sczl_rate7: JPformdataedit.组员7['比例'],
  2940. sczl_rate8: JPformdataedit.组员8['比例'],
  2941. sczl_rate9: JPformdataedit.组员9['比例'],
  2942. sczl_rate10: JPformdataedit.组员10['比例'],
  2943. };
  2944. console.log(JPformattedData)
  2945. const JpChanliangEdit_edit = await JpChanliangEdit(JPformattedData);
  2946. console.log(JpChanliangEdit_edit)
  2947. if (JpChanliangEdit_edit.code === 0) {
  2948. JPchanliangVisibleedit.value = false
  2949. JPmachineDetails();
  2950. ElMessage({type: 'success',message: '添加成功'})
  2951. } else {
  2952. ElMessage({type: 'error',message: '添加失败'})
  2953. }
  2954. }
  2955. //当日上报产量取消
  2956. const JPcloseDialogedit = async () => {
  2957. JPchanliangVisibleedit.value = false
  2958. }
  2959. //班组产量提报 JP检品机单独页面
  2960. const JPchanliangVisible = ref(false)
  2961. const JPformdata = reactive({
  2962. '工单编号':'',
  2963. '产品名称':'',
  2964. '印件号':'',
  2965. '印件名称':'',
  2966. '工序号':'',
  2967. '工序名称':'',
  2968. '日期':'',
  2969. '流程标牌':'',
  2970. '检验类别':'',
  2971. '废品率系数':'',
  2972. '计件箱数':'',
  2973. '每箱数量':'',
  2974. '换膜总工时':'',
  2975. '通电工时':'',
  2976. '定额代号':'',
  2977. '组员1': {'编号': '','姓名': '','比例': '',},
  2978. '组员2': {'编号': '','姓名': '','比例': '',},
  2979. '组员3': {'编号': '','姓名': '','比例': '',},
  2980. '组员4': {'编号': '','姓名': '','比例': '',},
  2981. '组员5': {'编号': '','姓名': '','比例': '',},
  2982. '组员6': {'编号': '','姓名': '','比例': '',},
  2983. '组员7': {'编号': '','姓名': '','比例': '',},
  2984. '组员8': {'编号': '','姓名': '','比例': '',},
  2985. '组员9': {'编号': '','姓名': '','比例': '',},
  2986. '组员10': {'编号': '','姓名': '','比例': '',}
  2987. })
  2988. //班组产量提报 JP检品机 班组产量提报确定
  2989. const JPenterDialog = async() => {
  2990. // console.log(JPformdata)
  2991. const JPformattedData = {
  2992. sczl_jtbh:JTMC+'#',
  2993. sczl_gdbh: JPformdata['工单编号'],
  2994. sczl_yjno: JPformdata['印件号'],
  2995. sczl_gxh: JPformdata['工序号'],
  2996. sczl_gxmc: JPformdata['工序名称'],
  2997. sczl_rq: JPformdata['日期'],
  2998. sczl_num: JPformdata['流程标牌'],
  2999. sczl_type: JPformdata['检验类别'],
  3000. sczl_废品率系数: JPformdata['废品率系数'],
  3001. sczl_cl: JPformdata['计件箱数'],
  3002. sczl_Pgcl: JPformdata['每箱数量'],
  3003. sczl_装版工时: JPformdata['换膜总工时'],
  3004. sczl_设备运行工时: JPformdata['通电工时'],
  3005. sczl_dedh: JPformdata['定额代号'],
  3006. sczl_bzdh: JPformdata['bzdh'],
  3007. sczl_bh1: JPformdata.组员1['编号'],
  3008. sczl_bh2: JPformdata.组员2['编号'],
  3009. sczl_bh3: JPformdata.组员3['编号'],
  3010. sczl_bh4: JPformdata.组员4['编号'],
  3011. sczl_bh5: JPformdata.组员5['编号'],
  3012. sczl_bh6: JPformdata.组员6['编号'],
  3013. sczl_bh7: JPformdata.组员7['编号'],
  3014. sczl_bh8: JPformdata.组员8['编号'],
  3015. sczl_bh9: JPformdata.组员9['编号'],
  3016. sczl_bh10: JPformdata.组员10['编号'],
  3017. sczl_bh98:'',
  3018. sczl_rate1: JPformdata.组员1['比例'],
  3019. sczl_rate2: JPformdata.组员2['比例'],
  3020. sczl_rate3: JPformdata.组员3['比例'],
  3021. sczl_rate4: JPformdata.组员4['比例'],
  3022. sczl_rate5: JPformdata.组员5['比例'],
  3023. sczl_rate6: JPformdata.组员6['比例'],
  3024. sczl_rate7: JPformdata.组员7['比例'],
  3025. sczl_rate8: JPformdata.组员8['比例'],
  3026. sczl_rate9: JPformdata.组员9['比例'],
  3027. sczl_rate10: JPformdata.组员10['比例'],
  3028. };
  3029. console.log(JPformattedData)
  3030. const JpUploade_edit = await JpUploade(JPformattedData);
  3031. console.log(JpUploade_edit)
  3032. if (JpUploade_edit.code === 0) {
  3033. JPchanliangVisible.value = false
  3034. ElMessage({type: 'success',message: '添加成功'})
  3035. } else {
  3036. ElMessage({type: 'error',message: '添加失败'})
  3037. }
  3038. }
  3039. //班组产量提报 JP检品机 班组产量提报取消
  3040. const JPcloseDialog = async() => {
  3041. JPchanliangVisible.value = false
  3042. }
  3043. //班组产量提报 回车JPent
  3044. const JPemployeeDatalistedit = ref('')
  3045. const JPblModellistedit = ref(false)
  3046. const JPdialogSelectVisible_LXedit = ref(false)
  3047. const JPtableDataedit = ref([
  3048. { name: '废品版', type: '废品版' },
  3049. { name: '正品版', type: '正品版' },
  3050. ])
  3051. const JPhandleRowClickedit = async (row) => {
  3052. JPformdataedit['检验类别'] = row['name']
  3053. JPdialogSelectVisible_LXedit.value = false
  3054. }
  3055. //工单编号回车事件
  3056. const JPgetCPMCsubmitedit = () => {
  3057. // console.log(12)
  3058. // getMachineReportInfos();
  3059. if(JPformdataedit.工单编号!=''){
  3060. ChanliangWorkorder({search:JPformdataedit['工单编号'],machine:JTMC}).then(response=>{
  3061. // console.log(response)
  3062. if (response.code === 0) {
  3063. if(response.data){
  3064. JPformdataedit['产品名称'] = response.data[0].cpmc
  3065. document.getElementById('产品名称').style.color = 'red';
  3066. // JPgetYJMCsubmit()
  3067. }else{
  3068. ElMessage({
  3069. type: 'error',
  3070. message: response.msg
  3071. })
  3072. JPformdataedit['工单编号'] = '';
  3073. JPformdataedit['产品名称'] = '';
  3074. document.getElementById('产品名称').style.color = 'black';
  3075. }
  3076. }else{
  3077. JPformdataedit['工单编号'] = '';
  3078. JPformdataedit['产品名称'] = '';
  3079. document.getElementById('产品名称').style.color = 'black';
  3080. }
  3081. });
  3082. }else{
  3083. ElMessage({
  3084. type: 'error',
  3085. message: '请注意, 工单编号输入空置, 除非有特殊需要!'
  3086. })
  3087. gxmc.value = '';
  3088. document.getElementById('产品名称').style.color = 'black';
  3089. }
  3090. }
  3091. //印件选择
  3092. const JPdialogSelectVisible_Yjedit = ref(false)
  3093. const JPselectData_Yjedit = reactive([])
  3094. // 处理选择框
  3095. const JPhandleSelectClick_Yjedit = (row, column, event) => {
  3096. const { yjno, yjmc, ls } = row
  3097. JPformdataedit['印件号'] = yjno
  3098. JPformdataedit['印件名称'] = yjmc
  3099. JPdialogSelectVisible_Yjedit.value = false
  3100. }
  3101. const JPselect_Yjedit = (event) => {
  3102. if (event.keyCode === 40) { // 向下箭头
  3103. if (currentIndex.value < JPselectData_Yjedit.length - 1) {
  3104. currentIndex.value++;
  3105. JPsetCurrent_Yjedit(JPselectData_Yjedit[currentIndex.value]);
  3106. } else {
  3107. currentIndex.value = 0;
  3108. JPsetCurrent_Yjedit(JPselectData_Yjedit[currentIndex.value]); // 到达最后一行时回到第一行
  3109. }
  3110. } else if (event.keyCode === 38) { // 向上箭头
  3111. if (currentIndex.value > 0) {
  3112. currentIndex.value--;
  3113. JPsetCurrent_Yjedit(JPselectData_Yjedit[currentIndex.value]);
  3114. } else {
  3115. currentIndex.value = JPselectData_Yjedit.length - 1;
  3116. JPsetCurrent_Yjedit(JPselectData_Yjedit[currentIndex.value]); // 到达第一行时回到最后一行
  3117. }
  3118. } else if (event.keyCode === 13) { // 回车键
  3119. JPdialogSelectVisible_Yjedit.value = false;
  3120. }
  3121. }
  3122. //工序选择
  3123. const JPdialogSelectVisible_Gxedit = ref(false)
  3124. const JPselectData_Gxedit = reactive([])
  3125. const JPtable_Gxedit = ref()
  3126. // 处理选择框
  3127. const JPhandleSelectClick_Gxedit = (row, column, event) => {
  3128. const { gxh, name, gxmc } = row
  3129. JPformdataedit['工序号'] = gxh
  3130. JPformdataedit['工序名称'] = name
  3131. JPdialogSelectVisible_Gxedit.value = false
  3132. }
  3133. const JPentedit = async (event,key,val) => {
  3134. if(event.keyCode === 13){
  3135. //组员及比例分配
  3136. if(event.keyCode === 13 && val === '1'){
  3137. let bzyg=''
  3138. bzyg=`组员${key}`
  3139. let bzxm=''
  3140. bzxm=`组员${key}`
  3141. if(JPformdataedit[bzyg]['编号']){
  3142. const getYg_response = await getYg({sczl_bh:JPformdataedit[bzyg]['编号']});
  3143. // console.log(getYg_response)
  3144. if (getYg_response.code === 0) {
  3145. if(getYg_response.data.length === 1){
  3146. JPformdataedit[bzyg]['姓名'] = getYg_response.data[0].ygxm
  3147. JPformdataedit[bzyg]['编号'] = getYg_response.data[0].员工编号
  3148. }else{
  3149. JPblModellistedit.value = true;
  3150. // console.log(getYg_response.data)
  3151. JPemployeeDatalistedit.value = getYg_response.data // 假设响应数据是数组
  3152. }
  3153. }
  3154. }
  3155. }
  3156. if(event.target.id === '检验类别'){
  3157. JPdialogSelectVisible_LXedit.value = true
  3158. }
  3159. if(event.target.id === '印件号'){
  3160. if(JPformdataedit['工单编号']!=''){
  3161. //获取印件名称
  3162. ChanliangPrintDetail({gdbh:JPformdataedit['工单编号']}).then(response=>{
  3163. console.log(response)
  3164. if (response.code === 0) {
  3165. if(response.data){
  3166. if(response.data.length==1){
  3167. JPformdataedit['印件号'] = response.data[0].yjno
  3168. JPformdataedit['印件名称'] = response.data[0].yjmc
  3169. setColorReadonly('印件名称')
  3170. }else{
  3171. JPselectData_Yjedit.splice(0, JPselectData_Yjedit.length, ...response.data)
  3172. JPdialogSelectVisible_Yjedit.value=true
  3173. }
  3174. }else{
  3175. ElMessage({
  3176. type: 'error',
  3177. message: response.msg
  3178. })
  3179. }
  3180. }
  3181. });
  3182. }else{
  3183. ElMessage({
  3184. type: 'error',
  3185. message: '印件编号不存在, 将恢复默认值, 请仔细确认数据准确性!'
  3186. })
  3187. }
  3188. }
  3189. if(event.target.id === '工序号'){
  3190. //弹出选择
  3191. ChanliangProcessDetail({gdbh:JPformdataedit['工单编号'],yjno:JPformdataedit['印件号'],machine:''}).then(response=>{
  3192. console.log(response)
  3193. if (response.code === 0) {
  3194. if(response.data){
  3195. if(response.data.length === 1){
  3196. JPformdataedit['工序号']=response.data[0].gxh
  3197. JPformdataedit['工序名称']=response.data[0].name
  3198. }else{
  3199. JPselectData_Gxedit.splice(0, JPselectData_Gxedit.length, ...response.data)
  3200. JPdialogSelectVisible_Gxedit.value = true
  3201. }
  3202. }else{
  3203. ElMessage({
  3204. type: 'error',
  3205. message: response.msg
  3206. })
  3207. }
  3208. }
  3209. })
  3210. }
  3211. }
  3212. const inputs = document.getElementsByTagName('input');
  3213. const currentIndex = Array.from(inputs).indexOf(event.target);
  3214. if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
  3215. let nextIndex = currentIndex + 1;
  3216. while (nextIndex < inputs.length) {
  3217. if (inputs[nextIndex].disabled) {
  3218. console.log("当前输入框为disabled,跳过");
  3219. nextIndex++; // 跳过disabled的输入框
  3220. continue;
  3221. }
  3222. if (!inputs[nextIndex].readOnly) {
  3223. nextTick(() => {
  3224. inputs[nextIndex].focus();
  3225. inputs[nextIndex].select();
  3226. });
  3227. break;
  3228. }
  3229. nextIndex++;
  3230. }
  3231. }
  3232. else if (event.keyCode === 38) { // 向上箭头
  3233. for (let i = currentIndex - 1; i >= 0; i--) {
  3234. if (!inputs[i].readOnly) {
  3235. nextTick(()=>{
  3236. inputs[i].focus();
  3237. inputs[i].select();
  3238. })
  3239. break;
  3240. }
  3241. }
  3242. } else if (event.keyCode === 8) { // 删除箭头
  3243. if (event.target.selectionStart === 0) {
  3244. for (let i = currentIndex - 1; i >= 0; i--) {
  3245. if (!inputs[i].readOnly) {
  3246. nextTick(()=>{
  3247. inputs[i].focus();
  3248. inputs[i].setSelectionRange(0, 0);
  3249. })
  3250. break;
  3251. }
  3252. }
  3253. }
  3254. } else if (event.keyCode === 37) { // 向左箭头
  3255. if (event.target.selectionStart === 0) {
  3256. for (let i = currentIndex - 1; i >= 0; i--) {
  3257. if (!inputs[i].readOnly) {
  3258. nextTick(()=>{
  3259. inputs[i].focus();
  3260. inputs[i].select();
  3261. })
  3262. break;
  3263. }
  3264. }
  3265. }
  3266. } else if (event.keyCode === 39) { // 向右箭头
  3267. if (event.target.selectionStart === event.target.value.length) {
  3268. for (let i = currentIndex + 1; i < inputs.length; i++) {
  3269. if (!inputs[i].readOnly) {
  3270. nextTick(()=>{
  3271. inputs[i].focus();
  3272. inputs[i].select();
  3273. })
  3274. break;
  3275. }
  3276. }
  3277. }
  3278. }
  3279. }
  3280. //班组产量提报 打开新增页面
  3281. const onADD = async() => {
  3282. // function onADD(){
  3283. console.log(JTMC)
  3284. //判断是否为JP 检品机器【是检品机独立页面】
  3285. if (JTMC.startsWith('JP')) {
  3286. JPchanliangVisible.value = true
  3287. //获取当天日期接口
  3288. getTimelistss();
  3289. //获取产量上报数据信息接口
  3290. getMachineReportInfos();
  3291. } else {
  3292. type2.value="create"
  3293. //通过车间名称查询机台【机器】
  3294. gdzl_MachineList({address:CJMC.value}).then( MachineList_jitai =>{
  3295. gdzl_MachineList_address.data = MachineList_jitai.data;
  3296. });
  3297. //打开新增按钮获取
  3298. qita_jitaidata();
  3299. if(uid.value == undefined){
  3300. initfordata3()
  3301. chanliangVisible.value=true
  3302. return
  3303. }
  3304. const response = await MachineChanliangDetail({UniqId:uid.value});
  3305. if (response.code === 0) {
  3306. chanliangVisible.value=true
  3307. formdata3.value=response.data
  3308. const result=formdata3.value.gxmc.match(/-(.{2})/)
  3309. formdata3.value.gymc=result[1]
  3310. formdata3.value.sczl_jtbh=JTMC
  3311. formdata3.value.yjmc=response.data.印件名称
  3312. formdata3.value.rq=date
  3313. if (formdata3.value.bzdh === 'A班') {
  3314. formdata3.value.starttime = ''; // 清空值
  3315. setTimeout(()=>{
  3316. formdata3.value.starttime = date + " 08:30:00"; // 设置为 20:30:00
  3317. })
  3318. } else if (formdata3.value.bzdh === 'B班') {
  3319. formdata3.value.starttime = ''; // 清空值
  3320. setTimeout(()=>{
  3321. formdata3.value.starttime = date + " 20:30:00"; // 设置为 20:30:00
  3322. })
  3323. }
  3324. //部分数据置空
  3325. formdata3.value.产量 = '';
  3326. formdata3.value.制程废品 = '0.0';
  3327. formdata3.value.制程次品 = '0.0';
  3328. formdata3.value.前工序废 = '0.0';
  3329. formdata3.value.来料异常 = '0.0';
  3330. formdata3.value.装版工时 = '0.00';
  3331. formdata3.value.装版补产工时 = '0.00';
  3332. formdata3.value.打样工时 = '0.00';
  3333. formdata3.value.打样补产工时 = '0.00';
  3334. formdata3.value.保养工时 = '0.00';
  3335. formdata3.value.异常总工时 = '0.00';
  3336. formdata3.value.通电工时 = '0.00';
  3337. console.log(formdata3.value)
  3338. }
  3339. }
  3340. }
  3341. //班组产量提报 获取当天日期接口
  3342. const getTimelistss = async () => {
  3343. const getTimelistss = await getTimelist();
  3344. console.log(getTimelistss)
  3345. JPformdata['日期'] = getTimelistss.data.date
  3346. }
  3347. //班组产量提报 获取产量上报数据信息接口
  3348. const getMachineReportInfos = async () => {
  3349. const getMachineReportInfos = await reportInfo({machine:JTMC = JTMC.replace(/#/g, '')});
  3350. console.log(getMachineReportInfos)
  3351. JPformdata['bzdh'] = getMachineReportInfos.data.class.sczl_bzdh
  3352. JPformdata['工单编号'] = _rclsb_gdbh.value
  3353. JPformdata['产品名称'] = getMachineReportInfos.data.order_info.product_name
  3354. JPformdata['定额代号'] = getMachineReportInfos.data.order_info.dedh
  3355. for (let i = 1; i <= 10; i++) {
  3356. JPformdata[`组员${i}`]['比例'] = getMachineReportInfos.data.class[`sczl_rate${i}`];
  3357. }
  3358. }
  3359. //工单编号回车事件
  3360. const JPgetCPMCsubmit = () => {
  3361. // console.log(12)
  3362. // getMachineReportInfos();
  3363. if(JPformdata.工单编号!=''){
  3364. ChanliangWorkorder({search:JPformdata['工单编号'],machine:JTMC}).then(response=>{
  3365. // console.log(response)
  3366. if (response.code === 0) {
  3367. if(response.data){
  3368. JPformdata['产品名称'] = response.data[0].cpmc
  3369. document.getElementById('产品名称').style.color = 'red';
  3370. // JPgetYJMCsubmit()
  3371. }else{
  3372. ElMessage({
  3373. type: 'error',
  3374. message: response.msg
  3375. })
  3376. JPformdata['工单编号'] = '';
  3377. JPformdata['产品名称'] = '';
  3378. document.getElementById('产品名称').style.color = 'black';
  3379. }
  3380. }else{
  3381. JPformdata['工单编号'] = '';
  3382. JPformdata['产品名称'] = '';
  3383. document.getElementById('产品名称').style.color = 'black';
  3384. }
  3385. });
  3386. }else{
  3387. ElMessage({
  3388. type: 'error',
  3389. message: '请注意, 工单编号输入空置, 除非有特殊需要!'
  3390. })
  3391. gxmc.value = '';
  3392. document.getElementById('产品名称').style.color = 'black';
  3393. }
  3394. }
  3395. //印件选择
  3396. const JPdialogSelectVisible_Yj = ref(false)
  3397. const JPselectData_Yj = reactive([])
  3398. // 处理选择框
  3399. const JPhandleSelectClick_Yj = (row, column, event) => {
  3400. const { yjno, yjmc, ls } = row
  3401. JPformdata['印件号'] = yjno
  3402. JPformdata['印件名称'] = yjmc
  3403. JPdialogSelectVisible_Yj.value = false
  3404. }
  3405. const JPselect_Yj = (event) => {
  3406. if (event.keyCode === 40) { // 向下箭头
  3407. if (currentIndex.value < JPselectData_Yj.length - 1) {
  3408. currentIndex.value++;
  3409. JPsetCurrent_Yj(JPselectData_Yj[currentIndex.value]);
  3410. } else {
  3411. currentIndex.value = 0;
  3412. JPsetCurrent_Yj(JPselectData_Yj[currentIndex.value]); // 到达最后一行时回到第一行
  3413. }
  3414. } else if (event.keyCode === 38) { // 向上箭头
  3415. if (currentIndex.value > 0) {
  3416. currentIndex.value--;
  3417. JPsetCurrent_Yj(JPselectData_Yj[currentIndex.value]);
  3418. } else {
  3419. currentIndex.value = JPselectData_Yj.length - 1;
  3420. JPsetCurrent_Yj(JPselectData_Yj[currentIndex.value]); // 到达第一行时回到最后一行
  3421. }
  3422. } else if (event.keyCode === 13) { // 回车键
  3423. JPdialogSelectVisible_Yj.value = false;
  3424. }
  3425. }
  3426. //工序选择
  3427. const JPdialogSelectVisible_Gx = ref(false)
  3428. const JPselectData_Gx = reactive([])
  3429. const JPtable_Gx = ref()
  3430. // 处理选择框
  3431. const JPhandleSelectClick_Gx = (row, column, event) => {
  3432. const { gxh, name, gxmc } = row
  3433. JPformdata['工序号'] = gxh
  3434. JPformdata['工序名称'] = name
  3435. JPdialogSelectVisible_Gx.value = false
  3436. }
  3437. //班组产量提报 回车JPent
  3438. const JPemployeeDatalist = ref('')
  3439. const JPblModellist = ref(false)
  3440. const JPdialogSelectVisible_LX = ref(false)
  3441. const JPtableData = ref([
  3442. { name: '废品版', type: '废品版' },
  3443. { name: '正品版', type: '正品版' },
  3444. ])
  3445. const JPhandleRowClick = async (row) => {
  3446. JPformdata['检验类别'] = row['name']
  3447. JPdialogSelectVisible_LX.value = false
  3448. }
  3449. const JPent = async (event,key,val) => {
  3450. if(event.keyCode === 13){
  3451. //组员及比例分配
  3452. if(event.keyCode === 13 && val === '1'){
  3453. let bzyg=''
  3454. bzyg=`组员${key}`
  3455. let bzxm=''
  3456. bzxm=`组员${key}`
  3457. if(JPformdata[bzyg]['编号']){
  3458. const getYg_response = await getYg({sczl_bh:JPformdata[bzyg]['编号']});
  3459. console.log(getYg_response)
  3460. if (getYg_response.code === 0) {
  3461. if(getYg_response.data.length === 1){
  3462. JPformdata[bzyg]['姓名'] = getYg_response.data[0].ygxm
  3463. JPformdata[bzyg]['编号'] = getYg_response.data[0].员工编号
  3464. }else{
  3465. console.log(456)
  3466. JPblModellist.value = true;
  3467. // console.log(getYg_response.data)
  3468. JPemployeeDatalist.value = getYg_response.data // 假设响应数据是数组
  3469. }
  3470. }
  3471. }
  3472. }
  3473. if(event.target.id === '检验类别'){
  3474. JPdialogSelectVisible_LX.value = true
  3475. }
  3476. if(event.target.id === '印件号'){
  3477. if(JPformdata['工单编号']!=''){
  3478. //获取印件名称
  3479. ChanliangPrintDetail({gdbh:JPformdata['工单编号']}).then(response=>{
  3480. // console.log(response)
  3481. if (response.code === 0) {
  3482. if(response.data){
  3483. if(response.data.length==1){
  3484. JPformdata['印件号'] = response.data[0].yjno
  3485. JPformdata['印件名称'] = response.data[0].yjmc
  3486. setColorReadonly('印件名称')
  3487. }else{
  3488. JPselectData_Yj.splice(0, JPselectData_Yj.length, ...response.data)
  3489. JPdialogSelectVisible_Yj.value=true
  3490. }
  3491. }else{
  3492. ElMessage({
  3493. type: 'error',
  3494. message: response.msg
  3495. })
  3496. }
  3497. }
  3498. });
  3499. }else{
  3500. ElMessage({
  3501. type: 'error',
  3502. message: '印件编号不存在, 将恢复默认值, 请仔细确认数据准确性!'
  3503. })
  3504. }
  3505. }
  3506. if(event.target.id === '工序号'){
  3507. //弹出选择
  3508. ChanliangProcessDetail({gdbh:JPformdata['工单编号'],yjno:JPformdata['印件号'],machine:''}).then(response=>{
  3509. // console.log(response)
  3510. if (response.code === 0) {
  3511. if(response.data){
  3512. if(response.data.length === 1){
  3513. JPformdata['工序号']=response.data[0].gxh
  3514. JPformdata['工序名称']=response.data[0].name
  3515. }else{
  3516. JPselectData_Gx.splice(0, JPselectData_Gx.length, ...response.data)
  3517. JPdialogSelectVisible_Gx.value = true
  3518. }
  3519. }else{
  3520. ElMessage({
  3521. type: 'error',
  3522. message: response.msg
  3523. })
  3524. }
  3525. }
  3526. })
  3527. }
  3528. }
  3529. const inputs = document.getElementsByTagName('input');
  3530. const currentIndex = Array.from(inputs).indexOf(event.target);
  3531. if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
  3532. let nextIndex = currentIndex + 1;
  3533. while (nextIndex < inputs.length) {
  3534. if (inputs[nextIndex].disabled) {
  3535. console.log("当前输入框为disabled,跳过");
  3536. nextIndex++; // 跳过disabled的输入框
  3537. continue;
  3538. }
  3539. if (!inputs[nextIndex].readOnly) {
  3540. nextTick(() => {
  3541. inputs[nextIndex].focus();
  3542. inputs[nextIndex].select();
  3543. });
  3544. break;
  3545. }
  3546. nextIndex++;
  3547. }
  3548. }
  3549. else if (event.keyCode === 38) { // 向上箭头
  3550. for (let i = currentIndex - 1; i >= 0; i--) {
  3551. if (!inputs[i].readOnly) {
  3552. nextTick(()=>{
  3553. inputs[i].focus();
  3554. inputs[i].select();
  3555. })
  3556. break;
  3557. }
  3558. }
  3559. } else if (event.keyCode === 8) { // 删除箭头
  3560. if (event.target.selectionStart === 0) {
  3561. for (let i = currentIndex - 1; i >= 0; i--) {
  3562. if (!inputs[i].readOnly) {
  3563. nextTick(()=>{
  3564. inputs[i].focus();
  3565. inputs[i].setSelectionRange(0, 0);
  3566. })
  3567. break;
  3568. }
  3569. }
  3570. }
  3571. } else if (event.keyCode === 37) { // 向左箭头
  3572. if (event.target.selectionStart === 0) {
  3573. for (let i = currentIndex - 1; i >= 0; i--) {
  3574. if (!inputs[i].readOnly) {
  3575. nextTick(()=>{
  3576. inputs[i].focus();
  3577. inputs[i].select();
  3578. })
  3579. break;
  3580. }
  3581. }
  3582. }
  3583. } else if (event.keyCode === 39) { // 向右箭头
  3584. if (event.target.selectionStart === event.target.value.length) {
  3585. for (let i = currentIndex + 1; i < inputs.length; i++) {
  3586. if (!inputs[i].readOnly) {
  3587. nextTick(()=>{
  3588. inputs[i].focus();
  3589. inputs[i].select();
  3590. })
  3591. break;
  3592. }
  3593. }
  3594. }
  3595. }
  3596. }
  3597. const JPclickedlist = ref(false);
  3598. const JPtablebllickHandlerlist = async (row, column, event) => {
  3599. if (JPclickedlist.value) {
  3600. // 如果已经点击过一次,则不再执行操作
  3601. return;
  3602. }
  3603. let nextIndex = 1;
  3604. while (JPformdata[`组员${nextIndex}`]['编号'] !== '') {
  3605. nextIndex++;
  3606. if (nextIndex > 10) {
  3607. // 如果所有字段都已经填满,则不做任何事情并退出函数
  3608. return;
  3609. }
  3610. }
  3611. // 将选定的值分配给下一个空的代码和名称字段
  3612. JPformdata[`组员${nextIndex-1}`]['编号'] = row.员工编号;
  3613. JPformdata[`组员${nextIndex-1}`]['姓名'] = row.ygxm;
  3614. JPblModellist.value = false;
  3615. JPclickedlist.value = true;
  3616. setTimeout(() => {
  3617. JPclickedlist.value = false;
  3618. }, 300); // 300毫秒内再次点击将不会触发事件,你可以根据需要调整这个延迟时间
  3619. };
  3620. const JPclickedlistedit = ref(false);
  3621. const JPtablebllickHandlerlistedit = async (row, column, event) => {
  3622. if (JPclickedlistedit.value) {
  3623. // 如果已经点击过一次,则不再执行操作
  3624. return;
  3625. }
  3626. let nextIndex = 1;
  3627. while (JPformdataedit[`组员${nextIndex}`]['编号'] !== '') {
  3628. nextIndex++;
  3629. if (nextIndex > 10) {
  3630. // 如果所有字段都已经填满,则不做任何事情并退出函数
  3631. return;
  3632. }
  3633. }
  3634. // 将选定的值分配给下一个空的代码和名称字段
  3635. JPformdataedit[`组员${nextIndex-1}`]['编号'] = row.员工编号;
  3636. JPformdataedit[`组员${nextIndex-1}`]['姓名'] = row.ygxm;
  3637. JPblModellistedit.value = false;
  3638. JPclickedlistedit.value = true;
  3639. setTimeout(() => {
  3640. JPclickedlistedit.value = false;
  3641. }, 300); // 300毫秒内再次点击将不会触发事件,你可以根据需要调整这个延迟时间
  3642. };
  3643. const Selection_ids = ref('')
  3644. // 印件资料多选、工艺资料多选
  3645. const selectionChange = (selection) => {
  3646. const ids = selection.map(item => {
  3647. return item.UniqId
  3648. })
  3649. Selection_ids.value = ids.join(',')
  3650. }
  3651. //删除
  3652. function onDel() {
  3653. Chanliangdel()
  3654. }
  3655. // 日产量上报删除
  3656. const Chanliangdel = async() => {
  3657. if(!Selection_ids.value){
  3658. ElMessage({
  3659. type: 'warning',
  3660. message: '请勾选要删除的数据'
  3661. })
  3662. return
  3663. }
  3664. const res = await ChanliangDel({ UniqId:Selection_ids.value})
  3665. if (res.code === 0) {
  3666. ElMessage({
  3667. type: 'success',
  3668. message: '成功'
  3669. })
  3670. FacilitychanLiang()
  3671. }else{
  3672. ElMessage({
  3673. type: 'error',
  3674. message: '失败'
  3675. })
  3676. }
  3677. }
  3678. //核算调整
  3679. function hesuan(){
  3680. hesuanVisible.value=true
  3681. }
  3682. //制程检验
  3683. const zhichengstatus=ref(false)
  3684. const xunchaData = ref([]);
  3685. const zhichengVisible = ref(false)
  3686. const zhichengtreeData=ref([{
  3687. label: '首件与过程确认'
  3688. },{
  3689. label: '机台检验'
  3690. },{
  3691. label: 'IPQC检验'
  3692. }])
  3693. const onzhicheng = async () => {
  3694. zhichengstatus.value=false
  3695. xunchaData.value=[]
  3696. const response = await reportProduceInfo({machine:JTMC.split("#")[0]});
  3697. if (response.code === 0) {
  3698. xunchaData.value.order=response.data.order
  3699. xunchaData.value.yjno=response.data.yjno
  3700. xunchaData.value.product_name=response.data.product_name
  3701. xunchaData.value.gxmc=response.data.gxmc
  3702. xunchaData.value.lcdh=0
  3703. xunchaData.value.sczl_bh=''
  3704. xunchaData.value.sczl_name=''
  3705. xunchaData.value.remark=''
  3706. zhichengVisible.value = true;
  3707. }
  3708. }
  3709. const category =ref()
  3710. const zhibiaoselectData=ref([])
  3711. const fujiaselectData=ref([])
  3712. const zhichengNodeClick = (node, check) => {
  3713. if(node.label){
  3714. zhichengstatus.value=true
  3715. category.value=node.label
  3716. processInspectionRecordsItem()
  3717. }
  3718. };
  3719. //工单打印
  3720. const pd_gdprintonClick = () => {
  3721. if(formData.value.工单编号==''){
  3722. ElMessage({ type: 'warning', message: '未获取到工单' });
  3723. return
  3724. }
  3725. printPageRef.value.open(formData.value.工单编号)
  3726. }
  3727. const processInspectionRecordsItem = async (value) => {
  3728. const response = await ProcessInspectionRecordsItem({ process: xunchaData.value.gxmc });
  3729. if (response.code === 0) {
  3730. zhibiaoselectData.value=response.data.首件.指标检验.map(item=>{
  3731. item.notjc=true;
  3732. item.zc=false;
  3733. item.yc=false;
  3734. item.remark=''
  3735. item.category=category.value
  3736. item.workOrder=xunchaData.value.order
  3737. item.yjno=xunchaData.value.yjno
  3738. item.flow=xunchaData.value.lcdh
  3739. item.team=BZMC.value
  3740. item.machine=JTMC.split("#")[0]
  3741. item.selected = '不检测';
  3742. return item
  3743. })
  3744. fujiaselectData.value=response.data.首件.附加.map(item=>{
  3745. item.notjc=true;
  3746. item.workOrder=xunchaData.value.order
  3747. item.yjno=xunchaData.value.yjno
  3748. item.flow=xunchaData.value.lcdh
  3749. item.machine=JTMC.split("#")[0]
  3750. return item
  3751. })
  3752. }
  3753. };
  3754. const zhichengDialog = async () => {
  3755. console.log(zhibiaoselectData.value)
  3756. // return
  3757. let arr =[]
  3758. zhibiaoselectData.value.map(item=>{
  3759. if(item.zc==true){
  3760. item.result='合格'
  3761. item.item=item.检验项目
  3762. item.instrument=item.检测方法
  3763. item.standard=item.相关标准
  3764. delete item.notjc
  3765. delete item.zc
  3766. delete item.yc
  3767. delete item.检验项目
  3768. delete item.检测方法
  3769. delete item.相关标准
  3770. delete item.检验频率
  3771. arr.push(item)
  3772. return item
  3773. }
  3774. if(item.yc==true){
  3775. item.result='不合格'
  3776. item.item=item.检验项目
  3777. item.instrument=item.检测方法
  3778. item.standard=item.相关标准
  3779. delete item.notjc
  3780. delete item.zc
  3781. delete item.yc
  3782. delete item.检验项目
  3783. delete item.检测方法
  3784. delete item.相关标准
  3785. delete item.检验频率
  3786. arr.push(item)
  3787. return item
  3788. }
  3789. if(item.notjc==true){
  3790. item.result='不检测'
  3791. item.item=item.检验项目
  3792. item.instrument=item.检测方法
  3793. item.standard=item.相关标准
  3794. delete item.notjc
  3795. delete item.zc
  3796. delete item.yc
  3797. delete item.检验项目
  3798. delete item.检测方法
  3799. delete item.相关标准
  3800. delete item.检验频率
  3801. // arr.push(item)
  3802. return item
  3803. }
  3804. })
  3805. let arrs=[]
  3806. let fujiastatus=0
  3807. fujiaselectData.value.map(item=>{
  3808. if(item.notjc==true){
  3809. return item
  3810. }else{
  3811. fujiastatus=1
  3812. item.remark=item.缺陷备注
  3813. delete item.notjc
  3814. delete item.缺陷备注
  3815. delete item.编号
  3816. arrs.push(item)
  3817. return item
  3818. }
  3819. })
  3820. console.log(arrs)
  3821. // return
  3822. if(fujiastatus==1){
  3823. const responses = await AdditionalInspectionRecordAdd(arrs);
  3824. fujiastatus=0
  3825. }
  3826. // 使用filter方法过滤掉所有result为"不检测"的对象
  3827. const filteredData = zhibiaoselectData.value.filter(item => item.selected !== "不检测");
  3828. console.log(filteredData);
  3829. // return false;
  3830. const response = await ProcessInspectionRecordsItemAdd(filteredData);
  3831. console.log(response);
  3832. if (response.code === 0) {
  3833. ElMessage({
  3834. type: 'success',
  3835. message: '成功'
  3836. })
  3837. zhichengVisible.value=false
  3838. zhibiaoselectData.value=[]
  3839. fujiaselectData.value=[]
  3840. }
  3841. }
  3842. const closezhichengDialog = async () => {
  3843. zhichengVisible.value=false
  3844. }
  3845. //设置机台状态
  3846. const dialogSbyxgl=ref(false)
  3847. function onstatus() {
  3848. dialogSbyxgl.value=true
  3849. SetMachineStatus()
  3850. // ReportProduceInfo()
  3851. }
  3852. //设置机台状态
  3853. const SetMachineStatus = async () => {
  3854. }
  3855. //客诉记录
  3856. const complaintsShow = ref(false)
  3857. const complaintsData = reactive([])
  3858. function oncomplaints() {
  3859. Complaints()
  3860. }
  3861. // 客诉记录表格填充
  3862. const Complaints = async() => {
  3863. if(finishedcode.value==null){
  3864. ElMessage({
  3865. type: 'error',
  3866. message: '请先选择产品',
  3867. })
  3868. return
  3869. }
  3870. const res = await ComplaintRecord({productCode :finishedcode.value})
  3871. if (res.code === 0) {
  3872. if(res.data==null){
  3873. ElMessage({
  3874. type: 'error',
  3875. message: '此产品暂无客诉记录',
  3876. })
  3877. }else{
  3878. complaintsData.splice(0, complaintsData.length, ...res.data);
  3879. console.log(complaintsData);
  3880. console.log(complaintsData[0].产品编号)
  3881. selectedRowData.value=complaintsData[0]
  3882. console.log(selectedRowData)
  3883. complaintsShow.value=true
  3884. }
  3885. }
  3886. }
  3887. const selectedRowData = ref({
  3888. })
  3889. //客诉表格单击
  3890. const complaintshandle = (val, row) => {
  3891. console.log(val)
  3892. selectedRowData.value=val
  3893. };
  3894. //换型清场
  3895. const huanxingVisible = ref(false)
  3896. const huanxingtreeData=ref([])
  3897. const huanxingselectData = ref([])
  3898. const huanxingstatus=ref(false)
  3899. const activNames=ref('first')
  3900. function onClear() {
  3901. huanxingVisible.value=true
  3902. RemodelGetTab()
  3903. }
  3904. function onClear2() {
  3905. console.log(formData.value.工单编号)
  3906. console.log(BZMC)
  3907. }
  3908. const RemodelGetTab = async() => {
  3909. const response = await remodelGetTab()
  3910. let arr=[]
  3911. if (response.code === 0) {
  3912. for(let key in response.data){
  3913. if(response.data[key][0]){
  3914. let children =[]
  3915. for (let i = 0; i < response.data[key].length; i++) {
  3916. children.push({label:response.data[key][i],machine:key})
  3917. }
  3918. arr.push({
  3919. label:key,
  3920. children:children
  3921. })
  3922. console.log(response.data[key].length)
  3923. }else{
  3924. arr.push({label:key})
  3925. }
  3926. }
  3927. huanxingtreeData.value=arr
  3928. }else{
  3929. ElMessage({
  3930. type: 'error',
  3931. message: '请注意, 工单编号输入空置, 除非有特殊需要!'
  3932. })
  3933. }
  3934. }
  3935. const huanxingNodeClick = (node) => {
  3936. //存放当前节点的nodeId
  3937. //存放当前节点的nodeId
  3938. if(node.machine){
  3939. // console.log(node.label.split('/')[1])
  3940. huanxingstatus.value=true
  3941. remodelDetail(node.label.split('/')[1])
  3942. modelChangeRecord(node.machine)
  3943. }else{
  3944. console.log('2')
  3945. }
  3946. }
  3947. const huanxingData = ref({})
  3948. const remodelDetail = async (val) => {
  3949. const response = await RemodelDetail({UniqId:val});
  3950. if (response.code === 0) {
  3951. huanxingData.value=response.data
  3952. if(response.data.项目1==1){
  3953. huanxingData.value.项目1=true
  3954. }else{
  3955. huanxingData.value.项目1=false
  3956. }
  3957. if(response.data.项目2==1){
  3958. huanxingData.value.项目2=true
  3959. }else{
  3960. huanxingData.value.项目2=false
  3961. }
  3962. if(response.data.项目3==1){
  3963. huanxingData.value.项目3=true
  3964. }else{
  3965. huanxingData.value.项目3=false
  3966. }
  3967. if(response.data.项目4==1){
  3968. huanxingData.value.项目4=true
  3969. }else{
  3970. huanxingData.value.项目4=false
  3971. }
  3972. if(response.data.项目5==1){
  3973. huanxingData.value.项目5=true
  3974. }else{
  3975. huanxingData.value.项目5=false
  3976. }
  3977. }else{
  3978. ElMessage({
  3979. type: 'error',
  3980. message: '请注意, 工单编号输入空置, 除非有特殊需要!'
  3981. })
  3982. }
  3983. }
  3984. const modelChangeRecord = async (val) => {
  3985. const response = await ModelChangeRecord({machine:val});
  3986. if (response.code === 0) {
  3987. huanxingselectData.value=response.data
  3988. }
  3989. }
  3990. import { nextTick } from 'vue';
  3991. //设备点检
  3992. function ondianjian() {
  3993. getSpotCheckItem(JTMC).then(treeData => {
  3994. if (treeData) {
  3995. // 如果获取成功,treeData 就是我们需要的树形结构数据
  3996. dianjiantreeData = treeData;
  3997. console.log('222');
  3998. console.log(dianjiantreeData);
  3999. // 使用 nextTick 来确保在更新 dianjianVisible 后立即刷新视图
  4000. nextTick(() => {
  4001. dianjianVisible.value = true;
  4002. });
  4003. // 这里可以处理treeData,例如将其赋值给某个状态管理变量或者用于渲染界面
  4004. } else {
  4005. // 如果获取失败,则treeData为null
  4006. console.log('获取巡检项目树形结构数据失败');
  4007. }
  4008. });
  4009. }
  4010. const onyinban = async() => {
  4011. console.log(formData.value.productCodes)
  4012. const res = await facilityPrintGetTab({productCode:formData.value.productCode})
  4013. if(res.code===0){
  4014. yinbantreeData.value=[{
  4015. label:'产品印版库',
  4016. children:res.data.map(item=>({
  4017. label:item.印版分类,
  4018. code:item.编号
  4019. }))
  4020. }]
  4021. console.log(res.data.map(item=>({
  4022. label:item.印版分类,
  4023. code:item.编号
  4024. })))
  4025. yinbanVisible.value = true;
  4026. }
  4027. }
  4028. const onxuncha = async() => {
  4029. xunchaVisible.value=true
  4030. }
  4031. //获取设备点检->检验项目
  4032. const FacilityInspectionItem = async (value) => {
  4033. try {
  4034. // 调用接口获取巡检项目数据
  4035. const response = await facilityInspectionItem({ unitName: value ,machine:JTMC.split("#")[0]});
  4036. // 检查接口返回的状态码
  4037. if (response.code === 0) {
  4038. console.log(response)
  4039. dianjianselectData.splice(0, dianjianselectData.length, ...response.data.map(item=>{
  4040. item.notjc=true;
  4041. item.zc=false;
  4042. item.yc=false;
  4043. item.remark=''
  4044. item.unitName=value
  4045. item.team=BZMC.value
  4046. item.machine=JTMC
  4047. return item
  4048. }))
  4049. }
  4050. } catch (error) {
  4051. // 捕获并打印异常
  4052. console.error("获取巡检项目数据出错:" + error);
  4053. return null;
  4054. }
  4055. };
  4056. //机台印版领用->右侧详情
  4057. const facilityPrintDetailItem = async (value) => {
  4058. try {
  4059. // 调用接口获取巡检项目数据
  4060. // const response = await facilityPrintDetail({ workOrder: formData.value.工单编号,code:value,productCode:productCode.value });
  4061. const response = await facilityPrintDetail({ workOrder: formData.value.工单编号,code:value,productCode:formData.value.productCode });
  4062. // 检查接口返回的状态码
  4063. if (response.code === 0) {
  4064. console.log(response)
  4065. yinbanselectData.value=response.data
  4066. }
  4067. } catch (error) {
  4068. // 捕获并打印异常
  4069. console.error("获取数据出错:" + error);
  4070. return null;
  4071. }
  4072. };
  4073. //树形结构单机
  4074. const dianjianselectData = reactive([])
  4075. const yinbanselectData = ref([])
  4076. const xunchaselectData = ref([])
  4077. const dianjianNodeClick = (node, check, nodeData) => {
  4078. if (node.children && node.children.length > 0) {
  4079. // 点击的是父节点,且有子节点
  4080. // 执行相应的父节点单击事件处理逻辑
  4081. // 这里可以添加你想要的处理逻辑,比如展开/折叠节点等
  4082. } else {
  4083. // 点击的是子节点,或者没有子节点
  4084. // 执行相应的子节点单击事件处理逻辑
  4085. console.log(node.label)
  4086. console.log(JTMC.split("#")[0])
  4087. // FacilityInspectionItem({unitName:node.label ,machine:JTMC.split("#")[0]})
  4088. FacilityInspectionItem(node.label,)
  4089. }
  4090. };
  4091. const yinbanNodeClick = (node, check, nodeData) => {
  4092. if (node.children && node.children.length > 0) {
  4093. // 点击的是父节点,且有子节点
  4094. // 执行相应的父节点单击事件处理逻辑
  4095. // 这里可以添加你想要的处理逻辑,比如展开/折叠节点等
  4096. } else {
  4097. // 点击的是子节点,或者没有子节点
  4098. // 执行相应的子节点单击事件处理逻辑
  4099. facilityPrintDetailItem(node.code)
  4100. // console.log()
  4101. }
  4102. };
  4103. const xunchaNodeClick = (node, check, nodeData) => {
  4104. if(node){
  4105. fieldInspectionRecord()
  4106. }
  4107. }
  4108. const fieldInspectionRecord = async () => {
  4109. let time = new Date();
  4110. time.setDate(time.getDate() - 0); // 今天的前N天的日期,N自定义
  4111. time= `${time.getFullYear()}-${time.getMonth() + 1}-${time.getDate()}`;
  4112. console.log(time+' 08:30:00')
  4113. const response = await FieldInspectionRecord({ workOrder: formData.value.工单编号,team:BZMC.value,start:time+' 08:30:00' });
  4114. if (response.code === 0) {
  4115. xunchaselectData.value=response.data
  4116. }
  4117. }
  4118. let pandingfangfa=ref()
  4119. //检验项目单击
  4120. const dianjianhandle = (val, row) => {
  4121. try {
  4122. pandingfangfa.value = val.判定标准;
  4123. } catch (error) {
  4124. console.error('An error occurred:', error);
  4125. }
  4126. };
  4127. const notjcClick = (val) => {
  4128. console.log("不检测")
  4129. val.notjc==true
  4130. val.zc=false
  4131. val.yc==false
  4132. };
  4133. const zcClick = (val) => {
  4134. console.log("合格")
  4135. val.notjc==false
  4136. val.zc=true
  4137. val.yc==false
  4138. };
  4139. const ycClick = (val) => {
  4140. console.log("不合格")
  4141. val.notjc==false
  4142. val.zc=false
  4143. val.yc==true
  4144. };
  4145. const rowClassName = (row, column) => {
  4146. try {
  4147. if (row.unchecked) {
  4148. return 'row-yellow';
  4149. }
  4150. return '';
  4151. } catch (error) {
  4152. console.error('An error occurred:', error);
  4153. return '';
  4154. }
  4155. };
  4156. // 异步函数,用于获取指定设备的巡检项目,并且将结果格式化为树形结构数据
  4157. const getSpotCheckItem = async (machineName) => {
  4158. try {
  4159. // 调用接口获取巡检项目数据
  4160. const response = await facilitySpotCheckItem({ machine: machineName });
  4161. // 检查接口返回的状态码
  4162. if (response.code === 0) {
  4163. // 构建树形结构数据
  4164. const childrenData = Object.entries(response.data).map(([id, label]) => {
  4165. return {
  4166. id, // 子节点的唯一标识
  4167. label, // 子节点的标签
  4168. children: [] // 初始化子节点数组
  4169. };
  4170. });
  4171. // 创建包含父节点的树形结构数据
  4172. const treeData = [{
  4173. id: machineName, // 父节点的唯一标识
  4174. label: machineName, // 父节点的标签
  4175. children: childrenData // 子节点数据
  4176. }];
  4177. // 返回构建好的树形结构数据
  4178. return treeData;
  4179. } else {
  4180. // 如果接口返回的状态码不是0,打印错误信息
  4181. console.error("接口返回错误:" + response.msg);
  4182. return null;
  4183. }
  4184. } catch (error) {
  4185. // 捕获并打印异常
  4186. console.error("获取巡检项目数据出错:" + error);
  4187. return null;
  4188. }
  4189. };
  4190. //班组维护
  4191. // function onBZ() {
  4192. const onBZ = async () => {
  4193. // console.log(JTMC)
  4194. FacilityTeam(JTMC)
  4195. fetchData()
  4196. detailShow.value=true
  4197. }
  4198. // 班组人员及分配比例
  4199. const FacilityTeam = async (value) => {
  4200. const response = await facilityTeam({ machine: value });
  4201. console.log(response)
  4202. console.log(123123212132)
  4203. if (response.code === 0) {
  4204. BZMC.value=response.data[0]['班组号']
  4205. InspectionRecord()
  4206. FacilityDetail()
  4207. // 清空 bzData 数组
  4208. bzData.splice(0, bzData.length);
  4209. FPData.splice(0, FPData.length);
  4210. // 遍历接口返回的数据,并给每个对象添加 JTMC 属性
  4211. const updatedData = response.data.map(item => {
  4212. return { ...item, JTMC: value }; // 添加 JTMC 属性
  4213. });
  4214. // 将更新后的数据添加到 bzData 数组
  4215. bzData.push(...updatedData)
  4216. FPData.push(...updatedData)
  4217. return 1
  4218. }
  4219. };
  4220. //日产量批量维护
  4221. function onRCL() {
  4222. if(!Selection_ids.value){
  4223. ElMessage({
  4224. type: 'warning',
  4225. message: '请先勾选数据'
  4226. })
  4227. return
  4228. }
  4229. FacilityTeam_rcl(JTMC)
  4230. detailShow_rcl.value=true
  4231. console.log('333')
  4232. }
  4233. let BZMC_rcl=ref()
  4234. const bzData_rcl = reactive([])
  4235. const selectedOption_rcl = ref('');
  4236. // 班组人员及分配比例
  4237. const FacilityTeam_rcl = async (value) => {
  4238. const response = await facilityTeam({ machine: value });
  4239. if (response.code === 0) {
  4240. // formData.value.班组 = response.data[0]['班组号'];
  4241. BZMC_rcl.value = response.data[0]['班组号']
  4242. selectedOption_rcl.value = JTMC
  4243. // 清空 bzData 数组
  4244. bzData_rcl.splice(0, bzData_rcl.length);
  4245. // 遍历接口返回的数据,并给每个对象添加 JTMC 属性
  4246. const updatedData = response.data.map(item => {
  4247. return { ...item, JTMC: value }; // 添加 JTMC 属性
  4248. });
  4249. // 将更新后的数据添加到 bzData 数组
  4250. bzData_rcl.push(...updatedData);
  4251. return 1
  4252. }
  4253. };
  4254. //班组单击
  4255. const currentBz_rcl ={}
  4256. const BZvalue_rcl=ref()
  4257. const BZhandle_rcl = (val) => {
  4258. currentBz_rcl.value = val
  4259. BZvalue_rcl.value=val.ID
  4260. formDatas_rcl.value = {};
  4261. let sczl_bhkey_rcl = ''
  4262. let sczl_namekey_rcl = ''
  4263. let percentagekey_rcl = ''
  4264. console.log(currentBz_rcl)
  4265. if (currentBz_rcl.value[9]) {
  4266. for (let i = 1; i <= 9; i++) {
  4267. sczl_bhkey_rcl = `code${i}`
  4268. sczl_namekey_rcl = `name${i}`
  4269. percentagekey_rcl = `percentage${i}`
  4270. formDatas_rcl.value[sczl_bhkey_rcl] = '';
  4271. formDatas_rcl.value[sczl_namekey_rcl] = '';
  4272. formDatas_rcl.value[percentagekey_rcl] = '';
  4273. }
  4274. formDatas_rcl.value.code8 = currentBz_rcl.value[9].split(' ')[0];
  4275. formDatas_rcl.value.name8 = currentBz_rcl.value[9].split(' ')[1]
  4276. formDatas_rcl.value.percentage8 = parseFloat(currentBz_rcl.value[9].split(' ')[2].split('(')[1].split(')')[0])/100
  4277. for (let i = 1; i <= Math.min(Object.keys(currentBz_rcl.value).length - 5, 6); i++) {
  4278. sczl_bhkey_rcl = `code${i}`
  4279. sczl_namekey_rcl = `name${i}`
  4280. percentagekey_rcl = `percentage${i}`
  4281. formDatas_rcl.value[sczl_bhkey_rcl] = currentBz_rcl.value[i - 1].split(' ')[0];
  4282. formDatas_rcl.value[sczl_namekey_rcl] = currentBz_rcl.value[i - 1].split(' ')[1];
  4283. if(isNaN(parseFloat(currentBz_rcl.value[i - 1].split(' ')[2].split('(')[1].split(')')[0]))){
  4284. formDatas_rcl.value[percentagekey_rcl] = currentBz_rcl.value[i - 1].split(' ')[2].split('(')[1].split(')')[0];
  4285. }else{
  4286. formDatas_rcl.value[percentagekey_rcl] = parseFloat(currentBz_rcl.value[i - 1].split(' ')[2].split('(')[1].split(')')[0])/100;
  4287. }
  4288. }
  4289. } else {
  4290. for (let i = 1; i <= 10; i++) {
  4291. sczl_bhkey_rcl = `code${i}`
  4292. sczl_namekey_rcl = `name${i}`
  4293. percentagekey_rcl = `percentage${i}`
  4294. formDatas_rcl.value[sczl_bhkey_rcl] = '';
  4295. formDatas_rcl.value[sczl_namekey_rcl] = '';
  4296. formDatas_rcl.value[percentagekey_rcl] = '';
  4297. }
  4298. for (let i = 1; i <= Math.min(Object.keys(currentBz_rcl.value).length - 4, 6); i++) {
  4299. sczl_bhkey_rcl = `code${i}`
  4300. sczl_namekey_rcl = `name${i}`
  4301. percentagekey_rcl = `percentage${i}`
  4302. formDatas_rcl.value[sczl_bhkey_rcl] = currentBz_rcl.value[i - 1].split(' ')[0];
  4303. formDatas_rcl.value[sczl_namekey_rcl] = currentBz_rcl.value[i - 1].split(' ')[1];
  4304. if(isNaN(parseFloat(currentBz_rcl.value[i - 1].split(' ')[2].split('(')[1].split(')')[0]))){
  4305. formDatas_rcl.value[percentagekey_rcl] = currentBz_rcl.value[i - 1].split(' ')[2].split('(')[1].split(')')[0];
  4306. }else{
  4307. formDatas_rcl.value[percentagekey_rcl] = parseFloat(currentBz_rcl.value[i - 1].split(' ')[2].split('(')[1].split(')')[0])/100;
  4308. }
  4309. }
  4310. }
  4311. BZMC_rcl.value=val.班组号
  4312. };
  4313. const selectBz_rcl = () => {
  4314. if(currentBz_rcl.value==undefined){
  4315. ElMessage({
  4316. type: 'warning',
  4317. message: '请选择班组'
  4318. })
  4319. return
  4320. }
  4321. console.log(Selection_ids.value)
  4322. console.log(currentBz_rcl.value.ID)
  4323. YieldTeamEdit({'Uniqid': Selection_ids.value, 'teamID': currentBz_rcl.value.ID}).then( res => {
  4324. if(res.code==0){
  4325. ElMessage({
  4326. type: 'success',
  4327. message: '成功'
  4328. })
  4329. closeDetailShow_rcl()
  4330. FacilitychanLiang()
  4331. }
  4332. })
  4333. }
  4334. const blModel = ref(false)
  4335. const employeeData = ref('')
  4336. const getbzyg = async (value,key) => {
  4337. console.log(12)
  4338. let bzyg=''
  4339. bzyg=`code${key}`
  4340. let bzxm=''
  4341. bzxm=`name${key}`
  4342. const response = await getYg({sczl_bh:formDatas.value[bzyg]});
  4343. console.log(response)
  4344. if (response.code === 0) {
  4345. if(response.data.length === 1){
  4346. formDatas.value[bzxm]= response.data[0].ygxm
  4347. formDatas.value[bzyg]= response.data[0].员工编号
  4348. }else{
  4349. blModel.value = true;
  4350. console.log(response.data)
  4351. employeeData.value = response.data // 假设响应数据是数组
  4352. }
  4353. }
  4354. }
  4355. const clicked = ref(false);
  4356. const tablebllickHandler = async (row, column, event) => {
  4357. if (clicked.value) {
  4358. // 如果已经点击过一次,则不再执行操作
  4359. return;
  4360. }
  4361. let nextIndex = 1;
  4362. while (formDatas.value[`code${nextIndex}`] !== '' && formDatas.value[`name${nextIndex}`] !== '') {
  4363. nextIndex++;
  4364. if (nextIndex > 8) {
  4365. // 如果所有字段都已经填满,则不做任何事情并退出函数
  4366. return;
  4367. }
  4368. }
  4369. // 将选定的值分配给下一个空的代码和名称字段
  4370. formDatas.value[`code${nextIndex}`] = row.员工编号;
  4371. formDatas.value[`name${nextIndex}`] = row.ygxm;
  4372. blModel.value = false;
  4373. clicked.value = true;
  4374. setTimeout(() => {
  4375. clicked.value = false;
  4376. }, 300); // 300毫秒内再次点击将不会触发事件,你可以根据需要调整这个延迟时间
  4377. };
  4378. const blplanUsageCellClass = ({row, column, rowIndex, columnIndex}) =>{
  4379. if (column.property === '员工编号' || column.property === 'ygxm') {
  4380. return 'plan-usage-low';
  4381. }
  4382. }
  4383. const JPblplanUsageCellClass = ({row, column, rowIndex, columnIndex}) =>{
  4384. if (column.property === '员工编号' || column.property === 'ygxm') {
  4385. return 'plan-usage-low';
  4386. }
  4387. }
  4388. const JPblplanUsageCellClassedit = ({row, column, rowIndex, columnIndex}) =>{
  4389. if (column.property === '员工编号' || column.property === 'ygxm') {
  4390. return 'plan-usage-low';
  4391. }
  4392. }
  4393. const addBz = async() => {
  4394. // selectedOption.value='YS-JY06-002||印品质量检测机(JP1020-18)'
  4395. // console.log(selectedOption.value)
  4396. // console.log(BZMC.value)
  4397. // console.log(selectedOption.value.split('|')[0])
  4398. const response = await MachineTeamAdd({
  4399. sczl_jtbh: selectedOption.value.split('|')[0],
  4400. sczl_bzdh: BZMC.value,
  4401. sczl_bh1: formDatas.value.code1,
  4402. sczl_bh2: formDatas.value.code2,
  4403. sczl_bh3: formDatas.value.code3,
  4404. sczl_bh4: formDatas.value.code4,
  4405. sczl_bh5: formDatas.value.code5,
  4406. sczl_bh6: formDatas.value.code6,
  4407. sczl_bh7: formDatas.value.code7,
  4408. sczl_bh8: formDatas.value.code10,
  4409. sczl_bh9: formDatas.value.code9,
  4410. sczl_bh10: formDatas.value.code8,
  4411. sczl_rate1: formDatas.value.percentage1,
  4412. sczl_rate2: formDatas.value.percentage2,
  4413. sczl_rate3: formDatas.value.percentage3,
  4414. sczl_rate4: formDatas.value.percentage4,
  4415. sczl_rate5: formDatas.value.percentage5,
  4416. sczl_rate6: formDatas.value.percentage6,
  4417. sczl_rate7: formDatas.value.percentage7,
  4418. sczl_rate8: formDatas.value.percentage10,
  4419. sczl_rate9: formDatas.value.percentage9,
  4420. sczl_rate10: formDatas.value.percentage8,
  4421. sys_id: sys_id
  4422. })
  4423. // console.log()
  4424. if (response.code === 0) {
  4425. ElMessage({
  4426. type: 'success',
  4427. message: '成功'
  4428. })
  4429. FacilityTeam(JTMC)
  4430. fetchData()
  4431. // FacilityProduction()
  4432. }
  4433. }
  4434. const currentBz ={}
  4435. const selectBz = async() => {
  4436. if(currentBz.value){
  4437. BZMC.value=currentBz.value.班组号
  4438. let sczl_bhkey=''
  4439. let sczl_namekey=''
  4440. if (currentBz.value[9]) {
  4441. for (let i = 1; i <= 9; i++) {
  4442. sczl_bhkey=`sczl_bh${i}`
  4443. sczl_namekey=`sczl_name${i}`
  4444. formData.value[sczl_bhkey] = '';
  4445. formData.value[sczl_namekey] = '';
  4446. }
  4447. formData.value.sczl_bh10 = currentBz.value[9].split(' ')[0];
  4448. formData.value.sczl_name10=currentBz.value[9].split(' ')[1]
  4449. for (let i = 1; i <= Math.min(Object.keys(currentBz.value).length-5, 6); i++) {
  4450. sczl_bhkey=`sczl_bh${i}`
  4451. sczl_namekey=`sczl_name${i}`
  4452. console.log(currentBz.value[i-1].split(' '))
  4453. formData.value[sczl_bhkey] = currentBz.value[i-1].split(' ')[0];
  4454. formData.value[sczl_namekey] = currentBz.value[i-1].split(' ')[1];
  4455. classbz.value[i-1]=currentBz.value[i-1].split(' ')[0]
  4456. }
  4457. classbz.value.push(currentBz.value[9].split(' ')[0])
  4458. formData.value.class=classbz.value.join(',')
  4459. console.log(formData.value)
  4460. }else{
  4461. for (let i = 1; i <= 10; i++) {
  4462. sczl_bhkey=`sczl_bh${i}`
  4463. sczl_namekey=`sczl_name${i}`
  4464. formData.value[sczl_bhkey] = '';
  4465. formData.value[sczl_namekey] = '';
  4466. }
  4467. for (let i = 1; i <= Math.min(Object.keys(currentBz.value).length-4, 6); i++) {
  4468. sczl_bhkey=`sczl_bh${i}`
  4469. sczl_namekey=`sczl_name${i}`
  4470. console.log(currentBz.value[i-1].split(' '))
  4471. formData.value[sczl_bhkey] = currentBz.value[i-1].split(' ')[0];
  4472. formData.value[sczl_namekey] = currentBz.value[i-1].split(' ')[1];
  4473. classbz.value[i-1]=currentBz.value[i-1].split(' ')[0]
  4474. }
  4475. formData.value.class=classbz.value.join(',')
  4476. }
  4477. const response = await setMachineTeam({
  4478. machine: JTMC.split("#")[0],
  4479. order:formData.value.工单编号,
  4480. yjno:formData.value.印件号,
  4481. gy_name:formData.value.工序名称,
  4482. sczl_bzdh:BZMC.value,
  4483. status:'生产',
  4484. production_now:0,
  4485. production_all:0,
  4486. team_id:currentBz.value.ID
  4487. })
  4488. if(response.code===0){
  4489. ElMessage({
  4490. type: 'success',
  4491. message: '成功'
  4492. })
  4493. FacilityProduction()
  4494. }
  4495. // currentBz.value={}
  4496. }
  4497. detailShow.value = false;
  4498. }
  4499. const delBz = async() => {
  4500. const UniqId=currentBz.value.ID
  4501. console.log(currentBz.value.ID)
  4502. if(currentBz.value){
  4503. ElMessageBox.confirm('确定要删除吗?', '提示', {
  4504. confirmButtonText: '确定',
  4505. cancelButtonText: '取消',
  4506. type: 'warning'
  4507. }).then(() => {
  4508. const response = teamDel({UniqId:UniqId})
  4509. response.then(result => {
  4510. if(result.code===0){
  4511. ElMessage({
  4512. type: 'success',
  4513. message: '成功'
  4514. })
  4515. console.log(response)
  4516. FacilityTeam(JTMC)
  4517. fetchData()
  4518. }
  4519. });
  4520. })
  4521. currentBz.value={}
  4522. }
  4523. }
  4524. const selected = ref('');
  4525. // 下拉框选项数据
  4526. const dropdownOptions = ref([]);
  4527. // 选中的选项
  4528. const selectedOption = ref('');
  4529. // 获取接口数据并转换为下拉框需要的格式
  4530. const fetchData = async () => {
  4531. try {
  4532. const response = await facilityMachineList();
  4533. console.log(response)
  4534. console.log(5555555555)
  4535. if (response.code === 0) {
  4536. const options = response.data.map((item) => ({
  4537. label: item,
  4538. value: item
  4539. }));
  4540. console.log(JTMC)
  4541. const selectionValue = options.find(item => {
  4542. return item.value.indexOf(JTMC) !== -1
  4543. })
  4544. selectedOption.value = selectionValue.value ?? options[0].value
  4545. dropdownOptions.value = options
  4546. // const defaultOption = options.find(option => option.value === JTMC);
  4547. // if (defaultOption) {
  4548. // selectedOption.value = defaultOption.value;
  4549. // } else if (options.length > 0) {
  4550. // // 如果 myDefaultValue 不在选项中,选择第一个选项
  4551. // selectedOption.value = options[0].value;
  4552. // }
  4553. }
  4554. } catch (error) {
  4555. console.error('Error fetching data:', error);
  4556. // Handle the error appropriately
  4557. }
  4558. };
  4559. // formData
  4560. let BZMC=ref()
  4561. let lastCellValue=ref()
  4562. let parts =reactive([])
  4563. // 自动化生成的字典(可能为空)以及字段
  4564. const formData= ref({
  4565. 工单编号:'',
  4566. 印件编号:'',
  4567. 工序名称:'',
  4568. 产品名称:'',
  4569. sczl_bh1:'',
  4570. sczl_bh2:'',
  4571. sczl_bh3:'',
  4572. sczl_bh4:'',
  4573. sczl_bh5:'',
  4574. sczl_bh6:'',
  4575. sczl_bh7:'',
  4576. sczl_bh8:'',
  4577. sczl_bh9:'',
  4578. sczl_bh10:'',
  4579. sczl_name1:'',
  4580. sczl_name2:'',
  4581. sczl_name3:'',
  4582. sczl_name4:'',
  4583. sczl_name5:'',
  4584. sczl_name6:'',
  4585. sczl_name7:'',
  4586. sczl_name8:'',
  4587. sczl_name9:'',
  4588. sczl_name10:'',
  4589. })
  4590. const formDatasData= reactive([])
  4591. const formDatas = ref({
  4592. code1:'',
  4593. code2:'',
  4594. code3:'',
  4595. code4:'',
  4596. code5:'',
  4597. code6:'',
  4598. code7:'',
  4599. code8:'',
  4600. code9:'',
  4601. code10:'',
  4602. name1:'',
  4603. name2:'',
  4604. name3:'',
  4605. name4:'',
  4606. name5L:'',
  4607. name6:'',
  4608. name7:'',
  4609. name8:'',
  4610. name9:'',
  4611. name10:'',
  4612. percentage1:'',
  4613. percentage2:'',
  4614. percentage3:'',
  4615. percentage4:'',
  4616. percentage5:'',
  4617. percentage6:'',
  4618. percentage7:'',
  4619. percentage8:'',
  4620. percentage9:'',
  4621. percentage10:'',
  4622. })
  4623. const formDatas_rcl = ref({
  4624. code1:'',
  4625. code2:'',
  4626. code3:'',
  4627. code4:'',
  4628. code5:'',
  4629. code6:'',
  4630. code7:'',
  4631. code8:'',
  4632. code9:'',
  4633. code10:'',
  4634. name1:'',
  4635. name2:'',
  4636. name3:'',
  4637. name4:'',
  4638. name5L:'',
  4639. name6:'',
  4640. name7:'',
  4641. name8:'',
  4642. name9:'',
  4643. name10:'',
  4644. percentage1:'',
  4645. percentage2:'',
  4646. percentage3:'',
  4647. percentage4:'',
  4648. percentage5:'',
  4649. percentage6:'',
  4650. percentage7:'',
  4651. percentage8:'',
  4652. percentage9:'',
  4653. percentage10:'',
  4654. })
  4655. //班组单击
  4656. const BZvalue=ref()
  4657. const BZhandle = (val) => {
  4658. console.log(currentBz.value)
  4659. currentBz.value = val
  4660. BZvalue.value=val.ID
  4661. formDatas.value = {};
  4662. let sczl_bhkey = ''
  4663. let sczl_namekey = ''
  4664. let percentagekey = ''
  4665. if (currentBz.value[9]) {
  4666. for (let i = 1; i <= 9; i++) {
  4667. sczl_bhkey = `code${i}`
  4668. sczl_namekey = `name${i}`
  4669. percentagekey = `percentage${i}`
  4670. formDatas.value[sczl_bhkey] = '';
  4671. formDatas.value[sczl_namekey] = '';
  4672. formDatas.value[percentagekey] = '';
  4673. }
  4674. formDatas.value.code8 = currentBz.value[9].split(' ')[0];
  4675. formDatas.value.name8 = currentBz.value[9].split(' ')[1]
  4676. formDatas.value.percentage8 = parseFloat(currentBz.value[9].split(' ')[2].split('(')[1].split(')')[0])/100
  4677. for (let i = 1; i <= Math.min(Object.keys(currentBz.value).length - 5, 6); i++) {
  4678. sczl_bhkey = `code${i}`
  4679. sczl_namekey = `name${i}`
  4680. percentagekey = `percentage${i}`
  4681. formDatas.value[sczl_bhkey] = currentBz.value[i - 1].split(' ')[0];
  4682. formDatas.value[sczl_namekey] = currentBz.value[i - 1].split(' ')[1];
  4683. if(isNaN(parseFloat(currentBz.value[i - 1].split(' ')[2].split('(')[1].split(')')[0]))){
  4684. formDatas.value[percentagekey] = currentBz.value[i - 1].split(' ')[2].split('(')[1].split(')')[0];
  4685. }else{
  4686. formDatas.value[percentagekey] = parseFloat(currentBz.value[i - 1].split(' ')[2].split('(')[1].split(')')[0])/100;
  4687. }
  4688. }
  4689. } else {
  4690. for (let i = 1; i <= 10; i++) {
  4691. sczl_bhkey = `code${i}`
  4692. sczl_namekey = `name${i}`
  4693. percentagekey = `percentage${i}`
  4694. formDatas.value[sczl_bhkey] = '';
  4695. formDatas.value[sczl_namekey] = '';
  4696. formDatas.value[percentagekey] = '';
  4697. }
  4698. for (let i = 1; i <= Math.min(Object.keys(currentBz.value).length - 4, 6); i++) {
  4699. sczl_bhkey = `code${i}`
  4700. sczl_namekey = `name${i}`
  4701. percentagekey = `percentage${i}`
  4702. formDatas.value[sczl_bhkey] = currentBz.value[i - 1].split(' ')[0];
  4703. formDatas.value[sczl_namekey] = currentBz.value[i - 1].split(' ')[1];
  4704. if(isNaN(parseFloat(currentBz.value[i - 1].split(' ')[2].split('(')[1].split(')')[0]))){
  4705. formDatas.value[percentagekey] = currentBz.value[i - 1].split(' ')[2].split('(')[1].split(')')[0];
  4706. }else{
  4707. formDatas.value[percentagekey] = parseFloat(currentBz.value[i - 1].split(' ')[2].split('(')[1].split(')')[0])/100;
  4708. }
  4709. }
  4710. }
  4711. console.log(formDatas)
  4712. // for (const key in val) {
  4713. // if (val[key] === 0) {
  4714. // break;
  4715. // }
  4716. // const parts = val[key].split(/[\s()]+/);
  4717. // const code = parts[0];
  4718. // const name = parts[1];
  4719. // const percentage = parts[2];
  4720. //
  4721. // // 根据索引填充不同的字段
  4722. // const index = parseInt(key) + 1; // 索引从1开始
  4723. // formDatas.value['code' + index] = code;
  4724. // formDatas.value['name' + index] = name;
  4725. // formDatas.value['percentage' + index] = percentage;
  4726. BZMC.value=val.班组号
  4727. // }
  4728. };
  4729. const chanliangVisible = ref(false)
  4730. const formdata3=reactive([])
  4731. const initfordata3 = () => {
  4732. formdata3.value = {
  4733. '工单编号':'',
  4734. 'cpmc':'',
  4735. 'yjno':'',
  4736. 'yjmc':'',
  4737. 'gxmc':'',
  4738. 'gxh':'',
  4739. 'gymc':'',
  4740. 'rq':'',
  4741. 'sczl_jtbh':'',
  4742. 'starttime':'',
  4743. 'num':'',
  4744. 'sj1':'',
  4745. '色度数':'',
  4746. '联数':'',
  4747. '产量':'',
  4748. '制程废品':'',
  4749. '制程次品':'',
  4750. '前工序废':'',
  4751. '来料异常':'',
  4752. '换型类型':'',
  4753. '装版工时':'',
  4754. '装版补产工时':'',
  4755. '打样工时':'',
  4756. '打样补产工时':'',
  4757. '保养工时':'',
  4758. '异常总工时':'',
  4759. '异常类型':'',
  4760. '异常补时':'',
  4761. '通电工时':'',
  4762. 'dedh':'',
  4763. '码包':'',
  4764. '码开始行':'',
  4765. '码结束行':'',
  4766. '主电表':'',
  4767. '辅电表':'',
  4768. '组员1':{
  4769. '编号':'',
  4770. '姓名':'',
  4771. '比例':'',
  4772. },
  4773. '组员2':{
  4774. '编号':'',
  4775. '姓名':'',
  4776. '比例':'',
  4777. },
  4778. '组员3':{
  4779. '编号':'',
  4780. '姓名':'',
  4781. '比例':'',
  4782. },
  4783. '组员4':{
  4784. '编号':'',
  4785. '姓名':'',
  4786. '比例':'',
  4787. },
  4788. '组员5':{
  4789. '编号':'',
  4790. '姓名':'',
  4791. '比例':'',
  4792. },
  4793. '组员6':{
  4794. '编号':'',
  4795. '姓名':'',
  4796. '比例':'',
  4797. },
  4798. '组员7':{
  4799. '编号':'',
  4800. '姓名':'',
  4801. '比例':'',
  4802. },
  4803. '组员8':{
  4804. '编号':'',
  4805. '姓名':'',
  4806. '比例':'',
  4807. },
  4808. '组员9':{
  4809. '编号':'',
  4810. '姓名':'',
  4811. '比例':'',
  4812. },
  4813. '组员10':{
  4814. '编号':'',
  4815. '姓名':'',
  4816. '比例':'',
  4817. },
  4818. '拉料':{
  4819. '编号':'',
  4820. '姓名':'',
  4821. }
  4822. }
  4823. }
  4824. function gytableDatadoubleClick(row, column, event) {
  4825. console.log(row)
  4826. type2.value="update"
  4827. MachineChanliang(row.UniqId)
  4828. }
  4829. const uid=ref()
  4830. const _Gd_gdbh=ref()
  4831. function getUid(row, column, event) {
  4832. console.log(row)
  4833. uid.value=row['UniqId']
  4834. _Gd_gdbh.value=row['工单编号']
  4835. _gdbhlist.value=row['工单编号']
  4836. console.log("UniqId"+uid.value)
  4837. }
  4838. //班组产量提报 获取当天日期接口
  4839. const qita_jitaidata = async () => {
  4840. const qita_jitaidata = await getTimelist();
  4841. formdata3.value.rq = qita_jitaidata.data.date
  4842. }
  4843. //获取详细信息
  4844. const MachineChanliang = async(value) => {
  4845. //打开新增按钮获取
  4846. qita_jitaidata();
  4847. if(uid.value == undefined){
  4848. initfordata3()
  4849. chanliangVisible.value=true
  4850. return
  4851. }
  4852. const response = await MachineChanliangDetail({UniqId:value});
  4853. if (response.code === 0) {
  4854. chanliangVisible.value=true
  4855. formdata3.value=response.data
  4856. const result=formdata3.value.gxmc.match(/-(.{2})/)
  4857. formdata3.value.gymc=result[1]
  4858. formdata3.value.sczl_jtbh=JTMC
  4859. formdata3.value.yjmc=response.data.印件名称
  4860. formdata3.value.rq=date
  4861. if (formdata3.value.bzdh === 'A班') {
  4862. formdata3.value.starttime = ''; // 清空值
  4863. setTimeout(()=>{
  4864. formdata3.value.starttime = date + " 08:30:00"; // 设置为 20:30:00
  4865. })
  4866. } else if (formdata3.value.bzdh === 'B班') {
  4867. formdata3.value.starttime = ''; // 清空值
  4868. setTimeout(()=>{
  4869. formdata3.value.starttime = date + " 20:30:00"; // 设置为 20:30:00
  4870. })
  4871. }
  4872. console.log(formdata3.value)
  4873. }
  4874. }
  4875. const yjnoArr = ref([0])
  4876. const gxmc = ref('')
  4877. //工单编号回车事件
  4878. const getCPMCsubmit = () => {
  4879. if(formdata3.value.工单编号!=''){
  4880. ChanliangWorkorder({search:formdata3.value.工单编号,machine:JTMC}).then(response=>{
  4881. if (response.code === 0) {
  4882. if(response.data){
  4883. formdata3.value.cpmc = response.data[0].cpmc
  4884. document.getElementById('产品名称').style.color = 'red';
  4885. getYJMCsubmit()
  4886. }else{
  4887. ElMessage({
  4888. type: 'error',
  4889. message: response.msg
  4890. })
  4891. formdata3.value.工单编号 = '';
  4892. formdata3.value.cpmc = '';
  4893. document.getElementById('产品名称').style.color = 'black';
  4894. }
  4895. }else{
  4896. formdata3.value.工单编号 = '';
  4897. formdata3.value.cpmc = '';
  4898. document.getElementById('产品名称').style.color = 'black';
  4899. }
  4900. });
  4901. }else{
  4902. ElMessage({
  4903. type: 'error',
  4904. message: '请注意, 工单编号输入空置, 除非有特殊需要!'
  4905. })
  4906. gxmc.value = '';
  4907. document.getElementById('产品名称').style.color = 'black';
  4908. }
  4909. }
  4910. const yjnoHandleFocus = () =>{
  4911. if(yjnoArr.value[0] == 0){
  4912. formdata3.value.yjno = 1;
  4913. }else{
  4914. formdata3.value.yjno = yjnoArr.value[0];
  4915. }
  4916. }
  4917. //印件号失去焦点事件
  4918. const getYJMCsubmit = () => {
  4919. if(formdata3.value.工单编号!=''){
  4920. //获取印件名称
  4921. ChanliangPrintDetail({gdbh:formdata3.value.工单编号}).then(response=>{
  4922. if (response.code === 0) {
  4923. if(response.data){
  4924. if(response.data.length==1){
  4925. formdata3.value.yjmc = response.data[0].yjmc
  4926. formdata3.value.yjno = response.data[0].yjno
  4927. formdata3.value.联数 = response.data[0].ls
  4928. setColorReadonly('印件名称')
  4929. }else{
  4930. selectData_Yj.splice(0, selectData_Yj.length, ...response.data)
  4931. dialogSelectVisible_Yj.value=true
  4932. }
  4933. }else{
  4934. ElMessage({
  4935. type: 'error',
  4936. message: response.msg
  4937. })
  4938. }
  4939. }
  4940. });
  4941. }else{
  4942. ElMessage({
  4943. type: 'error',
  4944. message: '印件编号不存在, 将恢复默认值, 请仔细确认数据准确性!'
  4945. })
  4946. }
  4947. }
  4948. //印件选择
  4949. const dialogSelectVisible_Yj = ref(false)
  4950. const selectData_Yj = reactive([])
  4951. // 处理选择框
  4952. const handleSelectClick_Yj = (row, column, event) => {
  4953. const { yjno, yjmc, ls } = row
  4954. formdata3.value.yjno = yjno
  4955. formdata3.value.yjmc = yjmc
  4956. formdata3.value.联数 = ls
  4957. dialogSelectVisible_Yj.value = false
  4958. }
  4959. const select_Yj = (event) => {
  4960. if (event.keyCode === 40) { // 向下箭头
  4961. if (currentIndex.value < selectData_Yj.length - 1) {
  4962. currentIndex.value++;
  4963. setCurrent_Yj(selectData_Yj[currentIndex.value]);
  4964. } else {
  4965. currentIndex.value = 0;
  4966. setCurrent_Yj(selectData_Yj[currentIndex.value]); // 到达最后一行时回到第一行
  4967. }
  4968. } else if (event.keyCode === 38) { // 向上箭头
  4969. if (currentIndex.value > 0) {
  4970. currentIndex.value--;
  4971. setCurrent_Yj(selectData_Yj[currentIndex.value]);
  4972. } else {
  4973. currentIndex.value = selectData_Yj.length - 1;
  4974. setCurrent_Yj(selectData_Yj[currentIndex.value]); // 到达第一行时回到最后一行
  4975. }
  4976. } else if (event.keyCode === 13) { // 回车键
  4977. dialogSelectVisible_Yj.value = false;
  4978. }
  4979. }
  4980. //工序选择
  4981. const dialogSelectVisible_Gx = ref(false)
  4982. const selectData_Gx = reactive([])
  4983. const table_Gx = ref()
  4984. // 处理选择框
  4985. const handleSelectClick_Gx = (row, column, event) => {
  4986. const { gxh, name, gxmc } = row
  4987. formdata3.value.gxh = gxh
  4988. formdata3.value.gxmc = name
  4989. formdata3.value.gymc = gxmc
  4990. dialogSelectVisible_Gx.value = false
  4991. }
  4992. //工序失去焦点事件
  4993. const getGXsubmit = () => {
  4994. //弹出选择
  4995. ChanliangProcessDetail({gdbh:formdata3.value.工单编号,yjno:formdata3.value.yjno,machine:''}).then(response=>{
  4996. if (response.code === 0) {
  4997. if(response.data){
  4998. if(response.data.length==1){
  4999. formdata3.value.gxmc=response.data[0].name
  5000. formdata3.value.gxh=response.data[0].gxh
  5001. formdata3.value.gymc=response.data[0].gxmc
  5002. }else{
  5003. selectData_Gx.splice(0, selectData_Gx.length, ...response.data)
  5004. dialogSelectVisible_Gx.value = true
  5005. }
  5006. }else{
  5007. ElMessage({
  5008. type: 'error',
  5009. message: response.msg
  5010. })
  5011. }
  5012. }
  5013. })
  5014. }
  5015. //机台编号失去焦点事件
  5016. const GetjtbhVisible = ref(false)
  5017. const JTBHselectData = reactive([])
  5018. const getJtbhsubmit = () => {
  5019. gdzl_MachineList({address:CJMC.value}).then(response=>{
  5020. if(response.code==0){
  5021. if(response.data.length!=0 && !response.data.some(item => item.jtbh === formData.value.sczl_jtbh)){
  5022. JTBHselectData.splice(0, selectData.length, ...response.data)
  5023. GetjtbhVisible.value=true
  5024. }
  5025. }
  5026. });
  5027. }
  5028. const JTBHSelectClick = (row, column, event) => {
  5029. const { jtbh, jtmc } = row
  5030. formdata3.value.sczl_jtbh=jtbh
  5031. GetjtbhVisible.value = false
  5032. }
  5033. //点击设备编号
  5034. const gdzl_MachineList_address = reactive({
  5035. data: []
  5036. });
  5037. //选择机台编号确定工艺以及开工时间
  5038. const jtbh_change = () => {
  5039. //弹出选择
  5040. productionDedh({sczl_jtbh:formdata3.value.sczl_jtbh}).then(response=>{
  5041. if (response.code === 0) {
  5042. if(response.data){
  5043. formdata3.value.dedh=response.data.sys_bh
  5044. }else{
  5045. formdata3.value.dedh=''
  5046. }
  5047. }
  5048. })
  5049. }
  5050. //获取拉料人员
  5051. const GetLl = (falg) => {
  5052. let llyg = {
  5053. '李有文':2024,
  5054. '张杭强':2023,
  5055. '朱喜文':2022,
  5056. '刘旭青':2021,
  5057. '刘芳民':2020,
  5058. '李当林':2019,
  5059. '王赞文':2018,
  5060. }
  5061. switch(falg){
  5062. case 'create':
  5063. if(formdata3.value.拉料['编号']){
  5064. formdata3.value.拉料['姓名'] = formdata3.value.拉料['编号']
  5065. formdata3.value.拉料['编号'] = llyg[formdata3.value.拉料['姓名']]
  5066. }
  5067. break;
  5068. case create:
  5069. break;
  5070. }
  5071. }
  5072. //获取员工信息
  5073. // const GetYg = (event,inputName) => {
  5074. const GetYg = async (value,key) => {
  5075. let bzyg=''
  5076. bzyg=`组员${key}`
  5077. let bzxm=''
  5078. bzxm=`组员${key}`
  5079. // console.log(formdata3.value[bzyg]['编号'])
  5080. const response = await getYg({sczl_bh:formdata3.value[bzyg]['编号']});
  5081. // console.log(response)
  5082. if (response.code === 0) {
  5083. if(response.data.length === 1){
  5084. formdata3.value[bzxm]['姓名'] = response.data[0].ygxm
  5085. formdata3.value[bzyg]['编号'] = response.data[0].员工编号
  5086. }else{
  5087. blModellist.value = true;
  5088. // console.log(response.data)
  5089. employeeDatalist.value = response.data // 假设响应数据是数组
  5090. }
  5091. }
  5092. }
  5093. const clickedlist = ref(false);
  5094. const blModellist = ref(false)
  5095. const employeeDatalist = ref('')
  5096. const tablebllickHandlerlist = async (row, column, event) => {
  5097. // console.log(row.员工编号)
  5098. // console.log(row.ygxm)
  5099. if (clickedlist.value) {
  5100. // 如果已经点击过一次,则不再执行操作
  5101. return;
  5102. }
  5103. let nextIndex = 1;
  5104. while (formdata3.value[`组员${nextIndex}`]['编号'] !== '') {
  5105. nextIndex++;
  5106. if (nextIndex > 10) {
  5107. // 如果所有字段都已经填满,则不做任何事情并退出函数
  5108. return;
  5109. }
  5110. }
  5111. // 将选定的值分配给下一个空的代码和名称字段
  5112. formdata3.value[`组员${nextIndex-1}`]['编号'] = row.员工编号;
  5113. formdata3.value[`组员${nextIndex-1}`]['姓名'] = row.ygxm;
  5114. blModellist.value = false;
  5115. clickedlist.value = true;
  5116. setTimeout(() => {
  5117. clickedlist.value = false;
  5118. }, 300); // 300毫秒内再次点击将不会触发事件,你可以根据需要调整这个延迟时间
  5119. };
  5120. //追加字体颜色和不可输入
  5121. const setColorReadonly = (id) => {
  5122. const newInput = document.getElementById(id)
  5123. newInput.style.color = 'red';
  5124. newInput.setAttribute('readonly', true);
  5125. }
  5126. //追加字体颜色和可输入
  5127. const unsetColorReadonly = (id) => {
  5128. const newInput = document.getElementById(id)
  5129. newInput.style.color = 'black';
  5130. newInput.removeAttribute('readonly');
  5131. }
  5132. //日报表修改弹窗确定
  5133. const chanliangenterDialog = async () => {
  5134. // SubmitDailyProduction()
  5135. if (type2.value === 'update') {
  5136. SubmitDailyProduction()
  5137. } else if (type2.value === 'create') {
  5138. add()
  5139. }
  5140. }
  5141. //日报表新增
  5142. const add = async () => {
  5143. // console.log(date+''+formdata3.value.starttime)
  5144. const rate1=(parseFloat(formdata3.value.组员1['比例']) / 100).toFixed(5)
  5145. const rate2=(parseFloat(formdata3.value.组员2['比例']) / 100).toFixed(5)
  5146. const rate3=(parseFloat(formdata3.value.组员3['比例']) / 100).toFixed(5)
  5147. const rate4=(parseFloat(formdata3.value.组员4['比例']) / 100).toFixed(5)
  5148. const rate5=(parseFloat(formdata3.value.组员5['比例']) / 100).toFixed(5)
  5149. const rate6=(parseFloat(formdata3.value.组员6['比例']) / 100).toFixed(5)
  5150. const rate7=(parseFloat(formdata3.value.组员7['比例']) / 100).toFixed(5)
  5151. const rate8=(parseFloat(formdata3.value.组员8['比例']) / 100).toFixed(5)
  5152. const rate9=(parseFloat(formdata3.value.组员9['比例']) / 100).toFixed(5)
  5153. const rate10=(parseFloat(formdata3.value.组员10['比例']) / 100).toFixed(5)
  5154. const restoredData = {
  5155. sczl_gdbh:formdata3.value.工单编号,
  5156. sczl_yjno:formdata3.value.yjno,
  5157. sczl_gxh:formdata3.value.gxh,
  5158. sczl_gxmc: formdata3.value.gxmc,
  5159. sczl_bzdh: formdata3.value.bzdh,
  5160. sczl_bh1: formdata3.value.组员1['编号'],
  5161. sczl_bh2: formdata3.value.组员2['编号'],
  5162. sczl_bh3: formdata3.value.组员3['编号'],
  5163. sczl_bh4: formdata3.value.组员4['编号'],
  5164. sczl_bh5: formdata3.value.组员5['编号'],
  5165. sczl_bh6: formdata3.value.组员6['编号'],
  5166. sczl_bh7: formdata3.value.组员7['编号'],
  5167. sczl_bh8: formdata3.value.组员8['编号'],
  5168. sczl_bh9: formdata3.value.组员9['编号'],
  5169. sczl_bh10: formdata3.value.组员10['编号'],
  5170. sczl_bh98:formdata3.value.组员1['编号'],
  5171. sczl_rate1: rate1,
  5172. sczl_rate2: rate2,
  5173. sczl_rate3: rate3,
  5174. sczl_rate4: rate4,
  5175. sczl_rate5: rate5,
  5176. sczl_rate6: rate6,
  5177. sczl_rate7: rate7,
  5178. sczl_rate8: rate8,
  5179. sczl_rate9: rate9,
  5180. sczl_rate10: rate10,
  5181. sczl_jtbh: formdata3.value.sczl_jtbh,
  5182. 开工时间:formdata3.value.starttime,
  5183. 码开始行:formdata3.value.码开始行,
  5184. 码结束行:formdata3.value.码结束行,
  5185. sys_id:sys_id,
  5186. sczl_装版工时:formdata3.value.装版补产工时,
  5187. sczl_打样工时:formdata3.value.打样补产工时,
  5188. sczl_异常类型1:formdata3.value.异常类型,
  5189. sczl_异常停机工时:formdata3.value.异常总工时,
  5190. sczl_异常工时1:formdata3.value.异常补时,
  5191. sczl_保养工时:formdata3.value.保养工时,
  5192. sczl_dedh:formdata3.value.dedh,
  5193. sczl_rq: formdata3.value.rq,
  5194. sczl_num: formdata3.value.num,
  5195. sczl_cl: formdata3.value.产量,
  5196. sczl_zcfp: formdata3.value.制程废品,
  5197. sczl_zccp: formdata3.value.制程次品,
  5198. sczl_前工序废: formdata3.value.前工序废,
  5199. sczl_来料少数: formdata3.value.来料异常,
  5200. sczl_ls: formdata3.value.联数,
  5201. sczl_ms: formdata3.value.色度数,
  5202. sczl_装版总工时: formdata3.value.装版工时,
  5203. sczl_打样总工时: formdata3.value.打样工时,
  5204. sczl_设备运行工时: formdata3.value.通电工时,
  5205. 码包: formdata3.value.码包,
  5206. 辅电表: formdata3.value.辅电表,
  5207. 主电表:formdata3.value.主电表,
  5208. sczl_bh98: formdata3.value.拉料['编号'],
  5209. }
  5210. if(restoredData.开工时间==undefined){
  5211. // restoredData.开工时间 = formattedDate
  5212. restoredData.开工时间 = '1900-01-01 00:00:00'
  5213. }
  5214. console.log(restoredData)
  5215. const response = await ChanliangAdd(restoredData);
  5216. if (response.code === 0) {
  5217. ElMessage({type: 'success',message: '成功'})
  5218. FacilitychanLiang()
  5219. FacilityDetail()
  5220. chanliangVisible.value=false
  5221. }
  5222. }
  5223. //日报表上传
  5224. const SubmitDailyProduction = async () => {
  5225. const rate1=(parseFloat(formdata3.value.组员1['比例']) / 100).toFixed(5)
  5226. const rate2=(parseFloat(formdata3.value.组员2['比例']) / 100).toFixed(5)
  5227. const rate3=(parseFloat(formdata3.value.组员3['比例']) / 100).toFixed(5)
  5228. const rate4=(parseFloat(formdata3.value.组员4['比例']) / 100).toFixed(5)
  5229. const rate5=(parseFloat(formdata3.value.组员5['比例']) / 100).toFixed(5)
  5230. const rate6=(parseFloat(formdata3.value.组员6['比例']) / 100).toFixed(5)
  5231. const rate7=(parseFloat(formdata3.value.组员7['比例']) / 100).toFixed(5)
  5232. const rate8=(parseFloat(formdata3.value.组员8['比例']) / 100).toFixed(5)
  5233. const rate9=(parseFloat(formdata3.value.组员9['比例']) / 100).toFixed(5)
  5234. const rate10=(parseFloat(formdata3.value.组员10['比例']) / 100).toFixed(5)
  5235. const restoredData = {
  5236. sczl_gdbh:formdata3.value.工单编号,
  5237. sczl_yjno:formdata3.value.yjno,
  5238. sczl_gxh:formdata3.value.gxh,
  5239. sczl_gxmc: formdata3.value.gxmc,
  5240. sczl_bzdh: formdata3.value.bzdh,
  5241. sczl_bh1: formdata3.value.组员1['编号'],
  5242. sczl_bh2: formdata3.value.组员2['编号'],
  5243. sczl_bh3: formdata3.value.组员3['编号'],
  5244. sczl_bh4: formdata3.value.组员4['编号'],
  5245. sczl_bh5: formdata3.value.组员5['编号'],
  5246. sczl_bh6: formdata3.value.组员6['编号'],
  5247. sczl_bh7: formdata3.value.组员7['编号'],
  5248. sczl_bh8: formdata3.value.组员8['编号'],
  5249. sczl_bh9: formdata3.value.组员9['编号'],
  5250. sczl_bh10: formdata3.value.组员10['编号'],
  5251. sczl_bh98:formdata3.value.组员1['编号'],
  5252. sczl_rate1: rate1,
  5253. sczl_rate2: rate2,
  5254. sczl_rate3: rate3,
  5255. sczl_rate4: rate4,
  5256. sczl_rate5: rate5,
  5257. sczl_rate6: rate6,
  5258. sczl_rate7: rate7,
  5259. sczl_rate8: rate8,
  5260. sczl_rate9: rate9,
  5261. sczl_rate10: rate10,
  5262. sczl_jtbh: formdata3.value.sczl_jtbh,
  5263. 开工时间:"2024-03-12 08:30:00",
  5264. 码开始行:formdata3.value.码开始行,
  5265. 码结束行:formdata3.value.码结束行,
  5266. sys_id:sys_id,
  5267. sczl_装版工时:formdata3.value.装版补产工时,
  5268. sczl_打样工时:formdata3.value.打样补产工时,
  5269. sczl_异常类型1:formdata3.value.异常类型,
  5270. sczl_异常停机工时:formdata3.value.异常总工时,
  5271. sczl_异常工时1:formdata3.value.异常补时,
  5272. sczl_保养工时:formdata3.value.保养工时,
  5273. sczl_dedh:formdata3.value.dedh,
  5274. sczl_rq: date,
  5275. sczl_num: formdata3.value.num,
  5276. // sczl_rq: formData3.value.sczl_rq,
  5277. sczl_cl: formdata3.value.产量,
  5278. sczl_zcfp: formdata3.value.制程废品,
  5279. sczl_zccp: formdata3.value.制程次品,
  5280. sczl_前工序废: formdata3.value.前工序废,
  5281. sczl_来料少数: formdata3.value.来料异常,
  5282. sczl_ls: formdata3.value.联数,
  5283. sczl_ms: formdata3.value.色度数,
  5284. sczl_装版总工时: formdata3.value.装版工时,
  5285. sczl_打样总工时: formdata3.value.打样工时,
  5286. sczl_设备运行工时: formdata3.value.通电工时,
  5287. 码包: formdata3.value.码包,
  5288. 辅电表: formdata3.value.辅电表,
  5289. 主电表:formdata3.value.主电表,
  5290. sczl_bh98: formdata3.value.拉料['编号'],
  5291. UniqId:uid.value
  5292. }
  5293. console.log(restoredData)
  5294. // console.log(formData3.value.formattedArray)
  5295. const response = await MachineChanliangDetailEdit(restoredData);
  5296. console.log(response)
  5297. if (response.code === 0) {
  5298. ElMessage({
  5299. type: 'success',
  5300. message: '成功'
  5301. })
  5302. FacilitychanLiang()
  5303. FacilityDetail()
  5304. chanliangVisible.value=false
  5305. }
  5306. }
  5307. selected.value='难度调整系数'
  5308. const SFType=ref(false)
  5309. const CPType=ref(false)
  5310. const SDType=ref(false)
  5311. const FPlxs=ref(false)
  5312. if(selected.value==='难度调整系数'){
  5313. SFType.value=true
  5314. CPType.value=false
  5315. SDType.value=false
  5316. }else if(selected.value=== '凹印版距'){
  5317. CPType.value=true
  5318. SFType.value=false
  5319. SDType.value=false
  5320. }else if(selected.value=== '色度数'){
  5321. SDType.value=true
  5322. SFType.value=false
  5323. CPType.value=false
  5324. }
  5325. //选择变化
  5326. const agreeChange = async () => {
  5327. if(selected.value=== '难度调整系数'){
  5328. SFType.value=true
  5329. CPType.value=false
  5330. SDType.value=false
  5331. FPlxs.value=false
  5332. }else if(selected.value=== '凹印版距'){
  5333. CPType.value=true
  5334. SFType.value=false
  5335. SDType.value=false
  5336. FPlxs.value=false
  5337. }else if(selected.value=== '色度数'){
  5338. SDType.value=true
  5339. SFType.value=false
  5340. CPType.value=false
  5341. FPlxs.value=false
  5342. }else if(selected.value=== '废品率系数'){
  5343. FPlxs.value=true
  5344. SFType.value= false
  5345. SDType.value= false
  5346. CPType.value=false
  5347. // hesuanValue.废品率系数 = '废品率系数'
  5348. }
  5349. }
  5350. //核算调整弹窗确定
  5351. const hesuanenterDialog = async () => {
  5352. console.log(selected.value)
  5353. if(selected.value==='难度调整系数'){
  5354. // console.log(multipleSelection.value.length)
  5355. // const Selection_ids=ref('')
  5356. // console.log(multipleSelection.value[0])
  5357. // for(let i=0;i<multipleSelection.value.length;i++){
  5358. // id.value+=multipleSelection.value[i].UniqId+','
  5359. // console.log(multipleSelection.value[i].UniqId)
  5360. // }
  5361. console.log(Selection_ids.value)
  5362. console.log(hesuanValue.缩放系数)
  5363. // return false;
  5364. const res = await CoefficientEdit({id:Selection_ids.value,工价系数:hesuanValue.缩放系数 })
  5365. console.log(res)
  5366. if(res.code===0){
  5367. ElMessage({
  5368. type: 'success',
  5369. message: '成功'
  5370. })
  5371. // multipleSelection.value=''
  5372. // multipleTable.clearSelection();
  5373. // console.log(multipleSelection.value)
  5374. hesuanVisible.value=false
  5375. FacilitychanLiang()
  5376. }else{
  5377. ElMessage({
  5378. type: 'error',
  5379. message: '失败'
  5380. })
  5381. }
  5382. }else if(selected.value=== '凹印版距'){
  5383. // console.log(hesuanValue.印刷方式)
  5384. // const Selection_ids=ref('')
  5385. // console.log(multipleSelection.value.length)
  5386. // console.log(multipleSelection.value[0])
  5387. // for(let i=0;i<multipleSelection.value.length;i++){
  5388. // id.value+=multipleSelection.value[i].UniqId+','
  5389. // console.log(multipleSelection.value[i].UniqId)
  5390. // }
  5391. const res = await PrintingModeDataEdit({id:Selection_ids.value,plate:hesuanValue.产品板距,mode:hesuanValue.印刷方式 })
  5392. console.log(res)
  5393. if(res.code===0){
  5394. ElMessage({
  5395. type: 'success',
  5396. message: '成功'
  5397. })
  5398. hesuanVisible.value=false
  5399. FacilitychanLiang()
  5400. }else{
  5401. ElMessage({
  5402. type: 'error',
  5403. message: '失败'
  5404. })
  5405. }
  5406. }else if(selected.value=== '色度数'){
  5407. // const Selection_ids=ref('')
  5408. // console.log(multipleSelection.value.length)
  5409. // console.log(multipleSelection.value[0])
  5410. // for(let i=0;i<multipleSelection.value.length;i++){
  5411. // id.value+=multipleSelection.value[i].UniqId+','
  5412. // console.log(multipleSelection.value[i].UniqId)
  5413. // }
  5414. const res = await ChromaDataEdit({id:Selection_ids.value,ms:hesuanValue.色度数 })
  5415. console.log(res)
  5416. if(res.code===0){
  5417. ElMessage({
  5418. type: 'success',
  5419. message: '成功'
  5420. })
  5421. hesuanVisible.value=false
  5422. FacilitychanLiang()
  5423. }else{
  5424. ElMessage({
  5425. type: 'error',
  5426. message: '失败'
  5427. })
  5428. }
  5429. }else if(selected.value=== '废品率系数'){
  5430. // const Selection_ids=ref('')
  5431. // console.log(multipleSelection.value.length)
  5432. // console.log(multipleSelection.value[0])
  5433. // for(let i=0;i<multipleSelection.value.length;i++){
  5434. // id.value+=multipleSelection.value[i].UniqId+','
  5435. // console.log(multipleSelection.value[i].UniqId)
  5436. // }
  5437. console.log(uid.value)
  5438. console.log(hesuanValue.废品率系数)
  5439. const res = await RejectionEdit({id:Selection_ids.value,rejection:hesuanValue.废品率系数 })
  5440. console.log(res)
  5441. if(res.code===0){
  5442. ElMessage({
  5443. type: 'success',
  5444. message: '成功'
  5445. })
  5446. hesuanVisible.value=false
  5447. FacilitychanLiang()
  5448. }else{
  5449. ElMessage({
  5450. type: 'error',
  5451. message: '失败'
  5452. })
  5453. }
  5454. }
  5455. }
  5456. // 核算参数调整取消
  5457. const hesuanVisiblecloseDialog = async () => {
  5458. hesuanVisible.value = false
  5459. }
  5460. const ent1 = (event) => {
  5461. const inputs = document.getElementsByTagName('input');
  5462. const currentIndex = Array.from(inputs).indexOf(event.target);
  5463. if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
  5464. let nextIndex = currentIndex + 1;
  5465. while (nextIndex < inputs.length) {
  5466. if (inputs[nextIndex].disabled) {
  5467. console.log("当前输入框为disabled,跳过");
  5468. nextIndex++; // 跳过disabled的输入框
  5469. continue;
  5470. }
  5471. if (!inputs[nextIndex].readOnly) {
  5472. nextTick(() => {
  5473. inputs[nextIndex].focus();
  5474. inputs[nextIndex].select();
  5475. });
  5476. break;
  5477. }
  5478. nextIndex++;
  5479. }
  5480. }
  5481. else if (event.keyCode === 38) { // 向上箭头
  5482. for (let i = currentIndex - 1; i >= 0; i--) {
  5483. if (!inputs[i].readOnly) {
  5484. nextTick(()=>{
  5485. inputs[i].focus();
  5486. inputs[i].select();
  5487. })
  5488. break;
  5489. }
  5490. }
  5491. } else if (event.keyCode === 8) { // 删除箭头
  5492. if (event.target.selectionStart === 0) {
  5493. for (let i = currentIndex - 1; i >= 0; i--) {
  5494. if (!inputs[i].readOnly) {
  5495. nextTick(()=>{
  5496. inputs[i].focus();
  5497. inputs[i].setSelectionRange(0, 0);
  5498. })
  5499. break;
  5500. }
  5501. }
  5502. }
  5503. } else if (event.keyCode === 37) { // 向左箭头
  5504. if (event.target.selectionStart === 0) {
  5505. for (let i = currentIndex - 1; i >= 0; i--) {
  5506. if (!inputs[i].readOnly) {
  5507. nextTick(()=>{
  5508. inputs[i].focus();
  5509. inputs[i].select();
  5510. })
  5511. break;
  5512. }
  5513. }
  5514. }
  5515. } else if (event.keyCode === 39) { // 向右箭头
  5516. if (event.target.selectionStart === event.target.value.length) {
  5517. for (let i = currentIndex + 1; i < inputs.length; i++) {
  5518. if (!inputs[i].readOnly) {
  5519. nextTick(()=>{
  5520. inputs[i].focus();
  5521. inputs[i].select();
  5522. })
  5523. break;
  5524. }
  5525. }
  5526. }
  5527. }
  5528. }
  5529. // =========== 修正核算参数 ===========
  5530. const xzhstableColumns = ref(
  5531. [
  5532. { label: '方案', prop: '方案', width: '65' },
  5533. { label: '印件号及工序名称', prop: '印件号及工序名称', width: '300' },
  5534. { label: '参照设备', prop: '参照设备', width: '90' },
  5535. { label: '难度系数', prop: 'sxzhscsold_难度系数', width: '90' },
  5536. { label: '新难度系数', prop: '难度系数', width: '100' },
  5537. { label: '原损耗代号', prop: 'sxzhscsold_损耗代号', width: '150' },
  5538. { label: '基础损耗', prop: '基础损耗', width: '90' },
  5539. { label: '新损耗代号', prop: '损耗代号', width: '150' },
  5540. { label: '原印刷方式', prop: 'sxzhscsold_印刷方式', width: '150' },
  5541. { label: '原来版距', prop: 'sxzhscsold_版距', width: '100' },
  5542. { label: '新印刷方式', prop: '印刷方式', width: '100' },
  5543. { label: '新来版距', prop: '版距', width: '90' },
  5544. { label: '原计损色数', prop: 'sxzhscsold_计损色数', width: '100' },
  5545. { label: '新计损色数', prop: '计损色数', width: '100' },
  5546. { label: '原损耗系数', prop: 'sxzhscsold_损耗系数', width: '100' },
  5547. { label: '新损耗系数', prop: '损耗系数', width: '100' },
  5548. ]
  5549. )
  5550. const handleKeyDown = (event, x, y, prop) => {
  5551. const currentElement = document.getElementById(`input${x}${y}`);
  5552. if (currentElement === null && currentElement === undefined) return
  5553. let move = 0
  5554. switch (event.keyCode) {
  5555. case 13: // Enter
  5556. case 40: // 向下箭头
  5557. if (y < sxzhscstableData.value.length )
  5558. document.getElementById(`input${x}${y + 1}`).focus();
  5559. break;
  5560. case 38: // 向上箭头
  5561. if ( y > 0) {
  5562. document.getElementById(`input${x}${y - 1}`).focus();
  5563. }
  5564. break;
  5565. case 39: // 向左箭头
  5566. if ( x === 4) {
  5567. move = x + 3
  5568. } else if(x === 7){
  5569. move = x + 3
  5570. } else if( x === 10){
  5571. move = x + 1
  5572. }else if( x === 11){
  5573. move = x + 2
  5574. }else if( x === 13){
  5575. move = x + 2
  5576. }
  5577. document.getElementById(`input${move}${y}`).focus();
  5578. break;
  5579. case 37: // 向右箭头
  5580. if ( x === 15) {
  5581. move = x - 2
  5582. } else if (x=== 13) {
  5583. move = x - 2
  5584. }else if (x=== 11) {
  5585. move = x - 1
  5586. }else if (x=== 10) {
  5587. move = x - 3
  5588. }else if (x=== 7) {
  5589. move = x - 3
  5590. }
  5591. document.getElementById(`input${move}${y}`).focus();
  5592. break;
  5593. default:
  5594. break;
  5595. }
  5596. }
  5597. const xzhscslist = ref(false);
  5598. const xzhscsformData = reactive({
  5599. gdbh: '',
  5600. cpdh: '',
  5601. gdmc: '',
  5602. yjdh:'',
  5603. yjmc:'',
  5604. });
  5605. const sxzhscstableData = ref([]);
  5606. //修正核算参数按钮
  5607. const onxzhscsclick = () => {
  5608. console.log(_gdbhlist.value)
  5609. if(_gdbhlist.value == null || _gdbhlist.value == ''){
  5610. xzhscslist.value = false;
  5611. ElMessage({type: 'warning',message: '请选择 设备作业清单工单后,再操作此功能' })
  5612. }else{
  5613. xzhscsformData['gdbh'] = _gdbhlist.value;
  5614. // xzhscsformData['cpdh'] = _Gd_cpdh.value;
  5615. // xzhscsformData['gdmc'] = _Gd_cpmc.value;
  5616. _AccountingParameterdata();
  5617. xzhscslist.value = true;
  5618. }
  5619. };
  5620. //修正核算参数回车
  5621. const xzhscsgetProductValue = () => {
  5622. _AccountingParameterdata()
  5623. };
  5624. // 修正工单核算参数表格数据
  5625. const _AccountingParameterdata = async ()=>{
  5626. // const ProductNamedata = await ProductNameData({workOrder:_Gd_gdbh.value});
  5627. const ProductNamedata = await ProductNameData({workOrder:xzhscsformData['gdbh']});
  5628. if(ProductNamedata.code===0){
  5629. xzhscsformData['cpdh']=ProductNamedata.data.产品代号
  5630. xzhscsformData['gdmc']=ProductNamedata.data.产品名称
  5631. xzhscsformData['yjdh']=ProductNamedata.data.印件代号
  5632. xzhscsformData['yjmc']=ProductNamedata.data.印件名称
  5633. }
  5634. let workOrder = xzhscsformData['gdbh'];
  5635. try {
  5636. const AccountingParameterdata = await AccountingParameter({workOrder:workOrder});
  5637. sxzhscstableData.value = AccountingParameterdata.data;
  5638. const formattedData = AccountingParameterdata.data.map(item=>{
  5639. item.sxzhscsold_难度系数 = item.难度系数;
  5640. item.sxzhscsold_损耗代号 = item.损耗代号;
  5641. item.sxzhscsold_印刷方式 = item.印刷方式;
  5642. item.sxzhscsold_版距 = item.版距;
  5643. item.sxzhscsold_计损色数 = item.计损色数;
  5644. item.sxzhscsold_损耗系数 = item.损耗系数;
  5645. return item
  5646. });
  5647. } catch (error) {
  5648. console.error(error);
  5649. }
  5650. }
  5651. //修正核算参数更新
  5652. const xzhscsConfirm = async () => {
  5653. const firstCharValid = sxzhscstableData.value.map(item => {
  5654. const firstChar = item["损耗代号"] ? item["损耗代号"].charAt(0) : '';
  5655. return firstChar === '0' || firstChar === '';
  5656. });
  5657. // if(firstCharValid.includes(false)){
  5658. // ElMessage({type: 'warning',message: '损耗代号开头必须是 0' })
  5659. // return false;
  5660. // }
  5661. if (sxzhscstableData.value) {
  5662. const formattedData = sxzhscstableData.value.map(item => {
  5663. return {
  5664. Uniqid: parseInt(item.UniqId),
  5665. chromatic: parseFloat(item.计损色数) ?? '',
  5666. difficulty: parseFloat(item.难度系数) ?? '',
  5667. loss: item.损耗代号 ??'',
  5668. plate: parseInt(item.版距) ?? '',
  5669. printMode: item.印刷方式 ?? '',
  5670. wastage: parseFloat(item.损耗系数),
  5671. }
  5672. });
  5673. const AccountingParameterEditdata = await AccountingParameterEdit(formattedData);
  5674. if (AccountingParameterEditdata.code === 0) {
  5675. xzhscslist.value = false;
  5676. ElMessage({ type: 'success', message: '更新成功' });
  5677. sxzhscstableData.value =''
  5678. xzhscsformData=''
  5679. } else {
  5680. ElMessage({ type: 'error', message: '更新失败' });
  5681. }
  5682. } else {
  5683. console.error("数据错误");
  5684. }
  5685. };
  5686. //修正核算参数退出
  5687. const sxzhscsCancel = () => {
  5688. xzhscslist.value = false;
  5689. sxzhscstableData.value =''
  5690. xzhscsformData=''
  5691. };
  5692. //修正核算参数颜色
  5693. const sxzhscsCellClass = ({row, column, rowIndex, columnIndex}) =>{
  5694. if (column.label === '新难度系数' || column.label === '新损耗代号' || column.label === '新印刷方式' || column.label === '新来版距' || column.label === '新计损色数' || column.label === '新损耗系数') {
  5695. return 'background-plan-usage-low';
  5696. }
  5697. }
  5698. //=========工序产量核查===========
  5699. const gd_gxclhclist = ref(false);
  5700. const gxclhc_Data = ref([]);
  5701. const gxclhc_Columns = ref(
  5702. [
  5703. { label: '印件及工序名称', prop: 'concatenatedData', width: '380' },
  5704. // { label: '印件', prop: 'Gy0_yjno', width: '130' },
  5705. // { label: '工序', prop: 'Gy0_gxh', width: '130' },
  5706. // { label: '名称', prop: 'Gy0_gxmc', width: '130' },
  5707. { label: '工序计划产量', prop: 'Gy0_计划接货数', width: '120' },
  5708. { label: '联数', prop: 'Gy0_ls', width: '70' },
  5709. { label: '折算车头产量', prop: '折算车头产量', width: '120' },
  5710. { label: '实际上报产量', prop: 'sczl_cl', width: '120' },
  5711. { label: '制程废品', prop: 'sczl_zcfp', width: '120' },
  5712. { label: '制程废品率', prop: '制程废品率', width: '120' },
  5713. { label: '来料异常', prop: '来料异常', width: '90' },
  5714. { label: '流程单数', prop: 'process_num', width: '90' },
  5715. { label: '当前设备', prop: 'Gy0_sbbh', width: '120' },
  5716. { label: '工序状态', prop: 'PD_WG', width: '90'},
  5717. { label: '首板生产日期', prop: 'sczl_rq', width: '160' },
  5718. ]
  5719. )
  5720. const gxclhcformData = reactive({
  5721. gdbh: '',
  5722. gdmc: '',
  5723. });
  5724. // 工序产量核查按钮
  5725. const gd_gxclhconClick = async () => {
  5726. console.log(_rclsb_gdbh.value)
  5727. if(_rclsb_gdbh.value === '' || _rclsb_gdbh.value === null){
  5728. ElMessage({type: 'warning',message: '请选择具体的工单,在进行操作'})
  5729. return false;
  5730. }
  5731. gxclhcformData['gdbh'] = _rclsb_gdbh.value;
  5732. gd_gxclhclist.value = true;
  5733. _getOrderProcessCount();
  5734. };
  5735. //工序产量核查回车
  5736. const gxclhcProductValue = async () => {
  5737. _getOrderProcessCount();
  5738. }
  5739. //工序产量核查退出
  5740. const gxclhcCancel = async () => {
  5741. gd_gxclhclist.value = false;
  5742. };
  5743. //工序产量核查方法接口
  5744. const _getOrderProcessCount = async () => {
  5745. const order = gxclhcformData['gdbh'];
  5746. const getOrderProcessCount_list = await getOrderProcessCount({order:order});
  5747. const concatenatedData = getOrderProcessCount_list.data.map(item => {
  5748. // 优化后的代码,使用模板字符串连接字段值并在单个数字前添加零
  5749. const formattedYjno = item.Gy0_yjno.length === 1 ? `0${item.Gy0_yjno}` : item.Gy0_yjno;
  5750. const formattedGxh = item.Gy0_gxh.length === 1 ? `0${item.Gy0_gxh}` : item.Gy0_gxh;
  5751. const concatenatedValue = `${formattedYjno}-${formattedGxh} ${item.Gy0_gxmc} 【${item.Add_gxmc} 】`;
  5752. return {
  5753. ...item,
  5754. concatenatedData: concatenatedValue, // 使用新属性名
  5755. };
  5756. });
  5757. gxclhc_Data.value = concatenatedData;
  5758. };
  5759. //工序产量核查
  5760. const gxclhcCellClass = ({row, column, rowIndex, columnIndex}) =>{
  5761. if (column.label === '实际上报产量' ||column.label === '制程废品' || column.label === '制程废品率' ||
  5762. column.label === '来料异常' || column.label === '流程单数' || column.label === '当前设备') {
  5763. return 'lan-plan-usage-lows';
  5764. }
  5765. if (column.label === '折算车头产量') {
  5766. return 'gxclhc—color-column-red';
  5767. }
  5768. // 如果不是 'PD_WG' 列,返回空字符串或其他样式类
  5769. if (column.label === '工序状态'){
  5770. if(row['PD_WG'] === '完工'){
  5771. return 'lan-plan-usage-lowshui';
  5772. }else{
  5773. return 'pczccolor-column-lan';
  5774. }
  5775. }
  5776. }
  5777. // ============== 表格控制部分结束 ===============
  5778. // 获取需要的字典 可能为空 按需保留
  5779. const setOptions = async () =>{
  5780. }
  5781. // 获取需要的字典 可能为空 按需保留
  5782. setOptions()
  5783. // 多选数据
  5784. const multipleSelection = reactive([])
  5785. // 多选
  5786. const handleSelectionChange = (val) => {
  5787. console.log(val)
  5788. console.log(val.length)
  5789. multipleSelection.value= val
  5790. // for(let i=0;i<val.length;i++){
  5791. // multipleSelection= val[i].UniqId
  5792. // }
  5793. console.log(multipleSelection.value)
  5794. // console.log(val.UniqId)
  5795. // multipleSelection.value = val.UniqId
  5796. // console.log(multipleSelection.value)
  5797. }
  5798. // 删除行
  5799. const deleteRow = (row) => {
  5800. ElMessageBox.confirm('确定要删除吗?', '提示', {
  5801. confirmButtonText: '确定',
  5802. cancelButtonText: '取消',
  5803. type: 'warning'
  5804. }).then(() => {
  5805. deleteCompanyFunc(row)
  5806. })
  5807. }
  5808. // 批量删除控制标记
  5809. const deleteVisible = ref(false)
  5810. // 多选删除
  5811. const onDelete = async() => {
  5812. const ids = []
  5813. if (multipleSelection.value.length === 0) {
  5814. ElMessage({
  5815. type: 'warning',
  5816. message: '请选择要删除的数据'
  5817. })
  5818. return
  5819. }
  5820. multipleSelection.value &&
  5821. multipleSelection.value.map(item => {
  5822. ids.push(item.ID)
  5823. })
  5824. const res = await deleteCompanyByIds({ ids })
  5825. if (res.code === 0) {
  5826. ElMessage({
  5827. type: 'success',
  5828. message: '删除成功'
  5829. })
  5830. if (tableData.value.length === ids.length && page.value > 1) {
  5831. page.value--
  5832. }
  5833. deleteVisible.value = false
  5834. getTableData()
  5835. }
  5836. }
  5837. // 行为控制标记(弹窗内部需要增还是改)
  5838. const type = ref('')
  5839. // 更新行
  5840. const updateCompanyFunc = async(row) => {
  5841. const res = await findCompany({ ID: row.ID })
  5842. type.value = 'update'
  5843. if (res.code === 0) {
  5844. formData.value = res.data.recompany
  5845. dialogFormVisible.value = true
  5846. }
  5847. }
  5848. const cpcode=ref('')
  5849. const finishedcode=ref()
  5850. const _gdbhlist = ref('')
  5851. const yjupdateCompanyFunc = async(row) => {
  5852. console.log(row['工单编号|质量信息'].split('|')[0])
  5853. const Procedurelist = await Procedure({ Gd_gdbh: row['工单编号|质量信息'].replace(/\|$/, '') })
  5854. console.log(Procedurelist)
  5855. selectData.value = Procedurelist.data;
  5856. // const res = await facilityProcedure({ Gd_gdbh: row['工单编号|质量信息'].substring(0, 7) })
  5857. // console.log(res)
  5858. // if (res.code === 0) {
  5859. // selectData.value = res.data
  5860. // }
  5861. console.log(row)
  5862. cpcode.value=row.产品代号
  5863. _gdbhlist.value = row['工单编号|质量信息'].split('|')[0]
  5864. console.log(_gdbhlist.value)
  5865. // console.log(row.产品代号)
  5866. finishedcode.value=row.产品代号
  5867. // console.log(finishedcode.value)
  5868. }
  5869. // 删除行
  5870. const deleteCompanyFunc = async (row) => {
  5871. const res = await deleteCompany({ ID: row.ID })
  5872. if (res.code === 0) {
  5873. ElMessage({
  5874. type: 'success',
  5875. message: '删除成功'
  5876. })
  5877. if (tableData.value.length === 1 && page.value > 1) {
  5878. page.value--
  5879. }
  5880. getTableData()
  5881. }
  5882. }
  5883. // //键盘 input框跳转
  5884. // const ent = (event,id1,id2,id3) => {
  5885. // if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
  5886. // if(id3!=''){
  5887. // document.getElementById(id3).focus()
  5888. // }
  5889. // } else if (event.keyCode === 38) { // 向上箭头
  5890. // if(id1!=''){
  5891. // document.getElementById(id1).focus()
  5892. // }
  5893. // }else if (event.keyCode === 8) { // 删除箭头
  5894. // if(id1!='' && document.getElementById(id2).value===''){
  5895. // document.getElementById(id1).focus()
  5896. // }
  5897. // }else if (event.keyCode === 37) { // 向左箭头
  5898. // if(id1!='' && document.getElementById(id2).selectionStart==0){
  5899. // document.getElementById(id1).focus()
  5900. // }
  5901. // }else if (event.keyCode === 39) { // 向右箭头
  5902. // if(id3!='' && document.getElementById(id2).selectionStart == document.getElementById(id2).value.length){
  5903. // document.getElementById(id3).focus()
  5904. // }
  5905. // }
  5906. // }
  5907. // 弹窗控制标记
  5908. const dialogFormVisible = ref(false)
  5909. const dianjianVisible = ref(false)
  5910. const yinbanVisible = ref(false)
  5911. // 查看详情控制标记
  5912. const detailShow = ref(false)
  5913. const bzData = reactive([])
  5914. // 打开详情弹窗
  5915. const openDetailShow = () => {
  5916. detailShow.value = true
  5917. }
  5918. // 打开详情
  5919. const getDetails = async (row) => {
  5920. // 打开弹窗
  5921. const res = await findCompany({ ID: row.ID })
  5922. if (res.code === 0) {
  5923. formData.value = res.data.recompany
  5924. openDetailShow()
  5925. }
  5926. }
  5927. // 关闭详情弹窗
  5928. const closeDetailShow = () => {
  5929. detailShow.value = false
  5930. }
  5931. const detailShow_rcl = ref(false)
  5932. // 关闭详情弹窗
  5933. const closeDetailShow_rcl = () => {
  5934. detailShow_rcl.value = false
  5935. }
  5936. // 打开弹窗
  5937. const openDialog = () => {
  5938. // type.value = 'create'
  5939. console.log('222')
  5940. FacilityInspect()
  5941. FacilitychanLiang()
  5942. dialogFormVisible.value = true
  5943. }
  5944. let drzcData=[]
  5945. let columnNames=[]
  5946. //当日制程检验记录
  5947. const FacilityInspect = async () => {
  5948. const response = await facilityInspect({machine:JTMC,date:date});
  5949. console.log(response)
  5950. if(response.code==0){
  5951. // 提取 inspectiontime 作为列名
  5952. // Extract inspectiontime as columnNames
  5953. columnNames = response.data.InspectionTime;
  5954. // Populate drzcData with row data
  5955. for (const key in response.data.row[0]) {
  5956. if (key !== 'InspectionTime') {
  5957. const item = response.data.row[0][key];
  5958. const rowData = {
  5959. '工单编号': item['工单编号'],
  5960. '印件号': item['印件号'],
  5961. '工序名称': item['工序名称'],
  5962. '检验项目': item['检验项目']
  5963. };
  5964. // Initialize time columns with '—'
  5965. columnNames.forEach(time => {
  5966. rowData[time] = '';
  5967. });
  5968. // Split inspectresult and fill the corresponding time columns
  5969. const results = item['time'].split(',');
  5970. results.forEach(result => {
  5971. if (columnNames.includes(result)) {
  5972. rowData[result] = '√';
  5973. }else{rowData[result] = ''}
  5974. });
  5975. // Add the row data to drzcData
  5976. drzcData.push(rowData);
  5977. }
  5978. }
  5979. drzcDatas.value=drzcData
  5980. console.log(drzcData);
  5981. }
  5982. }
  5983. const _rclsb_gdbh = ref('')
  5984. // 当日上报产量数据
  5985. const FacilitychanLiang = async () => {
  5986. const response = await facilitychanLiang({machine:JTMC,date:date});
  5987. console.log(response.data)
  5988. _rclsb_gdbh.value = response.data[0]['工单编号']
  5989. console.log(12)
  5990. if(response.code==0){
  5991. let totalA = response.data['totalA']
  5992. let totalB = response.data['totalB']
  5993. let 制程废品A = response.data['制程废品A']
  5994. let 制程废品B = response.data['制程废品B']
  5995. let 制程次品A = response.data['制程次品A']
  5996. let 制程次品B = response.data['制程次品B']
  5997. let 来料异常A = response.data['来料异常A']
  5998. let 来料异常B = response.data['来料异常B']
  5999. let 装版工时A = response.data['装版工时A']
  6000. let 装版工时B = response.data['装版工时B']
  6001. delete response.data['totalA']
  6002. delete response.data['totalB']
  6003. delete response.data['制程废品A']
  6004. delete response.data['制程废品B']
  6005. delete response.data['制程次品A']
  6006. delete response.data['制程次品B']
  6007. delete response.data['来料异常A']
  6008. delete response.data['来料异常B']
  6009. delete response.data['装版工时A']
  6010. delete response.data['装版工时B']
  6011. gytableData.value=Object.values(response.data)
  6012. console.log(response.data)
  6013. if(totalA){
  6014. let rowA = {
  6015. 产品名称: 'A班产量:'+totalA,
  6016. UniqId: "",bzdh: "",cpmc: "",dedh: "",gxh: "",gxmc: "",num: "",sczl_bh98: "",sj1: "",sj2: "",yjno: "",
  6017. 主电表: "",产量: "",保养工时: "",制程废品: 制程废品A,制程次品:制程次品A,前工序废: "",千件工价: "",印刷方式: "",备注: "",
  6018. 工单编号: "",工序: "",异常总工时: "",异常类型: "",异常补时: "",打样工时: "",日定额: "",更新时间: "",来料异常: 来料异常A,用户: "",码包: "",
  6019. 码开始行: "",码结束行: "",组员1: "",组员2: "",组员3: "",色度数: "",装版工时: 装版工时A,辅电表: "",通电工时: "",难度系数: "",
  6020. }
  6021. gytableData.value.push(rowA)
  6022. }
  6023. if(totalB){
  6024. let rowB = {
  6025. 产品名称: 'B班产量:'+totalB,
  6026. UniqId: "",bzdh: "",cpmc: "",dedh: "",gxh: "",gxmc: "",num: "",sczl_bh98: "",sj1: "",sj2: "",yjno: "",
  6027. 主电表: "",产量: "",保养工时: "",制程废品: 制程废品B,制程次品: 制程次品B,前工序废: "",千件工价: "",印刷方式: "",备注: "",
  6028. 工单编号: "",工序: "",异常总工时: "",异常类型: "",异常补时: "",打样工时: "",日定额: "",更新时间: "",来料异常: 来料异常B,用户: "",码包: "",
  6029. 码开始行: "",码结束行: "",组员1: "",组员2: "",组员3: "",色度数: "",装版工时:装版工时B,辅电表: "",通电工时: "",难度系数: "",
  6030. }
  6031. gytableData.value.push(rowB)
  6032. }
  6033. }
  6034. }
  6035. // 关闭弹窗
  6036. const closeDialog = () => {
  6037. dialogFormVisible.value = false
  6038. chanliangVisible.value=false
  6039. formData.value = {
  6040. address: '',
  6041. image: '',
  6042. name: '',
  6043. }
  6044. }
  6045. // 弹窗确定
  6046. const enterDialog = async () => {
  6047. elFormRef.value?.validate( async (valid) => {
  6048. if (!valid) return
  6049. let res
  6050. switch (type.value) {
  6051. case 'create':
  6052. res = await createCompany(formData.value)
  6053. break
  6054. case 'update':
  6055. res = await updateCompany(formData.value)
  6056. break
  6057. default:
  6058. res = await createCompany(formData.value)
  6059. break
  6060. }
  6061. if (res.code === 0) {
  6062. ElMessage({
  6063. type: 'success',
  6064. message: '创建/更改成功'
  6065. })
  6066. closeDialog()
  6067. getTableData()
  6068. }
  6069. })
  6070. }
  6071. //点击label获取表格数据
  6072. function duohandleClick(table) {
  6073. console.log(table.props.label)
  6074. console.log(JTMC)
  6075. if(table.props.label === '设备作业清单'){
  6076. FacilityWorklist();
  6077. }
  6078. if(table.props.label === '班组人员及分配比例'){
  6079. FacilityTeam(JTMC)
  6080. }
  6081. // if(table.props.label=='当班产量明细'){
  6082. // FacilityDetail()
  6083. // zdtreeType.value=true
  6084. // }else{
  6085. // zdtreeType.value=false
  6086. // }
  6087. if(table.props.label === '检验记录'){
  6088. InspectionRecord()
  6089. }
  6090. }
  6091. //设备作业清单 正在生产中 背景颜色
  6092. const sbzyqdsatusCellClass = ({row, column, rowIndex, columnIndex}) =>{
  6093. if (row.status === 1) {
  6094. return 'status-plan-usage-low';
  6095. }
  6096. }
  6097. </script>
  6098. <style scoped>
  6099. /* .button-container {
  6100. display: flex;
  6101. flex-wrap: wrap;
  6102. } */
  6103. .bt{
  6104. /* margin-left: 2px !important;
  6105. padding: 3px !important;
  6106. font-size: 12px; */
  6107. margin-bottom: 5px !important;
  6108. }
  6109. .button-container {
  6110. display: flex;
  6111. flex-wrap: wrap;
  6112. justify-content: flex-start; /* Align buttons from left to right */
  6113. }
  6114. .custom-button {
  6115. display: flex;
  6116. flex-direction: column;
  6117. align-items: center;
  6118. text-align: center; /* Center the text horizontally */
  6119. flex: 0 0 150px; /* Set the width of each button */
  6120. height: 170px; /* Allow the height to adjust based on content */
  6121. margin: 7px; /* Set spacing between buttons */
  6122. }
  6123. .custom-button img {
  6124. max-width: 100%; /* Ensure the image doesn't exceed the button width */
  6125. }
  6126. .JKWTree-container {
  6127. display: flex;
  6128. }
  6129. .JKWTree-tree {
  6130. width: 300px;
  6131. background-color: #fff;
  6132. padding: 10px;
  6133. margin-right: 20px;
  6134. }
  6135. .JKWTree-tree h3 {
  6136. font-size: 15px;
  6137. font-weight: 700;
  6138. margin: 10px 0;
  6139. }
  6140. .JKWTree-content {
  6141. flex: 1;
  6142. }
  6143. /*!* 选中某行时的背景色*/
  6144. :deep(.el-table__body tr.current-row)>td {
  6145. background: #ff80ff !important;
  6146. }
  6147. deep(.statusy-plan-usage-low div) {
  6148. color: #8c939d !important;
  6149. }
  6150. /* 设备作业清单 正在生产中 背景颜色 */
  6151. :deep(.status-plan-usage-low ) {
  6152. background: yellow !important;
  6153. }
  6154. ::v-deep .el-tabs--card > .el-tabs__header .el-tabs__item.is-active {
  6155. color: white; /* 文字颜色 */
  6156. background-color: #4d70ff; /* 背景颜色 */
  6157. }
  6158. .groupbox
  6159. {margin:10px;
  6160. width:500px;
  6161. height:500px;
  6162. border:thin solid black;
  6163. padding:10px}
  6164. .grouptitle
  6165. {display:block;
  6166. margin-top:-24px;
  6167. margin-left:20px;
  6168. width:150px;
  6169. text-align:center;
  6170. background-color:white}
  6171. /*工序产量核查*/
  6172. :deep(.gxclhc—color-column-red div) {
  6173. color: red !important;
  6174. }
  6175. :deep(.lan-plan-usage-lows div) {
  6176. color: blue !important;
  6177. font-weight: bold;
  6178. }
  6179. :deep(.lan-plan-usage-lowshui div) {
  6180. color: #8c939d !important;
  6181. }
  6182. :deep(.plan-usage-low div) {
  6183. color: blue !important;
  6184. font-size: 16px;
  6185. font-weight: bold;
  6186. }
  6187. </style>