shebeiyunxing.vue 190 KB

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