chejianbaogong.vue 219 KB

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