shebeiyunxing.vue 252 KB

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