chejianbaogong.vue 241 KB

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