shebeiyunxing.vue 191 KB

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