shebeiyunxing.vue 251 KB

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